[SERVMAN]
authorEric Kohl <eric.kohl@reactos.org>
Thu, 26 May 2016 15:48:46 +0000 (15:48 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Thu, 26 May 2016 15:48:46 +0000 (15:48 +0000)
GetServiceConfig: Use only the required access rights. Makes servman usable for non-admin users.

svn path=/trunk/; revision=71408

reactos/base/applications/mscutils/servman/query.c

index f25987e..ff9f3a5 100644 (file)
@@ -35,12 +35,12 @@ GetServiceConfig(LPWSTR lpServiceName)
 
     hSCManager = OpenSCManagerW(NULL,
                                 NULL,
-                                SC_MANAGER_ALL_ACCESS);
+                                SC_MANAGER_CONNECT);
     if (hSCManager)
     {
         hService = OpenServiceW(hSCManager,
                                 lpServiceName,
-                                SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_QUERY_CONFIG);
+                                SERVICE_QUERY_CONFIG);
         if (hService)
         {
             if (!QueryServiceConfigW(hService,