[openssh-commits] [openssh] 02/03: upstream: Move setting of USER further down the startup In portable
git+noreply at mindrot.org
git+noreply at mindrot.org
Sun Aug 8 17:41:23 AEST 2021
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 71b0eb997e220b0fc9331635af409ad84979f2af
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date: Sun Aug 8 07:27:52 2021 +0000
upstream: Move setting of USER further down the startup In portable
we have to change this and having it in the same hunk as the CVS Id string
means applying changes fails every. single. time.
OpenBSD-Regress-ID: 87cd603eb6db58c9b430bf90adacb7f90864429b
---
regress/test-exec.sh | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 67136ab6..24a2bef6 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: test-exec.sh,v 1.84 2021/08/08 06:38:33 dtucker Exp $
+# $OpenBSD: test-exec.sh,v 1.85 2021/08/08 07:27:52 dtucker Exp $
# Placed in the Public Domain.
#SUDO=sudo
@@ -27,20 +27,6 @@ if test "x${EGREP}" != "x"; then
}
fi
-if [ -x /usr/ucb/whoami ]; then
- USER=`/usr/ucb/whoami`
-elif whoami >/dev/null 2>&1; then
- USER=`whoami`
-elif logname >/dev/null 2>&1; then
- USER=`logname`
-else
- USER=`id -un`
-fi
-if test -z "$LOGNAME"; then
- LOGNAME="${USER}"
- export LOGNAME
-fi
-
if [ ! -x "$TEST_SSH_ELAPSED_TIMES" ]; then
STARTTIME=`date '+%s'`
fi
@@ -77,6 +63,20 @@ else
fi
unset SSH_AUTH_SOCK
+if [ -x /usr/ucb/whoami ]; then
+ USER=`/usr/ucb/whoami`
+elif whoami >/dev/null 2>&1; then
+ USER=`whoami`
+elif logname >/dev/null 2>&1; then
+ USER=`logname`
+else
+ USER=`id -un`
+fi
+if test -z "$LOGNAME"; then
+ LOGNAME="${USER}"
+ export LOGNAME
+fi
+
SRC=`dirname ${SCRIPT}`
# defaults
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list