summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-19 02:35:03 +0100
committerGünther Deschner <gd@samba.org>2008-02-19 03:12:46 +0100
commite87216972a01ac233e383674555b2a1ff5dfbaab (patch)
tree956b47c6704e449e357cba0fbefe71e6a6240d71 /source3/rpc_server
parenta750bbf1b8d0d2b48af6be40f8d505b5e0edd899 (diff)
downloadsamba-e87216972a01ac233e383674555b2a1ff5dfbaab.tar.gz
samba-e87216972a01ac233e383674555b2a1ff5dfbaab.tar.bz2
samba-e87216972a01ac233e383674555b2a1ff5dfbaab.zip
Use pidl for _svcctl_ControlService().
Guenther (This used to be commit 4797ca0bd5dc922f6ba5ebb93bf65ceee09a678e)
Diffstat (limited to 'source3/rpc_server')
-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;