mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-06 18:29:50 +09:00
Add tests for run ssh_execute_command
Signed-off-by: Ran Park <bagayonghuming@gmail.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit d109b5bd5f)
This commit is contained in:
@@ -923,8 +923,8 @@ ssh_execute_command(const char *command, socket_t in, socket_t out)
|
||||
*/
|
||||
shell = getenv("SHELL");
|
||||
if (shell == NULL || shell[0] == '\0') {
|
||||
/* Fall back to bash. There are issues with dash or
|
||||
* whatever people tend to link to /bin/sh */
|
||||
/* Fall back to the /bin/sh only if the bash is not available. But there are
|
||||
* issues with dash or whatever people tend to link to /bin/sh */
|
||||
rc = access("/bin/bash", 0);
|
||||
if (rc != 0) {
|
||||
shell = "/bin/sh";
|
||||
|
||||
Reference in New Issue
Block a user