summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2004-09-07 23:41:31 +0000
committerDamien Miller <djm@cvs.openbsd.org>2004-09-07 23:41:31 +0000
commit9ec0df2b975fd06441a89e1747a11f44b35318e7 (patch)
treedbcfbad6b4f9a1734fc2d93f6a059f5af16b3059 /usr.bin/ssh
parent7102d8a619ca6d05b34c913c5ea0e17d1e6307a0 (diff)
cleanup multiplex control socket on SIGHUP too, spotted by sturm@
ok markus@ deraadt@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/clientloop.c4
-rw-r--r--usr.bin/ssh/ssh.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index 0b9a0fb29c8..49f9ba1abbb 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/clientloop.c
@@ -59,7 +59,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: clientloop.c,v 1.130 2004/08/11 21:43:04 avsm Exp $");
+RCSID("$OpenBSD: clientloop.c,v 1.131 2004/09/07 23:41:30 djm Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -1196,6 +1196,8 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
* Set signal handlers, (e.g. to restore non-blocking mode)
* but don't overwrite SIG_IGN, matches behaviour from rsh(1)
*/
+ if (signal(SIGHUP, SIG_IGN) != SIG_IGN)
+ signal(SIGHUP, signal_handler);
if (signal(SIGINT, SIG_IGN) != SIG_IGN)
signal(SIGINT, signal_handler);
if (signal(SIGQUIT, SIG_IGN) != SIG_IGN)
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 7c5625b49a1..4b070e7baf0 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.225 2004/08/23 14:26:38 dtucker Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.226 2004/09/07 23:41:30 djm Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -1313,6 +1313,7 @@ control_client(const char *path)
fatal("%s: master returned error", __func__);
buffer_free(&m);
+ signal(SIGHUP, control_client_sighandler);
signal(SIGINT, control_client_sighandler);
signal(SIGTERM, control_client_sighandler);
signal(SIGWINCH, control_client_sigrelay);