mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
Check username/password when unlocking the workstation
Fix typo svn path=/trunk/; revision=28318
This commit is contained in:
@@ -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) &&
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user