diff options
Diffstat (limited to 'sshconnect.c')
-rw-r--r-- | sshconnect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sshconnect.c b/sshconnect.c index 01337fe40..0e3001201 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -142,7 +142,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command) | |||
142 | 142 | ||
143 | /* Execute the proxy command. Note that we gave up any | 143 | /* Execute the proxy command. Note that we gave up any |
144 | extra privileges above. */ | 144 | extra privileges above. */ |
145 | execv(argv[0], argv); | 145 | execvp(argv[0], argv); |
146 | perror(argv[0]); | 146 | perror(argv[0]); |
147 | exit(1); | 147 | exit(1); |
148 | } | 148 | } |
@@ -1169,7 +1169,7 @@ ssh_local_cmd(const char *args) | |||
1169 | pid = fork(); | 1169 | pid = fork(); |
1170 | if (pid == 0) { | 1170 | if (pid == 0) { |
1171 | debug3("Executing %s -c \"%s\"", shell, args); | 1171 | debug3("Executing %s -c \"%s\"", shell, args); |
1172 | execl(shell, shell, "-c", args, (char *)NULL); | 1172 | execlp(shell, shell, "-c", args, (char *)NULL); |
1173 | error("Couldn't execute %s -c \"%s\": %s", | 1173 | error("Couldn't execute %s -c \"%s\": %s", |
1174 | shell, args, strerror(errno)); | 1174 | shell, args, strerror(errno)); |
1175 | _exit(1); | 1175 | _exit(1); |