r7603: * fix a bug in the SERVICE_ALL_ACCESS security mask
authorGerald Carter <jerry@samba.org>
Wed, 15 Jun 2005 03:10:36 +0000 (03:10 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:57:15 +0000 (10:57 -0500)
* add calls to start and stop a service (to be filled
  in by the backend routines in services/svc_*.c
(This used to be commit 793d28a946d83beb2576c5c8ce808d32c71c880a)

source3/include/rpc_secdes.h
source3/include/rpc_svcctl.h
source3/rpc_server/srv_svcctl_nt.c
source3/services/svc_rcinit.c
source3/services/svc_spoolss.c

index fe95706d0308991b496e8c98624b3fa0592e4ceb..a14caf36c1ded7f9d14062403c5f1c29ac069271 100644 (file)
@@ -518,7 +518,8 @@ typedef struct standard_mapping {
 #define SERVICE_ALL_ACCESS \
        ( STANDARD_RIGHTS_REQUIRED_ACCESS       | \
          SERVICE_READ_ACCESS                   | \
-         SERVICE_EXECUTE_ACCESS )
+         SERVICE_EXECUTE_ACCESS                | \
+         SC_RIGHT_SVC_CHANGE_CONFIG )
 
           
 
index ede5d65565c4916b1c275c9d22735946746508cd..8ce2cbe404e845375ff460a8c0d5a9a5e86254f7 100644 (file)
@@ -204,7 +204,7 @@ typedef struct Service_info_struct {
  
 typedef struct {
        /* functions for enumerating subkeys and values */      
-       WERROR  (*stop_service)( void );
+       WERROR  (*stop_service)( SERVICE_STATUS *status );
        WERROR  (*start_service) ( void );
        WERROR  (*service_status)( SERVICE_STATUS *status );
 } SERVICE_CONTROL_OPS;
index e9f60e887c59db099a18e751ac69c5c5232383d9..c557036800071c5f5bb263313a71b7f99406443b 100644 (file)
@@ -496,6 +496,8 @@ WERROR _svcctl_start_service(pipes_struct *p, SVCCTL_Q_START_SERVICE *q_u, SVCCT
        if ( !(info->access_granted & SC_RIGHT_SVC_START) )
                return WERR_ACCESS_DENIED;
                
+       return info->ops->start_service();
+       
        return WERR_OK;
 }
 
@@ -518,6 +520,8 @@ WERROR _svcctl_control_service(pipes_struct *p, SVCCTL_Q_CONTROL_SERVICE *q_u, S
        if ( !(info->access_granted & SC_RIGHT_SVC_STOP) )
                return WERR_ACCESS_DENIED;
                
+       return info->ops->stop_service( &r_u->svc_status );
+               
 #if 0
        SERVICE_INFO *service_info;
        POLICY_HND   *handle;
@@ -582,8 +586,6 @@ WERROR _svcctl_control_service(pipes_struct *p, SVCCTL_Q_CONTROL_SERVICE *q_u, S
        DEBUG(10, ("_svcctl_query_service_config: Should call the commFound service [%s], [%s]\n",service_info->servicename,service_info->filename));
 
 #endif
-
-       return WERR_OK;
 }
 
 /********************************************************************
index a4046b351186c6c5a980aae83af596b9fb30c9f9..c856ae2a9955bead87b836cd99123e5088590970 100644 (file)
@@ -171,7 +171,7 @@ BOOL get_LSB_data(char *fname,Service_info *si )
 /*********************************************************************
 *********************************************************************/
 
-static WERROR rcinit_stop( void )
+static WERROR rcinit_stop( SERVICE_STATUS *service_status )
 {
        return WERR_OK;
 }
index 991bc0fbfd6da39cfcc530994a9bcce8077893ca..bd2f7173f1943cf173673682f583d446fe411bdc 100644 (file)
@@ -25,7 +25,7 @@
 /*********************************************************************
 *********************************************************************/
 
-static WERROR spoolss_stop( void )
+static WERROR spoolss_stop( SERVICE_STATUS *service_status )
 {
        return WERR_OK;
 }