From: Andrew Nguyen <arethusa26@gmail.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59426 --- dlls/advapi32/tests/service.c | 4 ++-- programs/services/services.c | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c index 100864d8c94..8eccfe27f0b 100644 --- a/dlls/advapi32/tests/service.c +++ b/dlls/advapi32/tests/service.c @@ -208,8 +208,8 @@ static void test_create_delete_svc(void) { {"LocalSystem"}, {"localsystem"}, - {".\\LocalSystem", TRUE}, - {".\\localsystem", TRUE}, + {".\\LocalSystem"}, + {".\\localsystem"}, }; char buffer[200]; DWORD size; diff --git a/programs/services/services.c b/programs/services/services.c index dff3cd60040..0830a75016b 100644 --- a/programs/services/services.c +++ b/programs/services/services.c @@ -520,9 +520,12 @@ BOOL validate_service_config(struct service_entry *entry) case SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS: case SERVICE_WIN32_SHARE_PROCESS | SERVICE_INTERACTIVE_PROCESS: /* These can be only run as LocalSystem */ - if (entry->config.lpServiceStartName && wcsicmp(entry->config.lpServiceStartName, L"LocalSystem") != 0) + if (entry->config.lpServiceStartName && + wcsicmp(entry->config.lpServiceStartName, L"LocalSystem") != 0 && + wcsicmp(entry->config.lpServiceStartName, L".\\LocalSystem") != 0) { - WINE_ERR("Service %s is interactive but has a start name\n", wine_dbgstr_w(entry->name)); + WINE_ERR("Service %s is interactive but has the disallowed account name %s\n", + wine_dbgstr_w(entry->name), wine_dbgstr_w(entry->config.lpServiceStartName)); return FALSE; } break; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10113