Mercurial > hg > dhcpcd
changeset 5212:a66e3414adfb draft
privsep: Just ensure default user has a home directory
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Tue, 12 May 2020 11:32:22 +0100 |
| parents | cb2fa76d03bc |
| children | 28f03f422541 |
| files | configure |
| diffstat | 1 files changed, 3 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Tue May 12 11:29:13 2020 +0100 +++ b/configure Tue May 12 11:32:22 2020 +0100 @@ -561,12 +561,10 @@ 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 " 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
