summaryrefslogtreecommitdiff
path: root/regress/allow-deny-users.sh
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2016-12-19 03:32:57 +0000
committerDarren Tucker <dtucker@zip.com.au>2016-12-19 15:01:10 +1100
commiteae735a82d759054f6ec7b4e887fb7a5692c66d7 (patch)
tree18d7a8221e52f5edbbf9fc4eb8e7089af9374dd1 /regress/allow-deny-users.sh
parent0d2f88428487518eea60602bd593989013831dcf (diff)
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
Diffstat (limited to 'regress/allow-deny-users.sh')
-rw-r--r--regress/allow-deny-users.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/regress/allow-deny-users.sh b/regress/allow-deny-users.sh
index 217b1594..32a269af 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()