]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: default to using _dhcpcd and not _dhcp
authorRoy Marples <roy@marples.name>
Fri, 10 Apr 2020 09:17:38 +0000 (10:17 +0100)
committerRoy Marples <roy@marples.name>
Fri, 10 Apr 2020 09:17:38 +0000 (10:17 +0100)
_dhcp home dir defaults to /var/empty.
System integrators can and should be in charge of changing it when needed.
Packagers on the other hand don't have such a luxury and so should not
use _dhcp by default.

configure

index de0bf3f2505848c97caa137ad788c038f285fa78..fe5db53aa20b797763c7d4ad5f3256ee1a6e62f1 100755 (executable)
--- a/configure
+++ b/configure
@@ -555,18 +555,7 @@ fi
 
 if [ "$PRIVSEP" = yes ]; then
        echo "Enabling Privilege Separation"
-
-       # Try and work out a user
-       if [ -z "$PRIVSEP_USER" ]; then
-               for x in _dhcpcd _dhcp; do
-                       if id "$x" 2>/dev/null >&2; then
-                               PRIVSEP_USER="$x"
-                               break
-                       fi
-               done
-       fi
        : ${PRIVSEP_USER:=_dhcpcd}
-
        echo "CPPFLAGS+=        -DPRIVSEP" >>$CONFIG_MK
        echo "#ifndef PRIVSEP_USER" >>$CONFIG_H
        echo "#define PRIVSEP_USER               \"$PRIVSEP_USER\"" >>$CONFIG_H