summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-05-12 11:32:22 +0100
committerRoy Marples <roy@marples.name>2020-05-12 11:32:22 +0100
commitb51f785d92fae6552e2bb1fba14526e56095aa08 (patch)
tree39cd75ee248e4d2d3acdec0bc6fa8f58ce964135 /configure
parentb27525d5a2354b5f4a600672ce6c59bab42d3e27 (diff)
downloaddhcpcd-b51f785d92fae6552e2bb1fba14526e56095aa08.tar.xz
privsep: Just ensure default user has a home directory
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure12
1 files changed, 3 insertions, 9 deletions
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