LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_samr_s.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 768 1228 62.5 %
Date: 2021-09-23 10:06:22 Functions: 8 11 72.7 %

          Line data    Source code
       1             : /* server functions auto-generated by pidl */
       2             : #include "bin/default/librpc/gen_ndr/ndr_samr.h"
       3             : #include <util/debug.h>
       4             : 
       5             : NTSTATUS dcerpc_server_samr_init(TALLOC_CTX *);
       6             : 
       7             : /* samr - dcerpc server boilerplate generated by pidl */
       8             : 
       9             : 
      10        1957 : static NTSTATUS samr__op_bind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
      11             : {
      12             : #ifdef DCESRV_INTERFACE_SAMR_BIND
      13        1957 :         return DCESRV_INTERFACE_SAMR_BIND(context,iface);
      14             : #else
      15             :         return NT_STATUS_OK;
      16             : #endif
      17             : }
      18             : 
      19        2667 : static void samr__op_unbind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
      20             : {
      21             : #ifdef DCESRV_INTERFACE_SAMR_UNBIND
      22             :         DCESRV_INTERFACE_SAMR_UNBIND(context, iface);
      23             : #else
      24        2667 :         return;
      25             : #endif
      26             : }
      27             : 
      28       53619 : static NTSTATUS samr__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
      29             : {
      30             :         enum ndr_err_code ndr_err;
      31       53619 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
      32             : 
      33       53619 :         dce_call->fault_code = 0;
      34             : 
      35       53619 :         if (opnum >= ndr_table_samr.num_calls) {
      36           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
      37           0 :                 return NT_STATUS_NET_WRITE_FAULT;
      38             :         }
      39             : 
      40      105951 :         *r = talloc_named(mem_ctx,
      41       52332 :                           ndr_table_samr.calls[opnum].struct_size,
      42             :                           "struct %s",
      43       53619 :                           ndr_table_samr.calls[opnum].name);
      44       53619 :         NT_STATUS_HAVE_NO_MEMORY(*r);
      45             : 
      46             :         /* unravel the NDR for the packet */
      47       53619 :         ndr_err = ndr_table_samr.calls[opnum].ndr_pull(pull, NDR_IN, *r);
      48       53619 :         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
      49           0 :                 dce_call->fault_code = DCERPC_FAULT_NDR;
      50           0 :                 return NT_STATUS_NET_WRITE_FAULT;
      51             :         }
      52             : 
      53       53619 :         return NT_STATUS_OK;
      54             : }
      55             : 
      56       53619 : static NTSTATUS samr__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
      57             : {
      58       53619 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
      59             : 
      60       53619 :         switch (opnum) {
      61        1422 :         case 0: {
      62        1422 :                 struct samr_Connect *r2 = (struct samr_Connect *)r;
      63        1422 :                 if (DEBUGLEVEL >= 10) {
      64           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect, NDR_IN, r2);
      65             :                 }
      66        1422 :                 r2->out.result = dcesrv_samr_Connect(dce_call, mem_ctx, r2);
      67        1422 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
      68           0 :                         DEBUG(5,("function samr_Connect will reply async\n"));
      69             :                 }
      70        1248 :                 break;
      71             :         }
      72        5072 :         case 1: {
      73        5072 :                 struct samr_Close *r2 = (struct samr_Close *)r;
      74        5072 :                 if (DEBUGLEVEL >= 10) {
      75           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Close, NDR_IN, r2);
      76             :                 }
      77        5072 :                 r2->out.result = dcesrv_samr_Close(dce_call, mem_ctx, r2);
      78        5072 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
      79           0 :                         DEBUG(5,("function samr_Close will reply async\n"));
      80             :                 }
      81        5060 :                 break;
      82             :         }
      83           2 :         case 2: {
      84           2 :                 struct samr_SetSecurity *r2 = (struct samr_SetSecurity *)r;
      85           2 :                 if (DEBUGLEVEL >= 10) {
      86           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetSecurity, NDR_IN, r2);
      87             :                 }
      88           2 :                 r2->out.result = dcesrv_samr_SetSecurity(dce_call, mem_ctx, r2);
      89           2 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
      90           0 :                         DEBUG(5,("function samr_SetSecurity will reply async\n"));
      91             :                 }
      92           2 :                 break;
      93             :         }
      94         282 :         case 3: {
      95         282 :                 struct samr_QuerySecurity *r2 = (struct samr_QuerySecurity *)r;
      96         282 :                 if (DEBUGLEVEL >= 10) {
      97           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QuerySecurity, NDR_IN, r2);
      98             :                 }
      99         282 :                 r2->out.result = dcesrv_samr_QuerySecurity(dce_call, mem_ctx, r2);
     100         282 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     101           0 :                         DEBUG(5,("function samr_QuerySecurity will reply async\n"));
     102             :                 }
     103         282 :                 break;
     104             :         }
     105           0 :         case 4: {
     106           0 :                 struct samr_Shutdown *r2 = (struct samr_Shutdown *)r;
     107           0 :                 if (DEBUGLEVEL >= 10) {
     108           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Shutdown, NDR_IN, r2);
     109             :                 }
     110           0 :                 r2->out.result = dcesrv_samr_Shutdown(dce_call, mem_ctx, r2);
     111           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     112           0 :                         DEBUG(5,("function samr_Shutdown will reply async\n"));
     113             :                 }
     114           0 :                 break;
     115             :         }
     116         634 :         case 5: {
     117         634 :                 struct samr_LookupDomain *r2 = (struct samr_LookupDomain *)r;
     118         634 :                 if (DEBUGLEVEL >= 10) {
     119           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_LookupDomain, NDR_IN, r2);
     120             :                 }
     121         634 :                 r2->out.result = dcesrv_samr_LookupDomain(dce_call, mem_ctx, r2);
     122         634 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     123           0 :                         DEBUG(5,("function samr_LookupDomain will reply async\n"));
     124             :                 }
     125         634 :                 break;
     126             :         }
     127         190 :         case 6: {
     128         190 :                 struct samr_EnumDomains *r2 = (struct samr_EnumDomains *)r;
     129         190 :                 if (DEBUGLEVEL >= 10) {
     130           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomains, NDR_IN, r2);
     131             :                 }
     132         190 :                 r2->out.result = dcesrv_samr_EnumDomains(dce_call, mem_ctx, r2);
     133         190 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     134           0 :                         DEBUG(5,("function samr_EnumDomains will reply async\n"));
     135             :                 }
     136         190 :                 break;
     137             :         }
     138        1888 :         case 7: {
     139        1888 :                 struct samr_OpenDomain *r2 = (struct samr_OpenDomain *)r;
     140        1888 :                 if (DEBUGLEVEL >= 10) {
     141           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenDomain, NDR_IN, r2);
     142             :                 }
     143        1888 :                 r2->out.result = dcesrv_samr_OpenDomain(dce_call, mem_ctx, r2);
     144        1888 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     145           0 :                         DEBUG(5,("function samr_OpenDomain will reply async\n"));
     146             :                 }
     147        1718 :                 break;
     148             :         }
     149         341 :         case 8: {
     150         341 :                 struct samr_QueryDomainInfo *r2 = (struct samr_QueryDomainInfo *)r;
     151         341 :                 if (DEBUGLEVEL >= 10) {
     152           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo, NDR_IN, r2);
     153             :                 }
     154         341 :                 r2->out.result = dcesrv_samr_QueryDomainInfo(dce_call, mem_ctx, r2);
     155         341 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     156           0 :                         DEBUG(5,("function samr_QueryDomainInfo will reply async\n"));
     157             :                 }
     158         341 :                 break;
     159             :         }
     160         258 :         case 9: {
     161         258 :                 struct samr_SetDomainInfo *r2 = (struct samr_SetDomainInfo *)r;
     162         258 :                 if (DEBUGLEVEL >= 10) {
     163           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetDomainInfo, NDR_IN, r2);
     164             :                 }
     165         258 :                 r2->out.result = dcesrv_samr_SetDomainInfo(dce_call, mem_ctx, r2);
     166         258 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     167           0 :                         DEBUG(5,("function samr_SetDomainInfo will reply async\n"));
     168             :                 }
     169         258 :                 break;
     170             :         }
     171        1586 :         case 10: {
     172        1586 :                 struct samr_CreateDomainGroup *r2 = (struct samr_CreateDomainGroup *)r;
     173        1586 :                 if (DEBUGLEVEL >= 10) {
     174           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomainGroup, NDR_IN, r2);
     175             :                 }
     176        1586 :                 r2->out.result = dcesrv_samr_CreateDomainGroup(dce_call, mem_ctx, r2);
     177        1586 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     178           0 :                         DEBUG(5,("function samr_CreateDomainGroup will reply async\n"));
     179             :                 }
     180        1586 :                 break;
     181             :         }
     182         183 :         case 11: {
     183         183 :                 struct samr_EnumDomainGroups *r2 = (struct samr_EnumDomainGroups *)r;
     184         183 :                 if (DEBUGLEVEL >= 10) {
     185           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainGroups, NDR_IN, r2);
     186             :                 }
     187         183 :                 r2->out.result = dcesrv_samr_EnumDomainGroups(dce_call, mem_ctx, r2);
     188         183 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     189           0 :                         DEBUG(5,("function samr_EnumDomainGroups will reply async\n"));
     190             :                 }
     191         183 :                 break;
     192             :         }
     193        1561 :         case 12: {
     194        1561 :                 struct samr_CreateUser *r2 = (struct samr_CreateUser *)r;
     195        1561 :                 if (DEBUGLEVEL >= 10) {
     196           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser, NDR_IN, r2);
     197             :                 }
     198        1561 :                 r2->out.result = dcesrv_samr_CreateUser(dce_call, mem_ctx, r2);
     199        1561 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     200           0 :                         DEBUG(5,("function samr_CreateUser will reply async\n"));
     201             :                 }
     202        1561 :                 break;
     203             :         }
     204         123 :         case 13: {
     205         123 :                 struct samr_EnumDomainUsers *r2 = (struct samr_EnumDomainUsers *)r;
     206         123 :                 if (DEBUGLEVEL >= 10) {
     207           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainUsers, NDR_IN, r2);
     208             :                 }
     209         123 :                 r2->out.result = dcesrv_samr_EnumDomainUsers(dce_call, mem_ctx, r2);
     210         123 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     211           0 :                         DEBUG(5,("function samr_EnumDomainUsers will reply async\n"));
     212             :                 }
     213         123 :                 break;
     214             :         }
     215        1510 :         case 14: {
     216        1510 :                 struct samr_CreateDomAlias *r2 = (struct samr_CreateDomAlias *)r;
     217        1510 :                 if (DEBUGLEVEL >= 10) {
     218           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomAlias, NDR_IN, r2);
     219             :                 }
     220        1510 :                 r2->out.result = dcesrv_samr_CreateDomAlias(dce_call, mem_ctx, r2);
     221        1510 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     222           0 :                         DEBUG(5,("function samr_CreateDomAlias will reply async\n"));
     223             :                 }
     224        1510 :                 break;
     225             :         }
     226          54 :         case 15: {
     227          54 :                 struct samr_EnumDomainAliases *r2 = (struct samr_EnumDomainAliases *)r;
     228          54 :                 if (DEBUGLEVEL >= 10) {
     229           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainAliases, NDR_IN, r2);
     230             :                 }
     231          54 :                 r2->out.result = dcesrv_samr_EnumDomainAliases(dce_call, mem_ctx, r2);
     232          54 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     233           0 :                         DEBUG(5,("function samr_EnumDomainAliases will reply async\n"));
     234             :                 }
     235          54 :                 break;
     236             :         }
     237        1171 :         case 16: {
     238        1171 :                 struct samr_GetAliasMembership *r2 = (struct samr_GetAliasMembership *)r;
     239        1171 :                 if (DEBUGLEVEL >= 10) {
     240           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetAliasMembership, NDR_IN, r2);
     241             :                 }
     242        1171 :                 r2->out.result = dcesrv_samr_GetAliasMembership(dce_call, mem_ctx, r2);
     243        1171 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     244           0 :                         DEBUG(5,("function samr_GetAliasMembership will reply async\n"));
     245             :                 }
     246        1171 :                 break;
     247             :         }
     248        5839 :         case 17: {
     249        5839 :                 struct samr_LookupNames *r2 = (struct samr_LookupNames *)r;
     250        5839 :                 if (DEBUGLEVEL >= 10) {
     251           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_LookupNames, NDR_IN, r2);
     252             :                 }
     253        5839 :                 r2->out.result = dcesrv_samr_LookupNames(dce_call, mem_ctx, r2);
     254        5839 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     255           0 :                         DEBUG(5,("function samr_LookupNames will reply async\n"));
     256             :                 }
     257        5822 :                 break;
     258             :         }
     259        1389 :         case 18: {
     260        1389 :                 struct samr_LookupRids *r2 = (struct samr_LookupRids *)r;
     261        1389 :                 if (DEBUGLEVEL >= 10) {
     262           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_LookupRids, NDR_IN, r2);
     263             :                 }
     264        1389 :                 r2->out.result = dcesrv_samr_LookupRids(dce_call, mem_ctx, r2);
     265        1389 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     266           0 :                         DEBUG(5,("function samr_LookupRids will reply async\n"));
     267             :                 }
     268        1389 :                 break;
     269             :         }
     270         601 :         case 19: {
     271         601 :                 struct samr_OpenGroup *r2 = (struct samr_OpenGroup *)r;
     272         601 :                 if (DEBUGLEVEL >= 10) {
     273           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenGroup, NDR_IN, r2);
     274             :                 }
     275         601 :                 r2->out.result = dcesrv_samr_OpenGroup(dce_call, mem_ctx, r2);
     276         601 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     277           0 :                         DEBUG(5,("function samr_OpenGroup will reply async\n"));
     278             :                 }
     279         601 :                 break;
     280             :         }
     281         348 :         case 20: {
     282         348 :                 struct samr_QueryGroupInfo *r2 = (struct samr_QueryGroupInfo *)r;
     283         348 :                 if (DEBUGLEVEL >= 10) {
     284           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupInfo, NDR_IN, r2);
     285             :                 }
     286         348 :                 r2->out.result = dcesrv_samr_QueryGroupInfo(dce_call, mem_ctx, r2);
     287         348 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     288           0 :                         DEBUG(5,("function samr_QueryGroupInfo will reply async\n"));
     289             :                 }
     290         348 :                 break;
     291             :         }
     292          21 :         case 21: {
     293          21 :                 struct samr_SetGroupInfo *r2 = (struct samr_SetGroupInfo *)r;
     294          21 :                 if (DEBUGLEVEL >= 10) {
     295           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetGroupInfo, NDR_IN, r2);
     296             :                 }
     297          21 :                 r2->out.result = dcesrv_samr_SetGroupInfo(dce_call, mem_ctx, r2);
     298          21 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     299           0 :                         DEBUG(5,("function samr_SetGroupInfo will reply async\n"));
     300             :                 }
     301          21 :                 break;
     302             :         }
     303          72 :         case 22: {
     304          72 :                 struct samr_AddGroupMember *r2 = (struct samr_AddGroupMember *)r;
     305          72 :                 if (DEBUGLEVEL >= 10) {
     306           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_AddGroupMember, NDR_IN, r2);
     307             :                 }
     308          72 :                 r2->out.result = dcesrv_samr_AddGroupMember(dce_call, mem_ctx, r2);
     309          72 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     310           0 :                         DEBUG(5,("function samr_AddGroupMember will reply async\n"));
     311             :                 }
     312          72 :                 break;
     313             :         }
     314         530 :         case 23: {
     315         530 :                 struct samr_DeleteDomainGroup *r2 = (struct samr_DeleteDomainGroup *)r;
     316         530 :                 if (DEBUGLEVEL >= 10) {
     317           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomainGroup, NDR_IN, r2);
     318             :                 }
     319         530 :                 r2->out.result = dcesrv_samr_DeleteDomainGroup(dce_call, mem_ctx, r2);
     320         530 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     321           0 :                         DEBUG(5,("function samr_DeleteDomainGroup will reply async\n"));
     322             :                 }
     323         530 :                 break;
     324             :         }
     325          76 :         case 24: {
     326          76 :                 struct samr_DeleteGroupMember *r2 = (struct samr_DeleteGroupMember *)r;
     327          76 :                 if (DEBUGLEVEL >= 10) {
     328           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteGroupMember, NDR_IN, r2);
     329             :                 }
     330          76 :                 r2->out.result = dcesrv_samr_DeleteGroupMember(dce_call, mem_ctx, r2);
     331          76 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     332           0 :                         DEBUG(5,("function samr_DeleteGroupMember will reply async\n"));
     333             :                 }
     334          76 :                 break;
     335             :         }
     336         502 :         case 25: {
     337         502 :                 struct samr_QueryGroupMember *r2 = (struct samr_QueryGroupMember *)r;
     338         502 :                 if (DEBUGLEVEL >= 10) {
     339           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupMember, NDR_IN, r2);
     340             :                 }
     341         502 :                 r2->out.result = dcesrv_samr_QueryGroupMember(dce_call, mem_ctx, r2);
     342         502 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     343           0 :                         DEBUG(5,("function samr_QueryGroupMember will reply async\n"));
     344             :                 }
     345         502 :                 break;
     346             :         }
     347           0 :         case 26: {
     348           0 :                 struct samr_SetMemberAttributesOfGroup *r2 = (struct samr_SetMemberAttributesOfGroup *)r;
     349           0 :                 if (DEBUGLEVEL >= 10) {
     350           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetMemberAttributesOfGroup, NDR_IN, r2);
     351             :                 }
     352           0 :                 r2->out.result = dcesrv_samr_SetMemberAttributesOfGroup(dce_call, mem_ctx, r2);
     353           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     354           0 :                         DEBUG(5,("function samr_SetMemberAttributesOfGroup will reply async\n"));
     355             :                 }
     356           0 :                 break;
     357             :         }
     358         133 :         case 27: {
     359         133 :                 struct samr_OpenAlias *r2 = (struct samr_OpenAlias *)r;
     360         133 :                 if (DEBUGLEVEL >= 10) {
     361           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenAlias, NDR_IN, r2);
     362             :                 }
     363         133 :                 r2->out.result = dcesrv_samr_OpenAlias(dce_call, mem_ctx, r2);
     364         133 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     365           0 :                         DEBUG(5,("function samr_OpenAlias will reply async\n"));
     366             :                 }
     367         133 :                 break;
     368             :         }
     369         424 :         case 28: {
     370         424 :                 struct samr_QueryAliasInfo *r2 = (struct samr_QueryAliasInfo *)r;
     371         424 :                 if (DEBUGLEVEL >= 10) {
     372           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryAliasInfo, NDR_IN, r2);
     373             :                 }
     374         424 :                 r2->out.result = dcesrv_samr_QueryAliasInfo(dce_call, mem_ctx, r2);
     375         424 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     376           0 :                         DEBUG(5,("function samr_QueryAliasInfo will reply async\n"));
     377             :                 }
     378         424 :                 break;
     379             :         }
     380          10 :         case 29: {
     381          10 :                 struct samr_SetAliasInfo *r2 = (struct samr_SetAliasInfo *)r;
     382          10 :                 if (DEBUGLEVEL >= 10) {
     383           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetAliasInfo, NDR_IN, r2);
     384             :                 }
     385          10 :                 r2->out.result = dcesrv_samr_SetAliasInfo(dce_call, mem_ctx, r2);
     386          10 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     387           0 :                         DEBUG(5,("function samr_SetAliasInfo will reply async\n"));
     388             :                 }
     389          10 :                 break;
     390             :         }
     391         455 :         case 30: {
     392         455 :                 struct samr_DeleteDomAlias *r2 = (struct samr_DeleteDomAlias *)r;
     393         455 :                 if (DEBUGLEVEL >= 10) {
     394           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomAlias, NDR_IN, r2);
     395             :                 }
     396         455 :                 r2->out.result = dcesrv_samr_DeleteDomAlias(dce_call, mem_ctx, r2);
     397         455 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     398           0 :                         DEBUG(5,("function samr_DeleteDomAlias will reply async\n"));
     399             :                 }
     400         455 :                 break;
     401             :         }
     402           5 :         case 31: {
     403           5 :                 struct samr_AddAliasMember *r2 = (struct samr_AddAliasMember *)r;
     404           5 :                 if (DEBUGLEVEL >= 10) {
     405           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_AddAliasMember, NDR_IN, r2);
     406             :                 }
     407           5 :                 r2->out.result = dcesrv_samr_AddAliasMember(dce_call, mem_ctx, r2);
     408           5 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     409           0 :                         DEBUG(5,("function samr_AddAliasMember will reply async\n"));
     410             :                 }
     411           5 :                 break;
     412             :         }
     413           5 :         case 32: {
     414           5 :                 struct samr_DeleteAliasMember *r2 = (struct samr_DeleteAliasMember *)r;
     415           5 :                 if (DEBUGLEVEL >= 10) {
     416           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteAliasMember, NDR_IN, r2);
     417             :                 }
     418           5 :                 r2->out.result = dcesrv_samr_DeleteAliasMember(dce_call, mem_ctx, r2);
     419           5 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     420           0 :                         DEBUG(5,("function samr_DeleteAliasMember will reply async\n"));
     421             :                 }
     422           5 :                 break;
     423             :         }
     424         133 :         case 33: {
     425         133 :                 struct samr_GetMembersInAlias *r2 = (struct samr_GetMembersInAlias *)r;
     426         133 :                 if (DEBUGLEVEL >= 10) {
     427           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetMembersInAlias, NDR_IN, r2);
     428             :                 }
     429         133 :                 r2->out.result = dcesrv_samr_GetMembersInAlias(dce_call, mem_ctx, r2);
     430         133 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     431           0 :                         DEBUG(5,("function samr_GetMembersInAlias will reply async\n"));
     432             :                 }
     433         133 :                 break;
     434             :         }
     435        2206 :         case 34: {
     436        2206 :                 struct samr_OpenUser *r2 = (struct samr_OpenUser *)r;
     437        2206 :                 if (DEBUGLEVEL >= 10) {
     438           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenUser, NDR_IN, r2);
     439             :                 }
     440        2206 :                 r2->out.result = dcesrv_samr_OpenUser(dce_call, mem_ctx, r2);
     441        2206 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     442           0 :                         DEBUG(5,("function samr_OpenUser will reply async\n"));
     443             :                 }
     444        2206 :                 break;
     445             :         }
     446        1048 :         case 35: {
     447        1048 :                 struct samr_DeleteUser *r2 = (struct samr_DeleteUser *)r;
     448        1048 :                 if (DEBUGLEVEL >= 10) {
     449           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteUser, NDR_IN, r2);
     450             :                 }
     451        1048 :                 r2->out.result = dcesrv_samr_DeleteUser(dce_call, mem_ctx, r2);
     452        1048 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     453           0 :                         DEBUG(5,("function samr_DeleteUser will reply async\n"));
     454             :                 }
     455         976 :                 break;
     456             :         }
     457       10462 :         case 36: {
     458       10462 :                 struct samr_QueryUserInfo *r2 = (struct samr_QueryUserInfo *)r;
     459       10462 :                 if (DEBUGLEVEL >= 10) {
     460           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo, NDR_IN, r2);
     461             :                 }
     462       10462 :                 r2->out.result = dcesrv_samr_QueryUserInfo(dce_call, mem_ctx, r2);
     463       10462 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     464           0 :                         DEBUG(5,("function samr_QueryUserInfo will reply async\n"));
     465             :                 }
     466       10390 :                 break;
     467             :         }
     468        2744 :         case 37: {
     469        2744 :                 struct samr_SetUserInfo *r2 = (struct samr_SetUserInfo *)r;
     470        2744 :                 if (DEBUGLEVEL >= 10) {
     471           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo, NDR_IN, r2);
     472             :                 }
     473        2744 :                 r2->out.result = dcesrv_samr_SetUserInfo(dce_call, mem_ctx, r2);
     474        2744 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     475           0 :                         DEBUG(5,("function samr_SetUserInfo will reply async\n"));
     476             :                 }
     477        2672 :                 break;
     478             :         }
     479           6 :         case 38: {
     480           6 :                 struct samr_ChangePasswordUser *r2 = (struct samr_ChangePasswordUser *)r;
     481           6 :                 if (DEBUGLEVEL >= 10) {
     482           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser, NDR_IN, r2);
     483             :                 }
     484           6 :                 r2->out.result = dcesrv_samr_ChangePasswordUser(dce_call, mem_ctx, r2);
     485           6 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     486           0 :                         DEBUG(5,("function samr_ChangePasswordUser will reply async\n"));
     487             :                 }
     488           6 :                 break;
     489             :         }
     490         800 :         case 39: {
     491         800 :                 struct samr_GetGroupsForUser *r2 = (struct samr_GetGroupsForUser *)r;
     492         800 :                 if (DEBUGLEVEL >= 10) {
     493           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetGroupsForUser, NDR_IN, r2);
     494             :                 }
     495         800 :                 r2->out.result = dcesrv_samr_GetGroupsForUser(dce_call, mem_ctx, r2);
     496         800 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     497           0 :                         DEBUG(5,("function samr_GetGroupsForUser will reply async\n"));
     498             :                 }
     499         800 :                 break;
     500             :         }
     501         475 :         case 40: {
     502         475 :                 struct samr_QueryDisplayInfo *r2 = (struct samr_QueryDisplayInfo *)r;
     503         475 :                 if (DEBUGLEVEL >= 10) {
     504           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo, NDR_IN, r2);
     505             :                 }
     506         475 :                 r2->out.result = dcesrv_samr_QueryDisplayInfo(dce_call, mem_ctx, r2);
     507         475 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     508           0 :                         DEBUG(5,("function samr_QueryDisplayInfo will reply async\n"));
     509             :                 }
     510         475 :                 break;
     511             :         }
     512           4 :         case 41: {
     513           4 :                 struct samr_GetDisplayEnumerationIndex *r2 = (struct samr_GetDisplayEnumerationIndex *)r;
     514           4 :                 if (DEBUGLEVEL >= 10) {
     515           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex, NDR_IN, r2);
     516             :                 }
     517           4 :                 r2->out.result = dcesrv_samr_GetDisplayEnumerationIndex(dce_call, mem_ctx, r2);
     518           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     519           0 :                         DEBUG(5,("function samr_GetDisplayEnumerationIndex will reply async\n"));
     520             :                 }
     521           4 :                 break;
     522             :         }
     523          10 :         case 42: {
     524          10 :                 struct samr_TestPrivateFunctionsDomain *r2 = (struct samr_TestPrivateFunctionsDomain *)r;
     525          10 :                 if (DEBUGLEVEL >= 10) {
     526           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_TestPrivateFunctionsDomain, NDR_IN, r2);
     527             :                 }
     528          10 :                 r2->out.result = dcesrv_samr_TestPrivateFunctionsDomain(dce_call, mem_ctx, r2);
     529          10 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     530           0 :                         DEBUG(5,("function samr_TestPrivateFunctionsDomain will reply async\n"));
     531             :                 }
     532          10 :                 break;
     533             :         }
     534          14 :         case 43: {
     535          14 :                 struct samr_TestPrivateFunctionsUser *r2 = (struct samr_TestPrivateFunctionsUser *)r;
     536          14 :                 if (DEBUGLEVEL >= 10) {
     537           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_TestPrivateFunctionsUser, NDR_IN, r2);
     538             :                 }
     539          14 :                 r2->out.result = dcesrv_samr_TestPrivateFunctionsUser(dce_call, mem_ctx, r2);
     540          14 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     541           0 :                         DEBUG(5,("function samr_TestPrivateFunctionsUser will reply async\n"));
     542             :                 }
     543          14 :                 break;
     544             :         }
     545        1349 :         case 44: {
     546        1349 :                 struct samr_GetUserPwInfo *r2 = (struct samr_GetUserPwInfo *)r;
     547        1349 :                 if (DEBUGLEVEL >= 10) {
     548           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetUserPwInfo, NDR_IN, r2);
     549             :                 }
     550        1349 :                 r2->out.result = dcesrv_samr_GetUserPwInfo(dce_call, mem_ctx, r2);
     551        1349 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     552           0 :                         DEBUG(5,("function samr_GetUserPwInfo will reply async\n"));
     553             :                 }
     554        1277 :                 break;
     555             :         }
     556          14 :         case 45: {
     557          14 :                 struct samr_RemoveMemberFromForeignDomain *r2 = (struct samr_RemoveMemberFromForeignDomain *)r;
     558          14 :                 if (DEBUGLEVEL >= 10) {
     559           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_RemoveMemberFromForeignDomain, NDR_IN, r2);
     560             :                 }
     561          14 :                 r2->out.result = dcesrv_samr_RemoveMemberFromForeignDomain(dce_call, mem_ctx, r2);
     562          14 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     563           0 :                         DEBUG(5,("function samr_RemoveMemberFromForeignDomain will reply async\n"));
     564             :                 }
     565          14 :                 break;
     566             :         }
     567         171 :         case 46: {
     568         171 :                 struct samr_QueryDomainInfo2 *r2 = (struct samr_QueryDomainInfo2 *)r;
     569         171 :                 if (DEBUGLEVEL >= 10) {
     570           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo2, NDR_IN, r2);
     571             :                 }
     572         171 :                 r2->out.result = dcesrv_samr_QueryDomainInfo2(dce_call, mem_ctx, r2);
     573         171 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     574           0 :                         DEBUG(5,("function samr_QueryDomainInfo2 will reply async\n"));
     575             :                 }
     576         171 :                 break;
     577             :         }
     578         262 :         case 47: {
     579         262 :                 struct samr_QueryUserInfo2 *r2 = (struct samr_QueryUserInfo2 *)r;
     580         262 :                 if (DEBUGLEVEL >= 10) {
     581           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo2, NDR_IN, r2);
     582             :                 }
     583         262 :                 r2->out.result = dcesrv_samr_QueryUserInfo2(dce_call, mem_ctx, r2);
     584         262 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     585           0 :                         DEBUG(5,("function samr_QueryUserInfo2 will reply async\n"));
     586             :                 }
     587         262 :                 break;
     588             :         }
     589          54 :         case 48: {
     590          54 :                 struct samr_QueryDisplayInfo2 *r2 = (struct samr_QueryDisplayInfo2 *)r;
     591          54 :                 if (DEBUGLEVEL >= 10) {
     592           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo2, NDR_IN, r2);
     593             :                 }
     594          54 :                 r2->out.result = dcesrv_samr_QueryDisplayInfo2(dce_call, mem_ctx, r2);
     595          54 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     596           0 :                         DEBUG(5,("function samr_QueryDisplayInfo2 will reply async\n"));
     597             :                 }
     598          54 :                 break;
     599             :         }
     600           4 :         case 49: {
     601           4 :                 struct samr_GetDisplayEnumerationIndex2 *r2 = (struct samr_GetDisplayEnumerationIndex2 *)r;
     602           4 :                 if (DEBUGLEVEL >= 10) {
     603           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex2, NDR_IN, r2);
     604             :                 }
     605           4 :                 r2->out.result = dcesrv_samr_GetDisplayEnumerationIndex2(dce_call, mem_ctx, r2);
     606           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     607           0 :                         DEBUG(5,("function samr_GetDisplayEnumerationIndex2 will reply async\n"));
     608             :                 }
     609           4 :                 break;
     610             :         }
     611         789 :         case 50: {
     612         789 :                 struct samr_CreateUser2 *r2 = (struct samr_CreateUser2 *)r;
     613         789 :                 if (DEBUGLEVEL >= 10) {
     614           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser2, NDR_IN, r2);
     615             :                 }
     616         789 :                 r2->out.result = dcesrv_samr_CreateUser2(dce_call, mem_ctx, r2);
     617         789 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     618           0 :                         DEBUG(5,("function samr_CreateUser2 will reply async\n"));
     619             :                 }
     620         717 :                 break;
     621             :         }
     622          50 :         case 51: {
     623          50 :                 struct samr_QueryDisplayInfo3 *r2 = (struct samr_QueryDisplayInfo3 *)r;
     624          50 :                 if (DEBUGLEVEL >= 10) {
     625           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo3, NDR_IN, r2);
     626             :                 }
     627          50 :                 r2->out.result = dcesrv_samr_QueryDisplayInfo3(dce_call, mem_ctx, r2);
     628          50 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     629           0 :                         DEBUG(5,("function samr_QueryDisplayInfo3 will reply async\n"));
     630             :                 }
     631          50 :                 break;
     632             :         }
     633           0 :         case 52: {
     634           0 :                 struct samr_AddMultipleMembersToAlias *r2 = (struct samr_AddMultipleMembersToAlias *)r;
     635           0 :                 if (DEBUGLEVEL >= 10) {
     636           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_AddMultipleMembersToAlias, NDR_IN, r2);
     637             :                 }
     638           0 :                 r2->out.result = dcesrv_samr_AddMultipleMembersToAlias(dce_call, mem_ctx, r2);
     639           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     640           0 :                         DEBUG(5,("function samr_AddMultipleMembersToAlias will reply async\n"));
     641             :                 }
     642           0 :                 break;
     643             :         }
     644           0 :         case 53: {
     645           0 :                 struct samr_RemoveMultipleMembersFromAlias *r2 = (struct samr_RemoveMultipleMembersFromAlias *)r;
     646           0 :                 if (DEBUGLEVEL >= 10) {
     647           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_RemoveMultipleMembersFromAlias, NDR_IN, r2);
     648             :                 }
     649           0 :                 r2->out.result = dcesrv_samr_RemoveMultipleMembersFromAlias(dce_call, mem_ctx, r2);
     650           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     651           0 :                         DEBUG(5,("function samr_RemoveMultipleMembersFromAlias will reply async\n"));
     652             :                 }
     653           0 :                 break;
     654             :         }
     655          45 :         case 54: {
     656          45 :                 struct samr_OemChangePasswordUser2 *r2 = (struct samr_OemChangePasswordUser2 *)r;
     657          45 :                 if (DEBUGLEVEL >= 10) {
     658           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OemChangePasswordUser2, NDR_IN, r2);
     659             :                 }
     660          45 :                 r2->out.result = dcesrv_samr_OemChangePasswordUser2(dce_call, mem_ctx, r2);
     661          45 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     662           0 :                         DEBUG(5,("function samr_OemChangePasswordUser2 will reply async\n"));
     663             :                 }
     664          45 :                 break;
     665             :         }
     666         135 :         case 55: {
     667         135 :                 struct samr_ChangePasswordUser2 *r2 = (struct samr_ChangePasswordUser2 *)r;
     668         135 :                 if (DEBUGLEVEL >= 10) {
     669           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser2, NDR_IN, r2);
     670             :                 }
     671         135 :                 r2->out.result = dcesrv_samr_ChangePasswordUser2(dce_call, mem_ctx, r2);
     672         135 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     673           0 :                         DEBUG(5,("function samr_ChangePasswordUser2 will reply async\n"));
     674             :                 }
     675         135 :                 break;
     676             :         }
     677        2956 :         case 56: {
     678        2956 :                 struct samr_GetDomPwInfo *r2 = (struct samr_GetDomPwInfo *)r;
     679        2956 :                 if (DEBUGLEVEL >= 10) {
     680           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetDomPwInfo, NDR_IN, r2);
     681             :                 }
     682        2956 :                 r2->out.result = dcesrv_samr_GetDomPwInfo(dce_call, mem_ctx, r2);
     683        2956 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     684           0 :                         DEBUG(5,("function samr_GetDomPwInfo will reply async\n"));
     685             :                 }
     686        2476 :                 break;
     687             :         }
     688         535 :         case 57: {
     689         535 :                 struct samr_Connect2 *r2 = (struct samr_Connect2 *)r;
     690         535 :                 if (DEBUGLEVEL >= 10) {
     691           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect2, NDR_IN, r2);
     692             :                 }
     693         537 :                 r2->out.result = dcesrv_samr_Connect2(dce_call, mem_ctx, r2);
     694         535 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     695           0 :                         DEBUG(5,("function samr_Connect2 will reply async\n"));
     696             :                 }
     697         533 :                 break;
     698             :         }
     699        1729 :         case 58: {
     700        1729 :                 struct samr_SetUserInfo2 *r2 = (struct samr_SetUserInfo2 *)r;
     701        1729 :                 if (DEBUGLEVEL >= 10) {
     702           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo2, NDR_IN, r2);
     703             :                 }
     704        1729 :                 r2->out.result = dcesrv_samr_SetUserInfo2(dce_call, mem_ctx, r2);
     705        1729 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     706           0 :                         DEBUG(5,("function samr_SetUserInfo2 will reply async\n"));
     707             :                 }
     708        1657 :                 break;
     709             :         }
     710           0 :         case 59: {
     711           0 :                 struct samr_SetBootKeyInformation *r2 = (struct samr_SetBootKeyInformation *)r;
     712           0 :                 if (DEBUGLEVEL >= 10) {
     713           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetBootKeyInformation, NDR_IN, r2);
     714             :                 }
     715           0 :                 r2->out.result = dcesrv_samr_SetBootKeyInformation(dce_call, mem_ctx, r2);
     716           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     717           0 :                         DEBUG(5,("function samr_SetBootKeyInformation will reply async\n"));
     718             :                 }
     719           0 :                 break;
     720             :         }
     721          10 :         case 60: {
     722          10 :                 struct samr_GetBootKeyInformation *r2 = (struct samr_GetBootKeyInformation *)r;
     723          10 :                 if (DEBUGLEVEL >= 10) {
     724           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetBootKeyInformation, NDR_IN, r2);
     725             :                 }
     726          10 :                 r2->out.result = dcesrv_samr_GetBootKeyInformation(dce_call, mem_ctx, r2);
     727          10 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     728           0 :                         DEBUG(5,("function samr_GetBootKeyInformation will reply async\n"));
     729             :                 }
     730          10 :                 break;
     731             :         }
     732         114 :         case 61: {
     733         114 :                 struct samr_Connect3 *r2 = (struct samr_Connect3 *)r;
     734         114 :                 if (DEBUGLEVEL >= 10) {
     735           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect3, NDR_IN, r2);
     736             :                 }
     737         114 :                 r2->out.result = dcesrv_samr_Connect3(dce_call, mem_ctx, r2);
     738         114 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     739           0 :                         DEBUG(5,("function samr_Connect3 will reply async\n"));
     740             :                 }
     741         114 :                 break;
     742             :         }
     743         114 :         case 62: {
     744         114 :                 struct samr_Connect4 *r2 = (struct samr_Connect4 *)r;
     745         114 :                 if (DEBUGLEVEL >= 10) {
     746           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect4, NDR_IN, r2);
     747             :                 }
     748         114 :                 r2->out.result = dcesrv_samr_Connect4(dce_call, mem_ctx, r2);
     749         114 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     750           0 :                         DEBUG(5,("function samr_Connect4 will reply async\n"));
     751             :                 }
     752         114 :                 break;
     753             :         }
     754         440 :         case 63: {
     755         440 :                 struct samr_ChangePasswordUser3 *r2 = (struct samr_ChangePasswordUser3 *)r;
     756         440 :                 if (DEBUGLEVEL >= 10) {
     757           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser3, NDR_IN, r2);
     758             :                 }
     759         440 :                 r2->out.result = dcesrv_samr_ChangePasswordUser3(dce_call, mem_ctx, r2);
     760         440 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     761           0 :                         DEBUG(5,("function samr_ChangePasswordUser3 will reply async\n"));
     762             :                 }
     763         440 :                 break;
     764             :         }
     765         208 :         case 64: {
     766         208 :                 struct samr_Connect5 *r2 = (struct samr_Connect5 *)r;
     767         208 :                 if (DEBUGLEVEL >= 10) {
     768           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect5, NDR_IN, r2);
     769             :                 }
     770         208 :                 r2->out.result = dcesrv_samr_Connect5(dce_call, mem_ctx, r2);
     771         208 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     772           0 :                         DEBUG(5,("function samr_Connect5 will reply async\n"));
     773             :                 }
     774         208 :                 break;
     775             :         }
     776          40 :         case 65: {
     777          40 :                 struct samr_RidToSid *r2 = (struct samr_RidToSid *)r;
     778          40 :                 if (DEBUGLEVEL >= 10) {
     779           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_RidToSid, NDR_IN, r2);
     780             :                 }
     781          40 :                 r2->out.result = dcesrv_samr_RidToSid(dce_call, mem_ctx, r2);
     782          40 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     783           0 :                         DEBUG(5,("function samr_RidToSid will reply async\n"));
     784             :                 }
     785          40 :                 break;
     786             :         }
     787           0 :         case 66: {
     788           0 :                 struct samr_SetDsrmPassword *r2 = (struct samr_SetDsrmPassword *)r;
     789           0 :                 if (DEBUGLEVEL >= 10) {
     790           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetDsrmPassword, NDR_IN, r2);
     791             :                 }
     792           0 :                 r2->out.result = dcesrv_samr_SetDsrmPassword(dce_call, mem_ctx, r2);
     793           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     794           0 :                         DEBUG(5,("function samr_SetDsrmPassword will reply async\n"));
     795             :                 }
     796           0 :                 break;
     797             :         }
     798          11 :         case 67: {
     799          11 :                 struct samr_ValidatePassword *r2 = (struct samr_ValidatePassword *)r;
     800          11 :                 if (DEBUGLEVEL >= 10) {
     801           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ValidatePassword, NDR_IN, r2);
     802             :                 }
     803          11 :                 r2->out.result = dcesrv_samr_ValidatePassword(dce_call, mem_ctx, r2);
     804          11 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     805           0 :                         DEBUG(5,("function samr_ValidatePassword will reply async\n"));
     806             :                 }
     807          11 :                 break;
     808             :         }
     809             : 
     810           0 :         default:
     811           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
     812           0 :                 break;
     813             :         }
     814             : 
     815       53619 :         if (dce_call->fault_code != 0) {
     816          56 :                 return NT_STATUS_NET_WRITE_FAULT;
     817             :         }
     818             : 
     819       53563 :         return NT_STATUS_OK;
     820             : }
     821             : 
     822       53563 : static NTSTATUS samr__op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
     823             : {
     824       53563 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
     825             : 
     826       53563 :         switch (opnum) {
     827        1422 :         case 0: {
     828        1422 :                 struct samr_Connect *r2 = (struct samr_Connect *)r;
     829        1422 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     830           0 :                         DEBUG(5,("function samr_Connect replied async\n"));
     831             :                 }
     832        1422 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     833           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect, NDR_OUT | NDR_SET_VALUES, r2);
     834             :                 }
     835        1422 :                 if (dce_call->fault_code != 0) {
     836           0 :                         DEBUG(2,("dcerpc_fault %s in samr_Connect\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     837             :                 }
     838        1248 :                 break;
     839             :         }
     840        5048 :         case 1: {
     841        5048 :                 struct samr_Close *r2 = (struct samr_Close *)r;
     842        5048 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     843           0 :                         DEBUG(5,("function samr_Close replied async\n"));
     844             :                 }
     845        5048 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     846           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Close, NDR_OUT | NDR_SET_VALUES, r2);
     847             :                 }
     848        5048 :                 if (dce_call->fault_code != 0) {
     849           0 :                         DEBUG(2,("dcerpc_fault %s in samr_Close\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     850             :                 }
     851        5042 :                 break;
     852             :         }
     853           0 :         case 2: {
     854           0 :                 struct samr_SetSecurity *r2 = (struct samr_SetSecurity *)r;
     855           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     856           0 :                         DEBUG(5,("function samr_SetSecurity replied async\n"));
     857             :                 }
     858           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     859           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetSecurity, NDR_OUT | NDR_SET_VALUES, r2);
     860             :                 }
     861           0 :                 if (dce_call->fault_code != 0) {
     862           0 :                         DEBUG(2,("dcerpc_fault %s in samr_SetSecurity\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     863             :                 }
     864           0 :                 break;
     865             :         }
     866         282 :         case 3: {
     867         282 :                 struct samr_QuerySecurity *r2 = (struct samr_QuerySecurity *)r;
     868         282 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     869           0 :                         DEBUG(5,("function samr_QuerySecurity replied async\n"));
     870             :                 }
     871         282 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     872           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QuerySecurity, NDR_OUT | NDR_SET_VALUES, r2);
     873             :                 }
     874         282 :                 if (dce_call->fault_code != 0) {
     875           0 :                         DEBUG(2,("dcerpc_fault %s in samr_QuerySecurity\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     876             :                 }
     877         282 :                 break;
     878             :         }
     879           0 :         case 4: {
     880           0 :                 struct samr_Shutdown *r2 = (struct samr_Shutdown *)r;
     881           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     882           0 :                         DEBUG(5,("function samr_Shutdown replied async\n"));
     883             :                 }
     884           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     885           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Shutdown, NDR_OUT | NDR_SET_VALUES, r2);
     886             :                 }
     887           0 :                 if (dce_call->fault_code != 0) {
     888           0 :                         DEBUG(2,("dcerpc_fault %s in samr_Shutdown\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     889             :                 }
     890           0 :                 break;
     891             :         }
     892         634 :         case 5: {
     893         634 :                 struct samr_LookupDomain *r2 = (struct samr_LookupDomain *)r;
     894         634 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     895           0 :                         DEBUG(5,("function samr_LookupDomain replied async\n"));
     896             :                 }
     897         634 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     898           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_LookupDomain, NDR_OUT | NDR_SET_VALUES, r2);
     899             :                 }
     900         634 :                 if (dce_call->fault_code != 0) {
     901           0 :                         DEBUG(2,("dcerpc_fault %s in samr_LookupDomain\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     902             :                 }
     903         634 :                 break;
     904             :         }
     905         190 :         case 6: {
     906         190 :                 struct samr_EnumDomains *r2 = (struct samr_EnumDomains *)r;
     907         190 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     908           0 :                         DEBUG(5,("function samr_EnumDomains replied async\n"));
     909             :                 }
     910         190 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     911           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomains, NDR_OUT | NDR_SET_VALUES, r2);
     912             :                 }
     913         190 :                 if (dce_call->fault_code != 0) {
     914           0 :                         DEBUG(2,("dcerpc_fault %s in samr_EnumDomains\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     915             :                 }
     916         190 :                 break;
     917             :         }
     918        1878 :         case 7: {
     919        1878 :                 struct samr_OpenDomain *r2 = (struct samr_OpenDomain *)r;
     920        1878 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     921           0 :                         DEBUG(5,("function samr_OpenDomain replied async\n"));
     922             :                 }
     923        1878 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     924           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenDomain, NDR_OUT | NDR_SET_VALUES, r2);
     925             :                 }
     926        1878 :                 if (dce_call->fault_code != 0) {
     927           0 :                         DEBUG(2,("dcerpc_fault %s in samr_OpenDomain\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     928             :                 }
     929        1708 :                 break;
     930             :         }
     931         341 :         case 8: {
     932         341 :                 struct samr_QueryDomainInfo *r2 = (struct samr_QueryDomainInfo *)r;
     933         341 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     934           0 :                         DEBUG(5,("function samr_QueryDomainInfo replied async\n"));
     935             :                 }
     936         341 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     937           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo, NDR_OUT | NDR_SET_VALUES, r2);
     938             :                 }
     939         341 :                 if (dce_call->fault_code != 0) {
     940           0 :                         DEBUG(2,("dcerpc_fault %s in samr_QueryDomainInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     941             :                 }
     942         341 :                 break;
     943             :         }
     944         258 :         case 9: {
     945         258 :                 struct samr_SetDomainInfo *r2 = (struct samr_SetDomainInfo *)r;
     946         258 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     947           0 :                         DEBUG(5,("function samr_SetDomainInfo replied async\n"));
     948             :                 }
     949         258 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     950           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetDomainInfo, NDR_OUT | NDR_SET_VALUES, r2);
     951             :                 }
     952         258 :                 if (dce_call->fault_code != 0) {
     953           0 :                         DEBUG(2,("dcerpc_fault %s in samr_SetDomainInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     954             :                 }
     955         258 :                 break;
     956             :         }
     957        1586 :         case 10: {
     958        1586 :                 struct samr_CreateDomainGroup *r2 = (struct samr_CreateDomainGroup *)r;
     959        1586 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     960           0 :                         DEBUG(5,("function samr_CreateDomainGroup replied async\n"));
     961             :                 }
     962        1586 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     963           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomainGroup, NDR_OUT | NDR_SET_VALUES, r2);
     964             :                 }
     965        1586 :                 if (dce_call->fault_code != 0) {
     966           0 :                         DEBUG(2,("dcerpc_fault %s in samr_CreateDomainGroup\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     967             :                 }
     968        1586 :                 break;
     969             :         }
     970         183 :         case 11: {
     971         183 :                 struct samr_EnumDomainGroups *r2 = (struct samr_EnumDomainGroups *)r;
     972         183 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     973           0 :                         DEBUG(5,("function samr_EnumDomainGroups replied async\n"));
     974             :                 }
     975         183 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     976           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainGroups, NDR_OUT | NDR_SET_VALUES, r2);
     977             :                 }
     978         183 :                 if (dce_call->fault_code != 0) {
     979           0 :                         DEBUG(2,("dcerpc_fault %s in samr_EnumDomainGroups\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     980             :                 }
     981         183 :                 break;
     982             :         }
     983        1561 :         case 12: {
     984        1561 :                 struct samr_CreateUser *r2 = (struct samr_CreateUser *)r;
     985        1561 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     986           0 :                         DEBUG(5,("function samr_CreateUser replied async\n"));
     987             :                 }
     988        1561 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     989           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser, NDR_OUT | NDR_SET_VALUES, r2);
     990             :                 }
     991        1561 :                 if (dce_call->fault_code != 0) {
     992           0 :                         DEBUG(2,("dcerpc_fault %s in samr_CreateUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     993             :                 }
     994        1561 :                 break;
     995             :         }
     996         123 :         case 13: {
     997         123 :                 struct samr_EnumDomainUsers *r2 = (struct samr_EnumDomainUsers *)r;
     998         123 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     999           0 :                         DEBUG(5,("function samr_EnumDomainUsers replied async\n"));
    1000             :                 }
    1001         123 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1002           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainUsers, NDR_OUT | NDR_SET_VALUES, r2);
    1003             :                 }
    1004         123 :                 if (dce_call->fault_code != 0) {
    1005           0 :                         DEBUG(2,("dcerpc_fault %s in samr_EnumDomainUsers\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1006             :                 }
    1007         123 :                 break;
    1008             :         }
    1009        1510 :         case 14: {
    1010        1510 :                 struct samr_CreateDomAlias *r2 = (struct samr_CreateDomAlias *)r;
    1011        1510 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1012           0 :                         DEBUG(5,("function samr_CreateDomAlias replied async\n"));
    1013             :                 }
    1014        1510 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1015           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomAlias, NDR_OUT | NDR_SET_VALUES, r2);
    1016             :                 }
    1017        1510 :                 if (dce_call->fault_code != 0) {
    1018           0 :                         DEBUG(2,("dcerpc_fault %s in samr_CreateDomAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1019             :                 }
    1020        1510 :                 break;
    1021             :         }
    1022          54 :         case 15: {
    1023          54 :                 struct samr_EnumDomainAliases *r2 = (struct samr_EnumDomainAliases *)r;
    1024          54 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1025           0 :                         DEBUG(5,("function samr_EnumDomainAliases replied async\n"));
    1026             :                 }
    1027          54 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1028           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainAliases, NDR_OUT | NDR_SET_VALUES, r2);
    1029             :                 }
    1030          54 :                 if (dce_call->fault_code != 0) {
    1031           0 :                         DEBUG(2,("dcerpc_fault %s in samr_EnumDomainAliases\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1032             :                 }
    1033          54 :                 break;
    1034             :         }
    1035        1171 :         case 16: {
    1036        1171 :                 struct samr_GetAliasMembership *r2 = (struct samr_GetAliasMembership *)r;
    1037        1171 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1038           0 :                         DEBUG(5,("function samr_GetAliasMembership replied async\n"));
    1039             :                 }
    1040        1171 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1041           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetAliasMembership, NDR_OUT | NDR_SET_VALUES, r2);
    1042             :                 }
    1043        1171 :                 if (dce_call->fault_code != 0) {
    1044           0 :                         DEBUG(2,("dcerpc_fault %s in samr_GetAliasMembership\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1045             :                 }
    1046        1171 :                 break;
    1047             :         }
    1048        5839 :         case 17: {
    1049        5839 :                 struct samr_LookupNames *r2 = (struct samr_LookupNames *)r;
    1050        5839 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1051           0 :                         DEBUG(5,("function samr_LookupNames replied async\n"));
    1052             :                 }
    1053        5839 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1054           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_LookupNames, NDR_OUT | NDR_SET_VALUES, r2);
    1055             :                 }
    1056        5839 :                 if (dce_call->fault_code != 0) {
    1057           0 :                         DEBUG(2,("dcerpc_fault %s in samr_LookupNames\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1058             :                 }
    1059        5822 :                 break;
    1060             :         }
    1061        1389 :         case 18: {
    1062        1389 :                 struct samr_LookupRids *r2 = (struct samr_LookupRids *)r;
    1063        1389 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1064           0 :                         DEBUG(5,("function samr_LookupRids replied async\n"));
    1065             :                 }
    1066        1389 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1067           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_LookupRids, NDR_OUT | NDR_SET_VALUES, r2);
    1068             :                 }
    1069        1389 :                 if (dce_call->fault_code != 0) {
    1070           0 :                         DEBUG(2,("dcerpc_fault %s in samr_LookupRids\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1071             :                 }
    1072        1389 :                 break;
    1073             :         }
    1074         596 :         case 19: {
    1075         596 :                 struct samr_OpenGroup *r2 = (struct samr_OpenGroup *)r;
    1076         596 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1077           0 :                         DEBUG(5,("function samr_OpenGroup replied async\n"));
    1078             :                 }
    1079         596 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1080           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenGroup, NDR_OUT | NDR_SET_VALUES, r2);
    1081             :                 }
    1082         596 :                 if (dce_call->fault_code != 0) {
    1083           0 :                         DEBUG(2,("dcerpc_fault %s in samr_OpenGroup\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1084             :                 }
    1085         596 :                 break;
    1086             :         }
    1087         348 :         case 20: {
    1088         348 :                 struct samr_QueryGroupInfo *r2 = (struct samr_QueryGroupInfo *)r;
    1089         348 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1090           0 :                         DEBUG(5,("function samr_QueryGroupInfo replied async\n"));
    1091             :                 }
    1092         348 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1093           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1094             :                 }
    1095         348 :                 if (dce_call->fault_code != 0) {
    1096           0 :                         DEBUG(2,("dcerpc_fault %s in samr_QueryGroupInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1097             :                 }
    1098         348 :                 break;
    1099             :         }
    1100          21 :         case 21: {
    1101          21 :                 struct samr_SetGroupInfo *r2 = (struct samr_SetGroupInfo *)r;
    1102          21 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1103           0 :                         DEBUG(5,("function samr_SetGroupInfo replied async\n"));
    1104             :                 }
    1105          21 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1106           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetGroupInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1107             :                 }
    1108          21 :                 if (dce_call->fault_code != 0) {
    1109           0 :                         DEBUG(2,("dcerpc_fault %s in samr_SetGroupInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1110             :                 }
    1111          21 :                 break;
    1112             :         }
    1113          72 :         case 22: {
    1114          72 :                 struct samr_AddGroupMember *r2 = (struct samr_AddGroupMember *)r;
    1115          72 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1116           0 :                         DEBUG(5,("function samr_AddGroupMember replied async\n"));
    1117             :                 }
    1118          72 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1119           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_AddGroupMember, NDR_OUT | NDR_SET_VALUES, r2);
    1120             :                 }
    1121          72 :                 if (dce_call->fault_code != 0) {
    1122           0 :                         DEBUG(2,("dcerpc_fault %s in samr_AddGroupMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1123             :                 }
    1124          72 :                 break;
    1125             :         }
    1126         530 :         case 23: {
    1127         530 :                 struct samr_DeleteDomainGroup *r2 = (struct samr_DeleteDomainGroup *)r;
    1128         530 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1129           0 :                         DEBUG(5,("function samr_DeleteDomainGroup replied async\n"));
    1130             :                 }
    1131         530 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1132           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomainGroup, NDR_OUT | NDR_SET_VALUES, r2);
    1133             :                 }
    1134         530 :                 if (dce_call->fault_code != 0) {
    1135           0 :                         DEBUG(2,("dcerpc_fault %s in samr_DeleteDomainGroup\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1136             :                 }
    1137         530 :                 break;
    1138             :         }
    1139          76 :         case 24: {
    1140          76 :                 struct samr_DeleteGroupMember *r2 = (struct samr_DeleteGroupMember *)r;
    1141          76 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1142           0 :                         DEBUG(5,("function samr_DeleteGroupMember replied async\n"));
    1143             :                 }
    1144          76 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1145           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteGroupMember, NDR_OUT | NDR_SET_VALUES, r2);
    1146             :                 }
    1147          76 :                 if (dce_call->fault_code != 0) {
    1148           0 :                         DEBUG(2,("dcerpc_fault %s in samr_DeleteGroupMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1149             :                 }
    1150          76 :                 break;
    1151             :         }
    1152         502 :         case 25: {
    1153         502 :                 struct samr_QueryGroupMember *r2 = (struct samr_QueryGroupMember *)r;
    1154         502 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1155           0 :                         DEBUG(5,("function samr_QueryGroupMember replied async\n"));
    1156             :                 }
    1157         502 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1158           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupMember, NDR_OUT | NDR_SET_VALUES, r2);
    1159             :                 }
    1160         502 :                 if (dce_call->fault_code != 0) {
    1161           0 :                         DEBUG(2,("dcerpc_fault %s in samr_QueryGroupMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1162             :                 }
    1163         502 :                 break;
    1164             :         }
    1165           0 :         case 26: {
    1166           0 :                 struct samr_SetMemberAttributesOfGroup *r2 = (struct samr_SetMemberAttributesOfGroup *)r;
    1167           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1168           0 :                         DEBUG(5,("function samr_SetMemberAttributesOfGroup replied async\n"));
    1169             :                 }
    1170           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1171           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetMemberAttributesOfGroup, NDR_OUT | NDR_SET_VALUES, r2);
    1172             :                 }
    1173           0 :                 if (dce_call->fault_code != 0) {
    1174           0 :                         DEBUG(2,("dcerpc_fault %s in samr_SetMemberAttributesOfGroup\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1175             :                 }
    1176           0 :                 break;
    1177             :         }
    1178         133 :         case 27: {
    1179         133 :                 struct samr_OpenAlias *r2 = (struct samr_OpenAlias *)r;
    1180         133 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1181           0 :                         DEBUG(5,("function samr_OpenAlias replied async\n"));
    1182             :                 }
    1183         133 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1184           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenAlias, NDR_OUT | NDR_SET_VALUES, r2);
    1185             :                 }
    1186         133 :                 if (dce_call->fault_code != 0) {
    1187           0 :                         DEBUG(2,("dcerpc_fault %s in samr_OpenAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1188             :                 }
    1189         133 :                 break;
    1190             :         }
    1191         424 :         case 28: {
    1192         424 :                 struct samr_QueryAliasInfo *r2 = (struct samr_QueryAliasInfo *)r;
    1193         424 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1194           0 :                         DEBUG(5,("function samr_QueryAliasInfo replied async\n"));
    1195             :                 }
    1196         424 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1197           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryAliasInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1198             :                 }
    1199         424 :                 if (dce_call->fault_code != 0) {
    1200           0 :                         DEBUG(2,("dcerpc_fault %s in samr_QueryAliasInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1201             :                 }
    1202         424 :                 break;
    1203             :         }
    1204          10 :         case 29: {
    1205          10 :                 struct samr_SetAliasInfo *r2 = (struct samr_SetAliasInfo *)r;
    1206          10 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1207           0 :                         DEBUG(5,("function samr_SetAliasInfo replied async\n"));
    1208             :                 }
    1209          10 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1210           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetAliasInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1211             :                 }
    1212          10 :                 if (dce_call->fault_code != 0) {
    1213           0 :                         DEBUG(2,("dcerpc_fault %s in samr_SetAliasInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1214             :                 }
    1215          10 :                 break;
    1216             :         }
    1217         455 :         case 30: {
    1218         455 :                 struct samr_DeleteDomAlias *r2 = (struct samr_DeleteDomAlias *)r;
    1219         455 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1220           0 :                         DEBUG(5,("function samr_DeleteDomAlias replied async\n"));
    1221             :                 }
    1222         455 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1223           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomAlias, NDR_OUT | NDR_SET_VALUES, r2);
    1224             :                 }
    1225         455 :                 if (dce_call->fault_code != 0) {
    1226           0 :                         DEBUG(2,("dcerpc_fault %s in samr_DeleteDomAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1227             :                 }
    1228         455 :                 break;
    1229             :         }
    1230           5 :         case 31: {
    1231           5 :                 struct samr_AddAliasMember *r2 = (struct samr_AddAliasMember *)r;
    1232           5 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1233           0 :                         DEBUG(5,("function samr_AddAliasMember replied async\n"));
    1234             :                 }
    1235           5 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1236           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_AddAliasMember, NDR_OUT | NDR_SET_VALUES, r2);
    1237             :                 }
    1238           5 :                 if (dce_call->fault_code != 0) {
    1239           0 :                         DEBUG(2,("dcerpc_fault %s in samr_AddAliasMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1240             :                 }
    1241           5 :                 break;
    1242             :         }
    1243           5 :         case 32: {
    1244           5 :                 struct samr_DeleteAliasMember *r2 = (struct samr_DeleteAliasMember *)r;
    1245           5 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1246           0 :                         DEBUG(5,("function samr_DeleteAliasMember replied async\n"));
    1247             :                 }
    1248           5 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1249           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteAliasMember, NDR_OUT | NDR_SET_VALUES, r2);
    1250             :                 }
    1251           5 :                 if (dce_call->fault_code != 0) {
    1252           0 :                         DEBUG(2,("dcerpc_fault %s in samr_DeleteAliasMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1253             :                 }
    1254           5 :                 break;
    1255             :         }
    1256         133 :         case 33: {
    1257         133 :                 struct samr_GetMembersInAlias *r2 = (struct samr_GetMembersInAlias *)r;
    1258         133 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1259           0 :                         DEBUG(5,("function samr_GetMembersInAlias replied async\n"));
    1260             :                 }
    1261         133 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1262           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetMembersInAlias, NDR_OUT | NDR_SET_VALUES, r2);
    1263             :                 }
    1264         133 :                 if (dce_call->fault_code != 0) {
    1265           0 :                         DEBUG(2,("dcerpc_fault %s in samr_GetMembersInAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1266             :                 }
    1267         133 :                 break;
    1268             :         }
    1269        2201 :         case 34: {
    1270        2201 :                 struct samr_OpenUser *r2 = (struct samr_OpenUser *)r;
    1271        2201 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1272           0 :                         DEBUG(5,("function samr_OpenUser replied async\n"));
    1273             :                 }
    1274        2201 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1275           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenUser, NDR_OUT | NDR_SET_VALUES, r2);
    1276             :                 }
    1277        2201 :                 if (dce_call->fault_code != 0) {
    1278           0 :                         DEBUG(2,("dcerpc_fault %s in samr_OpenUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1279             :                 }
    1280        2201 :                 break;
    1281             :         }
    1282        1048 :         case 35: {
    1283        1048 :                 struct samr_DeleteUser *r2 = (struct samr_DeleteUser *)r;
    1284        1048 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1285           0 :                         DEBUG(5,("function samr_DeleteUser replied async\n"));
    1286             :                 }
    1287        1048 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1288           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteUser, NDR_OUT | NDR_SET_VALUES, r2);
    1289             :                 }
    1290        1048 :                 if (dce_call->fault_code != 0) {
    1291           0 :                         DEBUG(2,("dcerpc_fault %s in samr_DeleteUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1292             :                 }
    1293         976 :                 break;
    1294             :         }
    1295       10462 :         case 36: {
    1296       10462 :                 struct samr_QueryUserInfo *r2 = (struct samr_QueryUserInfo *)r;
    1297       10462 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1298           0 :                         DEBUG(5,("function samr_QueryUserInfo replied async\n"));
    1299             :                 }
    1300       10462 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1301           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1302             :                 }
    1303       10462 :                 if (dce_call->fault_code != 0) {
    1304           0 :                         DEBUG(2,("dcerpc_fault %s in samr_QueryUserInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1305             :                 }
    1306       10390 :                 break;
    1307             :         }
    1308        2744 :         case 37: {
    1309        2744 :                 struct samr_SetUserInfo *r2 = (struct samr_SetUserInfo *)r;
    1310        2744 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1311           0 :                         DEBUG(5,("function samr_SetUserInfo replied async\n"));
    1312             :                 }
    1313        2744 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1314           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1315             :                 }
    1316        2744 :                 if (dce_call->fault_code != 0) {
    1317           0 :                         DEBUG(2,("dcerpc_fault %s in samr_SetUserInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1318             :                 }
    1319        2672 :                 break;
    1320             :         }
    1321           6 :         case 38: {
    1322           6 :                 struct samr_ChangePasswordUser *r2 = (struct samr_ChangePasswordUser *)r;
    1323           6 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1324           0 :                         DEBUG(5,("function samr_ChangePasswordUser replied async\n"));
    1325             :                 }
    1326           6 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1327           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser, NDR_OUT | NDR_SET_VALUES, r2);
    1328             :                 }
    1329           6 :                 if (dce_call->fault_code != 0) {
    1330           0 :                         DEBUG(2,("dcerpc_fault %s in samr_ChangePasswordUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1331             :                 }
    1332           6 :                 break;
    1333             :         }
    1334         800 :         case 39: {
    1335         800 :                 struct samr_GetGroupsForUser *r2 = (struct samr_GetGroupsForUser *)r;
    1336         800 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1337           0 :                         DEBUG(5,("function samr_GetGroupsForUser replied async\n"));
    1338             :                 }
    1339         800 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1340           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetGroupsForUser, NDR_OUT | NDR_SET_VALUES, r2);
    1341             :                 }
    1342         800 :                 if (dce_call->fault_code != 0) {
    1343           0 :                         DEBUG(2,("dcerpc_fault %s in samr_GetGroupsForUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1344             :                 }
    1345         800 :                 break;
    1346             :         }
    1347         475 :         case 40: {
    1348         475 :                 struct samr_QueryDisplayInfo *r2 = (struct samr_QueryDisplayInfo *)r;
    1349         475 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1350           0 :                         DEBUG(5,("function samr_QueryDisplayInfo replied async\n"));
    1351             :                 }
    1352         475 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1353           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1354             :                 }
    1355         475 :                 if (dce_call->fault_code != 0) {
    1356           0 :                         DEBUG(2,("dcerpc_fault %s in samr_QueryDisplayInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1357             :                 }
    1358         475 :                 break;
    1359             :         }
    1360           0 :         case 41: {
    1361           0 :                 struct samr_GetDisplayEnumerationIndex *r2 = (struct samr_GetDisplayEnumerationIndex *)r;
    1362           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1363           0 :                         DEBUG(5,("function samr_GetDisplayEnumerationIndex replied async\n"));
    1364             :                 }
    1365           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1366           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex, NDR_OUT | NDR_SET_VALUES, r2);
    1367             :                 }
    1368           0 :                 if (dce_call->fault_code != 0) {
    1369           0 :                         DEBUG(2,("dcerpc_fault %s in samr_GetDisplayEnumerationIndex\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1370             :                 }
    1371           0 :                 break;
    1372             :         }
    1373          10 :         case 42: {
    1374          10 :                 struct samr_TestPrivateFunctionsDomain *r2 = (struct samr_TestPrivateFunctionsDomain *)r;
    1375          10 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1376           0 :                         DEBUG(5,("function samr_TestPrivateFunctionsDomain replied async\n"));
    1377             :                 }
    1378          10 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1379           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_TestPrivateFunctionsDomain, NDR_OUT | NDR_SET_VALUES, r2);
    1380             :                 }
    1381          10 :                 if (dce_call->fault_code != 0) {
    1382           0 :                         DEBUG(2,("dcerpc_fault %s in samr_TestPrivateFunctionsDomain\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1383             :                 }
    1384          10 :                 break;
    1385             :         }
    1386          14 :         case 43: {
    1387          14 :                 struct samr_TestPrivateFunctionsUser *r2 = (struct samr_TestPrivateFunctionsUser *)r;
    1388          14 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1389           0 :                         DEBUG(5,("function samr_TestPrivateFunctionsUser replied async\n"));
    1390             :                 }
    1391          14 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1392           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_TestPrivateFunctionsUser, NDR_OUT | NDR_SET_VALUES, r2);
    1393             :                 }
    1394          14 :                 if (dce_call->fault_code != 0) {
    1395           0 :                         DEBUG(2,("dcerpc_fault %s in samr_TestPrivateFunctionsUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1396             :                 }
    1397          14 :                 break;
    1398             :         }
    1399        1349 :         case 44: {
    1400        1349 :                 struct samr_GetUserPwInfo *r2 = (struct samr_GetUserPwInfo *)r;
    1401        1349 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1402           0 :                         DEBUG(5,("function samr_GetUserPwInfo replied async\n"));
    1403             :                 }
    1404        1349 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1405           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetUserPwInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1406             :                 }
    1407        1349 :                 if (dce_call->fault_code != 0) {
    1408           0 :                         DEBUG(2,("dcerpc_fault %s in samr_GetUserPwInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1409             :                 }
    1410        1277 :                 break;
    1411             :         }
    1412          14 :         case 45: {
    1413          14 :                 struct samr_RemoveMemberFromForeignDomain *r2 = (struct samr_RemoveMemberFromForeignDomain *)r;
    1414          14 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1415           0 :                         DEBUG(5,("function samr_RemoveMemberFromForeignDomain replied async\n"));
    1416             :                 }
    1417          14 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1418           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_RemoveMemberFromForeignDomain, NDR_OUT | NDR_SET_VALUES, r2);
    1419             :                 }
    1420          14 :                 if (dce_call->fault_code != 0) {
    1421           0 :                         DEBUG(2,("dcerpc_fault %s in samr_RemoveMemberFromForeignDomain\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1422             :                 }
    1423          14 :                 break;
    1424             :         }
    1425         171 :         case 46: {
    1426         171 :                 struct samr_QueryDomainInfo2 *r2 = (struct samr_QueryDomainInfo2 *)r;
    1427         171 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1428           0 :                         DEBUG(5,("function samr_QueryDomainInfo2 replied async\n"));
    1429             :                 }
    1430         171 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1431           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo2, NDR_OUT | NDR_SET_VALUES, r2);
    1432             :                 }
    1433         171 :                 if (dce_call->fault_code != 0) {
    1434           0 :                         DEBUG(2,("dcerpc_fault %s in samr_QueryDomainInfo2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1435             :                 }
    1436         171 :                 break;
    1437             :         }
    1438         262 :         case 47: {
    1439         262 :                 struct samr_QueryUserInfo2 *r2 = (struct samr_QueryUserInfo2 *)r;
    1440         262 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1441           0 :                         DEBUG(5,("function samr_QueryUserInfo2 replied async\n"));
    1442             :                 }
    1443         262 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1444           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo2, NDR_OUT | NDR_SET_VALUES, r2);
    1445             :                 }
    1446         262 :                 if (dce_call->fault_code != 0) {
    1447           0 :                         DEBUG(2,("dcerpc_fault %s in samr_QueryUserInfo2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1448             :                 }
    1449         262 :                 break;
    1450             :         }
    1451          54 :         case 48: {
    1452          54 :                 struct samr_QueryDisplayInfo2 *r2 = (struct samr_QueryDisplayInfo2 *)r;
    1453          54 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1454           0 :                         DEBUG(5,("function samr_QueryDisplayInfo2 replied async\n"));
    1455             :                 }
    1456          54 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1457           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo2, NDR_OUT | NDR_SET_VALUES, r2);
    1458             :                 }
    1459          54 :                 if (dce_call->fault_code != 0) {
    1460           0 :                         DEBUG(2,("dcerpc_fault %s in samr_QueryDisplayInfo2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1461             :                 }
    1462          54 :                 break;
    1463             :         }
    1464           0 :         case 49: {
    1465           0 :                 struct samr_GetDisplayEnumerationIndex2 *r2 = (struct samr_GetDisplayEnumerationIndex2 *)r;
    1466           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1467           0 :                         DEBUG(5,("function samr_GetDisplayEnumerationIndex2 replied async\n"));
    1468             :                 }
    1469           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1470           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex2, NDR_OUT | NDR_SET_VALUES, r2);
    1471             :                 }
    1472           0 :                 if (dce_call->fault_code != 0) {
    1473           0 :                         DEBUG(2,("dcerpc_fault %s in samr_GetDisplayEnumerationIndex2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1474             :                 }
    1475           0 :                 break;
    1476             :         }
    1477         789 :         case 50: {
    1478         789 :                 struct samr_CreateUser2 *r2 = (struct samr_CreateUser2 *)r;
    1479         789 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1480           0 :                         DEBUG(5,("function samr_CreateUser2 replied async\n"));
    1481             :                 }
    1482         789 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1483           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser2, NDR_OUT | NDR_SET_VALUES, r2);
    1484             :                 }
    1485         789 :                 if (dce_call->fault_code != 0) {
    1486           0 :                         DEBUG(2,("dcerpc_fault %s in samr_CreateUser2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1487             :                 }
    1488         717 :                 break;
    1489             :         }
    1490          50 :         case 51: {
    1491          50 :                 struct samr_QueryDisplayInfo3 *r2 = (struct samr_QueryDisplayInfo3 *)r;
    1492          50 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1493           0 :                         DEBUG(5,("function samr_QueryDisplayInfo3 replied async\n"));
    1494             :                 }
    1495          50 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1496           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo3, NDR_OUT | NDR_SET_VALUES, r2);
    1497             :                 }
    1498          50 :                 if (dce_call->fault_code != 0) {
    1499           0 :                         DEBUG(2,("dcerpc_fault %s in samr_QueryDisplayInfo3\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1500             :                 }
    1501          50 :                 break;
    1502             :         }
    1503           0 :         case 52: {
    1504           0 :                 struct samr_AddMultipleMembersToAlias *r2 = (struct samr_AddMultipleMembersToAlias *)r;
    1505           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1506           0 :                         DEBUG(5,("function samr_AddMultipleMembersToAlias replied async\n"));
    1507             :                 }
    1508           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1509           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_AddMultipleMembersToAlias, NDR_OUT | NDR_SET_VALUES, r2);
    1510             :                 }
    1511           0 :                 if (dce_call->fault_code != 0) {
    1512           0 :                         DEBUG(2,("dcerpc_fault %s in samr_AddMultipleMembersToAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1513             :                 }
    1514           0 :                 break;
    1515             :         }
    1516           0 :         case 53: {
    1517           0 :                 struct samr_RemoveMultipleMembersFromAlias *r2 = (struct samr_RemoveMultipleMembersFromAlias *)r;
    1518           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1519           0 :                         DEBUG(5,("function samr_RemoveMultipleMembersFromAlias replied async\n"));
    1520             :                 }
    1521           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1522           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_RemoveMultipleMembersFromAlias, NDR_OUT | NDR_SET_VALUES, r2);
    1523             :                 }
    1524           0 :                 if (dce_call->fault_code != 0) {
    1525           0 :                         DEBUG(2,("dcerpc_fault %s in samr_RemoveMultipleMembersFromAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1526             :                 }
    1527           0 :                 break;
    1528             :         }
    1529          45 :         case 54: {
    1530          45 :                 struct samr_OemChangePasswordUser2 *r2 = (struct samr_OemChangePasswordUser2 *)r;
    1531          45 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1532           0 :                         DEBUG(5,("function samr_OemChangePasswordUser2 replied async\n"));
    1533             :                 }
    1534          45 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1535           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OemChangePasswordUser2, NDR_OUT | NDR_SET_VALUES, r2);
    1536             :                 }
    1537          45 :                 if (dce_call->fault_code != 0) {
    1538           0 :                         DEBUG(2,("dcerpc_fault %s in samr_OemChangePasswordUser2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1539             :                 }
    1540          45 :                 break;
    1541             :         }
    1542         135 :         case 55: {
    1543         135 :                 struct samr_ChangePasswordUser2 *r2 = (struct samr_ChangePasswordUser2 *)r;
    1544         135 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1545           0 :                         DEBUG(5,("function samr_ChangePasswordUser2 replied async\n"));
    1546             :                 }
    1547         135 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1548           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser2, NDR_OUT | NDR_SET_VALUES, r2);
    1549             :                 }
    1550         135 :                 if (dce_call->fault_code != 0) {
    1551           0 :                         DEBUG(2,("dcerpc_fault %s in samr_ChangePasswordUser2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1552             :                 }
    1553         135 :                 break;
    1554             :         }
    1555        2956 :         case 56: {
    1556        2956 :                 struct samr_GetDomPwInfo *r2 = (struct samr_GetDomPwInfo *)r;
    1557        2956 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1558           0 :                         DEBUG(5,("function samr_GetDomPwInfo replied async\n"));
    1559             :                 }
    1560        2956 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1561           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetDomPwInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1562             :                 }
    1563        2956 :                 if (dce_call->fault_code != 0) {
    1564           0 :                         DEBUG(2,("dcerpc_fault %s in samr_GetDomPwInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1565             :                 }
    1566        2476 :                 break;
    1567             :         }
    1568         535 :         case 57: {
    1569         535 :                 struct samr_Connect2 *r2 = (struct samr_Connect2 *)r;
    1570         535 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1571           0 :                         DEBUG(5,("function samr_Connect2 replied async\n"));
    1572             :                 }
    1573         535 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1574           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect2, NDR_OUT | NDR_SET_VALUES, r2);
    1575             :                 }
    1576         535 :                 if (dce_call->fault_code != 0) {
    1577           0 :                         DEBUG(2,("dcerpc_fault %s in samr_Connect2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1578             :                 }
    1579         533 :                 break;
    1580             :         }
    1581        1729 :         case 58: {
    1582        1729 :                 struct samr_SetUserInfo2 *r2 = (struct samr_SetUserInfo2 *)r;
    1583        1729 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1584           0 :                         DEBUG(5,("function samr_SetUserInfo2 replied async\n"));
    1585             :                 }
    1586        1729 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1587           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo2, NDR_OUT | NDR_SET_VALUES, r2);
    1588             :                 }
    1589        1729 :                 if (dce_call->fault_code != 0) {
    1590           0 :                         DEBUG(2,("dcerpc_fault %s in samr_SetUserInfo2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1591             :                 }
    1592        1657 :                 break;
    1593             :         }
    1594           0 :         case 59: {
    1595           0 :                 struct samr_SetBootKeyInformation *r2 = (struct samr_SetBootKeyInformation *)r;
    1596           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1597           0 :                         DEBUG(5,("function samr_SetBootKeyInformation replied async\n"));
    1598             :                 }
    1599           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1600           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetBootKeyInformation, NDR_OUT | NDR_SET_VALUES, r2);
    1601             :                 }
    1602           0 :                 if (dce_call->fault_code != 0) {
    1603           0 :                         DEBUG(2,("dcerpc_fault %s in samr_SetBootKeyInformation\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1604             :                 }
    1605           0 :                 break;
    1606             :         }
    1607          10 :         case 60: {
    1608          10 :                 struct samr_GetBootKeyInformation *r2 = (struct samr_GetBootKeyInformation *)r;
    1609          10 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1610           0 :                         DEBUG(5,("function samr_GetBootKeyInformation replied async\n"));
    1611             :                 }
    1612          10 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1613           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetBootKeyInformation, NDR_OUT | NDR_SET_VALUES, r2);
    1614             :                 }
    1615          10 :                 if (dce_call->fault_code != 0) {
    1616           0 :                         DEBUG(2,("dcerpc_fault %s in samr_GetBootKeyInformation\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1617             :                 }
    1618          10 :                 break;
    1619             :         }
    1620         114 :         case 61: {
    1621         114 :                 struct samr_Connect3 *r2 = (struct samr_Connect3 *)r;
    1622         114 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1623           0 :                         DEBUG(5,("function samr_Connect3 replied async\n"));
    1624             :                 }
    1625         114 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1626           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect3, NDR_OUT | NDR_SET_VALUES, r2);
    1627             :                 }
    1628         114 :                 if (dce_call->fault_code != 0) {
    1629           0 :                         DEBUG(2,("dcerpc_fault %s in samr_Connect3\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1630             :                 }
    1631         114 :                 break;
    1632             :         }
    1633         114 :         case 62: {
    1634         114 :                 struct samr_Connect4 *r2 = (struct samr_Connect4 *)r;
    1635         114 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1636           0 :                         DEBUG(5,("function samr_Connect4 replied async\n"));
    1637             :                 }
    1638         114 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1639           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect4, NDR_OUT | NDR_SET_VALUES, r2);
    1640             :                 }
    1641         114 :                 if (dce_call->fault_code != 0) {
    1642           0 :                         DEBUG(2,("dcerpc_fault %s in samr_Connect4\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1643             :                 }
    1644         114 :                 break;
    1645             :         }
    1646         440 :         case 63: {
    1647         440 :                 struct samr_ChangePasswordUser3 *r2 = (struct samr_ChangePasswordUser3 *)r;
    1648         440 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1649           0 :                         DEBUG(5,("function samr_ChangePasswordUser3 replied async\n"));
    1650             :                 }
    1651         440 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1652           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser3, NDR_OUT | NDR_SET_VALUES, r2);
    1653             :                 }
    1654         440 :                 if (dce_call->fault_code != 0) {
    1655           0 :                         DEBUG(2,("dcerpc_fault %s in samr_ChangePasswordUser3\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1656             :                 }
    1657         440 :                 break;
    1658             :         }
    1659         208 :         case 64: {
    1660         208 :                 struct samr_Connect5 *r2 = (struct samr_Connect5 *)r;
    1661         208 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1662           0 :                         DEBUG(5,("function samr_Connect5 replied async\n"));
    1663             :                 }
    1664         208 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1665           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect5, NDR_OUT | NDR_SET_VALUES, r2);
    1666             :                 }
    1667         208 :                 if (dce_call->fault_code != 0) {
    1668           0 :                         DEBUG(2,("dcerpc_fault %s in samr_Connect5\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1669             :                 }
    1670         208 :                 break;
    1671             :         }
    1672          40 :         case 65: {
    1673          40 :                 struct samr_RidToSid *r2 = (struct samr_RidToSid *)r;
    1674          40 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1675           0 :                         DEBUG(5,("function samr_RidToSid replied async\n"));
    1676             :                 }
    1677          40 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1678           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_RidToSid, NDR_OUT | NDR_SET_VALUES, r2);
    1679             :                 }
    1680          40 :                 if (dce_call->fault_code != 0) {
    1681           0 :                         DEBUG(2,("dcerpc_fault %s in samr_RidToSid\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1682             :                 }
    1683          40 :                 break;
    1684             :         }
    1685           0 :         case 66: {
    1686           0 :                 struct samr_SetDsrmPassword *r2 = (struct samr_SetDsrmPassword *)r;
    1687           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1688           0 :                         DEBUG(5,("function samr_SetDsrmPassword replied async\n"));
    1689             :                 }
    1690           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1691           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetDsrmPassword, NDR_OUT | NDR_SET_VALUES, r2);
    1692             :                 }
    1693           0 :                 if (dce_call->fault_code != 0) {
    1694           0 :                         DEBUG(2,("dcerpc_fault %s in samr_SetDsrmPassword\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1695             :                 }
    1696           0 :                 break;
    1697             :         }
    1698           9 :         case 67: {
    1699           9 :                 struct samr_ValidatePassword *r2 = (struct samr_ValidatePassword *)r;
    1700           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1701           0 :                         DEBUG(5,("function samr_ValidatePassword replied async\n"));
    1702             :                 }
    1703           9 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1704           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ValidatePassword, NDR_OUT | NDR_SET_VALUES, r2);
    1705             :                 }
    1706           9 :                 if (dce_call->fault_code != 0) {
    1707           0 :                         DEBUG(2,("dcerpc_fault %s in samr_ValidatePassword\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1708             :                 }
    1709           9 :                 break;
    1710             :         }
    1711             : 
    1712           0 :         default:
    1713           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
    1714           0 :                 break;
    1715             :         }
    1716             : 
    1717       53563 :         if (dce_call->fault_code != 0) {
    1718           0 :                 return NT_STATUS_NET_WRITE_FAULT;
    1719             :         }
    1720             : 
    1721       53563 :         return NT_STATUS_OK;
    1722             : }
    1723             : 
    1724       53563 : static NTSTATUS samr__op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
    1725             : {
    1726             :         enum ndr_err_code ndr_err;
    1727       53563 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
    1728             : 
    1729       53563 :         ndr_err = ndr_table_samr.calls[opnum].ndr_push(push, NDR_OUT, r);
    1730       53563 :         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1731           0 :                 dce_call->fault_code = DCERPC_FAULT_NDR;
    1732           0 :                 return NT_STATUS_NET_WRITE_FAULT;
    1733             :         }
    1734             : 
    1735       53563 :         return NT_STATUS_OK;
    1736             : }
    1737             : 
    1738             : static const struct dcesrv_interface dcesrv_samr_interface = {
    1739             :         .name               = "samr",
    1740             :         .syntax_id          = {{0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xac}},1.0},
    1741             :         .bind               = samr__op_bind,
    1742             :         .unbind             = samr__op_unbind,
    1743             :         .ndr_pull           = samr__op_ndr_pull,
    1744             :         .dispatch           = samr__op_dispatch,
    1745             :         .reply              = samr__op_reply,
    1746             :         .ndr_push           = samr__op_ndr_push,
    1747             :         .local              = NULL,
    1748             : #ifdef DCESRV_INTERFACE_SAMR_FLAGS
    1749             :         .flags              = DCESRV_INTERFACE_SAMR_FLAGS
    1750             : #else
    1751             :         .flags              = 0
    1752             : #endif
    1753             : };
    1754             : 
    1755             : 
    1756          62 : static NTSTATUS samr__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
    1757             : {
    1758             :         int i;
    1759             : #ifdef DCESRV_INTERFACE_SAMR_NCACN_NP_SECONDARY_ENDPOINT
    1760             :         const char *ncacn_np_secondary_endpoint =
    1761             :                 DCESRV_INTERFACE_SAMR_NCACN_NP_SECONDARY_ENDPOINT;
    1762             : #else
    1763          62 :         const char *ncacn_np_secondary_endpoint = NULL;
    1764             : #endif
    1765             : 
    1766         248 :         for (i=0;i<ndr_table_samr.endpoints->count;i++) {
    1767             :                 NTSTATUS ret;
    1768         186 :                 const char *name = ndr_table_samr.endpoints->names[i];
    1769             : 
    1770         186 :                 ret = dcesrv_interface_register(dce_ctx,
    1771             :                                                 name,
    1772             :                                                 ncacn_np_secondary_endpoint,
    1773             :                                                 &dcesrv_samr_interface,
    1774             :                                                 NULL);
    1775         186 :                 if (!NT_STATUS_IS_OK(ret)) {
    1776           0 :                         DEBUG(1,("samr_op_init_server: failed to register endpoint '%s'\n",name));
    1777           0 :                         return ret;
    1778             :                 }
    1779             :         }
    1780             : 
    1781          62 :         return NT_STATUS_OK;
    1782             : }
    1783             : 
    1784           0 : static NTSTATUS samr__op_shutdown_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
    1785             : {
    1786           0 :         return NT_STATUS_OK;
    1787             : }
    1788             : 
    1789           0 : static bool samr__op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
    1790             : {
    1791           0 :         if (dcesrv_samr_interface.syntax_id.if_version == if_version &&
    1792           0 :                 GUID_equal(&dcesrv_samr_interface.syntax_id.uuid, uuid)) {
    1793           0 :                 memcpy(iface,&dcesrv_samr_interface, sizeof(*iface));
    1794           0 :                 return true;
    1795             :         }
    1796             : 
    1797           0 :         return false;
    1798             : }
    1799             : 
    1800           0 : static bool samr__op_interface_by_name(struct dcesrv_interface *iface, const char *name)
    1801             : {
    1802           0 :         if (strcmp(dcesrv_samr_interface.name, name)==0) {
    1803           0 :                 memcpy(iface, &dcesrv_samr_interface, sizeof(*iface));
    1804           0 :                 return true;
    1805             :         }
    1806             : 
    1807           0 :         return false;
    1808             : }
    1809             : 
    1810          64 : NTSTATUS dcerpc_server_samr_init(TALLOC_CTX *ctx)
    1811             : {
    1812             :         NTSTATUS ret;
    1813             :         static const struct dcesrv_endpoint_server ep_server = {
    1814             :             /* fill in our name */
    1815             :             .name = "samr",
    1816             : 
    1817             :             /* Initialization flag */
    1818             :             .initialized = false,
    1819             : 
    1820             :             /* fill in all the operations */
    1821             : #ifdef DCESRV_INTERFACE_SAMR_INIT_SERVER
    1822             :             .init_server = DCESRV_INTERFACE_SAMR_INIT_SERVER,
    1823             : #else
    1824             :             .init_server = samr__op_init_server,
    1825             : #endif
    1826             : #ifdef DCESRV_INTERFACE_SAMR_SHUTDOWN_SERVER
    1827             :             .shutdown_server = DCESRV_INTERFACE_SAMR_SHUTDOWN_SERVER,
    1828             : #else
    1829             :             .shutdown_server = samr__op_shutdown_server,
    1830             : #endif
    1831             :             .interface_by_uuid = samr__op_interface_by_uuid,
    1832             :             .interface_by_name = samr__op_interface_by_name
    1833             :         };
    1834             :         /* register ourselves with the DCERPC subsystem. */
    1835          64 :         ret = dcerpc_register_ep_server(&ep_server);
    1836             : 
    1837          64 :         if (!NT_STATUS_IS_OK(ret)) {
    1838           0 :                 DEBUG(0,("Failed to register 'samr' endpoint server!\n"));
    1839           0 :                 return ret;
    1840             :         }
    1841             : 
    1842          64 :         return ret;
    1843             : }
    1844             : 

Generated by: LCOV version 1.13