summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_svcctl.c18
-rw-r--r--source3/rpc_server/srv_svcctl_nt.c20
2 files changed, 10 insertions, 28 deletions
diff --git a/source3/rpc_server/srv_svcctl.c b/source3/rpc_server/srv_svcctl.c
index 5f55593f6d..dd3a42235d 100644
--- a/source3/rpc_server/srv_svcctl.c
+++ b/source3/rpc_server/srv_svcctl.c
@@ -179,23 +179,7 @@ static bool api_svcctl_start_service(pipes_struct *p)
static bool api_svcctl_control_service(pipes_struct *p)
{
- SVCCTL_Q_CONTROL_SERVICE q_u;
- SVCCTL_R_CONTROL_SERVICE r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!svcctl_io_q_control_service("", &q_u, data, 0))
- return False;
-
- r_u.status = _svcctl_control_service(p, &q_u, &r_u);
-
- if(!svcctl_io_r_control_service("", &r_u, rdata, 0))
- return False;
-
- return True;
+ return proxy_svcctl_call(p, NDR_SVCCTL_CONTROLSERVICE);
}
/*******************************************************************
diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c
index 06637e4339..e8969c70ac 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -490,29 +490,33 @@ WERROR _svcctl_StartServiceW(pipes_struct *p,
}
/********************************************************************
+ _svcctl_ControlService
********************************************************************/
-WERROR _svcctl_control_service(pipes_struct *p, SVCCTL_Q_CONTROL_SERVICE *q_u, SVCCTL_R_CONTROL_SERVICE *r_u)
+WERROR _svcctl_ControlService(pipes_struct *p,
+ struct svcctl_ControlService *r)
{
- SERVICE_INFO *info = find_service_info_by_hnd( p, &q_u->handle );
+ SERVICE_INFO *info = find_service_info_by_hnd( p, r->in.handle );
/* perform access checks */
if ( !info || (info->type != SVC_HANDLE_IS_SERVICE) )
return WERR_BADFID;
- switch ( q_u->control ) {
+ switch ( r->in.control ) {
case SVCCTL_CONTROL_STOP:
if ( !(info->access_granted & SC_RIGHT_SVC_STOP) )
return WERR_ACCESS_DENIED;
- return info->ops->stop_service( info->name, &r_u->svc_status );
+ return info->ops->stop_service( info->name,
+ r->out.service_status );
case SVCCTL_CONTROL_INTERROGATE:
if ( !(info->access_granted & SC_RIGHT_SVC_QUERY_STATUS) )
return WERR_ACCESS_DENIED;
- return info->ops->service_status( info->name, &r_u->svc_status );
+ return info->ops->service_status( info->name,
+ r->out.service_status );
}
/* default control action */
@@ -888,12 +892,6 @@ WERROR _svcctl_set_service_sec( pipes_struct *p, SVCCTL_Q_SET_SERVICE_SEC *q_u,
}
-WERROR _svcctl_ControlService(pipes_struct *p, struct svcctl_ControlService *r)
-{
- p->rng_fault_state = True;
- return WERR_NOT_SUPPORTED;
-}
-
WERROR _svcctl_DeleteService(pipes_struct *p, struct svcctl_DeleteService *r)
{
p->rng_fault_state = True;