diff --git a/contrib/win32/openssh/version.rc b/contrib/win32/openssh/version.rc index 5395997e5..d045c2450 100644 --- a/contrib/win32/openssh/version.rc +++ b/contrib/win32/openssh/version.rc @@ -51,8 +51,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 7,7,0,0 - PRODUCTVERSION 7,7,0,0 + FILEVERSION 7,7,1,0 + PRODUCTVERSION 7,7,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -67,7 +67,7 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "FileVersion", "7.7.0.0" + VALUE "FileVersion", "7.7.1.0" VALUE "ProductName", "OpenSSH for Windows" VALUE "ProductVersion", "OpenSSH_7.7p1 for Windows" END diff --git a/contrib/win32/win32compat/misc.c b/contrib/win32/win32compat/misc.c index 824603c68..dcd3079e1 100644 --- a/contrib/win32/win32compat/misc.c +++ b/contrib/win32/win32compat/misc.c @@ -1720,7 +1720,7 @@ cleanup: char* build_session_commandline(const char *shell, const char* shell_arg, const char *command, int pty) { - enum sh_type { SH_CMD, SH_PS, SH_WSL_BASH, SH_CYGWIN, SH_OTHER } shell_type = SH_OTHER; + enum sh_type { SH_OTHER, SH_CMD, SH_PS, SH_BASH } shell_type = SH_OTHER; enum cmd_type { CMD_OTHER, CMD_SFTP, CMD_SCP } command_type = CMD_OTHER; char *progdir = w32_programdir(), *cmd_sp = NULL, *cmdline = NULL, *ret = NULL, *p; int len, progdir_len = (int)strlen(progdir); @@ -1737,10 +1737,8 @@ do { \ shell_type = SH_CMD; else if (strstr(shell, "powershell")) shell_type = SH_PS; - else if (strstr(shell, "system32\\bash")) - shell_type = SH_WSL_BASH; - else if (strstr(shell, "cygwin")) - shell_type = SH_CYGWIN; + else if (strstr(shell, "\\bash")) + shell_type = SH_BASH; /* special case where incoming command needs to be adjusted */ do { @@ -1871,12 +1869,12 @@ do { \ CMDLINE_APPEND(p, " -c "); /* bash type shells require " decoration around command*/ - if (shell_type == SH_WSL_BASH || shell_type == SH_CYGWIN) + if (shell_type == SH_BASH) CMDLINE_APPEND(p, "\""); CMDLINE_APPEND(p, command); - if (shell_type == SH_WSL_BASH || shell_type == SH_CYGWIN) + if (shell_type == SH_BASH) CMDLINE_APPEND(p, "\""); } *p = '\0'; diff --git a/contrib/win32/win32compat/pwd.c b/contrib/win32/win32compat/pwd.c index f4301fd51..a5b05a85f 100644 --- a/contrib/win32/win32compat/pwd.c +++ b/contrib/win32/win32compat/pwd.c @@ -95,6 +95,7 @@ set_defaultshell() goto cleanup; convertToBackslash(pw_shellpath_local); + to_lower_case(pw_shellpath_local); pw_shellpath = pw_shellpath_local; pw_shellpath_local = NULL; shell_command_option = command_option_local; diff --git a/regress/unittests/win32compat/miscellaneous_tests.c b/regress/unittests/win32compat/miscellaneous_tests.c index bbddf24a9..f82ad5d88 100644 --- a/regress/unittests/win32compat/miscellaneous_tests.c +++ b/regress/unittests/win32compat/miscellaneous_tests.c @@ -359,7 +359,7 @@ test_build_session_commandline() TEST_DONE(); - TEST_START("wsl bash shell tests"); + TEST_START("bash shell tests"); out = build_session_commandline("c:\\system32\\bash.exe", NULL, "internal-sftp -arg", 0); ASSERT_STRING_EQ(out, "\"c:\\system32\\bash.exe\" -c \"sftp-server.exe -arg\""); free(out); @@ -372,14 +372,11 @@ test_build_session_commandline() out = build_session_commandline("c:\\system32\\bash", NULL, "scP -arg", 0); ASSERT_STRING_EQ(out, "\"c:\\system32\\bash\" -c \"scp.exe -arg\""); free(out); - out = build_session_commandline("c:\\system32\\bash", "-custom", "mycommand -arg", 1); - ASSERT_STRING_EQ(out + shellhost_path_len + 1, "\"c:\\system32\\bash\" -custom \"mycommand -arg\""); + out = build_session_commandline("c:\\bash", "-custom", "mycommand -arg", 1); + ASSERT_STRING_EQ(out + shellhost_path_len + 1, "\"c:\\bash\" -custom \"mycommand -arg\""); out[shellhost_path_len] = '\0'; ASSERT_STRING_EQ(out, shellhost_path); free(out); - TEST_DONE(); - - TEST_START("cygwin bash shell tests"); out = build_session_commandline("c:\\cygwin\\bash.exe", NULL, "internal-sftp -arg", 0); ASSERT_STRING_EQ(out, "\"c:\\cygwin\\bash.exe\" -c \"sftp-server.exe -arg\""); free(out);