Issue is within msv1_0.dll (NTLM SSP provider). Working around by doing a fake login that populates internal state within msv1_0.dll so further S4U logons work as expected.
PowerShell/Win32-OpenSSH#727
This commit is contained in:
Manoj Ampalam 2017-08-17 12:12:09 -07:00 committed by GitHub
parent b6dc082e1d
commit fdb2b110b7
1 changed files with 7 additions and 1 deletions

View File

@ -277,8 +277,14 @@ int process_pubkeyauth_request(struct sshbuf* request, struct sshbuf* response,
if ((token = generate_user_token(user_utf16)) == 0) { if ((token = generate_user_token(user_utf16)) == 0) {
error("unable to generate token for user %ls", user_utf16); error("unable to generate token for user %ls", user_utf16);
/* work around for https://github.com/PowerShell/Win32-OpenSSH/issues/727 by doing a fake login */
LogonUserW(L"FakeUser", L"FakeDomain", L"FakePasswd",
LOGON32_LOGON_NETWORK_CLEARTEXT, LOGON32_PROVIDER_DEFAULT, &token);
if ((token = generate_user_token(user_utf16)) == 0) {
error("unable to generate token on 2nd attempt for user %ls", user_utf16);
goto done; goto done;
} }
}
if (pubkey_allowed(key, token) != 1) { if (pubkey_allowed(key, token) != 1) {