diff options
author | Damien Miller <djm@mindrot.org> | 2011-01-16 23:17:45 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2011-01-16 23:17:45 +1100 |
commit | 6fb6fd566267da4f36499078caf46da5291f4b8c (patch) | |
tree | aa7615f8155b785daaae29f37c367cec1ddd7bcc | |
parent | 4791f9dcecb89f5601d8b20e2e6b43dce6f25755 (diff) |
- djm@cvs.openbsd.org 2011/01/16 11:50:36
[sshconnect.c]
reset the SIGPIPE handler when forking to execute child processes;
ok dtucker@
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | sshconnect.c | 4 |
2 files changed, 7 insertions, 1 deletions
@@ -7,6 +7,10 @@ Use atomicio when flushing protocol 1 std{out,err} buffers at session close. This was a latent bug exposed by setting a SIGCHLD handler and spotted by kevin.brott AT gmail.com; ok dtucker@ + - djm@cvs.openbsd.org 2011/01/16 11:50:36 + [sshconnect.c] + reset the SIGPIPE handler when forking to execute child processes; + ok dtucker@ 20110114 - OpenBSD CVS Sync diff --git a/sshconnect.c b/sshconnect.c index 64dc032c..74643a8c 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.231 2011/01/06 23:01:35 djm Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.232 2011/01/16 11:50:36 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -143,6 +143,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command) /* Execute the proxy command. Note that we gave up any extra privileges above. */ + signal(SIGPIPE, SIG_DFL); execv(argv[0], argv); perror(argv[0]); exit(1); @@ -1271,6 +1272,7 @@ ssh_local_cmd(const char *args) osighand = signal(SIGCHLD, SIG_DFL); pid = fork(); if (pid == 0) { + signal(SIGPIPE, SIG_DFL); debug3("Executing %s -c \"%s\"", shell, args); execl(shell, shell, "-c", args, (char *)NULL); error("Couldn't execute %s -c \"%s\": %s", |