Add parameter to keep cap_setfcap

Fixes #643
This commit is contained in:
Serge Schneider
2022-11-08 12:04:09 +00:00
parent 549681f6e2
commit c3083ecd50
3 changed files with 13 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ bootstrap(){
BOOTSTRAP_ARGS+=("$@")
printf -v BOOTSTRAP_STR '%q ' "${BOOTSTRAP_ARGS[@]}"
setarch linux32 capsh --drop=cap_setfcap -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true
setarch linux32 capsh $CAPSH_ARG -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true
if [ -d "$2/debootstrap" ] && ! rmdir "$2/debootstrap"; then
cp "$2/debootstrap/debootstrap.log" "${STAGE_WORK_DIR}"
@@ -90,7 +90,7 @@ on_chroot() {
mount --bind /sys "${ROOTFS_DIR}/sys"
fi
setarch linux32 capsh --drop=cap_setfcap "--chroot=${ROOTFS_DIR}/" -- -e "$@"
setarch linux32 capsh $CAPSH_ARG "--chroot=${ROOTFS_DIR}/" -- -e "$@"
}
export -f on_chroot