[ros-diffs] [hpoussin] 28318: Check username/password when unlocking the workstation Fix typo

hpoussin at svn.reactos.org hpoussin at svn.reactos.org
Mon Aug 13 16:54:14 CEST 2007


Author: hpoussin
Date: Mon Aug 13 18:54:14 2007
New Revision: 28318

URL: http://svn.reactos.org/svn/reactos?rev=28318&view=rev
Log:
Check username/password when unlocking the workstation
Fix typo

Modified:
    trunk/reactos/dll/win32/msgina/msgina.c
    trunk/reactos/dll/win32/msgina/msgina.h
    trunk/reactos/dll/win32/msgina/tui.c

Modified: trunk/reactos/dll/win32/msgina/msgina.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.c?rev=28318&r1=28317&r2=28318&view=diff
==============================================================================
--- trunk/reactos/dll/win32/msgina/msgina.c (original)
+++ trunk/reactos/dll/win32/msgina/msgina.c Mon Aug 13 18:54:14 2007
@@ -450,10 +450,10 @@
 		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 @@
 	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 @@
 
 	pgContext->pAuthenticationId = pAuthenticationId;
 	pgContext->pdwOptions = pdwOptions;
-	pgContext->pNprNotifyInfo = pNprNotifyInfo;
+	pgContext->pMprNotifyInfo = pMprNotifyInfo;
 	pgContext->pProfile = pProfile;
 
 	if (0 == GetSystemMetrics(SM_REMOTESESSION) &&

Modified: trunk/reactos/dll/win32/msgina/msgina.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.h?rev=28318&r1=28317&r2=28318&view=diff
==============================================================================
--- trunk/reactos/dll/win32/msgina/msgina.h (original)
+++ trunk/reactos/dll/win32/msgina/msgina.h Mon Aug 13 18:54:14 2007
@@ -25,7 +25,7 @@
 	HANDLE UserToken;
 	PLUID pAuthenticationId;
 	PDWORD pdwOptions;
-	PWLX_MPR_NOTIFY_INFO pNprNotifyInfo;
+	PWLX_MPR_NOTIFY_INFO pMprNotifyInfo;
 	PVOID *pProfile;
 
 	/* Current logo to display */

Modified: trunk/reactos/dll/win32/msgina/tui.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/tui.c?rev=28318&r1=28317&r2=28318&view=diff
==============================================================================
--- trunk/reactos/dll/win32/msgina/tui.c (original)
+++ trunk/reactos/dll/win32/msgina/tui.c Mon Aug 13 18:54:14 2007
@@ -221,6 +221,7 @@
 TUILockedSAS(
 	IN OUT PGINA_CONTEXT pgContext)
 {
+	HANDLE hToken;
 	WCHAR UserName[256];
 	WCHAR Password[256];
 
@@ -237,7 +238,15 @@
 	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;
 }
 




More information about the Ros-diffs mailing list