diff options
author | 2004-09-07 23:41:30 +0000 | |
---|---|---|
committer | 2004-09-07 23:41:30 +0000 | |
commit | 636a42abf7124aebe771db815b4a02870fe9b478 (patch) | |
tree | a99d37421c37ae63b247926c6d4dbb83ca7c8b6f | |
parent | ignore ntp_sendmsg()s return value in server_dispatch. could result in (diff) | |
download | wireguard-openbsd-636a42abf7124aebe771db815b4a02870fe9b478.tar.xz wireguard-openbsd-636a42abf7124aebe771db815b4a02870fe9b478.zip |
cleanup multiplex control socket on SIGHUP too, spotted by sturm@
ok markus@ deraadt@
-rw-r--r-- | usr.bin/ssh/clientloop.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/ssh.c | 3 |
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); |