[MSGINA] Close the LSA handle on shutdown
authorEric Kohl <eric.kohl@reactos.org>
Tue, 22 May 2018 15:31:20 +0000 (17:31 +0200)
committerEric Kohl <eric.kohl@reactos.org>
Tue, 22 May 2018 15:31:20 +0000 (17:31 +0200)
dll/win32/msgina/msgina.c
dll/win32/msgina/stubs.c

index c01c754..e22413c 100644 (file)
@@ -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,
index 9b7c0af..f5e20c4 100644 (file)
@@ -25,21 +25,6 @@ WlxIsLockOk(
 }
 
 
-/*
- * @unimplemented
- */
-VOID WINAPI
-WlxShutdown(
-    PVOID pWlxContext,
-    DWORD ShutdownType)
-{
-    UNREFERENCED_PARAMETER(pWlxContext);
-    UNREFERENCED_PARAMETER(ShutdownType);
-
-    UNIMPLEMENTED;
-}
-
-
 /*
  * @unimplemented
  */