summaryrefslogtreecommitdiff
path: root/regress/usr.bin/ssh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2023-10-31 02:58:46 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2023-10-31 02:58:46 +0000
commit9ed9cd90616786ad3ccb07a0a57f51813be3a6d7 (patch)
tree4bc0cf72ad4519c2ea2c87d664877ed2fa556849 /regress/usr.bin/ssh
parent81e93355cf6ac60ee5489dcafff1db4a73ff26f3 (diff)
Only try to chmod logfile if we have sudo. If we don't have sudo
then we won't need to chmod.
Diffstat (limited to 'regress/usr.bin/ssh')
-rw-r--r--regress/usr.bin/ssh/test-exec.sh4
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 acb454c4192..f7354793bf5 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.103 2023/10/30 23:00:25 djm Exp $
+# $OpenBSD: test-exec.sh,v 1.104 2023/10/31 02:58:45 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
-chown $USER \$logfile
+test -z "$SUDO" || "$SUDO" chown $USER \$logfile
ln -f -s \${logfile} $TEST_SSHD_LOGFILE
echo "Executing: ${SSHD} \$@" log \${logfile} >>$TEST_REGRESS_LOGFILE
echo "Executing: ${SSHD} \$@" >>\${logfile}