[openssh-commits] [openssh] 01/02: upstream: Remove old log symlinks

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Mar 2 18:26:13 AEDT 2023


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 13fe8f9785e6d90400ce548939a0b0ddc11fcb3c
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Wed Mar 1 21:54:50 2023 +0000

    upstream: Remove old log symlinks
    
    before creating new ones. In -portable some platforms don't like
    overwriting existing symlinks.
    
    OpenBSD-Regress-ID: 7e7ddc0beb73e945e1c4c58d51c8a125b518120f
---
 regress/test-exec.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index eecbac09..8e596244 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
-#	$OpenBSD: test-exec.sh,v 1.95 2023/03/01 09:29:32 dtucker Exp $
+#	$OpenBSD: test-exec.sh,v 1.96 2023/03/01 21:54:50 dtucker Exp $
 #	Placed in the Public Domain.
 
 #SUDO=sudo
@@ -301,7 +301,8 @@ logfile="${TEST_SSH_LOGDIR}/\${timestamp}.ssh.\$\$.log"
 echo "Executing: ${SSH} \$@" log \${logfile} >>$TEST_REGRESS_LOGFILE
 echo "Executing: ${SSH} \$@" >>\${logfile}
 for i in "\$@";do shift;case "\$i" in -q):;; *) set -- "\$@" "\$i";;esac;done
-ln -f -s \${logfile} $TEST_SSH_LOGFILE
+rm -f $TEST_SSH_LOGFILE
+ln -s \${logfile} $TEST_SSH_LOGFILE
 exec ${SSH} -E\${logfile} "\$@"
 EOD
 
@@ -315,7 +316,8 @@ cat >$SSHDLOGWRAP <<EOD
 #!/bin/sh
 timestamp="\`$OBJ/timestamp\`"
 logfile="${TEST_SSH_LOGDIR}/\${timestamp}.sshd.\$\$.log"
-ln -f -s \${logfile} $TEST_SSHD_LOGFILE
+rm -f $TEST_SSH_LOGFILE
+ln -s \${logfile} $TEST_SSH_LOGFILE
 echo "Executing: ${SSHD} \$@" log \${logfile} >>$TEST_REGRESS_LOGFILE
 echo "Executing: ${SSHD} \$@" >>\${logfile}
 exec ${SSHD} -E\${logfile} "\$@"

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list