mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[SERVICES] Only services starting under the LocalSystem account can run interactively. Otherwise ignore the interactive flag.
This commit is contained in:
parent
cccf26da74
commit
419e014675
1 changed files with 8 additions and 8 deletions
|
@ -1672,14 +1672,6 @@ ScmStartUserModeService(PSERVICE Service,
|
||||||
StartupInfo.cb = sizeof(StartupInfo);
|
StartupInfo.cb = sizeof(StartupInfo);
|
||||||
ZeroMemory(&ProcessInformation, sizeof(ProcessInformation));
|
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)
|
if (Service->lpImage->hToken)
|
||||||
{
|
{
|
||||||
/* User token: Run the service under the user account */
|
/* User token: Run the service under the user account */
|
||||||
|
@ -1732,6 +1724,14 @@ ScmStartUserModeService(PSERVICE Service,
|
||||||
lpEnvironment = NULL;
|
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,
|
Result = CreateProcessW(NULL,
|
||||||
Service->lpImage->pszImagePath,
|
Service->lpImage->pszImagePath,
|
||||||
NULL,
|
NULL,
|
||||||
|
|
Loading…
Reference in a new issue