https://git.reactos.org/?p=reactos.git;a=commitdiff;h=419e0146756d50a6053b7…
commit 419e0146756d50a6053b7f2e01fd4660149b57b9
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun Sep 9 22:20:38 2018 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Sep 9 23:24:08 2018 +0200
[SERVICES] Only services starting under the LocalSystem account can run interactively.
Otherwise ignore the interactive flag.
---
base/system/services/database.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/base/system/services/database.c b/base/system/services/database.c
index 409fab4c71..c4c372c320 100644
--- a/base/system/services/database.c
+++ b/base/system/services/database.c
@@ -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,