From 273431abde5bc26e741975f6de266622ab20b3a0 Mon Sep 17 00:00:00 2001 From: bagajjal Date: Mon, 3 May 2021 18:02:01 -0700 Subject: [PATCH 1/2] define _PATH_TTY as conin$ --- contrib/win32/openssh/config.h.vs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/win32/openssh/config.h.vs b/contrib/win32/openssh/config.h.vs index 790c655fa49..42c1301b001 100644 --- a/contrib/win32/openssh/config.h.vs +++ b/contrib/win32/openssh/config.h.vs @@ -1714,4 +1714,5 @@ #define FILESYSTEM_NO_BACKSLASH #define HAVE_LOCALTIME_R #define HAVE_DECL_MEMMEM 0 -#define WITH_ZLIB \ No newline at end of file +#define WITH_ZLIB +#define _PATH_TTY "conin$" \ No newline at end of file From 1e548201a6b227c165ab517de135674c9d98618b Mon Sep 17 00:00:00 2001 From: bagajjal Date: Tue, 4 May 2021 12:25:00 -0700 Subject: [PATCH 2/2] fix CI test failures --- contrib/win32/openssh/OpenSSHTestHelper.psm1 | 6 ++++-- regress/pesterTests/CommonUtils.psm1 | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/contrib/win32/openssh/OpenSSHTestHelper.psm1 b/contrib/win32/openssh/OpenSSHTestHelper.psm1 index 600d0d257c1..b6009cdf7e6 100644 --- a/contrib/win32/openssh/OpenSSHTestHelper.psm1 +++ b/contrib/win32/openssh/OpenSSHTestHelper.psm1 @@ -344,10 +344,12 @@ function Get-LocalUserProfile $askpass_util = Join-Path $Script:E2ETestDirectory "utilities\askpass_util\askpass_util.exe" $env:SSH_ASKPASS=$askpass_util $env:ASKPASS_PASSWORD=$OpenSSHTestAccountsPassword + $env:SSH_ASKPASS_REQUIRE="prefer" $ret = ssh -p 47002 "$User@localhost" echo %userprofile% if ($env:DISPLAY -eq 1) { Remove-Item env:\DISPLAY } - remove-item "env:SSH_ASKPASS" -ErrorAction SilentlyContinue - Remove-item "env:ASKPASS_PASSWORD" -ErrorAction SilentlyContinue + Remove-item "env:SSH_ASKPASS" -ErrorAction SilentlyContinue + Remove-item "env:ASKPASS_PASSWORD" -ErrorAction SilentlyContinue + Remove-item "env:SSH_ASKPASS_REQUIRE" -ErrorAction SilentlyContinue } (Get-ItemProperty -Path $userProfileRegistry -Name 'ProfileImagePath').ProfileImagePath diff --git a/regress/pesterTests/CommonUtils.psm1 b/regress/pesterTests/CommonUtils.psm1 index ac08aaece56..eff6779d3f5 100644 --- a/regress/pesterTests/CommonUtils.psm1 +++ b/regress/pesterTests/CommonUtils.psm1 @@ -100,14 +100,16 @@ function Add-PasswordSetting $askpass_util = Join-Path $PSScriptRoot "utilities\askpass_util\askpass_util.exe" $env:SSH_ASKPASS=$askpass_util $env:ASKPASS_PASSWORD=$pass + $env:SSH_ASKPASS_REQUIRE="prefer" } } function Remove-PasswordSetting { - if ($env:DISPLAY -eq 1) { Remove-Item env:\DISPLAY } + if ($env:DISPLAY -eq 1) { Remove-Item env:\DISPLAY -ErrorAction SilentlyContinue } Remove-item "env:SSH_ASKPASS" -ErrorAction SilentlyContinue Remove-item "env:ASKPASS_PASSWORD" -ErrorAction SilentlyContinue + Remove-item "env:SSH_ASKPASS_REQUIRE" -ErrorAction SilentlyContinue } $Taskfolder = "\OpenSSHTestTasks\"