mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-27 15:54:22 +02:00
add #ifdef SUPPORT_CRLF back into auth_check_principals_line method that was moved/renamed
This commit is contained in:
parent
bbb76f5c67
commit
2116c820ca
@ -186,6 +186,12 @@ auth_check_principals_line(char *cp, const struct sshkey_cert *cert,
|
|||||||
while (ep > cp && (*ep == '\n' || *ep == ' ' || *ep == '\t'))
|
while (ep > cp && (*ep == '\n' || *ep == ' ' || *ep == '\t'))
|
||||||
*ep-- = '\0';
|
*ep-- = '\0';
|
||||||
|
|
||||||
|
#ifdef SUPPORT_CRLF
|
||||||
|
/* account for \r at line end */
|
||||||
|
if (*ep == '\r')
|
||||||
|
*ep-- = '\0';
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the line has internal whitespace then assume it has
|
* If the line has internal whitespace then assume it has
|
||||||
* key options.
|
* key options.
|
||||||
|
@ -70,7 +70,7 @@ Describe "E2E scenarios for certificate authentication" -Tags "CI" {
|
|||||||
$pcOutFile = Join-Path $testDir "$tC.$tI.pcout.txt"
|
$pcOutFile = Join-Path $testDir "$tC.$tI.pcout.txt"
|
||||||
$logFile = Join-Path $testDir "$tC.$tI.log.txt"
|
$logFile = Join-Path $testDir "$tC.$tI.log.txt"
|
||||||
Remove-Item -Force $pcOutFile -ErrorAction SilentlyContinue
|
Remove-Item -Force $pcOutFile -ErrorAction SilentlyContinue
|
||||||
$sshdArgs = "-ddd -f $sshdconfig -E $logFile -o `"AuthorizedKeysFile .fake/authorized_keys`""
|
$sshdArgs = "-d -f $sshdconfig -E $logFile -o `"AuthorizedKeysFile .fake/authorized_keys`""
|
||||||
$sshdArgs += " -o `"AuthorizedPrincipalsCommand=$env:windir\system32\cmd.exe /c echo otheruser& echo $pkuser& whoami > $pcOutFile`""
|
$sshdArgs += " -o `"AuthorizedPrincipalsCommand=$env:windir\system32\cmd.exe /c echo otheruser& echo $pkuser& whoami > $pcOutFile`""
|
||||||
$sshdArgs += " -o `"AuthorizedPrincipalsCommandUser=$ssouser`""
|
$sshdArgs += " -o `"AuthorizedPrincipalsCommandUser=$ssouser`""
|
||||||
$sshdArgs += " -o PasswordAuthentication=no"
|
$sshdArgs += " -o PasswordAuthentication=no"
|
||||||
@ -79,7 +79,7 @@ Describe "E2E scenarios for certificate authentication" -Tags "CI" {
|
|||||||
|
|
||||||
#set up SSH_ASKPASS for key passphrase
|
#set up SSH_ASKPASS for key passphrase
|
||||||
Add-PasswordSetting -Pass $keypassphrase
|
Add-PasswordSetting -Pass $keypassphrase
|
||||||
$o = ssh -vvv -i $user_key -p 47004 $pkuser@$server echo 2345
|
$o = ssh -i $user_key -p 47004 $pkuser@$server echo 2345
|
||||||
Remove-PasswordSetting
|
Remove-PasswordSetting
|
||||||
|
|
||||||
Stop-SSHDTestDaemon -Port 47004
|
Stop-SSHDTestDaemon -Port 47004
|
||||||
|
Loading…
x
Reference in New Issue
Block a user