dhcpcd: create dhcpcd user and chroot folder

dhcpcd 9.x adds privelege seperation by creating a chroot
and running parts of the client not as root.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Arne Fitzenreiter
2020-04-19 19:18:04 +02:00
parent 18136c5ce9
commit 533c4312fa
3 changed files with 7 additions and 0 deletions

View File

@@ -34,6 +34,11 @@ case "${1}" in
mount -n -t tmpfs -o nosuid,nodev,mode=755,size=8M /run /run || failed=1
fi
# create folder for dhcpcd changeroot
mkdir -p /run/dhcpcd/chroot
chown dhcpcd:dhcpcd /run/dhcpcd/chroot
chmod 750 /run/dhcpcd/chroot
boot_mesg "" ${NORMAL}
(exit ${failed})