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

Generated by: LCOV version 1.14