]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Revert "Use pidl for _svcctl_EnumDependentServicesW()."
authorGünther Deschner <gd@samba.org>
Tue, 20 May 2008 09:23:13 +0000 (11:23 +0200)
committerGünther Deschner <gd@samba.org>
Tue, 20 May 2008 09:46:47 +0000 (11:46 +0200)
This reverts commit 988291a9c07c055213f8979ebe75bb392811008d.

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

index e3ff2cc8a05081c6282b267f1857c9c08be96814..5e125145d68be70dedd298c78dea209d49db993d 100644 (file)
@@ -131,7 +131,23 @@ static bool api_svcctl_query_service_status_ex(pipes_struct *p)
 
 static bool api_svcctl_enum_dependent_services(pipes_struct *p)
 {
-       return proxy_svcctl_call(p, NDR_SVCCTL_ENUMDEPENDENTSERVICESW);
+       SVCCTL_Q_ENUM_DEPENDENT_SERVICES q_u;
+       SVCCTL_R_ENUM_DEPENDENT_SERVICES 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_enum_dependent_services("", &q_u, data, 0))
+               return False;
+
+       r_u.status = _svcctl_enum_dependent_services(p, &q_u, &r_u);
+
+       if(!svcctl_io_r_enum_dependent_services("", &r_u, rdata, 0))
+               return False;
+
+       return True;
 }
 
 /*******************************************************************
index 6bb538a3115384a3c148287fbfcb5b69c238f6bd..446fa4b16f58a325f9fddbf5d1f783e524ee9416 100644 (file)
@@ -529,13 +529,11 @@ WERROR _svcctl_ControlService(pipes_struct *p,
 }
 
 /********************************************************************
- _svcctl_EnumDependentServicesW
 ********************************************************************/
 
-WERROR _svcctl_EnumDependentServicesW(pipes_struct *p,
-                                     struct svcctl_EnumDependentServicesW *r)
+WERROR _svcctl_enum_dependent_services( pipes_struct *p, SVCCTL_Q_ENUM_DEPENDENT_SERVICES *q_u, SVCCTL_R_ENUM_DEPENDENT_SERVICES *r_u )
 {
-       SERVICE_INFO *info = find_service_info_by_hnd( p, r->in.service );
+       SERVICE_INFO *info = find_service_info_by_hnd( p, &q_u->handle );
 
        /* perform access checks */
 
@@ -547,12 +545,13 @@ WERROR _svcctl_EnumDependentServicesW(pipes_struct *p,
 
        /* we have to set the outgoing buffer size to the same as the
           incoming buffer size (even in the case of failure */
-       /* this is done in the autogenerated server already - gd */
 
-       *r->out.bytes_needed = r->in.buf_size;
+       rpcbuf_init( &r_u->buffer, q_u->buffer_size, p->mem_ctx );
+
+       r_u->needed      = q_u->buffer_size;
 
        /* no dependent services...basically a stub function */
-       *r->out.services_returned = 0;
+       r_u->returned    = 0;
 
        return WERR_OK;
 }
@@ -951,6 +950,12 @@ WERROR _svcctl_CreateServiceW(pipes_struct *p, struct svcctl_CreateServiceW *r)
        return WERR_NOT_SUPPORTED;
 }
 
+WERROR _svcctl_EnumDependentServicesW(pipes_struct *p, struct svcctl_EnumDependentServicesW *r)
+{
+       p->rng_fault_state = True;
+       return WERR_NOT_SUPPORTED;
+}
+
 WERROR _svcctl_EnumServicesStatusW(pipes_struct *p, struct svcctl_EnumServicesStatusW *r)
 {
        p->rng_fault_state = True;