mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-06 10:27:22 +09:00
solve incorrect parsing of the ProxyCommand configuration option
Signed-off-by: Ran Park <bagayonghuming@gmail.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 9cd23fecac)
This commit is contained in:
@@ -925,7 +925,12 @@ ssh_execute_command(const char *command, socket_t in, socket_t out)
|
||||
if (shell == NULL || shell[0] == '\0') {
|
||||
/* Fall back to bash. There are issues with dash or
|
||||
* whatever people tend to link to /bin/sh */
|
||||
shell = "/bin/bash";
|
||||
rc = access("/bin/bash", 0);
|
||||
if (rc != 0) {
|
||||
shell = "/bin/sh";
|
||||
} else {
|
||||
shell = "/bin/bash";
|
||||
}
|
||||
}
|
||||
args[0] = shell;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user