diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2023-10-31 04:15:41 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2023-10-31 04:15:41 +0000 |
commit | 9d53001cfe4ca3de721a2b641a0655a3510ec205 (patch) | |
tree | 7106f1b0579662e39e4a5a788d534e3a3d2b5fd3 /regress | |
parent | 9ed9cd90616786ad3ccb07a0a57f51813be3a6d7 (diff) |
Don't try to use sudo inside sshd log wrapper. We still need to
check if we're using sudo since we don't want to chown unecessarily,
as on some platforms this causes an error which pollutes stderr.
We also don't want to unnecessarily invoke sudo, since it's running
in the context of the proxycommand, on *other* platforms it may not
be able to authenticate, and if we're using SUDO then it should
already be privileged.
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/ssh/test-exec.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh index f7354793bf5..1dba670a7ef 100644 --- a/regress/usr.bin/ssh/test-exec.sh +++ b/regress/usr.bin/ssh/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.104 2023/10/31 02:58:45 dtucker Exp $ +# $OpenBSD: test-exec.sh,v 1.105 2023/10/31 04:15:40 dtucker Exp $ # Placed in the Public Domain. #SUDO=sudo @@ -217,7 +217,7 @@ timestamp="\`$OBJ/timestamp\`" logfile="${TEST_SSH_LOGDIR}/\${timestamp}.sshd.\$\$.log" rm -f $TEST_SSHD_LOGFILE touch \$logfile -test -z "$SUDO" || "$SUDO" chown $USER \$logfile +test -z "$SUDO" || chown $USER \$logfile ln -f -s \${logfile} $TEST_SSHD_LOGFILE echo "Executing: ${SSHD} \$@" log \${logfile} >>$TEST_REGRESS_LOGFILE echo "Executing: ${SSHD} \$@" >>\${logfile} |