diff options
| author | Roy Marples <roy@marples.name> | 2020-05-12 11:32:22 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-05-12 11:32:22 +0100 |
| commit | b51f785d92fae6552e2bb1fba14526e56095aa08 (patch) | |
| tree | 39cd75ee248e4d2d3acdec0bc6fa8f58ce964135 /configure | |
| parent | b27525d5a2354b5f4a600672ce6c59bab42d3e27 (diff) | |
| download | dhcpcd-b51f785d92fae6552e2bb1fba14526e56095aa08.tar.xz | |
privsep: Just ensure default user has a home directory
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -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 |
