diff options
author | Darren Tucker <dtucker@zip.com.au> | 2005-06-01 23:01:12 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2005-06-01 23:01:12 +1000 |
commit | fc4f2dd3470681dae24e9ec95aceb2a2a94c3d7e (patch) | |
tree | db1539f4ee01768031e55e20ca55849f58700532 | |
parent | 81eb5d5e10d4c3ce0f0cc91fab7efbb22fb97f07 (diff) |
- avsm@cvs.openbsd.org 2005/05/26 02:08:05
[scp.c]
If copying multiple files to a target file (which normally fails, as it
must be a target directory), kill the spawned ssh child before exiting.
This stops it trying to authenticate and spewing lots of output.
deraadt@ ok
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | scp.c | 10 |
2 files changed, 14 insertions, 6 deletions
@@ -3,7 +3,13 @@ | |||
3 | arpa/nameser.h. | 3 | arpa/nameser.h. |
4 | - (dtucker) [configure.ac openbsd-compat/Makefile.in openbsd-compat/strtoll.c] | 4 | - (dtucker) [configure.ac openbsd-compat/Makefile.in openbsd-compat/strtoll.c] |
5 | Add strtoll to the compat library, from OpenBSD. | 5 | Add strtoll to the compat library, from OpenBSD. |
6 | 6 | - (dtucker) OpenBSD CVS Sync | |
7 | - avsm@cvs.openbsd.org 2005/05/26 02:08:05 | ||
8 | [scp.c] | ||
9 | If copying multiple files to a target file (which normally fails, as it | ||
10 | must be a target directory), kill the spawned ssh child before exiting. | ||
11 | This stops it trying to authenticate and spewing lots of output. | ||
12 | deraadt@ ok | ||
7 | 13 | ||
8 | 20050531 | 14 | 20050531 |
9 | - (dtucker) [contrib/aix/pam.conf] Correct comments. From davidl at | 15 | - (dtucker) [contrib/aix/pam.conf] Correct comments. From davidl at |
@@ -2652,4 +2658,4 @@ | |||
2652 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 2658 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
2653 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 2659 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
2654 | 2660 | ||
2655 | $Id: ChangeLog,v 1.3804 2005/06/01 11:39:33 dtucker Exp $ | 2661 | $Id: ChangeLog,v 1.3805 2005/06/01 13:01:12 dtucker Exp $ |
@@ -71,7 +71,7 @@ | |||
71 | */ | 71 | */ |
72 | 72 | ||
73 | #include "includes.h" | 73 | #include "includes.h" |
74 | RCSID("$OpenBSD: scp.c,v 1.122 2005/05/24 17:32:43 avsm Exp $"); | 74 | RCSID("$OpenBSD: scp.c,v 1.123 2005/05/26 02:08:05 avsm Exp $"); |
75 | 75 | ||
76 | #include "xmalloc.h" | 76 | #include "xmalloc.h" |
77 | #include "atomicio.h" | 77 | #include "atomicio.h" |
@@ -109,11 +109,13 @@ static void | |||
109 | killchild(int signo) | 109 | killchild(int signo) |
110 | { | 110 | { |
111 | if (do_cmd_pid > 1) { | 111 | if (do_cmd_pid > 1) { |
112 | kill(do_cmd_pid, signo); | 112 | kill(do_cmd_pid, signo ? signo : SIGTERM); |
113 | waitpid(do_cmd_pid, NULL, 0); | 113 | waitpid(do_cmd_pid, NULL, 0); |
114 | } | 114 | } |
115 | 115 | ||
116 | _exit(1); | 116 | if (signo) |
117 | _exit(1); | ||
118 | exit(1); | ||
117 | } | 119 | } |
118 | 120 | ||
119 | /* | 121 | /* |
@@ -1072,7 +1074,7 @@ verifydir(char *cp) | |||
1072 | errno = ENOTDIR; | 1074 | errno = ENOTDIR; |
1073 | } | 1075 | } |
1074 | run_err("%s: %s", cp, strerror(errno)); | 1076 | run_err("%s: %s", cp, strerror(errno)); |
1075 | exit(1); | 1077 | killchild(0); |
1076 | } | 1078 | } |
1077 | 1079 | ||
1078 | int | 1080 | int |