https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4c4c6e88b3192a2e045a863cfd9964a4b142faec

commit 4c4c6e88b3192a2e045a863cfd9964a4b142faec
Author:     Eric Kohl <eric.k...@reactos.org>
AuthorDate: Tue May 22 17:31:20 2018 +0200
Commit:     Eric Kohl <eric.k...@reactos.org>
CommitDate: Tue May 22 17:31:20 2018 +0200

    [MSGINA] Close the LSA handle on shutdown
---
 dll/win32/msgina/msgina.c | 23 +++++++++++++++++++++++
 dll/win32/msgina/stubs.c  | 15 ---------------
 2 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/dll/win32/msgina/msgina.c b/dll/win32/msgina/msgina.c
index c01c75451b..e22413c613 100644
--- a/dll/win32/msgina/msgina.c
+++ b/dll/win32/msgina/msgina.c
@@ -1030,6 +1030,29 @@ WlxLogoff(
 }
 
 
+/*
+ * @implemented
+ */
+VOID WINAPI
+WlxShutdown(
+    PVOID pWlxContext,
+    DWORD ShutdownType)
+{
+    PGINA_CONTEXT pgContext = (PGINA_CONTEXT)pWlxContext;
+    NTSTATUS Status;
+
+    TRACE("WlxShutdown(%p %lx)\n", pWlxContext, ShutdownType);
+
+    /* Close the LSA handle */
+    pgContext->AuthenticationPackage = 0;
+    Status = LsaDeregisterLogonProcess(pgContext->LsaHandle);
+    if (!NT_SUCCESS(Status))
+    {
+        ERR("LsaDeregisterLogonProcess failed (Status 0x%08lx)\n", Status);
+    }
+}
+
+
 BOOL WINAPI
 DllMain(
     IN HINSTANCE hinstDLL,
diff --git a/dll/win32/msgina/stubs.c b/dll/win32/msgina/stubs.c
index 9b7c0afe16..f5e20c4183 100644
--- a/dll/win32/msgina/stubs.c
+++ b/dll/win32/msgina/stubs.c
@@ -25,21 +25,6 @@ WlxIsLockOk(
 }
 
 
-/*
- * @unimplemented
- */
-VOID WINAPI
-WlxShutdown(
-    PVOID pWlxContext,
-    DWORD ShutdownType)
-{
-    UNREFERENCED_PARAMETER(pWlxContext);
-    UNREFERENCED_PARAMETER(ShutdownType);
-
-    UNIMPLEMENTED;
-}
-
-
 /*
  * @unimplemented
  */

Reply via email to