LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_samr_scompat.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 916 1516 60.4 %
Date: 2021-09-23 10:06:22 Functions: 12 14 85.7 %

          Line data    Source code
       1             : /* s3 compat server functions auto-generated by pidl */
       2             : #include "bin/default/librpc/gen_ndr/ndr_samr.h"
       3             : #include "bin/default/librpc/gen_ndr/ndr_samr_scompat.h"
       4             : #include <librpc/rpc/dcesrv_core.h>
       5             : #include <rpc_server/rpc_config.h>
       6             : #include <rpc_server/rpc_server.h>
       7             : #include <util/debug.h>
       8             : 
       9             : enum s3compat_rpc_dispatch {
      10             :         S3COMPAT_RPC_DISPATCH_EXTERNAL = 0x00000001,
      11             :         S3COMPAT_RPC_DISPATCH_INTERNAL = 0x00000002,
      12             : };
      13             : 
      14             : /* samr - dcerpc server boilerplate generated by pidl */
      15         194 : static NTSTATUS samr__op_bind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
      16             : {
      17         194 :         struct pipes_struct *p = NULL;
      18             : 
      19             :         /* Retrieve pipes struct */
      20         194 :         p = dcesrv_get_pipes_struct(context->conn);
      21         194 :         p->pipe_bound = true;
      22             : #ifdef DCESRV_INTERFACE_SAMR_BIND
      23             :         return DCESRV_INTERFACE_SAMR_BIND(context,iface);
      24             : #else
      25         194 :         return NT_STATUS_OK;
      26             : #endif
      27             : }
      28             : 
      29         145 : static void samr__op_unbind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
      30             : {
      31             : #ifdef DCESRV_INTERFACE_SAMR_UNBIND
      32             :         DCESRV_INTERFACE_SAMR_UNBIND(context, iface);
      33             : #else
      34         145 :         return;
      35             : #endif
      36             : }
      37             : 
      38        8349 : NTSTATUS samr__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
      39             : {
      40             :         enum ndr_err_code ndr_err;
      41        8349 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
      42             : 
      43        8349 :         dce_call->fault_code = 0;
      44             : 
      45        8349 :         if (opnum >= ndr_table_samr.num_calls) {
      46           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
      47           0 :                 return NT_STATUS_NET_WRITE_FAULT;
      48             :         }
      49             : 
      50        8349 :         *r = talloc_named(mem_ctx, ndr_table_samr.calls[opnum].struct_size, "struct %s", ndr_table_samr.calls[opnum].name);
      51        8349 :         NT_STATUS_HAVE_NO_MEMORY(*r);
      52             : 
      53             :         /* unravel the NDR for the packet */
      54        8349 :         ndr_err = ndr_table_samr.calls[opnum].ndr_pull(pull, NDR_IN, *r);
      55        8349 :         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
      56           0 :                 dce_call->fault_code = DCERPC_FAULT_NDR;
      57           0 :                 return NT_STATUS_NET_WRITE_FAULT;
      58             :         }
      59             : 
      60        8349 :         return NT_STATUS_OK;
      61             : }
      62             : 
      63        8349 : static NTSTATUS samr__op_dispatch_internal(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r, enum s3compat_rpc_dispatch dispatch)
      64             : {
      65        8349 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
      66        8349 :         struct pipes_struct *p = NULL;
      67        8349 :         struct auth_session_info *pipe_session_info = NULL;
      68        8349 :         NTSTATUS status = NT_STATUS_OK;
      69        8349 :         bool impersonated = false;
      70             : 
      71             :         /* Retrieve pipes struct */
      72        8349 :         p = dcesrv_get_pipes_struct(dce_call->conn);
      73             :         /* Update pipes struct opnum */
      74        8349 :         p->opnum = opnum;
      75        8349 :         p->dce_call = dce_call;
      76        8349 :         p->mem_ctx = mem_ctx;
      77             :         /* Update pipes struct session info */
      78        8349 :         pipe_session_info = p->session_info;
      79        8349 :         p->session_info = dce_call->auth_state->session_info;
      80        8349 :         p->auth.auth_type = dce_call->auth_state->auth_type;
      81        8349 :         p->auth.auth_level = dce_call->auth_state->auth_level;
      82        8349 :         p->auth.auth_context_id = dce_call->auth_state->auth_context_id;
      83             :         /* Reset pipes struct fault state */
      84        8349 :         p->fault_state = 0;
      85             : 
      86             :         /* Impersonate */
      87        8349 :         if (dispatch == S3COMPAT_RPC_DISPATCH_EXTERNAL) {
      88        7801 :                 impersonated = become_authenticated_pipe_user(p->session_info);
      89        7801 :                 if (!impersonated) {
      90           0 :                         dce_call->fault_code = DCERPC_FAULT_ACCESS_DENIED;
      91           0 :                         status = NT_STATUS_NET_WRITE_FAULT;
      92           0 :                         goto fail;
      93             :                 }
      94             :         }
      95             : 
      96        8349 :         switch (opnum) {
      97         176 :         case 0: { /* samr_Connect */
      98         176 :                 struct samr_Connect *r2 = (struct samr_Connect *)r;
      99         176 :                 if (DEBUGLEVEL >= 10) {
     100           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect, NDR_IN, r2);
     101             :                 }
     102         176 :                 NDR_ZERO_STRUCT(r2->out);
     103         176 :                 r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
     104         176 :                 if (r2->out.connect_handle == NULL) {
     105           0 :                         status = NT_STATUS_NO_MEMORY;
     106           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     107           0 :                         goto fail;
     108             :                 }
     109             : 
     110         176 :                 r2->out.result = _samr_Connect(p, r2);
     111         176 :                 break;
     112             :         }
     113        1503 :         case 1: { /* samr_Close */
     114        1503 :                 struct samr_Close *r2 = (struct samr_Close *)r;
     115        1503 :                 if (DEBUGLEVEL >= 10) {
     116           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Close, NDR_IN, r2);
     117             :                 }
     118        1503 :                 NDR_ZERO_STRUCT(r2->out);
     119        1503 :                 r2->out.handle = r2->in.handle;
     120        1503 :                 r2->out.result = _samr_Close(p, r2);
     121        1503 :                 break;
     122             :         }
     123           4 :         case 2: { /* samr_SetSecurity */
     124           4 :                 struct samr_SetSecurity *r2 = (struct samr_SetSecurity *)r;
     125           4 :                 if (DEBUGLEVEL >= 10) {
     126           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetSecurity, NDR_IN, r2);
     127             :                 }
     128           4 :                 r2->out.result = _samr_SetSecurity(p, r2);
     129           4 :                 break;
     130             :         }
     131           8 :         case 3: { /* samr_QuerySecurity */
     132           8 :                 struct samr_QuerySecurity *r2 = (struct samr_QuerySecurity *)r;
     133           8 :                 if (DEBUGLEVEL >= 10) {
     134           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QuerySecurity, NDR_IN, r2);
     135             :                 }
     136           8 :                 NDR_ZERO_STRUCT(r2->out);
     137           8 :                 r2->out.sdbuf = talloc_zero(r2, struct sec_desc_buf *);
     138           8 :                 if (r2->out.sdbuf == NULL) {
     139           0 :                         status = NT_STATUS_NO_MEMORY;
     140           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     141           0 :                         goto fail;
     142             :                 }
     143             : 
     144           8 :                 r2->out.result = _samr_QuerySecurity(p, r2);
     145           8 :                 break;
     146             :         }
     147           0 :         case 4: { /* samr_Shutdown */
     148           0 :                 struct samr_Shutdown *r2 = (struct samr_Shutdown *)r;
     149           0 :                 if (DEBUGLEVEL >= 10) {
     150           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Shutdown, NDR_IN, r2);
     151             :                 }
     152           0 :                 r2->out.result = _samr_Shutdown(p, r2);
     153           0 :                 break;
     154             :         }
     155         222 :         case 5: { /* samr_LookupDomain */
     156         222 :                 struct samr_LookupDomain *r2 = (struct samr_LookupDomain *)r;
     157         222 :                 if (DEBUGLEVEL >= 10) {
     158           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_LookupDomain, NDR_IN, r2);
     159             :                 }
     160         222 :                 NDR_ZERO_STRUCT(r2->out);
     161         222 :                 r2->out.sid = talloc_zero(r2, struct dom_sid2 *);
     162         222 :                 if (r2->out.sid == NULL) {
     163           0 :                         status = NT_STATUS_NO_MEMORY;
     164           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     165           0 :                         goto fail;
     166             :                 }
     167             : 
     168         222 :                 r2->out.result = _samr_LookupDomain(p, r2);
     169         222 :                 break;
     170             :         }
     171          57 :         case 6: { /* samr_EnumDomains */
     172          57 :                 struct samr_EnumDomains *r2 = (struct samr_EnumDomains *)r;
     173          57 :                 if (DEBUGLEVEL >= 10) {
     174           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomains, NDR_IN, r2);
     175             :                 }
     176          57 :                 NDR_ZERO_STRUCT(r2->out);
     177          57 :                 r2->out.resume_handle = r2->in.resume_handle;
     178          57 :                 r2->out.sam = talloc_zero(r2, struct samr_SamArray *);
     179          57 :                 if (r2->out.sam == NULL) {
     180           0 :                         status = NT_STATUS_NO_MEMORY;
     181           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     182           0 :                         goto fail;
     183             :                 }
     184             : 
     185          57 :                 r2->out.num_entries = talloc_zero(r2, uint32_t);
     186          57 :                 if (r2->out.num_entries == NULL) {
     187           0 :                         status = NT_STATUS_NO_MEMORY;
     188           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     189           0 :                         goto fail;
     190             :                 }
     191             : 
     192          57 :                 r2->out.result = _samr_EnumDomains(p, r2);
     193          57 :                 break;
     194             :         }
     195         256 :         case 7: { /* samr_OpenDomain */
     196         256 :                 struct samr_OpenDomain *r2 = (struct samr_OpenDomain *)r;
     197         256 :                 if (DEBUGLEVEL >= 10) {
     198           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenDomain, NDR_IN, r2);
     199             :                 }
     200         256 :                 NDR_ZERO_STRUCT(r2->out);
     201         256 :                 r2->out.domain_handle = talloc_zero(r2, struct policy_handle);
     202         256 :                 if (r2->out.domain_handle == NULL) {
     203           0 :                         status = NT_STATUS_NO_MEMORY;
     204           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     205           0 :                         goto fail;
     206             :                 }
     207             : 
     208         256 :                 r2->out.result = _samr_OpenDomain(p, r2);
     209         256 :                 break;
     210             :         }
     211          70 :         case 8: { /* samr_QueryDomainInfo */
     212          70 :                 struct samr_QueryDomainInfo *r2 = (struct samr_QueryDomainInfo *)r;
     213          70 :                 if (DEBUGLEVEL >= 10) {
     214           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo, NDR_IN, r2);
     215             :                 }
     216          70 :                 NDR_ZERO_STRUCT(r2->out);
     217          70 :                 r2->out.info = talloc_zero(r2, union samr_DomainInfo *);
     218          70 :                 if (r2->out.info == NULL) {
     219           0 :                         status = NT_STATUS_NO_MEMORY;
     220           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     221           0 :                         goto fail;
     222             :                 }
     223             : 
     224          70 :                 r2->out.result = _samr_QueryDomainInfo(p, r2);
     225          70 :                 break;
     226             :         }
     227          62 :         case 9: { /* samr_SetDomainInfo */
     228          62 :                 struct samr_SetDomainInfo *r2 = (struct samr_SetDomainInfo *)r;
     229          62 :                 if (DEBUGLEVEL >= 10) {
     230           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetDomainInfo, NDR_IN, r2);
     231             :                 }
     232          62 :                 r2->out.result = _samr_SetDomainInfo(p, r2);
     233          62 :                 break;
     234             :         }
     235         452 :         case 10: { /* samr_CreateDomainGroup */
     236         452 :                 struct samr_CreateDomainGroup *r2 = (struct samr_CreateDomainGroup *)r;
     237         452 :                 if (DEBUGLEVEL >= 10) {
     238           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomainGroup, NDR_IN, r2);
     239             :                 }
     240         452 :                 NDR_ZERO_STRUCT(r2->out);
     241         452 :                 r2->out.group_handle = talloc_zero(r2, struct policy_handle);
     242         452 :                 if (r2->out.group_handle == NULL) {
     243           0 :                         status = NT_STATUS_NO_MEMORY;
     244           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     245           0 :                         goto fail;
     246             :                 }
     247             : 
     248         452 :                 r2->out.rid = talloc_zero(r2, uint32_t);
     249         452 :                 if (r2->out.rid == NULL) {
     250           0 :                         status = NT_STATUS_NO_MEMORY;
     251           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     252           0 :                         goto fail;
     253             :                 }
     254             : 
     255         452 :                 r2->out.result = _samr_CreateDomainGroup(p, r2);
     256         451 :                 break;
     257             :         }
     258           6 :         case 11: { /* samr_EnumDomainGroups */
     259           6 :                 struct samr_EnumDomainGroups *r2 = (struct samr_EnumDomainGroups *)r;
     260           6 :                 if (DEBUGLEVEL >= 10) {
     261           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainGroups, NDR_IN, r2);
     262             :                 }
     263           6 :                 NDR_ZERO_STRUCT(r2->out);
     264           6 :                 r2->out.resume_handle = r2->in.resume_handle;
     265           6 :                 r2->out.sam = talloc_zero(r2, struct samr_SamArray *);
     266           6 :                 if (r2->out.sam == NULL) {
     267           0 :                         status = NT_STATUS_NO_MEMORY;
     268           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     269           0 :                         goto fail;
     270             :                 }
     271             : 
     272           6 :                 r2->out.num_entries = talloc_zero(r2, uint32_t);
     273           6 :                 if (r2->out.num_entries == NULL) {
     274           0 :                         status = NT_STATUS_NO_MEMORY;
     275           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     276           0 :                         goto fail;
     277             :                 }
     278             : 
     279           6 :                 r2->out.result = _samr_EnumDomainGroups(p, r2);
     280           6 :                 break;
     281             :         }
     282         623 :         case 12: { /* samr_CreateUser */
     283         623 :                 struct samr_CreateUser *r2 = (struct samr_CreateUser *)r;
     284         623 :                 if (DEBUGLEVEL >= 10) {
     285           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser, NDR_IN, r2);
     286             :                 }
     287         623 :                 NDR_ZERO_STRUCT(r2->out);
     288         623 :                 r2->out.user_handle = talloc_zero(r2, struct policy_handle);
     289         623 :                 if (r2->out.user_handle == NULL) {
     290           0 :                         status = NT_STATUS_NO_MEMORY;
     291           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     292           0 :                         goto fail;
     293             :                 }
     294             : 
     295         623 :                 r2->out.rid = talloc_zero(r2, uint32_t);
     296         623 :                 if (r2->out.rid == NULL) {
     297           0 :                         status = NT_STATUS_NO_MEMORY;
     298           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     299           0 :                         goto fail;
     300             :                 }
     301             : 
     302         623 :                 r2->out.result = _samr_CreateUser(p, r2);
     303         623 :                 break;
     304             :         }
     305          20 :         case 13: { /* samr_EnumDomainUsers */
     306          20 :                 struct samr_EnumDomainUsers *r2 = (struct samr_EnumDomainUsers *)r;
     307          20 :                 if (DEBUGLEVEL >= 10) {
     308           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainUsers, NDR_IN, r2);
     309             :                 }
     310          20 :                 NDR_ZERO_STRUCT(r2->out);
     311          20 :                 r2->out.resume_handle = r2->in.resume_handle;
     312          20 :                 r2->out.sam = talloc_zero(r2, struct samr_SamArray *);
     313          20 :                 if (r2->out.sam == NULL) {
     314           0 :                         status = NT_STATUS_NO_MEMORY;
     315           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     316           0 :                         goto fail;
     317             :                 }
     318             : 
     319          20 :                 r2->out.num_entries = talloc_zero(r2, uint32_t);
     320          20 :                 if (r2->out.num_entries == NULL) {
     321           0 :                         status = NT_STATUS_NO_MEMORY;
     322           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     323           0 :                         goto fail;
     324             :                 }
     325             : 
     326          20 :                 r2->out.result = _samr_EnumDomainUsers(p, r2);
     327          20 :                 break;
     328             :         }
     329         302 :         case 14: { /* samr_CreateDomAlias */
     330         302 :                 struct samr_CreateDomAlias *r2 = (struct samr_CreateDomAlias *)r;
     331         302 :                 if (DEBUGLEVEL >= 10) {
     332           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomAlias, NDR_IN, r2);
     333             :                 }
     334         302 :                 NDR_ZERO_STRUCT(r2->out);
     335         302 :                 r2->out.alias_handle = talloc_zero(r2, struct policy_handle);
     336         302 :                 if (r2->out.alias_handle == NULL) {
     337           0 :                         status = NT_STATUS_NO_MEMORY;
     338           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     339           0 :                         goto fail;
     340             :                 }
     341             : 
     342         302 :                 r2->out.rid = talloc_zero(r2, uint32_t);
     343         302 :                 if (r2->out.rid == NULL) {
     344           0 :                         status = NT_STATUS_NO_MEMORY;
     345           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     346           0 :                         goto fail;
     347             :                 }
     348             : 
     349         302 :                 r2->out.result = _samr_CreateDomAlias(p, r2);
     350         302 :                 break;
     351             :         }
     352           8 :         case 15: { /* samr_EnumDomainAliases */
     353           8 :                 struct samr_EnumDomainAliases *r2 = (struct samr_EnumDomainAliases *)r;
     354           8 :                 if (DEBUGLEVEL >= 10) {
     355           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainAliases, NDR_IN, r2);
     356             :                 }
     357           8 :                 NDR_ZERO_STRUCT(r2->out);
     358           8 :                 r2->out.resume_handle = r2->in.resume_handle;
     359           8 :                 r2->out.sam = talloc_zero(r2, struct samr_SamArray *);
     360           8 :                 if (r2->out.sam == NULL) {
     361           0 :                         status = NT_STATUS_NO_MEMORY;
     362           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     363           0 :                         goto fail;
     364             :                 }
     365             : 
     366           8 :                 r2->out.num_entries = talloc_zero(r2, uint32_t);
     367           8 :                 if (r2->out.num_entries == NULL) {
     368           0 :                         status = NT_STATUS_NO_MEMORY;
     369           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     370           0 :                         goto fail;
     371             :                 }
     372             : 
     373           8 :                 r2->out.result = _samr_EnumDomainAliases(p, r2);
     374           8 :                 break;
     375             :         }
     376           4 :         case 16: { /* samr_GetAliasMembership */
     377           4 :                 struct samr_GetAliasMembership *r2 = (struct samr_GetAliasMembership *)r;
     378           4 :                 if (DEBUGLEVEL >= 10) {
     379           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetAliasMembership, NDR_IN, r2);
     380             :                 }
     381           4 :                 NDR_ZERO_STRUCT(r2->out);
     382           4 :                 r2->out.rids = talloc_zero(r2, struct samr_Ids);
     383           4 :                 if (r2->out.rids == NULL) {
     384           0 :                         status = NT_STATUS_NO_MEMORY;
     385           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     386           0 :                         goto fail;
     387             :                 }
     388             : 
     389           4 :                 r2->out.result = _samr_GetAliasMembership(p, r2);
     390           4 :                 break;
     391             :         }
     392         277 :         case 17: { /* samr_LookupNames */
     393         277 :                 struct samr_LookupNames *r2 = (struct samr_LookupNames *)r;
     394         277 :                 if (DEBUGLEVEL >= 10) {
     395           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_LookupNames, NDR_IN, r2);
     396             :                 }
     397         277 :                 NDR_ZERO_STRUCT(r2->out);
     398         277 :                 r2->out.rids = talloc_zero(r2, struct samr_Ids);
     399         277 :                 if (r2->out.rids == NULL) {
     400           0 :                         status = NT_STATUS_NO_MEMORY;
     401           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     402           0 :                         goto fail;
     403             :                 }
     404             : 
     405         277 :                 r2->out.types = talloc_zero(r2, struct samr_Ids);
     406         277 :                 if (r2->out.types == NULL) {
     407           0 :                         status = NT_STATUS_NO_MEMORY;
     408           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     409           0 :                         goto fail;
     410             :                 }
     411             : 
     412         277 :                 r2->out.result = _samr_LookupNames(p, r2);
     413         277 :                 break;
     414             :         }
     415           2 :         case 18: { /* samr_LookupRids */
     416           2 :                 struct samr_LookupRids *r2 = (struct samr_LookupRids *)r;
     417           2 :                 if (DEBUGLEVEL >= 10) {
     418           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_LookupRids, NDR_IN, r2);
     419             :                 }
     420           2 :                 NDR_ZERO_STRUCT(r2->out);
     421           2 :                 r2->out.names = talloc_zero(r2, struct lsa_Strings);
     422           2 :                 if (r2->out.names == NULL) {
     423           0 :                         status = NT_STATUS_NO_MEMORY;
     424           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     425           0 :                         goto fail;
     426             :                 }
     427             : 
     428           2 :                 r2->out.types = talloc_zero(r2, struct samr_Ids);
     429           2 :                 if (r2->out.types == NULL) {
     430           0 :                         status = NT_STATUS_NO_MEMORY;
     431           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     432           0 :                         goto fail;
     433             :                 }
     434             : 
     435           2 :                 r2->out.result = _samr_LookupRids(p, r2);
     436           2 :                 break;
     437             :         }
     438          10 :         case 19: { /* samr_OpenGroup */
     439          10 :                 struct samr_OpenGroup *r2 = (struct samr_OpenGroup *)r;
     440          10 :                 if (DEBUGLEVEL >= 10) {
     441           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenGroup, NDR_IN, r2);
     442             :                 }
     443          10 :                 NDR_ZERO_STRUCT(r2->out);
     444          10 :                 r2->out.group_handle = talloc_zero(r2, struct policy_handle);
     445          10 :                 if (r2->out.group_handle == NULL) {
     446           0 :                         status = NT_STATUS_NO_MEMORY;
     447           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     448           0 :                         goto fail;
     449             :                 }
     450             : 
     451          10 :                 r2->out.result = _samr_OpenGroup(p, r2);
     452          10 :                 break;
     453             :         }
     454          38 :         case 20: { /* samr_QueryGroupInfo */
     455          38 :                 struct samr_QueryGroupInfo *r2 = (struct samr_QueryGroupInfo *)r;
     456          38 :                 if (DEBUGLEVEL >= 10) {
     457           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupInfo, NDR_IN, r2);
     458             :                 }
     459          38 :                 NDR_ZERO_STRUCT(r2->out);
     460          38 :                 r2->out.info = talloc_zero(r2, union samr_GroupInfo *);
     461          38 :                 if (r2->out.info == NULL) {
     462           0 :                         status = NT_STATUS_NO_MEMORY;
     463           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     464           0 :                         goto fail;
     465             :                 }
     466             : 
     467          38 :                 r2->out.result = _samr_QueryGroupInfo(p, r2);
     468          38 :                 break;
     469             :         }
     470           8 :         case 21: { /* samr_SetGroupInfo */
     471           8 :                 struct samr_SetGroupInfo *r2 = (struct samr_SetGroupInfo *)r;
     472           8 :                 if (DEBUGLEVEL >= 10) {
     473           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetGroupInfo, NDR_IN, r2);
     474             :                 }
     475           8 :                 r2->out.result = _samr_SetGroupInfo(p, r2);
     476           8 :                 break;
     477             :         }
     478           6 :         case 22: { /* samr_AddGroupMember */
     479           6 :                 struct samr_AddGroupMember *r2 = (struct samr_AddGroupMember *)r;
     480           6 :                 if (DEBUGLEVEL >= 10) {
     481           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_AddGroupMember, NDR_IN, r2);
     482             :                 }
     483           6 :                 r2->out.result = _samr_AddGroupMember(p, r2);
     484           6 :                 break;
     485             :         }
     486           2 :         case 23: { /* samr_DeleteDomainGroup */
     487           2 :                 struct samr_DeleteDomainGroup *r2 = (struct samr_DeleteDomainGroup *)r;
     488           2 :                 if (DEBUGLEVEL >= 10) {
     489           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomainGroup, NDR_IN, r2);
     490             :                 }
     491           2 :                 NDR_ZERO_STRUCT(r2->out);
     492           2 :                 r2->out.group_handle = r2->in.group_handle;
     493           2 :                 r2->out.result = _samr_DeleteDomainGroup(p, r2);
     494           0 :                 break;
     495             :         }
     496           4 :         case 24: { /* samr_DeleteGroupMember */
     497           4 :                 struct samr_DeleteGroupMember *r2 = (struct samr_DeleteGroupMember *)r;
     498           4 :                 if (DEBUGLEVEL >= 10) {
     499           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteGroupMember, NDR_IN, r2);
     500             :                 }
     501           4 :                 r2->out.result = _samr_DeleteGroupMember(p, r2);
     502           4 :                 break;
     503             :         }
     504          10 :         case 25: { /* samr_QueryGroupMember */
     505          10 :                 struct samr_QueryGroupMember *r2 = (struct samr_QueryGroupMember *)r;
     506          10 :                 if (DEBUGLEVEL >= 10) {
     507           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupMember, NDR_IN, r2);
     508             :                 }
     509          10 :                 NDR_ZERO_STRUCT(r2->out);
     510          10 :                 r2->out.rids = talloc_zero(r2, struct samr_RidAttrArray *);
     511          10 :                 if (r2->out.rids == NULL) {
     512           0 :                         status = NT_STATUS_NO_MEMORY;
     513           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     514           0 :                         goto fail;
     515             :                 }
     516             : 
     517          10 :                 r2->out.result = _samr_QueryGroupMember(p, r2);
     518          10 :                 break;
     519             :         }
     520           0 :         case 26: { /* samr_SetMemberAttributesOfGroup */
     521           0 :                 struct samr_SetMemberAttributesOfGroup *r2 = (struct samr_SetMemberAttributesOfGroup *)r;
     522           0 :                 if (DEBUGLEVEL >= 10) {
     523           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetMemberAttributesOfGroup, NDR_IN, r2);
     524             :                 }
     525           0 :                 r2->out.result = _samr_SetMemberAttributesOfGroup(p, r2);
     526           0 :                 break;
     527             :         }
     528         308 :         case 27: { /* samr_OpenAlias */
     529         308 :                 struct samr_OpenAlias *r2 = (struct samr_OpenAlias *)r;
     530         308 :                 if (DEBUGLEVEL >= 10) {
     531           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenAlias, NDR_IN, r2);
     532             :                 }
     533         308 :                 NDR_ZERO_STRUCT(r2->out);
     534         308 :                 r2->out.alias_handle = talloc_zero(r2, struct policy_handle);
     535         308 :                 if (r2->out.alias_handle == NULL) {
     536           0 :                         status = NT_STATUS_NO_MEMORY;
     537           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     538           0 :                         goto fail;
     539             :                 }
     540             : 
     541         308 :                 r2->out.result = _samr_OpenAlias(p, r2);
     542         308 :                 break;
     543             :         }
     544          16 :         case 28: { /* samr_QueryAliasInfo */
     545          16 :                 struct samr_QueryAliasInfo *r2 = (struct samr_QueryAliasInfo *)r;
     546          16 :                 if (DEBUGLEVEL >= 10) {
     547           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryAliasInfo, NDR_IN, r2);
     548             :                 }
     549          16 :                 NDR_ZERO_STRUCT(r2->out);
     550          16 :                 r2->out.info = talloc_zero(r2, union samr_AliasInfo *);
     551          16 :                 if (r2->out.info == NULL) {
     552           0 :                         status = NT_STATUS_NO_MEMORY;
     553           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     554           0 :                         goto fail;
     555             :                 }
     556             : 
     557          16 :                 r2->out.result = _samr_QueryAliasInfo(p, r2);
     558          16 :                 break;
     559             :         }
     560           4 :         case 29: { /* samr_SetAliasInfo */
     561           4 :                 struct samr_SetAliasInfo *r2 = (struct samr_SetAliasInfo *)r;
     562           4 :                 if (DEBUGLEVEL >= 10) {
     563           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetAliasInfo, NDR_IN, r2);
     564             :                 }
     565           4 :                 r2->out.result = _samr_SetAliasInfo(p, r2);
     566           4 :                 break;
     567             :         }
     568           2 :         case 30: { /* samr_DeleteDomAlias */
     569           2 :                 struct samr_DeleteDomAlias *r2 = (struct samr_DeleteDomAlias *)r;
     570           2 :                 if (DEBUGLEVEL >= 10) {
     571           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomAlias, NDR_IN, r2);
     572             :                 }
     573           2 :                 NDR_ZERO_STRUCT(r2->out);
     574           2 :                 r2->out.alias_handle = r2->in.alias_handle;
     575           2 :                 r2->out.result = _samr_DeleteDomAlias(p, r2);
     576           2 :                 break;
     577             :         }
     578           2 :         case 31: { /* samr_AddAliasMember */
     579           2 :                 struct samr_AddAliasMember *r2 = (struct samr_AddAliasMember *)r;
     580           2 :                 if (DEBUGLEVEL >= 10) {
     581           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_AddAliasMember, NDR_IN, r2);
     582             :                 }
     583           2 :                 r2->out.result = _samr_AddAliasMember(p, r2);
     584           2 :                 break;
     585             :         }
     586           2 :         case 32: { /* samr_DeleteAliasMember */
     587           2 :                 struct samr_DeleteAliasMember *r2 = (struct samr_DeleteAliasMember *)r;
     588           2 :                 if (DEBUGLEVEL >= 10) {
     589           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteAliasMember, NDR_IN, r2);
     590             :                 }
     591           2 :                 r2->out.result = _samr_DeleteAliasMember(p, r2);
     592           2 :                 break;
     593             :         }
     594         308 :         case 33: { /* samr_GetMembersInAlias */
     595         308 :                 struct samr_GetMembersInAlias *r2 = (struct samr_GetMembersInAlias *)r;
     596         308 :                 if (DEBUGLEVEL >= 10) {
     597           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetMembersInAlias, NDR_IN, r2);
     598             :                 }
     599         308 :                 NDR_ZERO_STRUCT(r2->out);
     600         308 :                 r2->out.sids = talloc_zero(r2, struct lsa_SidArray);
     601         308 :                 if (r2->out.sids == NULL) {
     602           0 :                         status = NT_STATUS_NO_MEMORY;
     603           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     604           0 :                         goto fail;
     605             :                 }
     606             : 
     607         308 :                 r2->out.result = _samr_GetMembersInAlias(p, r2);
     608         308 :                 break;
     609             :         }
     610         148 :         case 34: { /* samr_OpenUser */
     611         148 :                 struct samr_OpenUser *r2 = (struct samr_OpenUser *)r;
     612         148 :                 if (DEBUGLEVEL >= 10) {
     613           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenUser, NDR_IN, r2);
     614             :                 }
     615         148 :                 NDR_ZERO_STRUCT(r2->out);
     616         148 :                 r2->out.user_handle = talloc_zero(r2, struct policy_handle);
     617         148 :                 if (r2->out.user_handle == NULL) {
     618           0 :                         status = NT_STATUS_NO_MEMORY;
     619           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     620           0 :                         goto fail;
     621             :                 }
     622             : 
     623         148 :                 r2->out.result = _samr_OpenUser(p, r2);
     624         148 :                 break;
     625             :         }
     626          83 :         case 35: { /* samr_DeleteUser */
     627          83 :                 struct samr_DeleteUser *r2 = (struct samr_DeleteUser *)r;
     628          83 :                 if (DEBUGLEVEL >= 10) {
     629           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteUser, NDR_IN, r2);
     630             :                 }
     631          83 :                 NDR_ZERO_STRUCT(r2->out);
     632          83 :                 r2->out.user_handle = r2->in.user_handle;
     633          83 :                 r2->out.result = _samr_DeleteUser(p, r2);
     634          43 :                 break;
     635             :         }
     636        1150 :         case 36: { /* samr_QueryUserInfo */
     637        1150 :                 struct samr_QueryUserInfo *r2 = (struct samr_QueryUserInfo *)r;
     638        1150 :                 if (DEBUGLEVEL >= 10) {
     639           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo, NDR_IN, r2);
     640             :                 }
     641        1150 :                 NDR_ZERO_STRUCT(r2->out);
     642        1150 :                 r2->out.info = talloc_zero(r2, union samr_UserInfo *);
     643        1150 :                 if (r2->out.info == NULL) {
     644           0 :                         status = NT_STATUS_NO_MEMORY;
     645           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     646           0 :                         goto fail;
     647             :                 }
     648             : 
     649        1150 :                 r2->out.result = _samr_QueryUserInfo(p, r2);
     650        1150 :                 break;
     651             :         }
     652         542 :         case 37: { /* samr_SetUserInfo */
     653         542 :                 struct samr_SetUserInfo *r2 = (struct samr_SetUserInfo *)r;
     654         542 :                 if (DEBUGLEVEL >= 10) {
     655           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo, NDR_IN, r2);
     656             :                 }
     657         542 :                 r2->out.result = _samr_SetUserInfo(p, r2);
     658         542 :                 break;
     659             :         }
     660           2 :         case 38: { /* samr_ChangePasswordUser */
     661           2 :                 struct samr_ChangePasswordUser *r2 = (struct samr_ChangePasswordUser *)r;
     662           2 :                 if (DEBUGLEVEL >= 10) {
     663           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser, NDR_IN, r2);
     664             :                 }
     665           2 :                 r2->out.result = _samr_ChangePasswordUser(p, r2);
     666           2 :                 break;
     667             :         }
     668           2 :         case 39: { /* samr_GetGroupsForUser */
     669           2 :                 struct samr_GetGroupsForUser *r2 = (struct samr_GetGroupsForUser *)r;
     670           2 :                 if (DEBUGLEVEL >= 10) {
     671           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetGroupsForUser, NDR_IN, r2);
     672             :                 }
     673           2 :                 NDR_ZERO_STRUCT(r2->out);
     674           2 :                 r2->out.rids = talloc_zero(r2, struct samr_RidWithAttributeArray *);
     675           2 :                 if (r2->out.rids == NULL) {
     676           0 :                         status = NT_STATUS_NO_MEMORY;
     677           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     678           0 :                         goto fail;
     679             :                 }
     680             : 
     681           2 :                 r2->out.result = _samr_GetGroupsForUser(p, r2);
     682           2 :                 break;
     683             :         }
     684          68 :         case 40: { /* samr_QueryDisplayInfo */
     685          68 :                 struct samr_QueryDisplayInfo *r2 = (struct samr_QueryDisplayInfo *)r;
     686          68 :                 if (DEBUGLEVEL >= 10) {
     687           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo, NDR_IN, r2);
     688             :                 }
     689          68 :                 NDR_ZERO_STRUCT(r2->out);
     690          68 :                 r2->out.total_size = talloc_zero(r2, uint32_t);
     691          68 :                 if (r2->out.total_size == NULL) {
     692           0 :                         status = NT_STATUS_NO_MEMORY;
     693           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     694           0 :                         goto fail;
     695             :                 }
     696             : 
     697          68 :                 r2->out.returned_size = talloc_zero(r2, uint32_t);
     698          68 :                 if (r2->out.returned_size == NULL) {
     699           0 :                         status = NT_STATUS_NO_MEMORY;
     700           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     701           0 :                         goto fail;
     702             :                 }
     703             : 
     704          68 :                 r2->out.info = talloc_zero(r2, union samr_DispInfo);
     705          68 :                 if (r2->out.info == NULL) {
     706           0 :                         status = NT_STATUS_NO_MEMORY;
     707           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     708           0 :                         goto fail;
     709             :                 }
     710             : 
     711          68 :                 r2->out.result = _samr_QueryDisplayInfo(p, r2);
     712          68 :                 break;
     713             :         }
     714          20 :         case 41: { /* samr_GetDisplayEnumerationIndex */
     715          20 :                 struct samr_GetDisplayEnumerationIndex *r2 = (struct samr_GetDisplayEnumerationIndex *)r;
     716          20 :                 if (DEBUGLEVEL >= 10) {
     717           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex, NDR_IN, r2);
     718             :                 }
     719          20 :                 NDR_ZERO_STRUCT(r2->out);
     720          20 :                 r2->out.idx = talloc_zero(r2, uint32_t);
     721          20 :                 if (r2->out.idx == NULL) {
     722           0 :                         status = NT_STATUS_NO_MEMORY;
     723           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     724           0 :                         goto fail;
     725             :                 }
     726             : 
     727          20 :                 r2->out.result = _samr_GetDisplayEnumerationIndex(p, r2);
     728          20 :                 break;
     729             :         }
     730           2 :         case 42: { /* samr_TestPrivateFunctionsDomain */
     731           2 :                 struct samr_TestPrivateFunctionsDomain *r2 = (struct samr_TestPrivateFunctionsDomain *)r;
     732           2 :                 if (DEBUGLEVEL >= 10) {
     733           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_TestPrivateFunctionsDomain, NDR_IN, r2);
     734             :                 }
     735           2 :                 r2->out.result = _samr_TestPrivateFunctionsDomain(p, r2);
     736           2 :                 break;
     737             :         }
     738           2 :         case 43: { /* samr_TestPrivateFunctionsUser */
     739           2 :                 struct samr_TestPrivateFunctionsUser *r2 = (struct samr_TestPrivateFunctionsUser *)r;
     740           2 :                 if (DEBUGLEVEL >= 10) {
     741           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_TestPrivateFunctionsUser, NDR_IN, r2);
     742             :                 }
     743           2 :                 r2->out.result = _samr_TestPrivateFunctionsUser(p, r2);
     744           2 :                 break;
     745             :         }
     746         337 :         case 44: { /* samr_GetUserPwInfo */
     747         337 :                 struct samr_GetUserPwInfo *r2 = (struct samr_GetUserPwInfo *)r;
     748         337 :                 if (DEBUGLEVEL >= 10) {
     749           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetUserPwInfo, NDR_IN, r2);
     750             :                 }
     751         337 :                 NDR_ZERO_STRUCT(r2->out);
     752         337 :                 r2->out.info = talloc_zero(r2, struct samr_PwInfo);
     753         337 :                 if (r2->out.info == NULL) {
     754           0 :                         status = NT_STATUS_NO_MEMORY;
     755           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     756           0 :                         goto fail;
     757             :                 }
     758             : 
     759         337 :                 r2->out.result = _samr_GetUserPwInfo(p, r2);
     760         337 :                 break;
     761             :         }
     762           3 :         case 45: { /* samr_RemoveMemberFromForeignDomain */
     763           3 :                 struct samr_RemoveMemberFromForeignDomain *r2 = (struct samr_RemoveMemberFromForeignDomain *)r;
     764           3 :                 if (DEBUGLEVEL >= 10) {
     765           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_RemoveMemberFromForeignDomain, NDR_IN, r2);
     766             :                 }
     767           3 :                 r2->out.result = _samr_RemoveMemberFromForeignDomain(p, r2);
     768           3 :                 break;
     769             :         }
     770          41 :         case 46: { /* samr_QueryDomainInfo2 */
     771          41 :                 struct samr_QueryDomainInfo2 *r2 = (struct samr_QueryDomainInfo2 *)r;
     772          41 :                 if (DEBUGLEVEL >= 10) {
     773           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo2, NDR_IN, r2);
     774             :                 }
     775          41 :                 NDR_ZERO_STRUCT(r2->out);
     776          41 :                 r2->out.info = talloc_zero(r2, union samr_DomainInfo *);
     777          41 :                 if (r2->out.info == NULL) {
     778           0 :                         status = NT_STATUS_NO_MEMORY;
     779           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     780           0 :                         goto fail;
     781             :                 }
     782             : 
     783          41 :                 r2->out.result = _samr_QueryDomainInfo2(p, r2);
     784          41 :                 break;
     785             :         }
     786         172 :         case 47: { /* samr_QueryUserInfo2 */
     787         172 :                 struct samr_QueryUserInfo2 *r2 = (struct samr_QueryUserInfo2 *)r;
     788         172 :                 if (DEBUGLEVEL >= 10) {
     789           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo2, NDR_IN, r2);
     790             :                 }
     791         172 :                 NDR_ZERO_STRUCT(r2->out);
     792         172 :                 r2->out.info = talloc_zero(r2, union samr_UserInfo *);
     793         172 :                 if (r2->out.info == NULL) {
     794           0 :                         status = NT_STATUS_NO_MEMORY;
     795           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     796           0 :                         goto fail;
     797             :                 }
     798             : 
     799         172 :                 r2->out.result = _samr_QueryUserInfo2(p, r2);
     800         172 :                 break;
     801             :         }
     802          10 :         case 48: { /* samr_QueryDisplayInfo2 */
     803          10 :                 struct samr_QueryDisplayInfo2 *r2 = (struct samr_QueryDisplayInfo2 *)r;
     804          10 :                 if (DEBUGLEVEL >= 10) {
     805           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo2, NDR_IN, r2);
     806             :                 }
     807          10 :                 NDR_ZERO_STRUCT(r2->out);
     808          10 :                 r2->out.total_size = talloc_zero(r2, uint32_t);
     809          10 :                 if (r2->out.total_size == NULL) {
     810           0 :                         status = NT_STATUS_NO_MEMORY;
     811           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     812           0 :                         goto fail;
     813             :                 }
     814             : 
     815          10 :                 r2->out.returned_size = talloc_zero(r2, uint32_t);
     816          10 :                 if (r2->out.returned_size == NULL) {
     817           0 :                         status = NT_STATUS_NO_MEMORY;
     818           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     819           0 :                         goto fail;
     820             :                 }
     821             : 
     822          10 :                 r2->out.info = talloc_zero(r2, union samr_DispInfo);
     823          10 :                 if (r2->out.info == NULL) {
     824           0 :                         status = NT_STATUS_NO_MEMORY;
     825           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     826           0 :                         goto fail;
     827             :                 }
     828             : 
     829          10 :                 r2->out.result = _samr_QueryDisplayInfo2(p, r2);
     830          10 :                 break;
     831             :         }
     832          20 :         case 49: { /* samr_GetDisplayEnumerationIndex2 */
     833          20 :                 struct samr_GetDisplayEnumerationIndex2 *r2 = (struct samr_GetDisplayEnumerationIndex2 *)r;
     834          20 :                 if (DEBUGLEVEL >= 10) {
     835           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex2, NDR_IN, r2);
     836             :                 }
     837          20 :                 NDR_ZERO_STRUCT(r2->out);
     838          20 :                 r2->out.idx = talloc_zero(r2, uint32_t);
     839          20 :                 if (r2->out.idx == NULL) {
     840           0 :                         status = NT_STATUS_NO_MEMORY;
     841           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     842           0 :                         goto fail;
     843             :                 }
     844             : 
     845          20 :                 r2->out.result = _samr_GetDisplayEnumerationIndex2(p, r2);
     846          20 :                 break;
     847             :         }
     848          84 :         case 50: { /* samr_CreateUser2 */
     849          84 :                 struct samr_CreateUser2 *r2 = (struct samr_CreateUser2 *)r;
     850          84 :                 if (DEBUGLEVEL >= 10) {
     851           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser2, NDR_IN, r2);
     852             :                 }
     853          84 :                 NDR_ZERO_STRUCT(r2->out);
     854          84 :                 r2->out.user_handle = talloc_zero(r2, struct policy_handle);
     855          84 :                 if (r2->out.user_handle == NULL) {
     856           0 :                         status = NT_STATUS_NO_MEMORY;
     857           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     858           0 :                         goto fail;
     859             :                 }
     860             : 
     861          84 :                 r2->out.access_granted = talloc_zero(r2, uint32_t);
     862          84 :                 if (r2->out.access_granted == NULL) {
     863           0 :                         status = NT_STATUS_NO_MEMORY;
     864           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     865           0 :                         goto fail;
     866             :                 }
     867             : 
     868          84 :                 r2->out.rid = talloc_zero(r2, uint32_t);
     869          84 :                 if (r2->out.rid == NULL) {
     870           0 :                         status = NT_STATUS_NO_MEMORY;
     871           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     872           0 :                         goto fail;
     873             :                 }
     874             : 
     875          84 :                 r2->out.result = _samr_CreateUser2(p, r2);
     876          79 :                 break;
     877             :         }
     878          10 :         case 51: { /* samr_QueryDisplayInfo3 */
     879          10 :                 struct samr_QueryDisplayInfo3 *r2 = (struct samr_QueryDisplayInfo3 *)r;
     880          10 :                 if (DEBUGLEVEL >= 10) {
     881           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo3, NDR_IN, r2);
     882             :                 }
     883          10 :                 NDR_ZERO_STRUCT(r2->out);
     884          10 :                 r2->out.total_size = talloc_zero(r2, uint32_t);
     885          10 :                 if (r2->out.total_size == NULL) {
     886           0 :                         status = NT_STATUS_NO_MEMORY;
     887           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     888           0 :                         goto fail;
     889             :                 }
     890             : 
     891          10 :                 r2->out.returned_size = talloc_zero(r2, uint32_t);
     892          10 :                 if (r2->out.returned_size == NULL) {
     893           0 :                         status = NT_STATUS_NO_MEMORY;
     894           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     895           0 :                         goto fail;
     896             :                 }
     897             : 
     898          10 :                 r2->out.info = talloc_zero(r2, union samr_DispInfo);
     899          10 :                 if (r2->out.info == NULL) {
     900           0 :                         status = NT_STATUS_NO_MEMORY;
     901           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     902           0 :                         goto fail;
     903             :                 }
     904             : 
     905          10 :                 r2->out.result = _samr_QueryDisplayInfo3(p, r2);
     906          10 :                 break;
     907             :         }
     908           0 :         case 52: { /* samr_AddMultipleMembersToAlias */
     909           0 :                 struct samr_AddMultipleMembersToAlias *r2 = (struct samr_AddMultipleMembersToAlias *)r;
     910           0 :                 if (DEBUGLEVEL >= 10) {
     911           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_AddMultipleMembersToAlias, NDR_IN, r2);
     912             :                 }
     913           0 :                 r2->out.result = _samr_AddMultipleMembersToAlias(p, r2);
     914           0 :                 break;
     915             :         }
     916           0 :         case 53: { /* samr_RemoveMultipleMembersFromAlias */
     917           0 :                 struct samr_RemoveMultipleMembersFromAlias *r2 = (struct samr_RemoveMultipleMembersFromAlias *)r;
     918           0 :                 if (DEBUGLEVEL >= 10) {
     919           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_RemoveMultipleMembersFromAlias, NDR_IN, r2);
     920             :                 }
     921           0 :                 r2->out.result = _samr_RemoveMultipleMembersFromAlias(p, r2);
     922           0 :                 break;
     923             :         }
     924          14 :         case 54: { /* samr_OemChangePasswordUser2 */
     925          14 :                 struct samr_OemChangePasswordUser2 *r2 = (struct samr_OemChangePasswordUser2 *)r;
     926          14 :                 if (DEBUGLEVEL >= 10) {
     927           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OemChangePasswordUser2, NDR_IN, r2);
     928             :                 }
     929          14 :                 r2->out.result = _samr_OemChangePasswordUser2(p, r2);
     930          14 :                 break;
     931             :         }
     932          11 :         case 55: { /* samr_ChangePasswordUser2 */
     933          11 :                 struct samr_ChangePasswordUser2 *r2 = (struct samr_ChangePasswordUser2 *)r;
     934          11 :                 if (DEBUGLEVEL >= 10) {
     935           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser2, NDR_IN, r2);
     936             :                 }
     937          11 :                 r2->out.result = _samr_ChangePasswordUser2(p, r2);
     938          11 :                 break;
     939             :         }
     940         252 :         case 56: { /* samr_GetDomPwInfo */
     941         252 :                 struct samr_GetDomPwInfo *r2 = (struct samr_GetDomPwInfo *)r;
     942         252 :                 if (DEBUGLEVEL >= 10) {
     943           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetDomPwInfo, NDR_IN, r2);
     944             :                 }
     945         252 :                 NDR_ZERO_STRUCT(r2->out);
     946         252 :                 r2->out.info = talloc_zero(r2, struct samr_PwInfo);
     947         252 :                 if (r2->out.info == NULL) {
     948           0 :                         status = NT_STATUS_NO_MEMORY;
     949           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     950           0 :                         goto fail;
     951             :                 }
     952             : 
     953         252 :                 r2->out.result = _samr_GetDomPwInfo(p, r2);
     954         252 :                 break;
     955             :         }
     956         124 :         case 57: { /* samr_Connect2 */
     957         124 :                 struct samr_Connect2 *r2 = (struct samr_Connect2 *)r;
     958         124 :                 if (DEBUGLEVEL >= 10) {
     959           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect2, NDR_IN, r2);
     960             :                 }
     961         124 :                 NDR_ZERO_STRUCT(r2->out);
     962         124 :                 r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
     963         124 :                 if (r2->out.connect_handle == NULL) {
     964           0 :                         status = NT_STATUS_NO_MEMORY;
     965           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     966           0 :                         goto fail;
     967             :                 }
     968             : 
     969         124 :                 r2->out.result = _samr_Connect2(p, r2);
     970         124 :                 break;
     971             :         }
     972         207 :         case 58: { /* samr_SetUserInfo2 */
     973         207 :                 struct samr_SetUserInfo2 *r2 = (struct samr_SetUserInfo2 *)r;
     974         207 :                 if (DEBUGLEVEL >= 10) {
     975           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo2, NDR_IN, r2);
     976             :                 }
     977         207 :                 r2->out.result = _samr_SetUserInfo2(p, r2);
     978         207 :                 break;
     979             :         }
     980           0 :         case 59: { /* samr_SetBootKeyInformation */
     981           0 :                 struct samr_SetBootKeyInformation *r2 = (struct samr_SetBootKeyInformation *)r;
     982           0 :                 if (DEBUGLEVEL >= 10) {
     983           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetBootKeyInformation, NDR_IN, r2);
     984             :                 }
     985           0 :                 r2->out.result = _samr_SetBootKeyInformation(p, r2);
     986           0 :                 break;
     987             :         }
     988           2 :         case 60: { /* samr_GetBootKeyInformation */
     989           2 :                 struct samr_GetBootKeyInformation *r2 = (struct samr_GetBootKeyInformation *)r;
     990           2 :                 if (DEBUGLEVEL >= 10) {
     991           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetBootKeyInformation, NDR_IN, r2);
     992             :                 }
     993           2 :                 NDR_ZERO_STRUCT(r2->out);
     994           2 :                 r2->out.unknown = talloc_zero(r2, uint32_t);
     995           2 :                 if (r2->out.unknown == NULL) {
     996           0 :                         status = NT_STATUS_NO_MEMORY;
     997           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     998           0 :                         goto fail;
     999             :                 }
    1000             : 
    1001           2 :                 r2->out.result = _samr_GetBootKeyInformation(p, r2);
    1002           2 :                 break;
    1003             :         }
    1004          43 :         case 61: { /* samr_Connect3 */
    1005          43 :                 struct samr_Connect3 *r2 = (struct samr_Connect3 *)r;
    1006          43 :                 if (DEBUGLEVEL >= 10) {
    1007           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect3, NDR_IN, r2);
    1008             :                 }
    1009          43 :                 NDR_ZERO_STRUCT(r2->out);
    1010          43 :                 r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
    1011          43 :                 if (r2->out.connect_handle == NULL) {
    1012           0 :                         status = NT_STATUS_NO_MEMORY;
    1013           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1014           0 :                         goto fail;
    1015             :                 }
    1016             : 
    1017          43 :                 r2->out.result = _samr_Connect3(p, r2);
    1018          43 :                 break;
    1019             :         }
    1020          43 :         case 62: { /* samr_Connect4 */
    1021          43 :                 struct samr_Connect4 *r2 = (struct samr_Connect4 *)r;
    1022          43 :                 if (DEBUGLEVEL >= 10) {
    1023           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect4, NDR_IN, r2);
    1024             :                 }
    1025          43 :                 NDR_ZERO_STRUCT(r2->out);
    1026          43 :                 r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
    1027          43 :                 if (r2->out.connect_handle == NULL) {
    1028           0 :                         status = NT_STATUS_NO_MEMORY;
    1029           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1030           0 :                         goto fail;
    1031             :                 }
    1032             : 
    1033          43 :                 r2->out.result = _samr_Connect4(p, r2);
    1034          43 :                 break;
    1035             :         }
    1036         128 :         case 63: { /* samr_ChangePasswordUser3 */
    1037         128 :                 struct samr_ChangePasswordUser3 *r2 = (struct samr_ChangePasswordUser3 *)r;
    1038         128 :                 if (DEBUGLEVEL >= 10) {
    1039           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser3, NDR_IN, r2);
    1040             :                 }
    1041         128 :                 NDR_ZERO_STRUCT(r2->out);
    1042         128 :                 r2->out.dominfo = talloc_zero(r2, struct samr_DomInfo1 *);
    1043         128 :                 if (r2->out.dominfo == NULL) {
    1044           0 :                         status = NT_STATUS_NO_MEMORY;
    1045           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1046           0 :                         goto fail;
    1047             :                 }
    1048             : 
    1049         128 :                 r2->out.reject = talloc_zero(r2, struct userPwdChangeFailureInformation *);
    1050         128 :                 if (r2->out.reject == NULL) {
    1051           0 :                         status = NT_STATUS_NO_MEMORY;
    1052           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1053           0 :                         goto fail;
    1054             :                 }
    1055             : 
    1056         128 :                 r2->out.result = _samr_ChangePasswordUser3(p, r2);
    1057         128 :                 break;
    1058             :         }
    1059          49 :         case 64: { /* samr_Connect5 */
    1060          49 :                 struct samr_Connect5 *r2 = (struct samr_Connect5 *)r;
    1061          49 :                 if (DEBUGLEVEL >= 10) {
    1062           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect5, NDR_IN, r2);
    1063             :                 }
    1064          49 :                 NDR_ZERO_STRUCT(r2->out);
    1065          49 :                 r2->out.level_out = talloc_zero(r2, uint32_t);
    1066          49 :                 if (r2->out.level_out == NULL) {
    1067           0 :                         status = NT_STATUS_NO_MEMORY;
    1068           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1069           0 :                         goto fail;
    1070             :                 }
    1071             : 
    1072          49 :                 r2->out.info_out = talloc_zero(r2, union samr_ConnectInfo);
    1073          49 :                 if (r2->out.info_out == NULL) {
    1074           0 :                         status = NT_STATUS_NO_MEMORY;
    1075           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1076           0 :                         goto fail;
    1077             :                 }
    1078             : 
    1079          49 :                 r2->out.connect_handle = talloc_zero(r2, struct policy_handle);
    1080          49 :                 if (r2->out.connect_handle == NULL) {
    1081           0 :                         status = NT_STATUS_NO_MEMORY;
    1082           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1083           0 :                         goto fail;
    1084             :                 }
    1085             : 
    1086          49 :                 r2->out.result = _samr_Connect5(p, r2);
    1087          49 :                 break;
    1088             :         }
    1089           8 :         case 65: { /* samr_RidToSid */
    1090           8 :                 struct samr_RidToSid *r2 = (struct samr_RidToSid *)r;
    1091           8 :                 if (DEBUGLEVEL >= 10) {
    1092           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_RidToSid, NDR_IN, r2);
    1093             :                 }
    1094           8 :                 NDR_ZERO_STRUCT(r2->out);
    1095           8 :                 r2->out.sid = talloc_zero(r2, struct dom_sid2 *);
    1096           8 :                 if (r2->out.sid == NULL) {
    1097           0 :                         status = NT_STATUS_NO_MEMORY;
    1098           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1099           0 :                         goto fail;
    1100             :                 }
    1101             : 
    1102           8 :                 r2->out.result = _samr_RidToSid(p, r2);
    1103           8 :                 break;
    1104             :         }
    1105           0 :         case 66: { /* samr_SetDsrmPassword */
    1106           0 :                 struct samr_SetDsrmPassword *r2 = (struct samr_SetDsrmPassword *)r;
    1107           0 :                 if (DEBUGLEVEL >= 10) {
    1108           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetDsrmPassword, NDR_IN, r2);
    1109             :                 }
    1110           0 :                 r2->out.result = _samr_SetDsrmPassword(p, r2);
    1111           0 :                 break;
    1112             :         }
    1113           0 :         case 67: { /* samr_ValidatePassword */
    1114           0 :                 struct samr_ValidatePassword *r2 = (struct samr_ValidatePassword *)r;
    1115           0 :                 if (DEBUGLEVEL >= 10) {
    1116           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ValidatePassword, NDR_IN, r2);
    1117             :                 }
    1118           0 :                 NDR_ZERO_STRUCT(r2->out);
    1119           0 :                 r2->out.rep = talloc_zero(r2, union samr_ValidatePasswordRep *);
    1120           0 :                 if (r2->out.rep == NULL) {
    1121           0 :                         status = NT_STATUS_NO_MEMORY;
    1122           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1123           0 :                         goto fail;
    1124             :                 }
    1125             : 
    1126           0 :                 r2->out.result = _samr_ValidatePassword(p, r2);
    1127           0 :                 break;
    1128             :         }
    1129           0 :         default:
    1130           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
    1131           0 :                 break;
    1132             :         }
    1133             : 
    1134        8301 : fail:
    1135             :         /* Unimpersonate */
    1136        8301 :         if (impersonated) {
    1137        7753 :                 unbecome_authenticated_pipe_user();
    1138             :         }
    1139             : 
    1140        8301 :         p->dce_call = NULL;
    1141        8301 :         p->mem_ctx = NULL;
    1142             :         /* Restore session info */
    1143        8301 :         p->session_info = pipe_session_info;
    1144        8301 :         p->auth.auth_type = 0;
    1145        8301 :         p->auth.auth_level = 0;
    1146        8301 :         p->auth.auth_context_id = 0;
    1147             :         /* Check pipes struct fault state */
    1148        8301 :         if (p->fault_state != 0) {
    1149          14 :                 dce_call->fault_code = p->fault_state;
    1150             :         }
    1151        8301 :         if (dce_call->fault_code != 0) {
    1152          14 :                 status = NT_STATUS_NET_WRITE_FAULT;
    1153             :         }
    1154             : 
    1155        8301 :         return status;
    1156             : }
    1157             : 
    1158        7801 : NTSTATUS samr__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
    1159             : {
    1160        7801 :         return samr__op_dispatch_internal(dce_call, mem_ctx, r, S3COMPAT_RPC_DISPATCH_EXTERNAL);
    1161             : }
    1162             : 
    1163        8287 : NTSTATUS samr__op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
    1164             : {
    1165        8287 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
    1166             : 
    1167        8287 :         switch (opnum) {
    1168         176 :         case 0: { /* samr_Connect */
    1169         176 :                 struct samr_Connect *r2 = (struct samr_Connect *)r;
    1170         176 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1171           0 :                         DEBUG(5,("function samr_Connect replied async\n"));
    1172             :                 }
    1173         176 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1174           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect, NDR_OUT | NDR_SET_VALUES, r2);
    1175             :                 }
    1176         176 :                 if (dce_call->fault_code != 0) {
    1177           0 :                         DBG_WARNING("dcerpc_fault %s in samr_Connect\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1178             :                 }
    1179         176 :                 break;
    1180             :         }
    1181        1503 :         case 1: { /* samr_Close */
    1182        1503 :                 struct samr_Close *r2 = (struct samr_Close *)r;
    1183        1503 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1184           0 :                         DEBUG(5,("function samr_Close replied async\n"));
    1185             :                 }
    1186        1503 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1187           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Close, NDR_OUT | NDR_SET_VALUES, r2);
    1188             :                 }
    1189        1503 :                 if (dce_call->fault_code != 0) {
    1190           0 :                         DBG_WARNING("dcerpc_fault %s in samr_Close\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1191             :                 }
    1192        1503 :                 break;
    1193             :         }
    1194           4 :         case 2: { /* samr_SetSecurity */
    1195           4 :                 struct samr_SetSecurity *r2 = (struct samr_SetSecurity *)r;
    1196           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1197           0 :                         DEBUG(5,("function samr_SetSecurity replied async\n"));
    1198             :                 }
    1199           4 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1200           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetSecurity, NDR_OUT | NDR_SET_VALUES, r2);
    1201             :                 }
    1202           4 :                 if (dce_call->fault_code != 0) {
    1203           0 :                         DBG_WARNING("dcerpc_fault %s in samr_SetSecurity\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1204             :                 }
    1205           4 :                 break;
    1206             :         }
    1207           8 :         case 3: { /* samr_QuerySecurity */
    1208           8 :                 struct samr_QuerySecurity *r2 = (struct samr_QuerySecurity *)r;
    1209           8 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1210           0 :                         DEBUG(5,("function samr_QuerySecurity replied async\n"));
    1211             :                 }
    1212           8 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1213           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QuerySecurity, NDR_OUT | NDR_SET_VALUES, r2);
    1214             :                 }
    1215           8 :                 if (dce_call->fault_code != 0) {
    1216           0 :                         DBG_WARNING("dcerpc_fault %s in samr_QuerySecurity\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1217             :                 }
    1218           8 :                 break;
    1219             :         }
    1220           0 :         case 4: { /* samr_Shutdown */
    1221           0 :                 struct samr_Shutdown *r2 = (struct samr_Shutdown *)r;
    1222           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1223           0 :                         DEBUG(5,("function samr_Shutdown replied async\n"));
    1224             :                 }
    1225           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1226           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Shutdown, NDR_OUT | NDR_SET_VALUES, r2);
    1227             :                 }
    1228           0 :                 if (dce_call->fault_code != 0) {
    1229           0 :                         DBG_WARNING("dcerpc_fault %s in samr_Shutdown\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1230             :                 }
    1231           0 :                 break;
    1232             :         }
    1233         222 :         case 5: { /* samr_LookupDomain */
    1234         222 :                 struct samr_LookupDomain *r2 = (struct samr_LookupDomain *)r;
    1235         222 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1236           0 :                         DEBUG(5,("function samr_LookupDomain replied async\n"));
    1237             :                 }
    1238         222 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1239           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_LookupDomain, NDR_OUT | NDR_SET_VALUES, r2);
    1240             :                 }
    1241         222 :                 if (dce_call->fault_code != 0) {
    1242           0 :                         DBG_WARNING("dcerpc_fault %s in samr_LookupDomain\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1243             :                 }
    1244         222 :                 break;
    1245             :         }
    1246          57 :         case 6: { /* samr_EnumDomains */
    1247          57 :                 struct samr_EnumDomains *r2 = (struct samr_EnumDomains *)r;
    1248          57 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1249           0 :                         DEBUG(5,("function samr_EnumDomains replied async\n"));
    1250             :                 }
    1251          57 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1252           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomains, NDR_OUT | NDR_SET_VALUES, r2);
    1253             :                 }
    1254          57 :                 if (dce_call->fault_code != 0) {
    1255           0 :                         DBG_WARNING("dcerpc_fault %s in samr_EnumDomains\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1256             :                 }
    1257          57 :                 break;
    1258             :         }
    1259         252 :         case 7: { /* samr_OpenDomain */
    1260         252 :                 struct samr_OpenDomain *r2 = (struct samr_OpenDomain *)r;
    1261         252 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1262           0 :                         DEBUG(5,("function samr_OpenDomain replied async\n"));
    1263             :                 }
    1264         252 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1265           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenDomain, NDR_OUT | NDR_SET_VALUES, r2);
    1266             :                 }
    1267         252 :                 if (dce_call->fault_code != 0) {
    1268           0 :                         DBG_WARNING("dcerpc_fault %s in samr_OpenDomain\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1269             :                 }
    1270         252 :                 break;
    1271             :         }
    1272          70 :         case 8: { /* samr_QueryDomainInfo */
    1273          70 :                 struct samr_QueryDomainInfo *r2 = (struct samr_QueryDomainInfo *)r;
    1274          70 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1275           0 :                         DEBUG(5,("function samr_QueryDomainInfo replied async\n"));
    1276             :                 }
    1277          70 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1278           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1279             :                 }
    1280          70 :                 if (dce_call->fault_code != 0) {
    1281           0 :                         DBG_WARNING("dcerpc_fault %s in samr_QueryDomainInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1282             :                 }
    1283          70 :                 break;
    1284             :         }
    1285          62 :         case 9: { /* samr_SetDomainInfo */
    1286          62 :                 struct samr_SetDomainInfo *r2 = (struct samr_SetDomainInfo *)r;
    1287          62 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1288           0 :                         DEBUG(5,("function samr_SetDomainInfo replied async\n"));
    1289             :                 }
    1290          62 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1291           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetDomainInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1292             :                 }
    1293          62 :                 if (dce_call->fault_code != 0) {
    1294           0 :                         DBG_WARNING("dcerpc_fault %s in samr_SetDomainInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1295             :                 }
    1296          62 :                 break;
    1297             :         }
    1298         451 :         case 10: { /* samr_CreateDomainGroup */
    1299         451 :                 struct samr_CreateDomainGroup *r2 = (struct samr_CreateDomainGroup *)r;
    1300         451 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1301           0 :                         DEBUG(5,("function samr_CreateDomainGroup replied async\n"));
    1302             :                 }
    1303         451 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1304           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomainGroup, NDR_OUT | NDR_SET_VALUES, r2);
    1305             :                 }
    1306         451 :                 if (dce_call->fault_code != 0) {
    1307           0 :                         DBG_WARNING("dcerpc_fault %s in samr_CreateDomainGroup\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1308             :                 }
    1309         451 :                 break;
    1310             :         }
    1311           6 :         case 11: { /* samr_EnumDomainGroups */
    1312           6 :                 struct samr_EnumDomainGroups *r2 = (struct samr_EnumDomainGroups *)r;
    1313           6 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1314           0 :                         DEBUG(5,("function samr_EnumDomainGroups replied async\n"));
    1315             :                 }
    1316           6 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1317           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainGroups, NDR_OUT | NDR_SET_VALUES, r2);
    1318             :                 }
    1319           6 :                 if (dce_call->fault_code != 0) {
    1320           0 :                         DBG_WARNING("dcerpc_fault %s in samr_EnumDomainGroups\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1321             :                 }
    1322           6 :                 break;
    1323             :         }
    1324         623 :         case 12: { /* samr_CreateUser */
    1325         623 :                 struct samr_CreateUser *r2 = (struct samr_CreateUser *)r;
    1326         623 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1327           0 :                         DEBUG(5,("function samr_CreateUser replied async\n"));
    1328             :                 }
    1329         623 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1330           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser, NDR_OUT | NDR_SET_VALUES, r2);
    1331             :                 }
    1332         623 :                 if (dce_call->fault_code != 0) {
    1333           0 :                         DBG_WARNING("dcerpc_fault %s in samr_CreateUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1334             :                 }
    1335         623 :                 break;
    1336             :         }
    1337          20 :         case 13: { /* samr_EnumDomainUsers */
    1338          20 :                 struct samr_EnumDomainUsers *r2 = (struct samr_EnumDomainUsers *)r;
    1339          20 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1340           0 :                         DEBUG(5,("function samr_EnumDomainUsers replied async\n"));
    1341             :                 }
    1342          20 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1343           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainUsers, NDR_OUT | NDR_SET_VALUES, r2);
    1344             :                 }
    1345          20 :                 if (dce_call->fault_code != 0) {
    1346           0 :                         DBG_WARNING("dcerpc_fault %s in samr_EnumDomainUsers\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1347             :                 }
    1348          20 :                 break;
    1349             :         }
    1350         302 :         case 14: { /* samr_CreateDomAlias */
    1351         302 :                 struct samr_CreateDomAlias *r2 = (struct samr_CreateDomAlias *)r;
    1352         302 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1353           0 :                         DEBUG(5,("function samr_CreateDomAlias replied async\n"));
    1354             :                 }
    1355         302 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1356           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateDomAlias, NDR_OUT | NDR_SET_VALUES, r2);
    1357             :                 }
    1358         302 :                 if (dce_call->fault_code != 0) {
    1359           0 :                         DBG_WARNING("dcerpc_fault %s in samr_CreateDomAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1360             :                 }
    1361         302 :                 break;
    1362             :         }
    1363           8 :         case 15: { /* samr_EnumDomainAliases */
    1364           8 :                 struct samr_EnumDomainAliases *r2 = (struct samr_EnumDomainAliases *)r;
    1365           8 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1366           0 :                         DEBUG(5,("function samr_EnumDomainAliases replied async\n"));
    1367             :                 }
    1368           8 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1369           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_EnumDomainAliases, NDR_OUT | NDR_SET_VALUES, r2);
    1370             :                 }
    1371           8 :                 if (dce_call->fault_code != 0) {
    1372           0 :                         DBG_WARNING("dcerpc_fault %s in samr_EnumDomainAliases\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1373             :                 }
    1374           8 :                 break;
    1375             :         }
    1376           4 :         case 16: { /* samr_GetAliasMembership */
    1377           4 :                 struct samr_GetAliasMembership *r2 = (struct samr_GetAliasMembership *)r;
    1378           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1379           0 :                         DEBUG(5,("function samr_GetAliasMembership replied async\n"));
    1380             :                 }
    1381           4 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1382           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetAliasMembership, NDR_OUT | NDR_SET_VALUES, r2);
    1383             :                 }
    1384           4 :                 if (dce_call->fault_code != 0) {
    1385           0 :                         DBG_WARNING("dcerpc_fault %s in samr_GetAliasMembership\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1386             :                 }
    1387           4 :                 break;
    1388             :         }
    1389         277 :         case 17: { /* samr_LookupNames */
    1390         277 :                 struct samr_LookupNames *r2 = (struct samr_LookupNames *)r;
    1391         277 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1392           0 :                         DEBUG(5,("function samr_LookupNames replied async\n"));
    1393             :                 }
    1394         277 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1395           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_LookupNames, NDR_OUT | NDR_SET_VALUES, r2);
    1396             :                 }
    1397         277 :                 if (dce_call->fault_code != 0) {
    1398           0 :                         DBG_WARNING("dcerpc_fault %s in samr_LookupNames\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1399             :                 }
    1400         277 :                 break;
    1401             :         }
    1402           2 :         case 18: { /* samr_LookupRids */
    1403           2 :                 struct samr_LookupRids *r2 = (struct samr_LookupRids *)r;
    1404           2 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1405           0 :                         DEBUG(5,("function samr_LookupRids replied async\n"));
    1406             :                 }
    1407           2 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1408           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_LookupRids, NDR_OUT | NDR_SET_VALUES, r2);
    1409             :                 }
    1410           2 :                 if (dce_call->fault_code != 0) {
    1411           0 :                         DBG_WARNING("dcerpc_fault %s in samr_LookupRids\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1412             :                 }
    1413           2 :                 break;
    1414             :         }
    1415           8 :         case 19: { /* samr_OpenGroup */
    1416           8 :                 struct samr_OpenGroup *r2 = (struct samr_OpenGroup *)r;
    1417           8 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1418           0 :                         DEBUG(5,("function samr_OpenGroup replied async\n"));
    1419             :                 }
    1420           8 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1421           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenGroup, NDR_OUT | NDR_SET_VALUES, r2);
    1422             :                 }
    1423           8 :                 if (dce_call->fault_code != 0) {
    1424           0 :                         DBG_WARNING("dcerpc_fault %s in samr_OpenGroup\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1425             :                 }
    1426           8 :                 break;
    1427             :         }
    1428          38 :         case 20: { /* samr_QueryGroupInfo */
    1429          38 :                 struct samr_QueryGroupInfo *r2 = (struct samr_QueryGroupInfo *)r;
    1430          38 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1431           0 :                         DEBUG(5,("function samr_QueryGroupInfo replied async\n"));
    1432             :                 }
    1433          38 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1434           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1435             :                 }
    1436          38 :                 if (dce_call->fault_code != 0) {
    1437           0 :                         DBG_WARNING("dcerpc_fault %s in samr_QueryGroupInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1438             :                 }
    1439          38 :                 break;
    1440             :         }
    1441           8 :         case 21: { /* samr_SetGroupInfo */
    1442           8 :                 struct samr_SetGroupInfo *r2 = (struct samr_SetGroupInfo *)r;
    1443           8 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1444           0 :                         DEBUG(5,("function samr_SetGroupInfo replied async\n"));
    1445             :                 }
    1446           8 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1447           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetGroupInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1448             :                 }
    1449           8 :                 if (dce_call->fault_code != 0) {
    1450           0 :                         DBG_WARNING("dcerpc_fault %s in samr_SetGroupInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1451             :                 }
    1452           8 :                 break;
    1453             :         }
    1454           6 :         case 22: { /* samr_AddGroupMember */
    1455           6 :                 struct samr_AddGroupMember *r2 = (struct samr_AddGroupMember *)r;
    1456           6 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1457           0 :                         DEBUG(5,("function samr_AddGroupMember replied async\n"));
    1458             :                 }
    1459           6 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1460           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_AddGroupMember, NDR_OUT | NDR_SET_VALUES, r2);
    1461             :                 }
    1462           6 :                 if (dce_call->fault_code != 0) {
    1463           0 :                         DBG_WARNING("dcerpc_fault %s in samr_AddGroupMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1464             :                 }
    1465           6 :                 break;
    1466             :         }
    1467           0 :         case 23: { /* samr_DeleteDomainGroup */
    1468           0 :                 struct samr_DeleteDomainGroup *r2 = (struct samr_DeleteDomainGroup *)r;
    1469           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1470           0 :                         DEBUG(5,("function samr_DeleteDomainGroup replied async\n"));
    1471             :                 }
    1472           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1473           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomainGroup, NDR_OUT | NDR_SET_VALUES, r2);
    1474             :                 }
    1475           0 :                 if (dce_call->fault_code != 0) {
    1476           0 :                         DBG_WARNING("dcerpc_fault %s in samr_DeleteDomainGroup\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1477             :                 }
    1478           0 :                 break;
    1479             :         }
    1480           4 :         case 24: { /* samr_DeleteGroupMember */
    1481           4 :                 struct samr_DeleteGroupMember *r2 = (struct samr_DeleteGroupMember *)r;
    1482           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1483           0 :                         DEBUG(5,("function samr_DeleteGroupMember replied async\n"));
    1484             :                 }
    1485           4 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1486           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteGroupMember, NDR_OUT | NDR_SET_VALUES, r2);
    1487             :                 }
    1488           4 :                 if (dce_call->fault_code != 0) {
    1489           0 :                         DBG_WARNING("dcerpc_fault %s in samr_DeleteGroupMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1490             :                 }
    1491           4 :                 break;
    1492             :         }
    1493          10 :         case 25: { /* samr_QueryGroupMember */
    1494          10 :                 struct samr_QueryGroupMember *r2 = (struct samr_QueryGroupMember *)r;
    1495          10 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1496           0 :                         DEBUG(5,("function samr_QueryGroupMember replied async\n"));
    1497             :                 }
    1498          10 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1499           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryGroupMember, NDR_OUT | NDR_SET_VALUES, r2);
    1500             :                 }
    1501          10 :                 if (dce_call->fault_code != 0) {
    1502           0 :                         DBG_WARNING("dcerpc_fault %s in samr_QueryGroupMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1503             :                 }
    1504          10 :                 break;
    1505             :         }
    1506           0 :         case 26: { /* samr_SetMemberAttributesOfGroup */
    1507           0 :                 struct samr_SetMemberAttributesOfGroup *r2 = (struct samr_SetMemberAttributesOfGroup *)r;
    1508           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1509           0 :                         DEBUG(5,("function samr_SetMemberAttributesOfGroup replied async\n"));
    1510             :                 }
    1511           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1512           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetMemberAttributesOfGroup, NDR_OUT | NDR_SET_VALUES, r2);
    1513             :                 }
    1514           0 :                 if (dce_call->fault_code != 0) {
    1515           0 :                         DBG_WARNING("dcerpc_fault %s in samr_SetMemberAttributesOfGroup\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1516             :                 }
    1517           0 :                 break;
    1518             :         }
    1519         308 :         case 27: { /* samr_OpenAlias */
    1520         308 :                 struct samr_OpenAlias *r2 = (struct samr_OpenAlias *)r;
    1521         308 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1522           0 :                         DEBUG(5,("function samr_OpenAlias replied async\n"));
    1523             :                 }
    1524         308 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1525           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenAlias, NDR_OUT | NDR_SET_VALUES, r2);
    1526             :                 }
    1527         308 :                 if (dce_call->fault_code != 0) {
    1528           0 :                         DBG_WARNING("dcerpc_fault %s in samr_OpenAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1529             :                 }
    1530         308 :                 break;
    1531             :         }
    1532          16 :         case 28: { /* samr_QueryAliasInfo */
    1533          16 :                 struct samr_QueryAliasInfo *r2 = (struct samr_QueryAliasInfo *)r;
    1534          16 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1535           0 :                         DEBUG(5,("function samr_QueryAliasInfo replied async\n"));
    1536             :                 }
    1537          16 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1538           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryAliasInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1539             :                 }
    1540          16 :                 if (dce_call->fault_code != 0) {
    1541           0 :                         DBG_WARNING("dcerpc_fault %s in samr_QueryAliasInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1542             :                 }
    1543          16 :                 break;
    1544             :         }
    1545           4 :         case 29: { /* samr_SetAliasInfo */
    1546           4 :                 struct samr_SetAliasInfo *r2 = (struct samr_SetAliasInfo *)r;
    1547           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1548           0 :                         DEBUG(5,("function samr_SetAliasInfo replied async\n"));
    1549             :                 }
    1550           4 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1551           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetAliasInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1552             :                 }
    1553           4 :                 if (dce_call->fault_code != 0) {
    1554           0 :                         DBG_WARNING("dcerpc_fault %s in samr_SetAliasInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1555             :                 }
    1556           4 :                 break;
    1557             :         }
    1558           2 :         case 30: { /* samr_DeleteDomAlias */
    1559           2 :                 struct samr_DeleteDomAlias *r2 = (struct samr_DeleteDomAlias *)r;
    1560           2 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1561           0 :                         DEBUG(5,("function samr_DeleteDomAlias replied async\n"));
    1562             :                 }
    1563           2 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1564           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteDomAlias, NDR_OUT | NDR_SET_VALUES, r2);
    1565             :                 }
    1566           2 :                 if (dce_call->fault_code != 0) {
    1567           0 :                         DBG_WARNING("dcerpc_fault %s in samr_DeleteDomAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1568             :                 }
    1569           2 :                 break;
    1570             :         }
    1571           2 :         case 31: { /* samr_AddAliasMember */
    1572           2 :                 struct samr_AddAliasMember *r2 = (struct samr_AddAliasMember *)r;
    1573           2 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1574           0 :                         DEBUG(5,("function samr_AddAliasMember replied async\n"));
    1575             :                 }
    1576           2 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1577           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_AddAliasMember, NDR_OUT | NDR_SET_VALUES, r2);
    1578             :                 }
    1579           2 :                 if (dce_call->fault_code != 0) {
    1580           0 :                         DBG_WARNING("dcerpc_fault %s in samr_AddAliasMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1581             :                 }
    1582           2 :                 break;
    1583             :         }
    1584           2 :         case 32: { /* samr_DeleteAliasMember */
    1585           2 :                 struct samr_DeleteAliasMember *r2 = (struct samr_DeleteAliasMember *)r;
    1586           2 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1587           0 :                         DEBUG(5,("function samr_DeleteAliasMember replied async\n"));
    1588             :                 }
    1589           2 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1590           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteAliasMember, NDR_OUT | NDR_SET_VALUES, r2);
    1591             :                 }
    1592           2 :                 if (dce_call->fault_code != 0) {
    1593           0 :                         DBG_WARNING("dcerpc_fault %s in samr_DeleteAliasMember\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1594             :                 }
    1595           2 :                 break;
    1596             :         }
    1597         308 :         case 33: { /* samr_GetMembersInAlias */
    1598         308 :                 struct samr_GetMembersInAlias *r2 = (struct samr_GetMembersInAlias *)r;
    1599         308 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1600           0 :                         DEBUG(5,("function samr_GetMembersInAlias replied async\n"));
    1601             :                 }
    1602         308 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1603           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetMembersInAlias, NDR_OUT | NDR_SET_VALUES, r2);
    1604             :                 }
    1605         308 :                 if (dce_call->fault_code != 0) {
    1606           0 :                         DBG_WARNING("dcerpc_fault %s in samr_GetMembersInAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1607             :                 }
    1608         308 :                 break;
    1609             :         }
    1610         146 :         case 34: { /* samr_OpenUser */
    1611         146 :                 struct samr_OpenUser *r2 = (struct samr_OpenUser *)r;
    1612         146 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1613           0 :                         DEBUG(5,("function samr_OpenUser replied async\n"));
    1614             :                 }
    1615         146 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1616           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OpenUser, NDR_OUT | NDR_SET_VALUES, r2);
    1617             :                 }
    1618         146 :                 if (dce_call->fault_code != 0) {
    1619           0 :                         DBG_WARNING("dcerpc_fault %s in samr_OpenUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1620             :                 }
    1621         146 :                 break;
    1622             :         }
    1623          43 :         case 35: { /* samr_DeleteUser */
    1624          43 :                 struct samr_DeleteUser *r2 = (struct samr_DeleteUser *)r;
    1625          43 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1626           0 :                         DEBUG(5,("function samr_DeleteUser replied async\n"));
    1627             :                 }
    1628          43 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1629           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_DeleteUser, NDR_OUT | NDR_SET_VALUES, r2);
    1630             :                 }
    1631          43 :                 if (dce_call->fault_code != 0) {
    1632           0 :                         DBG_WARNING("dcerpc_fault %s in samr_DeleteUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1633             :                 }
    1634          43 :                 break;
    1635             :         }
    1636        1150 :         case 36: { /* samr_QueryUserInfo */
    1637        1150 :                 struct samr_QueryUserInfo *r2 = (struct samr_QueryUserInfo *)r;
    1638        1150 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1639           0 :                         DEBUG(5,("function samr_QueryUserInfo replied async\n"));
    1640             :                 }
    1641        1150 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1642           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1643             :                 }
    1644        1150 :                 if (dce_call->fault_code != 0) {
    1645           0 :                         DBG_WARNING("dcerpc_fault %s in samr_QueryUserInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1646             :                 }
    1647        1150 :                 break;
    1648             :         }
    1649         542 :         case 37: { /* samr_SetUserInfo */
    1650         542 :                 struct samr_SetUserInfo *r2 = (struct samr_SetUserInfo *)r;
    1651         542 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1652           0 :                         DEBUG(5,("function samr_SetUserInfo replied async\n"));
    1653             :                 }
    1654         542 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1655           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1656             :                 }
    1657         542 :                 if (dce_call->fault_code != 0) {
    1658           0 :                         DBG_WARNING("dcerpc_fault %s in samr_SetUserInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1659             :                 }
    1660         542 :                 break;
    1661             :         }
    1662           2 :         case 38: { /* samr_ChangePasswordUser */
    1663           2 :                 struct samr_ChangePasswordUser *r2 = (struct samr_ChangePasswordUser *)r;
    1664           2 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1665           0 :                         DEBUG(5,("function samr_ChangePasswordUser replied async\n"));
    1666             :                 }
    1667           2 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1668           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser, NDR_OUT | NDR_SET_VALUES, r2);
    1669             :                 }
    1670           2 :                 if (dce_call->fault_code != 0) {
    1671           0 :                         DBG_WARNING("dcerpc_fault %s in samr_ChangePasswordUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1672             :                 }
    1673           2 :                 break;
    1674             :         }
    1675           2 :         case 39: { /* samr_GetGroupsForUser */
    1676           2 :                 struct samr_GetGroupsForUser *r2 = (struct samr_GetGroupsForUser *)r;
    1677           2 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1678           0 :                         DEBUG(5,("function samr_GetGroupsForUser replied async\n"));
    1679             :                 }
    1680           2 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1681           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetGroupsForUser, NDR_OUT | NDR_SET_VALUES, r2);
    1682             :                 }
    1683           2 :                 if (dce_call->fault_code != 0) {
    1684           0 :                         DBG_WARNING("dcerpc_fault %s in samr_GetGroupsForUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1685             :                 }
    1686           2 :                 break;
    1687             :         }
    1688          68 :         case 40: { /* samr_QueryDisplayInfo */
    1689          68 :                 struct samr_QueryDisplayInfo *r2 = (struct samr_QueryDisplayInfo *)r;
    1690          68 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1691           0 :                         DEBUG(5,("function samr_QueryDisplayInfo replied async\n"));
    1692             :                 }
    1693          68 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1694           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1695             :                 }
    1696          68 :                 if (dce_call->fault_code != 0) {
    1697           0 :                         DBG_WARNING("dcerpc_fault %s in samr_QueryDisplayInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1698             :                 }
    1699          68 :                 break;
    1700             :         }
    1701          20 :         case 41: { /* samr_GetDisplayEnumerationIndex */
    1702          20 :                 struct samr_GetDisplayEnumerationIndex *r2 = (struct samr_GetDisplayEnumerationIndex *)r;
    1703          20 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1704           0 :                         DEBUG(5,("function samr_GetDisplayEnumerationIndex replied async\n"));
    1705             :                 }
    1706          20 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1707           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex, NDR_OUT | NDR_SET_VALUES, r2);
    1708             :                 }
    1709          20 :                 if (dce_call->fault_code != 0) {
    1710           0 :                         DBG_WARNING("dcerpc_fault %s in samr_GetDisplayEnumerationIndex\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1711             :                 }
    1712          20 :                 break;
    1713             :         }
    1714           0 :         case 42: { /* samr_TestPrivateFunctionsDomain */
    1715           0 :                 struct samr_TestPrivateFunctionsDomain *r2 = (struct samr_TestPrivateFunctionsDomain *)r;
    1716           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1717           0 :                         DEBUG(5,("function samr_TestPrivateFunctionsDomain replied async\n"));
    1718             :                 }
    1719           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1720           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_TestPrivateFunctionsDomain, NDR_OUT | NDR_SET_VALUES, r2);
    1721             :                 }
    1722           0 :                 if (dce_call->fault_code != 0) {
    1723           0 :                         DBG_WARNING("dcerpc_fault %s in samr_TestPrivateFunctionsDomain\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1724             :                 }
    1725           0 :                 break;
    1726             :         }
    1727           0 :         case 43: { /* samr_TestPrivateFunctionsUser */
    1728           0 :                 struct samr_TestPrivateFunctionsUser *r2 = (struct samr_TestPrivateFunctionsUser *)r;
    1729           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1730           0 :                         DEBUG(5,("function samr_TestPrivateFunctionsUser replied async\n"));
    1731             :                 }
    1732           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1733           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_TestPrivateFunctionsUser, NDR_OUT | NDR_SET_VALUES, r2);
    1734             :                 }
    1735           0 :                 if (dce_call->fault_code != 0) {
    1736           0 :                         DBG_WARNING("dcerpc_fault %s in samr_TestPrivateFunctionsUser\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1737             :                 }
    1738           0 :                 break;
    1739             :         }
    1740         337 :         case 44: { /* samr_GetUserPwInfo */
    1741         337 :                 struct samr_GetUserPwInfo *r2 = (struct samr_GetUserPwInfo *)r;
    1742         337 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1743           0 :                         DEBUG(5,("function samr_GetUserPwInfo replied async\n"));
    1744             :                 }
    1745         337 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1746           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetUserPwInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1747             :                 }
    1748         337 :                 if (dce_call->fault_code != 0) {
    1749           0 :                         DBG_WARNING("dcerpc_fault %s in samr_GetUserPwInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1750             :                 }
    1751         337 :                 break;
    1752             :         }
    1753           3 :         case 45: { /* samr_RemoveMemberFromForeignDomain */
    1754           3 :                 struct samr_RemoveMemberFromForeignDomain *r2 = (struct samr_RemoveMemberFromForeignDomain *)r;
    1755           3 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1756           0 :                         DEBUG(5,("function samr_RemoveMemberFromForeignDomain replied async\n"));
    1757             :                 }
    1758           3 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1759           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_RemoveMemberFromForeignDomain, NDR_OUT | NDR_SET_VALUES, r2);
    1760             :                 }
    1761           3 :                 if (dce_call->fault_code != 0) {
    1762           0 :                         DBG_WARNING("dcerpc_fault %s in samr_RemoveMemberFromForeignDomain\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1763             :                 }
    1764           3 :                 break;
    1765             :         }
    1766          41 :         case 46: { /* samr_QueryDomainInfo2 */
    1767          41 :                 struct samr_QueryDomainInfo2 *r2 = (struct samr_QueryDomainInfo2 *)r;
    1768          41 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1769           0 :                         DEBUG(5,("function samr_QueryDomainInfo2 replied async\n"));
    1770             :                 }
    1771          41 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1772           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDomainInfo2, NDR_OUT | NDR_SET_VALUES, r2);
    1773             :                 }
    1774          41 :                 if (dce_call->fault_code != 0) {
    1775           0 :                         DBG_WARNING("dcerpc_fault %s in samr_QueryDomainInfo2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1776             :                 }
    1777          41 :                 break;
    1778             :         }
    1779         172 :         case 47: { /* samr_QueryUserInfo2 */
    1780         172 :                 struct samr_QueryUserInfo2 *r2 = (struct samr_QueryUserInfo2 *)r;
    1781         172 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1782           0 :                         DEBUG(5,("function samr_QueryUserInfo2 replied async\n"));
    1783             :                 }
    1784         172 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1785           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryUserInfo2, NDR_OUT | NDR_SET_VALUES, r2);
    1786             :                 }
    1787         172 :                 if (dce_call->fault_code != 0) {
    1788           0 :                         DBG_WARNING("dcerpc_fault %s in samr_QueryUserInfo2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1789             :                 }
    1790         172 :                 break;
    1791             :         }
    1792          10 :         case 48: { /* samr_QueryDisplayInfo2 */
    1793          10 :                 struct samr_QueryDisplayInfo2 *r2 = (struct samr_QueryDisplayInfo2 *)r;
    1794          10 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1795           0 :                         DEBUG(5,("function samr_QueryDisplayInfo2 replied async\n"));
    1796             :                 }
    1797          10 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1798           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo2, NDR_OUT | NDR_SET_VALUES, r2);
    1799             :                 }
    1800          10 :                 if (dce_call->fault_code != 0) {
    1801           0 :                         DBG_WARNING("dcerpc_fault %s in samr_QueryDisplayInfo2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1802             :                 }
    1803          10 :                 break;
    1804             :         }
    1805          20 :         case 49: { /* samr_GetDisplayEnumerationIndex2 */
    1806          20 :                 struct samr_GetDisplayEnumerationIndex2 *r2 = (struct samr_GetDisplayEnumerationIndex2 *)r;
    1807          20 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1808           0 :                         DEBUG(5,("function samr_GetDisplayEnumerationIndex2 replied async\n"));
    1809             :                 }
    1810          20 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1811           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetDisplayEnumerationIndex2, NDR_OUT | NDR_SET_VALUES, r2);
    1812             :                 }
    1813          20 :                 if (dce_call->fault_code != 0) {
    1814           0 :                         DBG_WARNING("dcerpc_fault %s in samr_GetDisplayEnumerationIndex2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1815             :                 }
    1816          20 :                 break;
    1817             :         }
    1818          79 :         case 50: { /* samr_CreateUser2 */
    1819          79 :                 struct samr_CreateUser2 *r2 = (struct samr_CreateUser2 *)r;
    1820          79 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1821           0 :                         DEBUG(5,("function samr_CreateUser2 replied async\n"));
    1822             :                 }
    1823          79 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1824           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_CreateUser2, NDR_OUT | NDR_SET_VALUES, r2);
    1825             :                 }
    1826          79 :                 if (dce_call->fault_code != 0) {
    1827           0 :                         DBG_WARNING("dcerpc_fault %s in samr_CreateUser2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1828             :                 }
    1829          79 :                 break;
    1830             :         }
    1831          10 :         case 51: { /* samr_QueryDisplayInfo3 */
    1832          10 :                 struct samr_QueryDisplayInfo3 *r2 = (struct samr_QueryDisplayInfo3 *)r;
    1833          10 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1834           0 :                         DEBUG(5,("function samr_QueryDisplayInfo3 replied async\n"));
    1835             :                 }
    1836          10 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1837           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_QueryDisplayInfo3, NDR_OUT | NDR_SET_VALUES, r2);
    1838             :                 }
    1839          10 :                 if (dce_call->fault_code != 0) {
    1840           0 :                         DBG_WARNING("dcerpc_fault %s in samr_QueryDisplayInfo3\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1841             :                 }
    1842          10 :                 break;
    1843             :         }
    1844           0 :         case 52: { /* samr_AddMultipleMembersToAlias */
    1845           0 :                 struct samr_AddMultipleMembersToAlias *r2 = (struct samr_AddMultipleMembersToAlias *)r;
    1846           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1847           0 :                         DEBUG(5,("function samr_AddMultipleMembersToAlias replied async\n"));
    1848             :                 }
    1849           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1850           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_AddMultipleMembersToAlias, NDR_OUT | NDR_SET_VALUES, r2);
    1851             :                 }
    1852           0 :                 if (dce_call->fault_code != 0) {
    1853           0 :                         DBG_WARNING("dcerpc_fault %s in samr_AddMultipleMembersToAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1854             :                 }
    1855           0 :                 break;
    1856             :         }
    1857           0 :         case 53: { /* samr_RemoveMultipleMembersFromAlias */
    1858           0 :                 struct samr_RemoveMultipleMembersFromAlias *r2 = (struct samr_RemoveMultipleMembersFromAlias *)r;
    1859           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1860           0 :                         DEBUG(5,("function samr_RemoveMultipleMembersFromAlias replied async\n"));
    1861             :                 }
    1862           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1863           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_RemoveMultipleMembersFromAlias, NDR_OUT | NDR_SET_VALUES, r2);
    1864             :                 }
    1865           0 :                 if (dce_call->fault_code != 0) {
    1866           0 :                         DBG_WARNING("dcerpc_fault %s in samr_RemoveMultipleMembersFromAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1867             :                 }
    1868           0 :                 break;
    1869             :         }
    1870          14 :         case 54: { /* samr_OemChangePasswordUser2 */
    1871          14 :                 struct samr_OemChangePasswordUser2 *r2 = (struct samr_OemChangePasswordUser2 *)r;
    1872          14 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1873           0 :                         DEBUG(5,("function samr_OemChangePasswordUser2 replied async\n"));
    1874             :                 }
    1875          14 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1876           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_OemChangePasswordUser2, NDR_OUT | NDR_SET_VALUES, r2);
    1877             :                 }
    1878          14 :                 if (dce_call->fault_code != 0) {
    1879           0 :                         DBG_WARNING("dcerpc_fault %s in samr_OemChangePasswordUser2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1880             :                 }
    1881          14 :                 break;
    1882             :         }
    1883          11 :         case 55: { /* samr_ChangePasswordUser2 */
    1884          11 :                 struct samr_ChangePasswordUser2 *r2 = (struct samr_ChangePasswordUser2 *)r;
    1885          11 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1886           0 :                         DEBUG(5,("function samr_ChangePasswordUser2 replied async\n"));
    1887             :                 }
    1888          11 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1889           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser2, NDR_OUT | NDR_SET_VALUES, r2);
    1890             :                 }
    1891          11 :                 if (dce_call->fault_code != 0) {
    1892           0 :                         DBG_WARNING("dcerpc_fault %s in samr_ChangePasswordUser2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1893             :                 }
    1894          11 :                 break;
    1895             :         }
    1896         252 :         case 56: { /* samr_GetDomPwInfo */
    1897         252 :                 struct samr_GetDomPwInfo *r2 = (struct samr_GetDomPwInfo *)r;
    1898         252 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1899           0 :                         DEBUG(5,("function samr_GetDomPwInfo replied async\n"));
    1900             :                 }
    1901         252 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1902           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetDomPwInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1903             :                 }
    1904         252 :                 if (dce_call->fault_code != 0) {
    1905           0 :                         DBG_WARNING("dcerpc_fault %s in samr_GetDomPwInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1906             :                 }
    1907         252 :                 break;
    1908             :         }
    1909         124 :         case 57: { /* samr_Connect2 */
    1910         124 :                 struct samr_Connect2 *r2 = (struct samr_Connect2 *)r;
    1911         124 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1912           0 :                         DEBUG(5,("function samr_Connect2 replied async\n"));
    1913             :                 }
    1914         124 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1915           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect2, NDR_OUT | NDR_SET_VALUES, r2);
    1916             :                 }
    1917         124 :                 if (dce_call->fault_code != 0) {
    1918           0 :                         DBG_WARNING("dcerpc_fault %s in samr_Connect2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1919             :                 }
    1920         124 :                 break;
    1921             :         }
    1922         207 :         case 58: { /* samr_SetUserInfo2 */
    1923         207 :                 struct samr_SetUserInfo2 *r2 = (struct samr_SetUserInfo2 *)r;
    1924         207 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1925           0 :                         DEBUG(5,("function samr_SetUserInfo2 replied async\n"));
    1926             :                 }
    1927         207 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1928           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetUserInfo2, NDR_OUT | NDR_SET_VALUES, r2);
    1929             :                 }
    1930         207 :                 if (dce_call->fault_code != 0) {
    1931           0 :                         DBG_WARNING("dcerpc_fault %s in samr_SetUserInfo2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1932             :                 }
    1933         207 :                 break;
    1934             :         }
    1935           0 :         case 59: { /* samr_SetBootKeyInformation */
    1936           0 :                 struct samr_SetBootKeyInformation *r2 = (struct samr_SetBootKeyInformation *)r;
    1937           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1938           0 :                         DEBUG(5,("function samr_SetBootKeyInformation replied async\n"));
    1939             :                 }
    1940           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1941           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetBootKeyInformation, NDR_OUT | NDR_SET_VALUES, r2);
    1942             :                 }
    1943           0 :                 if (dce_call->fault_code != 0) {
    1944           0 :                         DBG_WARNING("dcerpc_fault %s in samr_SetBootKeyInformation\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1945             :                 }
    1946           0 :                 break;
    1947             :         }
    1948           0 :         case 60: { /* samr_GetBootKeyInformation */
    1949           0 :                 struct samr_GetBootKeyInformation *r2 = (struct samr_GetBootKeyInformation *)r;
    1950           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1951           0 :                         DEBUG(5,("function samr_GetBootKeyInformation replied async\n"));
    1952             :                 }
    1953           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1954           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_GetBootKeyInformation, NDR_OUT | NDR_SET_VALUES, r2);
    1955             :                 }
    1956           0 :                 if (dce_call->fault_code != 0) {
    1957           0 :                         DBG_WARNING("dcerpc_fault %s in samr_GetBootKeyInformation\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1958             :                 }
    1959           0 :                 break;
    1960             :         }
    1961          43 :         case 61: { /* samr_Connect3 */
    1962          43 :                 struct samr_Connect3 *r2 = (struct samr_Connect3 *)r;
    1963          43 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1964           0 :                         DEBUG(5,("function samr_Connect3 replied async\n"));
    1965             :                 }
    1966          43 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1967           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect3, NDR_OUT | NDR_SET_VALUES, r2);
    1968             :                 }
    1969          43 :                 if (dce_call->fault_code != 0) {
    1970           0 :                         DBG_WARNING("dcerpc_fault %s in samr_Connect3\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1971             :                 }
    1972          43 :                 break;
    1973             :         }
    1974          43 :         case 62: { /* samr_Connect4 */
    1975          43 :                 struct samr_Connect4 *r2 = (struct samr_Connect4 *)r;
    1976          43 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1977           0 :                         DEBUG(5,("function samr_Connect4 replied async\n"));
    1978             :                 }
    1979          43 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1980           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect4, NDR_OUT | NDR_SET_VALUES, r2);
    1981             :                 }
    1982          43 :                 if (dce_call->fault_code != 0) {
    1983           0 :                         DBG_WARNING("dcerpc_fault %s in samr_Connect4\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1984             :                 }
    1985          43 :                 break;
    1986             :         }
    1987         128 :         case 63: { /* samr_ChangePasswordUser3 */
    1988         128 :                 struct samr_ChangePasswordUser3 *r2 = (struct samr_ChangePasswordUser3 *)r;
    1989         128 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1990           0 :                         DEBUG(5,("function samr_ChangePasswordUser3 replied async\n"));
    1991             :                 }
    1992         128 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1993           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ChangePasswordUser3, NDR_OUT | NDR_SET_VALUES, r2);
    1994             :                 }
    1995         128 :                 if (dce_call->fault_code != 0) {
    1996           0 :                         DBG_WARNING("dcerpc_fault %s in samr_ChangePasswordUser3\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1997             :                 }
    1998         128 :                 break;
    1999             :         }
    2000          49 :         case 64: { /* samr_Connect5 */
    2001          49 :                 struct samr_Connect5 *r2 = (struct samr_Connect5 *)r;
    2002          49 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2003           0 :                         DEBUG(5,("function samr_Connect5 replied async\n"));
    2004             :                 }
    2005          49 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2006           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_Connect5, NDR_OUT | NDR_SET_VALUES, r2);
    2007             :                 }
    2008          49 :                 if (dce_call->fault_code != 0) {
    2009           0 :                         DBG_WARNING("dcerpc_fault %s in samr_Connect5\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2010             :                 }
    2011          49 :                 break;
    2012             :         }
    2013           8 :         case 65: { /* samr_RidToSid */
    2014           8 :                 struct samr_RidToSid *r2 = (struct samr_RidToSid *)r;
    2015           8 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2016           0 :                         DEBUG(5,("function samr_RidToSid replied async\n"));
    2017             :                 }
    2018           8 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2019           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_RidToSid, NDR_OUT | NDR_SET_VALUES, r2);
    2020             :                 }
    2021           8 :                 if (dce_call->fault_code != 0) {
    2022           0 :                         DBG_WARNING("dcerpc_fault %s in samr_RidToSid\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2023             :                 }
    2024           8 :                 break;
    2025             :         }
    2026           0 :         case 66: { /* samr_SetDsrmPassword */
    2027           0 :                 struct samr_SetDsrmPassword *r2 = (struct samr_SetDsrmPassword *)r;
    2028           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2029           0 :                         DEBUG(5,("function samr_SetDsrmPassword replied async\n"));
    2030             :                 }
    2031           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2032           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_SetDsrmPassword, NDR_OUT | NDR_SET_VALUES, r2);
    2033             :                 }
    2034           0 :                 if (dce_call->fault_code != 0) {
    2035           0 :                         DBG_WARNING("dcerpc_fault %s in samr_SetDsrmPassword\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2036             :                 }
    2037           0 :                 break;
    2038             :         }
    2039           0 :         case 67: { /* samr_ValidatePassword */
    2040           0 :                 struct samr_ValidatePassword *r2 = (struct samr_ValidatePassword *)r;
    2041           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2042           0 :                         DEBUG(5,("function samr_ValidatePassword replied async\n"));
    2043             :                 }
    2044           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2045           0 :                         NDR_PRINT_FUNCTION_DEBUG(samr_ValidatePassword, NDR_OUT | NDR_SET_VALUES, r2);
    2046             :                 }
    2047           0 :                 if (dce_call->fault_code != 0) {
    2048           0 :                         DBG_WARNING("dcerpc_fault %s in samr_ValidatePassword\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2049             :                 }
    2050           0 :                 break;
    2051             :         }
    2052           0 :         default:
    2053           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
    2054           0 :                 break;
    2055             :         }
    2056             : 
    2057        8287 :         if (dce_call->fault_code != 0) {
    2058           0 :                 return NT_STATUS_NET_WRITE_FAULT;
    2059             :         }
    2060             : 
    2061        8287 :         return NT_STATUS_OK;
    2062             : }
    2063             : 
    2064        8287 : NTSTATUS samr__op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
    2065             : {
    2066             :         enum ndr_err_code ndr_err;
    2067        8287 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
    2068             : 
    2069        8287 :         ndr_err = ndr_table_samr.calls[opnum].ndr_push(push, NDR_OUT, r);
    2070        8287 :         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    2071           0 :                 dce_call->fault_code = DCERPC_FAULT_NDR;
    2072           0 :                 return NT_STATUS_NET_WRITE_FAULT;
    2073             :         }
    2074             : 
    2075        8287 :         return NT_STATUS_OK;
    2076             : }
    2077             : 
    2078         548 : NTSTATUS samr__op_local(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
    2079             : {
    2080         548 :         return samr__op_dispatch_internal(dce_call, mem_ctx, r, S3COMPAT_RPC_DISPATCH_INTERNAL);
    2081             : }
    2082             : 
    2083             : static const struct dcesrv_interface dcesrv_samr_interface = {
    2084             :         .name      = "samr",
    2085             :         .syntax_id = {{0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xac}},1.0},
    2086             :         .bind      = samr__op_bind,
    2087             :         .unbind    = samr__op_unbind,
    2088             :         .ndr_pull  = samr__op_ndr_pull,
    2089             :         .dispatch  = samr__op_dispatch,
    2090             :         .reply     = samr__op_reply,
    2091             :         .ndr_push  = samr__op_ndr_push,
    2092             :         .local     = samr__op_local,
    2093             : #ifdef DCESRV_INTERFACE_SAMR_FLAGS
    2094             :         .flags     = DCESRV_INTERFACE_SAMR_FLAGS
    2095             : #else
    2096             :         .flags     = 0
    2097             : #endif
    2098             : };
    2099             : 
    2100         306 : static NTSTATUS samr__check_register_in_endpoint(const char *name, struct dcerpc_binding *binding) {
    2101         306 :         enum dcerpc_transport_t transport = dcerpc_binding_get_transport(binding);
    2102             :         NTSTATUS status;
    2103             : 
    2104             :         /* If service is disabled, do not register */
    2105         306 :         if (rpc_service_mode(name) == RPC_SERVICE_MODE_DISABLED) {
    2106           0 :                 return NT_STATUS_NOT_IMPLEMENTED;
    2107             :         }
    2108             : 
    2109             :         /* If service is embedded, register only for ncacn_np
    2110             :          * see 8466b3c85e4b835e57e41776853093f4a0edc8b8
    2111             :          */
    2112         306 :         if (rpc_service_mode(name) == RPC_SERVICE_MODE_EMBEDDED && (transport != NCACN_NP && transport != NCALRPC)) {
    2113          32 :                 DBG_INFO("Interface 'samr' not registered in endpoint '%s' as service is embedded\n", name);
    2114          32 :                 return NT_STATUS_NOT_SUPPORTED;
    2115             :         }
    2116             : 
    2117             :         /*
    2118             :          * If rpc service is external then change the default ncalrpc endpoint,
    2119             :          * otherwise if the rpc daemon running this service is configured in
    2120             :          * fork mode the forked process will race with main smbd to accept the
    2121             :          * connections in the default ncalrpc socket, and the forked process
    2122             :          * may not have the requested interface registered.
    2123             :          * For example, in the ad_member test environment:
    2124             :          *
    2125             :          *   rpc_server:lsarpc = external
    2126             :          *   rpc_server:samr = external
    2127             :          *   rpc_server:netlogon = disabled
    2128             :          *   rpc_daemon:lsasd = fork
    2129             :          *
    2130             :          * With these settings both, the main smbd and all the preforked lsasd
    2131             :          * processes would be listening in the default ncalrpc socket if it is
    2132             :          * not changed. If a client connection is accepted by one of the lsasd
    2133             :          * worker processes and the client asks for an interface not registered
    2134             :          * in these processes (winreg for example) it will get an error.
    2135             :          */
    2136         274 :         if (rpc_service_mode(name) == RPC_SERVICE_MODE_EXTERNAL && transport == NCALRPC) {
    2137          70 :                 status = dcerpc_binding_set_string_option(binding, "endpoint", "SAMR");
    2138          70 :                 if (!NT_STATUS_IS_OK(status)) {
    2139           0 :                         return status;
    2140             :                 }
    2141             :         }
    2142             : 
    2143         274 :         return NT_STATUS_OK;
    2144             : }
    2145             : 
    2146         102 : static NTSTATUS samr__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
    2147             : {
    2148             :         uint32_t i;
    2149             :         NTSTATUS ret;
    2150             :         struct dcerpc_binding *binding;
    2151         102 :         struct dcerpc_binding *binding2 = NULL;
    2152             : 
    2153             : #ifdef DCESRV_INTERFACE_SAMR_NCACN_NP_SECONDARY_ENDPOINT
    2154             :         const char *ncacn_np_secondary_endpoint = DCESRV_INTERFACE_SAMR_NCACN_NP_SECONDARY_ENDPOINT;
    2155             : #else
    2156         102 :         const char *ncacn_np_secondary_endpoint = NULL;
    2157             : #endif
    2158             : 
    2159         408 :         for (i=0;i<ndr_table_samr.endpoints->count;i++) {
    2160         306 :                 const char *name = ndr_table_samr.endpoints->names[i];
    2161             : 
    2162         306 :                 ret = dcerpc_parse_binding(dce_ctx, name, &binding);
    2163         306 :                 if (NT_STATUS_IS_ERR(ret)) {
    2164           0 :                         DBG_ERR("Failed to parse binding string '%s'\n", name);
    2165           0 :                         return ret;
    2166             :                 }
    2167             : 
    2168         306 :                 ret = samr__check_register_in_endpoint("samr", binding);
    2169         306 :                 if (NT_STATUS_IS_ERR(ret)) {
    2170          32 :                         talloc_free(binding);
    2171          32 :                         continue;
    2172             :                 }
    2173             : 
    2174         266 :                 if (ncacn_np_secondary_endpoint != NULL) {
    2175           0 :                         ret = dcerpc_parse_binding(dce_ctx, ncacn_np_secondary_endpoint, &binding2);
    2176           0 :                         if (NT_STATUS_IS_ERR(ret)) {
    2177           0 :                                 DBG_ERR("Failed to parse 2nd binding string '%s'\n", ncacn_np_secondary_endpoint);
    2178           0 :                                 TALLOC_FREE(binding);
    2179           0 :                                 return ret;
    2180             :                         }
    2181             :                 }
    2182             : 
    2183         274 :                 ret = dcesrv_interface_register_b(dce_ctx, binding, binding2, &dcesrv_samr_interface, NULL);
    2184         274 :                 TALLOC_FREE(binding);
    2185         266 :                 TALLOC_FREE(binding2);
    2186         274 :                 if (!NT_STATUS_IS_OK(ret)) {
    2187           0 :                         DBG_ERR("Failed to register endpoint '%s'\n",name);
    2188           0 :                         return ret;
    2189             :                 }
    2190             :         }
    2191             : 
    2192         102 :         return NT_STATUS_OK;
    2193             : }
    2194             : 
    2195           1 : static NTSTATUS samr__op_shutdown_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
    2196             : {
    2197           1 :         return NT_STATUS_OK;
    2198             : }
    2199             : 
    2200           0 : static bool samr__op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
    2201             : {
    2202           0 :         if (dcesrv_samr_interface.syntax_id.if_version == if_version && GUID_equal(&dcesrv_samr_interface.syntax_id.uuid, uuid)) {
    2203           0 :                 memcpy(iface,&dcesrv_samr_interface, sizeof(*iface));
    2204           0 :                 return true;
    2205             :         }
    2206             : 
    2207           0 :         return false;
    2208             : }
    2209             : 
    2210           0 : static bool samr__op_interface_by_name(struct dcesrv_interface *iface, const char *name)
    2211             : {
    2212           0 :         if (strcmp(dcesrv_samr_interface.name, name)==0) {
    2213           0 :                 memcpy(iface, &dcesrv_samr_interface, sizeof(*iface));
    2214           0 :                 return true;
    2215             :         }
    2216             : 
    2217           0 :         return false;
    2218             : }
    2219             : 
    2220             : static const struct dcesrv_endpoint_server samr_ep_server = {
    2221             :         /* fill in our name */
    2222             :         .name = "samr",
    2223             : 
    2224             :         /* Initialization flag */
    2225             :         .initialized = false,
    2226             : 
    2227             :         /* fill in all the operations */
    2228             : #ifdef DCESRV_INTERFACE_SAMR_INIT_SERVER
    2229             :         .init_server = DCESRV_INTERFACE_SAMR_INIT_SERVER,
    2230             : #else
    2231             :         .init_server = samr__op_init_server,
    2232             : #endif
    2233             : #ifdef DCESRV_INTERFACE_SAMR_SHUTDOWN_SERVER
    2234             :         .shutdown_server = DCESRV_INTERFACE_SAMR_SHUTDOWN_SERVER,
    2235             : #else
    2236             :         .shutdown_server = samr__op_shutdown_server,
    2237             : #endif
    2238             :         .interface_by_uuid = samr__op_interface_by_uuid,
    2239             :         .interface_by_name = samr__op_interface_by_name
    2240             : };
    2241             : 
    2242         143 : const struct dcesrv_endpoint_server *samr_get_ep_server(void)
    2243             : {
    2244         143 :         return &samr_ep_server;
    2245             : }

Generated by: LCOV version 1.13