]> andersk Git - openssh.git/commitdiff
- dtucker@cvs.openbsd.org 2007/02/21 11:00:05
authordtucker <dtucker>
Sun, 25 Feb 2007 09:37:21 +0000 (09:37 +0000)
committerdtucker <dtucker>
Sun, 25 Feb 2007 09:37:21 +0000 (09:37 +0000)
     [sshd.c]
     Clear alarm() before restarting sshd on SIGHUP.  Without this, if there's
     a SIGALRM pending (for SSH1 key regeneration) when sshd is SIGHUP'ed, the
     newly exec'ed sshd will get the SIGALRM and not have a handler for it,
     and the default action will terminate the listening sshd.  Analysis and
     patch from andrew at gaul.org.

ChangeLog
sshd.c

index b06c2873d202332e516d99d5189d50dfd74f04ca..fd20502e285a9e2313bebc0837dc7c31dffdcd8b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,13 @@
      [clientloop.c]
      set maximum packet and window sizes the same for multiplexed clients
      as normal connections; ok markus@
+   - dtucker@cvs.openbsd.org 2007/02/21 11:00:05
+     [sshd.c]
+     Clear alarm() before restarting sshd on SIGHUP.  Without this, if there's
+     a SIGALRM pending (for SSH1 key regeneration) when sshd is SIGHUP'ed, the
+     newly exec'ed sshd will get the SIGALRM and not have a handler for it,
+     and the default action will terminate the listening sshd.  Analysis and
+     patch from andrew at gaul.org.
 
 20070219
   - (dtucker) OpenBSD CVS Sync
diff --git a/sshd.c b/sshd.c
index 4aa1c98ed41704f906ad253ae32903b00a66f717..0a76f2d3ac164d554c06f052677634e338d8ce74 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.348 2006/11/06 21:25:28 markus Exp $ */
+/* $OpenBSD: sshd.c,v 1.349 2007/02/21 11:00:05 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -305,6 +305,7 @@ sighup_restart(void)
        logit("Received SIGHUP; restarting.");
        close_listen_socks();
        close_startup_pipes();
+       alarm(0);  /* alarm timer persists across exec */
        execv(saved_argv[0], saved_argv);
        logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0],
            strerror(errno));
This page took 1.310051 seconds and 5 git commands to generate.