diff options
| author | Roy Marples <roy@marples.name> | 2019-12-18 14:37:01 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-12-18 14:38:03 +0000 |
| commit | f51ef553c511719a6b8276703998813cab42242b (patch) | |
| tree | 7df75c602e03936ece23fa34503e9001c7a97985 /configure | |
| parent | 32584e1d33654e01020eb8439bd3b721342da492 (diff) | |
| download | dhcpcd-f51ef553c511719a6b8276703998813cab42242b.tar.xz | |
privsep: Support the generic _dhcp entry on DragonFly
No need to create a specific _dhcpcd user in this instance.
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -12,7 +12,7 @@ ARPING= IPV4LL= INET6= PRIVSEP= -PRIVSEP_USER=_dhcpcd +PRIVSEP_USER= ARC4RANDOM= CLOSEFROM= RBTREE= @@ -539,6 +539,18 @@ fi if [ "$PRIVSEP" = yes ]; then echo "Enabling Priviledge 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 |
