]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: fix PIDFILE handling, broken for SUDO=doas in last commit
authordjm@openbsd.org <djm@openbsd.org>
Tue, 11 Jun 2024 01:58:27 +0000 (01:58 +0000)
committerDamien Miller <djm@mindrot.org>
Tue, 11 Jun 2024 02:02:37 +0000 (12:02 +1000)
here

OpenBSD-Regress-ID: 96fec579af228f87a036e94801eb294af9074625

regress/test-exec.sh

index 69541136c7ec92cab54ede35532200ea691f0039..e483bc2aa6511b38cd44b90eb44ae7c0b3b1c96f 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: test-exec.sh,v 1.114 2024/06/06 19:48:40 djm Exp $
+#      $OpenBSD: test-exec.sh,v 1.115 2024/06/11 01:58:27 djm Exp $
 #      Placed in the Public Domain.
 
 #SUDO=sudo
@@ -456,6 +456,7 @@ make_tmpdir ()
 
 stop_sshd ()
 {
+       [ -z $PIDFILE ] && return
        [ -f $PIDFILE ] || return
        pid=`$SUDO cat $PIDFILE`
        if [ "X$pid" = "X" ]; then
@@ -874,6 +875,7 @@ chmod a+x $OBJ/ssh_proxy.sh
 
 start_sshd ()
 {
+       PIDFILE=$OBJ/pidfile
        # start sshd
        logfile="${TEST_SSH_LOGDIR}/sshd.`$OBJ/timestamp`.$$.log"
        $SUDO ${SSHD} -f $OBJ/sshd_config "$@" -t || fatal "sshd_config broken"