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 /sshconnect.c | |
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@
Diffstat (limited to 'sshconnect.c')
-rw-r--r-- | sshconnect.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c index 64dc032c4..74643a8c4 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshconnect.c,v 1.231 2011/01/06 23:01:35 djm Exp $ */ | 1 | /* $OpenBSD: sshconnect.c,v 1.232 2011/01/16 11:50:36 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * 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) | |||
143 | 143 | ||
144 | /* Execute the proxy command. Note that we gave up any | 144 | /* Execute the proxy command. Note that we gave up any |
145 | extra privileges above. */ | 145 | extra privileges above. */ |
146 | signal(SIGPIPE, SIG_DFL); | ||
146 | execv(argv[0], argv); | 147 | execv(argv[0], argv); |
147 | perror(argv[0]); | 148 | perror(argv[0]); |
148 | exit(1); | 149 | exit(1); |
@@ -1271,6 +1272,7 @@ ssh_local_cmd(const char *args) | |||
1271 | osighand = signal(SIGCHLD, SIG_DFL); | 1272 | osighand = signal(SIGCHLD, SIG_DFL); |
1272 | pid = fork(); | 1273 | pid = fork(); |
1273 | if (pid == 0) { | 1274 | if (pid == 0) { |
1275 | signal(SIGPIPE, SIG_DFL); | ||
1274 | debug3("Executing %s -c \"%s\"", shell, args); | 1276 | debug3("Executing %s -c \"%s\"", shell, args); |
1275 | execl(shell, shell, "-c", args, (char *)NULL); | 1277 | execl(shell, shell, "-c", args, (char *)NULL); |
1276 | error("Couldn't execute %s -c \"%s\": %s", | 1278 | error("Couldn't execute %s -c \"%s\": %s", |