Mailing List Archive

[openssh] 01/01: upstream: Only try to chmod logfile if we have sudo. If we don't have
This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit fc3cc33e88c242c704781c6c48087838f1dcfa2a
Author: dtucker@openbsd.org <dtucker@openbsd.org>
Date: Tue Oct 31 02:58:45 2023 +0000

upstream: Only try to chmod logfile if we have sudo. If we don't have

sudo then we won't need to chmod.

OpenBSD-Regress-ID: dbad2f5ece839658ef8af3376cb1fb1cabe2e324
---
regress/test-exec.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index bf4eeac3..aae90f24 100644
--- a/regress/test-exec.sh
+++ b/regress/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
@@ -322,7 +322,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}

--
To stop receiving notification emails like this one, please contact
djm@mindrot.org.
_______________________________________________
openssh-commits mailing list
openssh-commits@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-commits