diff options
| author | Roy Marples <roy@marples.name> | 2020-04-05 15:52:50 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-04-05 15:52:50 +0100 |
| commit | 3b80531e8ff81815c1f3bbfd8f407ae64f559c18 (patch) | |
| tree | cba7f1abec34883fe33367ed1cc496da7a7501d9 /configure | |
| parent | 36c47a8df0951236a7842bbf8241e2932357ef61 (diff) | |
| download | dhcpcd-3b80531e8ff81815c1f3bbfd8f407ae64f559c18.tar.xz | |
Revert "privsep: default to using _dhcpcd and not _dhcp"
This reverts commit 36c47a8df0951236a7842bbf8241e2932357ef61.
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 |
