From c4fb032d3b8e6113f4e2bc197442b01ed333968e Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Mon, 14 Nov 2016 23:55:45 +0000 Subject: [PATCH] Use capsh to ensure file capabilities aren't set --- build.sh | 8 ++++---- depends | 1 + export-image/01-set-sources/01-run.sh | 2 +- export-image/03-finalise/01-run.sh | 2 +- scripts/common | 6 +++--- stage0/01-configure-apt/00-run.sh | 2 +- stage1/01-sys-tweaks/00-run.sh | 2 +- stage1/02-net-tweaks/00-run.sh | 2 +- stage2/01-sys-tweaks/01-run.sh | 8 ++++---- stage2/03-cleanup/00-run.sh | 2 +- stage3/00-install-packages/01-run.sh | 2 +- stage4/03-cleanup/00-run.sh | 2 +- 12 files changed, 20 insertions(+), 19 deletions(-) diff --git a/build.sh b/build.sh index c6abdae..2656be8 100755 --- a/build.sh +++ b/build.sh @@ -7,7 +7,7 @@ run_sub_stage() for i in {00..99}; do if [ -f ${i}-debconf ]; then log "Begin ${SUB_STAGE_DIR}/${i}-debconf" - on_chroot sh -e - << EOF + on_chroot << EOF debconf-set-selections </dev/null 2>&1; then adduser --disabled-password --gecos "" pi fi diff --git a/stage1/02-net-tweaks/00-run.sh b/stage1/02-net-tweaks/00-run.sh index fd6609a..85b528f 100755 --- a/stage1/02-net-tweaks/00-run.sh +++ b/stage1/02-net-tweaks/00-run.sh @@ -4,6 +4,6 @@ install -m 644 files/ipv6.conf ${ROOTFS_DIR}/etc/modprobe.d/ipv6.conf install -m 644 files/interfaces ${ROOTFS_DIR}/etc/network/interfaces install -m 644 files/hostname ${ROOTFS_DIR}/etc/hostname -on_chroot sh -e - << EOF +on_chroot << EOF dpkg-divert --add --local /lib/udev/rules.d/75-persistent-net-generator.rules EOF diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index 515146f..8e2d149 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -10,7 +10,7 @@ install -m 644 files/ttyoutput.conf ${ROOTFS_DIR}/etc/systemd/system/rc-local. install -m 644 files/50raspi ${ROOTFS_DIR}/etc/apt/apt.conf.d/ -on_chroot sh -e - <