From: Roy Marples Date: Tue, 12 May 2020 10:32:22 +0000 (+0100) Subject: privsep: Just ensure default user has a home directory X-Git-Tag: v9.1.0~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b51f785d92fae6552e2bb1fba14526e56095aa08;p=thirdparty%2Fdhcpcd.git privsep: Just ensure default user has a home directory --- diff --git a/configure b/configure index 33fb494b..853587fb 100755 --- a/configure +++ b/configure @@ -561,12 +561,10 @@ if [ "$PRIVSEP" = yes ]; then printf "Detecting a suitable user for dhcpcd ... " for x in _dhcpcd _dhcp dhcpcd; do home=$(getent passwd $x 2>/dev/null | cut -d: -f6) - case "$home" in - /var/empty|"") ;; - *) + if [ -d "$home" ]; then PRIVSEP_USER="$x" - break;; - esac + break + fi done fi if [ -n "$PRIVSEP_USER" ]; then @@ -1788,10 +1786,6 @@ echo " EGHOOKSCRIPTS = $EGHOOKS" echo " STATUSARG = $STATUSARG" if [ "$PRIVSEP" = yes ]; then echo " PRIVSEPUSER = $PRIVSEP_USER" - if [ -z "$PRIVSEP_CHROOT" ]; then - PRIVSEP_CHROOT="(home directory of $PRIVSEP_USER)" - fi - echo " CHROOTDIR = $PRIVSEP_CHROOT" fi echo