diff options
author | 2001-03-23 14:28:32 +0000 | |
---|---|---|
committer | 2001-03-23 14:28:32 +0000 | |
commit | 0baf4ef1ef51e8150da83abb0662a031df6b8c21 (patch) | |
tree | 332910ff964cc5dfb3a96bd18459a2ba2ee26532 | |
parent | fix a diagnostic check in pagemove (diff) | |
download | wireguard-openbsd-0baf4ef1ef51e8150da83abb0662a031df6b8c21.tar.xz wireguard-openbsd-0baf4ef1ef51e8150da83abb0662a031df6b8c21.zip |
ignore SIGPIPE, restore in child, fixes x11-fwd crashes; with djm@
-rw-r--r-- | usr.bin/ssh/session.c | 6 | ||||
-rw-r--r-- | usr.bin/ssh/sshd.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index 27d3fa9e279..5057dcb71be 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.66 2001/03/21 21:06:30 markus Exp $"); +RCSID("$OpenBSD: session.c,v 1.67 2001/03/23 14:28:32 markus Exp $"); #include "ssh.h" #include "ssh1.h" @@ -1094,6 +1094,10 @@ do_child(Session *s, const char *command) else cp = shell; } + + /* restore SIGPIPE for child */ + signal(SIGPIPE, SIG_DFL); + /* * If we have no command, execute the shell. In this case, the shell * name to be passed in argv[0] is preceded by '-' to indicate that diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index f40e1ba5b36..507a3ab1a9d 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -40,7 +40,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.177 2001/03/23 11:04:07 djm Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.178 2001/03/23 14:28:32 markus Exp $"); #include <openssl/dh.h> #include <openssl/bn.h> @@ -790,6 +790,9 @@ main(int ac, char **av) /* Chdir to the root directory so that the current disk can be unmounted if desired. */ chdir("/"); + + /* ignore SIGPIPE */ + signal(SIGPIPE, SIG_IGN); /* Start listening for a socket, unless started from inetd. */ if (inetd_flag) { |