From 71dd8145f383939b3ab8d7e3bef62d031a35d787 Mon Sep 17 00:00:00 2001 From: Manoj Ampalam Date: Thu, 16 Feb 2017 22:57:05 -0800 Subject: [PATCH] Fixes to CI validation failures --- contrib/win32/openssh/appveyor.psm1 | 2 +- contrib/win32/openssh/config.vcxproj | 8 ++++---- session.c | 9 ++++----- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/contrib/win32/openssh/appveyor.psm1 b/contrib/win32/openssh/appveyor.psm1 index 8d6eb7e10..0244d892d 100644 --- a/contrib/win32/openssh/appveyor.psm1 +++ b/contrib/win32/openssh/appveyor.psm1 @@ -669,7 +669,7 @@ function Run-OpenSSHUnitTest Remove-Item -Path $unitTestOutputFile -Force -ErrorAction SilentlyContinue } - $unitTestFiles = Get-ChildItem -Path "$testRoot\unittest*.exe" -Exclude unittest-kex.exe,unittest-hostkeys.exe + $unitTestFiles = Get-ChildItem -Path "$testRoot\unittest*.exe" -Exclude unittest-kex.exe,unittest-sshkey.exe,unittest-hostkeys.exe $testfailed = $false if ($unitTestFiles -ne $null) { diff --git a/contrib/win32/openssh/config.vcxproj b/contrib/win32/openssh/config.vcxproj index 45d6ca4a0..9bf9ee23f 100644 --- a/contrib/win32/openssh/config.vcxproj +++ b/contrib/win32/openssh/config.vcxproj @@ -115,7 +115,7 @@ powershell.exe -Executionpolicy Bypass "$(SolutionDir)config.ps1" -Config_h_vs '$(SolutionDir)config.h.vs' -Config_h '$(OpenSSH-Src-Path)config.h' -VCIncludePath '$(VC_IncludePath)' -OutCRTHeader '$(OpenSSH-Src-Path)contrib\win32\win32compat\inc\crtheaders.h' - Setup config.h in openssh source path for visual studio + Generate crtheaders.h and config.h @@ -139,7 +139,7 @@ powershell.exe -Executionpolicy Bypass "$(SolutionDir)config.ps1" -Config_h_vs '$(SolutionDir)config.h.vs' -Config_h '$(OpenSSH-Src-Path)config.h' -VCIncludePath '$(VC_IncludePath)' -OutCRTHeader '$(OpenSSH-Src-Path)contrib\win32\win32compat\inc\crtheaders.h' - Setup config.h in openssh source path for visual studio + Generate crtheaders.h and config.h @@ -167,7 +167,7 @@ powershell.exe -Executionpolicy Bypass "$(SolutionDir)config.ps1" -Config_h_vs '$(SolutionDir)config.h.vs' -Config_h '$(OpenSSH-Src-Path)config.h' -VCIncludePath '$(VC_IncludePath)' -OutCRTHeader '$(OpenSSH-Src-Path)contrib\win32\win32compat\inc\crtheaders.h' - Setup config.h in openssh source path for visual studio + Generate crtheaders.h and config.h @@ -195,7 +195,7 @@ powershell.exe -Executionpolicy Bypass "$(SolutionDir)config.ps1" -Config_h_vs '$(SolutionDir)config.h.vs' -Config_h '$(OpenSSH-Src-Path)config.h' -VCIncludePath '$(VC_IncludePath)' -OutCRTHeader '$(OpenSSH-Src-Path)contrib\win32\win32compat\inc\crtheaders.h' - Setup config.h in openssh source path for visual studio + Generate crtheaders.h and config.h diff --git a/session.c b/session.c index 54b3087d4..97426eccf 100644 --- a/session.c +++ b/session.c @@ -482,6 +482,9 @@ int do_exec_windows(Session *s, const char *command, int pty) { fcntl(pipeout[0], F_SETFD, FD_CLOEXEC); fcntl(pipeerr[0], F_SETFD, FD_CLOEXEC); + /* setup Environment varibles */ + setup_session_vars(s); + /* prepare exec - path used with CreateProcess() */ if (s->is_subsystem || (command && memcmp(command, "scp", 3) == 0)) { /* relative or absolute */ @@ -530,17 +533,13 @@ int do_exec_windows(Session *s, const char *command, int pty) { *c = '\0'; } - /* setup Environment varibles */ - setup_session_vars(s); - - extern int debug_flag; - /* start the process */ { PROCESS_INFORMATION pi; STARTUPINFOW si; BOOL b; HANDLE hToken = INVALID_HANDLE_VALUE; + extern int debug_flag; memset(&si, 0, sizeof(STARTUPINFO)); si.cb = sizeof(STARTUPINFO);