]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordtucker@openbsd.org <dtucker@openbsd.org>
Fri, 28 Jul 2017 10:32:08 +0000 (10:32 +0000)
committerDamien Miller <djm@mindrot.org>
Mon, 18 Sep 2017 04:11:22 +0000 (14:11 +1000)
Don't call fatal from stop_sshd since it calls cleanup
which calls stop_sshd which will probably fail in the same way.  Instead,
just bail. Differentiate between sshd dying without cleanup and not shutting
down.

Upstream-Regress-ID: f97315f538618b349e2b0bea02d6b0c9196c6bc4

regress/test-exec.sh

index 1480f13fca436d5368e78de3c606358fa30335dc..68f010b70ddcd5b47c000fe5918dd08c73a75331 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: test-exec.sh,v 1.60 2017/04/30 23:34:55 djm Exp $
+#      $OpenBSD: test-exec.sh,v 1.61 2017/07/28 10:32:08 dtucker Exp $
 #      Placed in the Public Domain.
 
 #SUDO=sudo
@@ -304,8 +304,15 @@ stop_sshd ()
                                        i=`expr $i + 1`
                                        sleep $i
                                done
-                               test -f $PIDFILE && \
-                                   fatal "sshd didn't exit port $PORT pid $pid"
+                               if test -f $PIDFILE; then
+                                       if $SUDO kill -0 $pid; then
+                                               echo "sshd didn't exit " \
+                                                   "port $PORT pid $pid"
+                                       else
+                                               echo "sshd died without cleanup"
+                                       fi
+                                       exit 1
+                               fi
                        fi
                fi
        fi