summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2010-01-09 22:28:43 +1100
committerDarren Tucker <dtucker@zip.com.au>2010-01-09 22:28:43 +1100
commit2c671bf6a8b93489624fafa79a40cb69d7a53ba3 (patch)
tree8b5cb871df7d362f1ed3d801653d83a27da5ae49
parent70cc092817a61af78c751b8f7a8ac5dcabfeae00 (diff)
- dtucker@cvs.openbsd.org 2010/01/09 11:17:56
[sshd.c] Afer sshd receives a SIGHUP, ignore subsequent HUPs while sshd re-execs itself. Prevents two HUPs in quick succession from resulting in sshd dying. bz#1692, patch from Colin Watson via Ubuntu.
-rw-r--r--ChangeLog5
-rw-r--r--sshd.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 094d1bec3..47cb97afe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,11 @@
28 Prevent sftp from derefing a null pointer when given a "-" without a 28 Prevent sftp from derefing a null pointer when given a "-" without a
29 command. Also, allow whitespace to follow a "-". bz#1691, path from 29 command. Also, allow whitespace to follow a "-". bz#1691, path from
30 Colin Watson via Debian. ok djm@ deraadt@ 30 Colin Watson via Debian. ok djm@ deraadt@
31 - dtucker@cvs.openbsd.org 2010/01/09 11:17:56
32 [sshd.c]
33 Afer sshd receives a SIGHUP, ignore subsequent HUPs while sshd re-execs
34 itself. Prevents two HUPs in quick succession from resulting in sshd
35 dying. bz#1692, patch from Colin Watson via Ubuntu.
31 36
3220091208 3720091208
33 - (dtucker) OpenBSD CVS Sync 38 - (dtucker) OpenBSD CVS Sync
diff --git a/sshd.c b/sshd.c
index e23d462ee..bdaf1574a 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.368 2009/10/28 16:38:18 reyk Exp $ */ 1/* $OpenBSD: sshd.c,v 1.369 2010/01/09 11:17:56 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -309,6 +309,7 @@ sighup_restart(void)
309 close_listen_socks(); 309 close_listen_socks();
310 close_startup_pipes(); 310 close_startup_pipes();
311 alarm(0); /* alarm timer persists across exec */ 311 alarm(0); /* alarm timer persists across exec */
312 signal(SIGHUP, SIG_IGN); /* will be restored after exec */
312 execv(saved_argv[0], saved_argv); 313 execv(saved_argv[0], saved_argv);
313 logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], 314 logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0],
314 strerror(errno)); 315 strerror(errno));