Update _PATH_TTY to point to the console (#506)

This commit is contained in:
bagajjal 2021-05-04 13:18:06 -07:00 committed by GitHub
parent 4c37fb9792
commit 59a96cfee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -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

View File

@ -1714,4 +1714,5 @@
#define FILESYSTEM_NO_BACKSLASH
#define HAVE_LOCALTIME_R
#define HAVE_DECL_MEMMEM 0
#define WITH_ZLIB
#define WITH_ZLIB
#define _PATH_TTY "conin$"

View File

@ -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\"