From: Roy Marples Date: Tue, 5 May 2020 16:34:54 +0000 (+0100) Subject: privsep: Document any overridden chroot directory. X-Git-Tag: v9.1.0~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc4dd2f1349fb2ba76cd43bc7934c198cce172c2;p=thirdparty%2Fdhcpcd.git privsep: Document any overridden chroot directory. --- diff --git a/Makefile.inc b/Makefile.inc index 6648e832..6775f7f0 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -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' diff --git a/configure b/configure index 1b6387b7..58fcd808 100755 --- 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 diff --git a/src/Makefile b/src/Makefile index 2cdbe013..a63b8246 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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} diff --git a/src/dhcpcd.8.in b/src/dhcpcd.8.in index 654cd277..83d090f5 100644 --- a/src/dhcpcd.8.in +++ b/src/dhcpcd.8.in @@ -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,