Commit eafb44d4 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

services: Refuse to start disabled services.

parent 9183a171
......@@ -2151,7 +2151,7 @@ static void test_start_stop(void)
goto cleanup;
}
le = try_start_stop(svc_handle, displayname, is_nt4);
todo_wine ok(le == ERROR_SERVICE_DISABLED, "%d != ERROR_SERVICE_DISABLED\n", le);
ok(le == ERROR_SERVICE_DISABLED, "%d != ERROR_SERVICE_DISABLED\n", le);
/* Then one with a bad path */
displayname = "Winetest Bad Path";
......
......@@ -961,6 +961,9 @@ DWORD __cdecl svcctl_StartServiceW(
if ((err = validate_service_handle(hService, SERVICE_START, &service)) != 0)
return err;
if (service->service_entry->config.dwStartType == SERVICE_DISABLED)
return ERROR_SERVICE_DISABLED;
err = service_start(service->service_entry, dwNumServiceArgs, lpServiceArgVectors);
return err;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment