Skip to content

Commit 2116c82

Browse files
committed
add #ifdef SUPPORT_CRLF back into auth_check_principals_line method that was moved/renamed
1 parent bbb76f5 commit 2116c82

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

auth2-pubkeyfile.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@ auth_check_principals_line(char *cp, const struct sshkey_cert *cert,
186186
while (ep > cp && (*ep == '\n' || *ep == ' ' || *ep == '\t'))
187187
*ep-- = '\0';
188188

189+
#ifdef SUPPORT_CRLF
190+
/* account for \r at line end */
191+
if (*ep == '\r')
192+
*ep-- = '\0';
193+
#endif
194+
189195
/*
190196
* If the line has internal whitespace then assume it has
191197
* key options.

regress/pesterTests/CertAuth.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Describe "E2E scenarios for certificate authentication" -Tags "CI" {
7070
$pcOutFile = Join-Path $testDir "$tC.$tI.pcout.txt"
7171
$logFile = Join-Path $testDir "$tC.$tI.log.txt"
7272
Remove-Item -Force $pcOutFile -ErrorAction SilentlyContinue
73-
$sshdArgs = "-ddd -f $sshdconfig -E $logFile -o `"AuthorizedKeysFile .fake/authorized_keys`""
73+
$sshdArgs = "-d -f $sshdconfig -E $logFile -o `"AuthorizedKeysFile .fake/authorized_keys`""
7474
$sshdArgs += " -o `"AuthorizedPrincipalsCommand=$env:windir\system32\cmd.exe /c echo otheruser& echo $pkuser& whoami > $pcOutFile`""
7575
$sshdArgs += " -o `"AuthorizedPrincipalsCommandUser=$ssouser`""
7676
$sshdArgs += " -o PasswordAuthentication=no"
@@ -79,7 +79,7 @@ Describe "E2E scenarios for certificate authentication" -Tags "CI" {
7979

8080
#set up SSH_ASKPASS for key passphrase
8181
Add-PasswordSetting -Pass $keypassphrase
82-
$o = ssh -vvv -i $user_key -p 47004 $pkuser@$server echo 2345
82+
$o = ssh -i $user_key -p 47004 $pkuser@$server echo 2345
8383
Remove-PasswordSetting
8484

8585
Stop-SSHDTestDaemon -Port 47004

0 commit comments

Comments
 (0)