]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: Document any overridden chroot directory.
authorRoy Marples <roy@marples.name>
Tue, 5 May 2020 16:34:54 +0000 (17:34 +0100)
committerRoy Marples <roy@marples.name>
Tue, 5 May 2020 16:34:54 +0000 (17:34 +0100)
Makefile.inc
configure
src/Makefile
src/dhcpcd.8.in

index 6648e832bb4d975a61b290d16d148ec828943a14..6775f7f0e2fd0076a4e04c4e00968078e85682cb 100644 (file)
@@ -33,4 +33,5 @@ SED_STATUSARG=                -e 's:@STATUSARG@:${STATUSARG}:g'
 SED_SCRIPT=            -e 's:@SCRIPT@:${SCRIPT}:g'
 SED_SYS=               -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g'
 SED_DEFAULT_HOSTNAME=  -e 's:@DEFAULT_HOSTNAME@:${DEFAULT_HOSTNAME}:g'
+SED_CHROOT?=           -e 's:@CHDIR^@::g' -e 's:@CHDIR$$@::g' -e '/@CHDIR@/d'
 SED_PRIVSEP_USER=      -e 's:@PRIVSEP_USER@:${PRIVSEP_USER}:g'
index 1b6387b7aadc9bad4f283d0d22b32add0374e92f..58fcd808158c5c4aa0ba92e7b3f2afc48445106c 100755 (executable)
--- a/configure
+++ b/configure
@@ -583,6 +583,7 @@ if [ "$PRIVSEP" = yes ]; then
        echo "PRIVSEP_USER?=    $PRIVSEP_USER" >>$CONFIG_MK
        if [ -n "$PRIVSEP_CHROOT" ]; then
                echo "PRIVSEP_CHROOT=   $PRIVSEP_CHROOT" >>$CONFIG_MK
+               echo "SED_CHROOT=       -e 's:@CHDIR^@.*@CHDIR\$\$@:default of:g' -e 's:@CHDIR@:.Pa \${PRIVSEP_CHROOT} .:g'" >>$CONFIG_MK
        fi
        echo "#ifndef PRIVSEP_USER" >>$CONFIG_H
        echo "#define PRIVSEP_USER               \"$PRIVSEP_USER\"" >>$CONFIG_H
index 2cdbe013a21fd30b40f4eb7fa5a79287a18a73a1..a63b824601b678a8667716d668dfa23859b71289 100644 (file)
@@ -42,7 +42,8 @@ CLEANFILES+=  *.tar.xz
        ${SED} ${SED_RUNDIR} ${SED_DBDIR} ${SED_LIBDIR} ${SED_HOOKDIR} \
                ${SED_SYS} ${SED_SCRIPT} ${SED_DATADIR} \
                ${SED_SERVICEEXISTS} ${SED_SERVICECMD} ${SED_SERVICESTATUS} \
-               ${SED_STATUSARG} ${SED_PRIVSEP_USER} \
+               ${SED_STATUSARG} \
+               ${SED_CHROOT} ${SED_PRIVSEP_USER} \
                $< > $@
 
 all: ${TOP}/config.h ${PROG} ${SCRIPTS} ${MAN5} ${MAN8}
index 654cd277557725171b84de9a97ff2e28457c408f..83d090f50904051f9acf70eda8f9c72864c45103 100644 (file)
@@ -267,8 +267,10 @@ instead of the default
 .Xr chroot 3
 to the
 .Ar chroot
-directory rather than the privilege separation users home directory.
-The privilege sepatation user is @PRIVSEP_USER@.
+directory rather than the
+@CHDIR^@privilege separation users home directory.@CHDIR$@
+@CHDIR@
+The privilege separation user is @PRIVSEP_USER@.
 .It Fl D , Fl Fl duid
 Use a DHCP Unique Identifier.
 If a system UUID is available, that will be used to create a DUID-UUID,