From eae735a82d759054f6ec7b4e887fb7a5692c66d7 Mon Sep 17 00:00:00 2001 From: "dtucker@openbsd.org" Date: Mon, 19 Dec 2016 03:32:57 +0000 Subject: [PATCH] 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 --- regress/allow-deny-users.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/regress/allow-deny-users.sh b/regress/allow-deny-users.sh index 217b15940..32a269afa 100644 --- a/regress/allow-deny-users.sh +++ b/regress/allow-deny-users.sh @@ -3,7 +3,10 @@ tid="AllowUsers/DenyUsers" -me=`whoami` +me="$LOGNAME" +if [ "x$me" == "x" ]; then + me=`whoami` +fi other="nobody" test_auth()