summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2002-07-12 18:32:27 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2002-07-12 18:32:27 +0000
commite233befbcb725a433f5099d53d83dcdcb5d6105d (patch)
tree9e2e8098c1da2012624aa388a88f2665759af9cc /support
parente64ee27bbb675042144918588f19c35927f8981f (diff)
downloadhttpd-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.c7
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;
}