LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_netlogon_s.c (source / functions) Hit Total Coverage
Test: coverage report for v4-17-test 1498b464 Lines: 506 905 55.9 %
Date: 2024-06-13 04:01:37 Functions: 8 11 72.7 %

          Line data    Source code
       1             : /* server functions auto-generated by pidl */
       2             : #include "bin/default/librpc/gen_ndr/ndr_netlogon.h"
       3             : #include <util/debug.h>
       4             : 
       5             : NTSTATUS dcerpc_server_netlogon_init(TALLOC_CTX *);
       6             : 
       7             : /* netlogon - dcerpc server boilerplate generated by pidl */
       8             : 
       9             : 
      10        1591 : static NTSTATUS netlogon__op_bind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
      11             : {
      12             : #ifdef DCESRV_INTERFACE_NETLOGON_BIND
      13        1591 :         return DCESRV_INTERFACE_NETLOGON_BIND(context,iface);
      14             : #else
      15             :         return NT_STATUS_OK;
      16             : #endif
      17             : }
      18             : 
      19        1615 : static void netlogon__op_unbind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
      20             : {
      21             : #ifdef DCESRV_INTERFACE_NETLOGON_UNBIND
      22             :         DCESRV_INTERFACE_NETLOGON_UNBIND(context, iface);
      23             : #else
      24        1615 :         return;
      25             : #endif
      26             : }
      27             : 
      28       23663 : static NTSTATUS netlogon__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
      29             : {
      30             :         enum ndr_err_code ndr_err;
      31       23663 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
      32             : 
      33       23663 :         dce_call->fault_code = 0;
      34             : 
      35       23663 :         if (opnum >= ndr_table_netlogon.num_calls) {
      36           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
      37           0 :                 return NT_STATUS_NET_WRITE_FAULT;
      38             :         }
      39             : 
      40       47326 :         *r = talloc_named(mem_ctx,
      41       23663 :                           ndr_table_netlogon.calls[opnum].struct_size,
      42             :                           "struct %s",
      43       23663 :                           ndr_table_netlogon.calls[opnum].name);
      44       23663 :         NT_STATUS_HAVE_NO_MEMORY(*r);
      45             : 
      46             :         /* unravel the NDR for the packet */
      47       23663 :         ndr_err = ndr_table_netlogon.calls[opnum].ndr_pull(pull, NDR_IN, *r);
      48       23663 :         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
      49           0 :                 dce_call->fault_code = DCERPC_FAULT_NDR;
      50           0 :                 return NT_STATUS_NET_WRITE_FAULT;
      51             :         }
      52             : 
      53       23663 :         return NT_STATUS_OK;
      54             : }
      55             : 
      56       23663 : static NTSTATUS netlogon__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
      57             : {
      58       23663 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
      59             : 
      60       23663 :         switch (opnum) {
      61           9 :         case 0: {
      62           9 :                 struct netr_LogonUasLogon *r2 = (struct netr_LogonUasLogon *)r;
      63           9 :                 if (DEBUGLEVEL >= 10) {
      64           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonUasLogon, NDR_IN, r2);
      65             :                 }
      66           9 :                 r2->out.result = dcesrv_netr_LogonUasLogon(dce_call, mem_ctx, r2);
      67           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
      68           0 :                         DEBUG(5,("function netr_LogonUasLogon will reply async\n"));
      69             :                 }
      70           9 :                 break;
      71             :         }
      72           9 :         case 1: {
      73           9 :                 struct netr_LogonUasLogoff *r2 = (struct netr_LogonUasLogoff *)r;
      74           9 :                 if (DEBUGLEVEL >= 10) {
      75           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonUasLogoff, NDR_IN, r2);
      76             :                 }
      77           9 :                 r2->out.result = dcesrv_netr_LogonUasLogoff(dce_call, mem_ctx, r2);
      78           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
      79           0 :                         DEBUG(5,("function netr_LogonUasLogoff will reply async\n"));
      80             :                 }
      81           9 :                 break;
      82             :         }
      83        5905 :         case 2: {
      84        5905 :                 struct netr_LogonSamLogon *r2 = (struct netr_LogonSamLogon *)r;
      85        5905 :                 if (DEBUGLEVEL >= 10) {
      86           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonSamLogon, NDR_IN, r2);
      87             :                 }
      88        5905 :                 r2->out.result = dcesrv_netr_LogonSamLogon(dce_call, mem_ctx, r2);
      89        5905 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
      90        4210 :                         DEBUG(5,("function netr_LogonSamLogon will reply async\n"));
      91             :                 }
      92        5905 :                 break;
      93             :         }
      94           0 :         case 3: {
      95           0 :                 struct netr_LogonSamLogoff *r2 = (struct netr_LogonSamLogoff *)r;
      96           0 :                 if (DEBUGLEVEL >= 10) {
      97           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonSamLogoff, NDR_IN, r2);
      98             :                 }
      99           0 :                 r2->out.result = dcesrv_netr_LogonSamLogoff(dce_call, mem_ctx, r2);
     100           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     101           0 :                         DEBUG(5,("function netr_LogonSamLogoff will reply async\n"));
     102             :                 }
     103           0 :                 break;
     104             :         }
     105        5085 :         case 4: {
     106        5085 :                 struct netr_ServerReqChallenge *r2 = (struct netr_ServerReqChallenge *)r;
     107        5085 :                 if (DEBUGLEVEL >= 10) {
     108           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerReqChallenge, NDR_IN, r2);
     109             :                 }
     110        5085 :                 r2->out.result = dcesrv_netr_ServerReqChallenge(dce_call, mem_ctx, r2);
     111        5085 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     112           0 :                         DEBUG(5,("function netr_ServerReqChallenge will reply async\n"));
     113             :                 }
     114        5085 :                 break;
     115             :         }
     116         150 :         case 5: {
     117         150 :                 struct netr_ServerAuthenticate *r2 = (struct netr_ServerAuthenticate *)r;
     118         150 :                 if (DEBUGLEVEL >= 10) {
     119           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerAuthenticate, NDR_IN, r2);
     120             :                 }
     121         150 :                 r2->out.result = dcesrv_netr_ServerAuthenticate(dce_call, mem_ctx, r2);
     122         150 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     123           0 :                         DEBUG(5,("function netr_ServerAuthenticate will reply async\n"));
     124             :                 }
     125         150 :                 break;
     126             :         }
     127          27 :         case 6: {
     128          27 :                 struct netr_ServerPasswordSet *r2 = (struct netr_ServerPasswordSet *)r;
     129          27 :                 if (DEBUGLEVEL >= 10) {
     130           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerPasswordSet, NDR_IN, r2);
     131             :                 }
     132          27 :                 r2->out.result = dcesrv_netr_ServerPasswordSet(dce_call, mem_ctx, r2);
     133          27 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     134           0 :                         DEBUG(5,("function netr_ServerPasswordSet will reply async\n"));
     135             :                 }
     136          27 :                 break;
     137             :         }
     138           0 :         case 7: {
     139           0 :                 struct netr_DatabaseDeltas *r2 = (struct netr_DatabaseDeltas *)r;
     140           0 :                 if (DEBUGLEVEL >= 10) {
     141           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DatabaseDeltas, NDR_IN, r2);
     142             :                 }
     143           0 :                 r2->out.result = dcesrv_netr_DatabaseDeltas(dce_call, mem_ctx, r2);
     144           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     145           0 :                         DEBUG(5,("function netr_DatabaseDeltas will reply async\n"));
     146             :                 }
     147           0 :                 break;
     148             :         }
     149           9 :         case 8: {
     150           9 :                 struct netr_DatabaseSync *r2 = (struct netr_DatabaseSync *)r;
     151           9 :                 if (DEBUGLEVEL >= 10) {
     152           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DatabaseSync, NDR_IN, r2);
     153             :                 }
     154           9 :                 r2->out.result = dcesrv_netr_DatabaseSync(dce_call, mem_ctx, r2);
     155           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     156           0 :                         DEBUG(5,("function netr_DatabaseSync will reply async\n"));
     157             :                 }
     158           9 :                 break;
     159             :         }
     160           9 :         case 9: {
     161           9 :                 struct netr_AccountDeltas *r2 = (struct netr_AccountDeltas *)r;
     162           9 :                 if (DEBUGLEVEL >= 10) {
     163           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_AccountDeltas, NDR_IN, r2);
     164             :                 }
     165           9 :                 r2->out.result = dcesrv_netr_AccountDeltas(dce_call, mem_ctx, r2);
     166           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     167           0 :                         DEBUG(5,("function netr_AccountDeltas will reply async\n"));
     168             :                 }
     169           9 :                 break;
     170             :         }
     171           9 :         case 10: {
     172           9 :                 struct netr_AccountSync *r2 = (struct netr_AccountSync *)r;
     173           9 :                 if (DEBUGLEVEL >= 10) {
     174           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_AccountSync, NDR_IN, r2);
     175             :                 }
     176           9 :                 r2->out.result = dcesrv_netr_AccountSync(dce_call, mem_ctx, r2);
     177           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     178           0 :                         DEBUG(5,("function netr_AccountSync will reply async\n"));
     179             :                 }
     180           9 :                 break;
     181             :         }
     182           9 :         case 11: {
     183           9 :                 struct netr_GetDcName *r2 = (struct netr_GetDcName *)r;
     184           9 :                 if (DEBUGLEVEL >= 10) {
     185           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_GetDcName, NDR_IN, r2);
     186             :                 }
     187           9 :                 r2->out.result = dcesrv_netr_GetDcName(dce_call, mem_ctx, r2);
     188           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     189           0 :                         DEBUG(5,("function netr_GetDcName will reply async\n"));
     190             :                 }
     191           9 :                 break;
     192             :         }
     193        1813 :         case 12: {
     194        1813 :                 struct netr_LogonControl *r2 = (struct netr_LogonControl *)r;
     195        1813 :                 if (DEBUGLEVEL >= 10) {
     196           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonControl, NDR_IN, r2);
     197             :                 }
     198        1813 :                 r2->out.result = dcesrv_netr_LogonControl(dce_call, mem_ctx, r2);
     199        1813 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     200           0 :                         DEBUG(5,("function netr_LogonControl will reply async\n"));
     201             :                 }
     202        1813 :                 break;
     203             :         }
     204          27 :         case 13: {
     205          27 :                 struct netr_GetAnyDCName *r2 = (struct netr_GetAnyDCName *)r;
     206          27 :                 if (DEBUGLEVEL >= 10) {
     207           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_GetAnyDCName, NDR_IN, r2);
     208             :                 }
     209          27 :                 r2->out.result = dcesrv_netr_GetAnyDCName(dce_call, mem_ctx, r2);
     210          27 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     211           0 :                         DEBUG(5,("function netr_GetAnyDCName will reply async\n"));
     212             :                 }
     213          27 :                 break;
     214             :         }
     215         378 :         case 14: {
     216         378 :                 struct netr_LogonControl2 *r2 = (struct netr_LogonControl2 *)r;
     217         378 :                 if (DEBUGLEVEL >= 10) {
     218           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonControl2, NDR_IN, r2);
     219             :                 }
     220         378 :                 r2->out.result = dcesrv_netr_LogonControl2(dce_call, mem_ctx, r2);
     221         378 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     222          18 :                         DEBUG(5,("function netr_LogonControl2 will reply async\n"));
     223             :                 }
     224         378 :                 break;
     225             :         }
     226         383 :         case 15: {
     227         383 :                 struct netr_ServerAuthenticate2 *r2 = (struct netr_ServerAuthenticate2 *)r;
     228         383 :                 if (DEBUGLEVEL >= 10) {
     229           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerAuthenticate2, NDR_IN, r2);
     230             :                 }
     231         383 :                 r2->out.result = dcesrv_netr_ServerAuthenticate2(dce_call, mem_ctx, r2);
     232         383 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     233           0 :                         DEBUG(5,("function netr_ServerAuthenticate2 will reply async\n"));
     234             :                 }
     235         383 :                 break;
     236             :         }
     237           9 :         case 16: {
     238           9 :                 struct netr_DatabaseSync2 *r2 = (struct netr_DatabaseSync2 *)r;
     239           9 :                 if (DEBUGLEVEL >= 10) {
     240           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DatabaseSync2, NDR_IN, r2);
     241             :                 }
     242           9 :                 r2->out.result = dcesrv_netr_DatabaseSync2(dce_call, mem_ctx, r2);
     243           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     244           0 :                         DEBUG(5,("function netr_DatabaseSync2 will reply async\n"));
     245             :                 }
     246           9 :                 break;
     247             :         }
     248           9 :         case 17: {
     249           9 :                 struct netr_DatabaseRedo *r2 = (struct netr_DatabaseRedo *)r;
     250           9 :                 if (DEBUGLEVEL >= 10) {
     251           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DatabaseRedo, NDR_IN, r2);
     252             :                 }
     253           9 :                 r2->out.result = dcesrv_netr_DatabaseRedo(dce_call, mem_ctx, r2);
     254           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     255           0 :                         DEBUG(5,("function netr_DatabaseRedo will reply async\n"));
     256             :                 }
     257           9 :                 break;
     258             :         }
     259         459 :         case 18: {
     260         459 :                 struct netr_LogonControl2Ex *r2 = (struct netr_LogonControl2Ex *)r;
     261         459 :                 if (DEBUGLEVEL >= 10) {
     262           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonControl2Ex, NDR_IN, r2);
     263             :                 }
     264         459 :                 r2->out.result = dcesrv_netr_LogonControl2Ex(dce_call, mem_ctx, r2);
     265         459 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     266          99 :                         DEBUG(5,("function netr_LogonControl2Ex will reply async\n"));
     267             :                 }
     268         459 :                 break;
     269             :         }
     270          12 :         case 19: {
     271          12 :                 struct netr_NetrEnumerateTrustedDomains *r2 = (struct netr_NetrEnumerateTrustedDomains *)r;
     272          12 :                 if (DEBUGLEVEL >= 10) {
     273           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_NetrEnumerateTrustedDomains, NDR_IN, r2);
     274             :                 }
     275          12 :                 r2->out.result = dcesrv_netr_NetrEnumerateTrustedDomains(dce_call, mem_ctx, r2);
     276          12 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     277           0 :                         DEBUG(5,("function netr_NetrEnumerateTrustedDomains will reply async\n"));
     278             :                 }
     279          12 :                 break;
     280             :         }
     281          36 :         case 20: {
     282          36 :                 struct netr_DsRGetDCName *r2 = (struct netr_DsRGetDCName *)r;
     283          36 :                 if (DEBUGLEVEL >= 10) {
     284           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsRGetDCName, NDR_IN, r2);
     285             :                 }
     286          36 :                 r2->out.result = dcesrv_netr_DsRGetDCName(dce_call, mem_ctx, r2);
     287          36 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     288          12 :                         DEBUG(5,("function netr_DsRGetDCName will reply async\n"));
     289             :                 }
     290          36 :                 break;
     291             :         }
     292        1077 :         case 21: {
     293        1077 :                 struct netr_LogonGetCapabilities *r2 = (struct netr_LogonGetCapabilities *)r;
     294        1077 :                 if (DEBUGLEVEL >= 10) {
     295           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonGetCapabilities, NDR_IN, r2);
     296             :                 }
     297        1077 :                 r2->out.result = dcesrv_netr_LogonGetCapabilities(dce_call, mem_ctx, r2);
     298        1077 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     299           0 :                         DEBUG(5,("function netr_LogonGetCapabilities will reply async\n"));
     300             :                 }
     301        1077 :                 break;
     302             :         }
     303           0 :         case 22: {
     304           0 :                 struct netr_NETRLOGONSETSERVICEBITS *r2 = (struct netr_NETRLOGONSETSERVICEBITS *)r;
     305           0 :                 if (DEBUGLEVEL >= 10) {
     306           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_NETRLOGONSETSERVICEBITS, NDR_IN, r2);
     307             :                 }
     308           0 :                 r2->out.result = dcesrv_netr_NETRLOGONSETSERVICEBITS(dce_call, mem_ctx, r2);
     309           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     310           0 :                         DEBUG(5,("function netr_NETRLOGONSETSERVICEBITS will reply async\n"));
     311             :                 }
     312           0 :                 break;
     313             :         }
     314           0 :         case 23: {
     315           0 :                 struct netr_LogonGetTrustRid *r2 = (struct netr_LogonGetTrustRid *)r;
     316           0 :                 if (DEBUGLEVEL >= 10) {
     317           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonGetTrustRid, NDR_IN, r2);
     318             :                 }
     319           0 :                 r2->out.result = dcesrv_netr_LogonGetTrustRid(dce_call, mem_ctx, r2);
     320           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     321           0 :                         DEBUG(5,("function netr_LogonGetTrustRid will reply async\n"));
     322             :                 }
     323           0 :                 break;
     324             :         }
     325           0 :         case 24: {
     326           0 :                 struct netr_NETRLOGONCOMPUTESERVERDIGEST *r2 = (struct netr_NETRLOGONCOMPUTESERVERDIGEST *)r;
     327           0 :                 if (DEBUGLEVEL >= 10) {
     328           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, NDR_IN, r2);
     329             :                 }
     330           0 :                 r2->out.result = dcesrv_netr_NETRLOGONCOMPUTESERVERDIGEST(dce_call, mem_ctx, r2);
     331           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     332           0 :                         DEBUG(5,("function netr_NETRLOGONCOMPUTESERVERDIGEST will reply async\n"));
     333             :                 }
     334           0 :                 break;
     335             :         }
     336           0 :         case 25: {
     337           0 :                 struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r2 = (struct netr_NETRLOGONCOMPUTECLIENTDIGEST *)r;
     338           0 :                 if (DEBUGLEVEL >= 10) {
     339           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, NDR_IN, r2);
     340             :                 }
     341           0 :                 r2->out.result = dcesrv_netr_NETRLOGONCOMPUTECLIENTDIGEST(dce_call, mem_ctx, r2);
     342           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     343           0 :                         DEBUG(5,("function netr_NETRLOGONCOMPUTECLIENTDIGEST will reply async\n"));
     344             :                 }
     345           0 :                 break;
     346             :         }
     347         541 :         case 26: {
     348         541 :                 struct netr_ServerAuthenticate3 *r2 = (struct netr_ServerAuthenticate3 *)r;
     349         541 :                 if (DEBUGLEVEL >= 10) {
     350           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerAuthenticate3, NDR_IN, r2);
     351             :                 }
     352         541 :                 r2->out.result = dcesrv_netr_ServerAuthenticate3(dce_call, mem_ctx, r2);
     353         541 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     354           0 :                         DEBUG(5,("function netr_ServerAuthenticate3 will reply async\n"));
     355             :                 }
     356         541 :                 break;
     357             :         }
     358          46 :         case 27: {
     359          46 :                 struct netr_DsRGetDCNameEx *r2 = (struct netr_DsRGetDCNameEx *)r;
     360          46 :                 if (DEBUGLEVEL >= 10) {
     361           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsRGetDCNameEx, NDR_IN, r2);
     362             :                 }
     363          46 :                 r2->out.result = dcesrv_netr_DsRGetDCNameEx(dce_call, mem_ctx, r2);
     364          46 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     365          18 :                         DEBUG(5,("function netr_DsRGetDCNameEx will reply async\n"));
     366             :                 }
     367          46 :                 break;
     368             :         }
     369          36 :         case 28: {
     370          36 :                 struct netr_DsRGetSiteName *r2 = (struct netr_DsRGetSiteName *)r;
     371          36 :                 if (DEBUGLEVEL >= 10) {
     372           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsRGetSiteName, NDR_IN, r2);
     373             :                 }
     374          36 :                 r2->out.result = dcesrv_netr_DsRGetSiteName(dce_call, mem_ctx, r2);
     375          36 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     376           0 :                         DEBUG(5,("function netr_DsRGetSiteName will reply async\n"));
     377             :                 }
     378          36 :                 break;
     379             :         }
     380          98 :         case 29: {
     381          98 :                 struct netr_LogonGetDomainInfo *r2 = (struct netr_LogonGetDomainInfo *)r;
     382          98 :                 if (DEBUGLEVEL >= 10) {
     383           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonGetDomainInfo, NDR_IN, r2);
     384             :                 }
     385          98 :                 r2->out.result = dcesrv_netr_LogonGetDomainInfo(dce_call, mem_ctx, r2);
     386          98 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     387           0 :                         DEBUG(5,("function netr_LogonGetDomainInfo will reply async\n"));
     388             :                 }
     389          98 :                 break;
     390             :         }
     391         229 :         case 30: {
     392         229 :                 struct netr_ServerPasswordSet2 *r2 = (struct netr_ServerPasswordSet2 *)r;
     393         229 :                 if (DEBUGLEVEL >= 10) {
     394           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerPasswordSet2, NDR_IN, r2);
     395             :                 }
     396         229 :                 r2->out.result = dcesrv_netr_ServerPasswordSet2(dce_call, mem_ctx, r2);
     397         229 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     398           0 :                         DEBUG(5,("function netr_ServerPasswordSet2 will reply async\n"));
     399             :                 }
     400         229 :                 break;
     401             :         }
     402           9 :         case 31: {
     403           9 :                 struct netr_ServerPasswordGet *r2 = (struct netr_ServerPasswordGet *)r;
     404           9 :                 if (DEBUGLEVEL >= 10) {
     405           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerPasswordGet, NDR_IN, r2);
     406             :                 }
     407           9 :                 r2->out.result = dcesrv_netr_ServerPasswordGet(dce_call, mem_ctx, r2);
     408           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     409           0 :                         DEBUG(5,("function netr_ServerPasswordGet will reply async\n"));
     410             :                 }
     411           9 :                 break;
     412             :         }
     413          17 :         case 32: {
     414          17 :                 struct netr_NetrLogonSendToSam *r2 = (struct netr_NetrLogonSendToSam *)r;
     415          17 :                 if (DEBUGLEVEL >= 10) {
     416           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_NetrLogonSendToSam, NDR_IN, r2);
     417             :                 }
     418          17 :                 r2->out.result = dcesrv_netr_NetrLogonSendToSam(dce_call, mem_ctx, r2);
     419          17 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     420           0 :                         DEBUG(5,("function netr_NetrLogonSendToSam will reply async\n"));
     421             :                 }
     422          17 :                 break;
     423             :         }
     424          27 :         case 33: {
     425          27 :                 struct netr_DsRAddressToSitenamesW *r2 = (struct netr_DsRAddressToSitenamesW *)r;
     426          27 :                 if (DEBUGLEVEL >= 10) {
     427           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsRAddressToSitenamesW, NDR_IN, r2);
     428             :                 }
     429          27 :                 r2->out.result = dcesrv_netr_DsRAddressToSitenamesW(dce_call, mem_ctx, r2);
     430          27 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     431           0 :                         DEBUG(5,("function netr_DsRAddressToSitenamesW will reply async\n"));
     432             :                 }
     433          27 :                 break;
     434             :         }
     435         159 :         case 34: {
     436         159 :                 struct netr_DsRGetDCNameEx2 *r2 = (struct netr_DsRGetDCNameEx2 *)r;
     437         159 :                 if (DEBUGLEVEL >= 10) {
     438           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsRGetDCNameEx2, NDR_IN, r2);
     439             :                 }
     440         159 :                 r2->out.result = dcesrv_netr_DsRGetDCNameEx2(dce_call, mem_ctx, r2);
     441         159 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     442          10 :                         DEBUG(5,("function netr_DsRGetDCNameEx2 will reply async\n"));
     443             :                 }
     444         159 :                 break;
     445             :         }
     446           0 :         case 35: {
     447           0 :                 struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r2 = (struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *)r;
     448           0 :                 if (DEBUGLEVEL >= 10) {
     449           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, NDR_IN, r2);
     450             :                 }
     451           0 :                 r2->out.result = dcesrv_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(dce_call, mem_ctx, r2);
     452           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     453           0 :                         DEBUG(5,("function netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN will reply async\n"));
     454             :                 }
     455           0 :                 break;
     456             :         }
     457           9 :         case 36: {
     458           9 :                 struct netr_NetrEnumerateTrustedDomainsEx *r2 = (struct netr_NetrEnumerateTrustedDomainsEx *)r;
     459           9 :                 if (DEBUGLEVEL >= 10) {
     460           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_NetrEnumerateTrustedDomainsEx, NDR_IN, r2);
     461             :                 }
     462           9 :                 r2->out.result = dcesrv_netr_NetrEnumerateTrustedDomainsEx(dce_call, mem_ctx, r2);
     463           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     464           0 :                         DEBUG(5,("function netr_NetrEnumerateTrustedDomainsEx will reply async\n"));
     465             :                 }
     466           9 :                 break;
     467             :         }
     468          27 :         case 37: {
     469          27 :                 struct netr_DsRAddressToSitenamesExW *r2 = (struct netr_DsRAddressToSitenamesExW *)r;
     470          27 :                 if (DEBUGLEVEL >= 10) {
     471           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsRAddressToSitenamesExW, NDR_IN, r2);
     472             :                 }
     473          27 :                 r2->out.result = dcesrv_netr_DsRAddressToSitenamesExW(dce_call, mem_ctx, r2);
     474          27 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     475           0 :                         DEBUG(5,("function netr_DsRAddressToSitenamesExW will reply async\n"));
     476             :                 }
     477          27 :                 break;
     478             :         }
     479          14 :         case 38: {
     480          14 :                 struct netr_DsrGetDcSiteCoverageW *r2 = (struct netr_DsrGetDcSiteCoverageW *)r;
     481          14 :                 if (DEBUGLEVEL >= 10) {
     482           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsrGetDcSiteCoverageW, NDR_IN, r2);
     483             :                 }
     484          14 :                 r2->out.result = dcesrv_netr_DsrGetDcSiteCoverageW(dce_call, mem_ctx, r2);
     485          14 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     486           0 :                         DEBUG(5,("function netr_DsrGetDcSiteCoverageW will reply async\n"));
     487             :                 }
     488          14 :                 break;
     489             :         }
     490        4656 :         case 39: {
     491        4656 :                 struct netr_LogonSamLogonEx *r2 = (struct netr_LogonSamLogonEx *)r;
     492        4656 :                 if (DEBUGLEVEL >= 10) {
     493           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonSamLogonEx, NDR_IN, r2);
     494             :                 }
     495        4656 :                 r2->out.result = dcesrv_netr_LogonSamLogonEx(dce_call, mem_ctx, r2);
     496        4656 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     497        4548 :                         DEBUG(5,("function netr_LogonSamLogonEx will reply async\n"));
     498             :                 }
     499        4656 :                 break;
     500             :         }
     501          39 :         case 40: {
     502          39 :                 struct netr_DsrEnumerateDomainTrusts *r2 = (struct netr_DsrEnumerateDomainTrusts *)r;
     503          39 :                 if (DEBUGLEVEL >= 10) {
     504           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsrEnumerateDomainTrusts, NDR_IN, r2);
     505             :                 }
     506          39 :                 r2->out.result = dcesrv_netr_DsrEnumerateDomainTrusts(dce_call, mem_ctx, r2);
     507          39 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     508           0 :                         DEBUG(5,("function netr_DsrEnumerateDomainTrusts will reply async\n"));
     509             :                 }
     510          39 :                 break;
     511             :         }
     512           0 :         case 41: {
     513           0 :                 struct netr_DsrDeregisterDNSHostRecords *r2 = (struct netr_DsrDeregisterDNSHostRecords *)r;
     514           0 :                 if (DEBUGLEVEL >= 10) {
     515           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsrDeregisterDNSHostRecords, NDR_IN, r2);
     516             :                 }
     517           0 :                 r2->out.result = dcesrv_netr_DsrDeregisterDNSHostRecords(dce_call, mem_ctx, r2);
     518           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     519           0 :                         DEBUG(5,("function netr_DsrDeregisterDNSHostRecords will reply async\n"));
     520             :                 }
     521           0 :                 break;
     522             :         }
     523           9 :         case 42: {
     524           9 :                 struct netr_ServerTrustPasswordsGet *r2 = (struct netr_ServerTrustPasswordsGet *)r;
     525           9 :                 if (DEBUGLEVEL >= 10) {
     526           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerTrustPasswordsGet, NDR_IN, r2);
     527             :                 }
     528           9 :                 r2->out.result = dcesrv_netr_ServerTrustPasswordsGet(dce_call, mem_ctx, r2);
     529           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     530           0 :                         DEBUG(5,("function netr_ServerTrustPasswordsGet will reply async\n"));
     531             :                 }
     532           9 :                 break;
     533             :         }
     534         147 :         case 43: {
     535         147 :                 struct netr_DsRGetForestTrustInformation *r2 = (struct netr_DsRGetForestTrustInformation *)r;
     536         147 :                 if (DEBUGLEVEL >= 10) {
     537           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsRGetForestTrustInformation, NDR_IN, r2);
     538             :                 }
     539         147 :                 r2->out.result = dcesrv_netr_DsRGetForestTrustInformation(dce_call, mem_ctx, r2);
     540         147 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     541          20 :                         DEBUG(5,("function netr_DsRGetForestTrustInformation will reply async\n"));
     542             :                 }
     543         147 :                 break;
     544             :         }
     545          32 :         case 44: {
     546          32 :                 struct netr_GetForestTrustInformation *r2 = (struct netr_GetForestTrustInformation *)r;
     547          32 :                 if (DEBUGLEVEL >= 10) {
     548           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_GetForestTrustInformation, NDR_IN, r2);
     549             :                 }
     550          32 :                 r2->out.result = dcesrv_netr_GetForestTrustInformation(dce_call, mem_ctx, r2);
     551          32 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     552           0 :                         DEBUG(5,("function netr_GetForestTrustInformation will reply async\n"));
     553             :                 }
     554          32 :                 break;
     555             :         }
     556        2072 :         case 45: {
     557        2072 :                 struct netr_LogonSamLogonWithFlags *r2 = (struct netr_LogonSamLogonWithFlags *)r;
     558        2072 :                 if (DEBUGLEVEL >= 10) {
     559           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonSamLogonWithFlags, NDR_IN, r2);
     560             :                 }
     561        2072 :                 r2->out.result = dcesrv_netr_LogonSamLogonWithFlags(dce_call, mem_ctx, r2);
     562        2072 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     563        2072 :                         DEBUG(5,("function netr_LogonSamLogonWithFlags will reply async\n"));
     564             :                 }
     565        2072 :                 break;
     566             :         }
     567          68 :         case 46: {
     568          68 :                 struct netr_ServerGetTrustInfo *r2 = (struct netr_ServerGetTrustInfo *)r;
     569          68 :                 if (DEBUGLEVEL >= 10) {
     570           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerGetTrustInfo, NDR_IN, r2);
     571             :                 }
     572          68 :                 r2->out.result = dcesrv_netr_ServerGetTrustInfo(dce_call, mem_ctx, r2);
     573          68 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     574           0 :                         DEBUG(5,("function netr_ServerGetTrustInfo will reply async\n"));
     575             :                 }
     576          68 :                 break;
     577             :         }
     578           0 :         case 47: {
     579           0 :                 struct netr_Unused47 *r2 = (struct netr_Unused47 *)r;
     580           0 :                 if (DEBUGLEVEL >= 10) {
     581           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_Unused47, NDR_IN, r2);
     582             :                 }
     583           0 :                 r2->out.result = dcesrv_netr_Unused47(dce_call, mem_ctx, r2);
     584           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     585           0 :                         DEBUG(5,("function netr_Unused47 will reply async\n"));
     586             :                 }
     587           0 :                 break;
     588             :         }
     589           4 :         case 48: {
     590           4 :                 struct netr_DsrUpdateReadOnlyServerDnsRecords *r2 = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)r;
     591           4 :                 if (DEBUGLEVEL >= 10) {
     592           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsrUpdateReadOnlyServerDnsRecords, NDR_IN, r2);
     593             :                 }
     594           4 :                 r2->out.result = dcesrv_netr_DsrUpdateReadOnlyServerDnsRecords(dce_call, mem_ctx, r2);
     595           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     596           4 :                         DEBUG(5,("function netr_DsrUpdateReadOnlyServerDnsRecords will reply async\n"));
     597             :                 }
     598           4 :                 break;
     599             :         }
     600             : 
     601           0 :         default:
     602           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
     603           0 :                 break;
     604             :         }
     605             : 
     606       23663 :         if (dce_call->fault_code != 0) {
     607         705 :                 return NT_STATUS_NET_WRITE_FAULT;
     608             :         }
     609             : 
     610       22958 :         return NT_STATUS_OK;
     611             : }
     612             : 
     613       22958 : static NTSTATUS netlogon__op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
     614             : {
     615       22958 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
     616             : 
     617       22958 :         switch (opnum) {
     618           0 :         case 0: {
     619           0 :                 struct netr_LogonUasLogon *r2 = (struct netr_LogonUasLogon *)r;
     620           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     621           0 :                         DEBUG(5,("function netr_LogonUasLogon replied async\n"));
     622             :                 }
     623           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     624           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonUasLogon, NDR_OUT | NDR_SET_VALUES, r2);
     625             :                 }
     626           0 :                 if (dce_call->fault_code != 0) {
     627           0 :                         DEBUG(2,("dcerpc_fault %s in netr_LogonUasLogon\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     628             :                 }
     629           0 :                 break;
     630             :         }
     631           0 :         case 1: {
     632           0 :                 struct netr_LogonUasLogoff *r2 = (struct netr_LogonUasLogoff *)r;
     633           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     634           0 :                         DEBUG(5,("function netr_LogonUasLogoff replied async\n"));
     635             :                 }
     636           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     637           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonUasLogoff, NDR_OUT | NDR_SET_VALUES, r2);
     638             :                 }
     639           0 :                 if (dce_call->fault_code != 0) {
     640           0 :                         DEBUG(2,("dcerpc_fault %s in netr_LogonUasLogoff\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     641             :                 }
     642           0 :                 break;
     643             :         }
     644        5905 :         case 2: {
     645        5905 :                 struct netr_LogonSamLogon *r2 = (struct netr_LogonSamLogon *)r;
     646        5905 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     647        4210 :                         DEBUG(5,("function netr_LogonSamLogon replied async\n"));
     648             :                 }
     649        5905 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     650           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonSamLogon, NDR_OUT | NDR_SET_VALUES, r2);
     651             :                 }
     652        5905 :                 if (dce_call->fault_code != 0) {
     653           0 :                         DEBUG(2,("dcerpc_fault %s in netr_LogonSamLogon\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     654             :                 }
     655        5905 :                 break;
     656             :         }
     657           0 :         case 3: {
     658           0 :                 struct netr_LogonSamLogoff *r2 = (struct netr_LogonSamLogoff *)r;
     659           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     660           0 :                         DEBUG(5,("function netr_LogonSamLogoff replied async\n"));
     661             :                 }
     662           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     663           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonSamLogoff, NDR_OUT | NDR_SET_VALUES, r2);
     664             :                 }
     665           0 :                 if (dce_call->fault_code != 0) {
     666           0 :                         DEBUG(2,("dcerpc_fault %s in netr_LogonSamLogoff\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     667             :                 }
     668           0 :                 break;
     669             :         }
     670        5085 :         case 4: {
     671        5085 :                 struct netr_ServerReqChallenge *r2 = (struct netr_ServerReqChallenge *)r;
     672        5085 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     673           0 :                         DEBUG(5,("function netr_ServerReqChallenge replied async\n"));
     674             :                 }
     675        5085 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     676           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerReqChallenge, NDR_OUT | NDR_SET_VALUES, r2);
     677             :                 }
     678        5085 :                 if (dce_call->fault_code != 0) {
     679           0 :                         DEBUG(2,("dcerpc_fault %s in netr_ServerReqChallenge\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     680             :                 }
     681        5085 :                 break;
     682             :         }
     683         150 :         case 5: {
     684         150 :                 struct netr_ServerAuthenticate *r2 = (struct netr_ServerAuthenticate *)r;
     685         150 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     686           0 :                         DEBUG(5,("function netr_ServerAuthenticate replied async\n"));
     687             :                 }
     688         150 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     689           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerAuthenticate, NDR_OUT | NDR_SET_VALUES, r2);
     690             :                 }
     691         150 :                 if (dce_call->fault_code != 0) {
     692           0 :                         DEBUG(2,("dcerpc_fault %s in netr_ServerAuthenticate\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     693             :                 }
     694         150 :                 break;
     695             :         }
     696          27 :         case 6: {
     697          27 :                 struct netr_ServerPasswordSet *r2 = (struct netr_ServerPasswordSet *)r;
     698          27 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     699           0 :                         DEBUG(5,("function netr_ServerPasswordSet replied async\n"));
     700             :                 }
     701          27 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     702           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerPasswordSet, NDR_OUT | NDR_SET_VALUES, r2);
     703             :                 }
     704          27 :                 if (dce_call->fault_code != 0) {
     705           0 :                         DEBUG(2,("dcerpc_fault %s in netr_ServerPasswordSet\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     706             :                 }
     707          27 :                 break;
     708             :         }
     709           0 :         case 7: {
     710           0 :                 struct netr_DatabaseDeltas *r2 = (struct netr_DatabaseDeltas *)r;
     711           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     712           0 :                         DEBUG(5,("function netr_DatabaseDeltas replied async\n"));
     713             :                 }
     714           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     715           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DatabaseDeltas, NDR_OUT | NDR_SET_VALUES, r2);
     716             :                 }
     717           0 :                 if (dce_call->fault_code != 0) {
     718           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DatabaseDeltas\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     719             :                 }
     720           0 :                 break;
     721             :         }
     722           9 :         case 8: {
     723           9 :                 struct netr_DatabaseSync *r2 = (struct netr_DatabaseSync *)r;
     724           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     725           0 :                         DEBUG(5,("function netr_DatabaseSync replied async\n"));
     726             :                 }
     727           9 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     728           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DatabaseSync, NDR_OUT | NDR_SET_VALUES, r2);
     729             :                 }
     730           9 :                 if (dce_call->fault_code != 0) {
     731           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DatabaseSync\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     732             :                 }
     733           9 :                 break;
     734             :         }
     735           9 :         case 9: {
     736           9 :                 struct netr_AccountDeltas *r2 = (struct netr_AccountDeltas *)r;
     737           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     738           0 :                         DEBUG(5,("function netr_AccountDeltas replied async\n"));
     739             :                 }
     740           9 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     741           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_AccountDeltas, NDR_OUT | NDR_SET_VALUES, r2);
     742             :                 }
     743           9 :                 if (dce_call->fault_code != 0) {
     744           0 :                         DEBUG(2,("dcerpc_fault %s in netr_AccountDeltas\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     745             :                 }
     746           9 :                 break;
     747             :         }
     748           9 :         case 10: {
     749           9 :                 struct netr_AccountSync *r2 = (struct netr_AccountSync *)r;
     750           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     751           0 :                         DEBUG(5,("function netr_AccountSync replied async\n"));
     752             :                 }
     753           9 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     754           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_AccountSync, NDR_OUT | NDR_SET_VALUES, r2);
     755             :                 }
     756           9 :                 if (dce_call->fault_code != 0) {
     757           0 :                         DEBUG(2,("dcerpc_fault %s in netr_AccountSync\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     758             :                 }
     759           9 :                 break;
     760             :         }
     761           9 :         case 11: {
     762           9 :                 struct netr_GetDcName *r2 = (struct netr_GetDcName *)r;
     763           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     764           0 :                         DEBUG(5,("function netr_GetDcName replied async\n"));
     765             :                 }
     766           9 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     767           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_GetDcName, NDR_OUT | NDR_SET_VALUES, r2);
     768             :                 }
     769           9 :                 if (dce_call->fault_code != 0) {
     770           0 :                         DEBUG(2,("dcerpc_fault %s in netr_GetDcName\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     771             :                 }
     772           9 :                 break;
     773             :         }
     774        1813 :         case 12: {
     775        1813 :                 struct netr_LogonControl *r2 = (struct netr_LogonControl *)r;
     776        1813 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     777           0 :                         DEBUG(5,("function netr_LogonControl replied async\n"));
     778             :                 }
     779        1813 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     780           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonControl, NDR_OUT | NDR_SET_VALUES, r2);
     781             :                 }
     782        1813 :                 if (dce_call->fault_code != 0) {
     783           0 :                         DEBUG(2,("dcerpc_fault %s in netr_LogonControl\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     784             :                 }
     785        1813 :                 break;
     786             :         }
     787          27 :         case 13: {
     788          27 :                 struct netr_GetAnyDCName *r2 = (struct netr_GetAnyDCName *)r;
     789          27 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     790           0 :                         DEBUG(5,("function netr_GetAnyDCName replied async\n"));
     791             :                 }
     792          27 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     793           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_GetAnyDCName, NDR_OUT | NDR_SET_VALUES, r2);
     794             :                 }
     795          27 :                 if (dce_call->fault_code != 0) {
     796           0 :                         DEBUG(2,("dcerpc_fault %s in netr_GetAnyDCName\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     797             :                 }
     798          27 :                 break;
     799             :         }
     800         378 :         case 14: {
     801         378 :                 struct netr_LogonControl2 *r2 = (struct netr_LogonControl2 *)r;
     802         378 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     803          18 :                         DEBUG(5,("function netr_LogonControl2 replied async\n"));
     804             :                 }
     805         378 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     806           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonControl2, NDR_OUT | NDR_SET_VALUES, r2);
     807             :                 }
     808         378 :                 if (dce_call->fault_code != 0) {
     809           0 :                         DEBUG(2,("dcerpc_fault %s in netr_LogonControl2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     810             :                 }
     811         378 :                 break;
     812             :         }
     813         383 :         case 15: {
     814         383 :                 struct netr_ServerAuthenticate2 *r2 = (struct netr_ServerAuthenticate2 *)r;
     815         383 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     816           0 :                         DEBUG(5,("function netr_ServerAuthenticate2 replied async\n"));
     817             :                 }
     818         383 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     819           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerAuthenticate2, NDR_OUT | NDR_SET_VALUES, r2);
     820             :                 }
     821         383 :                 if (dce_call->fault_code != 0) {
     822           0 :                         DEBUG(2,("dcerpc_fault %s in netr_ServerAuthenticate2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     823             :                 }
     824         383 :                 break;
     825             :         }
     826           9 :         case 16: {
     827           9 :                 struct netr_DatabaseSync2 *r2 = (struct netr_DatabaseSync2 *)r;
     828           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     829           0 :                         DEBUG(5,("function netr_DatabaseSync2 replied async\n"));
     830             :                 }
     831           9 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     832           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DatabaseSync2, NDR_OUT | NDR_SET_VALUES, r2);
     833             :                 }
     834           9 :                 if (dce_call->fault_code != 0) {
     835           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DatabaseSync2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     836             :                 }
     837           9 :                 break;
     838             :         }
     839           0 :         case 17: {
     840           0 :                 struct netr_DatabaseRedo *r2 = (struct netr_DatabaseRedo *)r;
     841           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     842           0 :                         DEBUG(5,("function netr_DatabaseRedo replied async\n"));
     843             :                 }
     844           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     845           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DatabaseRedo, NDR_OUT | NDR_SET_VALUES, r2);
     846             :                 }
     847           0 :                 if (dce_call->fault_code != 0) {
     848           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DatabaseRedo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     849             :                 }
     850           0 :                 break;
     851             :         }
     852         459 :         case 18: {
     853         459 :                 struct netr_LogonControl2Ex *r2 = (struct netr_LogonControl2Ex *)r;
     854         459 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     855          99 :                         DEBUG(5,("function netr_LogonControl2Ex replied async\n"));
     856             :                 }
     857         459 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     858           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonControl2Ex, NDR_OUT | NDR_SET_VALUES, r2);
     859             :                 }
     860         459 :                 if (dce_call->fault_code != 0) {
     861           0 :                         DEBUG(2,("dcerpc_fault %s in netr_LogonControl2Ex\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     862             :                 }
     863         459 :                 break;
     864             :         }
     865           0 :         case 19: {
     866           0 :                 struct netr_NetrEnumerateTrustedDomains *r2 = (struct netr_NetrEnumerateTrustedDomains *)r;
     867           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     868           0 :                         DEBUG(5,("function netr_NetrEnumerateTrustedDomains replied async\n"));
     869             :                 }
     870           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     871           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_NetrEnumerateTrustedDomains, NDR_OUT | NDR_SET_VALUES, r2);
     872             :                 }
     873           0 :                 if (dce_call->fault_code != 0) {
     874           0 :                         DEBUG(2,("dcerpc_fault %s in netr_NetrEnumerateTrustedDomains\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     875             :                 }
     876           0 :                 break;
     877             :         }
     878          36 :         case 20: {
     879          36 :                 struct netr_DsRGetDCName *r2 = (struct netr_DsRGetDCName *)r;
     880          36 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     881          12 :                         DEBUG(5,("function netr_DsRGetDCName replied async\n"));
     882             :                 }
     883          36 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     884           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsRGetDCName, NDR_OUT | NDR_SET_VALUES, r2);
     885             :                 }
     886          36 :                 if (dce_call->fault_code != 0) {
     887           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DsRGetDCName\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     888             :                 }
     889          36 :                 break;
     890             :         }
     891         429 :         case 21: {
     892         429 :                 struct netr_LogonGetCapabilities *r2 = (struct netr_LogonGetCapabilities *)r;
     893         429 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     894           0 :                         DEBUG(5,("function netr_LogonGetCapabilities replied async\n"));
     895             :                 }
     896         429 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     897           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonGetCapabilities, NDR_OUT | NDR_SET_VALUES, r2);
     898             :                 }
     899         429 :                 if (dce_call->fault_code != 0) {
     900           0 :                         DEBUG(2,("dcerpc_fault %s in netr_LogonGetCapabilities\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     901             :                 }
     902         429 :                 break;
     903             :         }
     904           0 :         case 22: {
     905           0 :                 struct netr_NETRLOGONSETSERVICEBITS *r2 = (struct netr_NETRLOGONSETSERVICEBITS *)r;
     906           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     907           0 :                         DEBUG(5,("function netr_NETRLOGONSETSERVICEBITS replied async\n"));
     908             :                 }
     909           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     910           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_NETRLOGONSETSERVICEBITS, NDR_OUT | NDR_SET_VALUES, r2);
     911             :                 }
     912           0 :                 if (dce_call->fault_code != 0) {
     913           0 :                         DEBUG(2,("dcerpc_fault %s in netr_NETRLOGONSETSERVICEBITS\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     914             :                 }
     915           0 :                 break;
     916             :         }
     917           0 :         case 23: {
     918           0 :                 struct netr_LogonGetTrustRid *r2 = (struct netr_LogonGetTrustRid *)r;
     919           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     920           0 :                         DEBUG(5,("function netr_LogonGetTrustRid replied async\n"));
     921             :                 }
     922           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     923           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonGetTrustRid, NDR_OUT | NDR_SET_VALUES, r2);
     924             :                 }
     925           0 :                 if (dce_call->fault_code != 0) {
     926           0 :                         DEBUG(2,("dcerpc_fault %s in netr_LogonGetTrustRid\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     927             :                 }
     928           0 :                 break;
     929             :         }
     930           0 :         case 24: {
     931           0 :                 struct netr_NETRLOGONCOMPUTESERVERDIGEST *r2 = (struct netr_NETRLOGONCOMPUTESERVERDIGEST *)r;
     932           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     933           0 :                         DEBUG(5,("function netr_NETRLOGONCOMPUTESERVERDIGEST replied async\n"));
     934             :                 }
     935           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     936           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, NDR_OUT | NDR_SET_VALUES, r2);
     937             :                 }
     938           0 :                 if (dce_call->fault_code != 0) {
     939           0 :                         DEBUG(2,("dcerpc_fault %s in netr_NETRLOGONCOMPUTESERVERDIGEST\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     940             :                 }
     941           0 :                 break;
     942             :         }
     943           0 :         case 25: {
     944           0 :                 struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r2 = (struct netr_NETRLOGONCOMPUTECLIENTDIGEST *)r;
     945           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     946           0 :                         DEBUG(5,("function netr_NETRLOGONCOMPUTECLIENTDIGEST replied async\n"));
     947             :                 }
     948           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     949           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, NDR_OUT | NDR_SET_VALUES, r2);
     950             :                 }
     951           0 :                 if (dce_call->fault_code != 0) {
     952           0 :                         DEBUG(2,("dcerpc_fault %s in netr_NETRLOGONCOMPUTECLIENTDIGEST\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     953             :                 }
     954           0 :                 break;
     955             :         }
     956         541 :         case 26: {
     957         541 :                 struct netr_ServerAuthenticate3 *r2 = (struct netr_ServerAuthenticate3 *)r;
     958         541 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     959           0 :                         DEBUG(5,("function netr_ServerAuthenticate3 replied async\n"));
     960             :                 }
     961         541 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     962           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerAuthenticate3, NDR_OUT | NDR_SET_VALUES, r2);
     963             :                 }
     964         541 :                 if (dce_call->fault_code != 0) {
     965           0 :                         DEBUG(2,("dcerpc_fault %s in netr_ServerAuthenticate3\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     966             :                 }
     967         541 :                 break;
     968             :         }
     969          46 :         case 27: {
     970          46 :                 struct netr_DsRGetDCNameEx *r2 = (struct netr_DsRGetDCNameEx *)r;
     971          46 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     972          18 :                         DEBUG(5,("function netr_DsRGetDCNameEx replied async\n"));
     973             :                 }
     974          46 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     975           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsRGetDCNameEx, NDR_OUT | NDR_SET_VALUES, r2);
     976             :                 }
     977          46 :                 if (dce_call->fault_code != 0) {
     978           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DsRGetDCNameEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     979             :                 }
     980          46 :                 break;
     981             :         }
     982          36 :         case 28: {
     983          36 :                 struct netr_DsRGetSiteName *r2 = (struct netr_DsRGetSiteName *)r;
     984          36 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     985           0 :                         DEBUG(5,("function netr_DsRGetSiteName replied async\n"));
     986             :                 }
     987          36 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
     988           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsRGetSiteName, NDR_OUT | NDR_SET_VALUES, r2);
     989             :                 }
     990          36 :                 if (dce_call->fault_code != 0) {
     991           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DsRGetSiteName\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
     992             :                 }
     993          36 :                 break;
     994             :         }
     995          98 :         case 29: {
     996          98 :                 struct netr_LogonGetDomainInfo *r2 = (struct netr_LogonGetDomainInfo *)r;
     997          98 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
     998           0 :                         DEBUG(5,("function netr_LogonGetDomainInfo replied async\n"));
     999             :                 }
    1000          98 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1001           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonGetDomainInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1002             :                 }
    1003          98 :                 if (dce_call->fault_code != 0) {
    1004           0 :                         DEBUG(2,("dcerpc_fault %s in netr_LogonGetDomainInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1005             :                 }
    1006          98 :                 break;
    1007             :         }
    1008         229 :         case 30: {
    1009         229 :                 struct netr_ServerPasswordSet2 *r2 = (struct netr_ServerPasswordSet2 *)r;
    1010         229 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1011           0 :                         DEBUG(5,("function netr_ServerPasswordSet2 replied async\n"));
    1012             :                 }
    1013         229 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1014           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerPasswordSet2, NDR_OUT | NDR_SET_VALUES, r2);
    1015             :                 }
    1016         229 :                 if (dce_call->fault_code != 0) {
    1017           0 :                         DEBUG(2,("dcerpc_fault %s in netr_ServerPasswordSet2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1018             :                 }
    1019         229 :                 break;
    1020             :         }
    1021           0 :         case 31: {
    1022           0 :                 struct netr_ServerPasswordGet *r2 = (struct netr_ServerPasswordGet *)r;
    1023           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1024           0 :                         DEBUG(5,("function netr_ServerPasswordGet replied async\n"));
    1025             :                 }
    1026           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1027           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerPasswordGet, NDR_OUT | NDR_SET_VALUES, r2);
    1028             :                 }
    1029           0 :                 if (dce_call->fault_code != 0) {
    1030           0 :                         DEBUG(2,("dcerpc_fault %s in netr_ServerPasswordGet\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1031             :                 }
    1032           0 :                 break;
    1033             :         }
    1034          17 :         case 32: {
    1035          17 :                 struct netr_NetrLogonSendToSam *r2 = (struct netr_NetrLogonSendToSam *)r;
    1036          17 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1037           0 :                         DEBUG(5,("function netr_NetrLogonSendToSam replied async\n"));
    1038             :                 }
    1039          17 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1040           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_NetrLogonSendToSam, NDR_OUT | NDR_SET_VALUES, r2);
    1041             :                 }
    1042          17 :                 if (dce_call->fault_code != 0) {
    1043           0 :                         DEBUG(2,("dcerpc_fault %s in netr_NetrLogonSendToSam\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1044             :                 }
    1045          17 :                 break;
    1046             :         }
    1047          27 :         case 33: {
    1048          27 :                 struct netr_DsRAddressToSitenamesW *r2 = (struct netr_DsRAddressToSitenamesW *)r;
    1049          27 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1050           0 :                         DEBUG(5,("function netr_DsRAddressToSitenamesW replied async\n"));
    1051             :                 }
    1052          27 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1053           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsRAddressToSitenamesW, NDR_OUT | NDR_SET_VALUES, r2);
    1054             :                 }
    1055          27 :                 if (dce_call->fault_code != 0) {
    1056           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DsRAddressToSitenamesW\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1057             :                 }
    1058          27 :                 break;
    1059             :         }
    1060         159 :         case 34: {
    1061         159 :                 struct netr_DsRGetDCNameEx2 *r2 = (struct netr_DsRGetDCNameEx2 *)r;
    1062         159 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1063          10 :                         DEBUG(5,("function netr_DsRGetDCNameEx2 replied async\n"));
    1064             :                 }
    1065         159 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1066           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsRGetDCNameEx2, NDR_OUT | NDR_SET_VALUES, r2);
    1067             :                 }
    1068         159 :                 if (dce_call->fault_code != 0) {
    1069           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DsRGetDCNameEx2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1070             :                 }
    1071         159 :                 break;
    1072             :         }
    1073           0 :         case 35: {
    1074           0 :                 struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r2 = (struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *)r;
    1075           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1076           0 :                         DEBUG(5,("function netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN replied async\n"));
    1077             :                 }
    1078           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1079           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, NDR_OUT | NDR_SET_VALUES, r2);
    1080             :                 }
    1081           0 :                 if (dce_call->fault_code != 0) {
    1082           0 :                         DEBUG(2,("dcerpc_fault %s in netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1083             :                 }
    1084           0 :                 break;
    1085             :         }
    1086           0 :         case 36: {
    1087           0 :                 struct netr_NetrEnumerateTrustedDomainsEx *r2 = (struct netr_NetrEnumerateTrustedDomainsEx *)r;
    1088           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1089           0 :                         DEBUG(5,("function netr_NetrEnumerateTrustedDomainsEx replied async\n"));
    1090             :                 }
    1091           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1092           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_NetrEnumerateTrustedDomainsEx, NDR_OUT | NDR_SET_VALUES, r2);
    1093             :                 }
    1094           0 :                 if (dce_call->fault_code != 0) {
    1095           0 :                         DEBUG(2,("dcerpc_fault %s in netr_NetrEnumerateTrustedDomainsEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1096             :                 }
    1097           0 :                 break;
    1098             :         }
    1099          27 :         case 37: {
    1100          27 :                 struct netr_DsRAddressToSitenamesExW *r2 = (struct netr_DsRAddressToSitenamesExW *)r;
    1101          27 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1102           0 :                         DEBUG(5,("function netr_DsRAddressToSitenamesExW replied async\n"));
    1103             :                 }
    1104          27 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1105           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsRAddressToSitenamesExW, NDR_OUT | NDR_SET_VALUES, r2);
    1106             :                 }
    1107          27 :                 if (dce_call->fault_code != 0) {
    1108           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DsRAddressToSitenamesExW\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1109             :                 }
    1110          27 :                 break;
    1111             :         }
    1112          14 :         case 38: {
    1113          14 :                 struct netr_DsrGetDcSiteCoverageW *r2 = (struct netr_DsrGetDcSiteCoverageW *)r;
    1114          14 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1115           0 :                         DEBUG(5,("function netr_DsrGetDcSiteCoverageW replied async\n"));
    1116             :                 }
    1117          14 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1118           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsrGetDcSiteCoverageW, NDR_OUT | NDR_SET_VALUES, r2);
    1119             :                 }
    1120          14 :                 if (dce_call->fault_code != 0) {
    1121           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DsrGetDcSiteCoverageW\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1122             :                 }
    1123          14 :                 break;
    1124             :         }
    1125        4656 :         case 39: {
    1126        4656 :                 struct netr_LogonSamLogonEx *r2 = (struct netr_LogonSamLogonEx *)r;
    1127        4656 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1128        4548 :                         DEBUG(5,("function netr_LogonSamLogonEx replied async\n"));
    1129             :                 }
    1130        4656 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1131           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonSamLogonEx, NDR_OUT | NDR_SET_VALUES, r2);
    1132             :                 }
    1133        4656 :                 if (dce_call->fault_code != 0) {
    1134           0 :                         DEBUG(2,("dcerpc_fault %s in netr_LogonSamLogonEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1135             :                 }
    1136        4656 :                 break;
    1137             :         }
    1138          39 :         case 40: {
    1139          39 :                 struct netr_DsrEnumerateDomainTrusts *r2 = (struct netr_DsrEnumerateDomainTrusts *)r;
    1140          39 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1141           0 :                         DEBUG(5,("function netr_DsrEnumerateDomainTrusts replied async\n"));
    1142             :                 }
    1143          39 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1144           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsrEnumerateDomainTrusts, NDR_OUT | NDR_SET_VALUES, r2);
    1145             :                 }
    1146          39 :                 if (dce_call->fault_code != 0) {
    1147           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DsrEnumerateDomainTrusts\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1148             :                 }
    1149          39 :                 break;
    1150             :         }
    1151           0 :         case 41: {
    1152           0 :                 struct netr_DsrDeregisterDNSHostRecords *r2 = (struct netr_DsrDeregisterDNSHostRecords *)r;
    1153           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1154           0 :                         DEBUG(5,("function netr_DsrDeregisterDNSHostRecords replied async\n"));
    1155             :                 }
    1156           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1157           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsrDeregisterDNSHostRecords, NDR_OUT | NDR_SET_VALUES, r2);
    1158             :                 }
    1159           0 :                 if (dce_call->fault_code != 0) {
    1160           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DsrDeregisterDNSHostRecords\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1161             :                 }
    1162           0 :                 break;
    1163             :         }
    1164           9 :         case 42: {
    1165           9 :                 struct netr_ServerTrustPasswordsGet *r2 = (struct netr_ServerTrustPasswordsGet *)r;
    1166           9 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1167           0 :                         DEBUG(5,("function netr_ServerTrustPasswordsGet replied async\n"));
    1168             :                 }
    1169           9 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1170           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerTrustPasswordsGet, NDR_OUT | NDR_SET_VALUES, r2);
    1171             :                 }
    1172           9 :                 if (dce_call->fault_code != 0) {
    1173           0 :                         DEBUG(2,("dcerpc_fault %s in netr_ServerTrustPasswordsGet\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1174             :                 }
    1175           9 :                 break;
    1176             :         }
    1177         147 :         case 43: {
    1178         147 :                 struct netr_DsRGetForestTrustInformation *r2 = (struct netr_DsRGetForestTrustInformation *)r;
    1179         147 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1180          20 :                         DEBUG(5,("function netr_DsRGetForestTrustInformation replied async\n"));
    1181             :                 }
    1182         147 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1183           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsRGetForestTrustInformation, NDR_OUT | NDR_SET_VALUES, r2);
    1184             :                 }
    1185         147 :                 if (dce_call->fault_code != 0) {
    1186           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DsRGetForestTrustInformation\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1187             :                 }
    1188         147 :                 break;
    1189             :         }
    1190          32 :         case 44: {
    1191          32 :                 struct netr_GetForestTrustInformation *r2 = (struct netr_GetForestTrustInformation *)r;
    1192          32 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1193           0 :                         DEBUG(5,("function netr_GetForestTrustInformation replied async\n"));
    1194             :                 }
    1195          32 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1196           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_GetForestTrustInformation, NDR_OUT | NDR_SET_VALUES, r2);
    1197             :                 }
    1198          32 :                 if (dce_call->fault_code != 0) {
    1199           0 :                         DEBUG(2,("dcerpc_fault %s in netr_GetForestTrustInformation\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1200             :                 }
    1201          32 :                 break;
    1202             :         }
    1203        2072 :         case 45: {
    1204        2072 :                 struct netr_LogonSamLogonWithFlags *r2 = (struct netr_LogonSamLogonWithFlags *)r;
    1205        2072 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1206        2072 :                         DEBUG(5,("function netr_LogonSamLogonWithFlags replied async\n"));
    1207             :                 }
    1208        2072 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1209           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_LogonSamLogonWithFlags, NDR_OUT | NDR_SET_VALUES, r2);
    1210             :                 }
    1211        2072 :                 if (dce_call->fault_code != 0) {
    1212           0 :                         DEBUG(2,("dcerpc_fault %s in netr_LogonSamLogonWithFlags\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1213             :                 }
    1214        2072 :                 break;
    1215             :         }
    1216          68 :         case 46: {
    1217          68 :                 struct netr_ServerGetTrustInfo *r2 = (struct netr_ServerGetTrustInfo *)r;
    1218          68 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1219           0 :                         DEBUG(5,("function netr_ServerGetTrustInfo replied async\n"));
    1220             :                 }
    1221          68 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1222           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_ServerGetTrustInfo, NDR_OUT | NDR_SET_VALUES, r2);
    1223             :                 }
    1224          68 :                 if (dce_call->fault_code != 0) {
    1225           0 :                         DEBUG(2,("dcerpc_fault %s in netr_ServerGetTrustInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1226             :                 }
    1227          68 :                 break;
    1228             :         }
    1229           0 :         case 47: {
    1230           0 :                 struct netr_Unused47 *r2 = (struct netr_Unused47 *)r;
    1231           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1232           0 :                         DEBUG(5,("function netr_Unused47 replied async\n"));
    1233             :                 }
    1234           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1235           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_Unused47, NDR_OUT | NDR_SET_VALUES, r2);
    1236             :                 }
    1237           0 :                 if (dce_call->fault_code != 0) {
    1238           0 :                         DEBUG(2,("dcerpc_fault %s in netr_Unused47\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1239             :                 }
    1240           0 :                 break;
    1241             :         }
    1242           4 :         case 48: {
    1243           4 :                 struct netr_DsrUpdateReadOnlyServerDnsRecords *r2 = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)r;
    1244           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1245           4 :                         DEBUG(5,("function netr_DsrUpdateReadOnlyServerDnsRecords replied async\n"));
    1246             :                 }
    1247           4 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1248           0 :                         NDR_PRINT_FUNCTION_DEBUG(netr_DsrUpdateReadOnlyServerDnsRecords, NDR_OUT | NDR_SET_VALUES, r2);
    1249             :                 }
    1250           4 :                 if (dce_call->fault_code != 0) {
    1251           0 :                         DEBUG(2,("dcerpc_fault %s in netr_DsrUpdateReadOnlyServerDnsRecords\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
    1252             :                 }
    1253           4 :                 break;
    1254             :         }
    1255             : 
    1256           0 :         default:
    1257           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
    1258           0 :                 break;
    1259             :         }
    1260             : 
    1261       22958 :         if (dce_call->fault_code != 0) {
    1262           0 :                 return NT_STATUS_NET_WRITE_FAULT;
    1263             :         }
    1264             : 
    1265       22958 :         return NT_STATUS_OK;
    1266             : }
    1267             : 
    1268       22958 : static NTSTATUS netlogon__op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
    1269             : {
    1270             :         enum ndr_err_code ndr_err;
    1271       22958 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
    1272             : 
    1273       22958 :         ndr_err = ndr_table_netlogon.calls[opnum].ndr_push(push, NDR_OUT, r);
    1274       22958 :         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    1275           0 :                 dce_call->fault_code = DCERPC_FAULT_NDR;
    1276           0 :                 return NT_STATUS_NET_WRITE_FAULT;
    1277             :         }
    1278             : 
    1279       22958 :         return NT_STATUS_OK;
    1280             : }
    1281             : 
    1282             : static const struct dcesrv_interface dcesrv_netlogon_interface = {
    1283             :         .name               = "netlogon",
    1284             :         .syntax_id          = {{0x12345678,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0xcf,0xfb}},1.0},
    1285             :         .bind               = netlogon__op_bind,
    1286             :         .unbind             = netlogon__op_unbind,
    1287             :         .ndr_pull           = netlogon__op_ndr_pull,
    1288             :         .dispatch           = netlogon__op_dispatch,
    1289             :         .reply              = netlogon__op_reply,
    1290             :         .ndr_push           = netlogon__op_ndr_push,
    1291             :         .local              = NULL,
    1292             : #ifdef DCESRV_INTERFACE_NETLOGON_FLAGS
    1293             :         .flags              = DCESRV_INTERFACE_NETLOGON_FLAGS
    1294             : #else
    1295             :         .flags              = 0
    1296             : #endif
    1297             : };
    1298             : 
    1299             : 
    1300          52 : static NTSTATUS netlogon__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
    1301             : {
    1302             :         int i;
    1303             : #ifdef DCESRV_INTERFACE_NETLOGON_NCACN_NP_SECONDARY_ENDPOINT
    1304             :         const char *ncacn_np_secondary_endpoint =
    1305             :                 DCESRV_INTERFACE_NETLOGON_NCACN_NP_SECONDARY_ENDPOINT;
    1306             : #else
    1307          52 :         const char *ncacn_np_secondary_endpoint = NULL;
    1308             : #endif
    1309             : 
    1310         208 :         for (i=0;i<ndr_table_netlogon.endpoints->count;i++) {
    1311             :                 NTSTATUS ret;
    1312         156 :                 const char *name = ndr_table_netlogon.endpoints->names[i];
    1313             : 
    1314         156 :                 ret = dcesrv_interface_register(dce_ctx,
    1315             :                                                 name,
    1316             :                                                 ncacn_np_secondary_endpoint,
    1317             :                                                 &dcesrv_netlogon_interface,
    1318             :                                                 NULL);
    1319         156 :                 if (!NT_STATUS_IS_OK(ret)) {
    1320           0 :                         DEBUG(1,("netlogon_op_init_server: failed to register endpoint '%s'\n",name));
    1321           0 :                         return ret;
    1322             :                 }
    1323             :         }
    1324             : 
    1325          52 :         return NT_STATUS_OK;
    1326             : }
    1327             : 
    1328           0 : static NTSTATUS netlogon__op_shutdown_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
    1329             : {
    1330           0 :         return NT_STATUS_OK;
    1331             : }
    1332             : 
    1333           0 : static bool netlogon__op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
    1334             : {
    1335           0 :         if (dcesrv_netlogon_interface.syntax_id.if_version == if_version &&
    1336           0 :                 GUID_equal(&dcesrv_netlogon_interface.syntax_id.uuid, uuid)) {
    1337           0 :                 memcpy(iface,&dcesrv_netlogon_interface, sizeof(*iface));
    1338           0 :                 return true;
    1339             :         }
    1340             : 
    1341           0 :         return false;
    1342             : }
    1343             : 
    1344           0 : static bool netlogon__op_interface_by_name(struct dcesrv_interface *iface, const char *name)
    1345             : {
    1346           0 :         if (strcmp(dcesrv_netlogon_interface.name, name)==0) {
    1347           0 :                 memcpy(iface, &dcesrv_netlogon_interface, sizeof(*iface));
    1348           0 :                 return true;
    1349             :         }
    1350             : 
    1351           0 :         return false;
    1352             : }
    1353             : 
    1354          54 : NTSTATUS dcerpc_server_netlogon_init(TALLOC_CTX *ctx)
    1355             : {
    1356             :         NTSTATUS ret;
    1357             :         static const struct dcesrv_endpoint_server ep_server = {
    1358             :             /* fill in our name */
    1359             :             .name = "netlogon",
    1360             : 
    1361             :             /* Initialization flag */
    1362             :             .initialized = false,
    1363             : 
    1364             :             /* fill in all the operations */
    1365             : #ifdef DCESRV_INTERFACE_NETLOGON_INIT_SERVER
    1366             :             .init_server = DCESRV_INTERFACE_NETLOGON_INIT_SERVER,
    1367             : #else
    1368             :             .init_server = netlogon__op_init_server,
    1369             : #endif
    1370             : #ifdef DCESRV_INTERFACE_NETLOGON_SHUTDOWN_SERVER
    1371             :             .shutdown_server = DCESRV_INTERFACE_NETLOGON_SHUTDOWN_SERVER,
    1372             : #else
    1373             :             .shutdown_server = netlogon__op_shutdown_server,
    1374             : #endif
    1375             :             .interface_by_uuid = netlogon__op_interface_by_uuid,
    1376             :             .interface_by_name = netlogon__op_interface_by_name
    1377             :         };
    1378             :         /* register ourselves with the DCERPC subsystem. */
    1379          54 :         ret = dcerpc_register_ep_server(&ep_server);
    1380             : 
    1381          54 :         if (!NT_STATUS_IS_OK(ret)) {
    1382           0 :                 DEBUG(0,("Failed to register 'netlogon' endpoint server!\n"));
    1383           0 :                 return ret;
    1384             :         }
    1385             : 
    1386          54 :         return ret;
    1387             : }
    1388             : 

Generated by: LCOV version 1.13