From 8d610ba26a3041f567441d7260f47425ef52012b Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sun, 10 Jan 2010 22:07:13 +0000 Subject: * Backport from upstream: - After sshd receives a SIGHUP, ignore subsequent HUPs while sshd re-execs itself. Prevents two HUPs in quick succession from resulting in sshd dying (LP: #497781). --- debian/changelog | 9 +++++++++ sshd.c | 1 + 2 files changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 37c691609..b8dde56ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +openssh (1:5.2p1-2) UNRELEASED; urgency=low + + * Backport from upstream: + - After sshd receives a SIGHUP, ignore subsequent HUPs while sshd + re-execs itself. Prevents two HUPs in quick succession from resulting + in sshd dying (LP: #497781). + + -- Colin Watson Sun, 10 Jan 2010 22:06:28 +0000 + openssh (1:5.2p1-1) unstable; urgency=low * New upstream release (closes: #536182). Yes, I know 5.3p1 has been out diff --git a/sshd.c b/sshd.c index f61d79ec7..b83ecd9e5 100644 --- a/sshd.c +++ b/sshd.c @@ -317,6 +317,7 @@ sighup_restart(void) close_listen_socks(); close_startup_pipes(); alarm(0); /* alarm timer persists across exec */ + signal(SIGHUP, SIG_IGN); /* will be restored after exec */ execv(saved_argv[0], saved_argv); logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], strerror(errno)); -- cgit v1.2.3