From: Roy Marples Date: Sun, 5 Apr 2020 14:52:50 +0000 (+0100) Subject: Revert "privsep: default to using _dhcpcd and not _dhcp" X-Git-Tag: v9.0.1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0227431cc87758176d81b7e8f04331091f7b89a7;p=thirdparty%2Fdhcpcd.git Revert "privsep: default to using _dhcpcd and not _dhcp" This reverts commit 36c47a8df0951236a7842bbf8241e2932357ef61. --- diff --git a/configure b/configure index fe5db53a..de0bf3f2 100755 --- a/configure +++ b/configure @@ -555,7 +555,18 @@ 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