Use pidl for _svcctl_StartServiceW().
authorGünther Deschner <gd@samba.org>
Tue, 19 Feb 2008 01:28:46 +0000 (02:28 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 19 Feb 2008 02:12:11 +0000 (03:12 +0100)
Guenther

source/rpc_server/srv_svcctl.c
source/rpc_server/srv_svcctl_nt.c

index 84c986dbfb2247ee6ee6aa7f436329467f093f29..5f55593f6d394e92bff1e7f7b95859aaf6efe402 100644 (file)
@@ -171,23 +171,7 @@ static bool api_svcctl_enum_dependent_services(pipes_struct *p)
 
 static bool api_svcctl_start_service(pipes_struct *p)
 {
-       SVCCTL_Q_START_SERVICE q_u;
-       SVCCTL_R_START_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_start_service("", &q_u, data, 0))
-               return False;
-
-       r_u.status = _svcctl_start_service(p, &q_u, &r_u);
-
-       if(!svcctl_io_r_start_service("", &r_u, rdata, 0))
-               return False;
-
-       return True;
+       return proxy_svcctl_call(p, NDR_SVCCTL_STARTSERVICEW);
 }
 
 /*******************************************************************
index bdd0f4ffe33f1792823313b0bf117b6df6a91b19..06637e43399e9d84d2abeefac3624a5612b0c794 100644 (file)
@@ -470,11 +470,13 @@ WERROR _svcctl_enum_services_status(pipes_struct *p, SVCCTL_Q_ENUM_SERVICES_STAT
 }
 
 /********************************************************************
+ _svcctl_StartServiceW
 ********************************************************************/
 
-WERROR _svcctl_start_service(pipes_struct *p, SVCCTL_Q_START_SERVICE *q_u, SVCCTL_R_START_SERVICE *r_u)
+WERROR _svcctl_StartServiceW(pipes_struct *p,
+                            struct svcctl_StartServiceW *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 */
 
@@ -982,12 +984,6 @@ WERROR _svcctl_QueryServiceLockStatusW(pipes_struct *p, struct svcctl_QueryServi
        return WERR_NOT_SUPPORTED;
 }
 
-WERROR _svcctl_StartServiceW(pipes_struct *p, struct svcctl_StartServiceW *r)
-{
-       p->rng_fault_state = True;
-       return WERR_NOT_SUPPORTED;
-}
-
 WERROR _svcctl_GetServiceKeyNameW(pipes_struct *p, struct svcctl_GetServiceKeyNameW *r)
 {
        p->rng_fault_state = True;