diff --git a/reactos/dll/win32/lsasrv/authport.c b/reactos/dll/win32/lsasrv/authport.c index d6b848283d1..05b6c585266 100644 --- a/reactos/dll/win32/lsasrv/authport.c +++ b/reactos/dll/win32/lsasrv/authport.c @@ -262,8 +262,12 @@ StartAuthenticationPort(VOID) OBJECT_ATTRIBUTES ObjectAttributes; UNICODE_STRING PortName; DWORD ThreadId; + UNICODE_STRING EventName; + HANDLE EventHandle; NTSTATUS Status; + TRACE("StartAuthenticationPort()\n"); + /* Initialize the logon context list */ InitializeListHead(&LsapLogonContextList); @@ -283,7 +287,41 @@ StartAuthenticationPort(VOID) sizeof(LSA_API_MSG) * 32); if (!NT_SUCCESS(Status)) { - TRACE("NtCreatePort() failed (Status %lx)\n", Status); + WARN("NtCreatePort() failed (Status %lx)\n", Status); + return Status; + } + + RtlInitUnicodeString(&EventName, + L"\\SECURITY\\LSA_AUTHENTICATION_INITIALIZED"); + InitializeObjectAttributes(&ObjectAttributes, + &EventName, + OBJ_CASE_INSENSITIVE | OBJ_PERMANENT, + NULL, + NULL); + Status = NtOpenEvent(&EventHandle, + EVENT_MODIFY_STATE, + &ObjectAttributes); + if (!NT_SUCCESS(Status)) + { + TRACE("NtOpenEvent failed (Status 0x%08lx)\n", Status); + + Status = NtCreateEvent(&EventHandle, + EVENT_MODIFY_STATE, + &ObjectAttributes, + NotificationEvent, + FALSE); + if (!NT_SUCCESS(Status)) + { + WARN("NtCreateEvent failed (Status 0x%08lx)\n", Status); + return Status; + } + } + + Status = NtSetEvent(EventHandle, NULL); + NtClose(EventHandle); + if (!NT_SUCCESS(Status)) + { + WARN("NtSetEvent failed (Status 0x%08lx)\n", Status); return Status; } diff --git a/reactos/dll/win32/lsasrv/lsasrv.h b/reactos/dll/win32/lsasrv/lsasrv.h index e9312022481..a19e93ded64 100644 --- a/reactos/dll/win32/lsasrv/lsasrv.h +++ b/reactos/dll/win32/lsasrv/lsasrv.h @@ -22,6 +22,7 @@ #define NTOS_MODE_USER #include +#include #include #include #include