diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2002-07-12 18:32:27 +0000 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2002-07-12 18:32:27 +0000 |
commit | e233befbcb725a433f5099d53d83dcdcb5d6105d (patch) | |
tree | 9e2e8098c1da2012624aa388a88f2665759af9cc /support | |
parent | e64ee27bbb675042144918588f19c35927f8981f (diff) | |
download | httpd-e233befbcb725a433f5099d53d83dcdcb5d6105d.tar.gz |
Use the bare minimum permissions required to perform a given service
manager operation.
Submitted by: David Shane Holden <dpejesh@yahoo.com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96036 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support')
-rw-r--r-- | support/win32/ApacheMonitor.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/support/win32/ApacheMonitor.c b/support/win32/ApacheMonitor.c index 4fec6ff478..3ae7da9220 100644 --- a/support/win32/ApacheMonitor.c +++ b/support/win32/ApacheMonitor.c @@ -780,13 +780,14 @@ BOOL ApacheManageService(LPCSTR szServiceName, LPCSTR szImagePath, else { schSCManager = OpenSCManager(szComputerName, NULL, - GENERIC_EXECUTE); + SC_MANAGER_CONNECT); if (!schSCManager) { return FALSE; } schService = OpenService(schSCManager, szServiceName, - GENERIC_EXECUTE); + SERVICE_QUERY_STATUS | SERVICE_START | + SERVICE_STOP | SERVICE_USER_DEFINED_CONTROL); if (schService != NULL) { retValue = FALSE; @@ -937,7 +938,7 @@ BOOL IsServiceRunning(LPCSTR szServiceName, LPCSTR szComputerName, { dwPid = 0; schSCManager = OpenSCManager(szComputerName, NULL, - GENERIC_READ); + SC_MANAGER_CONNECT); if (!schSCManager) { return FALSE; } |