]> granicus.if.org Git - apache/commitdiff
Fix access for non-Administrators (superusers and the like) to allow them
authorWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 9 Jul 2002 17:13:48 +0000 (17:13 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 9 Jul 2002 17:13:48 +0000 (17:13 +0000)
  to start and stop services, even without full permission to create or
  remove installed services.

PR: 10460
Submitted by: "Mladen Turk" <mturk@mappingsoft.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95989 13f79535-47bb-0310-9956-ffa450edef68

support/win32/ApacheMonitor.c

index 52d86423b9474944d9a37ed69d58f3cca2b529d8..4fec6ff4789a959a640374962ba2f52b19e28760 100644 (file)
@@ -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;
         }