]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
ensure $LOGNAME is set in tests
authorDamien Miller <djm@mindrot.org>
Tue, 22 Dec 2020 07:31:50 +0000 (18:31 +1100)
committerDamien Miller <djm@mindrot.org>
Tue, 22 Dec 2020 07:31:50 +0000 (18:31 +1100)
regress/test-exec.sh

index 5dc975d07d655fe8196b9b4059bd02600a0d01cb..ee47f572c464d58cd66c8c7b18592f477272cb03 100644 (file)
@@ -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