LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_srvsvc_scompat.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 283 1058 26.7 %
Date: 2024-04-21 15:09:00 Functions: 10 13 76.9 %

          Line data    Source code
       1             : /* s3 compat server functions auto-generated by pidl */
       2             : #include "bin/default/librpc/gen_ndr/ndr_srvsvc.h"
       3             : #include "bin/default/librpc/gen_ndr/ndr_srvsvc_scompat.h"
       4             : #include <librpc/rpc/dcesrv_core.h>
       5             : #include <rpc_server/rpc_config.h>
       6             : #include <rpc_server/rpc_server.h>
       7             : #include <util/debug.h>
       8             : 
       9             : enum s3compat_rpc_dispatch {
      10             :         S3COMPAT_RPC_DISPATCH_EXTERNAL = 0x00000001,
      11             :         S3COMPAT_RPC_DISPATCH_INTERNAL = 0x00000002,
      12             : };
      13             : 
      14             : /* srvsvc - dcerpc server boilerplate generated by pidl */
      15         260 : static NTSTATUS srvsvc__op_bind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
      16             : {
      17             : #ifdef DCESRV_INTERFACE_SRVSVC_BIND
      18             :         return DCESRV_INTERFACE_SRVSVC_BIND(context,iface);
      19             : #else
      20         260 :         return NT_STATUS_OK;
      21             : #endif
      22             : }
      23             : 
      24         260 : static void srvsvc__op_unbind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
      25             : {
      26             : #ifdef DCESRV_INTERFACE_SRVSVC_UNBIND
      27             :         DCESRV_INTERFACE_SRVSVC_UNBIND(context, iface);
      28             : #else
      29         260 :         return;
      30             : #endif
      31             : }
      32             : 
      33       12836 : NTSTATUS srvsvc__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
      34             : {
      35           0 :         enum ndr_err_code ndr_err;
      36       12836 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
      37             : 
      38       12836 :         dce_call->fault_code = 0;
      39             : 
      40       12836 :         if (opnum >= ndr_table_srvsvc.num_calls) {
      41           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
      42           0 :                 return NT_STATUS_NET_WRITE_FAULT;
      43             :         }
      44             : 
      45       12836 :         *r = talloc_named(mem_ctx, ndr_table_srvsvc.calls[opnum].struct_size, "struct %s", ndr_table_srvsvc.calls[opnum].name);
      46       12836 :         NT_STATUS_HAVE_NO_MEMORY(*r);
      47             : 
      48             :         /* unravel the NDR for the packet */
      49       12836 :         ndr_err = ndr_table_srvsvc.calls[opnum].ndr_pull(pull, NDR_IN, *r);
      50       12836 :         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
      51           0 :                 dce_call->fault_code = DCERPC_FAULT_NDR;
      52           0 :                 return NT_STATUS_NET_WRITE_FAULT;
      53             :         }
      54             : 
      55       12836 :         return NT_STATUS_OK;
      56             : }
      57             : 
      58       12836 : static NTSTATUS srvsvc__op_dispatch_internal(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r, enum s3compat_rpc_dispatch dispatch)
      59             : {
      60       12836 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
      61       12836 :         struct pipes_struct *p = NULL;
      62       12836 :         NTSTATUS status = NT_STATUS_OK;
      63       12836 :         bool impersonated = false;
      64             : 
      65             :         /* Retrieve pipes struct */
      66       12836 :         p = dcesrv_get_pipes_struct(dce_call->conn);
      67       12836 :         p->dce_call = dce_call;
      68       12836 :         p->mem_ctx = mem_ctx;
      69             :         /* Reset pipes struct fault state */
      70       12836 :         p->fault_state = 0;
      71             : 
      72             :         /* Impersonate */
      73       12836 :         if (dispatch == S3COMPAT_RPC_DISPATCH_EXTERNAL) {
      74       12836 :                 impersonated = become_authenticated_pipe_user(dce_call->auth_state->session_info);
      75       12836 :                 if (!impersonated) {
      76           0 :                         dce_call->fault_code = DCERPC_FAULT_ACCESS_DENIED;
      77           0 :                         status = NT_STATUS_NET_WRITE_FAULT;
      78           0 :                         goto fail;
      79             :                 }
      80             :         }
      81             : 
      82       12836 :         switch (opnum) {
      83           4 :         case 0: { /* srvsvc_NetCharDevEnum */
      84           4 :                 struct srvsvc_NetCharDevEnum *r2 = (struct srvsvc_NetCharDevEnum *)r;
      85           4 :                 if (DEBUGLEVEL >= 10) {
      86           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevEnum, NDR_IN, r2);
      87             :                 }
      88           4 :                 NDR_ZERO_STRUCT(r2->out);
      89           4 :                 r2->out.info_ctr = r2->in.info_ctr;
      90           4 :                 r2->out.resume_handle = r2->in.resume_handle;
      91           4 :                 r2->out.totalentries = talloc_zero(r2, uint32_t);
      92           4 :                 if (r2->out.totalentries == NULL) {
      93           0 :                         status = NT_STATUS_NO_MEMORY;
      94           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
      95           0 :                         goto fail;
      96             :                 }
      97             : 
      98           4 :                 r2->out.result = _srvsvc_NetCharDevEnum(p, r2);
      99           4 :                 break;
     100             :         }
     101           0 :         case 1: { /* srvsvc_NetCharDevGetInfo */
     102           0 :                 struct srvsvc_NetCharDevGetInfo *r2 = (struct srvsvc_NetCharDevGetInfo *)r;
     103           0 :                 if (DEBUGLEVEL >= 10) {
     104           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevGetInfo, NDR_IN, r2);
     105             :                 }
     106           0 :                 NDR_ZERO_STRUCT(r2->out);
     107           0 :                 r2->out.info = talloc_zero(r2, union srvsvc_NetCharDevInfo);
     108           0 :                 if (r2->out.info == NULL) {
     109           0 :                         status = NT_STATUS_NO_MEMORY;
     110           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     111           0 :                         goto fail;
     112             :                 }
     113             : 
     114           0 :                 r2->out.result = _srvsvc_NetCharDevGetInfo(p, r2);
     115           0 :                 break;
     116             :         }
     117           0 :         case 2: { /* srvsvc_NetCharDevControl */
     118           0 :                 struct srvsvc_NetCharDevControl *r2 = (struct srvsvc_NetCharDevControl *)r;
     119           0 :                 if (DEBUGLEVEL >= 10) {
     120           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevControl, NDR_IN, r2);
     121             :                 }
     122           0 :                 r2->out.result = _srvsvc_NetCharDevControl(p, r2);
     123           0 :                 break;
     124             :         }
     125           4 :         case 3: { /* srvsvc_NetCharDevQEnum */
     126           4 :                 struct srvsvc_NetCharDevQEnum *r2 = (struct srvsvc_NetCharDevQEnum *)r;
     127           4 :                 if (DEBUGLEVEL >= 10) {
     128           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevQEnum, NDR_IN, r2);
     129             :                 }
     130           4 :                 NDR_ZERO_STRUCT(r2->out);
     131           4 :                 r2->out.info_ctr = r2->in.info_ctr;
     132           4 :                 r2->out.resume_handle = r2->in.resume_handle;
     133           4 :                 r2->out.totalentries = talloc_zero(r2, uint32_t);
     134           4 :                 if (r2->out.totalentries == NULL) {
     135           0 :                         status = NT_STATUS_NO_MEMORY;
     136           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     137           0 :                         goto fail;
     138             :                 }
     139             : 
     140           4 :                 r2->out.result = _srvsvc_NetCharDevQEnum(p, r2);
     141           4 :                 break;
     142             :         }
     143           0 :         case 4: { /* srvsvc_NetCharDevQGetInfo */
     144           0 :                 struct srvsvc_NetCharDevQGetInfo *r2 = (struct srvsvc_NetCharDevQGetInfo *)r;
     145           0 :                 if (DEBUGLEVEL >= 10) {
     146           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevQGetInfo, NDR_IN, r2);
     147             :                 }
     148           0 :                 NDR_ZERO_STRUCT(r2->out);
     149           0 :                 r2->out.info = talloc_zero(r2, union srvsvc_NetCharDevQInfo);
     150           0 :                 if (r2->out.info == NULL) {
     151           0 :                         status = NT_STATUS_NO_MEMORY;
     152           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     153           0 :                         goto fail;
     154             :                 }
     155             : 
     156           0 :                 r2->out.result = _srvsvc_NetCharDevQGetInfo(p, r2);
     157           0 :                 break;
     158             :         }
     159           0 :         case 5: { /* srvsvc_NetCharDevQSetInfo */
     160           0 :                 struct srvsvc_NetCharDevQSetInfo *r2 = (struct srvsvc_NetCharDevQSetInfo *)r;
     161           0 :                 if (DEBUGLEVEL >= 10) {
     162           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevQSetInfo, NDR_IN, r2);
     163             :                 }
     164           0 :                 NDR_ZERO_STRUCT(r2->out);
     165           0 :                 r2->out.parm_error = r2->in.parm_error;
     166           0 :                 r2->out.result = _srvsvc_NetCharDevQSetInfo(p, r2);
     167           0 :                 break;
     168             :         }
     169           0 :         case 6: { /* srvsvc_NetCharDevQPurge */
     170           0 :                 struct srvsvc_NetCharDevQPurge *r2 = (struct srvsvc_NetCharDevQPurge *)r;
     171           0 :                 if (DEBUGLEVEL >= 10) {
     172           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevQPurge, NDR_IN, r2);
     173             :                 }
     174           0 :                 r2->out.result = _srvsvc_NetCharDevQPurge(p, r2);
     175           0 :                 break;
     176             :         }
     177           0 :         case 7: { /* srvsvc_NetCharDevQPurgeSelf */
     178           0 :                 struct srvsvc_NetCharDevQPurgeSelf *r2 = (struct srvsvc_NetCharDevQPurgeSelf *)r;
     179           0 :                 if (DEBUGLEVEL >= 10) {
     180           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevQPurgeSelf, NDR_IN, r2);
     181             :                 }
     182           0 :                 r2->out.result = _srvsvc_NetCharDevQPurgeSelf(p, r2);
     183           0 :                 break;
     184             :         }
     185           8 :         case 8: { /* srvsvc_NetConnEnum */
     186           8 :                 struct srvsvc_NetConnEnum *r2 = (struct srvsvc_NetConnEnum *)r;
     187           8 :                 if (DEBUGLEVEL >= 10) {
     188           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetConnEnum, NDR_IN, r2);
     189             :                 }
     190           8 :                 NDR_ZERO_STRUCT(r2->out);
     191           8 :                 r2->out.info_ctr = r2->in.info_ctr;
     192           8 :                 r2->out.resume_handle = r2->in.resume_handle;
     193           8 :                 r2->out.totalentries = talloc_zero(r2, uint32_t);
     194           8 :                 if (r2->out.totalentries == NULL) {
     195           0 :                         status = NT_STATUS_NO_MEMORY;
     196           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     197           0 :                         goto fail;
     198             :                 }
     199             : 
     200           8 :                 r2->out.result = _srvsvc_NetConnEnum(p, r2);
     201           8 :                 break;
     202             :         }
     203          10 :         case 9: { /* srvsvc_NetFileEnum */
     204          10 :                 struct srvsvc_NetFileEnum *r2 = (struct srvsvc_NetFileEnum *)r;
     205          10 :                 if (DEBUGLEVEL >= 10) {
     206           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetFileEnum, NDR_IN, r2);
     207             :                 }
     208          10 :                 NDR_ZERO_STRUCT(r2->out);
     209          10 :                 r2->out.info_ctr = r2->in.info_ctr;
     210          10 :                 r2->out.resume_handle = r2->in.resume_handle;
     211          10 :                 r2->out.totalentries = talloc_zero(r2, uint32_t);
     212          10 :                 if (r2->out.totalentries == NULL) {
     213           0 :                         status = NT_STATUS_NO_MEMORY;
     214           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     215           0 :                         goto fail;
     216             :                 }
     217             : 
     218          10 :                 r2->out.result = _srvsvc_NetFileEnum(p, r2);
     219          10 :                 break;
     220             :         }
     221           0 :         case 10: { /* srvsvc_NetFileGetInfo */
     222           0 :                 struct srvsvc_NetFileGetInfo *r2 = (struct srvsvc_NetFileGetInfo *)r;
     223           0 :                 if (DEBUGLEVEL >= 10) {
     224           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetFileGetInfo, NDR_IN, r2);
     225             :                 }
     226           0 :                 NDR_ZERO_STRUCT(r2->out);
     227           0 :                 r2->out.info = talloc_zero(r2, union srvsvc_NetFileInfo);
     228           0 :                 if (r2->out.info == NULL) {
     229           0 :                         status = NT_STATUS_NO_MEMORY;
     230           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     231           0 :                         goto fail;
     232             :                 }
     233             : 
     234           0 :                 r2->out.result = _srvsvc_NetFileGetInfo(p, r2);
     235           0 :                 break;
     236             :         }
     237           0 :         case 11: { /* srvsvc_NetFileClose */
     238           0 :                 struct srvsvc_NetFileClose *r2 = (struct srvsvc_NetFileClose *)r;
     239           0 :                 if (DEBUGLEVEL >= 10) {
     240           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetFileClose, NDR_IN, r2);
     241             :                 }
     242           0 :                 r2->out.result = _srvsvc_NetFileClose(p, r2);
     243           0 :                 break;
     244             :         }
     245          34 :         case 12: { /* srvsvc_NetSessEnum */
     246          34 :                 struct srvsvc_NetSessEnum *r2 = (struct srvsvc_NetSessEnum *)r;
     247          34 :                 if (DEBUGLEVEL >= 10) {
     248           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetSessEnum, NDR_IN, r2);
     249             :                 }
     250          34 :                 NDR_ZERO_STRUCT(r2->out);
     251          34 :                 r2->out.info_ctr = r2->in.info_ctr;
     252          34 :                 r2->out.resume_handle = r2->in.resume_handle;
     253          34 :                 r2->out.totalentries = talloc_zero(r2, uint32_t);
     254          34 :                 if (r2->out.totalentries == NULL) {
     255           0 :                         status = NT_STATUS_NO_MEMORY;
     256           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     257           0 :                         goto fail;
     258             :                 }
     259             : 
     260          34 :                 r2->out.result = _srvsvc_NetSessEnum(p, r2);
     261          34 :                 break;
     262             :         }
     263           0 :         case 13: { /* srvsvc_NetSessDel */
     264           0 :                 struct srvsvc_NetSessDel *r2 = (struct srvsvc_NetSessDel *)r;
     265           0 :                 if (DEBUGLEVEL >= 10) {
     266           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetSessDel, NDR_IN, r2);
     267             :                 }
     268           0 :                 r2->out.result = _srvsvc_NetSessDel(p, r2);
     269           0 :                 break;
     270             :         }
     271           4 :         case 14: { /* srvsvc_NetShareAdd */
     272           4 :                 struct srvsvc_NetShareAdd *r2 = (struct srvsvc_NetShareAdd *)r;
     273           4 :                 if (DEBUGLEVEL >= 10) {
     274           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareAdd, NDR_IN, r2);
     275             :                 }
     276           4 :                 NDR_ZERO_STRUCT(r2->out);
     277           4 :                 r2->out.parm_error = r2->in.parm_error;
     278           4 :                 r2->out.result = _srvsvc_NetShareAdd(p, r2);
     279           4 :                 break;
     280             :         }
     281         142 :         case 15: { /* srvsvc_NetShareEnumAll */
     282         142 :                 struct srvsvc_NetShareEnumAll *r2 = (struct srvsvc_NetShareEnumAll *)r;
     283         142 :                 if (DEBUGLEVEL >= 10) {
     284           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareEnumAll, NDR_IN, r2);
     285             :                 }
     286         142 :                 NDR_ZERO_STRUCT(r2->out);
     287         142 :                 r2->out.info_ctr = r2->in.info_ctr;
     288         142 :                 r2->out.resume_handle = r2->in.resume_handle;
     289         142 :                 r2->out.totalentries = talloc_zero(r2, uint32_t);
     290         142 :                 if (r2->out.totalentries == NULL) {
     291           0 :                         status = NT_STATUS_NO_MEMORY;
     292           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     293           0 :                         goto fail;
     294             :                 }
     295             : 
     296         142 :                 r2->out.result = _srvsvc_NetShareEnumAll(p, r2);
     297         142 :                 break;
     298             :         }
     299        1319 :         case 16: { /* srvsvc_NetShareGetInfo */
     300        1319 :                 struct srvsvc_NetShareGetInfo *r2 = (struct srvsvc_NetShareGetInfo *)r;
     301        1319 :                 if (DEBUGLEVEL >= 10) {
     302           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareGetInfo, NDR_IN, r2);
     303             :                 }
     304        1319 :                 NDR_ZERO_STRUCT(r2->out);
     305        1319 :                 r2->out.info = talloc_zero(r2, union srvsvc_NetShareInfo);
     306        1319 :                 if (r2->out.info == NULL) {
     307           0 :                         status = NT_STATUS_NO_MEMORY;
     308           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     309           0 :                         goto fail;
     310             :                 }
     311             : 
     312        1319 :                 r2->out.result = _srvsvc_NetShareGetInfo(p, r2);
     313        1319 :                 break;
     314             :         }
     315          33 :         case 17: { /* srvsvc_NetShareSetInfo */
     316          33 :                 struct srvsvc_NetShareSetInfo *r2 = (struct srvsvc_NetShareSetInfo *)r;
     317          33 :                 if (DEBUGLEVEL >= 10) {
     318           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareSetInfo, NDR_IN, r2);
     319             :                 }
     320          33 :                 NDR_ZERO_STRUCT(r2->out);
     321          33 :                 r2->out.parm_error = r2->in.parm_error;
     322          33 :                 r2->out.result = _srvsvc_NetShareSetInfo(p, r2);
     323          33 :                 break;
     324             :         }
     325           4 :         case 18: { /* srvsvc_NetShareDel */
     326           4 :                 struct srvsvc_NetShareDel *r2 = (struct srvsvc_NetShareDel *)r;
     327           4 :                 if (DEBUGLEVEL >= 10) {
     328           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareDel, NDR_IN, r2);
     329             :                 }
     330           4 :                 r2->out.result = _srvsvc_NetShareDel(p, r2);
     331           4 :                 break;
     332             :         }
     333           0 :         case 19: { /* srvsvc_NetShareDelSticky */
     334           0 :                 struct srvsvc_NetShareDelSticky *r2 = (struct srvsvc_NetShareDelSticky *)r;
     335           0 :                 if (DEBUGLEVEL >= 10) {
     336           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareDelSticky, NDR_IN, r2);
     337             :                 }
     338           0 :                 r2->out.result = _srvsvc_NetShareDelSticky(p, r2);
     339           0 :                 break;
     340             :         }
     341           8 :         case 20: { /* srvsvc_NetShareCheck */
     342           8 :                 struct srvsvc_NetShareCheck *r2 = (struct srvsvc_NetShareCheck *)r;
     343           8 :                 if (DEBUGLEVEL >= 10) {
     344           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareCheck, NDR_IN, r2);
     345             :                 }
     346           8 :                 NDR_ZERO_STRUCT(r2->out);
     347           8 :                 r2->out.type = talloc_zero(r2, enum srvsvc_ShareType);
     348           8 :                 if (r2->out.type == NULL) {
     349           0 :                         status = NT_STATUS_NO_MEMORY;
     350           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     351           0 :                         goto fail;
     352             :                 }
     353             : 
     354           8 :                 r2->out.result = _srvsvc_NetShareCheck(p, r2);
     355           8 :                 break;
     356             :         }
     357          48 :         case 21: { /* srvsvc_NetSrvGetInfo */
     358          48 :                 struct srvsvc_NetSrvGetInfo *r2 = (struct srvsvc_NetSrvGetInfo *)r;
     359          48 :                 if (DEBUGLEVEL >= 10) {
     360           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetSrvGetInfo, NDR_IN, r2);
     361             :                 }
     362          48 :                 NDR_ZERO_STRUCT(r2->out);
     363          48 :                 r2->out.info = talloc_zero(r2, union srvsvc_NetSrvInfo);
     364          48 :                 if (r2->out.info == NULL) {
     365           0 :                         status = NT_STATUS_NO_MEMORY;
     366           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     367           0 :                         goto fail;
     368             :                 }
     369             : 
     370          48 :                 r2->out.result = _srvsvc_NetSrvGetInfo(p, r2);
     371          48 :                 break;
     372             :         }
     373           0 :         case 22: { /* srvsvc_NetSrvSetInfo */
     374           0 :                 struct srvsvc_NetSrvSetInfo *r2 = (struct srvsvc_NetSrvSetInfo *)r;
     375           0 :                 if (DEBUGLEVEL >= 10) {
     376           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetSrvSetInfo, NDR_IN, r2);
     377             :                 }
     378           0 :                 NDR_ZERO_STRUCT(r2->out);
     379           0 :                 r2->out.parm_error = r2->in.parm_error;
     380           0 :                 r2->out.result = _srvsvc_NetSrvSetInfo(p, r2);
     381           0 :                 break;
     382             :         }
     383           4 :         case 23: { /* srvsvc_NetDiskEnum */
     384           4 :                 struct srvsvc_NetDiskEnum *r2 = (struct srvsvc_NetDiskEnum *)r;
     385           4 :                 if (DEBUGLEVEL >= 10) {
     386           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetDiskEnum, NDR_IN, r2);
     387             :                 }
     388           4 :                 NDR_ZERO_STRUCT(r2->out);
     389           4 :                 r2->out.info = r2->in.info;
     390           4 :                 r2->out.resume_handle = r2->in.resume_handle;
     391           4 :                 r2->out.totalentries = talloc_zero(r2, uint32_t);
     392           4 :                 if (r2->out.totalentries == NULL) {
     393           0 :                         status = NT_STATUS_NO_MEMORY;
     394           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     395           0 :                         goto fail;
     396             :                 }
     397             : 
     398           4 :                 r2->out.result = _srvsvc_NetDiskEnum(p, r2);
     399           4 :                 break;
     400             :         }
     401           0 :         case 24: { /* srvsvc_NetServerStatisticsGet */
     402           0 :                 struct srvsvc_NetServerStatisticsGet *r2 = (struct srvsvc_NetServerStatisticsGet *)r;
     403           0 :                 if (DEBUGLEVEL >= 10) {
     404           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetServerStatisticsGet, NDR_IN, r2);
     405             :                 }
     406           0 :                 NDR_ZERO_STRUCT(r2->out);
     407           0 :                 r2->out.stats = talloc_zero(r2, struct srvsvc_Statistics *);
     408           0 :                 if (r2->out.stats == NULL) {
     409           0 :                         status = NT_STATUS_NO_MEMORY;
     410           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     411           0 :                         goto fail;
     412             :                 }
     413             : 
     414           0 :                 r2->out.result = _srvsvc_NetServerStatisticsGet(p, r2);
     415           0 :                 break;
     416             :         }
     417           0 :         case 25: { /* srvsvc_NetTransportAdd */
     418           0 :                 struct srvsvc_NetTransportAdd *r2 = (struct srvsvc_NetTransportAdd *)r;
     419           0 :                 if (DEBUGLEVEL >= 10) {
     420           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetTransportAdd, NDR_IN, r2);
     421             :                 }
     422           0 :                 r2->out.result = _srvsvc_NetTransportAdd(p, r2);
     423           0 :                 break;
     424             :         }
     425           4 :         case 26: { /* srvsvc_NetTransportEnum */
     426           4 :                 struct srvsvc_NetTransportEnum *r2 = (struct srvsvc_NetTransportEnum *)r;
     427           4 :                 if (DEBUGLEVEL >= 10) {
     428           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetTransportEnum, NDR_IN, r2);
     429             :                 }
     430           4 :                 NDR_ZERO_STRUCT(r2->out);
     431           4 :                 r2->out.transports = r2->in.transports;
     432           4 :                 r2->out.resume_handle = r2->in.resume_handle;
     433           4 :                 r2->out.totalentries = talloc_zero(r2, uint32_t);
     434           4 :                 if (r2->out.totalentries == NULL) {
     435           0 :                         status = NT_STATUS_NO_MEMORY;
     436           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     437           0 :                         goto fail;
     438             :                 }
     439             : 
     440           4 :                 r2->out.result = _srvsvc_NetTransportEnum(p, r2);
     441           4 :                 break;
     442             :         }
     443           0 :         case 27: { /* srvsvc_NetTransportDel */
     444           0 :                 struct srvsvc_NetTransportDel *r2 = (struct srvsvc_NetTransportDel *)r;
     445           0 :                 if (DEBUGLEVEL >= 10) {
     446           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetTransportDel, NDR_IN, r2);
     447             :                 }
     448           0 :                 r2->out.result = _srvsvc_NetTransportDel(p, r2);
     449           0 :                 break;
     450             :         }
     451           8 :         case 28: { /* srvsvc_NetRemoteTOD */
     452           8 :                 struct srvsvc_NetRemoteTOD *r2 = (struct srvsvc_NetRemoteTOD *)r;
     453           8 :                 if (DEBUGLEVEL >= 10) {
     454           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetRemoteTOD, NDR_IN, r2);
     455             :                 }
     456           8 :                 NDR_ZERO_STRUCT(r2->out);
     457           8 :                 r2->out.info = talloc_zero(r2, struct srvsvc_NetRemoteTODInfo *);
     458           8 :                 if (r2->out.info == NULL) {
     459           0 :                         status = NT_STATUS_NO_MEMORY;
     460           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     461           0 :                         goto fail;
     462             :                 }
     463             : 
     464           8 :                 r2->out.result = _srvsvc_NetRemoteTOD(p, r2);
     465           8 :                 break;
     466             :         }
     467           0 :         case 29: { /* srvsvc_NetSetServiceBits */
     468           0 :                 struct srvsvc_NetSetServiceBits *r2 = (struct srvsvc_NetSetServiceBits *)r;
     469           0 :                 if (DEBUGLEVEL >= 10) {
     470           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetSetServiceBits, NDR_IN, r2);
     471             :                 }
     472           0 :                 r2->out.result = _srvsvc_NetSetServiceBits(p, r2);
     473           0 :                 break;
     474             :         }
     475           0 :         case 30: { /* srvsvc_NetPathType */
     476           0 :                 struct srvsvc_NetPathType *r2 = (struct srvsvc_NetPathType *)r;
     477           0 :                 if (DEBUGLEVEL >= 10) {
     478           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetPathType, NDR_IN, r2);
     479             :                 }
     480           0 :                 NDR_ZERO_STRUCT(r2->out);
     481           0 :                 r2->out.pathtype = talloc_zero(r2, uint32_t);
     482           0 :                 if (r2->out.pathtype == NULL) {
     483           0 :                         status = NT_STATUS_NO_MEMORY;
     484           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     485           0 :                         goto fail;
     486             :                 }
     487             : 
     488           0 :                 r2->out.result = _srvsvc_NetPathType(p, r2);
     489           0 :                 break;
     490             :         }
     491           0 :         case 31: { /* srvsvc_NetPathCanonicalize */
     492           0 :                 struct srvsvc_NetPathCanonicalize *r2 = (struct srvsvc_NetPathCanonicalize *)r;
     493           0 :                 if (DEBUGLEVEL >= 10) {
     494           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetPathCanonicalize, NDR_IN, r2);
     495             :                 }
     496           0 :                 NDR_ZERO_STRUCT(r2->out);
     497           0 :                 r2->out.pathtype = r2->in.pathtype;
     498           0 :                 r2->out.can_path = talloc_zero_array(r2, uint8_t, r2->in.maxbuf);
     499           0 :                 if (r2->out.can_path == NULL) {
     500           0 :                         status = NT_STATUS_NO_MEMORY;
     501           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     502           0 :                         goto fail;
     503             :                 }
     504             : 
     505           0 :                 r2->out.result = _srvsvc_NetPathCanonicalize(p, r2);
     506           0 :                 break;
     507             :         }
     508           0 :         case 32: { /* srvsvc_NetPathCompare */
     509           0 :                 struct srvsvc_NetPathCompare *r2 = (struct srvsvc_NetPathCompare *)r;
     510           0 :                 if (DEBUGLEVEL >= 10) {
     511           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetPathCompare, NDR_IN, r2);
     512             :                 }
     513           0 :                 r2->out.result = _srvsvc_NetPathCompare(p, r2);
     514           0 :                 break;
     515             :         }
     516       11128 :         case 33: { /* srvsvc_NetNameValidate */
     517       11128 :                 struct srvsvc_NetNameValidate *r2 = (struct srvsvc_NetNameValidate *)r;
     518       11128 :                 if (DEBUGLEVEL >= 10) {
     519           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetNameValidate, NDR_IN, r2);
     520             :                 }
     521       11128 :                 r2->out.result = _srvsvc_NetNameValidate(p, r2);
     522       11128 :                 break;
     523             :         }
     524           0 :         case 34: { /* srvsvc_NETRPRNAMECANONICALIZE */
     525           0 :                 struct srvsvc_NETRPRNAMECANONICALIZE *r2 = (struct srvsvc_NETRPRNAMECANONICALIZE *)r;
     526           0 :                 if (DEBUGLEVEL >= 10) {
     527           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, NDR_IN, r2);
     528             :                 }
     529           0 :                 r2->out.result = _srvsvc_NETRPRNAMECANONICALIZE(p, r2);
     530           0 :                 break;
     531             :         }
     532           0 :         case 35: { /* srvsvc_NetPRNameCompare */
     533           0 :                 struct srvsvc_NetPRNameCompare *r2 = (struct srvsvc_NetPRNameCompare *)r;
     534           0 :                 if (DEBUGLEVEL >= 10) {
     535           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetPRNameCompare, NDR_IN, r2);
     536             :                 }
     537           0 :                 r2->out.result = _srvsvc_NetPRNameCompare(p, r2);
     538           0 :                 break;
     539             :         }
     540          74 :         case 36: { /* srvsvc_NetShareEnum */
     541          74 :                 struct srvsvc_NetShareEnum *r2 = (struct srvsvc_NetShareEnum *)r;
     542          74 :                 if (DEBUGLEVEL >= 10) {
     543           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareEnum, NDR_IN, r2);
     544             :                 }
     545          74 :                 NDR_ZERO_STRUCT(r2->out);
     546          74 :                 r2->out.info_ctr = r2->in.info_ctr;
     547          74 :                 r2->out.resume_handle = r2->in.resume_handle;
     548          74 :                 r2->out.totalentries = talloc_zero(r2, uint32_t);
     549          74 :                 if (r2->out.totalentries == NULL) {
     550           0 :                         status = NT_STATUS_NO_MEMORY;
     551           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     552           0 :                         goto fail;
     553             :                 }
     554             : 
     555          74 :                 r2->out.result = _srvsvc_NetShareEnum(p, r2);
     556          74 :                 break;
     557             :         }
     558           0 :         case 37: { /* srvsvc_NetShareDelStart */
     559           0 :                 struct srvsvc_NetShareDelStart *r2 = (struct srvsvc_NetShareDelStart *)r;
     560           0 :                 if (DEBUGLEVEL >= 10) {
     561           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareDelStart, NDR_IN, r2);
     562             :                 }
     563           0 :                 NDR_ZERO_STRUCT(r2->out);
     564           0 :                 r2->out.hnd = talloc_zero(r2, struct policy_handle);
     565           0 :                 if (r2->out.hnd == NULL) {
     566           0 :                         status = NT_STATUS_NO_MEMORY;
     567           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     568           0 :                         goto fail;
     569             :                 }
     570             : 
     571           0 :                 r2->out.result = _srvsvc_NetShareDelStart(p, r2);
     572           0 :                 break;
     573             :         }
     574           0 :         case 38: { /* srvsvc_NetShareDelCommit */
     575           0 :                 struct srvsvc_NetShareDelCommit *r2 = (struct srvsvc_NetShareDelCommit *)r;
     576           0 :                 if (DEBUGLEVEL >= 10) {
     577           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareDelCommit, NDR_IN, r2);
     578             :                 }
     579           0 :                 NDR_ZERO_STRUCT(r2->out);
     580           0 :                 r2->out.hnd = r2->in.hnd;
     581           0 :                 r2->out.result = _srvsvc_NetShareDelCommit(p, r2);
     582           0 :                 break;
     583             :         }
     584           0 :         case 39: { /* srvsvc_NetGetFileSecurity */
     585           0 :                 struct srvsvc_NetGetFileSecurity *r2 = (struct srvsvc_NetGetFileSecurity *)r;
     586           0 :                 if (DEBUGLEVEL >= 10) {
     587           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetGetFileSecurity, NDR_IN, r2);
     588             :                 }
     589           0 :                 NDR_ZERO_STRUCT(r2->out);
     590           0 :                 r2->out.sd_buf = talloc_zero(r2, struct sec_desc_buf *);
     591           0 :                 if (r2->out.sd_buf == NULL) {
     592           0 :                         status = NT_STATUS_NO_MEMORY;
     593           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     594           0 :                         goto fail;
     595             :                 }
     596             : 
     597           0 :                 r2->out.result = _srvsvc_NetGetFileSecurity(p, r2);
     598           0 :                 break;
     599             :         }
     600           0 :         case 40: { /* srvsvc_NetSetFileSecurity */
     601           0 :                 struct srvsvc_NetSetFileSecurity *r2 = (struct srvsvc_NetSetFileSecurity *)r;
     602           0 :                 if (DEBUGLEVEL >= 10) {
     603           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetSetFileSecurity, NDR_IN, r2);
     604             :                 }
     605           0 :                 r2->out.result = _srvsvc_NetSetFileSecurity(p, r2);
     606           0 :                 break;
     607             :         }
     608           0 :         case 41: { /* srvsvc_NetServerTransportAddEx */
     609           0 :                 struct srvsvc_NetServerTransportAddEx *r2 = (struct srvsvc_NetServerTransportAddEx *)r;
     610           0 :                 if (DEBUGLEVEL >= 10) {
     611           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetServerTransportAddEx, NDR_IN, r2);
     612             :                 }
     613           0 :                 r2->out.result = _srvsvc_NetServerTransportAddEx(p, r2);
     614           0 :                 break;
     615             :         }
     616           0 :         case 42: { /* srvsvc_NetServerSetServiceBitsEx */
     617           0 :                 struct srvsvc_NetServerSetServiceBitsEx *r2 = (struct srvsvc_NetServerSetServiceBitsEx *)r;
     618           0 :                 if (DEBUGLEVEL >= 10) {
     619           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetServerSetServiceBitsEx, NDR_IN, r2);
     620             :                 }
     621           0 :                 r2->out.result = _srvsvc_NetServerSetServiceBitsEx(p, r2);
     622           0 :                 break;
     623             :         }
     624           0 :         case 43: { /* srvsvc_NETRDFSGETVERSION */
     625           0 :                 struct srvsvc_NETRDFSGETVERSION *r2 = (struct srvsvc_NETRDFSGETVERSION *)r;
     626           0 :                 if (DEBUGLEVEL >= 10) {
     627           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSGETVERSION, NDR_IN, r2);
     628             :                 }
     629           0 :                 r2->out.result = _srvsvc_NETRDFSGETVERSION(p, r2);
     630           0 :                 break;
     631             :         }
     632           0 :         case 44: { /* srvsvc_NETRDFSCREATELOCALPARTITION */
     633           0 :                 struct srvsvc_NETRDFSCREATELOCALPARTITION *r2 = (struct srvsvc_NETRDFSCREATELOCALPARTITION *)r;
     634           0 :                 if (DEBUGLEVEL >= 10) {
     635           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, NDR_IN, r2);
     636             :                 }
     637           0 :                 r2->out.result = _srvsvc_NETRDFSCREATELOCALPARTITION(p, r2);
     638           0 :                 break;
     639             :         }
     640           0 :         case 45: { /* srvsvc_NETRDFSDELETELOCALPARTITION */
     641           0 :                 struct srvsvc_NETRDFSDELETELOCALPARTITION *r2 = (struct srvsvc_NETRDFSDELETELOCALPARTITION *)r;
     642           0 :                 if (DEBUGLEVEL >= 10) {
     643           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, NDR_IN, r2);
     644             :                 }
     645           0 :                 r2->out.result = _srvsvc_NETRDFSDELETELOCALPARTITION(p, r2);
     646           0 :                 break;
     647             :         }
     648           0 :         case 46: { /* srvsvc_NETRDFSSETLOCALVOLUMESTATE */
     649           0 :                 struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r2 = (struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *)r;
     650           0 :                 if (DEBUGLEVEL >= 10) {
     651           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, NDR_IN, r2);
     652             :                 }
     653           0 :                 r2->out.result = _srvsvc_NETRDFSSETLOCALVOLUMESTATE(p, r2);
     654           0 :                 break;
     655             :         }
     656           0 :         case 47: { /* srvsvc_NETRDFSSETSERVERINFO */
     657           0 :                 struct srvsvc_NETRDFSSETSERVERINFO *r2 = (struct srvsvc_NETRDFSSETSERVERINFO *)r;
     658           0 :                 if (DEBUGLEVEL >= 10) {
     659           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSSETSERVERINFO, NDR_IN, r2);
     660             :                 }
     661           0 :                 r2->out.result = _srvsvc_NETRDFSSETSERVERINFO(p, r2);
     662           0 :                 break;
     663             :         }
     664           0 :         case 48: { /* srvsvc_NETRDFSCREATEEXITPOINT */
     665           0 :                 struct srvsvc_NETRDFSCREATEEXITPOINT *r2 = (struct srvsvc_NETRDFSCREATEEXITPOINT *)r;
     666           0 :                 if (DEBUGLEVEL >= 10) {
     667           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, NDR_IN, r2);
     668             :                 }
     669           0 :                 r2->out.result = _srvsvc_NETRDFSCREATEEXITPOINT(p, r2);
     670           0 :                 break;
     671             :         }
     672           0 :         case 49: { /* srvsvc_NETRDFSDELETEEXITPOINT */
     673           0 :                 struct srvsvc_NETRDFSDELETEEXITPOINT *r2 = (struct srvsvc_NETRDFSDELETEEXITPOINT *)r;
     674           0 :                 if (DEBUGLEVEL >= 10) {
     675           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, NDR_IN, r2);
     676             :                 }
     677           0 :                 r2->out.result = _srvsvc_NETRDFSDELETEEXITPOINT(p, r2);
     678           0 :                 break;
     679             :         }
     680           0 :         case 50: { /* srvsvc_NETRDFSMODIFYPREFIX */
     681           0 :                 struct srvsvc_NETRDFSMODIFYPREFIX *r2 = (struct srvsvc_NETRDFSMODIFYPREFIX *)r;
     682           0 :                 if (DEBUGLEVEL >= 10) {
     683           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, NDR_IN, r2);
     684             :                 }
     685           0 :                 r2->out.result = _srvsvc_NETRDFSMODIFYPREFIX(p, r2);
     686           0 :                 break;
     687             :         }
     688           0 :         case 51: { /* srvsvc_NETRDFSFIXLOCALVOLUME */
     689           0 :                 struct srvsvc_NETRDFSFIXLOCALVOLUME *r2 = (struct srvsvc_NETRDFSFIXLOCALVOLUME *)r;
     690           0 :                 if (DEBUGLEVEL >= 10) {
     691           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, NDR_IN, r2);
     692             :                 }
     693           0 :                 r2->out.result = _srvsvc_NETRDFSFIXLOCALVOLUME(p, r2);
     694           0 :                 break;
     695             :         }
     696           0 :         case 52: { /* srvsvc_NETRDFSMANAGERREPORTSITEINFO */
     697           0 :                 struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r2 = (struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *)r;
     698           0 :                 if (DEBUGLEVEL >= 10) {
     699           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, NDR_IN, r2);
     700             :                 }
     701           0 :                 r2->out.result = _srvsvc_NETRDFSMANAGERREPORTSITEINFO(p, r2);
     702           0 :                 break;
     703             :         }
     704           0 :         case 53: { /* srvsvc_NETRSERVERTRANSPORTDELEX */
     705           0 :                 struct srvsvc_NETRSERVERTRANSPORTDELEX *r2 = (struct srvsvc_NETRSERVERTRANSPORTDELEX *)r;
     706           0 :                 if (DEBUGLEVEL >= 10) {
     707           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, NDR_IN, r2);
     708             :                 }
     709           0 :                 r2->out.result = _srvsvc_NETRSERVERTRANSPORTDELEX(p, r2);
     710           0 :                 break;
     711             :         }
     712           0 :         default:
     713           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
     714           0 :                 break;
     715             :         }
     716             : 
     717       12836 : fail:
     718             :         /* Unimpersonate */
     719       12836 :         if (impersonated) {
     720       12836 :                 unbecome_authenticated_pipe_user();
     721             :         }
     722             : 
     723       12836 :         p->dce_call = NULL;
     724       12836 :         p->mem_ctx = NULL;
     725             :         /* Check pipes struct fault state */
     726       12836 :         if (p->fault_state != 0) {
     727          20 :                 dce_call->fault_code = p->fault_state;
     728             :         }
     729       12836 :         if (dce_call->fault_code != 0) {
     730          20 :                 status = NT_STATUS_NET_WRITE_FAULT;
     731             :         }
     732             : 
     733       12836 :         return status;
     734             : }
     735             : 
     736       12836 : NTSTATUS srvsvc__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
     737             : {
     738       12836 :         return srvsvc__op_dispatch_internal(dce_call, mem_ctx, r, S3COMPAT_RPC_DISPATCH_EXTERNAL);
     739             : }
     740             : 
     741       12816 : NTSTATUS srvsvc__op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
     742             : {
     743       12816 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
     744             : 
     745       12816 :         switch (opnum) {
     746           0 :         case 0: { /* srvsvc_NetCharDevEnum */
     747           0 :                 struct srvsvc_NetCharDevEnum *r2 = (struct srvsvc_NetCharDevEnum *)r;
     748           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     749           0 :                         DEBUG(5,("function srvsvc_NetCharDevEnum replied async\n"));
     750             :                 }
     751           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     752           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevEnum, NDR_OUT | NDR_SET_VALUES, r2);
     753             :                 }
     754           0 :                 if (dce_call->fault_code != 0) {
     755           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetCharDevEnum\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     756             :                 }
     757           0 :                 break;
     758             :         }
     759           0 :         case 1: { /* srvsvc_NetCharDevGetInfo */
     760           0 :                 struct srvsvc_NetCharDevGetInfo *r2 = (struct srvsvc_NetCharDevGetInfo *)r;
     761           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     762           0 :                         DEBUG(5,("function srvsvc_NetCharDevGetInfo replied async\n"));
     763             :                 }
     764           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     765           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevGetInfo, NDR_OUT | NDR_SET_VALUES, r2);
     766             :                 }
     767           0 :                 if (dce_call->fault_code != 0) {
     768           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetCharDevGetInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     769             :                 }
     770           0 :                 break;
     771             :         }
     772           0 :         case 2: { /* srvsvc_NetCharDevControl */
     773           0 :                 struct srvsvc_NetCharDevControl *r2 = (struct srvsvc_NetCharDevControl *)r;
     774           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     775           0 :                         DEBUG(5,("function srvsvc_NetCharDevControl replied async\n"));
     776             :                 }
     777           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     778           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevControl, NDR_OUT | NDR_SET_VALUES, r2);
     779             :                 }
     780           0 :                 if (dce_call->fault_code != 0) {
     781           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetCharDevControl\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     782             :                 }
     783           0 :                 break;
     784             :         }
     785           0 :         case 3: { /* srvsvc_NetCharDevQEnum */
     786           0 :                 struct srvsvc_NetCharDevQEnum *r2 = (struct srvsvc_NetCharDevQEnum *)r;
     787           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     788           0 :                         DEBUG(5,("function srvsvc_NetCharDevQEnum replied async\n"));
     789             :                 }
     790           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     791           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevQEnum, NDR_OUT | NDR_SET_VALUES, r2);
     792             :                 }
     793           0 :                 if (dce_call->fault_code != 0) {
     794           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetCharDevQEnum\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     795             :                 }
     796           0 :                 break;
     797             :         }
     798           0 :         case 4: { /* srvsvc_NetCharDevQGetInfo */
     799           0 :                 struct srvsvc_NetCharDevQGetInfo *r2 = (struct srvsvc_NetCharDevQGetInfo *)r;
     800           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     801           0 :                         DEBUG(5,("function srvsvc_NetCharDevQGetInfo replied async\n"));
     802             :                 }
     803           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     804           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevQGetInfo, NDR_OUT | NDR_SET_VALUES, r2);
     805             :                 }
     806           0 :                 if (dce_call->fault_code != 0) {
     807           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetCharDevQGetInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     808             :                 }
     809           0 :                 break;
     810             :         }
     811           0 :         case 5: { /* srvsvc_NetCharDevQSetInfo */
     812           0 :                 struct srvsvc_NetCharDevQSetInfo *r2 = (struct srvsvc_NetCharDevQSetInfo *)r;
     813           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     814           0 :                         DEBUG(5,("function srvsvc_NetCharDevQSetInfo replied async\n"));
     815             :                 }
     816           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     817           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevQSetInfo, NDR_OUT | NDR_SET_VALUES, r2);
     818             :                 }
     819           0 :                 if (dce_call->fault_code != 0) {
     820           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetCharDevQSetInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     821             :                 }
     822           0 :                 break;
     823             :         }
     824           0 :         case 6: { /* srvsvc_NetCharDevQPurge */
     825           0 :                 struct srvsvc_NetCharDevQPurge *r2 = (struct srvsvc_NetCharDevQPurge *)r;
     826           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     827           0 :                         DEBUG(5,("function srvsvc_NetCharDevQPurge replied async\n"));
     828             :                 }
     829           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     830           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevQPurge, NDR_OUT | NDR_SET_VALUES, r2);
     831             :                 }
     832           0 :                 if (dce_call->fault_code != 0) {
     833           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetCharDevQPurge\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     834             :                 }
     835           0 :                 break;
     836             :         }
     837           0 :         case 7: { /* srvsvc_NetCharDevQPurgeSelf */
     838           0 :                 struct srvsvc_NetCharDevQPurgeSelf *r2 = (struct srvsvc_NetCharDevQPurgeSelf *)r;
     839           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     840           0 :                         DEBUG(5,("function srvsvc_NetCharDevQPurgeSelf replied async\n"));
     841             :                 }
     842           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     843           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetCharDevQPurgeSelf, NDR_OUT | NDR_SET_VALUES, r2);
     844             :                 }
     845           0 :                 if (dce_call->fault_code != 0) {
     846           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetCharDevQPurgeSelf\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     847             :                 }
     848           0 :                 break;
     849             :         }
     850           8 :         case 8: { /* srvsvc_NetConnEnum */
     851           8 :                 struct srvsvc_NetConnEnum *r2 = (struct srvsvc_NetConnEnum *)r;
     852           8 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     853           0 :                         DEBUG(5,("function srvsvc_NetConnEnum replied async\n"));
     854             :                 }
     855           8 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     856           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetConnEnum, NDR_OUT | NDR_SET_VALUES, r2);
     857             :                 }
     858           8 :                 if (dce_call->fault_code != 0) {
     859           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetConnEnum\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     860             :                 }
     861           8 :                 break;
     862             :         }
     863          10 :         case 9: { /* srvsvc_NetFileEnum */
     864          10 :                 struct srvsvc_NetFileEnum *r2 = (struct srvsvc_NetFileEnum *)r;
     865          10 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     866           0 :                         DEBUG(5,("function srvsvc_NetFileEnum replied async\n"));
     867             :                 }
     868          10 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     869           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetFileEnum, NDR_OUT | NDR_SET_VALUES, r2);
     870             :                 }
     871          10 :                 if (dce_call->fault_code != 0) {
     872           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetFileEnum\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     873             :                 }
     874          10 :                 break;
     875             :         }
     876           0 :         case 10: { /* srvsvc_NetFileGetInfo */
     877           0 :                 struct srvsvc_NetFileGetInfo *r2 = (struct srvsvc_NetFileGetInfo *)r;
     878           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     879           0 :                         DEBUG(5,("function srvsvc_NetFileGetInfo replied async\n"));
     880             :                 }
     881           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     882           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetFileGetInfo, NDR_OUT | NDR_SET_VALUES, r2);
     883             :                 }
     884           0 :                 if (dce_call->fault_code != 0) {
     885           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetFileGetInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     886             :                 }
     887           0 :                 break;
     888             :         }
     889           0 :         case 11: { /* srvsvc_NetFileClose */
     890           0 :                 struct srvsvc_NetFileClose *r2 = (struct srvsvc_NetFileClose *)r;
     891           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     892           0 :                         DEBUG(5,("function srvsvc_NetFileClose replied async\n"));
     893             :                 }
     894           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     895           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetFileClose, NDR_OUT | NDR_SET_VALUES, r2);
     896             :                 }
     897           0 :                 if (dce_call->fault_code != 0) {
     898           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetFileClose\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     899             :                 }
     900           0 :                 break;
     901             :         }
     902          34 :         case 12: { /* srvsvc_NetSessEnum */
     903          34 :                 struct srvsvc_NetSessEnum *r2 = (struct srvsvc_NetSessEnum *)r;
     904          34 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     905           0 :                         DEBUG(5,("function srvsvc_NetSessEnum replied async\n"));
     906             :                 }
     907          34 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     908           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetSessEnum, NDR_OUT | NDR_SET_VALUES, r2);
     909             :                 }
     910          34 :                 if (dce_call->fault_code != 0) {
     911           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetSessEnum\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     912             :                 }
     913          34 :                 break;
     914             :         }
     915           0 :         case 13: { /* srvsvc_NetSessDel */
     916           0 :                 struct srvsvc_NetSessDel *r2 = (struct srvsvc_NetSessDel *)r;
     917           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     918           0 :                         DEBUG(5,("function srvsvc_NetSessDel replied async\n"));
     919             :                 }
     920           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     921           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetSessDel, NDR_OUT | NDR_SET_VALUES, r2);
     922             :                 }
     923           0 :                 if (dce_call->fault_code != 0) {
     924           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetSessDel\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     925             :                 }
     926           0 :                 break;
     927             :         }
     928           4 :         case 14: { /* srvsvc_NetShareAdd */
     929           4 :                 struct srvsvc_NetShareAdd *r2 = (struct srvsvc_NetShareAdd *)r;
     930           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     931           0 :                         DEBUG(5,("function srvsvc_NetShareAdd replied async\n"));
     932             :                 }
     933           4 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     934           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareAdd, NDR_OUT | NDR_SET_VALUES, r2);
     935             :                 }
     936           4 :                 if (dce_call->fault_code != 0) {
     937           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetShareAdd\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     938             :                 }
     939           4 :                 break;
     940             :         }
     941         142 :         case 15: { /* srvsvc_NetShareEnumAll */
     942         142 :                 struct srvsvc_NetShareEnumAll *r2 = (struct srvsvc_NetShareEnumAll *)r;
     943         142 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     944           0 :                         DEBUG(5,("function srvsvc_NetShareEnumAll replied async\n"));
     945             :                 }
     946         142 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     947           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareEnumAll, NDR_OUT | NDR_SET_VALUES, r2);
     948             :                 }
     949         142 :                 if (dce_call->fault_code != 0) {
     950           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetShareEnumAll\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     951             :                 }
     952         142 :                 break;
     953             :         }
     954        1319 :         case 16: { /* srvsvc_NetShareGetInfo */
     955        1319 :                 struct srvsvc_NetShareGetInfo *r2 = (struct srvsvc_NetShareGetInfo *)r;
     956        1319 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     957           0 :                         DEBUG(5,("function srvsvc_NetShareGetInfo replied async\n"));
     958             :                 }
     959        1319 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     960           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareGetInfo, NDR_OUT | NDR_SET_VALUES, r2);
     961             :                 }
     962        1319 :                 if (dce_call->fault_code != 0) {
     963           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetShareGetInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     964             :                 }
     965        1319 :                 break;
     966             :         }
     967          33 :         case 17: { /* srvsvc_NetShareSetInfo */
     968          33 :                 struct srvsvc_NetShareSetInfo *r2 = (struct srvsvc_NetShareSetInfo *)r;
     969          33 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     970           0 :                         DEBUG(5,("function srvsvc_NetShareSetInfo replied async\n"));
     971             :                 }
     972          33 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     973           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareSetInfo, NDR_OUT | NDR_SET_VALUES, r2);
     974             :                 }
     975          33 :                 if (dce_call->fault_code != 0) {
     976           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetShareSetInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     977             :                 }
     978          33 :                 break;
     979             :         }
     980           4 :         case 18: { /* srvsvc_NetShareDel */
     981           4 :                 struct srvsvc_NetShareDel *r2 = (struct srvsvc_NetShareDel *)r;
     982           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     983           0 :                         DEBUG(5,("function srvsvc_NetShareDel replied async\n"));
     984             :                 }
     985           4 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     986           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareDel, NDR_OUT | NDR_SET_VALUES, r2);
     987             :                 }
     988           4 :                 if (dce_call->fault_code != 0) {
     989           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetShareDel\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
     990             :                 }
     991           4 :                 break;
     992             :         }
     993           0 :         case 19: { /* srvsvc_NetShareDelSticky */
     994           0 :                 struct srvsvc_NetShareDelSticky *r2 = (struct srvsvc_NetShareDelSticky *)r;
     995           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     996           0 :                         DEBUG(5,("function srvsvc_NetShareDelSticky replied async\n"));
     997             :                 }
     998           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     999           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareDelSticky, NDR_OUT | NDR_SET_VALUES, r2);
    1000             :                 }
    1001           0 :                 if (dce_call->fault_code != 0) {
    1002           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetShareDelSticky\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1003             :                 }
    1004           0 :                 break;
    1005             :         }
    1006           0 :         case 20: { /* srvsvc_NetShareCheck */
    1007           0 :                 struct srvsvc_NetShareCheck *r2 = (struct srvsvc_NetShareCheck *)r;
    1008           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1009           0 :                         DEBUG(5,("function srvsvc_NetShareCheck replied async\n"));
    1010             :                 }
    1011           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1012           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareCheck, NDR_OUT | NDR_SET_VALUES, r2);
    1013             :                 }
    1014           0 :                 if (dce_call->fault_code != 0) {
    1015           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetShareCheck\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1016             :                 }
    1017           0 :                 break;
    1018             :         }
    1019          48 :         case 21: { /* srvsvc_NetSrvGetInfo */
    1020          48 :                 struct srvsvc_NetSrvGetInfo *r2 = (struct srvsvc_NetSrvGetInfo *)r;
    1021          48 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1022           0 :                         DEBUG(5,("function srvsvc_NetSrvGetInfo replied async\n"));
    1023             :                 }
    1024          48 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1025           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetSrvGetInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1026             :                 }
    1027          48 :                 if (dce_call->fault_code != 0) {
    1028           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetSrvGetInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1029             :                 }
    1030          48 :                 break;
    1031             :         }
    1032           0 :         case 22: { /* srvsvc_NetSrvSetInfo */
    1033           0 :                 struct srvsvc_NetSrvSetInfo *r2 = (struct srvsvc_NetSrvSetInfo *)r;
    1034           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1035           0 :                         DEBUG(5,("function srvsvc_NetSrvSetInfo replied async\n"));
    1036             :                 }
    1037           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1038           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetSrvSetInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1039             :                 }
    1040           0 :                 if (dce_call->fault_code != 0) {
    1041           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetSrvSetInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1042             :                 }
    1043           0 :                 break;
    1044             :         }
    1045           4 :         case 23: { /* srvsvc_NetDiskEnum */
    1046           4 :                 struct srvsvc_NetDiskEnum *r2 = (struct srvsvc_NetDiskEnum *)r;
    1047           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1048           0 :                         DEBUG(5,("function srvsvc_NetDiskEnum replied async\n"));
    1049             :                 }
    1050           4 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1051           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetDiskEnum, NDR_OUT | NDR_SET_VALUES, r2);
    1052             :                 }
    1053           4 :                 if (dce_call->fault_code != 0) {
    1054           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetDiskEnum\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1055             :                 }
    1056           4 :                 break;
    1057             :         }
    1058           0 :         case 24: { /* srvsvc_NetServerStatisticsGet */
    1059           0 :                 struct srvsvc_NetServerStatisticsGet *r2 = (struct srvsvc_NetServerStatisticsGet *)r;
    1060           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1061           0 :                         DEBUG(5,("function srvsvc_NetServerStatisticsGet replied async\n"));
    1062             :                 }
    1063           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1064           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetServerStatisticsGet, NDR_OUT | NDR_SET_VALUES, r2);
    1065             :                 }
    1066           0 :                 if (dce_call->fault_code != 0) {
    1067           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetServerStatisticsGet\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1068             :                 }
    1069           0 :                 break;
    1070             :         }
    1071           0 :         case 25: { /* srvsvc_NetTransportAdd */
    1072           0 :                 struct srvsvc_NetTransportAdd *r2 = (struct srvsvc_NetTransportAdd *)r;
    1073           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1074           0 :                         DEBUG(5,("function srvsvc_NetTransportAdd replied async\n"));
    1075             :                 }
    1076           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1077           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetTransportAdd, NDR_OUT | NDR_SET_VALUES, r2);
    1078             :                 }
    1079           0 :                 if (dce_call->fault_code != 0) {
    1080           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetTransportAdd\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1081             :                 }
    1082           0 :                 break;
    1083             :         }
    1084           0 :         case 26: { /* srvsvc_NetTransportEnum */
    1085           0 :                 struct srvsvc_NetTransportEnum *r2 = (struct srvsvc_NetTransportEnum *)r;
    1086           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1087           0 :                         DEBUG(5,("function srvsvc_NetTransportEnum replied async\n"));
    1088             :                 }
    1089           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1090           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetTransportEnum, NDR_OUT | NDR_SET_VALUES, r2);
    1091             :                 }
    1092           0 :                 if (dce_call->fault_code != 0) {
    1093           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetTransportEnum\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1094             :                 }
    1095           0 :                 break;
    1096             :         }
    1097           0 :         case 27: { /* srvsvc_NetTransportDel */
    1098           0 :                 struct srvsvc_NetTransportDel *r2 = (struct srvsvc_NetTransportDel *)r;
    1099           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1100           0 :                         DEBUG(5,("function srvsvc_NetTransportDel replied async\n"));
    1101             :                 }
    1102           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1103           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetTransportDel, NDR_OUT | NDR_SET_VALUES, r2);
    1104             :                 }
    1105           0 :                 if (dce_call->fault_code != 0) {
    1106           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetTransportDel\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1107             :                 }
    1108           0 :                 break;
    1109             :         }
    1110           8 :         case 28: { /* srvsvc_NetRemoteTOD */
    1111           8 :                 struct srvsvc_NetRemoteTOD *r2 = (struct srvsvc_NetRemoteTOD *)r;
    1112           8 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1113           0 :                         DEBUG(5,("function srvsvc_NetRemoteTOD replied async\n"));
    1114             :                 }
    1115           8 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1116           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetRemoteTOD, NDR_OUT | NDR_SET_VALUES, r2);
    1117             :                 }
    1118           8 :                 if (dce_call->fault_code != 0) {
    1119           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetRemoteTOD\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1120             :                 }
    1121           8 :                 break;
    1122             :         }
    1123           0 :         case 29: { /* srvsvc_NetSetServiceBits */
    1124           0 :                 struct srvsvc_NetSetServiceBits *r2 = (struct srvsvc_NetSetServiceBits *)r;
    1125           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1126           0 :                         DEBUG(5,("function srvsvc_NetSetServiceBits replied async\n"));
    1127             :                 }
    1128           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1129           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetSetServiceBits, NDR_OUT | NDR_SET_VALUES, r2);
    1130             :                 }
    1131           0 :                 if (dce_call->fault_code != 0) {
    1132           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetSetServiceBits\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1133             :                 }
    1134           0 :                 break;
    1135             :         }
    1136           0 :         case 30: { /* srvsvc_NetPathType */
    1137           0 :                 struct srvsvc_NetPathType *r2 = (struct srvsvc_NetPathType *)r;
    1138           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1139           0 :                         DEBUG(5,("function srvsvc_NetPathType replied async\n"));
    1140             :                 }
    1141           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1142           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetPathType, NDR_OUT | NDR_SET_VALUES, r2);
    1143             :                 }
    1144           0 :                 if (dce_call->fault_code != 0) {
    1145           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetPathType\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1146             :                 }
    1147           0 :                 break;
    1148             :         }
    1149           0 :         case 31: { /* srvsvc_NetPathCanonicalize */
    1150           0 :                 struct srvsvc_NetPathCanonicalize *r2 = (struct srvsvc_NetPathCanonicalize *)r;
    1151           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1152           0 :                         DEBUG(5,("function srvsvc_NetPathCanonicalize replied async\n"));
    1153             :                 }
    1154           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1155           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetPathCanonicalize, NDR_OUT | NDR_SET_VALUES, r2);
    1156             :                 }
    1157           0 :                 if (dce_call->fault_code != 0) {
    1158           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetPathCanonicalize\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1159             :                 }
    1160           0 :                 break;
    1161             :         }
    1162           0 :         case 32: { /* srvsvc_NetPathCompare */
    1163           0 :                 struct srvsvc_NetPathCompare *r2 = (struct srvsvc_NetPathCompare *)r;
    1164           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1165           0 :                         DEBUG(5,("function srvsvc_NetPathCompare replied async\n"));
    1166             :                 }
    1167           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1168           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetPathCompare, NDR_OUT | NDR_SET_VALUES, r2);
    1169             :                 }
    1170           0 :                 if (dce_call->fault_code != 0) {
    1171           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetPathCompare\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1172             :                 }
    1173           0 :                 break;
    1174             :         }
    1175       11128 :         case 33: { /* srvsvc_NetNameValidate */
    1176       11128 :                 struct srvsvc_NetNameValidate *r2 = (struct srvsvc_NetNameValidate *)r;
    1177       11128 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1178           0 :                         DEBUG(5,("function srvsvc_NetNameValidate replied async\n"));
    1179             :                 }
    1180       11128 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1181           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetNameValidate, NDR_OUT | NDR_SET_VALUES, r2);
    1182             :                 }
    1183       11128 :                 if (dce_call->fault_code != 0) {
    1184           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetNameValidate\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1185             :                 }
    1186       11128 :                 break;
    1187             :         }
    1188           0 :         case 34: { /* srvsvc_NETRPRNAMECANONICALIZE */
    1189           0 :                 struct srvsvc_NETRPRNAMECANONICALIZE *r2 = (struct srvsvc_NETRPRNAMECANONICALIZE *)r;
    1190           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1191           0 :                         DEBUG(5,("function srvsvc_NETRPRNAMECANONICALIZE replied async\n"));
    1192             :                 }
    1193           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1194           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, NDR_OUT | NDR_SET_VALUES, r2);
    1195             :                 }
    1196           0 :                 if (dce_call->fault_code != 0) {
    1197           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NETRPRNAMECANONICALIZE\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1198             :                 }
    1199           0 :                 break;
    1200             :         }
    1201           0 :         case 35: { /* srvsvc_NetPRNameCompare */
    1202           0 :                 struct srvsvc_NetPRNameCompare *r2 = (struct srvsvc_NetPRNameCompare *)r;
    1203           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1204           0 :                         DEBUG(5,("function srvsvc_NetPRNameCompare replied async\n"));
    1205             :                 }
    1206           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1207           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetPRNameCompare, NDR_OUT | NDR_SET_VALUES, r2);
    1208             :                 }
    1209           0 :                 if (dce_call->fault_code != 0) {
    1210           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetPRNameCompare\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1211             :                 }
    1212           0 :                 break;
    1213             :         }
    1214          74 :         case 36: { /* srvsvc_NetShareEnum */
    1215          74 :                 struct srvsvc_NetShareEnum *r2 = (struct srvsvc_NetShareEnum *)r;
    1216          74 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1217           0 :                         DEBUG(5,("function srvsvc_NetShareEnum replied async\n"));
    1218             :                 }
    1219          74 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1220           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareEnum, NDR_OUT | NDR_SET_VALUES, r2);
    1221             :                 }
    1222          74 :                 if (dce_call->fault_code != 0) {
    1223           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetShareEnum\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1224             :                 }
    1225          74 :                 break;
    1226             :         }
    1227           0 :         case 37: { /* srvsvc_NetShareDelStart */
    1228           0 :                 struct srvsvc_NetShareDelStart *r2 = (struct srvsvc_NetShareDelStart *)r;
    1229           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1230           0 :                         DEBUG(5,("function srvsvc_NetShareDelStart replied async\n"));
    1231             :                 }
    1232           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1233           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareDelStart, NDR_OUT | NDR_SET_VALUES, r2);
    1234             :                 }
    1235           0 :                 if (dce_call->fault_code != 0) {
    1236           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetShareDelStart\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1237             :                 }
    1238           0 :                 break;
    1239             :         }
    1240           0 :         case 38: { /* srvsvc_NetShareDelCommit */
    1241           0 :                 struct srvsvc_NetShareDelCommit *r2 = (struct srvsvc_NetShareDelCommit *)r;
    1242           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1243           0 :                         DEBUG(5,("function srvsvc_NetShareDelCommit replied async\n"));
    1244             :                 }
    1245           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1246           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetShareDelCommit, NDR_OUT | NDR_SET_VALUES, r2);
    1247             :                 }
    1248           0 :                 if (dce_call->fault_code != 0) {
    1249           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetShareDelCommit\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1250             :                 }
    1251           0 :                 break;
    1252             :         }
    1253           0 :         case 39: { /* srvsvc_NetGetFileSecurity */
    1254           0 :                 struct srvsvc_NetGetFileSecurity *r2 = (struct srvsvc_NetGetFileSecurity *)r;
    1255           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1256           0 :                         DEBUG(5,("function srvsvc_NetGetFileSecurity replied async\n"));
    1257             :                 }
    1258           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1259           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetGetFileSecurity, NDR_OUT | NDR_SET_VALUES, r2);
    1260             :                 }
    1261           0 :                 if (dce_call->fault_code != 0) {
    1262           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetGetFileSecurity\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1263             :                 }
    1264           0 :                 break;
    1265             :         }
    1266           0 :         case 40: { /* srvsvc_NetSetFileSecurity */
    1267           0 :                 struct srvsvc_NetSetFileSecurity *r2 = (struct srvsvc_NetSetFileSecurity *)r;
    1268           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1269           0 :                         DEBUG(5,("function srvsvc_NetSetFileSecurity replied async\n"));
    1270             :                 }
    1271           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1272           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetSetFileSecurity, NDR_OUT | NDR_SET_VALUES, r2);
    1273             :                 }
    1274           0 :                 if (dce_call->fault_code != 0) {
    1275           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetSetFileSecurity\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1276             :                 }
    1277           0 :                 break;
    1278             :         }
    1279           0 :         case 41: { /* srvsvc_NetServerTransportAddEx */
    1280           0 :                 struct srvsvc_NetServerTransportAddEx *r2 = (struct srvsvc_NetServerTransportAddEx *)r;
    1281           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1282           0 :                         DEBUG(5,("function srvsvc_NetServerTransportAddEx replied async\n"));
    1283             :                 }
    1284           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1285           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetServerTransportAddEx, NDR_OUT | NDR_SET_VALUES, r2);
    1286             :                 }
    1287           0 :                 if (dce_call->fault_code != 0) {
    1288           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetServerTransportAddEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1289             :                 }
    1290           0 :                 break;
    1291             :         }
    1292           0 :         case 42: { /* srvsvc_NetServerSetServiceBitsEx */
    1293           0 :                 struct srvsvc_NetServerSetServiceBitsEx *r2 = (struct srvsvc_NetServerSetServiceBitsEx *)r;
    1294           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1295           0 :                         DEBUG(5,("function srvsvc_NetServerSetServiceBitsEx replied async\n"));
    1296             :                 }
    1297           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1298           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NetServerSetServiceBitsEx, NDR_OUT | NDR_SET_VALUES, r2);
    1299             :                 }
    1300           0 :                 if (dce_call->fault_code != 0) {
    1301           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NetServerSetServiceBitsEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1302             :                 }
    1303           0 :                 break;
    1304             :         }
    1305           0 :         case 43: { /* srvsvc_NETRDFSGETVERSION */
    1306           0 :                 struct srvsvc_NETRDFSGETVERSION *r2 = (struct srvsvc_NETRDFSGETVERSION *)r;
    1307           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1308           0 :                         DEBUG(5,("function srvsvc_NETRDFSGETVERSION replied async\n"));
    1309             :                 }
    1310           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1311           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSGETVERSION, NDR_OUT | NDR_SET_VALUES, r2);
    1312             :                 }
    1313           0 :                 if (dce_call->fault_code != 0) {
    1314           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NETRDFSGETVERSION\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1315             :                 }
    1316           0 :                 break;
    1317             :         }
    1318           0 :         case 44: { /* srvsvc_NETRDFSCREATELOCALPARTITION */
    1319           0 :                 struct srvsvc_NETRDFSCREATELOCALPARTITION *r2 = (struct srvsvc_NETRDFSCREATELOCALPARTITION *)r;
    1320           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1321           0 :                         DEBUG(5,("function srvsvc_NETRDFSCREATELOCALPARTITION replied async\n"));
    1322             :                 }
    1323           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1324           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, NDR_OUT | NDR_SET_VALUES, r2);
    1325             :                 }
    1326           0 :                 if (dce_call->fault_code != 0) {
    1327           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NETRDFSCREATELOCALPARTITION\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1328             :                 }
    1329           0 :                 break;
    1330             :         }
    1331           0 :         case 45: { /* srvsvc_NETRDFSDELETELOCALPARTITION */
    1332           0 :                 struct srvsvc_NETRDFSDELETELOCALPARTITION *r2 = (struct srvsvc_NETRDFSDELETELOCALPARTITION *)r;
    1333           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1334           0 :                         DEBUG(5,("function srvsvc_NETRDFSDELETELOCALPARTITION replied async\n"));
    1335             :                 }
    1336           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1337           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, NDR_OUT | NDR_SET_VALUES, r2);
    1338             :                 }
    1339           0 :                 if (dce_call->fault_code != 0) {
    1340           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NETRDFSDELETELOCALPARTITION\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1341             :                 }
    1342           0 :                 break;
    1343             :         }
    1344           0 :         case 46: { /* srvsvc_NETRDFSSETLOCALVOLUMESTATE */
    1345           0 :                 struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r2 = (struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *)r;
    1346           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1347           0 :                         DEBUG(5,("function srvsvc_NETRDFSSETLOCALVOLUMESTATE replied async\n"));
    1348             :                 }
    1349           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1350           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, NDR_OUT | NDR_SET_VALUES, r2);
    1351             :                 }
    1352           0 :                 if (dce_call->fault_code != 0) {
    1353           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NETRDFSSETLOCALVOLUMESTATE\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1354             :                 }
    1355           0 :                 break;
    1356             :         }
    1357           0 :         case 47: { /* srvsvc_NETRDFSSETSERVERINFO */
    1358           0 :                 struct srvsvc_NETRDFSSETSERVERINFO *r2 = (struct srvsvc_NETRDFSSETSERVERINFO *)r;
    1359           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1360           0 :                         DEBUG(5,("function srvsvc_NETRDFSSETSERVERINFO replied async\n"));
    1361             :                 }
    1362           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1363           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSSETSERVERINFO, NDR_OUT | NDR_SET_VALUES, r2);
    1364             :                 }
    1365           0 :                 if (dce_call->fault_code != 0) {
    1366           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NETRDFSSETSERVERINFO\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1367             :                 }
    1368           0 :                 break;
    1369             :         }
    1370           0 :         case 48: { /* srvsvc_NETRDFSCREATEEXITPOINT */
    1371           0 :                 struct srvsvc_NETRDFSCREATEEXITPOINT *r2 = (struct srvsvc_NETRDFSCREATEEXITPOINT *)r;
    1372           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1373           0 :                         DEBUG(5,("function srvsvc_NETRDFSCREATEEXITPOINT replied async\n"));
    1374             :                 }
    1375           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1376           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, NDR_OUT | NDR_SET_VALUES, r2);
    1377             :                 }
    1378           0 :                 if (dce_call->fault_code != 0) {
    1379           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NETRDFSCREATEEXITPOINT\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1380             :                 }
    1381           0 :                 break;
    1382             :         }
    1383           0 :         case 49: { /* srvsvc_NETRDFSDELETEEXITPOINT */
    1384           0 :                 struct srvsvc_NETRDFSDELETEEXITPOINT *r2 = (struct srvsvc_NETRDFSDELETEEXITPOINT *)r;
    1385           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1386           0 :                         DEBUG(5,("function srvsvc_NETRDFSDELETEEXITPOINT replied async\n"));
    1387             :                 }
    1388           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1389           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, NDR_OUT | NDR_SET_VALUES, r2);
    1390             :                 }
    1391           0 :                 if (dce_call->fault_code != 0) {
    1392           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NETRDFSDELETEEXITPOINT\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1393             :                 }
    1394           0 :                 break;
    1395             :         }
    1396           0 :         case 50: { /* srvsvc_NETRDFSMODIFYPREFIX */
    1397           0 :                 struct srvsvc_NETRDFSMODIFYPREFIX *r2 = (struct srvsvc_NETRDFSMODIFYPREFIX *)r;
    1398           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1399           0 :                         DEBUG(5,("function srvsvc_NETRDFSMODIFYPREFIX replied async\n"));
    1400             :                 }
    1401           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1402           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, NDR_OUT | NDR_SET_VALUES, r2);
    1403             :                 }
    1404           0 :                 if (dce_call->fault_code != 0) {
    1405           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NETRDFSMODIFYPREFIX\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1406             :                 }
    1407           0 :                 break;
    1408             :         }
    1409           0 :         case 51: { /* srvsvc_NETRDFSFIXLOCALVOLUME */
    1410           0 :                 struct srvsvc_NETRDFSFIXLOCALVOLUME *r2 = (struct srvsvc_NETRDFSFIXLOCALVOLUME *)r;
    1411           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1412           0 :                         DEBUG(5,("function srvsvc_NETRDFSFIXLOCALVOLUME replied async\n"));
    1413             :                 }
    1414           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1415           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, NDR_OUT | NDR_SET_VALUES, r2);
    1416             :                 }
    1417           0 :                 if (dce_call->fault_code != 0) {
    1418           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NETRDFSFIXLOCALVOLUME\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1419             :                 }
    1420           0 :                 break;
    1421             :         }
    1422           0 :         case 52: { /* srvsvc_NETRDFSMANAGERREPORTSITEINFO */
    1423           0 :                 struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r2 = (struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *)r;
    1424           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1425           0 :                         DEBUG(5,("function srvsvc_NETRDFSMANAGERREPORTSITEINFO replied async\n"));
    1426             :                 }
    1427           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1428           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, NDR_OUT | NDR_SET_VALUES, r2);
    1429             :                 }
    1430           0 :                 if (dce_call->fault_code != 0) {
    1431           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NETRDFSMANAGERREPORTSITEINFO\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1432             :                 }
    1433           0 :                 break;
    1434             :         }
    1435           0 :         case 53: { /* srvsvc_NETRSERVERTRANSPORTDELEX */
    1436           0 :                 struct srvsvc_NETRSERVERTRANSPORTDELEX *r2 = (struct srvsvc_NETRSERVERTRANSPORTDELEX *)r;
    1437           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1438           0 :                         DEBUG(5,("function srvsvc_NETRSERVERTRANSPORTDELEX replied async\n"));
    1439             :                 }
    1440           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1441           0 :                         NDR_PRINT_FUNCTION_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, NDR_OUT | NDR_SET_VALUES, r2);
    1442             :                 }
    1443           0 :                 if (dce_call->fault_code != 0) {
    1444           0 :                         DBG_WARNING("dcerpc_fault %s in srvsvc_NETRSERVERTRANSPORTDELEX\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1445             :                 }
    1446           0 :                 break;
    1447             :         }
    1448           0 :         default:
    1449           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
    1450           0 :                 break;
    1451             :         }
    1452             : 
    1453       12816 :         if (dce_call->fault_code != 0) {
    1454           0 :                 return NT_STATUS_NET_WRITE_FAULT;
    1455             :         }
    1456             : 
    1457       12816 :         return NT_STATUS_OK;
    1458             : }
    1459             : 
    1460       12816 : NTSTATUS srvsvc__op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
    1461             : {
    1462           0 :         enum ndr_err_code ndr_err;
    1463       12816 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
    1464             : 
    1465       12816 :         ndr_err = ndr_table_srvsvc.calls[opnum].ndr_push(push, NDR_OUT, r);
    1466       12816 :         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1467           0 :                 dce_call->fault_code = DCERPC_FAULT_NDR;
    1468           0 :                 return NT_STATUS_NET_WRITE_FAULT;
    1469             :         }
    1470             : 
    1471       12816 :         return NT_STATUS_OK;
    1472             : }
    1473             : 
    1474           0 : NTSTATUS srvsvc__op_local(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
    1475             : {
    1476           0 :         return srvsvc__op_dispatch_internal(dce_call, mem_ctx, r, S3COMPAT_RPC_DISPATCH_INTERNAL);
    1477             : }
    1478             : 
    1479             : static const struct dcesrv_interface dcesrv_srvsvc_interface = {
    1480             :         .name      = "srvsvc",
    1481             :         .syntax_id = {{0x4b324fc8,0x1670,0x01d3,{0x12,0x78},{0x5a,0x47,0xbf,0x6e,0xe1,0x88}},3.0},
    1482             :         .bind      = srvsvc__op_bind,
    1483             :         .unbind    = srvsvc__op_unbind,
    1484             :         .ndr_pull  = srvsvc__op_ndr_pull,
    1485             :         .dispatch  = srvsvc__op_dispatch,
    1486             :         .reply     = srvsvc__op_reply,
    1487             :         .ndr_push  = srvsvc__op_ndr_push,
    1488             :         .local     = srvsvc__op_local,
    1489             : #ifdef DCESRV_INTERFACE_SRVSVC_FLAGS
    1490             :         .flags     = DCESRV_INTERFACE_SRVSVC_FLAGS
    1491             : #else
    1492             :         .flags     = 0
    1493             : #endif
    1494             : };
    1495             : 
    1496         126 : static NTSTATUS srvsvc__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
    1497             : {
    1498           0 :         uint32_t i;
    1499           0 :         NTSTATUS ret;
    1500             : 
    1501             : #ifdef DCESRV_INTERFACE_SRVSVC_NCACN_NP_SECONDARY_ENDPOINT
    1502             :         const char *ncacn_np_secondary_endpoint = DCESRV_INTERFACE_SRVSVC_NCACN_NP_SECONDARY_ENDPOINT;
    1503             : #else
    1504         126 :         const char *ncacn_np_secondary_endpoint = NULL;
    1505             : #endif
    1506             : 
    1507         504 :         for (i=0;i<ndr_table_srvsvc.endpoints->count;i++) {
    1508         378 :                 const char *name = ndr_table_srvsvc.endpoints->names[i];
    1509             : 
    1510         378 :                 ret = dcesrv_interface_register(dce_ctx, name, ncacn_np_secondary_endpoint, &dcesrv_srvsvc_interface, NULL);
    1511         378 :                 if (!NT_STATUS_IS_OK(ret)) {
    1512           0 :                         DBG_ERR("Failed to register endpoint '%s'\n",name);
    1513           0 :                         return ret;
    1514             :                 }
    1515             :         }
    1516             : 
    1517         126 :         return NT_STATUS_OK;
    1518             : }
    1519             : 
    1520         126 : static NTSTATUS srvsvc__op_shutdown_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
    1521             : {
    1522         126 :         return NT_STATUS_OK;
    1523             : }
    1524             : 
    1525           0 : static bool srvsvc__op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
    1526             : {
    1527           0 :         if (dcesrv_srvsvc_interface.syntax_id.if_version == if_version && GUID_equal(&dcesrv_srvsvc_interface.syntax_id.uuid, uuid)) {
    1528           0 :                 memcpy(iface,&dcesrv_srvsvc_interface, sizeof(*iface));
    1529           0 :                 return true;
    1530             :         }
    1531             : 
    1532           0 :         return false;
    1533             : }
    1534             : 
    1535           0 : static bool srvsvc__op_interface_by_name(struct dcesrv_interface *iface, const char *name)
    1536             : {
    1537           0 :         if (strcmp(dcesrv_srvsvc_interface.name, name)==0) {
    1538           0 :                 memcpy(iface, &dcesrv_srvsvc_interface, sizeof(*iface));
    1539           0 :                 return true;
    1540             :         }
    1541             : 
    1542           0 :         return false;
    1543             : }
    1544             : 
    1545             : static const struct dcesrv_endpoint_server srvsvc_ep_server = {
    1546             :         /* fill in our name */
    1547             :         .name = "srvsvc",
    1548             : 
    1549             :         /* Initialization flag */
    1550             :         .initialized = false,
    1551             : 
    1552             :         /* fill in all the operations */
    1553             : #ifdef DCESRV_INTERFACE_SRVSVC_INIT_SERVER
    1554             :         .init_server = DCESRV_INTERFACE_SRVSVC_INIT_SERVER,
    1555             : #else
    1556             :         .init_server = srvsvc__op_init_server,
    1557             : #endif
    1558             : #ifdef DCESRV_INTERFACE_SRVSVC_SHUTDOWN_SERVER
    1559             :         .shutdown_server = DCESRV_INTERFACE_SRVSVC_SHUTDOWN_SERVER,
    1560             : #else
    1561             :         .shutdown_server = srvsvc__op_shutdown_server,
    1562             : #endif
    1563             :         .interface_by_uuid = srvsvc__op_interface_by_uuid,
    1564             :         .interface_by_name = srvsvc__op_interface_by_name
    1565             : };
    1566             : 
    1567         126 : const struct dcesrv_endpoint_server *srvsvc_get_ep_server(void)
    1568             : {
    1569         126 :         return &srvsvc_ep_server;
    1570             : }

Generated by: LCOV version 1.14