services: Refuse to start disabled services.
This commit is contained in:
parent
9183a171f1
commit
eafb44d4e1
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue