upstream commit

Use LOGNAME to get current user and fall back to whoami if
not set. Mainly to benefit -portable since some platforms don't have whoami.

Upstream-Regress-ID: e3a16b7836a3ae24dc8f8a4e43fdf8127a60bdfa
This commit is contained in:
dtucker@openbsd.org 2016-12-19 03:32:57 +00:00 committed by Darren Tucker
parent 0d2f884284
commit eae735a82d
1 changed files with 4 additions and 1 deletions

View File

@ -3,7 +3,10 @@
tid="AllowUsers/DenyUsers"
me=`whoami`
me="$LOGNAME"
if [ "x$me" == "x" ]; then
me=`whoami`
fi
other="nobody"
test_auth()