[SERVICES] Do not try to start lsass.exe as a service.

Starting the security services (samss, netlogon, etc) requires special code in services.exe and lsasrv.dll.
This commit is contained in:
Eric Kohl 2019-08-04 20:58:12 +02:00
parent 71408b531c
commit b03d2b4d65

View file

@ -1852,6 +1852,8 @@ ScmStartUserModeService(PSERVICE Service,
StartupInfo.lpDesktop = L"WinSta0\\Default";
}
if (wcsstr(Service->lpImage->pszImagePath, L"\\system32\\lsass.exe") == NULL)
{
Result = CreateProcessW(NULL,
Service->lpImage->pszImagePath,
NULL,
@ -1865,6 +1867,12 @@ ScmStartUserModeService(PSERVICE Service,
if (!Result)
dwError = GetLastError();
}
else
{
Result = TRUE;
dwError = ERROR_SUCCESS;
}
}
if (lpEnvironment)
DestroyEnvironmentBlock(lpEnvironment);