diff --git a/boot/bootdata/hivesys.inf b/boot/bootdata/hivesys.inf index 586b4746633..7dc2c1141fd 100644 --- a/boot/bootdata/hivesys.inf +++ b/boot/bootdata/hivesys.inf @@ -1677,12 +1677,12 @@ HKLM,"SYSTEM\CurrentControlSet\Services\Ndis","Start",0x00010001,0x00000000 HKLM,"SYSTEM\CurrentControlSet\Services\Ndis","Type",0x00010001,0x00000001 ; NetLogon -;HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","DisplayName",0x00000000,%NETLOGON_SERVICE% -;HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","Description",0x00000000,%NETLOGON_SERVICE_DESCRIPTION% -;HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","ErrorControl",0x00010001,0x00000001 -;HKLM,"SYSTEM\CurrentControlSet\Services\Netlogon","ImagePath",0x00020000,"%SystemRoot%\system32\lsass.exe" -;HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","Start",0x00010001,0x00000003 -;HKLM,"SYSTEM\CurrentControlSet\Services\Netlogon","Type",0x00010001,0x00000020 +HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","DisplayName",0x00000000,%NETLOGON_SERVICE% +HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","Description",0x00000000,%NETLOGON_SERVICE_DESCRIPTION% +HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","ErrorControl",0x00010001,0x00000001 +HKLM,"SYSTEM\CurrentControlSet\Services\Netlogon","ImagePath",0x00020000,"%SystemRoot%\system32\lsass.exe" +HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","Start",0x00010001,0x00000003 +HKLM,"SYSTEM\CurrentControlSet\Services\Netlogon","Type",0x00010001,0x00000020 ; NTFS filesystem driver HKLM,"SYSTEM\CurrentControlSet\Services\Ntfs","ErrorControl",0x00010001,0x00000000 diff --git a/dll/win32/lsasrv/service.c b/dll/win32/lsasrv/service.c index 9c207811135..95fe262c7b2 100644 --- a/dll/win32/lsasrv/service.c +++ b/dll/win32/lsasrv/service.c @@ -11,12 +11,16 @@ #include "lsasrv.h" #include +typedef VOID (WINAPI *PNETLOGONMAIN)(INT ArgCount, PWSTR *ArgVector); + VOID WINAPI I_ScIsSecurityProcess(VOID); +static VOID WINAPI NetlogonServiceMain(DWORD dwArgc, PWSTR *pszArgv); static VOID WINAPI SamSsServiceMain(DWORD dwArgc, PWSTR *pszArgv); SERVICE_TABLE_ENTRYW ServiceTable[] = { + {L"NETLOGON", NetlogonServiceMain}, {L"SAMSS", SamSsServiceMain}, {NULL, NULL} }; @@ -24,6 +28,39 @@ SERVICE_TABLE_ENTRYW ServiceTable[] = /* FUNCTIONS ***************************************************************/ +static +VOID +WINAPI +NetlogonServiceMain( + _In_ DWORD dwArgc, + _In_ PWSTR *pszArgv) +{ + HINSTANCE hNetlogon = NULL; + PNETLOGONMAIN pNetlogonMain = NULL; + + TRACE("NetlogonServiceMain(%lu %p)\n", dwArgc, pszArgv); + + hNetlogon = LoadLibraryW(L"Netlogon.dll"); + if (hNetlogon == NULL) + { + ERR("LoadLibrary() failed!\n"); + return; + } + + pNetlogonMain = (PNETLOGONMAIN)GetProcAddress(hNetlogon, "NlNetlogonMain"); + if (pNetlogonMain == NULL) + { + ERR("GetProcAddress(NlNetlogonMain) failed!\n"); + FreeLibrary(hNetlogon); + return; + } + + TRACE("NlNetlogonMain %p\n", pNetlogonMain); + + pNetlogonMain(dwArgc, pszArgv); +} + + static VOID WINAPI