Check username/password when unlocking the workstation

Fix typo

svn path=/trunk/; revision=28318
This commit is contained in:
Hervé Poussineau
2007-08-13 14:54:14 +00:00
parent 6047f75c71
commit 0d694c9494
3 changed files with 17 additions and 8 deletions
+6 -6
View File
@@ -450,10 +450,10 @@ DoLoginTasks(
goto cleanup;
}
*pgContext->pAuthenticationId = Stats.AuthenticationId;
pgContext->pNprNotifyInfo->pszUserName = DuplicationString(UserName);
pgContext->pNprNotifyInfo->pszDomain = DuplicationString(Domain);
pgContext->pNprNotifyInfo->pszPassword = DuplicationString(Password);
pgContext->pNprNotifyInfo->pszOldPassword = NULL;
pgContext->pMprNotifyInfo->pszUserName = DuplicationString(UserName);
pgContext->pMprNotifyInfo->pszDomain = DuplicationString(Domain);
pgContext->pMprNotifyInfo->pszPassword = DuplicationString(Password);
pgContext->pMprNotifyInfo->pszOldPassword = NULL;
*pgContext->pdwOptions = 0;
*pgContext->pProfile = pProfile;
return TRUE;
@@ -600,7 +600,7 @@ WlxLoggedOutSAS(
IN OUT PSID pLogonSid,
OUT PDWORD pdwOptions,
OUT PHANDLE phToken,
OUT PWLX_MPR_NOTIFY_INFO pNprNotifyInfo,
OUT PWLX_MPR_NOTIFY_INFO pMprNotifyInfo,
OUT PVOID *pProfile)
{
PGINA_CONTEXT pgContext = (PGINA_CONTEXT)pWlxContext;
@@ -613,7 +613,7 @@ WlxLoggedOutSAS(
pgContext->pAuthenticationId = pAuthenticationId;
pgContext->pdwOptions = pdwOptions;
pgContext->pNprNotifyInfo = pNprNotifyInfo;
pgContext->pMprNotifyInfo = pMprNotifyInfo;
pgContext->pProfile = pProfile;
if (0 == GetSystemMetrics(SM_REMOTESESSION) &&
+1 -1
View File
@@ -25,7 +25,7 @@ typedef struct
HANDLE UserToken;
PLUID pAuthenticationId;
PDWORD pdwOptions;
PWLX_MPR_NOTIFY_INFO pNprNotifyInfo;
PWLX_MPR_NOTIFY_INFO pMprNotifyInfo;
PVOID *pProfile;
/* Current logo to display */
+10 -1
View File
@@ -221,6 +221,7 @@ static INT
TUILockedSAS(
IN OUT PGINA_CONTEXT pgContext)
{
HANDLE hToken;
WCHAR UserName[256];
WCHAR Password[256];
@@ -237,7 +238,15 @@ TUILockedSAS(
if (!ReadString(IDS_ASKFORPASSWORD, Password, 256, FALSE))
return WLX_SAS_ACTION_NONE;
FIXME("FIXME: Check user/password\n");
if (!LogonUserW(UserName, NULL, Password,
LOGON32_LOGON_UNLOCK,
LOGON32_PROVIDER_DEFAULT,
&hToken))
{
TRACE("LogonUserW() failed\n");
return WLX_SAS_ACTION_NONE;
}
CloseHandle(hToken);
return WLX_SAS_ACTION_UNLOCK_WKSTA;
}