summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2011-01-16 23:17:45 +1100
committerDamien Miller <djm@mindrot.org>2011-01-16 23:17:45 +1100
commit6fb6fd566267da4f36499078caf46da5291f4b8c (patch)
treeaa7615f8155b785daaae29f37c367cec1ddd7bcc
parent4791f9dcecb89f5601d8b20e2e6b43dce6f25755 (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--ChangeLog4
-rw-r--r--sshconnect.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7012e620e..d16a9fb42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,10 @@
7 Use atomicio when flushing protocol 1 std{out,err} buffers at 7 Use atomicio when flushing protocol 1 std{out,err} buffers at
8 session close. This was a latent bug exposed by setting a SIGCHLD 8 session close. This was a latent bug exposed by setting a SIGCHLD
9 handler and spotted by kevin.brott AT gmail.com; ok dtucker@ 9 handler and spotted by kevin.brott AT gmail.com; ok dtucker@
10 - djm@cvs.openbsd.org 2011/01/16 11:50:36
11 [sshconnect.c]
12 reset the SIGPIPE handler when forking to execute child processes;
13 ok dtucker@
10 14
1120110114 1520110114
12 - OpenBSD CVS Sync 16 - OpenBSD CVS Sync
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",