From: William A. Rowe Jr Date: Tue, 9 Jul 2002 17:13:48 +0000 (+0000) Subject: Fix access for non-Administrators (superusers and the like) to allow them X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5bc60836d42b8dc645ac71b90cf54b0b0064650a;p=apache Fix access for non-Administrators (superusers and the like) to allow them to start and stop services, even without full permission to create or remove installed services. PR: 10460 Submitted by: "Mladen Turk" git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95989 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/win32/ApacheMonitor.c b/support/win32/ApacheMonitor.c index 52d86423b9..4fec6ff478 100644 --- a/support/win32/ApacheMonitor.c +++ b/support/win32/ApacheMonitor.c @@ -780,13 +780,13 @@ BOOL ApacheManageService(LPCSTR szServiceName, LPCSTR szImagePath, else { schSCManager = OpenSCManager(szComputerName, NULL, - SC_MANAGER_ALL_ACCESS); + GENERIC_EXECUTE); if (!schSCManager) { return FALSE; } schService = OpenService(schSCManager, szServiceName, - SERVICE_ALL_ACCESS); + GENERIC_EXECUTE); if (schService != NULL) { retValue = FALSE; @@ -937,7 +937,7 @@ BOOL IsServiceRunning(LPCSTR szServiceName, LPCSTR szComputerName, { dwPid = 0; schSCManager = OpenSCManager(szComputerName, NULL, - SC_MANAGER_ALL_ACCESS); + GENERIC_READ); if (!schSCManager) { return FALSE; }