Author: ekohl
Date: Fri Jan 31 19:26:00 2014
New Revision: 61895
URL:
http://svn.reactos.org/svn/reactos?rev=61895&view=rev
Log:
[MSGINA]
Revert r61888. CORE-7824.
Modified:
trunk/reactos/dll/win32/msgina/gui.c
trunk/reactos/dll/win32/msgina/msgina.c
trunk/reactos/dll/win32/msgina/msgina.h
Modified: trunk/reactos/dll/win32/msgina/gui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/gui.c?rev…
==============================================================================
--- trunk/reactos/dll/win32/msgina/gui.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/gui.c [iso-8859-1] Fri Jan 31 19:26:00 2014
@@ -259,6 +259,9 @@
ULONG RequestBufferSize;
ULONG ResponseBufferSize = 0;
LPWSTR Ptr;
+ LSA_STRING PackageName;
+ HANDLE LsaHandle = NULL;
+ ULONG AuthenticationPackage = 0;
BOOL res = FALSE;
NTSTATUS ProtocolStatus;
NTSTATUS Status;
@@ -345,9 +348,30 @@
NewPassword1,
RequestBuffer->NewPassword.MaximumLength);
+ /* Connect to the LSA server */
+ Status = LsaConnectUntrusted(&LsaHandle);
+ if (!NT_SUCCESS(Status))
+ {
+ ERR("LsaConnectUntrusted failed (Status 0x%08lx)\n", Status);
+ goto done;
+ }
+
+ /* Get the authentication package */
+ RtlInitAnsiString((PANSI_STRING)&PackageName,
+ MSV1_0_PACKAGE_NAME);
+
+ Status = LsaLookupAuthenticationPackage(LsaHandle,
+ &PackageName,
+ &AuthenticationPackage);
+ if (!NT_SUCCESS(Status))
+ {
+ ERR("LsaLookupAuthenticationPackage failed (Status 0x%08lx)\n",
Status);
+ goto done;
+ }
+
/* Call the authentication package */
- Status = LsaCallAuthenticationPackage(pgContext->LsaHandle,
- pgContext->AuthenticationPackage,
+ Status = LsaCallAuthenticationPackage(LsaHandle,
+ AuthenticationPackage,
RequestBuffer,
RequestBufferSize,
(PVOID*)&ResponseBuffer,
@@ -379,6 +403,9 @@
if (ResponseBuffer != NULL)
LsaFreeReturnBuffer(ResponseBuffer);
+
+ if (LsaHandle != NULL)
+ NtClose(LsaHandle);
return res;
}
Modified: trunk/reactos/dll/win32/msgina/msgina.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.c?…
==============================================================================
--- trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] Fri Jan 31 19:26:00 2014
@@ -254,46 +254,6 @@
}
-static
-BOOL
-ConnectToLsa(
- PGINA_CONTEXT pgContext)
-{
- LSA_STRING LogonProcessName;
- LSA_STRING PackageName;
- LSA_OPERATIONAL_MODE SecurityMode = 0;
- NTSTATUS Status;
-
- /* Connect to the LSA server */
- RtlInitAnsiString((PANSI_STRING)&LogonProcessName,
- "MSGINA");
-
- Status = LsaRegisterLogonProcess(&LogonProcessName,
- &pgContext->LsaHandle,
- &SecurityMode);
- if (!NT_SUCCESS(Status))
- {
- ERR("LsaRegisterLogonProcess failed (Status 0x%08lx)\n", Status);
- return FALSE;
- }
-
- /* Get the authentication package */
- RtlInitAnsiString((PANSI_STRING)&PackageName,
- MSV1_0_PACKAGE_NAME);
-
- Status = LsaLookupAuthenticationPackage(pgContext->LsaHandle,
- &PackageName,
- &pgContext->AuthenticationPackage);
- if (!NT_SUCCESS(Status))
- {
- ERR("LsaLookupAuthenticationPackage failed (Status 0x%08lx)\n",
Status);
- return FALSE;
- }
-
- return TRUE;
-}
-
-
/*
* @implemented
*/
@@ -319,13 +279,6 @@
if (!GetRegistrySettings(pgContext))
{
WARN("GetRegistrySettings() failed\n");
- LocalFree(pgContext);
- return FALSE;
- }
-
- if (!ConnectToLsa(pgContext))
- {
- WARN("ConnectToLsa() failed\n");
LocalFree(pgContext);
return FALSE;
}
Modified: trunk/reactos/dll/win32/msgina/msgina.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.h?…
==============================================================================
--- trunk/reactos/dll/win32/msgina/msgina.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/msgina.h [iso-8859-1] Fri Jan 31 19:26:00 2014
@@ -38,8 +38,6 @@
PWLX_DISPATCH_VERSION_1_3 pWlxFuncs;
HANDLE hDllInstance;
HWND hStatusWindow;
- HANDLE LsaHandle;
- ULONG AuthenticationPackage;
DWORD AutoLogonState;
BOOL bDisableCAD;
BOOL bAutoAdminLogon;