mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
81 lines
1.8 KiB
C
81 lines
1.8 KiB
C
/*
|
|
* PROJECT: Local Security Authority Server DLL
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
* FILE: dll/win32/lsasrv/lsasrv.c
|
|
* PURPOSE: Main file
|
|
* COPYRIGHT: Copyright 2006-2009 Eric Kohl
|
|
*/
|
|
|
|
/* INCLUDES ****************************************************************/
|
|
|
|
#define WIN32_NO_STATUS
|
|
#include <windows.h>
|
|
#define NTOS_MODE_USER
|
|
#include <ndk/ntndk.h>
|
|
|
|
#include "lsasrv.h"
|
|
|
|
#include "wine/debug.h"
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(lsasrv);
|
|
|
|
|
|
/* FUNCTIONS ***************************************************************/
|
|
|
|
NTSTATUS WINAPI
|
|
LsapInitLsa(VOID)
|
|
{
|
|
HANDLE hEvent;
|
|
DWORD dwError;
|
|
|
|
TRACE("LsapInitLsa() called\n");
|
|
|
|
/* Start the RPC server */
|
|
LsarStartRpcServer();
|
|
|
|
TRACE("Creating notification event!\n");
|
|
/* Notify the service manager */
|
|
hEvent = CreateEventW(NULL,
|
|
TRUE,
|
|
FALSE,
|
|
L"LSA_RPC_SERVER_ACTIVE");
|
|
if (hEvent == NULL)
|
|
{
|
|
dwError = GetLastError();
|
|
TRACE("Failed to create the notication event (Error %lu)\n", dwError);
|
|
|
|
if (dwError == ERROR_ALREADY_EXISTS)
|
|
{
|
|
hEvent = OpenEventW(GENERIC_WRITE,
|
|
FALSE,
|
|
L"LSA_RPC_SERVER_ACTIVE");
|
|
if (hEvent != NULL)
|
|
{
|
|
ERR("Could not open the notification event!");
|
|
}
|
|
}
|
|
}
|
|
|
|
TRACE("Set notification event!\n");
|
|
SetEvent(hEvent);
|
|
|
|
/* NOTE: Do not close the event handle!!!! */
|
|
|
|
StartAuthenticationPort();
|
|
|
|
return STATUS_SUCCESS;
|
|
}
|
|
|
|
|
|
void __RPC_FAR * __RPC_USER midl_user_allocate(SIZE_T len)
|
|
{
|
|
return RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, len);
|
|
}
|
|
|
|
|
|
void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
|
|
{
|
|
RtlFreeHeap(RtlGetProcessHeap(), 0, ptr);
|
|
}
|
|
|
|
/* EOF */
|