Windows Authentication - Then launced with username argument prefill the name in the authentication box.

This commit is contained in:
Victor K 2020-05-15 03:50:20 +03:00 committed by akallabeth
parent 6a811db69c
commit 329332432a
1 changed files with 2 additions and 0 deletions

View File

@ -438,6 +438,8 @@ static BOOL wf_authenticate_raw(freerdp* instance, const char* title, char** use
fSave = FALSE;
dwFlags = CREDUI_FLAGS_DO_NOT_PERSIST | CREDUI_FLAGS_EXCLUDE_CERTIFICATES;
if (username && *username)
strncpy(UserName, *username, CREDUI_MAX_USERNAME_LENGTH);
if (wfc->isConsole)
status = CredUICmdLinePromptForCredentialsA(
title, NULL, 0, UserName, CREDUI_MAX_USERNAME_LENGTH + 1, Password,