From c4fb032d3b8e6113f4e2bc197442b01ed333968e Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Mon, 14 Nov 2016 23:55:45 +0000 Subject: Use capsh to ensure file capabilities aren't set --- scripts/common | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/common') diff --git a/scripts/common b/scripts/common index dd4a5f5..0920fb0 100644 --- a/scripts/common +++ b/scripts/common @@ -14,10 +14,10 @@ bootstrap(){ local BOOTSTRAP_CMD=debootstrap fi - ${BOOTSTRAP_CMD} --components=main,contrib,non-free \ + capsh --drop=cap_setfcap -- -c "${BOOTSTRAP_CMD} --components=main,contrib,non-free \ --arch armhf\ --no-check-gpg \ - $1 $2 $3 + $1 $2 $3" } export -f bootstrap @@ -80,7 +80,7 @@ on_chroot() { mount --bind /sys ${ROOTFS_DIR}/sys fi - chroot ${ROOTFS_DIR}/ "$@" + capsh --drop=cap_setfcap --chroot=${ROOTFS_DIR}/ -- "$@" } export -f on_chroot -- cgit v1.2.3