mirror of
https://github.com/reactos/reactos.git
synced 2026-06-20 19:16:02 +08:00
[SERVICES] Only services starting under the LocalSystem account can run interactively. Otherwise ignore the interactive flag.
This commit is contained in:
@@ -1672,14 +1672,6 @@ ScmStartUserModeService(PSERVICE Service,
|
||||
StartupInfo.cb = sizeof(StartupInfo);
|
||||
ZeroMemory(&ProcessInformation, sizeof(ProcessInformation));
|
||||
|
||||
/* Use the interactive desktop if the service is interactive */
|
||||
if ((NoInteractiveServices == 0) &&
|
||||
(Service->Status.dwServiceType & SERVICE_INTERACTIVE_PROCESS))
|
||||
{
|
||||
StartupInfo.dwFlags |= STARTF_INHERITDESKTOP;
|
||||
StartupInfo.lpDesktop = L"WinSta0\\Default";
|
||||
}
|
||||
|
||||
if (Service->lpImage->hToken)
|
||||
{
|
||||
/* User token: Run the service under the user account */
|
||||
@@ -1732,6 +1724,14 @@ ScmStartUserModeService(PSERVICE Service,
|
||||
lpEnvironment = NULL;
|
||||
}
|
||||
|
||||
/* Use the interactive desktop if the service is interactive */
|
||||
if ((NoInteractiveServices == 0) &&
|
||||
(Service->Status.dwServiceType & SERVICE_INTERACTIVE_PROCESS))
|
||||
{
|
||||
StartupInfo.dwFlags |= STARTF_INHERITDESKTOP;
|
||||
StartupInfo.lpDesktop = L"WinSta0\\Default";
|
||||
}
|
||||
|
||||
Result = CreateProcessW(NULL,
|
||||
Service->lpImage->pszImagePath,
|
||||
NULL,
|
||||
|
||||
Reference in New Issue
Block a user