busybox: add check for capabilities file
authorDaniel Golle <daniel@makrotopia.org>
Fri, 27 Nov 2020 23:45:54 +0000 (23:45 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 30 Nov 2020 10:39:01 +0000 (10:39 +0000)
Similar to the previous commit adding a check to the init script of
umdns, do a similar change for sysntpd, just to be on the safe side.

Inspired-by: 520403cd49 ("umdns: add check for seccomp list")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
package/utils/busybox/Makefile
package/utils/busybox/files/sysntpd

index 71bd888c7192048063149375a000e73c269984ea..38ef4d33bd14713a949042b83ae409d5edd24861 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=busybox
 PKG_VERSION:=1.31.1
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 PKG_FLAGS:=essential
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
index db5fc6c034fe8c371955ad56382dd12e5f5ab8c5..19571a2306ae7ae27152334a5d462a8b1d1eadd4 100755 (executable)
@@ -55,7 +55,7 @@ start_ntpd_instance() {
                procd_append_param command -p $peer
        done
        procd_set_param respawn
-       [ -x /sbin/ujail ] && {
+       [ -x /sbin/ujail -a -e /etc/capabilities/ntpd.json ] && {
                procd_add_jail ntpd
                procd_set_param capabilities /etc/capabilities/ntpd.json
                procd_set_param user ntp