diff options
-rw-r--r-- | sshconnect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sshconnect.c b/sshconnect.c index 9ec0618a9..5f8c81b84 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -263,7 +263,7 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, const char *host_arg, | |||
263 | /* Execute the proxy command. Note that we gave up any | 263 | /* Execute the proxy command. Note that we gave up any |
264 | extra privileges above. */ | 264 | extra privileges above. */ |
265 | ssh_signal(SIGPIPE, SIG_DFL); | 265 | ssh_signal(SIGPIPE, SIG_DFL); |
266 | execv(argv[0], argv); | 266 | execvp(argv[0], argv); |
267 | perror(argv[0]); | 267 | perror(argv[0]); |
268 | exit(1); | 268 | exit(1); |
269 | } | 269 | } |
@@ -1392,7 +1392,7 @@ ssh_local_cmd(const char *args) | |||
1392 | if (pid == 0) { | 1392 | if (pid == 0) { |
1393 | ssh_signal(SIGPIPE, SIG_DFL); | 1393 | ssh_signal(SIGPIPE, SIG_DFL); |
1394 | debug3("Executing %s -c \"%s\"", shell, args); | 1394 | debug3("Executing %s -c \"%s\"", shell, args); |
1395 | execl(shell, shell, "-c", args, (char *)NULL); | 1395 | execlp(shell, shell, "-c", args, (char *)NULL); |
1396 | error("Couldn't execute %s -c \"%s\": %s", | 1396 | error("Couldn't execute %s -c \"%s\": %s", |
1397 | shell, args, strerror(errno)); | 1397 | shell, args, strerror(errno)); |
1398 | _exit(1); | 1398 | _exit(1); |