https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6ae7fc2b0479036b7421f…
commit 6ae7fc2b0479036b7421f69ed9516082bfe52281
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sun Jun 6 11:38:26 2021 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sun Jun 6 11:38:26 2021 +0200
[LSASRV] Notify all authentication packages of a session to be deleted
---
dll/win32/lsasrv/authpackage.c | 19 +++++++++++++++++++
dll/win32/lsasrv/lsasrv.h | 5 +++++
dll/win32/lsasrv/session.c | 5 ++++-
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/dll/win32/lsasrv/authpackage.c b/dll/win32/lsasrv/authpackage.c
index 8e509ed72e2..8a335be6d6b 100644
--- a/dll/win32/lsasrv/authpackage.c
+++ b/dll/win32/lsasrv/authpackage.c
@@ -541,6 +541,25 @@ LsapLookupAuthenticationPackage(PLSA_API_MSG RequestMsg,
}
+VOID
+LsapTerminateLogon(
+ _In_ PLUID LogonId)
+{
+ PLIST_ENTRY ListEntry;
+ PAUTH_PACKAGE Package;
+
+ ListEntry = PackageListHead.Flink;
+ while (ListEntry != &PackageListHead)
+ {
+ Package = CONTAINING_RECORD(ListEntry, AUTH_PACKAGE, Entry);
+
+ Package->LsaApLogonTerminated(LogonId);
+
+ ListEntry = ListEntry->Flink;
+ }
+}
+
+
NTSTATUS
LsapCallAuthenticationPackage(PLSA_API_MSG RequestMsg,
PLSAP_LOGON_CONTEXT LogonContext)
diff --git a/dll/win32/lsasrv/lsasrv.h b/dll/win32/lsasrv/lsasrv.h
index 5e1725f81b8..a73b66c672e 100644
--- a/dll/win32/lsasrv/lsasrv.h
+++ b/dll/win32/lsasrv/lsasrv.h
@@ -126,6 +126,11 @@ NTSTATUS
LsapLogonUser(PLSA_API_MSG RequestMsg,
PLSAP_LOGON_CONTEXT LogonContext);
+VOID
+LsapTerminateLogon(
+ _In_ PLUID LogonId);
+
+
/* authport.c */
NTSTATUS
StartAuthenticationPort(VOID);
diff --git a/dll/win32/lsasrv/session.c b/dll/win32/lsasrv/session.c
index 69775dba982..23ed33fbf55 100644
--- a/dll/win32/lsasrv/session.c
+++ b/dll/win32/lsasrv/session.c
@@ -210,7 +210,7 @@ LsapDeleteLogonSession(IN PLUID LogonId)
if (Session == NULL)
return STATUS_NO_SUCH_LOGON_SESSION;
- TRACE("LsapDeleteLogonSession(<0x%lx,0x%lx>)\n",
+ TRACE("LsapDeleteLogonSession(0x%08lx%08lx)\n",
LogonId->HighPart, LogonId->LowPart);
/* Tell ntoskrnl to delete the logon session */
@@ -218,6 +218,9 @@ LsapDeleteLogonSession(IN PLUID LogonId)
if (!NT_SUCCESS(Status))
return Status;
+ /* Notify the authentication packages */
+ LsapTerminateLogon(LogonId);
+
/* Remove the session entry from the list */
RemoveEntryList(&Session->Entry);
SessionCount--;