Skip to content

Commit b0a711c

Browse files
committed
upstream: fix PIDFILE handling, broken for SUDO=doas in last commit
here OpenBSD-Regress-ID: 96fec579af228f87a036e94801eb294af9074625
1 parent 90fb801 commit b0a711c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

regress/test-exec.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $OpenBSD: test-exec.sh,v 1.114 2024/06/06 19:48:40 djm Exp $
1+
# $OpenBSD: test-exec.sh,v 1.115 2024/06/11 01:58:27 djm Exp $
22
# Placed in the Public Domain.
33

44
#SUDO=sudo
@@ -456,6 +456,7 @@ make_tmpdir ()
456456

457457
stop_sshd ()
458458
{
459+
[ -z $PIDFILE ] && return
459460
[ -f $PIDFILE ] || return
460461
pid=`$SUDO cat $PIDFILE`
461462
if [ "X$pid" = "X" ]; then
@@ -874,6 +875,7 @@ chmod a+x $OBJ/ssh_proxy.sh
874875

875876
start_sshd ()
876877
{
878+
PIDFILE=$OBJ/pidfile
877879
# start sshd
878880
logfile="${TEST_SSH_LOGDIR}/sshd.`$OBJ/timestamp`.$$.log"
879881
$SUDO ${SSHD} -f $OBJ/sshd_config "$@" -t || fatal "sshd_config broken"

0 commit comments

Comments
 (0)