summaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2020-12-22 18:31:50 +1100
committerDamien Miller <djm@mindrot.org>2020-12-22 18:31:50 +1100
commit3e9811e57b57ee66b0f70d99d7258da3153b0e8a (patch)
tree7b3b534301f8a0b4400272fc3c36c2b54551683b /regress/test-exec.sh
parent3eb647cbb34d87a063aa7714256c6e56103fffda (diff)
downloadopenssh-git-3e9811e57b57ee66b0f70d99d7258da3153b0e8a.tar.gz
ensure $LOGNAME is set in tests
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r--regress/test-exec.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 5dc975d0..ee47f572 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -42,6 +42,10 @@ elif logname >/dev/null 2>&1; then
else
USER=`id -un`
fi
+if test -z "$LOGNAME"; then
+ LOGNAME="${USER}"
+ export LOGNAME
+fi
OBJ=$1
if [ "x$OBJ" = "x" ]; then