LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_netlogon_c.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 557 4183 13.3 %
Date: 2021-09-23 10:06:22 Functions: 80 360 22.2 %

          Line data    Source code
       1             : /* client functions auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include <tevent.h>
       5             : #include "lib/util/tevent_ntstatus.h"
       6             : #include "bin/default/librpc/gen_ndr/ndr_netlogon.h"
       7             : #include "bin/default/librpc/gen_ndr/ndr_netlogon_c.h"
       8             : 
       9             : /* netlogon - client functions generated by pidl */
      10             : 
      11             : struct dcerpc_netr_LogonUasLogon_r_state {
      12             :         TALLOC_CTX *out_mem_ctx;
      13             : };
      14             : 
      15             : static void dcerpc_netr_LogonUasLogon_r_done(struct tevent_req *subreq);
      16             : 
      17           0 : struct tevent_req *dcerpc_netr_LogonUasLogon_r_send(TALLOC_CTX *mem_ctx,
      18             :         struct tevent_context *ev,
      19             :         struct dcerpc_binding_handle *h,
      20             :         struct netr_LogonUasLogon *r)
      21             : {
      22             :         struct tevent_req *req;
      23             :         struct dcerpc_netr_LogonUasLogon_r_state *state;
      24             :         struct tevent_req *subreq;
      25             : 
      26           0 :         req = tevent_req_create(mem_ctx, &state,
      27             :                                 struct dcerpc_netr_LogonUasLogon_r_state);
      28           0 :         if (req == NULL) {
      29           0 :                 return NULL;
      30             :         }
      31             : 
      32           0 :         state->out_mem_ctx = talloc_new(state);
      33           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
      34           0 :                 return tevent_req_post(req, ev);
      35             :         }
      36             : 
      37           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
      38             :                         NULL, &ndr_table_netlogon,
      39           0 :                         NDR_NETR_LOGONUASLOGON, state->out_mem_ctx, r);
      40           0 :         if (tevent_req_nomem(subreq, req)) {
      41           0 :                 return tevent_req_post(req, ev);
      42             :         }
      43           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonUasLogon_r_done, req);
      44             : 
      45           0 :         return req;
      46             : }
      47             : 
      48           0 : static void dcerpc_netr_LogonUasLogon_r_done(struct tevent_req *subreq)
      49             : {
      50           0 :         struct tevent_req *req =
      51           0 :                 tevent_req_callback_data(subreq,
      52             :                 struct tevent_req);
      53             :         NTSTATUS status;
      54             : 
      55           0 :         status = dcerpc_binding_handle_call_recv(subreq);
      56           0 :         TALLOC_FREE(subreq);
      57           0 :         if (tevent_req_nterror(req, status)) {
      58           0 :                 return;
      59             :         }
      60             : 
      61           0 :         tevent_req_done(req);
      62             : }
      63             : 
      64           0 : NTSTATUS dcerpc_netr_LogonUasLogon_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
      65             : {
      66           0 :         struct dcerpc_netr_LogonUasLogon_r_state *state =
      67           0 :                 tevent_req_data(req,
      68             :                 struct dcerpc_netr_LogonUasLogon_r_state);
      69             :         NTSTATUS status;
      70             : 
      71           0 :         if (tevent_req_is_nterror(req, &status)) {
      72           0 :                 tevent_req_received(req);
      73           0 :                 return status;
      74             :         }
      75             : 
      76           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
      77             : 
      78           0 :         tevent_req_received(req);
      79           0 :         return NT_STATUS_OK;
      80             : }
      81             : 
      82          18 : NTSTATUS dcerpc_netr_LogonUasLogon_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_LogonUasLogon *r)
      83             : {
      84             :         NTSTATUS status;
      85             : 
      86          18 :         status = dcerpc_binding_handle_call(h,
      87             :                         NULL, &ndr_table_netlogon,
      88             :                         NDR_NETR_LOGONUASLOGON, mem_ctx, r);
      89             : 
      90          18 :         return status;
      91             : }
      92             : 
      93             : struct dcerpc_netr_LogonUasLogon_state {
      94             :         struct netr_LogonUasLogon orig;
      95             :         struct netr_LogonUasLogon tmp;
      96             :         TALLOC_CTX *out_mem_ctx;
      97             : };
      98             : 
      99             : static void dcerpc_netr_LogonUasLogon_done(struct tevent_req *subreq);
     100             : 
     101           0 : struct tevent_req *dcerpc_netr_LogonUasLogon_send(TALLOC_CTX *mem_ctx,
     102             :                                                   struct tevent_context *ev,
     103             :                                                   struct dcerpc_binding_handle *h,
     104             :                                                   const char *_server_name /* [in] [charset(UTF16),unique] */,
     105             :                                                   const char *_account_name /* [in] [charset(UTF16),ref] */,
     106             :                                                   const char *_workstation /* [in] [charset(UTF16),ref] */,
     107             :                                                   struct netr_UasInfo **_info /* [out] [ref] */)
     108             : {
     109             :         struct tevent_req *req;
     110             :         struct dcerpc_netr_LogonUasLogon_state *state;
     111             :         struct tevent_req *subreq;
     112             : 
     113           0 :         req = tevent_req_create(mem_ctx, &state,
     114             :                                 struct dcerpc_netr_LogonUasLogon_state);
     115           0 :         if (req == NULL) {
     116           0 :                 return NULL;
     117             :         }
     118           0 :         state->out_mem_ctx = NULL;
     119             : 
     120             :         /* In parameters */
     121           0 :         state->orig.in.server_name = _server_name;
     122           0 :         state->orig.in.account_name = _account_name;
     123           0 :         state->orig.in.workstation = _workstation;
     124             : 
     125             :         /* Out parameters */
     126           0 :         state->orig.out.info = _info;
     127             : 
     128             :         /* Result */
     129           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     130             : 
     131           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     132             :                              "dcerpc_netr_LogonUasLogon_out_memory");
     133           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     134           0 :                 return tevent_req_post(req, ev);
     135             :         }
     136             : 
     137             :         /* make a temporary copy, that we pass to the dispatch function */
     138           0 :         state->tmp = state->orig;
     139             : 
     140           0 :         subreq = dcerpc_netr_LogonUasLogon_r_send(state, ev, h, &state->tmp);
     141           0 :         if (tevent_req_nomem(subreq, req)) {
     142           0 :                 return tevent_req_post(req, ev);
     143             :         }
     144           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonUasLogon_done, req);
     145           0 :         return req;
     146             : }
     147             : 
     148           0 : static void dcerpc_netr_LogonUasLogon_done(struct tevent_req *subreq)
     149             : {
     150           0 :         struct tevent_req *req = tevent_req_callback_data(
     151             :                 subreq, struct tevent_req);
     152           0 :         struct dcerpc_netr_LogonUasLogon_state *state = tevent_req_data(
     153             :                 req, struct dcerpc_netr_LogonUasLogon_state);
     154             :         NTSTATUS status;
     155             :         TALLOC_CTX *mem_ctx;
     156             : 
     157           0 :         if (state->out_mem_ctx) {
     158           0 :                 mem_ctx = state->out_mem_ctx;
     159             :         } else {
     160           0 :                 mem_ctx = state;
     161             :         }
     162             : 
     163           0 :         status = dcerpc_netr_LogonUasLogon_r_recv(subreq, mem_ctx);
     164           0 :         TALLOC_FREE(subreq);
     165           0 :         if (tevent_req_nterror(req, status)) {
     166           0 :                 return;
     167             :         }
     168             : 
     169             :         /* Copy out parameters */
     170           0 :         *state->orig.out.info = *state->tmp.out.info;
     171             : 
     172             :         /* Copy result */
     173           0 :         state->orig.out.result = state->tmp.out.result;
     174             : 
     175             :         /* Reset temporary structure */
     176           0 :         NDR_ZERO_STRUCT(state->tmp);
     177             : 
     178           0 :         tevent_req_done(req);
     179             : }
     180             : 
     181           0 : NTSTATUS dcerpc_netr_LogonUasLogon_recv(struct tevent_req *req,
     182             :                                         TALLOC_CTX *mem_ctx,
     183             :                                         WERROR *result)
     184             : {
     185           0 :         struct dcerpc_netr_LogonUasLogon_state *state = tevent_req_data(
     186             :                 req, struct dcerpc_netr_LogonUasLogon_state);
     187             :         NTSTATUS status;
     188             : 
     189           0 :         if (tevent_req_is_nterror(req, &status)) {
     190           0 :                 tevent_req_received(req);
     191           0 :                 return status;
     192             :         }
     193             : 
     194             :         /* Steal possible out parameters to the callers context */
     195           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     196             : 
     197             :         /* Return result */
     198           0 :         *result = state->orig.out.result;
     199             : 
     200           0 :         tevent_req_received(req);
     201           0 :         return NT_STATUS_OK;
     202             : }
     203             : 
     204           0 : NTSTATUS dcerpc_netr_LogonUasLogon(struct dcerpc_binding_handle *h,
     205             :                                    TALLOC_CTX *mem_ctx,
     206             :                                    const char *_server_name /* [in] [charset(UTF16),unique] */,
     207             :                                    const char *_account_name /* [in] [charset(UTF16),ref] */,
     208             :                                    const char *_workstation /* [in] [charset(UTF16),ref] */,
     209             :                                    struct netr_UasInfo **_info /* [out] [ref] */,
     210             :                                    WERROR *result)
     211             : {
     212             :         struct netr_LogonUasLogon r;
     213             :         NTSTATUS status;
     214             : 
     215             :         /* In parameters */
     216           0 :         r.in.server_name = _server_name;
     217           0 :         r.in.account_name = _account_name;
     218           0 :         r.in.workstation = _workstation;
     219             : 
     220             :         /* Out parameters */
     221           0 :         r.out.info = _info;
     222             : 
     223             :         /* Result */
     224           0 :         NDR_ZERO_STRUCT(r.out.result);
     225             : 
     226           0 :         status = dcerpc_netr_LogonUasLogon_r(h, mem_ctx, &r);
     227           0 :         if (!NT_STATUS_IS_OK(status)) {
     228           0 :                 return status;
     229             :         }
     230             : 
     231             :         /* Return variables */
     232           0 :         *_info = *r.out.info;
     233             : 
     234             :         /* Return result */
     235           0 :         *result = r.out.result;
     236             : 
     237           0 :         return NT_STATUS_OK;
     238             : }
     239             : 
     240             : struct dcerpc_netr_LogonUasLogoff_r_state {
     241             :         TALLOC_CTX *out_mem_ctx;
     242             : };
     243             : 
     244             : static void dcerpc_netr_LogonUasLogoff_r_done(struct tevent_req *subreq);
     245             : 
     246           0 : struct tevent_req *dcerpc_netr_LogonUasLogoff_r_send(TALLOC_CTX *mem_ctx,
     247             :         struct tevent_context *ev,
     248             :         struct dcerpc_binding_handle *h,
     249             :         struct netr_LogonUasLogoff *r)
     250             : {
     251             :         struct tevent_req *req;
     252             :         struct dcerpc_netr_LogonUasLogoff_r_state *state;
     253             :         struct tevent_req *subreq;
     254             : 
     255           0 :         req = tevent_req_create(mem_ctx, &state,
     256             :                                 struct dcerpc_netr_LogonUasLogoff_r_state);
     257           0 :         if (req == NULL) {
     258           0 :                 return NULL;
     259             :         }
     260             : 
     261           0 :         state->out_mem_ctx = talloc_new(state);
     262           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     263           0 :                 return tevent_req_post(req, ev);
     264             :         }
     265             : 
     266           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     267             :                         NULL, &ndr_table_netlogon,
     268           0 :                         NDR_NETR_LOGONUASLOGOFF, state->out_mem_ctx, r);
     269           0 :         if (tevent_req_nomem(subreq, req)) {
     270           0 :                 return tevent_req_post(req, ev);
     271             :         }
     272           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonUasLogoff_r_done, req);
     273             : 
     274           0 :         return req;
     275             : }
     276             : 
     277           0 : static void dcerpc_netr_LogonUasLogoff_r_done(struct tevent_req *subreq)
     278             : {
     279           0 :         struct tevent_req *req =
     280           0 :                 tevent_req_callback_data(subreq,
     281             :                 struct tevent_req);
     282             :         NTSTATUS status;
     283             : 
     284           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     285           0 :         TALLOC_FREE(subreq);
     286           0 :         if (tevent_req_nterror(req, status)) {
     287           0 :                 return;
     288             :         }
     289             : 
     290           0 :         tevent_req_done(req);
     291             : }
     292             : 
     293           0 : NTSTATUS dcerpc_netr_LogonUasLogoff_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     294             : {
     295           0 :         struct dcerpc_netr_LogonUasLogoff_r_state *state =
     296           0 :                 tevent_req_data(req,
     297             :                 struct dcerpc_netr_LogonUasLogoff_r_state);
     298             :         NTSTATUS status;
     299             : 
     300           0 :         if (tevent_req_is_nterror(req, &status)) {
     301           0 :                 tevent_req_received(req);
     302           0 :                 return status;
     303             :         }
     304             : 
     305           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     306             : 
     307           0 :         tevent_req_received(req);
     308           0 :         return NT_STATUS_OK;
     309             : }
     310             : 
     311          18 : NTSTATUS dcerpc_netr_LogonUasLogoff_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_LogonUasLogoff *r)
     312             : {
     313             :         NTSTATUS status;
     314             : 
     315          18 :         status = dcerpc_binding_handle_call(h,
     316             :                         NULL, &ndr_table_netlogon,
     317             :                         NDR_NETR_LOGONUASLOGOFF, mem_ctx, r);
     318             : 
     319          18 :         return status;
     320             : }
     321             : 
     322             : struct dcerpc_netr_LogonUasLogoff_state {
     323             :         struct netr_LogonUasLogoff orig;
     324             :         struct netr_LogonUasLogoff tmp;
     325             :         TALLOC_CTX *out_mem_ctx;
     326             : };
     327             : 
     328             : static void dcerpc_netr_LogonUasLogoff_done(struct tevent_req *subreq);
     329             : 
     330           0 : struct tevent_req *dcerpc_netr_LogonUasLogoff_send(TALLOC_CTX *mem_ctx,
     331             :                                                    struct tevent_context *ev,
     332             :                                                    struct dcerpc_binding_handle *h,
     333             :                                                    const char *_server_name /* [in] [charset(UTF16),unique] */,
     334             :                                                    const char *_account_name /* [in] [charset(UTF16),ref] */,
     335             :                                                    const char *_workstation /* [in] [charset(UTF16),ref] */,
     336             :                                                    struct netr_UasLogoffInfo *_info /* [out] [ref] */)
     337             : {
     338             :         struct tevent_req *req;
     339             :         struct dcerpc_netr_LogonUasLogoff_state *state;
     340             :         struct tevent_req *subreq;
     341             : 
     342           0 :         req = tevent_req_create(mem_ctx, &state,
     343             :                                 struct dcerpc_netr_LogonUasLogoff_state);
     344           0 :         if (req == NULL) {
     345           0 :                 return NULL;
     346             :         }
     347           0 :         state->out_mem_ctx = NULL;
     348             : 
     349             :         /* In parameters */
     350           0 :         state->orig.in.server_name = _server_name;
     351           0 :         state->orig.in.account_name = _account_name;
     352           0 :         state->orig.in.workstation = _workstation;
     353             : 
     354             :         /* Out parameters */
     355           0 :         state->orig.out.info = _info;
     356             : 
     357             :         /* Result */
     358           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     359             : 
     360           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     361             :                              "dcerpc_netr_LogonUasLogoff_out_memory");
     362           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     363           0 :                 return tevent_req_post(req, ev);
     364             :         }
     365             : 
     366             :         /* make a temporary copy, that we pass to the dispatch function */
     367           0 :         state->tmp = state->orig;
     368             : 
     369           0 :         subreq = dcerpc_netr_LogonUasLogoff_r_send(state, ev, h, &state->tmp);
     370           0 :         if (tevent_req_nomem(subreq, req)) {
     371           0 :                 return tevent_req_post(req, ev);
     372             :         }
     373           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonUasLogoff_done, req);
     374           0 :         return req;
     375             : }
     376             : 
     377           0 : static void dcerpc_netr_LogonUasLogoff_done(struct tevent_req *subreq)
     378             : {
     379           0 :         struct tevent_req *req = tevent_req_callback_data(
     380             :                 subreq, struct tevent_req);
     381           0 :         struct dcerpc_netr_LogonUasLogoff_state *state = tevent_req_data(
     382             :                 req, struct dcerpc_netr_LogonUasLogoff_state);
     383             :         NTSTATUS status;
     384             :         TALLOC_CTX *mem_ctx;
     385             : 
     386           0 :         if (state->out_mem_ctx) {
     387           0 :                 mem_ctx = state->out_mem_ctx;
     388             :         } else {
     389           0 :                 mem_ctx = state;
     390             :         }
     391             : 
     392           0 :         status = dcerpc_netr_LogonUasLogoff_r_recv(subreq, mem_ctx);
     393           0 :         TALLOC_FREE(subreq);
     394           0 :         if (tevent_req_nterror(req, status)) {
     395           0 :                 return;
     396             :         }
     397             : 
     398             :         /* Copy out parameters */
     399           0 :         *state->orig.out.info = *state->tmp.out.info;
     400             : 
     401             :         /* Copy result */
     402           0 :         state->orig.out.result = state->tmp.out.result;
     403             : 
     404             :         /* Reset temporary structure */
     405           0 :         NDR_ZERO_STRUCT(state->tmp);
     406             : 
     407           0 :         tevent_req_done(req);
     408             : }
     409             : 
     410           0 : NTSTATUS dcerpc_netr_LogonUasLogoff_recv(struct tevent_req *req,
     411             :                                          TALLOC_CTX *mem_ctx,
     412             :                                          WERROR *result)
     413             : {
     414           0 :         struct dcerpc_netr_LogonUasLogoff_state *state = tevent_req_data(
     415             :                 req, struct dcerpc_netr_LogonUasLogoff_state);
     416             :         NTSTATUS status;
     417             : 
     418           0 :         if (tevent_req_is_nterror(req, &status)) {
     419           0 :                 tevent_req_received(req);
     420           0 :                 return status;
     421             :         }
     422             : 
     423             :         /* Steal possible out parameters to the callers context */
     424           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     425             : 
     426             :         /* Return result */
     427           0 :         *result = state->orig.out.result;
     428             : 
     429           0 :         tevent_req_received(req);
     430           0 :         return NT_STATUS_OK;
     431             : }
     432             : 
     433           0 : NTSTATUS dcerpc_netr_LogonUasLogoff(struct dcerpc_binding_handle *h,
     434             :                                     TALLOC_CTX *mem_ctx,
     435             :                                     const char *_server_name /* [in] [charset(UTF16),unique] */,
     436             :                                     const char *_account_name /* [in] [charset(UTF16),ref] */,
     437             :                                     const char *_workstation /* [in] [charset(UTF16),ref] */,
     438             :                                     struct netr_UasLogoffInfo *_info /* [out] [ref] */,
     439             :                                     WERROR *result)
     440             : {
     441             :         struct netr_LogonUasLogoff r;
     442             :         NTSTATUS status;
     443             : 
     444             :         /* In parameters */
     445           0 :         r.in.server_name = _server_name;
     446           0 :         r.in.account_name = _account_name;
     447           0 :         r.in.workstation = _workstation;
     448             : 
     449             :         /* Out parameters */
     450           0 :         r.out.info = _info;
     451             : 
     452             :         /* Result */
     453           0 :         NDR_ZERO_STRUCT(r.out.result);
     454             : 
     455           0 :         status = dcerpc_netr_LogonUasLogoff_r(h, mem_ctx, &r);
     456           0 :         if (!NT_STATUS_IS_OK(status)) {
     457           0 :                 return status;
     458             :         }
     459             : 
     460             :         /* Return variables */
     461           0 :         *_info = *r.out.info;
     462             : 
     463             :         /* Return result */
     464           0 :         *result = r.out.result;
     465             : 
     466           0 :         return NT_STATUS_OK;
     467             : }
     468             : 
     469             : struct dcerpc_netr_LogonSamLogon_r_state {
     470             :         TALLOC_CTX *out_mem_ctx;
     471             : };
     472             : 
     473             : static void dcerpc_netr_LogonSamLogon_r_done(struct tevent_req *subreq);
     474             : 
     475           0 : struct tevent_req *dcerpc_netr_LogonSamLogon_r_send(TALLOC_CTX *mem_ctx,
     476             :         struct tevent_context *ev,
     477             :         struct dcerpc_binding_handle *h,
     478             :         struct netr_LogonSamLogon *r)
     479             : {
     480             :         struct tevent_req *req;
     481             :         struct dcerpc_netr_LogonSamLogon_r_state *state;
     482             :         struct tevent_req *subreq;
     483             : 
     484           0 :         req = tevent_req_create(mem_ctx, &state,
     485             :                                 struct dcerpc_netr_LogonSamLogon_r_state);
     486           0 :         if (req == NULL) {
     487           0 :                 return NULL;
     488             :         }
     489             : 
     490           0 :         state->out_mem_ctx = talloc_new(state);
     491           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     492           0 :                 return tevent_req_post(req, ev);
     493             :         }
     494             : 
     495           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     496             :                         NULL, &ndr_table_netlogon,
     497           0 :                         NDR_NETR_LOGONSAMLOGON, state->out_mem_ctx, r);
     498           0 :         if (tevent_req_nomem(subreq, req)) {
     499           0 :                 return tevent_req_post(req, ev);
     500             :         }
     501           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonSamLogon_r_done, req);
     502             : 
     503           0 :         return req;
     504             : }
     505             : 
     506           0 : static void dcerpc_netr_LogonSamLogon_r_done(struct tevent_req *subreq)
     507             : {
     508           0 :         struct tevent_req *req =
     509           0 :                 tevent_req_callback_data(subreq,
     510             :                 struct tevent_req);
     511             :         NTSTATUS status;
     512             : 
     513           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     514           0 :         TALLOC_FREE(subreq);
     515           0 :         if (tevent_req_nterror(req, status)) {
     516           0 :                 return;
     517             :         }
     518             : 
     519           0 :         tevent_req_done(req);
     520             : }
     521             : 
     522           0 : NTSTATUS dcerpc_netr_LogonSamLogon_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     523             : {
     524           0 :         struct dcerpc_netr_LogonSamLogon_r_state *state =
     525           0 :                 tevent_req_data(req,
     526             :                 struct dcerpc_netr_LogonSamLogon_r_state);
     527             :         NTSTATUS status;
     528             : 
     529           0 :         if (tevent_req_is_nterror(req, &status)) {
     530           0 :                 tevent_req_received(req);
     531           0 :                 return status;
     532             :         }
     533             : 
     534           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     535             : 
     536           0 :         tevent_req_received(req);
     537           0 :         return NT_STATUS_OK;
     538             : }
     539             : 
     540       11760 : NTSTATUS dcerpc_netr_LogonSamLogon_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_LogonSamLogon *r)
     541             : {
     542             :         NTSTATUS status;
     543             : 
     544       11760 :         status = dcerpc_binding_handle_call(h,
     545             :                         NULL, &ndr_table_netlogon,
     546             :                         NDR_NETR_LOGONSAMLOGON, mem_ctx, r);
     547             : 
     548       11760 :         return status;
     549             : }
     550             : 
     551             : struct dcerpc_netr_LogonSamLogon_state {
     552             :         struct netr_LogonSamLogon orig;
     553             :         struct netr_LogonSamLogon tmp;
     554             :         TALLOC_CTX *out_mem_ctx;
     555             : };
     556             : 
     557             : static void dcerpc_netr_LogonSamLogon_done(struct tevent_req *subreq);
     558             : 
     559           0 : struct tevent_req *dcerpc_netr_LogonSamLogon_send(TALLOC_CTX *mem_ctx,
     560             :                                                   struct tevent_context *ev,
     561             :                                                   struct dcerpc_binding_handle *h,
     562             :                                                   const char *_server_name /* [in] [charset(UTF16),unique] */,
     563             :                                                   const char *_computer_name /* [in] [charset(UTF16),unique] */,
     564             :                                                   struct netr_Authenticator *_credential /* [in] [unique] */,
     565             :                                                   struct netr_Authenticator *_return_authenticator /* [in,out] [unique] */,
     566             :                                                   enum netr_LogonInfoClass _logon_level /* [in]  */,
     567             :                                                   union netr_LogonLevel *_logon /* [in] [ref,switch_is(logon_level)] */,
     568             :                                                   uint16_t _validation_level /* [in]  */,
     569             :                                                   union netr_Validation *_validation /* [out] [ref,switch_is(validation_level)] */,
     570             :                                                   uint8_t *_authoritative /* [out] [ref] */)
     571             : {
     572             :         struct tevent_req *req;
     573             :         struct dcerpc_netr_LogonSamLogon_state *state;
     574             :         struct tevent_req *subreq;
     575             : 
     576           0 :         req = tevent_req_create(mem_ctx, &state,
     577             :                                 struct dcerpc_netr_LogonSamLogon_state);
     578           0 :         if (req == NULL) {
     579           0 :                 return NULL;
     580             :         }
     581           0 :         state->out_mem_ctx = NULL;
     582             : 
     583             :         /* In parameters */
     584           0 :         state->orig.in.server_name = _server_name;
     585           0 :         state->orig.in.computer_name = _computer_name;
     586           0 :         state->orig.in.credential = _credential;
     587           0 :         state->orig.in.return_authenticator = _return_authenticator;
     588           0 :         state->orig.in.logon_level = _logon_level;
     589           0 :         state->orig.in.logon = _logon;
     590           0 :         state->orig.in.validation_level = _validation_level;
     591             : 
     592             :         /* Out parameters */
     593           0 :         state->orig.out.return_authenticator = _return_authenticator;
     594           0 :         state->orig.out.validation = _validation;
     595           0 :         state->orig.out.authoritative = _authoritative;
     596             : 
     597             :         /* Result */
     598           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     599             : 
     600           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     601             :                              "dcerpc_netr_LogonSamLogon_out_memory");
     602           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     603           0 :                 return tevent_req_post(req, ev);
     604             :         }
     605             : 
     606             :         /* make a temporary copy, that we pass to the dispatch function */
     607           0 :         state->tmp = state->orig;
     608             : 
     609           0 :         subreq = dcerpc_netr_LogonSamLogon_r_send(state, ev, h, &state->tmp);
     610           0 :         if (tevent_req_nomem(subreq, req)) {
     611           0 :                 return tevent_req_post(req, ev);
     612             :         }
     613           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonSamLogon_done, req);
     614           0 :         return req;
     615             : }
     616             : 
     617           0 : static void dcerpc_netr_LogonSamLogon_done(struct tevent_req *subreq)
     618             : {
     619           0 :         struct tevent_req *req = tevent_req_callback_data(
     620             :                 subreq, struct tevent_req);
     621           0 :         struct dcerpc_netr_LogonSamLogon_state *state = tevent_req_data(
     622             :                 req, struct dcerpc_netr_LogonSamLogon_state);
     623             :         NTSTATUS status;
     624             :         TALLOC_CTX *mem_ctx;
     625             : 
     626           0 :         if (state->out_mem_ctx) {
     627           0 :                 mem_ctx = state->out_mem_ctx;
     628             :         } else {
     629           0 :                 mem_ctx = state;
     630             :         }
     631             : 
     632           0 :         status = dcerpc_netr_LogonSamLogon_r_recv(subreq, mem_ctx);
     633           0 :         TALLOC_FREE(subreq);
     634           0 :         if (tevent_req_nterror(req, status)) {
     635           0 :                 return;
     636             :         }
     637             : 
     638             :         /* Copy out parameters */
     639           0 :         if (state->orig.out.return_authenticator && state->tmp.out.return_authenticator) {
     640           0 :                 *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
     641             :         }
     642           0 :         *state->orig.out.validation = *state->tmp.out.validation;
     643           0 :         *state->orig.out.authoritative = *state->tmp.out.authoritative;
     644             : 
     645             :         /* Copy result */
     646           0 :         state->orig.out.result = state->tmp.out.result;
     647             : 
     648             :         /* Reset temporary structure */
     649           0 :         NDR_ZERO_STRUCT(state->tmp);
     650             : 
     651           0 :         tevent_req_done(req);
     652             : }
     653             : 
     654           0 : NTSTATUS dcerpc_netr_LogonSamLogon_recv(struct tevent_req *req,
     655             :                                         TALLOC_CTX *mem_ctx,
     656             :                                         NTSTATUS *result)
     657             : {
     658           0 :         struct dcerpc_netr_LogonSamLogon_state *state = tevent_req_data(
     659             :                 req, struct dcerpc_netr_LogonSamLogon_state);
     660             :         NTSTATUS status;
     661             : 
     662           0 :         if (tevent_req_is_nterror(req, &status)) {
     663           0 :                 tevent_req_received(req);
     664           0 :                 return status;
     665             :         }
     666             : 
     667             :         /* Steal possible out parameters to the callers context */
     668           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     669             : 
     670             :         /* Return result */
     671           0 :         *result = state->orig.out.result;
     672             : 
     673           0 :         tevent_req_received(req);
     674           0 :         return NT_STATUS_OK;
     675             : }
     676             : 
     677           0 : NTSTATUS dcerpc_netr_LogonSamLogon(struct dcerpc_binding_handle *h,
     678             :                                    TALLOC_CTX *mem_ctx,
     679             :                                    const char *_server_name /* [in] [charset(UTF16),unique] */,
     680             :                                    const char *_computer_name /* [in] [charset(UTF16),unique] */,
     681             :                                    struct netr_Authenticator *_credential /* [in] [unique] */,
     682             :                                    struct netr_Authenticator *_return_authenticator /* [in,out] [unique] */,
     683             :                                    enum netr_LogonInfoClass _logon_level /* [in]  */,
     684             :                                    union netr_LogonLevel *_logon /* [in] [ref,switch_is(logon_level)] */,
     685             :                                    uint16_t _validation_level /* [in]  */,
     686             :                                    union netr_Validation *_validation /* [out] [ref,switch_is(validation_level)] */,
     687             :                                    uint8_t *_authoritative /* [out] [ref] */,
     688             :                                    NTSTATUS *result)
     689             : {
     690             :         struct netr_LogonSamLogon r;
     691             :         NTSTATUS status;
     692             : 
     693             :         /* In parameters */
     694           0 :         r.in.server_name = _server_name;
     695           0 :         r.in.computer_name = _computer_name;
     696           0 :         r.in.credential = _credential;
     697           0 :         r.in.return_authenticator = _return_authenticator;
     698           0 :         r.in.logon_level = _logon_level;
     699           0 :         r.in.logon = _logon;
     700           0 :         r.in.validation_level = _validation_level;
     701             : 
     702             :         /* Out parameters */
     703           0 :         r.out.return_authenticator = _return_authenticator;
     704           0 :         r.out.validation = _validation;
     705           0 :         r.out.authoritative = _authoritative;
     706             : 
     707             :         /* Result */
     708           0 :         NDR_ZERO_STRUCT(r.out.result);
     709             : 
     710           0 :         status = dcerpc_netr_LogonSamLogon_r(h, mem_ctx, &r);
     711           0 :         if (!NT_STATUS_IS_OK(status)) {
     712           0 :                 return status;
     713             :         }
     714             : 
     715             :         /* Return variables */
     716           0 :         if (_return_authenticator && r.out.return_authenticator) {
     717           0 :                 *_return_authenticator = *r.out.return_authenticator;
     718             :         }
     719           0 :         *_validation = *r.out.validation;
     720           0 :         *_authoritative = *r.out.authoritative;
     721             : 
     722             :         /* Return result */
     723           0 :         *result = r.out.result;
     724             : 
     725           0 :         return NT_STATUS_OK;
     726             : }
     727             : 
     728             : struct dcerpc_netr_LogonSamLogoff_r_state {
     729             :         TALLOC_CTX *out_mem_ctx;
     730             : };
     731             : 
     732             : static void dcerpc_netr_LogonSamLogoff_r_done(struct tevent_req *subreq);
     733             : 
     734           0 : struct tevent_req *dcerpc_netr_LogonSamLogoff_r_send(TALLOC_CTX *mem_ctx,
     735             :         struct tevent_context *ev,
     736             :         struct dcerpc_binding_handle *h,
     737             :         struct netr_LogonSamLogoff *r)
     738             : {
     739             :         struct tevent_req *req;
     740             :         struct dcerpc_netr_LogonSamLogoff_r_state *state;
     741             :         struct tevent_req *subreq;
     742             : 
     743           0 :         req = tevent_req_create(mem_ctx, &state,
     744             :                                 struct dcerpc_netr_LogonSamLogoff_r_state);
     745           0 :         if (req == NULL) {
     746           0 :                 return NULL;
     747             :         }
     748             : 
     749           0 :         state->out_mem_ctx = talloc_new(state);
     750           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     751           0 :                 return tevent_req_post(req, ev);
     752             :         }
     753             : 
     754           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     755             :                         NULL, &ndr_table_netlogon,
     756           0 :                         NDR_NETR_LOGONSAMLOGOFF, state->out_mem_ctx, r);
     757           0 :         if (tevent_req_nomem(subreq, req)) {
     758           0 :                 return tevent_req_post(req, ev);
     759             :         }
     760           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonSamLogoff_r_done, req);
     761             : 
     762           0 :         return req;
     763             : }
     764             : 
     765           0 : static void dcerpc_netr_LogonSamLogoff_r_done(struct tevent_req *subreq)
     766             : {
     767           0 :         struct tevent_req *req =
     768           0 :                 tevent_req_callback_data(subreq,
     769             :                 struct tevent_req);
     770             :         NTSTATUS status;
     771             : 
     772           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     773           0 :         TALLOC_FREE(subreq);
     774           0 :         if (tevent_req_nterror(req, status)) {
     775           0 :                 return;
     776             :         }
     777             : 
     778           0 :         tevent_req_done(req);
     779             : }
     780             : 
     781           0 : NTSTATUS dcerpc_netr_LogonSamLogoff_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     782             : {
     783           0 :         struct dcerpc_netr_LogonSamLogoff_r_state *state =
     784           0 :                 tevent_req_data(req,
     785             :                 struct dcerpc_netr_LogonSamLogoff_r_state);
     786             :         NTSTATUS status;
     787             : 
     788           0 :         if (tevent_req_is_nterror(req, &status)) {
     789           0 :                 tevent_req_received(req);
     790           0 :                 return status;
     791             :         }
     792             : 
     793           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     794             : 
     795           0 :         tevent_req_received(req);
     796           0 :         return NT_STATUS_OK;
     797             : }
     798             : 
     799           0 : NTSTATUS dcerpc_netr_LogonSamLogoff_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_LogonSamLogoff *r)
     800             : {
     801             :         NTSTATUS status;
     802             : 
     803           0 :         status = dcerpc_binding_handle_call(h,
     804             :                         NULL, &ndr_table_netlogon,
     805             :                         NDR_NETR_LOGONSAMLOGOFF, mem_ctx, r);
     806             : 
     807           0 :         return status;
     808             : }
     809             : 
     810             : struct dcerpc_netr_LogonSamLogoff_state {
     811             :         struct netr_LogonSamLogoff orig;
     812             :         struct netr_LogonSamLogoff tmp;
     813             :         TALLOC_CTX *out_mem_ctx;
     814             : };
     815             : 
     816             : static void dcerpc_netr_LogonSamLogoff_done(struct tevent_req *subreq);
     817             : 
     818           0 : struct tevent_req *dcerpc_netr_LogonSamLogoff_send(TALLOC_CTX *mem_ctx,
     819             :                                                    struct tevent_context *ev,
     820             :                                                    struct dcerpc_binding_handle *h,
     821             :                                                    const char *_server_name /* [in] [charset(UTF16),unique] */,
     822             :                                                    const char *_computer_name /* [in] [charset(UTF16),unique] */,
     823             :                                                    struct netr_Authenticator *_credential /* [in] [unique] */,
     824             :                                                    struct netr_Authenticator *_return_authenticator /* [in,out] [unique] */,
     825             :                                                    enum netr_LogonInfoClass _logon_level /* [in]  */,
     826             :                                                    union netr_LogonLevel _logon /* [in] [switch_is(logon_level)] */)
     827             : {
     828             :         struct tevent_req *req;
     829             :         struct dcerpc_netr_LogonSamLogoff_state *state;
     830             :         struct tevent_req *subreq;
     831             : 
     832           0 :         req = tevent_req_create(mem_ctx, &state,
     833             :                                 struct dcerpc_netr_LogonSamLogoff_state);
     834           0 :         if (req == NULL) {
     835           0 :                 return NULL;
     836             :         }
     837           0 :         state->out_mem_ctx = NULL;
     838             : 
     839             :         /* In parameters */
     840           0 :         state->orig.in.server_name = _server_name;
     841           0 :         state->orig.in.computer_name = _computer_name;
     842           0 :         state->orig.in.credential = _credential;
     843           0 :         state->orig.in.return_authenticator = _return_authenticator;
     844           0 :         state->orig.in.logon_level = _logon_level;
     845           0 :         state->orig.in.logon = _logon;
     846             : 
     847             :         /* Out parameters */
     848           0 :         state->orig.out.return_authenticator = _return_authenticator;
     849             : 
     850             :         /* Result */
     851           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     852             : 
     853           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     854             :                              "dcerpc_netr_LogonSamLogoff_out_memory");
     855           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     856           0 :                 return tevent_req_post(req, ev);
     857             :         }
     858             : 
     859             :         /* make a temporary copy, that we pass to the dispatch function */
     860           0 :         state->tmp = state->orig;
     861             : 
     862           0 :         subreq = dcerpc_netr_LogonSamLogoff_r_send(state, ev, h, &state->tmp);
     863           0 :         if (tevent_req_nomem(subreq, req)) {
     864           0 :                 return tevent_req_post(req, ev);
     865             :         }
     866           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonSamLogoff_done, req);
     867           0 :         return req;
     868             : }
     869             : 
     870           0 : static void dcerpc_netr_LogonSamLogoff_done(struct tevent_req *subreq)
     871             : {
     872           0 :         struct tevent_req *req = tevent_req_callback_data(
     873             :                 subreq, struct tevent_req);
     874           0 :         struct dcerpc_netr_LogonSamLogoff_state *state = tevent_req_data(
     875             :                 req, struct dcerpc_netr_LogonSamLogoff_state);
     876             :         NTSTATUS status;
     877             :         TALLOC_CTX *mem_ctx;
     878             : 
     879           0 :         if (state->out_mem_ctx) {
     880           0 :                 mem_ctx = state->out_mem_ctx;
     881             :         } else {
     882           0 :                 mem_ctx = state;
     883             :         }
     884             : 
     885           0 :         status = dcerpc_netr_LogonSamLogoff_r_recv(subreq, mem_ctx);
     886           0 :         TALLOC_FREE(subreq);
     887           0 :         if (tevent_req_nterror(req, status)) {
     888           0 :                 return;
     889             :         }
     890             : 
     891             :         /* Copy out parameters */
     892           0 :         if (state->orig.out.return_authenticator && state->tmp.out.return_authenticator) {
     893           0 :                 *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
     894             :         }
     895             : 
     896             :         /* Copy result */
     897           0 :         state->orig.out.result = state->tmp.out.result;
     898             : 
     899             :         /* Reset temporary structure */
     900           0 :         NDR_ZERO_STRUCT(state->tmp);
     901             : 
     902           0 :         tevent_req_done(req);
     903             : }
     904             : 
     905           0 : NTSTATUS dcerpc_netr_LogonSamLogoff_recv(struct tevent_req *req,
     906             :                                          TALLOC_CTX *mem_ctx,
     907             :                                          NTSTATUS *result)
     908             : {
     909           0 :         struct dcerpc_netr_LogonSamLogoff_state *state = tevent_req_data(
     910             :                 req, struct dcerpc_netr_LogonSamLogoff_state);
     911             :         NTSTATUS status;
     912             : 
     913           0 :         if (tevent_req_is_nterror(req, &status)) {
     914           0 :                 tevent_req_received(req);
     915           0 :                 return status;
     916             :         }
     917             : 
     918             :         /* Steal possible out parameters to the callers context */
     919           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     920             : 
     921             :         /* Return result */
     922           0 :         *result = state->orig.out.result;
     923             : 
     924           0 :         tevent_req_received(req);
     925           0 :         return NT_STATUS_OK;
     926             : }
     927             : 
     928           0 : NTSTATUS dcerpc_netr_LogonSamLogoff(struct dcerpc_binding_handle *h,
     929             :                                     TALLOC_CTX *mem_ctx,
     930             :                                     const char *_server_name /* [in] [charset(UTF16),unique] */,
     931             :                                     const char *_computer_name /* [in] [charset(UTF16),unique] */,
     932             :                                     struct netr_Authenticator *_credential /* [in] [unique] */,
     933             :                                     struct netr_Authenticator *_return_authenticator /* [in,out] [unique] */,
     934             :                                     enum netr_LogonInfoClass _logon_level /* [in]  */,
     935             :                                     union netr_LogonLevel _logon /* [in] [switch_is(logon_level)] */,
     936             :                                     NTSTATUS *result)
     937             : {
     938             :         struct netr_LogonSamLogoff r;
     939             :         NTSTATUS status;
     940             : 
     941             :         /* In parameters */
     942           0 :         r.in.server_name = _server_name;
     943           0 :         r.in.computer_name = _computer_name;
     944           0 :         r.in.credential = _credential;
     945           0 :         r.in.return_authenticator = _return_authenticator;
     946           0 :         r.in.logon_level = _logon_level;
     947           0 :         r.in.logon = _logon;
     948             : 
     949             :         /* Out parameters */
     950           0 :         r.out.return_authenticator = _return_authenticator;
     951             : 
     952             :         /* Result */
     953           0 :         NDR_ZERO_STRUCT(r.out.result);
     954             : 
     955           0 :         status = dcerpc_netr_LogonSamLogoff_r(h, mem_ctx, &r);
     956           0 :         if (!NT_STATUS_IS_OK(status)) {
     957           0 :                 return status;
     958             :         }
     959             : 
     960             :         /* Return variables */
     961           0 :         if (_return_authenticator && r.out.return_authenticator) {
     962           0 :                 *_return_authenticator = *r.out.return_authenticator;
     963             :         }
     964             : 
     965             :         /* Return result */
     966           0 :         *result = r.out.result;
     967             : 
     968           0 :         return NT_STATUS_OK;
     969             : }
     970             : 
     971             : struct dcerpc_netr_ServerReqChallenge_r_state {
     972             :         TALLOC_CTX *out_mem_ctx;
     973             : };
     974             : 
     975             : static void dcerpc_netr_ServerReqChallenge_r_done(struct tevent_req *subreq);
     976             : 
     977         489 : struct tevent_req *dcerpc_netr_ServerReqChallenge_r_send(TALLOC_CTX *mem_ctx,
     978             :         struct tevent_context *ev,
     979             :         struct dcerpc_binding_handle *h,
     980             :         struct netr_ServerReqChallenge *r)
     981             : {
     982             :         struct tevent_req *req;
     983             :         struct dcerpc_netr_ServerReqChallenge_r_state *state;
     984             :         struct tevent_req *subreq;
     985             : 
     986         489 :         req = tevent_req_create(mem_ctx, &state,
     987             :                                 struct dcerpc_netr_ServerReqChallenge_r_state);
     988         489 :         if (req == NULL) {
     989           0 :                 return NULL;
     990             :         }
     991             : 
     992         489 :         state->out_mem_ctx = talloc_new(state);
     993         489 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     994           0 :                 return tevent_req_post(req, ev);
     995             :         }
     996             : 
     997         489 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     998             :                         NULL, &ndr_table_netlogon,
     999         489 :                         NDR_NETR_SERVERREQCHALLENGE, state->out_mem_ctx, r);
    1000         489 :         if (tevent_req_nomem(subreq, req)) {
    1001           0 :                 return tevent_req_post(req, ev);
    1002             :         }
    1003         489 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerReqChallenge_r_done, req);
    1004             : 
    1005         489 :         return req;
    1006             : }
    1007             : 
    1008         489 : static void dcerpc_netr_ServerReqChallenge_r_done(struct tevent_req *subreq)
    1009             : {
    1010         411 :         struct tevent_req *req =
    1011         489 :                 tevent_req_callback_data(subreq,
    1012             :                 struct tevent_req);
    1013             :         NTSTATUS status;
    1014             : 
    1015         489 :         status = dcerpc_binding_handle_call_recv(subreq);
    1016         489 :         TALLOC_FREE(subreq);
    1017         489 :         if (tevent_req_nterror(req, status)) {
    1018           0 :                 return;
    1019             :         }
    1020             : 
    1021         489 :         tevent_req_done(req);
    1022             : }
    1023             : 
    1024         489 : NTSTATUS dcerpc_netr_ServerReqChallenge_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1025             : {
    1026         411 :         struct dcerpc_netr_ServerReqChallenge_r_state *state =
    1027         489 :                 tevent_req_data(req,
    1028             :                 struct dcerpc_netr_ServerReqChallenge_r_state);
    1029             :         NTSTATUS status;
    1030             : 
    1031         489 :         if (tevent_req_is_nterror(req, &status)) {
    1032           0 :                 tevent_req_received(req);
    1033           0 :                 return status;
    1034             :         }
    1035             : 
    1036         489 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1037             : 
    1038         489 :         tevent_req_received(req);
    1039         489 :         return NT_STATUS_OK;
    1040             : }
    1041             : 
    1042        8765 : NTSTATUS dcerpc_netr_ServerReqChallenge_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_ServerReqChallenge *r)
    1043             : {
    1044             :         NTSTATUS status;
    1045             : 
    1046        8765 :         status = dcerpc_binding_handle_call(h,
    1047             :                         NULL, &ndr_table_netlogon,
    1048             :                         NDR_NETR_SERVERREQCHALLENGE, mem_ctx, r);
    1049             : 
    1050        8765 :         return status;
    1051             : }
    1052             : 
    1053             : struct dcerpc_netr_ServerReqChallenge_state {
    1054             :         struct netr_ServerReqChallenge orig;
    1055             :         struct netr_ServerReqChallenge tmp;
    1056             :         TALLOC_CTX *out_mem_ctx;
    1057             : };
    1058             : 
    1059             : static void dcerpc_netr_ServerReqChallenge_done(struct tevent_req *subreq);
    1060             : 
    1061         108 : struct tevent_req *dcerpc_netr_ServerReqChallenge_send(TALLOC_CTX *mem_ctx,
    1062             :                                                        struct tevent_context *ev,
    1063             :                                                        struct dcerpc_binding_handle *h,
    1064             :                                                        const char *_server_name /* [in] [charset(UTF16),unique] */,
    1065             :                                                        const char *_computer_name /* [in] [charset(UTF16),ref] */,
    1066             :                                                        struct netr_Credential *_credentials /* [in] [ref] */,
    1067             :                                                        struct netr_Credential *_return_credentials /* [out] [ref] */)
    1068             : {
    1069             :         struct tevent_req *req;
    1070             :         struct dcerpc_netr_ServerReqChallenge_state *state;
    1071             :         struct tevent_req *subreq;
    1072             : 
    1073         108 :         req = tevent_req_create(mem_ctx, &state,
    1074             :                                 struct dcerpc_netr_ServerReqChallenge_state);
    1075         108 :         if (req == NULL) {
    1076           0 :                 return NULL;
    1077             :         }
    1078         108 :         state->out_mem_ctx = NULL;
    1079             : 
    1080             :         /* In parameters */
    1081         108 :         state->orig.in.server_name = _server_name;
    1082         108 :         state->orig.in.computer_name = _computer_name;
    1083         108 :         state->orig.in.credentials = _credentials;
    1084             : 
    1085             :         /* Out parameters */
    1086         108 :         state->orig.out.return_credentials = _return_credentials;
    1087             : 
    1088             :         /* Result */
    1089         108 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1090             : 
    1091         108 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1092             :                              "dcerpc_netr_ServerReqChallenge_out_memory");
    1093         108 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1094           0 :                 return tevent_req_post(req, ev);
    1095             :         }
    1096             : 
    1097             :         /* make a temporary copy, that we pass to the dispatch function */
    1098         108 :         state->tmp = state->orig;
    1099             : 
    1100         108 :         subreq = dcerpc_netr_ServerReqChallenge_r_send(state, ev, h, &state->tmp);
    1101         108 :         if (tevent_req_nomem(subreq, req)) {
    1102           0 :                 return tevent_req_post(req, ev);
    1103             :         }
    1104         108 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerReqChallenge_done, req);
    1105         108 :         return req;
    1106             : }
    1107             : 
    1108         108 : static void dcerpc_netr_ServerReqChallenge_done(struct tevent_req *subreq)
    1109             : {
    1110         108 :         struct tevent_req *req = tevent_req_callback_data(
    1111             :                 subreq, struct tevent_req);
    1112         108 :         struct dcerpc_netr_ServerReqChallenge_state *state = tevent_req_data(
    1113             :                 req, struct dcerpc_netr_ServerReqChallenge_state);
    1114             :         NTSTATUS status;
    1115             :         TALLOC_CTX *mem_ctx;
    1116             : 
    1117         108 :         if (state->out_mem_ctx) {
    1118         108 :                 mem_ctx = state->out_mem_ctx;
    1119             :         } else {
    1120           0 :                 mem_ctx = state;
    1121             :         }
    1122             : 
    1123         108 :         status = dcerpc_netr_ServerReqChallenge_r_recv(subreq, mem_ctx);
    1124         108 :         TALLOC_FREE(subreq);
    1125         108 :         if (tevent_req_nterror(req, status)) {
    1126           0 :                 return;
    1127             :         }
    1128             : 
    1129             :         /* Copy out parameters */
    1130         108 :         *state->orig.out.return_credentials = *state->tmp.out.return_credentials;
    1131             : 
    1132             :         /* Copy result */
    1133         108 :         state->orig.out.result = state->tmp.out.result;
    1134             : 
    1135             :         /* Reset temporary structure */
    1136         108 :         NDR_ZERO_STRUCT(state->tmp);
    1137             : 
    1138         108 :         tevent_req_done(req);
    1139             : }
    1140             : 
    1141         108 : NTSTATUS dcerpc_netr_ServerReqChallenge_recv(struct tevent_req *req,
    1142             :                                              TALLOC_CTX *mem_ctx,
    1143             :                                              NTSTATUS *result)
    1144             : {
    1145         108 :         struct dcerpc_netr_ServerReqChallenge_state *state = tevent_req_data(
    1146             :                 req, struct dcerpc_netr_ServerReqChallenge_state);
    1147             :         NTSTATUS status;
    1148             : 
    1149         108 :         if (tevent_req_is_nterror(req, &status)) {
    1150           0 :                 tevent_req_received(req);
    1151           0 :                 return status;
    1152             :         }
    1153             : 
    1154             :         /* Steal possible out parameters to the callers context */
    1155         108 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1156             : 
    1157             :         /* Return result */
    1158         108 :         *result = state->orig.out.result;
    1159             : 
    1160         108 :         tevent_req_received(req);
    1161         108 :         return NT_STATUS_OK;
    1162             : }
    1163             : 
    1164           0 : NTSTATUS dcerpc_netr_ServerReqChallenge(struct dcerpc_binding_handle *h,
    1165             :                                         TALLOC_CTX *mem_ctx,
    1166             :                                         const char *_server_name /* [in] [charset(UTF16),unique] */,
    1167             :                                         const char *_computer_name /* [in] [charset(UTF16),ref] */,
    1168             :                                         struct netr_Credential *_credentials /* [in] [ref] */,
    1169             :                                         struct netr_Credential *_return_credentials /* [out] [ref] */,
    1170             :                                         NTSTATUS *result)
    1171             : {
    1172             :         struct netr_ServerReqChallenge r;
    1173             :         NTSTATUS status;
    1174             : 
    1175             :         /* In parameters */
    1176           0 :         r.in.server_name = _server_name;
    1177           0 :         r.in.computer_name = _computer_name;
    1178           0 :         r.in.credentials = _credentials;
    1179             : 
    1180             :         /* Out parameters */
    1181           0 :         r.out.return_credentials = _return_credentials;
    1182             : 
    1183             :         /* Result */
    1184           0 :         NDR_ZERO_STRUCT(r.out.result);
    1185             : 
    1186           0 :         status = dcerpc_netr_ServerReqChallenge_r(h, mem_ctx, &r);
    1187           0 :         if (!NT_STATUS_IS_OK(status)) {
    1188           0 :                 return status;
    1189             :         }
    1190             : 
    1191             :         /* Return variables */
    1192           0 :         *_return_credentials = *r.out.return_credentials;
    1193             : 
    1194             :         /* Return result */
    1195           0 :         *result = r.out.result;
    1196             : 
    1197           0 :         return NT_STATUS_OK;
    1198             : }
    1199             : 
    1200             : struct dcerpc_netr_ServerAuthenticate_r_state {
    1201             :         TALLOC_CTX *out_mem_ctx;
    1202             : };
    1203             : 
    1204             : static void dcerpc_netr_ServerAuthenticate_r_done(struct tevent_req *subreq);
    1205             : 
    1206           0 : struct tevent_req *dcerpc_netr_ServerAuthenticate_r_send(TALLOC_CTX *mem_ctx,
    1207             :         struct tevent_context *ev,
    1208             :         struct dcerpc_binding_handle *h,
    1209             :         struct netr_ServerAuthenticate *r)
    1210             : {
    1211             :         struct tevent_req *req;
    1212             :         struct dcerpc_netr_ServerAuthenticate_r_state *state;
    1213             :         struct tevent_req *subreq;
    1214             : 
    1215           0 :         req = tevent_req_create(mem_ctx, &state,
    1216             :                                 struct dcerpc_netr_ServerAuthenticate_r_state);
    1217           0 :         if (req == NULL) {
    1218           0 :                 return NULL;
    1219             :         }
    1220             : 
    1221           0 :         state->out_mem_ctx = talloc_new(state);
    1222           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1223           0 :                 return tevent_req_post(req, ev);
    1224             :         }
    1225             : 
    1226           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1227             :                         NULL, &ndr_table_netlogon,
    1228           0 :                         NDR_NETR_SERVERAUTHENTICATE, state->out_mem_ctx, r);
    1229           0 :         if (tevent_req_nomem(subreq, req)) {
    1230           0 :                 return tevent_req_post(req, ev);
    1231             :         }
    1232           0 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerAuthenticate_r_done, req);
    1233             : 
    1234           0 :         return req;
    1235             : }
    1236             : 
    1237           0 : static void dcerpc_netr_ServerAuthenticate_r_done(struct tevent_req *subreq)
    1238             : {
    1239           0 :         struct tevent_req *req =
    1240           0 :                 tevent_req_callback_data(subreq,
    1241             :                 struct tevent_req);
    1242             :         NTSTATUS status;
    1243             : 
    1244           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1245           0 :         TALLOC_FREE(subreq);
    1246           0 :         if (tevent_req_nterror(req, status)) {
    1247           0 :                 return;
    1248             :         }
    1249             : 
    1250           0 :         tevent_req_done(req);
    1251             : }
    1252             : 
    1253           0 : NTSTATUS dcerpc_netr_ServerAuthenticate_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1254             : {
    1255           0 :         struct dcerpc_netr_ServerAuthenticate_r_state *state =
    1256           0 :                 tevent_req_data(req,
    1257             :                 struct dcerpc_netr_ServerAuthenticate_r_state);
    1258             :         NTSTATUS status;
    1259             : 
    1260           0 :         if (tevent_req_is_nterror(req, &status)) {
    1261           0 :                 tevent_req_received(req);
    1262           0 :                 return status;
    1263             :         }
    1264             : 
    1265           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1266             : 
    1267           0 :         tevent_req_received(req);
    1268           0 :         return NT_STATUS_OK;
    1269             : }
    1270             : 
    1271         276 : NTSTATUS dcerpc_netr_ServerAuthenticate_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_ServerAuthenticate *r)
    1272             : {
    1273             :         NTSTATUS status;
    1274             : 
    1275         276 :         status = dcerpc_binding_handle_call(h,
    1276             :                         NULL, &ndr_table_netlogon,
    1277             :                         NDR_NETR_SERVERAUTHENTICATE, mem_ctx, r);
    1278             : 
    1279         276 :         return status;
    1280             : }
    1281             : 
    1282             : struct dcerpc_netr_ServerAuthenticate_state {
    1283             :         struct netr_ServerAuthenticate orig;
    1284             :         struct netr_ServerAuthenticate tmp;
    1285             :         TALLOC_CTX *out_mem_ctx;
    1286             : };
    1287             : 
    1288             : static void dcerpc_netr_ServerAuthenticate_done(struct tevent_req *subreq);
    1289             : 
    1290           0 : struct tevent_req *dcerpc_netr_ServerAuthenticate_send(TALLOC_CTX *mem_ctx,
    1291             :                                                        struct tevent_context *ev,
    1292             :                                                        struct dcerpc_binding_handle *h,
    1293             :                                                        const char *_server_name /* [in] [charset(UTF16),unique] */,
    1294             :                                                        const char *_account_name /* [in] [charset(UTF16),ref] */,
    1295             :                                                        enum netr_SchannelType _secure_channel_type /* [in]  */,
    1296             :                                                        const char *_computer_name /* [in] [charset(UTF16),ref] */,
    1297             :                                                        struct netr_Credential *_credentials /* [in] [ref] */,
    1298             :                                                        struct netr_Credential *_return_credentials /* [out] [ref] */)
    1299             : {
    1300             :         struct tevent_req *req;
    1301             :         struct dcerpc_netr_ServerAuthenticate_state *state;
    1302             :         struct tevent_req *subreq;
    1303             : 
    1304           0 :         req = tevent_req_create(mem_ctx, &state,
    1305             :                                 struct dcerpc_netr_ServerAuthenticate_state);
    1306           0 :         if (req == NULL) {
    1307           0 :                 return NULL;
    1308             :         }
    1309           0 :         state->out_mem_ctx = NULL;
    1310             : 
    1311             :         /* In parameters */
    1312           0 :         state->orig.in.server_name = _server_name;
    1313           0 :         state->orig.in.account_name = _account_name;
    1314           0 :         state->orig.in.secure_channel_type = _secure_channel_type;
    1315           0 :         state->orig.in.computer_name = _computer_name;
    1316           0 :         state->orig.in.credentials = _credentials;
    1317             : 
    1318             :         /* Out parameters */
    1319           0 :         state->orig.out.return_credentials = _return_credentials;
    1320             : 
    1321             :         /* Result */
    1322           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1323             : 
    1324           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1325             :                              "dcerpc_netr_ServerAuthenticate_out_memory");
    1326           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1327           0 :                 return tevent_req_post(req, ev);
    1328             :         }
    1329             : 
    1330             :         /* make a temporary copy, that we pass to the dispatch function */
    1331           0 :         state->tmp = state->orig;
    1332             : 
    1333           0 :         subreq = dcerpc_netr_ServerAuthenticate_r_send(state, ev, h, &state->tmp);
    1334           0 :         if (tevent_req_nomem(subreq, req)) {
    1335           0 :                 return tevent_req_post(req, ev);
    1336             :         }
    1337           0 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerAuthenticate_done, req);
    1338           0 :         return req;
    1339             : }
    1340             : 
    1341           0 : static void dcerpc_netr_ServerAuthenticate_done(struct tevent_req *subreq)
    1342             : {
    1343           0 :         struct tevent_req *req = tevent_req_callback_data(
    1344             :                 subreq, struct tevent_req);
    1345           0 :         struct dcerpc_netr_ServerAuthenticate_state *state = tevent_req_data(
    1346             :                 req, struct dcerpc_netr_ServerAuthenticate_state);
    1347             :         NTSTATUS status;
    1348             :         TALLOC_CTX *mem_ctx;
    1349             : 
    1350           0 :         if (state->out_mem_ctx) {
    1351           0 :                 mem_ctx = state->out_mem_ctx;
    1352             :         } else {
    1353           0 :                 mem_ctx = state;
    1354             :         }
    1355             : 
    1356           0 :         status = dcerpc_netr_ServerAuthenticate_r_recv(subreq, mem_ctx);
    1357           0 :         TALLOC_FREE(subreq);
    1358           0 :         if (tevent_req_nterror(req, status)) {
    1359           0 :                 return;
    1360             :         }
    1361             : 
    1362             :         /* Copy out parameters */
    1363           0 :         *state->orig.out.return_credentials = *state->tmp.out.return_credentials;
    1364             : 
    1365             :         /* Copy result */
    1366           0 :         state->orig.out.result = state->tmp.out.result;
    1367             : 
    1368             :         /* Reset temporary structure */
    1369           0 :         NDR_ZERO_STRUCT(state->tmp);
    1370             : 
    1371           0 :         tevent_req_done(req);
    1372             : }
    1373             : 
    1374           0 : NTSTATUS dcerpc_netr_ServerAuthenticate_recv(struct tevent_req *req,
    1375             :                                              TALLOC_CTX *mem_ctx,
    1376             :                                              NTSTATUS *result)
    1377             : {
    1378           0 :         struct dcerpc_netr_ServerAuthenticate_state *state = tevent_req_data(
    1379             :                 req, struct dcerpc_netr_ServerAuthenticate_state);
    1380             :         NTSTATUS status;
    1381             : 
    1382           0 :         if (tevent_req_is_nterror(req, &status)) {
    1383           0 :                 tevent_req_received(req);
    1384           0 :                 return status;
    1385             :         }
    1386             : 
    1387             :         /* Steal possible out parameters to the callers context */
    1388           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1389             : 
    1390             :         /* Return result */
    1391           0 :         *result = state->orig.out.result;
    1392             : 
    1393           0 :         tevent_req_received(req);
    1394           0 :         return NT_STATUS_OK;
    1395             : }
    1396             : 
    1397           0 : NTSTATUS dcerpc_netr_ServerAuthenticate(struct dcerpc_binding_handle *h,
    1398             :                                         TALLOC_CTX *mem_ctx,
    1399             :                                         const char *_server_name /* [in] [charset(UTF16),unique] */,
    1400             :                                         const char *_account_name /* [in] [charset(UTF16),ref] */,
    1401             :                                         enum netr_SchannelType _secure_channel_type /* [in]  */,
    1402             :                                         const char *_computer_name /* [in] [charset(UTF16),ref] */,
    1403             :                                         struct netr_Credential *_credentials /* [in] [ref] */,
    1404             :                                         struct netr_Credential *_return_credentials /* [out] [ref] */,
    1405             :                                         NTSTATUS *result)
    1406             : {
    1407             :         struct netr_ServerAuthenticate r;
    1408             :         NTSTATUS status;
    1409             : 
    1410             :         /* In parameters */
    1411           0 :         r.in.server_name = _server_name;
    1412           0 :         r.in.account_name = _account_name;
    1413           0 :         r.in.secure_channel_type = _secure_channel_type;
    1414           0 :         r.in.computer_name = _computer_name;
    1415           0 :         r.in.credentials = _credentials;
    1416             : 
    1417             :         /* Out parameters */
    1418           0 :         r.out.return_credentials = _return_credentials;
    1419             : 
    1420             :         /* Result */
    1421           0 :         NDR_ZERO_STRUCT(r.out.result);
    1422             : 
    1423           0 :         status = dcerpc_netr_ServerAuthenticate_r(h, mem_ctx, &r);
    1424           0 :         if (!NT_STATUS_IS_OK(status)) {
    1425           0 :                 return status;
    1426             :         }
    1427             : 
    1428             :         /* Return variables */
    1429           0 :         *_return_credentials = *r.out.return_credentials;
    1430             : 
    1431             :         /* Return result */
    1432           0 :         *result = r.out.result;
    1433             : 
    1434           0 :         return NT_STATUS_OK;
    1435             : }
    1436             : 
    1437             : struct dcerpc_netr_ServerPasswordSet_r_state {
    1438             :         TALLOC_CTX *out_mem_ctx;
    1439             : };
    1440             : 
    1441             : static void dcerpc_netr_ServerPasswordSet_r_done(struct tevent_req *subreq);
    1442             : 
    1443           0 : struct tevent_req *dcerpc_netr_ServerPasswordSet_r_send(TALLOC_CTX *mem_ctx,
    1444             :         struct tevent_context *ev,
    1445             :         struct dcerpc_binding_handle *h,
    1446             :         struct netr_ServerPasswordSet *r)
    1447             : {
    1448             :         struct tevent_req *req;
    1449             :         struct dcerpc_netr_ServerPasswordSet_r_state *state;
    1450             :         struct tevent_req *subreq;
    1451             : 
    1452           0 :         req = tevent_req_create(mem_ctx, &state,
    1453             :                                 struct dcerpc_netr_ServerPasswordSet_r_state);
    1454           0 :         if (req == NULL) {
    1455           0 :                 return NULL;
    1456             :         }
    1457             : 
    1458           0 :         state->out_mem_ctx = talloc_new(state);
    1459           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1460           0 :                 return tevent_req_post(req, ev);
    1461             :         }
    1462             : 
    1463           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1464             :                         NULL, &ndr_table_netlogon,
    1465           0 :                         NDR_NETR_SERVERPASSWORDSET, state->out_mem_ctx, r);
    1466           0 :         if (tevent_req_nomem(subreq, req)) {
    1467           0 :                 return tevent_req_post(req, ev);
    1468             :         }
    1469           0 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerPasswordSet_r_done, req);
    1470             : 
    1471           0 :         return req;
    1472             : }
    1473             : 
    1474           0 : static void dcerpc_netr_ServerPasswordSet_r_done(struct tevent_req *subreq)
    1475             : {
    1476           0 :         struct tevent_req *req =
    1477           0 :                 tevent_req_callback_data(subreq,
    1478             :                 struct tevent_req);
    1479             :         NTSTATUS status;
    1480             : 
    1481           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1482           0 :         TALLOC_FREE(subreq);
    1483           0 :         if (tevent_req_nterror(req, status)) {
    1484           0 :                 return;
    1485             :         }
    1486             : 
    1487           0 :         tevent_req_done(req);
    1488             : }
    1489             : 
    1490           0 : NTSTATUS dcerpc_netr_ServerPasswordSet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1491             : {
    1492           0 :         struct dcerpc_netr_ServerPasswordSet_r_state *state =
    1493           0 :                 tevent_req_data(req,
    1494             :                 struct dcerpc_netr_ServerPasswordSet_r_state);
    1495             :         NTSTATUS status;
    1496             : 
    1497           0 :         if (tevent_req_is_nterror(req, &status)) {
    1498           0 :                 tevent_req_received(req);
    1499           0 :                 return status;
    1500             :         }
    1501             : 
    1502           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1503             : 
    1504           0 :         tevent_req_received(req);
    1505           0 :         return NT_STATUS_OK;
    1506             : }
    1507             : 
    1508          68 : NTSTATUS dcerpc_netr_ServerPasswordSet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_ServerPasswordSet *r)
    1509             : {
    1510             :         NTSTATUS status;
    1511             : 
    1512          68 :         status = dcerpc_binding_handle_call(h,
    1513             :                         NULL, &ndr_table_netlogon,
    1514             :                         NDR_NETR_SERVERPASSWORDSET, mem_ctx, r);
    1515             : 
    1516          68 :         return status;
    1517             : }
    1518             : 
    1519             : struct dcerpc_netr_ServerPasswordSet_state {
    1520             :         struct netr_ServerPasswordSet orig;
    1521             :         struct netr_ServerPasswordSet tmp;
    1522             :         TALLOC_CTX *out_mem_ctx;
    1523             : };
    1524             : 
    1525             : static void dcerpc_netr_ServerPasswordSet_done(struct tevent_req *subreq);
    1526             : 
    1527           0 : struct tevent_req *dcerpc_netr_ServerPasswordSet_send(TALLOC_CTX *mem_ctx,
    1528             :                                                       struct tevent_context *ev,
    1529             :                                                       struct dcerpc_binding_handle *h,
    1530             :                                                       const char *_server_name /* [in] [charset(UTF16),unique] */,
    1531             :                                                       const char *_account_name /* [in] [charset(UTF16),ref] */,
    1532             :                                                       enum netr_SchannelType _secure_channel_type /* [in]  */,
    1533             :                                                       const char *_computer_name /* [in] [charset(UTF16),ref] */,
    1534             :                                                       struct netr_Authenticator *_credential /* [in] [ref] */,
    1535             :                                                       struct netr_Authenticator *_return_authenticator /* [out] [ref] */,
    1536             :                                                       struct samr_Password *_new_password /* [in] [ref] */)
    1537             : {
    1538             :         struct tevent_req *req;
    1539             :         struct dcerpc_netr_ServerPasswordSet_state *state;
    1540             :         struct tevent_req *subreq;
    1541             : 
    1542           0 :         req = tevent_req_create(mem_ctx, &state,
    1543             :                                 struct dcerpc_netr_ServerPasswordSet_state);
    1544           0 :         if (req == NULL) {
    1545           0 :                 return NULL;
    1546             :         }
    1547           0 :         state->out_mem_ctx = NULL;
    1548             : 
    1549             :         /* In parameters */
    1550           0 :         state->orig.in.server_name = _server_name;
    1551           0 :         state->orig.in.account_name = _account_name;
    1552           0 :         state->orig.in.secure_channel_type = _secure_channel_type;
    1553           0 :         state->orig.in.computer_name = _computer_name;
    1554           0 :         state->orig.in.credential = _credential;
    1555           0 :         state->orig.in.new_password = _new_password;
    1556             : 
    1557             :         /* Out parameters */
    1558           0 :         state->orig.out.return_authenticator = _return_authenticator;
    1559             : 
    1560             :         /* Result */
    1561           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1562             : 
    1563           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1564             :                              "dcerpc_netr_ServerPasswordSet_out_memory");
    1565           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1566           0 :                 return tevent_req_post(req, ev);
    1567             :         }
    1568             : 
    1569             :         /* make a temporary copy, that we pass to the dispatch function */
    1570           0 :         state->tmp = state->orig;
    1571             : 
    1572           0 :         subreq = dcerpc_netr_ServerPasswordSet_r_send(state, ev, h, &state->tmp);
    1573           0 :         if (tevent_req_nomem(subreq, req)) {
    1574           0 :                 return tevent_req_post(req, ev);
    1575             :         }
    1576           0 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerPasswordSet_done, req);
    1577           0 :         return req;
    1578             : }
    1579             : 
    1580           0 : static void dcerpc_netr_ServerPasswordSet_done(struct tevent_req *subreq)
    1581             : {
    1582           0 :         struct tevent_req *req = tevent_req_callback_data(
    1583             :                 subreq, struct tevent_req);
    1584           0 :         struct dcerpc_netr_ServerPasswordSet_state *state = tevent_req_data(
    1585             :                 req, struct dcerpc_netr_ServerPasswordSet_state);
    1586             :         NTSTATUS status;
    1587             :         TALLOC_CTX *mem_ctx;
    1588             : 
    1589           0 :         if (state->out_mem_ctx) {
    1590           0 :                 mem_ctx = state->out_mem_ctx;
    1591             :         } else {
    1592           0 :                 mem_ctx = state;
    1593             :         }
    1594             : 
    1595           0 :         status = dcerpc_netr_ServerPasswordSet_r_recv(subreq, mem_ctx);
    1596           0 :         TALLOC_FREE(subreq);
    1597           0 :         if (tevent_req_nterror(req, status)) {
    1598           0 :                 return;
    1599             :         }
    1600             : 
    1601             :         /* Copy out parameters */
    1602           0 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    1603             : 
    1604             :         /* Copy result */
    1605           0 :         state->orig.out.result = state->tmp.out.result;
    1606             : 
    1607             :         /* Reset temporary structure */
    1608           0 :         NDR_ZERO_STRUCT(state->tmp);
    1609             : 
    1610           0 :         tevent_req_done(req);
    1611             : }
    1612             : 
    1613           0 : NTSTATUS dcerpc_netr_ServerPasswordSet_recv(struct tevent_req *req,
    1614             :                                             TALLOC_CTX *mem_ctx,
    1615             :                                             NTSTATUS *result)
    1616             : {
    1617           0 :         struct dcerpc_netr_ServerPasswordSet_state *state = tevent_req_data(
    1618             :                 req, struct dcerpc_netr_ServerPasswordSet_state);
    1619             :         NTSTATUS status;
    1620             : 
    1621           0 :         if (tevent_req_is_nterror(req, &status)) {
    1622           0 :                 tevent_req_received(req);
    1623           0 :                 return status;
    1624             :         }
    1625             : 
    1626             :         /* Steal possible out parameters to the callers context */
    1627           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1628             : 
    1629             :         /* Return result */
    1630           0 :         *result = state->orig.out.result;
    1631             : 
    1632           0 :         tevent_req_received(req);
    1633           0 :         return NT_STATUS_OK;
    1634             : }
    1635             : 
    1636           0 : NTSTATUS dcerpc_netr_ServerPasswordSet(struct dcerpc_binding_handle *h,
    1637             :                                        TALLOC_CTX *mem_ctx,
    1638             :                                        const char *_server_name /* [in] [charset(UTF16),unique] */,
    1639             :                                        const char *_account_name /* [in] [charset(UTF16),ref] */,
    1640             :                                        enum netr_SchannelType _secure_channel_type /* [in]  */,
    1641             :                                        const char *_computer_name /* [in] [charset(UTF16),ref] */,
    1642             :                                        struct netr_Authenticator *_credential /* [in] [ref] */,
    1643             :                                        struct netr_Authenticator *_return_authenticator /* [out] [ref] */,
    1644             :                                        struct samr_Password *_new_password /* [in] [ref] */,
    1645             :                                        NTSTATUS *result)
    1646             : {
    1647             :         struct netr_ServerPasswordSet r;
    1648             :         NTSTATUS status;
    1649             : 
    1650             :         /* In parameters */
    1651           0 :         r.in.server_name = _server_name;
    1652           0 :         r.in.account_name = _account_name;
    1653           0 :         r.in.secure_channel_type = _secure_channel_type;
    1654           0 :         r.in.computer_name = _computer_name;
    1655           0 :         r.in.credential = _credential;
    1656           0 :         r.in.new_password = _new_password;
    1657             : 
    1658             :         /* Out parameters */
    1659           0 :         r.out.return_authenticator = _return_authenticator;
    1660             : 
    1661             :         /* Result */
    1662           0 :         NDR_ZERO_STRUCT(r.out.result);
    1663             : 
    1664           0 :         status = dcerpc_netr_ServerPasswordSet_r(h, mem_ctx, &r);
    1665           0 :         if (!NT_STATUS_IS_OK(status)) {
    1666           0 :                 return status;
    1667             :         }
    1668             : 
    1669             :         /* Return variables */
    1670           0 :         *_return_authenticator = *r.out.return_authenticator;
    1671             : 
    1672             :         /* Return result */
    1673           0 :         *result = r.out.result;
    1674             : 
    1675           0 :         return NT_STATUS_OK;
    1676             : }
    1677             : 
    1678             : struct dcerpc_netr_DatabaseDeltas_r_state {
    1679             :         TALLOC_CTX *out_mem_ctx;
    1680             : };
    1681             : 
    1682             : static void dcerpc_netr_DatabaseDeltas_r_done(struct tevent_req *subreq);
    1683             : 
    1684           0 : struct tevent_req *dcerpc_netr_DatabaseDeltas_r_send(TALLOC_CTX *mem_ctx,
    1685             :         struct tevent_context *ev,
    1686             :         struct dcerpc_binding_handle *h,
    1687             :         struct netr_DatabaseDeltas *r)
    1688             : {
    1689             :         struct tevent_req *req;
    1690             :         struct dcerpc_netr_DatabaseDeltas_r_state *state;
    1691             :         struct tevent_req *subreq;
    1692             : 
    1693           0 :         req = tevent_req_create(mem_ctx, &state,
    1694             :                                 struct dcerpc_netr_DatabaseDeltas_r_state);
    1695           0 :         if (req == NULL) {
    1696           0 :                 return NULL;
    1697             :         }
    1698             : 
    1699           0 :         state->out_mem_ctx = talloc_new(state);
    1700           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1701           0 :                 return tevent_req_post(req, ev);
    1702             :         }
    1703             : 
    1704           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1705             :                         NULL, &ndr_table_netlogon,
    1706           0 :                         NDR_NETR_DATABASEDELTAS, state->out_mem_ctx, r);
    1707           0 :         if (tevent_req_nomem(subreq, req)) {
    1708           0 :                 return tevent_req_post(req, ev);
    1709             :         }
    1710           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DatabaseDeltas_r_done, req);
    1711             : 
    1712           0 :         return req;
    1713             : }
    1714             : 
    1715           0 : static void dcerpc_netr_DatabaseDeltas_r_done(struct tevent_req *subreq)
    1716             : {
    1717           0 :         struct tevent_req *req =
    1718           0 :                 tevent_req_callback_data(subreq,
    1719             :                 struct tevent_req);
    1720             :         NTSTATUS status;
    1721             : 
    1722           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1723           0 :         TALLOC_FREE(subreq);
    1724           0 :         if (tevent_req_nterror(req, status)) {
    1725           0 :                 return;
    1726             :         }
    1727             : 
    1728           0 :         tevent_req_done(req);
    1729             : }
    1730             : 
    1731           0 : NTSTATUS dcerpc_netr_DatabaseDeltas_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1732             : {
    1733           0 :         struct dcerpc_netr_DatabaseDeltas_r_state *state =
    1734           0 :                 tevent_req_data(req,
    1735             :                 struct dcerpc_netr_DatabaseDeltas_r_state);
    1736             :         NTSTATUS status;
    1737             : 
    1738           0 :         if (tevent_req_is_nterror(req, &status)) {
    1739           0 :                 tevent_req_received(req);
    1740           0 :                 return status;
    1741             :         }
    1742             : 
    1743           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1744             : 
    1745           0 :         tevent_req_received(req);
    1746           0 :         return NT_STATUS_OK;
    1747             : }
    1748             : 
    1749           0 : NTSTATUS dcerpc_netr_DatabaseDeltas_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_DatabaseDeltas *r)
    1750             : {
    1751             :         NTSTATUS status;
    1752             : 
    1753           0 :         status = dcerpc_binding_handle_call(h,
    1754             :                         NULL, &ndr_table_netlogon,
    1755             :                         NDR_NETR_DATABASEDELTAS, mem_ctx, r);
    1756             : 
    1757           0 :         return status;
    1758             : }
    1759             : 
    1760             : struct dcerpc_netr_DatabaseDeltas_state {
    1761             :         struct netr_DatabaseDeltas orig;
    1762             :         struct netr_DatabaseDeltas tmp;
    1763             :         TALLOC_CTX *out_mem_ctx;
    1764             : };
    1765             : 
    1766             : static void dcerpc_netr_DatabaseDeltas_done(struct tevent_req *subreq);
    1767             : 
    1768           0 : struct tevent_req *dcerpc_netr_DatabaseDeltas_send(TALLOC_CTX *mem_ctx,
    1769             :                                                    struct tevent_context *ev,
    1770             :                                                    struct dcerpc_binding_handle *h,
    1771             :                                                    const char *_logon_server /* [in] [charset(UTF16),ref] */,
    1772             :                                                    const char *_computername /* [in] [charset(UTF16),ref] */,
    1773             :                                                    struct netr_Authenticator *_credential /* [in] [ref] */,
    1774             :                                                    struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    1775             :                                                    enum netr_SamDatabaseID _database_id /* [in]  */,
    1776             :                                                    uint64_t *_sequence_num /* [in,out] [ref] */,
    1777             :                                                    struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */,
    1778             :                                                    uint32_t _preferredmaximumlength /* [in]  */)
    1779             : {
    1780             :         struct tevent_req *req;
    1781             :         struct dcerpc_netr_DatabaseDeltas_state *state;
    1782             :         struct tevent_req *subreq;
    1783             : 
    1784           0 :         req = tevent_req_create(mem_ctx, &state,
    1785             :                                 struct dcerpc_netr_DatabaseDeltas_state);
    1786           0 :         if (req == NULL) {
    1787           0 :                 return NULL;
    1788             :         }
    1789           0 :         state->out_mem_ctx = NULL;
    1790             : 
    1791             :         /* In parameters */
    1792           0 :         state->orig.in.logon_server = _logon_server;
    1793           0 :         state->orig.in.computername = _computername;
    1794           0 :         state->orig.in.credential = _credential;
    1795           0 :         state->orig.in.return_authenticator = _return_authenticator;
    1796           0 :         state->orig.in.database_id = _database_id;
    1797           0 :         state->orig.in.sequence_num = _sequence_num;
    1798           0 :         state->orig.in.preferredmaximumlength = _preferredmaximumlength;
    1799             : 
    1800             :         /* Out parameters */
    1801           0 :         state->orig.out.return_authenticator = _return_authenticator;
    1802           0 :         state->orig.out.sequence_num = _sequence_num;
    1803           0 :         state->orig.out.delta_enum_array = _delta_enum_array;
    1804             : 
    1805             :         /* Result */
    1806           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1807             : 
    1808           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1809             :                              "dcerpc_netr_DatabaseDeltas_out_memory");
    1810           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1811           0 :                 return tevent_req_post(req, ev);
    1812             :         }
    1813             : 
    1814             :         /* make a temporary copy, that we pass to the dispatch function */
    1815           0 :         state->tmp = state->orig;
    1816             : 
    1817           0 :         subreq = dcerpc_netr_DatabaseDeltas_r_send(state, ev, h, &state->tmp);
    1818           0 :         if (tevent_req_nomem(subreq, req)) {
    1819           0 :                 return tevent_req_post(req, ev);
    1820             :         }
    1821           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DatabaseDeltas_done, req);
    1822           0 :         return req;
    1823             : }
    1824             : 
    1825           0 : static void dcerpc_netr_DatabaseDeltas_done(struct tevent_req *subreq)
    1826             : {
    1827           0 :         struct tevent_req *req = tevent_req_callback_data(
    1828             :                 subreq, struct tevent_req);
    1829           0 :         struct dcerpc_netr_DatabaseDeltas_state *state = tevent_req_data(
    1830             :                 req, struct dcerpc_netr_DatabaseDeltas_state);
    1831             :         NTSTATUS status;
    1832             :         TALLOC_CTX *mem_ctx;
    1833             : 
    1834           0 :         if (state->out_mem_ctx) {
    1835           0 :                 mem_ctx = state->out_mem_ctx;
    1836             :         } else {
    1837           0 :                 mem_ctx = state;
    1838             :         }
    1839             : 
    1840           0 :         status = dcerpc_netr_DatabaseDeltas_r_recv(subreq, mem_ctx);
    1841           0 :         TALLOC_FREE(subreq);
    1842           0 :         if (tevent_req_nterror(req, status)) {
    1843           0 :                 return;
    1844             :         }
    1845             : 
    1846             :         /* Copy out parameters */
    1847           0 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    1848           0 :         *state->orig.out.sequence_num = *state->tmp.out.sequence_num;
    1849           0 :         *state->orig.out.delta_enum_array = *state->tmp.out.delta_enum_array;
    1850             : 
    1851             :         /* Copy result */
    1852           0 :         state->orig.out.result = state->tmp.out.result;
    1853             : 
    1854             :         /* Reset temporary structure */
    1855           0 :         NDR_ZERO_STRUCT(state->tmp);
    1856             : 
    1857           0 :         tevent_req_done(req);
    1858             : }
    1859             : 
    1860           0 : NTSTATUS dcerpc_netr_DatabaseDeltas_recv(struct tevent_req *req,
    1861             :                                          TALLOC_CTX *mem_ctx,
    1862             :                                          NTSTATUS *result)
    1863             : {
    1864           0 :         struct dcerpc_netr_DatabaseDeltas_state *state = tevent_req_data(
    1865             :                 req, struct dcerpc_netr_DatabaseDeltas_state);
    1866             :         NTSTATUS status;
    1867             : 
    1868           0 :         if (tevent_req_is_nterror(req, &status)) {
    1869           0 :                 tevent_req_received(req);
    1870           0 :                 return status;
    1871             :         }
    1872             : 
    1873             :         /* Steal possible out parameters to the callers context */
    1874           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1875             : 
    1876             :         /* Return result */
    1877           0 :         *result = state->orig.out.result;
    1878             : 
    1879           0 :         tevent_req_received(req);
    1880           0 :         return NT_STATUS_OK;
    1881             : }
    1882             : 
    1883           0 : NTSTATUS dcerpc_netr_DatabaseDeltas(struct dcerpc_binding_handle *h,
    1884             :                                     TALLOC_CTX *mem_ctx,
    1885             :                                     const char *_logon_server /* [in] [charset(UTF16),ref] */,
    1886             :                                     const char *_computername /* [in] [charset(UTF16),ref] */,
    1887             :                                     struct netr_Authenticator *_credential /* [in] [ref] */,
    1888             :                                     struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    1889             :                                     enum netr_SamDatabaseID _database_id /* [in]  */,
    1890             :                                     uint64_t *_sequence_num /* [in,out] [ref] */,
    1891             :                                     struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */,
    1892             :                                     uint32_t _preferredmaximumlength /* [in]  */,
    1893             :                                     NTSTATUS *result)
    1894             : {
    1895             :         struct netr_DatabaseDeltas r;
    1896             :         NTSTATUS status;
    1897             : 
    1898             :         /* In parameters */
    1899           0 :         r.in.logon_server = _logon_server;
    1900           0 :         r.in.computername = _computername;
    1901           0 :         r.in.credential = _credential;
    1902           0 :         r.in.return_authenticator = _return_authenticator;
    1903           0 :         r.in.database_id = _database_id;
    1904           0 :         r.in.sequence_num = _sequence_num;
    1905           0 :         r.in.preferredmaximumlength = _preferredmaximumlength;
    1906             : 
    1907             :         /* Out parameters */
    1908           0 :         r.out.return_authenticator = _return_authenticator;
    1909           0 :         r.out.sequence_num = _sequence_num;
    1910           0 :         r.out.delta_enum_array = _delta_enum_array;
    1911             : 
    1912             :         /* Result */
    1913           0 :         NDR_ZERO_STRUCT(r.out.result);
    1914             : 
    1915           0 :         status = dcerpc_netr_DatabaseDeltas_r(h, mem_ctx, &r);
    1916           0 :         if (!NT_STATUS_IS_OK(status)) {
    1917           0 :                 return status;
    1918             :         }
    1919             : 
    1920             :         /* Return variables */
    1921           0 :         *_return_authenticator = *r.out.return_authenticator;
    1922           0 :         *_sequence_num = *r.out.sequence_num;
    1923           0 :         *_delta_enum_array = *r.out.delta_enum_array;
    1924             : 
    1925             :         /* Return result */
    1926           0 :         *result = r.out.result;
    1927             : 
    1928           0 :         return NT_STATUS_OK;
    1929             : }
    1930             : 
    1931             : struct dcerpc_netr_DatabaseSync_r_state {
    1932             :         TALLOC_CTX *out_mem_ctx;
    1933             : };
    1934             : 
    1935             : static void dcerpc_netr_DatabaseSync_r_done(struct tevent_req *subreq);
    1936             : 
    1937           0 : struct tevent_req *dcerpc_netr_DatabaseSync_r_send(TALLOC_CTX *mem_ctx,
    1938             :         struct tevent_context *ev,
    1939             :         struct dcerpc_binding_handle *h,
    1940             :         struct netr_DatabaseSync *r)
    1941             : {
    1942             :         struct tevent_req *req;
    1943             :         struct dcerpc_netr_DatabaseSync_r_state *state;
    1944             :         struct tevent_req *subreq;
    1945             : 
    1946           0 :         req = tevent_req_create(mem_ctx, &state,
    1947             :                                 struct dcerpc_netr_DatabaseSync_r_state);
    1948           0 :         if (req == NULL) {
    1949           0 :                 return NULL;
    1950             :         }
    1951             : 
    1952           0 :         state->out_mem_ctx = talloc_new(state);
    1953           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1954           0 :                 return tevent_req_post(req, ev);
    1955             :         }
    1956             : 
    1957           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1958             :                         NULL, &ndr_table_netlogon,
    1959           0 :                         NDR_NETR_DATABASESYNC, state->out_mem_ctx, r);
    1960           0 :         if (tevent_req_nomem(subreq, req)) {
    1961           0 :                 return tevent_req_post(req, ev);
    1962             :         }
    1963           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DatabaseSync_r_done, req);
    1964             : 
    1965           0 :         return req;
    1966             : }
    1967             : 
    1968           0 : static void dcerpc_netr_DatabaseSync_r_done(struct tevent_req *subreq)
    1969             : {
    1970           0 :         struct tevent_req *req =
    1971           0 :                 tevent_req_callback_data(subreq,
    1972             :                 struct tevent_req);
    1973             :         NTSTATUS status;
    1974             : 
    1975           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1976           0 :         TALLOC_FREE(subreq);
    1977           0 :         if (tevent_req_nterror(req, status)) {
    1978           0 :                 return;
    1979             :         }
    1980             : 
    1981           0 :         tevent_req_done(req);
    1982             : }
    1983             : 
    1984           0 : NTSTATUS dcerpc_netr_DatabaseSync_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1985             : {
    1986           0 :         struct dcerpc_netr_DatabaseSync_r_state *state =
    1987           0 :                 tevent_req_data(req,
    1988             :                 struct dcerpc_netr_DatabaseSync_r_state);
    1989             :         NTSTATUS status;
    1990             : 
    1991           0 :         if (tevent_req_is_nterror(req, &status)) {
    1992           0 :                 tevent_req_received(req);
    1993           0 :                 return status;
    1994             :         }
    1995             : 
    1996           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1997             : 
    1998           0 :         tevent_req_received(req);
    1999           0 :         return NT_STATUS_OK;
    2000             : }
    2001             : 
    2002          18 : NTSTATUS dcerpc_netr_DatabaseSync_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_DatabaseSync *r)
    2003             : {
    2004             :         NTSTATUS status;
    2005             : 
    2006          18 :         status = dcerpc_binding_handle_call(h,
    2007             :                         NULL, &ndr_table_netlogon,
    2008             :                         NDR_NETR_DATABASESYNC, mem_ctx, r);
    2009             : 
    2010          18 :         return status;
    2011             : }
    2012             : 
    2013             : struct dcerpc_netr_DatabaseSync_state {
    2014             :         struct netr_DatabaseSync orig;
    2015             :         struct netr_DatabaseSync tmp;
    2016             :         TALLOC_CTX *out_mem_ctx;
    2017             : };
    2018             : 
    2019             : static void dcerpc_netr_DatabaseSync_done(struct tevent_req *subreq);
    2020             : 
    2021           0 : struct tevent_req *dcerpc_netr_DatabaseSync_send(TALLOC_CTX *mem_ctx,
    2022             :                                                  struct tevent_context *ev,
    2023             :                                                  struct dcerpc_binding_handle *h,
    2024             :                                                  const char *_logon_server /* [in] [charset(UTF16),ref] */,
    2025             :                                                  const char *_computername /* [in] [charset(UTF16),ref] */,
    2026             :                                                  struct netr_Authenticator *_credential /* [in] [ref] */,
    2027             :                                                  struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    2028             :                                                  enum netr_SamDatabaseID _database_id /* [in]  */,
    2029             :                                                  uint32_t *_sync_context /* [in,out] [ref] */,
    2030             :                                                  struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */,
    2031             :                                                  uint32_t _preferredmaximumlength /* [in]  */)
    2032             : {
    2033             :         struct tevent_req *req;
    2034             :         struct dcerpc_netr_DatabaseSync_state *state;
    2035             :         struct tevent_req *subreq;
    2036             : 
    2037           0 :         req = tevent_req_create(mem_ctx, &state,
    2038             :                                 struct dcerpc_netr_DatabaseSync_state);
    2039           0 :         if (req == NULL) {
    2040           0 :                 return NULL;
    2041             :         }
    2042           0 :         state->out_mem_ctx = NULL;
    2043             : 
    2044             :         /* In parameters */
    2045           0 :         state->orig.in.logon_server = _logon_server;
    2046           0 :         state->orig.in.computername = _computername;
    2047           0 :         state->orig.in.credential = _credential;
    2048           0 :         state->orig.in.return_authenticator = _return_authenticator;
    2049           0 :         state->orig.in.database_id = _database_id;
    2050           0 :         state->orig.in.sync_context = _sync_context;
    2051           0 :         state->orig.in.preferredmaximumlength = _preferredmaximumlength;
    2052             : 
    2053             :         /* Out parameters */
    2054           0 :         state->orig.out.return_authenticator = _return_authenticator;
    2055           0 :         state->orig.out.sync_context = _sync_context;
    2056           0 :         state->orig.out.delta_enum_array = _delta_enum_array;
    2057             : 
    2058             :         /* Result */
    2059           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2060             : 
    2061           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2062             :                              "dcerpc_netr_DatabaseSync_out_memory");
    2063           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2064           0 :                 return tevent_req_post(req, ev);
    2065             :         }
    2066             : 
    2067             :         /* make a temporary copy, that we pass to the dispatch function */
    2068           0 :         state->tmp = state->orig;
    2069             : 
    2070           0 :         subreq = dcerpc_netr_DatabaseSync_r_send(state, ev, h, &state->tmp);
    2071           0 :         if (tevent_req_nomem(subreq, req)) {
    2072           0 :                 return tevent_req_post(req, ev);
    2073             :         }
    2074           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DatabaseSync_done, req);
    2075           0 :         return req;
    2076             : }
    2077             : 
    2078           0 : static void dcerpc_netr_DatabaseSync_done(struct tevent_req *subreq)
    2079             : {
    2080           0 :         struct tevent_req *req = tevent_req_callback_data(
    2081             :                 subreq, struct tevent_req);
    2082           0 :         struct dcerpc_netr_DatabaseSync_state *state = tevent_req_data(
    2083             :                 req, struct dcerpc_netr_DatabaseSync_state);
    2084             :         NTSTATUS status;
    2085             :         TALLOC_CTX *mem_ctx;
    2086             : 
    2087           0 :         if (state->out_mem_ctx) {
    2088           0 :                 mem_ctx = state->out_mem_ctx;
    2089             :         } else {
    2090           0 :                 mem_ctx = state;
    2091             :         }
    2092             : 
    2093           0 :         status = dcerpc_netr_DatabaseSync_r_recv(subreq, mem_ctx);
    2094           0 :         TALLOC_FREE(subreq);
    2095           0 :         if (tevent_req_nterror(req, status)) {
    2096           0 :                 return;
    2097             :         }
    2098             : 
    2099             :         /* Copy out parameters */
    2100           0 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    2101           0 :         *state->orig.out.sync_context = *state->tmp.out.sync_context;
    2102           0 :         *state->orig.out.delta_enum_array = *state->tmp.out.delta_enum_array;
    2103             : 
    2104             :         /* Copy result */
    2105           0 :         state->orig.out.result = state->tmp.out.result;
    2106             : 
    2107             :         /* Reset temporary structure */
    2108           0 :         NDR_ZERO_STRUCT(state->tmp);
    2109             : 
    2110           0 :         tevent_req_done(req);
    2111             : }
    2112             : 
    2113           0 : NTSTATUS dcerpc_netr_DatabaseSync_recv(struct tevent_req *req,
    2114             :                                        TALLOC_CTX *mem_ctx,
    2115             :                                        NTSTATUS *result)
    2116             : {
    2117           0 :         struct dcerpc_netr_DatabaseSync_state *state = tevent_req_data(
    2118             :                 req, struct dcerpc_netr_DatabaseSync_state);
    2119             :         NTSTATUS status;
    2120             : 
    2121           0 :         if (tevent_req_is_nterror(req, &status)) {
    2122           0 :                 tevent_req_received(req);
    2123           0 :                 return status;
    2124             :         }
    2125             : 
    2126             :         /* Steal possible out parameters to the callers context */
    2127           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2128             : 
    2129             :         /* Return result */
    2130           0 :         *result = state->orig.out.result;
    2131             : 
    2132           0 :         tevent_req_received(req);
    2133           0 :         return NT_STATUS_OK;
    2134             : }
    2135             : 
    2136           0 : NTSTATUS dcerpc_netr_DatabaseSync(struct dcerpc_binding_handle *h,
    2137             :                                   TALLOC_CTX *mem_ctx,
    2138             :                                   const char *_logon_server /* [in] [charset(UTF16),ref] */,
    2139             :                                   const char *_computername /* [in] [charset(UTF16),ref] */,
    2140             :                                   struct netr_Authenticator *_credential /* [in] [ref] */,
    2141             :                                   struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    2142             :                                   enum netr_SamDatabaseID _database_id /* [in]  */,
    2143             :                                   uint32_t *_sync_context /* [in,out] [ref] */,
    2144             :                                   struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */,
    2145             :                                   uint32_t _preferredmaximumlength /* [in]  */,
    2146             :                                   NTSTATUS *result)
    2147             : {
    2148             :         struct netr_DatabaseSync r;
    2149             :         NTSTATUS status;
    2150             : 
    2151             :         /* In parameters */
    2152           0 :         r.in.logon_server = _logon_server;
    2153           0 :         r.in.computername = _computername;
    2154           0 :         r.in.credential = _credential;
    2155           0 :         r.in.return_authenticator = _return_authenticator;
    2156           0 :         r.in.database_id = _database_id;
    2157           0 :         r.in.sync_context = _sync_context;
    2158           0 :         r.in.preferredmaximumlength = _preferredmaximumlength;
    2159             : 
    2160             :         /* Out parameters */
    2161           0 :         r.out.return_authenticator = _return_authenticator;
    2162           0 :         r.out.sync_context = _sync_context;
    2163           0 :         r.out.delta_enum_array = _delta_enum_array;
    2164             : 
    2165             :         /* Result */
    2166           0 :         NDR_ZERO_STRUCT(r.out.result);
    2167             : 
    2168           0 :         status = dcerpc_netr_DatabaseSync_r(h, mem_ctx, &r);
    2169           0 :         if (!NT_STATUS_IS_OK(status)) {
    2170           0 :                 return status;
    2171             :         }
    2172             : 
    2173             :         /* Return variables */
    2174           0 :         *_return_authenticator = *r.out.return_authenticator;
    2175           0 :         *_sync_context = *r.out.sync_context;
    2176           0 :         *_delta_enum_array = *r.out.delta_enum_array;
    2177             : 
    2178             :         /* Return result */
    2179           0 :         *result = r.out.result;
    2180             : 
    2181           0 :         return NT_STATUS_OK;
    2182             : }
    2183             : 
    2184             : struct dcerpc_netr_AccountDeltas_r_state {
    2185             :         TALLOC_CTX *out_mem_ctx;
    2186             : };
    2187             : 
    2188             : static void dcerpc_netr_AccountDeltas_r_done(struct tevent_req *subreq);
    2189             : 
    2190           0 : struct tevent_req *dcerpc_netr_AccountDeltas_r_send(TALLOC_CTX *mem_ctx,
    2191             :         struct tevent_context *ev,
    2192             :         struct dcerpc_binding_handle *h,
    2193             :         struct netr_AccountDeltas *r)
    2194             : {
    2195             :         struct tevent_req *req;
    2196             :         struct dcerpc_netr_AccountDeltas_r_state *state;
    2197             :         struct tevent_req *subreq;
    2198             : 
    2199           0 :         req = tevent_req_create(mem_ctx, &state,
    2200             :                                 struct dcerpc_netr_AccountDeltas_r_state);
    2201           0 :         if (req == NULL) {
    2202           0 :                 return NULL;
    2203             :         }
    2204             : 
    2205           0 :         state->out_mem_ctx = talloc_new(state);
    2206           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2207           0 :                 return tevent_req_post(req, ev);
    2208             :         }
    2209             : 
    2210           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2211             :                         NULL, &ndr_table_netlogon,
    2212           0 :                         NDR_NETR_ACCOUNTDELTAS, state->out_mem_ctx, r);
    2213           0 :         if (tevent_req_nomem(subreq, req)) {
    2214           0 :                 return tevent_req_post(req, ev);
    2215             :         }
    2216           0 :         tevent_req_set_callback(subreq, dcerpc_netr_AccountDeltas_r_done, req);
    2217             : 
    2218           0 :         return req;
    2219             : }
    2220             : 
    2221           0 : static void dcerpc_netr_AccountDeltas_r_done(struct tevent_req *subreq)
    2222             : {
    2223           0 :         struct tevent_req *req =
    2224           0 :                 tevent_req_callback_data(subreq,
    2225             :                 struct tevent_req);
    2226             :         NTSTATUS status;
    2227             : 
    2228           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2229           0 :         TALLOC_FREE(subreq);
    2230           0 :         if (tevent_req_nterror(req, status)) {
    2231           0 :                 return;
    2232             :         }
    2233             : 
    2234           0 :         tevent_req_done(req);
    2235             : }
    2236             : 
    2237           0 : NTSTATUS dcerpc_netr_AccountDeltas_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2238             : {
    2239           0 :         struct dcerpc_netr_AccountDeltas_r_state *state =
    2240           0 :                 tevent_req_data(req,
    2241             :                 struct dcerpc_netr_AccountDeltas_r_state);
    2242             :         NTSTATUS status;
    2243             : 
    2244           0 :         if (tevent_req_is_nterror(req, &status)) {
    2245           0 :                 tevent_req_received(req);
    2246           0 :                 return status;
    2247             :         }
    2248             : 
    2249           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2250             : 
    2251           0 :         tevent_req_received(req);
    2252           0 :         return NT_STATUS_OK;
    2253             : }
    2254             : 
    2255          18 : NTSTATUS dcerpc_netr_AccountDeltas_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_AccountDeltas *r)
    2256             : {
    2257             :         NTSTATUS status;
    2258             : 
    2259          18 :         status = dcerpc_binding_handle_call(h,
    2260             :                         NULL, &ndr_table_netlogon,
    2261             :                         NDR_NETR_ACCOUNTDELTAS, mem_ctx, r);
    2262             : 
    2263          18 :         return status;
    2264             : }
    2265             : 
    2266             : struct dcerpc_netr_AccountDeltas_state {
    2267             :         struct netr_AccountDeltas orig;
    2268             :         struct netr_AccountDeltas tmp;
    2269             :         TALLOC_CTX *out_mem_ctx;
    2270             : };
    2271             : 
    2272             : static void dcerpc_netr_AccountDeltas_done(struct tevent_req *subreq);
    2273             : 
    2274           0 : struct tevent_req *dcerpc_netr_AccountDeltas_send(TALLOC_CTX *mem_ctx,
    2275             :                                                   struct tevent_context *ev,
    2276             :                                                   struct dcerpc_binding_handle *h,
    2277             :                                                   const char *_logon_server /* [in] [charset(UTF16),unique] */,
    2278             :                                                   const char *_computername /* [in] [charset(UTF16),ref] */,
    2279             :                                                   struct netr_Authenticator _credential /* [in]  */,
    2280             :                                                   struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    2281             :                                                   struct netr_UAS_INFO_0 _uas /* [in]  */,
    2282             :                                                   uint32_t _count /* [in]  */,
    2283             :                                                   uint32_t _level /* [in]  */,
    2284             :                                                   uint32_t _buffersize /* [in]  */,
    2285             :                                                   struct netr_AccountBuffer *_buffer /* [out] [ref,subcontext(4)] */,
    2286             :                                                   uint32_t *_count_returned /* [out] [ref] */,
    2287             :                                                   uint32_t *_total_entries /* [out] [ref] */,
    2288             :                                                   struct netr_UAS_INFO_0 *_recordid /* [out] [ref] */)
    2289             : {
    2290             :         struct tevent_req *req;
    2291             :         struct dcerpc_netr_AccountDeltas_state *state;
    2292             :         struct tevent_req *subreq;
    2293             : 
    2294           0 :         req = tevent_req_create(mem_ctx, &state,
    2295             :                                 struct dcerpc_netr_AccountDeltas_state);
    2296           0 :         if (req == NULL) {
    2297           0 :                 return NULL;
    2298             :         }
    2299           0 :         state->out_mem_ctx = NULL;
    2300             : 
    2301             :         /* In parameters */
    2302           0 :         state->orig.in.logon_server = _logon_server;
    2303           0 :         state->orig.in.computername = _computername;
    2304           0 :         state->orig.in.credential = _credential;
    2305           0 :         state->orig.in.return_authenticator = _return_authenticator;
    2306           0 :         state->orig.in.uas = _uas;
    2307           0 :         state->orig.in.count = _count;
    2308           0 :         state->orig.in.level = _level;
    2309           0 :         state->orig.in.buffersize = _buffersize;
    2310             : 
    2311             :         /* Out parameters */
    2312           0 :         state->orig.out.return_authenticator = _return_authenticator;
    2313           0 :         state->orig.out.buffer = _buffer;
    2314           0 :         state->orig.out.count_returned = _count_returned;
    2315           0 :         state->orig.out.total_entries = _total_entries;
    2316           0 :         state->orig.out.recordid = _recordid;
    2317             : 
    2318             :         /* Result */
    2319           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2320             : 
    2321           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2322             :                              "dcerpc_netr_AccountDeltas_out_memory");
    2323           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2324           0 :                 return tevent_req_post(req, ev);
    2325             :         }
    2326             : 
    2327             :         /* make a temporary copy, that we pass to the dispatch function */
    2328           0 :         state->tmp = state->orig;
    2329             : 
    2330           0 :         subreq = dcerpc_netr_AccountDeltas_r_send(state, ev, h, &state->tmp);
    2331           0 :         if (tevent_req_nomem(subreq, req)) {
    2332           0 :                 return tevent_req_post(req, ev);
    2333             :         }
    2334           0 :         tevent_req_set_callback(subreq, dcerpc_netr_AccountDeltas_done, req);
    2335           0 :         return req;
    2336             : }
    2337             : 
    2338           0 : static void dcerpc_netr_AccountDeltas_done(struct tevent_req *subreq)
    2339             : {
    2340           0 :         struct tevent_req *req = tevent_req_callback_data(
    2341             :                 subreq, struct tevent_req);
    2342           0 :         struct dcerpc_netr_AccountDeltas_state *state = tevent_req_data(
    2343             :                 req, struct dcerpc_netr_AccountDeltas_state);
    2344             :         NTSTATUS status;
    2345             :         TALLOC_CTX *mem_ctx;
    2346             : 
    2347           0 :         if (state->out_mem_ctx) {
    2348           0 :                 mem_ctx = state->out_mem_ctx;
    2349             :         } else {
    2350           0 :                 mem_ctx = state;
    2351             :         }
    2352             : 
    2353           0 :         status = dcerpc_netr_AccountDeltas_r_recv(subreq, mem_ctx);
    2354           0 :         TALLOC_FREE(subreq);
    2355           0 :         if (tevent_req_nterror(req, status)) {
    2356           0 :                 return;
    2357             :         }
    2358             : 
    2359             :         /* Copy out parameters */
    2360           0 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    2361           0 :         *state->orig.out.buffer = *state->tmp.out.buffer;
    2362           0 :         *state->orig.out.count_returned = *state->tmp.out.count_returned;
    2363           0 :         *state->orig.out.total_entries = *state->tmp.out.total_entries;
    2364           0 :         *state->orig.out.recordid = *state->tmp.out.recordid;
    2365             : 
    2366             :         /* Copy result */
    2367           0 :         state->orig.out.result = state->tmp.out.result;
    2368             : 
    2369             :         /* Reset temporary structure */
    2370           0 :         NDR_ZERO_STRUCT(state->tmp);
    2371             : 
    2372           0 :         tevent_req_done(req);
    2373             : }
    2374             : 
    2375           0 : NTSTATUS dcerpc_netr_AccountDeltas_recv(struct tevent_req *req,
    2376             :                                         TALLOC_CTX *mem_ctx,
    2377             :                                         NTSTATUS *result)
    2378             : {
    2379           0 :         struct dcerpc_netr_AccountDeltas_state *state = tevent_req_data(
    2380             :                 req, struct dcerpc_netr_AccountDeltas_state);
    2381             :         NTSTATUS status;
    2382             : 
    2383           0 :         if (tevent_req_is_nterror(req, &status)) {
    2384           0 :                 tevent_req_received(req);
    2385           0 :                 return status;
    2386             :         }
    2387             : 
    2388             :         /* Steal possible out parameters to the callers context */
    2389           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2390             : 
    2391             :         /* Return result */
    2392           0 :         *result = state->orig.out.result;
    2393             : 
    2394           0 :         tevent_req_received(req);
    2395           0 :         return NT_STATUS_OK;
    2396             : }
    2397             : 
    2398           0 : NTSTATUS dcerpc_netr_AccountDeltas(struct dcerpc_binding_handle *h,
    2399             :                                    TALLOC_CTX *mem_ctx,
    2400             :                                    const char *_logon_server /* [in] [charset(UTF16),unique] */,
    2401             :                                    const char *_computername /* [in] [charset(UTF16),ref] */,
    2402             :                                    struct netr_Authenticator _credential /* [in]  */,
    2403             :                                    struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    2404             :                                    struct netr_UAS_INFO_0 _uas /* [in]  */,
    2405             :                                    uint32_t _count /* [in]  */,
    2406             :                                    uint32_t _level /* [in]  */,
    2407             :                                    uint32_t _buffersize /* [in]  */,
    2408             :                                    struct netr_AccountBuffer *_buffer /* [out] [ref,subcontext(4)] */,
    2409             :                                    uint32_t *_count_returned /* [out] [ref] */,
    2410             :                                    uint32_t *_total_entries /* [out] [ref] */,
    2411             :                                    struct netr_UAS_INFO_0 *_recordid /* [out] [ref] */,
    2412             :                                    NTSTATUS *result)
    2413             : {
    2414             :         struct netr_AccountDeltas r;
    2415             :         NTSTATUS status;
    2416             : 
    2417             :         /* In parameters */
    2418           0 :         r.in.logon_server = _logon_server;
    2419           0 :         r.in.computername = _computername;
    2420           0 :         r.in.credential = _credential;
    2421           0 :         r.in.return_authenticator = _return_authenticator;
    2422           0 :         r.in.uas = _uas;
    2423           0 :         r.in.count = _count;
    2424           0 :         r.in.level = _level;
    2425           0 :         r.in.buffersize = _buffersize;
    2426             : 
    2427             :         /* Out parameters */
    2428           0 :         r.out.return_authenticator = _return_authenticator;
    2429           0 :         r.out.buffer = _buffer;
    2430           0 :         r.out.count_returned = _count_returned;
    2431           0 :         r.out.total_entries = _total_entries;
    2432           0 :         r.out.recordid = _recordid;
    2433             : 
    2434             :         /* Result */
    2435           0 :         NDR_ZERO_STRUCT(r.out.result);
    2436             : 
    2437           0 :         status = dcerpc_netr_AccountDeltas_r(h, mem_ctx, &r);
    2438           0 :         if (!NT_STATUS_IS_OK(status)) {
    2439           0 :                 return status;
    2440             :         }
    2441             : 
    2442             :         /* Return variables */
    2443           0 :         *_return_authenticator = *r.out.return_authenticator;
    2444           0 :         *_buffer = *r.out.buffer;
    2445           0 :         *_count_returned = *r.out.count_returned;
    2446           0 :         *_total_entries = *r.out.total_entries;
    2447           0 :         *_recordid = *r.out.recordid;
    2448             : 
    2449             :         /* Return result */
    2450           0 :         *result = r.out.result;
    2451             : 
    2452           0 :         return NT_STATUS_OK;
    2453             : }
    2454             : 
    2455             : struct dcerpc_netr_AccountSync_r_state {
    2456             :         TALLOC_CTX *out_mem_ctx;
    2457             : };
    2458             : 
    2459             : static void dcerpc_netr_AccountSync_r_done(struct tevent_req *subreq);
    2460             : 
    2461           0 : struct tevent_req *dcerpc_netr_AccountSync_r_send(TALLOC_CTX *mem_ctx,
    2462             :         struct tevent_context *ev,
    2463             :         struct dcerpc_binding_handle *h,
    2464             :         struct netr_AccountSync *r)
    2465             : {
    2466             :         struct tevent_req *req;
    2467             :         struct dcerpc_netr_AccountSync_r_state *state;
    2468             :         struct tevent_req *subreq;
    2469             : 
    2470           0 :         req = tevent_req_create(mem_ctx, &state,
    2471             :                                 struct dcerpc_netr_AccountSync_r_state);
    2472           0 :         if (req == NULL) {
    2473           0 :                 return NULL;
    2474             :         }
    2475             : 
    2476           0 :         state->out_mem_ctx = talloc_new(state);
    2477           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2478           0 :                 return tevent_req_post(req, ev);
    2479             :         }
    2480             : 
    2481           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2482             :                         NULL, &ndr_table_netlogon,
    2483           0 :                         NDR_NETR_ACCOUNTSYNC, state->out_mem_ctx, r);
    2484           0 :         if (tevent_req_nomem(subreq, req)) {
    2485           0 :                 return tevent_req_post(req, ev);
    2486             :         }
    2487           0 :         tevent_req_set_callback(subreq, dcerpc_netr_AccountSync_r_done, req);
    2488             : 
    2489           0 :         return req;
    2490             : }
    2491             : 
    2492           0 : static void dcerpc_netr_AccountSync_r_done(struct tevent_req *subreq)
    2493             : {
    2494           0 :         struct tevent_req *req =
    2495           0 :                 tevent_req_callback_data(subreq,
    2496             :                 struct tevent_req);
    2497             :         NTSTATUS status;
    2498             : 
    2499           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2500           0 :         TALLOC_FREE(subreq);
    2501           0 :         if (tevent_req_nterror(req, status)) {
    2502           0 :                 return;
    2503             :         }
    2504             : 
    2505           0 :         tevent_req_done(req);
    2506             : }
    2507             : 
    2508           0 : NTSTATUS dcerpc_netr_AccountSync_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2509             : {
    2510           0 :         struct dcerpc_netr_AccountSync_r_state *state =
    2511           0 :                 tevent_req_data(req,
    2512             :                 struct dcerpc_netr_AccountSync_r_state);
    2513             :         NTSTATUS status;
    2514             : 
    2515           0 :         if (tevent_req_is_nterror(req, &status)) {
    2516           0 :                 tevent_req_received(req);
    2517           0 :                 return status;
    2518             :         }
    2519             : 
    2520           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2521             : 
    2522           0 :         tevent_req_received(req);
    2523           0 :         return NT_STATUS_OK;
    2524             : }
    2525             : 
    2526          18 : NTSTATUS dcerpc_netr_AccountSync_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_AccountSync *r)
    2527             : {
    2528             :         NTSTATUS status;
    2529             : 
    2530          18 :         status = dcerpc_binding_handle_call(h,
    2531             :                         NULL, &ndr_table_netlogon,
    2532             :                         NDR_NETR_ACCOUNTSYNC, mem_ctx, r);
    2533             : 
    2534          18 :         return status;
    2535             : }
    2536             : 
    2537             : struct dcerpc_netr_AccountSync_state {
    2538             :         struct netr_AccountSync orig;
    2539             :         struct netr_AccountSync tmp;
    2540             :         TALLOC_CTX *out_mem_ctx;
    2541             : };
    2542             : 
    2543             : static void dcerpc_netr_AccountSync_done(struct tevent_req *subreq);
    2544             : 
    2545           0 : struct tevent_req *dcerpc_netr_AccountSync_send(TALLOC_CTX *mem_ctx,
    2546             :                                                 struct tevent_context *ev,
    2547             :                                                 struct dcerpc_binding_handle *h,
    2548             :                                                 const char *_logon_server /* [in] [charset(UTF16),unique] */,
    2549             :                                                 const char *_computername /* [in] [charset(UTF16),ref] */,
    2550             :                                                 struct netr_Authenticator _credential /* [in]  */,
    2551             :                                                 struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    2552             :                                                 uint32_t _reference /* [in]  */,
    2553             :                                                 uint32_t _level /* [in]  */,
    2554             :                                                 uint32_t _buffersize /* [in]  */,
    2555             :                                                 struct netr_AccountBuffer *_buffer /* [out] [ref,subcontext(4)] */,
    2556             :                                                 uint32_t *_count_returned /* [out] [ref] */,
    2557             :                                                 uint32_t *_total_entries /* [out] [ref] */,
    2558             :                                                 uint32_t *_next_reference /* [out] [ref] */,
    2559             :                                                 struct netr_UAS_INFO_0 *_recordid /* [in,out] [ref] */)
    2560             : {
    2561             :         struct tevent_req *req;
    2562             :         struct dcerpc_netr_AccountSync_state *state;
    2563             :         struct tevent_req *subreq;
    2564             : 
    2565           0 :         req = tevent_req_create(mem_ctx, &state,
    2566             :                                 struct dcerpc_netr_AccountSync_state);
    2567           0 :         if (req == NULL) {
    2568           0 :                 return NULL;
    2569             :         }
    2570           0 :         state->out_mem_ctx = NULL;
    2571             : 
    2572             :         /* In parameters */
    2573           0 :         state->orig.in.logon_server = _logon_server;
    2574           0 :         state->orig.in.computername = _computername;
    2575           0 :         state->orig.in.credential = _credential;
    2576           0 :         state->orig.in.return_authenticator = _return_authenticator;
    2577           0 :         state->orig.in.reference = _reference;
    2578           0 :         state->orig.in.level = _level;
    2579           0 :         state->orig.in.buffersize = _buffersize;
    2580           0 :         state->orig.in.recordid = _recordid;
    2581             : 
    2582             :         /* Out parameters */
    2583           0 :         state->orig.out.return_authenticator = _return_authenticator;
    2584           0 :         state->orig.out.buffer = _buffer;
    2585           0 :         state->orig.out.count_returned = _count_returned;
    2586           0 :         state->orig.out.total_entries = _total_entries;
    2587           0 :         state->orig.out.next_reference = _next_reference;
    2588           0 :         state->orig.out.recordid = _recordid;
    2589             : 
    2590             :         /* Result */
    2591           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2592             : 
    2593           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2594             :                              "dcerpc_netr_AccountSync_out_memory");
    2595           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2596           0 :                 return tevent_req_post(req, ev);
    2597             :         }
    2598             : 
    2599             :         /* make a temporary copy, that we pass to the dispatch function */
    2600           0 :         state->tmp = state->orig;
    2601             : 
    2602           0 :         subreq = dcerpc_netr_AccountSync_r_send(state, ev, h, &state->tmp);
    2603           0 :         if (tevent_req_nomem(subreq, req)) {
    2604           0 :                 return tevent_req_post(req, ev);
    2605             :         }
    2606           0 :         tevent_req_set_callback(subreq, dcerpc_netr_AccountSync_done, req);
    2607           0 :         return req;
    2608             : }
    2609             : 
    2610           0 : static void dcerpc_netr_AccountSync_done(struct tevent_req *subreq)
    2611             : {
    2612           0 :         struct tevent_req *req = tevent_req_callback_data(
    2613             :                 subreq, struct tevent_req);
    2614           0 :         struct dcerpc_netr_AccountSync_state *state = tevent_req_data(
    2615             :                 req, struct dcerpc_netr_AccountSync_state);
    2616             :         NTSTATUS status;
    2617             :         TALLOC_CTX *mem_ctx;
    2618             : 
    2619           0 :         if (state->out_mem_ctx) {
    2620           0 :                 mem_ctx = state->out_mem_ctx;
    2621             :         } else {
    2622           0 :                 mem_ctx = state;
    2623             :         }
    2624             : 
    2625           0 :         status = dcerpc_netr_AccountSync_r_recv(subreq, mem_ctx);
    2626           0 :         TALLOC_FREE(subreq);
    2627           0 :         if (tevent_req_nterror(req, status)) {
    2628           0 :                 return;
    2629             :         }
    2630             : 
    2631             :         /* Copy out parameters */
    2632           0 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    2633           0 :         *state->orig.out.buffer = *state->tmp.out.buffer;
    2634           0 :         *state->orig.out.count_returned = *state->tmp.out.count_returned;
    2635           0 :         *state->orig.out.total_entries = *state->tmp.out.total_entries;
    2636           0 :         *state->orig.out.next_reference = *state->tmp.out.next_reference;
    2637           0 :         *state->orig.out.recordid = *state->tmp.out.recordid;
    2638             : 
    2639             :         /* Copy result */
    2640           0 :         state->orig.out.result = state->tmp.out.result;
    2641             : 
    2642             :         /* Reset temporary structure */
    2643           0 :         NDR_ZERO_STRUCT(state->tmp);
    2644             : 
    2645           0 :         tevent_req_done(req);
    2646             : }
    2647             : 
    2648           0 : NTSTATUS dcerpc_netr_AccountSync_recv(struct tevent_req *req,
    2649             :                                       TALLOC_CTX *mem_ctx,
    2650             :                                       NTSTATUS *result)
    2651             : {
    2652           0 :         struct dcerpc_netr_AccountSync_state *state = tevent_req_data(
    2653             :                 req, struct dcerpc_netr_AccountSync_state);
    2654             :         NTSTATUS status;
    2655             : 
    2656           0 :         if (tevent_req_is_nterror(req, &status)) {
    2657           0 :                 tevent_req_received(req);
    2658           0 :                 return status;
    2659             :         }
    2660             : 
    2661             :         /* Steal possible out parameters to the callers context */
    2662           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2663             : 
    2664             :         /* Return result */
    2665           0 :         *result = state->orig.out.result;
    2666             : 
    2667           0 :         tevent_req_received(req);
    2668           0 :         return NT_STATUS_OK;
    2669             : }
    2670             : 
    2671           0 : NTSTATUS dcerpc_netr_AccountSync(struct dcerpc_binding_handle *h,
    2672             :                                  TALLOC_CTX *mem_ctx,
    2673             :                                  const char *_logon_server /* [in] [charset(UTF16),unique] */,
    2674             :                                  const char *_computername /* [in] [charset(UTF16),ref] */,
    2675             :                                  struct netr_Authenticator _credential /* [in]  */,
    2676             :                                  struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    2677             :                                  uint32_t _reference /* [in]  */,
    2678             :                                  uint32_t _level /* [in]  */,
    2679             :                                  uint32_t _buffersize /* [in]  */,
    2680             :                                  struct netr_AccountBuffer *_buffer /* [out] [ref,subcontext(4)] */,
    2681             :                                  uint32_t *_count_returned /* [out] [ref] */,
    2682             :                                  uint32_t *_total_entries /* [out] [ref] */,
    2683             :                                  uint32_t *_next_reference /* [out] [ref] */,
    2684             :                                  struct netr_UAS_INFO_0 *_recordid /* [in,out] [ref] */,
    2685             :                                  NTSTATUS *result)
    2686             : {
    2687             :         struct netr_AccountSync r;
    2688             :         NTSTATUS status;
    2689             : 
    2690             :         /* In parameters */
    2691           0 :         r.in.logon_server = _logon_server;
    2692           0 :         r.in.computername = _computername;
    2693           0 :         r.in.credential = _credential;
    2694           0 :         r.in.return_authenticator = _return_authenticator;
    2695           0 :         r.in.reference = _reference;
    2696           0 :         r.in.level = _level;
    2697           0 :         r.in.buffersize = _buffersize;
    2698           0 :         r.in.recordid = _recordid;
    2699             : 
    2700             :         /* Out parameters */
    2701           0 :         r.out.return_authenticator = _return_authenticator;
    2702           0 :         r.out.buffer = _buffer;
    2703           0 :         r.out.count_returned = _count_returned;
    2704           0 :         r.out.total_entries = _total_entries;
    2705           0 :         r.out.next_reference = _next_reference;
    2706           0 :         r.out.recordid = _recordid;
    2707             : 
    2708             :         /* Result */
    2709           0 :         NDR_ZERO_STRUCT(r.out.result);
    2710             : 
    2711           0 :         status = dcerpc_netr_AccountSync_r(h, mem_ctx, &r);
    2712           0 :         if (!NT_STATUS_IS_OK(status)) {
    2713           0 :                 return status;
    2714             :         }
    2715             : 
    2716             :         /* Return variables */
    2717           0 :         *_return_authenticator = *r.out.return_authenticator;
    2718           0 :         *_buffer = *r.out.buffer;
    2719           0 :         *_count_returned = *r.out.count_returned;
    2720           0 :         *_total_entries = *r.out.total_entries;
    2721           0 :         *_next_reference = *r.out.next_reference;
    2722           0 :         *_recordid = *r.out.recordid;
    2723             : 
    2724             :         /* Return result */
    2725           0 :         *result = r.out.result;
    2726             : 
    2727           0 :         return NT_STATUS_OK;
    2728             : }
    2729             : 
    2730             : struct dcerpc_netr_GetDcName_r_state {
    2731             :         TALLOC_CTX *out_mem_ctx;
    2732             : };
    2733             : 
    2734             : static void dcerpc_netr_GetDcName_r_done(struct tevent_req *subreq);
    2735             : 
    2736           0 : struct tevent_req *dcerpc_netr_GetDcName_r_send(TALLOC_CTX *mem_ctx,
    2737             :         struct tevent_context *ev,
    2738             :         struct dcerpc_binding_handle *h,
    2739             :         struct netr_GetDcName *r)
    2740             : {
    2741             :         struct tevent_req *req;
    2742             :         struct dcerpc_netr_GetDcName_r_state *state;
    2743             :         struct tevent_req *subreq;
    2744             : 
    2745           0 :         req = tevent_req_create(mem_ctx, &state,
    2746             :                                 struct dcerpc_netr_GetDcName_r_state);
    2747           0 :         if (req == NULL) {
    2748           0 :                 return NULL;
    2749             :         }
    2750             : 
    2751           0 :         state->out_mem_ctx = talloc_new(state);
    2752           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2753           0 :                 return tevent_req_post(req, ev);
    2754             :         }
    2755             : 
    2756           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2757             :                         NULL, &ndr_table_netlogon,
    2758           0 :                         NDR_NETR_GETDCNAME, state->out_mem_ctx, r);
    2759           0 :         if (tevent_req_nomem(subreq, req)) {
    2760           0 :                 return tevent_req_post(req, ev);
    2761             :         }
    2762           0 :         tevent_req_set_callback(subreq, dcerpc_netr_GetDcName_r_done, req);
    2763             : 
    2764           0 :         return req;
    2765             : }
    2766             : 
    2767           0 : static void dcerpc_netr_GetDcName_r_done(struct tevent_req *subreq)
    2768             : {
    2769           0 :         struct tevent_req *req =
    2770           0 :                 tevent_req_callback_data(subreq,
    2771             :                 struct tevent_req);
    2772             :         NTSTATUS status;
    2773             : 
    2774           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2775           0 :         TALLOC_FREE(subreq);
    2776           0 :         if (tevent_req_nterror(req, status)) {
    2777           0 :                 return;
    2778             :         }
    2779             : 
    2780           0 :         tevent_req_done(req);
    2781             : }
    2782             : 
    2783           0 : NTSTATUS dcerpc_netr_GetDcName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2784             : {
    2785           0 :         struct dcerpc_netr_GetDcName_r_state *state =
    2786           0 :                 tevent_req_data(req,
    2787             :                 struct dcerpc_netr_GetDcName_r_state);
    2788             :         NTSTATUS status;
    2789             : 
    2790           0 :         if (tevent_req_is_nterror(req, &status)) {
    2791           0 :                 tevent_req_received(req);
    2792           0 :                 return status;
    2793             :         }
    2794             : 
    2795           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2796             : 
    2797           0 :         tevent_req_received(req);
    2798           0 :         return NT_STATUS_OK;
    2799             : }
    2800             : 
    2801          18 : NTSTATUS dcerpc_netr_GetDcName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_GetDcName *r)
    2802             : {
    2803             :         NTSTATUS status;
    2804             : 
    2805          18 :         status = dcerpc_binding_handle_call(h,
    2806             :                         NULL, &ndr_table_netlogon,
    2807             :                         NDR_NETR_GETDCNAME, mem_ctx, r);
    2808             : 
    2809          18 :         return status;
    2810             : }
    2811             : 
    2812             : struct dcerpc_netr_GetDcName_state {
    2813             :         struct netr_GetDcName orig;
    2814             :         struct netr_GetDcName tmp;
    2815             :         TALLOC_CTX *out_mem_ctx;
    2816             : };
    2817             : 
    2818             : static void dcerpc_netr_GetDcName_done(struct tevent_req *subreq);
    2819             : 
    2820           0 : struct tevent_req *dcerpc_netr_GetDcName_send(TALLOC_CTX *mem_ctx,
    2821             :                                               struct tevent_context *ev,
    2822             :                                               struct dcerpc_binding_handle *h,
    2823             :                                               const char *_logon_server /* [in] [charset(UTF16),ref] */,
    2824             :                                               const char *_domainname /* [in] [charset(UTF16),unique] */,
    2825             :                                               const char **_dcname /* [out] [charset(UTF16),ref] */)
    2826             : {
    2827             :         struct tevent_req *req;
    2828             :         struct dcerpc_netr_GetDcName_state *state;
    2829             :         struct tevent_req *subreq;
    2830             : 
    2831           0 :         req = tevent_req_create(mem_ctx, &state,
    2832             :                                 struct dcerpc_netr_GetDcName_state);
    2833           0 :         if (req == NULL) {
    2834           0 :                 return NULL;
    2835             :         }
    2836           0 :         state->out_mem_ctx = NULL;
    2837             : 
    2838             :         /* In parameters */
    2839           0 :         state->orig.in.logon_server = _logon_server;
    2840           0 :         state->orig.in.domainname = _domainname;
    2841             : 
    2842             :         /* Out parameters */
    2843           0 :         state->orig.out.dcname = _dcname;
    2844             : 
    2845             :         /* Result */
    2846           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2847             : 
    2848           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2849             :                              "dcerpc_netr_GetDcName_out_memory");
    2850           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2851           0 :                 return tevent_req_post(req, ev);
    2852             :         }
    2853             : 
    2854             :         /* make a temporary copy, that we pass to the dispatch function */
    2855           0 :         state->tmp = state->orig;
    2856             : 
    2857           0 :         subreq = dcerpc_netr_GetDcName_r_send(state, ev, h, &state->tmp);
    2858           0 :         if (tevent_req_nomem(subreq, req)) {
    2859           0 :                 return tevent_req_post(req, ev);
    2860             :         }
    2861           0 :         tevent_req_set_callback(subreq, dcerpc_netr_GetDcName_done, req);
    2862           0 :         return req;
    2863             : }
    2864             : 
    2865           0 : static void dcerpc_netr_GetDcName_done(struct tevent_req *subreq)
    2866             : {
    2867           0 :         struct tevent_req *req = tevent_req_callback_data(
    2868             :                 subreq, struct tevent_req);
    2869           0 :         struct dcerpc_netr_GetDcName_state *state = tevent_req_data(
    2870             :                 req, struct dcerpc_netr_GetDcName_state);
    2871             :         NTSTATUS status;
    2872             :         TALLOC_CTX *mem_ctx;
    2873             : 
    2874           0 :         if (state->out_mem_ctx) {
    2875           0 :                 mem_ctx = state->out_mem_ctx;
    2876             :         } else {
    2877           0 :                 mem_ctx = state;
    2878             :         }
    2879             : 
    2880           0 :         status = dcerpc_netr_GetDcName_r_recv(subreq, mem_ctx);
    2881           0 :         TALLOC_FREE(subreq);
    2882           0 :         if (tevent_req_nterror(req, status)) {
    2883           0 :                 return;
    2884             :         }
    2885             : 
    2886             :         /* Copy out parameters */
    2887           0 :         *state->orig.out.dcname = *state->tmp.out.dcname;
    2888             : 
    2889             :         /* Copy result */
    2890           0 :         state->orig.out.result = state->tmp.out.result;
    2891             : 
    2892             :         /* Reset temporary structure */
    2893           0 :         NDR_ZERO_STRUCT(state->tmp);
    2894             : 
    2895           0 :         tevent_req_done(req);
    2896             : }
    2897             : 
    2898           0 : NTSTATUS dcerpc_netr_GetDcName_recv(struct tevent_req *req,
    2899             :                                     TALLOC_CTX *mem_ctx,
    2900             :                                     WERROR *result)
    2901             : {
    2902           0 :         struct dcerpc_netr_GetDcName_state *state = tevent_req_data(
    2903             :                 req, struct dcerpc_netr_GetDcName_state);
    2904             :         NTSTATUS status;
    2905             : 
    2906           0 :         if (tevent_req_is_nterror(req, &status)) {
    2907           0 :                 tevent_req_received(req);
    2908           0 :                 return status;
    2909             :         }
    2910             : 
    2911             :         /* Steal possible out parameters to the callers context */
    2912           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2913             : 
    2914             :         /* Return result */
    2915           0 :         *result = state->orig.out.result;
    2916             : 
    2917           0 :         tevent_req_received(req);
    2918           0 :         return NT_STATUS_OK;
    2919             : }
    2920             : 
    2921           0 : NTSTATUS dcerpc_netr_GetDcName(struct dcerpc_binding_handle *h,
    2922             :                                TALLOC_CTX *mem_ctx,
    2923             :                                const char *_logon_server /* [in] [charset(UTF16),ref] */,
    2924             :                                const char *_domainname /* [in] [charset(UTF16),unique] */,
    2925             :                                const char **_dcname /* [out] [charset(UTF16),ref] */,
    2926             :                                WERROR *result)
    2927             : {
    2928             :         struct netr_GetDcName r;
    2929             :         NTSTATUS status;
    2930             : 
    2931             :         /* In parameters */
    2932           0 :         r.in.logon_server = _logon_server;
    2933           0 :         r.in.domainname = _domainname;
    2934             : 
    2935             :         /* Out parameters */
    2936           0 :         r.out.dcname = _dcname;
    2937             : 
    2938             :         /* Result */
    2939           0 :         NDR_ZERO_STRUCT(r.out.result);
    2940             : 
    2941           0 :         status = dcerpc_netr_GetDcName_r(h, mem_ctx, &r);
    2942           0 :         if (!NT_STATUS_IS_OK(status)) {
    2943           0 :                 return status;
    2944             :         }
    2945             : 
    2946             :         /* Return variables */
    2947           0 :         *_dcname = *r.out.dcname;
    2948             : 
    2949             :         /* Return result */
    2950           0 :         *result = r.out.result;
    2951             : 
    2952           0 :         return NT_STATUS_OK;
    2953             : }
    2954             : 
    2955             : struct dcerpc_netr_LogonControl_r_state {
    2956             :         TALLOC_CTX *out_mem_ctx;
    2957             : };
    2958             : 
    2959             : static void dcerpc_netr_LogonControl_r_done(struct tevent_req *subreq);
    2960             : 
    2961           0 : struct tevent_req *dcerpc_netr_LogonControl_r_send(TALLOC_CTX *mem_ctx,
    2962             :         struct tevent_context *ev,
    2963             :         struct dcerpc_binding_handle *h,
    2964             :         struct netr_LogonControl *r)
    2965             : {
    2966             :         struct tevent_req *req;
    2967             :         struct dcerpc_netr_LogonControl_r_state *state;
    2968             :         struct tevent_req *subreq;
    2969             : 
    2970           0 :         req = tevent_req_create(mem_ctx, &state,
    2971             :                                 struct dcerpc_netr_LogonControl_r_state);
    2972           0 :         if (req == NULL) {
    2973           0 :                 return NULL;
    2974             :         }
    2975             : 
    2976           0 :         state->out_mem_ctx = talloc_new(state);
    2977           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2978           0 :                 return tevent_req_post(req, ev);
    2979             :         }
    2980             : 
    2981           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2982             :                         NULL, &ndr_table_netlogon,
    2983           0 :                         NDR_NETR_LOGONCONTROL, state->out_mem_ctx, r);
    2984           0 :         if (tevent_req_nomem(subreq, req)) {
    2985           0 :                 return tevent_req_post(req, ev);
    2986             :         }
    2987           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonControl_r_done, req);
    2988             : 
    2989           0 :         return req;
    2990             : }
    2991             : 
    2992           0 : static void dcerpc_netr_LogonControl_r_done(struct tevent_req *subreq)
    2993             : {
    2994           0 :         struct tevent_req *req =
    2995           0 :                 tevent_req_callback_data(subreq,
    2996             :                 struct tevent_req);
    2997             :         NTSTATUS status;
    2998             : 
    2999           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3000           0 :         TALLOC_FREE(subreq);
    3001           0 :         if (tevent_req_nterror(req, status)) {
    3002           0 :                 return;
    3003             :         }
    3004             : 
    3005           0 :         tevent_req_done(req);
    3006             : }
    3007             : 
    3008           0 : NTSTATUS dcerpc_netr_LogonControl_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3009             : {
    3010           0 :         struct dcerpc_netr_LogonControl_r_state *state =
    3011           0 :                 tevent_req_data(req,
    3012             :                 struct dcerpc_netr_LogonControl_r_state);
    3013             :         NTSTATUS status;
    3014             : 
    3015           0 :         if (tevent_req_is_nterror(req, &status)) {
    3016           0 :                 tevent_req_received(req);
    3017           0 :                 return status;
    3018             :         }
    3019             : 
    3020           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3021             : 
    3022           0 :         tevent_req_received(req);
    3023           0 :         return NT_STATUS_OK;
    3024             : }
    3025             : 
    3026        4485 : NTSTATUS dcerpc_netr_LogonControl_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_LogonControl *r)
    3027             : {
    3028             :         NTSTATUS status;
    3029             : 
    3030        4485 :         status = dcerpc_binding_handle_call(h,
    3031             :                         NULL, &ndr_table_netlogon,
    3032             :                         NDR_NETR_LOGONCONTROL, mem_ctx, r);
    3033             : 
    3034        4485 :         return status;
    3035             : }
    3036             : 
    3037             : struct dcerpc_netr_LogonControl_state {
    3038             :         struct netr_LogonControl orig;
    3039             :         struct netr_LogonControl tmp;
    3040             :         TALLOC_CTX *out_mem_ctx;
    3041             : };
    3042             : 
    3043             : static void dcerpc_netr_LogonControl_done(struct tevent_req *subreq);
    3044             : 
    3045           0 : struct tevent_req *dcerpc_netr_LogonControl_send(TALLOC_CTX *mem_ctx,
    3046             :                                                  struct tevent_context *ev,
    3047             :                                                  struct dcerpc_binding_handle *h,
    3048             :                                                  const char *_logon_server /* [in] [charset(UTF16),unique] */,
    3049             :                                                  enum netr_LogonControlCode _function_code /* [in]  */,
    3050             :                                                  uint32_t _level /* [in]  */,
    3051             :                                                  union netr_CONTROL_QUERY_INFORMATION *_query /* [out] [ref,switch_is(level)] */)
    3052             : {
    3053             :         struct tevent_req *req;
    3054             :         struct dcerpc_netr_LogonControl_state *state;
    3055             :         struct tevent_req *subreq;
    3056             : 
    3057           0 :         req = tevent_req_create(mem_ctx, &state,
    3058             :                                 struct dcerpc_netr_LogonControl_state);
    3059           0 :         if (req == NULL) {
    3060           0 :                 return NULL;
    3061             :         }
    3062           0 :         state->out_mem_ctx = NULL;
    3063             : 
    3064             :         /* In parameters */
    3065           0 :         state->orig.in.logon_server = _logon_server;
    3066           0 :         state->orig.in.function_code = _function_code;
    3067           0 :         state->orig.in.level = _level;
    3068             : 
    3069             :         /* Out parameters */
    3070           0 :         state->orig.out.query = _query;
    3071             : 
    3072             :         /* Result */
    3073           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3074             : 
    3075           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3076             :                              "dcerpc_netr_LogonControl_out_memory");
    3077           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3078           0 :                 return tevent_req_post(req, ev);
    3079             :         }
    3080             : 
    3081             :         /* make a temporary copy, that we pass to the dispatch function */
    3082           0 :         state->tmp = state->orig;
    3083             : 
    3084           0 :         subreq = dcerpc_netr_LogonControl_r_send(state, ev, h, &state->tmp);
    3085           0 :         if (tevent_req_nomem(subreq, req)) {
    3086           0 :                 return tevent_req_post(req, ev);
    3087             :         }
    3088           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonControl_done, req);
    3089           0 :         return req;
    3090             : }
    3091             : 
    3092           0 : static void dcerpc_netr_LogonControl_done(struct tevent_req *subreq)
    3093             : {
    3094           0 :         struct tevent_req *req = tevent_req_callback_data(
    3095             :                 subreq, struct tevent_req);
    3096           0 :         struct dcerpc_netr_LogonControl_state *state = tevent_req_data(
    3097             :                 req, struct dcerpc_netr_LogonControl_state);
    3098             :         NTSTATUS status;
    3099             :         TALLOC_CTX *mem_ctx;
    3100             : 
    3101           0 :         if (state->out_mem_ctx) {
    3102           0 :                 mem_ctx = state->out_mem_ctx;
    3103             :         } else {
    3104           0 :                 mem_ctx = state;
    3105             :         }
    3106             : 
    3107           0 :         status = dcerpc_netr_LogonControl_r_recv(subreq, mem_ctx);
    3108           0 :         TALLOC_FREE(subreq);
    3109           0 :         if (tevent_req_nterror(req, status)) {
    3110           0 :                 return;
    3111             :         }
    3112             : 
    3113             :         /* Copy out parameters */
    3114           0 :         *state->orig.out.query = *state->tmp.out.query;
    3115             : 
    3116             :         /* Copy result */
    3117           0 :         state->orig.out.result = state->tmp.out.result;
    3118             : 
    3119             :         /* Reset temporary structure */
    3120           0 :         NDR_ZERO_STRUCT(state->tmp);
    3121             : 
    3122           0 :         tevent_req_done(req);
    3123             : }
    3124             : 
    3125           0 : NTSTATUS dcerpc_netr_LogonControl_recv(struct tevent_req *req,
    3126             :                                        TALLOC_CTX *mem_ctx,
    3127             :                                        WERROR *result)
    3128             : {
    3129           0 :         struct dcerpc_netr_LogonControl_state *state = tevent_req_data(
    3130             :                 req, struct dcerpc_netr_LogonControl_state);
    3131             :         NTSTATUS status;
    3132             : 
    3133           0 :         if (tevent_req_is_nterror(req, &status)) {
    3134           0 :                 tevent_req_received(req);
    3135           0 :                 return status;
    3136             :         }
    3137             : 
    3138             :         /* Steal possible out parameters to the callers context */
    3139           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3140             : 
    3141             :         /* Return result */
    3142           0 :         *result = state->orig.out.result;
    3143             : 
    3144           0 :         tevent_req_received(req);
    3145           0 :         return NT_STATUS_OK;
    3146             : }
    3147             : 
    3148           0 : NTSTATUS dcerpc_netr_LogonControl(struct dcerpc_binding_handle *h,
    3149             :                                   TALLOC_CTX *mem_ctx,
    3150             :                                   const char *_logon_server /* [in] [charset(UTF16),unique] */,
    3151             :                                   enum netr_LogonControlCode _function_code /* [in]  */,
    3152             :                                   uint32_t _level /* [in]  */,
    3153             :                                   union netr_CONTROL_QUERY_INFORMATION *_query /* [out] [ref,switch_is(level)] */,
    3154             :                                   WERROR *result)
    3155             : {
    3156             :         struct netr_LogonControl r;
    3157             :         NTSTATUS status;
    3158             : 
    3159             :         /* In parameters */
    3160           0 :         r.in.logon_server = _logon_server;
    3161           0 :         r.in.function_code = _function_code;
    3162           0 :         r.in.level = _level;
    3163             : 
    3164             :         /* Out parameters */
    3165           0 :         r.out.query = _query;
    3166             : 
    3167             :         /* Result */
    3168           0 :         NDR_ZERO_STRUCT(r.out.result);
    3169             : 
    3170           0 :         status = dcerpc_netr_LogonControl_r(h, mem_ctx, &r);
    3171           0 :         if (!NT_STATUS_IS_OK(status)) {
    3172           0 :                 return status;
    3173             :         }
    3174             : 
    3175             :         /* Return variables */
    3176           0 :         *_query = *r.out.query;
    3177             : 
    3178             :         /* Return result */
    3179           0 :         *result = r.out.result;
    3180             : 
    3181           0 :         return NT_STATUS_OK;
    3182             : }
    3183             : 
    3184             : struct dcerpc_netr_GetAnyDCName_r_state {
    3185             :         TALLOC_CTX *out_mem_ctx;
    3186             : };
    3187             : 
    3188             : static void dcerpc_netr_GetAnyDCName_r_done(struct tevent_req *subreq);
    3189             : 
    3190           0 : struct tevent_req *dcerpc_netr_GetAnyDCName_r_send(TALLOC_CTX *mem_ctx,
    3191             :         struct tevent_context *ev,
    3192             :         struct dcerpc_binding_handle *h,
    3193             :         struct netr_GetAnyDCName *r)
    3194             : {
    3195             :         struct tevent_req *req;
    3196             :         struct dcerpc_netr_GetAnyDCName_r_state *state;
    3197             :         struct tevent_req *subreq;
    3198             : 
    3199           0 :         req = tevent_req_create(mem_ctx, &state,
    3200             :                                 struct dcerpc_netr_GetAnyDCName_r_state);
    3201           0 :         if (req == NULL) {
    3202           0 :                 return NULL;
    3203             :         }
    3204             : 
    3205           0 :         state->out_mem_ctx = talloc_new(state);
    3206           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3207           0 :                 return tevent_req_post(req, ev);
    3208             :         }
    3209             : 
    3210           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3211             :                         NULL, &ndr_table_netlogon,
    3212           0 :                         NDR_NETR_GETANYDCNAME, state->out_mem_ctx, r);
    3213           0 :         if (tevent_req_nomem(subreq, req)) {
    3214           0 :                 return tevent_req_post(req, ev);
    3215             :         }
    3216           0 :         tevent_req_set_callback(subreq, dcerpc_netr_GetAnyDCName_r_done, req);
    3217             : 
    3218           0 :         return req;
    3219             : }
    3220             : 
    3221           0 : static void dcerpc_netr_GetAnyDCName_r_done(struct tevent_req *subreq)
    3222             : {
    3223           0 :         struct tevent_req *req =
    3224           0 :                 tevent_req_callback_data(subreq,
    3225             :                 struct tevent_req);
    3226             :         NTSTATUS status;
    3227             : 
    3228           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3229           0 :         TALLOC_FREE(subreq);
    3230           0 :         if (tevent_req_nterror(req, status)) {
    3231           0 :                 return;
    3232             :         }
    3233             : 
    3234           0 :         tevent_req_done(req);
    3235             : }
    3236             : 
    3237           0 : NTSTATUS dcerpc_netr_GetAnyDCName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3238             : {
    3239           0 :         struct dcerpc_netr_GetAnyDCName_r_state *state =
    3240           0 :                 tevent_req_data(req,
    3241             :                 struct dcerpc_netr_GetAnyDCName_r_state);
    3242             :         NTSTATUS status;
    3243             : 
    3244           0 :         if (tevent_req_is_nterror(req, &status)) {
    3245           0 :                 tevent_req_received(req);
    3246           0 :                 return status;
    3247             :         }
    3248             : 
    3249           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3250             : 
    3251           0 :         tevent_req_received(req);
    3252           0 :         return NT_STATUS_OK;
    3253             : }
    3254             : 
    3255          54 : NTSTATUS dcerpc_netr_GetAnyDCName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_GetAnyDCName *r)
    3256             : {
    3257             :         NTSTATUS status;
    3258             : 
    3259          54 :         status = dcerpc_binding_handle_call(h,
    3260             :                         NULL, &ndr_table_netlogon,
    3261             :                         NDR_NETR_GETANYDCNAME, mem_ctx, r);
    3262             : 
    3263          54 :         return status;
    3264             : }
    3265             : 
    3266             : struct dcerpc_netr_GetAnyDCName_state {
    3267             :         struct netr_GetAnyDCName orig;
    3268             :         struct netr_GetAnyDCName tmp;
    3269             :         TALLOC_CTX *out_mem_ctx;
    3270             : };
    3271             : 
    3272             : static void dcerpc_netr_GetAnyDCName_done(struct tevent_req *subreq);
    3273             : 
    3274           0 : struct tevent_req *dcerpc_netr_GetAnyDCName_send(TALLOC_CTX *mem_ctx,
    3275             :                                                  struct tevent_context *ev,
    3276             :                                                  struct dcerpc_binding_handle *h,
    3277             :                                                  const char *_logon_server /* [in] [charset(UTF16),unique] */,
    3278             :                                                  const char *_domainname /* [in] [charset(UTF16),unique] */,
    3279             :                                                  const char **_dcname /* [out] [charset(UTF16),ref] */)
    3280             : {
    3281             :         struct tevent_req *req;
    3282             :         struct dcerpc_netr_GetAnyDCName_state *state;
    3283             :         struct tevent_req *subreq;
    3284             : 
    3285           0 :         req = tevent_req_create(mem_ctx, &state,
    3286             :                                 struct dcerpc_netr_GetAnyDCName_state);
    3287           0 :         if (req == NULL) {
    3288           0 :                 return NULL;
    3289             :         }
    3290           0 :         state->out_mem_ctx = NULL;
    3291             : 
    3292             :         /* In parameters */
    3293           0 :         state->orig.in.logon_server = _logon_server;
    3294           0 :         state->orig.in.domainname = _domainname;
    3295             : 
    3296             :         /* Out parameters */
    3297           0 :         state->orig.out.dcname = _dcname;
    3298             : 
    3299             :         /* Result */
    3300           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3301             : 
    3302           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3303             :                              "dcerpc_netr_GetAnyDCName_out_memory");
    3304           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3305           0 :                 return tevent_req_post(req, ev);
    3306             :         }
    3307             : 
    3308             :         /* make a temporary copy, that we pass to the dispatch function */
    3309           0 :         state->tmp = state->orig;
    3310             : 
    3311           0 :         subreq = dcerpc_netr_GetAnyDCName_r_send(state, ev, h, &state->tmp);
    3312           0 :         if (tevent_req_nomem(subreq, req)) {
    3313           0 :                 return tevent_req_post(req, ev);
    3314             :         }
    3315           0 :         tevent_req_set_callback(subreq, dcerpc_netr_GetAnyDCName_done, req);
    3316           0 :         return req;
    3317             : }
    3318             : 
    3319           0 : static void dcerpc_netr_GetAnyDCName_done(struct tevent_req *subreq)
    3320             : {
    3321           0 :         struct tevent_req *req = tevent_req_callback_data(
    3322             :                 subreq, struct tevent_req);
    3323           0 :         struct dcerpc_netr_GetAnyDCName_state *state = tevent_req_data(
    3324             :                 req, struct dcerpc_netr_GetAnyDCName_state);
    3325             :         NTSTATUS status;
    3326             :         TALLOC_CTX *mem_ctx;
    3327             : 
    3328           0 :         if (state->out_mem_ctx) {
    3329           0 :                 mem_ctx = state->out_mem_ctx;
    3330             :         } else {
    3331           0 :                 mem_ctx = state;
    3332             :         }
    3333             : 
    3334           0 :         status = dcerpc_netr_GetAnyDCName_r_recv(subreq, mem_ctx);
    3335           0 :         TALLOC_FREE(subreq);
    3336           0 :         if (tevent_req_nterror(req, status)) {
    3337           0 :                 return;
    3338             :         }
    3339             : 
    3340             :         /* Copy out parameters */
    3341           0 :         *state->orig.out.dcname = *state->tmp.out.dcname;
    3342             : 
    3343             :         /* Copy result */
    3344           0 :         state->orig.out.result = state->tmp.out.result;
    3345             : 
    3346             :         /* Reset temporary structure */
    3347           0 :         NDR_ZERO_STRUCT(state->tmp);
    3348             : 
    3349           0 :         tevent_req_done(req);
    3350             : }
    3351             : 
    3352           0 : NTSTATUS dcerpc_netr_GetAnyDCName_recv(struct tevent_req *req,
    3353             :                                        TALLOC_CTX *mem_ctx,
    3354             :                                        WERROR *result)
    3355             : {
    3356           0 :         struct dcerpc_netr_GetAnyDCName_state *state = tevent_req_data(
    3357             :                 req, struct dcerpc_netr_GetAnyDCName_state);
    3358             :         NTSTATUS status;
    3359             : 
    3360           0 :         if (tevent_req_is_nterror(req, &status)) {
    3361           0 :                 tevent_req_received(req);
    3362           0 :                 return status;
    3363             :         }
    3364             : 
    3365             :         /* Steal possible out parameters to the callers context */
    3366           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3367             : 
    3368             :         /* Return result */
    3369           0 :         *result = state->orig.out.result;
    3370             : 
    3371           0 :         tevent_req_received(req);
    3372           0 :         return NT_STATUS_OK;
    3373             : }
    3374             : 
    3375           0 : NTSTATUS dcerpc_netr_GetAnyDCName(struct dcerpc_binding_handle *h,
    3376             :                                   TALLOC_CTX *mem_ctx,
    3377             :                                   const char *_logon_server /* [in] [charset(UTF16),unique] */,
    3378             :                                   const char *_domainname /* [in] [charset(UTF16),unique] */,
    3379             :                                   const char **_dcname /* [out] [charset(UTF16),ref] */,
    3380             :                                   WERROR *result)
    3381             : {
    3382             :         struct netr_GetAnyDCName r;
    3383             :         NTSTATUS status;
    3384             : 
    3385             :         /* In parameters */
    3386           0 :         r.in.logon_server = _logon_server;
    3387           0 :         r.in.domainname = _domainname;
    3388             : 
    3389             :         /* Out parameters */
    3390           0 :         r.out.dcname = _dcname;
    3391             : 
    3392             :         /* Result */
    3393           0 :         NDR_ZERO_STRUCT(r.out.result);
    3394             : 
    3395           0 :         status = dcerpc_netr_GetAnyDCName_r(h, mem_ctx, &r);
    3396           0 :         if (!NT_STATUS_IS_OK(status)) {
    3397           0 :                 return status;
    3398             :         }
    3399             : 
    3400             :         /* Return variables */
    3401           0 :         *_dcname = *r.out.dcname;
    3402             : 
    3403             :         /* Return result */
    3404           0 :         *result = r.out.result;
    3405             : 
    3406           0 :         return NT_STATUS_OK;
    3407             : }
    3408             : 
    3409             : struct dcerpc_netr_LogonControl2_r_state {
    3410             :         TALLOC_CTX *out_mem_ctx;
    3411             : };
    3412             : 
    3413             : static void dcerpc_netr_LogonControl2_r_done(struct tevent_req *subreq);
    3414             : 
    3415           0 : struct tevent_req *dcerpc_netr_LogonControl2_r_send(TALLOC_CTX *mem_ctx,
    3416             :         struct tevent_context *ev,
    3417             :         struct dcerpc_binding_handle *h,
    3418             :         struct netr_LogonControl2 *r)
    3419             : {
    3420             :         struct tevent_req *req;
    3421             :         struct dcerpc_netr_LogonControl2_r_state *state;
    3422             :         struct tevent_req *subreq;
    3423             : 
    3424           0 :         req = tevent_req_create(mem_ctx, &state,
    3425             :                                 struct dcerpc_netr_LogonControl2_r_state);
    3426           0 :         if (req == NULL) {
    3427           0 :                 return NULL;
    3428             :         }
    3429             : 
    3430           0 :         state->out_mem_ctx = talloc_new(state);
    3431           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3432           0 :                 return tevent_req_post(req, ev);
    3433             :         }
    3434             : 
    3435           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3436             :                         NULL, &ndr_table_netlogon,
    3437           0 :                         NDR_NETR_LOGONCONTROL2, state->out_mem_ctx, r);
    3438           0 :         if (tevent_req_nomem(subreq, req)) {
    3439           0 :                 return tevent_req_post(req, ev);
    3440             :         }
    3441           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonControl2_r_done, req);
    3442             : 
    3443           0 :         return req;
    3444             : }
    3445             : 
    3446           0 : static void dcerpc_netr_LogonControl2_r_done(struct tevent_req *subreq)
    3447             : {
    3448           0 :         struct tevent_req *req =
    3449           0 :                 tevent_req_callback_data(subreq,
    3450             :                 struct tevent_req);
    3451             :         NTSTATUS status;
    3452             : 
    3453           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3454           0 :         TALLOC_FREE(subreq);
    3455           0 :         if (tevent_req_nterror(req, status)) {
    3456           0 :                 return;
    3457             :         }
    3458             : 
    3459           0 :         tevent_req_done(req);
    3460             : }
    3461             : 
    3462           0 : NTSTATUS dcerpc_netr_LogonControl2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3463             : {
    3464           0 :         struct dcerpc_netr_LogonControl2_r_state *state =
    3465           0 :                 tevent_req_data(req,
    3466             :                 struct dcerpc_netr_LogonControl2_r_state);
    3467             :         NTSTATUS status;
    3468             : 
    3469           0 :         if (tevent_req_is_nterror(req, &status)) {
    3470           0 :                 tevent_req_received(req);
    3471           0 :                 return status;
    3472             :         }
    3473             : 
    3474           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3475             : 
    3476           0 :         tevent_req_received(req);
    3477           0 :         return NT_STATUS_OK;
    3478             : }
    3479             : 
    3480         966 : NTSTATUS dcerpc_netr_LogonControl2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_LogonControl2 *r)
    3481             : {
    3482             :         NTSTATUS status;
    3483             : 
    3484         966 :         status = dcerpc_binding_handle_call(h,
    3485             :                         NULL, &ndr_table_netlogon,
    3486             :                         NDR_NETR_LOGONCONTROL2, mem_ctx, r);
    3487             : 
    3488         966 :         return status;
    3489             : }
    3490             : 
    3491             : struct dcerpc_netr_LogonControl2_state {
    3492             :         struct netr_LogonControl2 orig;
    3493             :         struct netr_LogonControl2 tmp;
    3494             :         TALLOC_CTX *out_mem_ctx;
    3495             : };
    3496             : 
    3497             : static void dcerpc_netr_LogonControl2_done(struct tevent_req *subreq);
    3498             : 
    3499           0 : struct tevent_req *dcerpc_netr_LogonControl2_send(TALLOC_CTX *mem_ctx,
    3500             :                                                   struct tevent_context *ev,
    3501             :                                                   struct dcerpc_binding_handle *h,
    3502             :                                                   const char *_logon_server /* [in] [charset(UTF16),unique] */,
    3503             :                                                   enum netr_LogonControlCode _function_code /* [in]  */,
    3504             :                                                   uint32_t _level /* [in]  */,
    3505             :                                                   union netr_CONTROL_DATA_INFORMATION *_data /* [in] [ref,switch_is(function_code)] */,
    3506             :                                                   union netr_CONTROL_QUERY_INFORMATION *_query /* [out] [ref,switch_is(level)] */)
    3507             : {
    3508             :         struct tevent_req *req;
    3509             :         struct dcerpc_netr_LogonControl2_state *state;
    3510             :         struct tevent_req *subreq;
    3511             : 
    3512           0 :         req = tevent_req_create(mem_ctx, &state,
    3513             :                                 struct dcerpc_netr_LogonControl2_state);
    3514           0 :         if (req == NULL) {
    3515           0 :                 return NULL;
    3516             :         }
    3517           0 :         state->out_mem_ctx = NULL;
    3518             : 
    3519             :         /* In parameters */
    3520           0 :         state->orig.in.logon_server = _logon_server;
    3521           0 :         state->orig.in.function_code = _function_code;
    3522           0 :         state->orig.in.level = _level;
    3523           0 :         state->orig.in.data = _data;
    3524             : 
    3525             :         /* Out parameters */
    3526           0 :         state->orig.out.query = _query;
    3527             : 
    3528             :         /* Result */
    3529           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3530             : 
    3531           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3532             :                              "dcerpc_netr_LogonControl2_out_memory");
    3533           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3534           0 :                 return tevent_req_post(req, ev);
    3535             :         }
    3536             : 
    3537             :         /* make a temporary copy, that we pass to the dispatch function */
    3538           0 :         state->tmp = state->orig;
    3539             : 
    3540           0 :         subreq = dcerpc_netr_LogonControl2_r_send(state, ev, h, &state->tmp);
    3541           0 :         if (tevent_req_nomem(subreq, req)) {
    3542           0 :                 return tevent_req_post(req, ev);
    3543             :         }
    3544           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonControl2_done, req);
    3545           0 :         return req;
    3546             : }
    3547             : 
    3548           0 : static void dcerpc_netr_LogonControl2_done(struct tevent_req *subreq)
    3549             : {
    3550           0 :         struct tevent_req *req = tevent_req_callback_data(
    3551             :                 subreq, struct tevent_req);
    3552           0 :         struct dcerpc_netr_LogonControl2_state *state = tevent_req_data(
    3553             :                 req, struct dcerpc_netr_LogonControl2_state);
    3554             :         NTSTATUS status;
    3555             :         TALLOC_CTX *mem_ctx;
    3556             : 
    3557           0 :         if (state->out_mem_ctx) {
    3558           0 :                 mem_ctx = state->out_mem_ctx;
    3559             :         } else {
    3560           0 :                 mem_ctx = state;
    3561             :         }
    3562             : 
    3563           0 :         status = dcerpc_netr_LogonControl2_r_recv(subreq, mem_ctx);
    3564           0 :         TALLOC_FREE(subreq);
    3565           0 :         if (tevent_req_nterror(req, status)) {
    3566           0 :                 return;
    3567             :         }
    3568             : 
    3569             :         /* Copy out parameters */
    3570           0 :         *state->orig.out.query = *state->tmp.out.query;
    3571             : 
    3572             :         /* Copy result */
    3573           0 :         state->orig.out.result = state->tmp.out.result;
    3574             : 
    3575             :         /* Reset temporary structure */
    3576           0 :         NDR_ZERO_STRUCT(state->tmp);
    3577             : 
    3578           0 :         tevent_req_done(req);
    3579             : }
    3580             : 
    3581           0 : NTSTATUS dcerpc_netr_LogonControl2_recv(struct tevent_req *req,
    3582             :                                         TALLOC_CTX *mem_ctx,
    3583             :                                         WERROR *result)
    3584             : {
    3585           0 :         struct dcerpc_netr_LogonControl2_state *state = tevent_req_data(
    3586             :                 req, struct dcerpc_netr_LogonControl2_state);
    3587             :         NTSTATUS status;
    3588             : 
    3589           0 :         if (tevent_req_is_nterror(req, &status)) {
    3590           0 :                 tevent_req_received(req);
    3591           0 :                 return status;
    3592             :         }
    3593             : 
    3594             :         /* Steal possible out parameters to the callers context */
    3595           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3596             : 
    3597             :         /* Return result */
    3598           0 :         *result = state->orig.out.result;
    3599             : 
    3600           0 :         tevent_req_received(req);
    3601           0 :         return NT_STATUS_OK;
    3602             : }
    3603             : 
    3604           0 : NTSTATUS dcerpc_netr_LogonControl2(struct dcerpc_binding_handle *h,
    3605             :                                    TALLOC_CTX *mem_ctx,
    3606             :                                    const char *_logon_server /* [in] [charset(UTF16),unique] */,
    3607             :                                    enum netr_LogonControlCode _function_code /* [in]  */,
    3608             :                                    uint32_t _level /* [in]  */,
    3609             :                                    union netr_CONTROL_DATA_INFORMATION *_data /* [in] [ref,switch_is(function_code)] */,
    3610             :                                    union netr_CONTROL_QUERY_INFORMATION *_query /* [out] [ref,switch_is(level)] */,
    3611             :                                    WERROR *result)
    3612             : {
    3613             :         struct netr_LogonControl2 r;
    3614             :         NTSTATUS status;
    3615             : 
    3616             :         /* In parameters */
    3617           0 :         r.in.logon_server = _logon_server;
    3618           0 :         r.in.function_code = _function_code;
    3619           0 :         r.in.level = _level;
    3620           0 :         r.in.data = _data;
    3621             : 
    3622             :         /* Out parameters */
    3623           0 :         r.out.query = _query;
    3624             : 
    3625             :         /* Result */
    3626           0 :         NDR_ZERO_STRUCT(r.out.result);
    3627             : 
    3628           0 :         status = dcerpc_netr_LogonControl2_r(h, mem_ctx, &r);
    3629           0 :         if (!NT_STATUS_IS_OK(status)) {
    3630           0 :                 return status;
    3631             :         }
    3632             : 
    3633             :         /* Return variables */
    3634           0 :         *_query = *r.out.query;
    3635             : 
    3636             :         /* Return result */
    3637           0 :         *result = r.out.result;
    3638             : 
    3639           0 :         return NT_STATUS_OK;
    3640             : }
    3641             : 
    3642             : struct dcerpc_netr_ServerAuthenticate2_r_state {
    3643             :         TALLOC_CTX *out_mem_ctx;
    3644             : };
    3645             : 
    3646             : static void dcerpc_netr_ServerAuthenticate2_r_done(struct tevent_req *subreq);
    3647             : 
    3648         381 : struct tevent_req *dcerpc_netr_ServerAuthenticate2_r_send(TALLOC_CTX *mem_ctx,
    3649             :         struct tevent_context *ev,
    3650             :         struct dcerpc_binding_handle *h,
    3651             :         struct netr_ServerAuthenticate2 *r)
    3652             : {
    3653             :         struct tevent_req *req;
    3654             :         struct dcerpc_netr_ServerAuthenticate2_r_state *state;
    3655             :         struct tevent_req *subreq;
    3656             : 
    3657         381 :         req = tevent_req_create(mem_ctx, &state,
    3658             :                                 struct dcerpc_netr_ServerAuthenticate2_r_state);
    3659         381 :         if (req == NULL) {
    3660           0 :                 return NULL;
    3661             :         }
    3662             : 
    3663         381 :         state->out_mem_ctx = talloc_new(state);
    3664         381 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3665           0 :                 return tevent_req_post(req, ev);
    3666             :         }
    3667             : 
    3668         381 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3669             :                         NULL, &ndr_table_netlogon,
    3670         381 :                         NDR_NETR_SERVERAUTHENTICATE2, state->out_mem_ctx, r);
    3671         381 :         if (tevent_req_nomem(subreq, req)) {
    3672           0 :                 return tevent_req_post(req, ev);
    3673             :         }
    3674         381 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerAuthenticate2_r_done, req);
    3675             : 
    3676         381 :         return req;
    3677             : }
    3678             : 
    3679         381 : static void dcerpc_netr_ServerAuthenticate2_r_done(struct tevent_req *subreq)
    3680             : {
    3681         323 :         struct tevent_req *req =
    3682         381 :                 tevent_req_callback_data(subreq,
    3683             :                 struct tevent_req);
    3684             :         NTSTATUS status;
    3685             : 
    3686         381 :         status = dcerpc_binding_handle_call_recv(subreq);
    3687         381 :         TALLOC_FREE(subreq);
    3688         381 :         if (tevent_req_nterror(req, status)) {
    3689           0 :                 return;
    3690             :         }
    3691             : 
    3692         381 :         tevent_req_done(req);
    3693             : }
    3694             : 
    3695         381 : NTSTATUS dcerpc_netr_ServerAuthenticate2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3696             : {
    3697         323 :         struct dcerpc_netr_ServerAuthenticate2_r_state *state =
    3698         381 :                 tevent_req_data(req,
    3699             :                 struct dcerpc_netr_ServerAuthenticate2_r_state);
    3700             :         NTSTATUS status;
    3701             : 
    3702         381 :         if (tevent_req_is_nterror(req, &status)) {
    3703           0 :                 tevent_req_received(req);
    3704           0 :                 return status;
    3705             :         }
    3706             : 
    3707         381 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3708             : 
    3709         381 :         tevent_req_received(req);
    3710         381 :         return NT_STATUS_OK;
    3711             : }
    3712             : 
    3713         469 : NTSTATUS dcerpc_netr_ServerAuthenticate2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_ServerAuthenticate2 *r)
    3714             : {
    3715             :         NTSTATUS status;
    3716             : 
    3717         469 :         status = dcerpc_binding_handle_call(h,
    3718             :                         NULL, &ndr_table_netlogon,
    3719             :                         NDR_NETR_SERVERAUTHENTICATE2, mem_ctx, r);
    3720             : 
    3721         469 :         return status;
    3722             : }
    3723             : 
    3724             : struct dcerpc_netr_ServerAuthenticate2_state {
    3725             :         struct netr_ServerAuthenticate2 orig;
    3726             :         struct netr_ServerAuthenticate2 tmp;
    3727             :         TALLOC_CTX *out_mem_ctx;
    3728             : };
    3729             : 
    3730             : static void dcerpc_netr_ServerAuthenticate2_done(struct tevent_req *subreq);
    3731             : 
    3732           0 : struct tevent_req *dcerpc_netr_ServerAuthenticate2_send(TALLOC_CTX *mem_ctx,
    3733             :                                                         struct tevent_context *ev,
    3734             :                                                         struct dcerpc_binding_handle *h,
    3735             :                                                         const char *_server_name /* [in] [charset(UTF16),unique] */,
    3736             :                                                         const char *_account_name /* [in] [charset(UTF16),ref] */,
    3737             :                                                         enum netr_SchannelType _secure_channel_type /* [in]  */,
    3738             :                                                         const char *_computer_name /* [in] [charset(UTF16),ref] */,
    3739             :                                                         struct netr_Credential *_credentials /* [in] [ref] */,
    3740             :                                                         struct netr_Credential *_return_credentials /* [out] [ref] */,
    3741             :                                                         uint32_t *_negotiate_flags /* [in,out] [ref] */)
    3742             : {
    3743             :         struct tevent_req *req;
    3744             :         struct dcerpc_netr_ServerAuthenticate2_state *state;
    3745             :         struct tevent_req *subreq;
    3746             : 
    3747           0 :         req = tevent_req_create(mem_ctx, &state,
    3748             :                                 struct dcerpc_netr_ServerAuthenticate2_state);
    3749           0 :         if (req == NULL) {
    3750           0 :                 return NULL;
    3751             :         }
    3752           0 :         state->out_mem_ctx = NULL;
    3753             : 
    3754             :         /* In parameters */
    3755           0 :         state->orig.in.server_name = _server_name;
    3756           0 :         state->orig.in.account_name = _account_name;
    3757           0 :         state->orig.in.secure_channel_type = _secure_channel_type;
    3758           0 :         state->orig.in.computer_name = _computer_name;
    3759           0 :         state->orig.in.credentials = _credentials;
    3760           0 :         state->orig.in.negotiate_flags = _negotiate_flags;
    3761             : 
    3762             :         /* Out parameters */
    3763           0 :         state->orig.out.return_credentials = _return_credentials;
    3764           0 :         state->orig.out.negotiate_flags = _negotiate_flags;
    3765             : 
    3766             :         /* Result */
    3767           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3768             : 
    3769           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3770             :                              "dcerpc_netr_ServerAuthenticate2_out_memory");
    3771           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3772           0 :                 return tevent_req_post(req, ev);
    3773             :         }
    3774             : 
    3775             :         /* make a temporary copy, that we pass to the dispatch function */
    3776           0 :         state->tmp = state->orig;
    3777             : 
    3778           0 :         subreq = dcerpc_netr_ServerAuthenticate2_r_send(state, ev, h, &state->tmp);
    3779           0 :         if (tevent_req_nomem(subreq, req)) {
    3780           0 :                 return tevent_req_post(req, ev);
    3781             :         }
    3782           0 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerAuthenticate2_done, req);
    3783           0 :         return req;
    3784             : }
    3785             : 
    3786           0 : static void dcerpc_netr_ServerAuthenticate2_done(struct tevent_req *subreq)
    3787             : {
    3788           0 :         struct tevent_req *req = tevent_req_callback_data(
    3789             :                 subreq, struct tevent_req);
    3790           0 :         struct dcerpc_netr_ServerAuthenticate2_state *state = tevent_req_data(
    3791             :                 req, struct dcerpc_netr_ServerAuthenticate2_state);
    3792             :         NTSTATUS status;
    3793             :         TALLOC_CTX *mem_ctx;
    3794             : 
    3795           0 :         if (state->out_mem_ctx) {
    3796           0 :                 mem_ctx = state->out_mem_ctx;
    3797             :         } else {
    3798           0 :                 mem_ctx = state;
    3799             :         }
    3800             : 
    3801           0 :         status = dcerpc_netr_ServerAuthenticate2_r_recv(subreq, mem_ctx);
    3802           0 :         TALLOC_FREE(subreq);
    3803           0 :         if (tevent_req_nterror(req, status)) {
    3804           0 :                 return;
    3805             :         }
    3806             : 
    3807             :         /* Copy out parameters */
    3808           0 :         *state->orig.out.return_credentials = *state->tmp.out.return_credentials;
    3809           0 :         *state->orig.out.negotiate_flags = *state->tmp.out.negotiate_flags;
    3810             : 
    3811             :         /* Copy result */
    3812           0 :         state->orig.out.result = state->tmp.out.result;
    3813             : 
    3814             :         /* Reset temporary structure */
    3815           0 :         NDR_ZERO_STRUCT(state->tmp);
    3816             : 
    3817           0 :         tevent_req_done(req);
    3818             : }
    3819             : 
    3820           0 : NTSTATUS dcerpc_netr_ServerAuthenticate2_recv(struct tevent_req *req,
    3821             :                                               TALLOC_CTX *mem_ctx,
    3822             :                                               NTSTATUS *result)
    3823             : {
    3824           0 :         struct dcerpc_netr_ServerAuthenticate2_state *state = tevent_req_data(
    3825             :                 req, struct dcerpc_netr_ServerAuthenticate2_state);
    3826             :         NTSTATUS status;
    3827             : 
    3828           0 :         if (tevent_req_is_nterror(req, &status)) {
    3829           0 :                 tevent_req_received(req);
    3830           0 :                 return status;
    3831             :         }
    3832             : 
    3833             :         /* Steal possible out parameters to the callers context */
    3834           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3835             : 
    3836             :         /* Return result */
    3837           0 :         *result = state->orig.out.result;
    3838             : 
    3839           0 :         tevent_req_received(req);
    3840           0 :         return NT_STATUS_OK;
    3841             : }
    3842             : 
    3843           0 : NTSTATUS dcerpc_netr_ServerAuthenticate2(struct dcerpc_binding_handle *h,
    3844             :                                          TALLOC_CTX *mem_ctx,
    3845             :                                          const char *_server_name /* [in] [charset(UTF16),unique] */,
    3846             :                                          const char *_account_name /* [in] [charset(UTF16),ref] */,
    3847             :                                          enum netr_SchannelType _secure_channel_type /* [in]  */,
    3848             :                                          const char *_computer_name /* [in] [charset(UTF16),ref] */,
    3849             :                                          struct netr_Credential *_credentials /* [in] [ref] */,
    3850             :                                          struct netr_Credential *_return_credentials /* [out] [ref] */,
    3851             :                                          uint32_t *_negotiate_flags /* [in,out] [ref] */,
    3852             :                                          NTSTATUS *result)
    3853             : {
    3854             :         struct netr_ServerAuthenticate2 r;
    3855             :         NTSTATUS status;
    3856             : 
    3857             :         /* In parameters */
    3858           0 :         r.in.server_name = _server_name;
    3859           0 :         r.in.account_name = _account_name;
    3860           0 :         r.in.secure_channel_type = _secure_channel_type;
    3861           0 :         r.in.computer_name = _computer_name;
    3862           0 :         r.in.credentials = _credentials;
    3863           0 :         r.in.negotiate_flags = _negotiate_flags;
    3864             : 
    3865             :         /* Out parameters */
    3866           0 :         r.out.return_credentials = _return_credentials;
    3867           0 :         r.out.negotiate_flags = _negotiate_flags;
    3868             : 
    3869             :         /* Result */
    3870           0 :         NDR_ZERO_STRUCT(r.out.result);
    3871             : 
    3872           0 :         status = dcerpc_netr_ServerAuthenticate2_r(h, mem_ctx, &r);
    3873           0 :         if (!NT_STATUS_IS_OK(status)) {
    3874           0 :                 return status;
    3875             :         }
    3876             : 
    3877             :         /* Return variables */
    3878           0 :         *_return_credentials = *r.out.return_credentials;
    3879           0 :         *_negotiate_flags = *r.out.negotiate_flags;
    3880             : 
    3881             :         /* Return result */
    3882           0 :         *result = r.out.result;
    3883             : 
    3884           0 :         return NT_STATUS_OK;
    3885             : }
    3886             : 
    3887             : struct dcerpc_netr_DatabaseSync2_r_state {
    3888             :         TALLOC_CTX *out_mem_ctx;
    3889             : };
    3890             : 
    3891             : static void dcerpc_netr_DatabaseSync2_r_done(struct tevent_req *subreq);
    3892             : 
    3893           0 : struct tevent_req *dcerpc_netr_DatabaseSync2_r_send(TALLOC_CTX *mem_ctx,
    3894             :         struct tevent_context *ev,
    3895             :         struct dcerpc_binding_handle *h,
    3896             :         struct netr_DatabaseSync2 *r)
    3897             : {
    3898             :         struct tevent_req *req;
    3899             :         struct dcerpc_netr_DatabaseSync2_r_state *state;
    3900             :         struct tevent_req *subreq;
    3901             : 
    3902           0 :         req = tevent_req_create(mem_ctx, &state,
    3903             :                                 struct dcerpc_netr_DatabaseSync2_r_state);
    3904           0 :         if (req == NULL) {
    3905           0 :                 return NULL;
    3906             :         }
    3907             : 
    3908           0 :         state->out_mem_ctx = talloc_new(state);
    3909           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3910           0 :                 return tevent_req_post(req, ev);
    3911             :         }
    3912             : 
    3913           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3914             :                         NULL, &ndr_table_netlogon,
    3915           0 :                         NDR_NETR_DATABASESYNC2, state->out_mem_ctx, r);
    3916           0 :         if (tevent_req_nomem(subreq, req)) {
    3917           0 :                 return tevent_req_post(req, ev);
    3918             :         }
    3919           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DatabaseSync2_r_done, req);
    3920             : 
    3921           0 :         return req;
    3922             : }
    3923             : 
    3924           0 : static void dcerpc_netr_DatabaseSync2_r_done(struct tevent_req *subreq)
    3925             : {
    3926           0 :         struct tevent_req *req =
    3927           0 :                 tevent_req_callback_data(subreq,
    3928             :                 struct tevent_req);
    3929             :         NTSTATUS status;
    3930             : 
    3931           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3932           0 :         TALLOC_FREE(subreq);
    3933           0 :         if (tevent_req_nterror(req, status)) {
    3934           0 :                 return;
    3935             :         }
    3936             : 
    3937           0 :         tevent_req_done(req);
    3938             : }
    3939             : 
    3940           0 : NTSTATUS dcerpc_netr_DatabaseSync2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3941             : {
    3942           0 :         struct dcerpc_netr_DatabaseSync2_r_state *state =
    3943           0 :                 tevent_req_data(req,
    3944             :                 struct dcerpc_netr_DatabaseSync2_r_state);
    3945             :         NTSTATUS status;
    3946             : 
    3947           0 :         if (tevent_req_is_nterror(req, &status)) {
    3948           0 :                 tevent_req_received(req);
    3949           0 :                 return status;
    3950             :         }
    3951             : 
    3952           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3953             : 
    3954           0 :         tevent_req_received(req);
    3955           0 :         return NT_STATUS_OK;
    3956             : }
    3957             : 
    3958           9 : NTSTATUS dcerpc_netr_DatabaseSync2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_DatabaseSync2 *r)
    3959             : {
    3960             :         NTSTATUS status;
    3961             : 
    3962           9 :         status = dcerpc_binding_handle_call(h,
    3963             :                         NULL, &ndr_table_netlogon,
    3964             :                         NDR_NETR_DATABASESYNC2, mem_ctx, r);
    3965             : 
    3966           9 :         return status;
    3967             : }
    3968             : 
    3969             : struct dcerpc_netr_DatabaseSync2_state {
    3970             :         struct netr_DatabaseSync2 orig;
    3971             :         struct netr_DatabaseSync2 tmp;
    3972             :         TALLOC_CTX *out_mem_ctx;
    3973             : };
    3974             : 
    3975             : static void dcerpc_netr_DatabaseSync2_done(struct tevent_req *subreq);
    3976             : 
    3977           0 : struct tevent_req *dcerpc_netr_DatabaseSync2_send(TALLOC_CTX *mem_ctx,
    3978             :                                                   struct tevent_context *ev,
    3979             :                                                   struct dcerpc_binding_handle *h,
    3980             :                                                   const char *_logon_server /* [in] [charset(UTF16),ref] */,
    3981             :                                                   const char *_computername /* [in] [charset(UTF16),ref] */,
    3982             :                                                   struct netr_Authenticator *_credential /* [in] [ref] */,
    3983             :                                                   struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    3984             :                                                   enum netr_SamDatabaseID _database_id /* [in]  */,
    3985             :                                                   enum SyncStateEnum _restart_state /* [in]  */,
    3986             :                                                   uint32_t *_sync_context /* [in,out] [ref] */,
    3987             :                                                   struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */,
    3988             :                                                   uint32_t _preferredmaximumlength /* [in]  */)
    3989             : {
    3990             :         struct tevent_req *req;
    3991             :         struct dcerpc_netr_DatabaseSync2_state *state;
    3992             :         struct tevent_req *subreq;
    3993             : 
    3994           0 :         req = tevent_req_create(mem_ctx, &state,
    3995             :                                 struct dcerpc_netr_DatabaseSync2_state);
    3996           0 :         if (req == NULL) {
    3997           0 :                 return NULL;
    3998             :         }
    3999           0 :         state->out_mem_ctx = NULL;
    4000             : 
    4001             :         /* In parameters */
    4002           0 :         state->orig.in.logon_server = _logon_server;
    4003           0 :         state->orig.in.computername = _computername;
    4004           0 :         state->orig.in.credential = _credential;
    4005           0 :         state->orig.in.return_authenticator = _return_authenticator;
    4006           0 :         state->orig.in.database_id = _database_id;
    4007           0 :         state->orig.in.restart_state = _restart_state;
    4008           0 :         state->orig.in.sync_context = _sync_context;
    4009           0 :         state->orig.in.preferredmaximumlength = _preferredmaximumlength;
    4010             : 
    4011             :         /* Out parameters */
    4012           0 :         state->orig.out.return_authenticator = _return_authenticator;
    4013           0 :         state->orig.out.sync_context = _sync_context;
    4014           0 :         state->orig.out.delta_enum_array = _delta_enum_array;
    4015             : 
    4016             :         /* Result */
    4017           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4018             : 
    4019           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4020             :                              "dcerpc_netr_DatabaseSync2_out_memory");
    4021           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4022           0 :                 return tevent_req_post(req, ev);
    4023             :         }
    4024             : 
    4025             :         /* make a temporary copy, that we pass to the dispatch function */
    4026           0 :         state->tmp = state->orig;
    4027             : 
    4028           0 :         subreq = dcerpc_netr_DatabaseSync2_r_send(state, ev, h, &state->tmp);
    4029           0 :         if (tevent_req_nomem(subreq, req)) {
    4030           0 :                 return tevent_req_post(req, ev);
    4031             :         }
    4032           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DatabaseSync2_done, req);
    4033           0 :         return req;
    4034             : }
    4035             : 
    4036           0 : static void dcerpc_netr_DatabaseSync2_done(struct tevent_req *subreq)
    4037             : {
    4038           0 :         struct tevent_req *req = tevent_req_callback_data(
    4039             :                 subreq, struct tevent_req);
    4040           0 :         struct dcerpc_netr_DatabaseSync2_state *state = tevent_req_data(
    4041             :                 req, struct dcerpc_netr_DatabaseSync2_state);
    4042             :         NTSTATUS status;
    4043             :         TALLOC_CTX *mem_ctx;
    4044             : 
    4045           0 :         if (state->out_mem_ctx) {
    4046           0 :                 mem_ctx = state->out_mem_ctx;
    4047             :         } else {
    4048           0 :                 mem_ctx = state;
    4049             :         }
    4050             : 
    4051           0 :         status = dcerpc_netr_DatabaseSync2_r_recv(subreq, mem_ctx);
    4052           0 :         TALLOC_FREE(subreq);
    4053           0 :         if (tevent_req_nterror(req, status)) {
    4054           0 :                 return;
    4055             :         }
    4056             : 
    4057             :         /* Copy out parameters */
    4058           0 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    4059           0 :         *state->orig.out.sync_context = *state->tmp.out.sync_context;
    4060           0 :         *state->orig.out.delta_enum_array = *state->tmp.out.delta_enum_array;
    4061             : 
    4062             :         /* Copy result */
    4063           0 :         state->orig.out.result = state->tmp.out.result;
    4064             : 
    4065             :         /* Reset temporary structure */
    4066           0 :         NDR_ZERO_STRUCT(state->tmp);
    4067             : 
    4068           0 :         tevent_req_done(req);
    4069             : }
    4070             : 
    4071           0 : NTSTATUS dcerpc_netr_DatabaseSync2_recv(struct tevent_req *req,
    4072             :                                         TALLOC_CTX *mem_ctx,
    4073             :                                         NTSTATUS *result)
    4074             : {
    4075           0 :         struct dcerpc_netr_DatabaseSync2_state *state = tevent_req_data(
    4076             :                 req, struct dcerpc_netr_DatabaseSync2_state);
    4077             :         NTSTATUS status;
    4078             : 
    4079           0 :         if (tevent_req_is_nterror(req, &status)) {
    4080           0 :                 tevent_req_received(req);
    4081           0 :                 return status;
    4082             :         }
    4083             : 
    4084             :         /* Steal possible out parameters to the callers context */
    4085           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4086             : 
    4087             :         /* Return result */
    4088           0 :         *result = state->orig.out.result;
    4089             : 
    4090           0 :         tevent_req_received(req);
    4091           0 :         return NT_STATUS_OK;
    4092             : }
    4093             : 
    4094           0 : NTSTATUS dcerpc_netr_DatabaseSync2(struct dcerpc_binding_handle *h,
    4095             :                                    TALLOC_CTX *mem_ctx,
    4096             :                                    const char *_logon_server /* [in] [charset(UTF16),ref] */,
    4097             :                                    const char *_computername /* [in] [charset(UTF16),ref] */,
    4098             :                                    struct netr_Authenticator *_credential /* [in] [ref] */,
    4099             :                                    struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    4100             :                                    enum netr_SamDatabaseID _database_id /* [in]  */,
    4101             :                                    enum SyncStateEnum _restart_state /* [in]  */,
    4102             :                                    uint32_t *_sync_context /* [in,out] [ref] */,
    4103             :                                    struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */,
    4104             :                                    uint32_t _preferredmaximumlength /* [in]  */,
    4105             :                                    NTSTATUS *result)
    4106             : {
    4107             :         struct netr_DatabaseSync2 r;
    4108             :         NTSTATUS status;
    4109             : 
    4110             :         /* In parameters */
    4111           0 :         r.in.logon_server = _logon_server;
    4112           0 :         r.in.computername = _computername;
    4113           0 :         r.in.credential = _credential;
    4114           0 :         r.in.return_authenticator = _return_authenticator;
    4115           0 :         r.in.database_id = _database_id;
    4116           0 :         r.in.restart_state = _restart_state;
    4117           0 :         r.in.sync_context = _sync_context;
    4118           0 :         r.in.preferredmaximumlength = _preferredmaximumlength;
    4119             : 
    4120             :         /* Out parameters */
    4121           0 :         r.out.return_authenticator = _return_authenticator;
    4122           0 :         r.out.sync_context = _sync_context;
    4123           0 :         r.out.delta_enum_array = _delta_enum_array;
    4124             : 
    4125             :         /* Result */
    4126           0 :         NDR_ZERO_STRUCT(r.out.result);
    4127             : 
    4128           0 :         status = dcerpc_netr_DatabaseSync2_r(h, mem_ctx, &r);
    4129           0 :         if (!NT_STATUS_IS_OK(status)) {
    4130           0 :                 return status;
    4131             :         }
    4132             : 
    4133             :         /* Return variables */
    4134           0 :         *_return_authenticator = *r.out.return_authenticator;
    4135           0 :         *_sync_context = *r.out.sync_context;
    4136           0 :         *_delta_enum_array = *r.out.delta_enum_array;
    4137             : 
    4138             :         /* Return result */
    4139           0 :         *result = r.out.result;
    4140             : 
    4141           0 :         return NT_STATUS_OK;
    4142             : }
    4143             : 
    4144             : struct dcerpc_netr_DatabaseRedo_r_state {
    4145             :         TALLOC_CTX *out_mem_ctx;
    4146             : };
    4147             : 
    4148             : static void dcerpc_netr_DatabaseRedo_r_done(struct tevent_req *subreq);
    4149             : 
    4150           0 : struct tevent_req *dcerpc_netr_DatabaseRedo_r_send(TALLOC_CTX *mem_ctx,
    4151             :         struct tevent_context *ev,
    4152             :         struct dcerpc_binding_handle *h,
    4153             :         struct netr_DatabaseRedo *r)
    4154             : {
    4155             :         struct tevent_req *req;
    4156             :         struct dcerpc_netr_DatabaseRedo_r_state *state;
    4157             :         struct tevent_req *subreq;
    4158             : 
    4159           0 :         req = tevent_req_create(mem_ctx, &state,
    4160             :                                 struct dcerpc_netr_DatabaseRedo_r_state);
    4161           0 :         if (req == NULL) {
    4162           0 :                 return NULL;
    4163             :         }
    4164             : 
    4165           0 :         state->out_mem_ctx = talloc_new(state);
    4166           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4167           0 :                 return tevent_req_post(req, ev);
    4168             :         }
    4169             : 
    4170           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4171             :                         NULL, &ndr_table_netlogon,
    4172           0 :                         NDR_NETR_DATABASEREDO, state->out_mem_ctx, r);
    4173           0 :         if (tevent_req_nomem(subreq, req)) {
    4174           0 :                 return tevent_req_post(req, ev);
    4175             :         }
    4176           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DatabaseRedo_r_done, req);
    4177             : 
    4178           0 :         return req;
    4179             : }
    4180             : 
    4181           0 : static void dcerpc_netr_DatabaseRedo_r_done(struct tevent_req *subreq)
    4182             : {
    4183           0 :         struct tevent_req *req =
    4184           0 :                 tevent_req_callback_data(subreq,
    4185             :                 struct tevent_req);
    4186             :         NTSTATUS status;
    4187             : 
    4188           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4189           0 :         TALLOC_FREE(subreq);
    4190           0 :         if (tevent_req_nterror(req, status)) {
    4191           0 :                 return;
    4192             :         }
    4193             : 
    4194           0 :         tevent_req_done(req);
    4195             : }
    4196             : 
    4197           0 : NTSTATUS dcerpc_netr_DatabaseRedo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4198             : {
    4199           0 :         struct dcerpc_netr_DatabaseRedo_r_state *state =
    4200           0 :                 tevent_req_data(req,
    4201             :                 struct dcerpc_netr_DatabaseRedo_r_state);
    4202             :         NTSTATUS status;
    4203             : 
    4204           0 :         if (tevent_req_is_nterror(req, &status)) {
    4205           0 :                 tevent_req_received(req);
    4206           0 :                 return status;
    4207             :         }
    4208             : 
    4209           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4210             : 
    4211           0 :         tevent_req_received(req);
    4212           0 :         return NT_STATUS_OK;
    4213             : }
    4214             : 
    4215          18 : NTSTATUS dcerpc_netr_DatabaseRedo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_DatabaseRedo *r)
    4216             : {
    4217             :         NTSTATUS status;
    4218             : 
    4219          18 :         status = dcerpc_binding_handle_call(h,
    4220             :                         NULL, &ndr_table_netlogon,
    4221             :                         NDR_NETR_DATABASEREDO, mem_ctx, r);
    4222             : 
    4223          18 :         return status;
    4224             : }
    4225             : 
    4226             : struct dcerpc_netr_DatabaseRedo_state {
    4227             :         struct netr_DatabaseRedo orig;
    4228             :         struct netr_DatabaseRedo tmp;
    4229             :         TALLOC_CTX *out_mem_ctx;
    4230             : };
    4231             : 
    4232             : static void dcerpc_netr_DatabaseRedo_done(struct tevent_req *subreq);
    4233             : 
    4234           0 : struct tevent_req *dcerpc_netr_DatabaseRedo_send(TALLOC_CTX *mem_ctx,
    4235             :                                                  struct tevent_context *ev,
    4236             :                                                  struct dcerpc_binding_handle *h,
    4237             :                                                  const char *_logon_server /* [in] [charset(UTF16),ref] */,
    4238             :                                                  const char *_computername /* [in] [charset(UTF16),ref] */,
    4239             :                                                  struct netr_Authenticator *_credential /* [in] [ref] */,
    4240             :                                                  struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    4241             :                                                  struct netr_ChangeLogEntry _change_log_entry /* [in] [subcontext(4)] */,
    4242             :                                                  uint32_t _change_log_entry_size /* [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->flags))] */,
    4243             :                                                  struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */)
    4244             : {
    4245             :         struct tevent_req *req;
    4246             :         struct dcerpc_netr_DatabaseRedo_state *state;
    4247             :         struct tevent_req *subreq;
    4248             : 
    4249           0 :         req = tevent_req_create(mem_ctx, &state,
    4250             :                                 struct dcerpc_netr_DatabaseRedo_state);
    4251           0 :         if (req == NULL) {
    4252           0 :                 return NULL;
    4253             :         }
    4254           0 :         state->out_mem_ctx = NULL;
    4255             : 
    4256             :         /* In parameters */
    4257           0 :         state->orig.in.logon_server = _logon_server;
    4258           0 :         state->orig.in.computername = _computername;
    4259           0 :         state->orig.in.credential = _credential;
    4260           0 :         state->orig.in.return_authenticator = _return_authenticator;
    4261           0 :         state->orig.in.change_log_entry = _change_log_entry;
    4262           0 :         state->orig.in.change_log_entry_size = _change_log_entry_size;
    4263             : 
    4264             :         /* Out parameters */
    4265           0 :         state->orig.out.return_authenticator = _return_authenticator;
    4266           0 :         state->orig.out.delta_enum_array = _delta_enum_array;
    4267             : 
    4268             :         /* Result */
    4269           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4270             : 
    4271           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4272             :                              "dcerpc_netr_DatabaseRedo_out_memory");
    4273           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4274           0 :                 return tevent_req_post(req, ev);
    4275             :         }
    4276             : 
    4277             :         /* make a temporary copy, that we pass to the dispatch function */
    4278           0 :         state->tmp = state->orig;
    4279             : 
    4280           0 :         subreq = dcerpc_netr_DatabaseRedo_r_send(state, ev, h, &state->tmp);
    4281           0 :         if (tevent_req_nomem(subreq, req)) {
    4282           0 :                 return tevent_req_post(req, ev);
    4283             :         }
    4284           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DatabaseRedo_done, req);
    4285           0 :         return req;
    4286             : }
    4287             : 
    4288           0 : static void dcerpc_netr_DatabaseRedo_done(struct tevent_req *subreq)
    4289             : {
    4290           0 :         struct tevent_req *req = tevent_req_callback_data(
    4291             :                 subreq, struct tevent_req);
    4292           0 :         struct dcerpc_netr_DatabaseRedo_state *state = tevent_req_data(
    4293             :                 req, struct dcerpc_netr_DatabaseRedo_state);
    4294             :         NTSTATUS status;
    4295             :         TALLOC_CTX *mem_ctx;
    4296             : 
    4297           0 :         if (state->out_mem_ctx) {
    4298           0 :                 mem_ctx = state->out_mem_ctx;
    4299             :         } else {
    4300           0 :                 mem_ctx = state;
    4301             :         }
    4302             : 
    4303           0 :         status = dcerpc_netr_DatabaseRedo_r_recv(subreq, mem_ctx);
    4304           0 :         TALLOC_FREE(subreq);
    4305           0 :         if (tevent_req_nterror(req, status)) {
    4306           0 :                 return;
    4307             :         }
    4308             : 
    4309             :         /* Copy out parameters */
    4310           0 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    4311           0 :         *state->orig.out.delta_enum_array = *state->tmp.out.delta_enum_array;
    4312             : 
    4313             :         /* Copy result */
    4314           0 :         state->orig.out.result = state->tmp.out.result;
    4315             : 
    4316             :         /* Reset temporary structure */
    4317           0 :         NDR_ZERO_STRUCT(state->tmp);
    4318             : 
    4319           0 :         tevent_req_done(req);
    4320             : }
    4321             : 
    4322           0 : NTSTATUS dcerpc_netr_DatabaseRedo_recv(struct tevent_req *req,
    4323             :                                        TALLOC_CTX *mem_ctx,
    4324             :                                        NTSTATUS *result)
    4325             : {
    4326           0 :         struct dcerpc_netr_DatabaseRedo_state *state = tevent_req_data(
    4327             :                 req, struct dcerpc_netr_DatabaseRedo_state);
    4328             :         NTSTATUS status;
    4329             : 
    4330           0 :         if (tevent_req_is_nterror(req, &status)) {
    4331           0 :                 tevent_req_received(req);
    4332           0 :                 return status;
    4333             :         }
    4334             : 
    4335             :         /* Steal possible out parameters to the callers context */
    4336           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4337             : 
    4338             :         /* Return result */
    4339           0 :         *result = state->orig.out.result;
    4340             : 
    4341           0 :         tevent_req_received(req);
    4342           0 :         return NT_STATUS_OK;
    4343             : }
    4344             : 
    4345           0 : NTSTATUS dcerpc_netr_DatabaseRedo(struct dcerpc_binding_handle *h,
    4346             :                                   TALLOC_CTX *mem_ctx,
    4347             :                                   const char *_logon_server /* [in] [charset(UTF16),ref] */,
    4348             :                                   const char *_computername /* [in] [charset(UTF16),ref] */,
    4349             :                                   struct netr_Authenticator *_credential /* [in] [ref] */,
    4350             :                                   struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    4351             :                                   struct netr_ChangeLogEntry _change_log_entry /* [in] [subcontext(4)] */,
    4352             :                                   uint32_t _change_log_entry_size /* [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->flags))] */,
    4353             :                                   struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */,
    4354             :                                   NTSTATUS *result)
    4355             : {
    4356             :         struct netr_DatabaseRedo r;
    4357             :         NTSTATUS status;
    4358             : 
    4359             :         /* In parameters */
    4360           0 :         r.in.logon_server = _logon_server;
    4361           0 :         r.in.computername = _computername;
    4362           0 :         r.in.credential = _credential;
    4363           0 :         r.in.return_authenticator = _return_authenticator;
    4364           0 :         r.in.change_log_entry = _change_log_entry;
    4365           0 :         r.in.change_log_entry_size = _change_log_entry_size;
    4366             : 
    4367             :         /* Out parameters */
    4368           0 :         r.out.return_authenticator = _return_authenticator;
    4369           0 :         r.out.delta_enum_array = _delta_enum_array;
    4370             : 
    4371             :         /* Result */
    4372           0 :         NDR_ZERO_STRUCT(r.out.result);
    4373             : 
    4374           0 :         status = dcerpc_netr_DatabaseRedo_r(h, mem_ctx, &r);
    4375           0 :         if (!NT_STATUS_IS_OK(status)) {
    4376           0 :                 return status;
    4377             :         }
    4378             : 
    4379             :         /* Return variables */
    4380           0 :         *_return_authenticator = *r.out.return_authenticator;
    4381           0 :         *_delta_enum_array = *r.out.delta_enum_array;
    4382             : 
    4383             :         /* Return result */
    4384           0 :         *result = r.out.result;
    4385             : 
    4386           0 :         return NT_STATUS_OK;
    4387             : }
    4388             : 
    4389             : struct dcerpc_netr_LogonControl2Ex_r_state {
    4390             :         TALLOC_CTX *out_mem_ctx;
    4391             : };
    4392             : 
    4393             : static void dcerpc_netr_LogonControl2Ex_r_done(struct tevent_req *subreq);
    4394             : 
    4395           0 : struct tevent_req *dcerpc_netr_LogonControl2Ex_r_send(TALLOC_CTX *mem_ctx,
    4396             :         struct tevent_context *ev,
    4397             :         struct dcerpc_binding_handle *h,
    4398             :         struct netr_LogonControl2Ex *r)
    4399             : {
    4400             :         struct tevent_req *req;
    4401             :         struct dcerpc_netr_LogonControl2Ex_r_state *state;
    4402             :         struct tevent_req *subreq;
    4403             : 
    4404           0 :         req = tevent_req_create(mem_ctx, &state,
    4405             :                                 struct dcerpc_netr_LogonControl2Ex_r_state);
    4406           0 :         if (req == NULL) {
    4407           0 :                 return NULL;
    4408             :         }
    4409             : 
    4410           0 :         state->out_mem_ctx = talloc_new(state);
    4411           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4412           0 :                 return tevent_req_post(req, ev);
    4413             :         }
    4414             : 
    4415           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4416             :                         NULL, &ndr_table_netlogon,
    4417           0 :                         NDR_NETR_LOGONCONTROL2EX, state->out_mem_ctx, r);
    4418           0 :         if (tevent_req_nomem(subreq, req)) {
    4419           0 :                 return tevent_req_post(req, ev);
    4420             :         }
    4421           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonControl2Ex_r_done, req);
    4422             : 
    4423           0 :         return req;
    4424             : }
    4425             : 
    4426           0 : static void dcerpc_netr_LogonControl2Ex_r_done(struct tevent_req *subreq)
    4427             : {
    4428           0 :         struct tevent_req *req =
    4429           0 :                 tevent_req_callback_data(subreq,
    4430             :                 struct tevent_req);
    4431             :         NTSTATUS status;
    4432             : 
    4433           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4434           0 :         TALLOC_FREE(subreq);
    4435           0 :         if (tevent_req_nterror(req, status)) {
    4436           0 :                 return;
    4437             :         }
    4438             : 
    4439           0 :         tevent_req_done(req);
    4440             : }
    4441             : 
    4442           0 : NTSTATUS dcerpc_netr_LogonControl2Ex_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4443             : {
    4444           0 :         struct dcerpc_netr_LogonControl2Ex_r_state *state =
    4445           0 :                 tevent_req_data(req,
    4446             :                 struct dcerpc_netr_LogonControl2Ex_r_state);
    4447             :         NTSTATUS status;
    4448             : 
    4449           0 :         if (tevent_req_is_nterror(req, &status)) {
    4450           0 :                 tevent_req_received(req);
    4451           0 :                 return status;
    4452             :         }
    4453             : 
    4454           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4455             : 
    4456           0 :         tevent_req_received(req);
    4457           0 :         return NT_STATUS_OK;
    4458             : }
    4459             : 
    4460        1047 : NTSTATUS dcerpc_netr_LogonControl2Ex_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_LogonControl2Ex *r)
    4461             : {
    4462             :         NTSTATUS status;
    4463             : 
    4464        1047 :         status = dcerpc_binding_handle_call(h,
    4465             :                         NULL, &ndr_table_netlogon,
    4466             :                         NDR_NETR_LOGONCONTROL2EX, mem_ctx, r);
    4467             : 
    4468        1047 :         return status;
    4469             : }
    4470             : 
    4471             : struct dcerpc_netr_LogonControl2Ex_state {
    4472             :         struct netr_LogonControl2Ex orig;
    4473             :         struct netr_LogonControl2Ex tmp;
    4474             :         TALLOC_CTX *out_mem_ctx;
    4475             : };
    4476             : 
    4477             : static void dcerpc_netr_LogonControl2Ex_done(struct tevent_req *subreq);
    4478             : 
    4479           0 : struct tevent_req *dcerpc_netr_LogonControl2Ex_send(TALLOC_CTX *mem_ctx,
    4480             :                                                     struct tevent_context *ev,
    4481             :                                                     struct dcerpc_binding_handle *h,
    4482             :                                                     const char *_logon_server /* [in] [charset(UTF16),unique] */,
    4483             :                                                     enum netr_LogonControlCode _function_code /* [in]  */,
    4484             :                                                     uint32_t _level /* [in]  */,
    4485             :                                                     union netr_CONTROL_DATA_INFORMATION *_data /* [in] [ref,switch_is(function_code)] */,
    4486             :                                                     union netr_CONTROL_QUERY_INFORMATION *_query /* [out] [ref,switch_is(level)] */)
    4487             : {
    4488             :         struct tevent_req *req;
    4489             :         struct dcerpc_netr_LogonControl2Ex_state *state;
    4490             :         struct tevent_req *subreq;
    4491             : 
    4492           0 :         req = tevent_req_create(mem_ctx, &state,
    4493             :                                 struct dcerpc_netr_LogonControl2Ex_state);
    4494           0 :         if (req == NULL) {
    4495           0 :                 return NULL;
    4496             :         }
    4497           0 :         state->out_mem_ctx = NULL;
    4498             : 
    4499             :         /* In parameters */
    4500           0 :         state->orig.in.logon_server = _logon_server;
    4501           0 :         state->orig.in.function_code = _function_code;
    4502           0 :         state->orig.in.level = _level;
    4503           0 :         state->orig.in.data = _data;
    4504             : 
    4505             :         /* Out parameters */
    4506           0 :         state->orig.out.query = _query;
    4507             : 
    4508             :         /* Result */
    4509           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4510             : 
    4511           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4512             :                              "dcerpc_netr_LogonControl2Ex_out_memory");
    4513           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4514           0 :                 return tevent_req_post(req, ev);
    4515             :         }
    4516             : 
    4517             :         /* make a temporary copy, that we pass to the dispatch function */
    4518           0 :         state->tmp = state->orig;
    4519             : 
    4520           0 :         subreq = dcerpc_netr_LogonControl2Ex_r_send(state, ev, h, &state->tmp);
    4521           0 :         if (tevent_req_nomem(subreq, req)) {
    4522           0 :                 return tevent_req_post(req, ev);
    4523             :         }
    4524           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonControl2Ex_done, req);
    4525           0 :         return req;
    4526             : }
    4527             : 
    4528           0 : static void dcerpc_netr_LogonControl2Ex_done(struct tevent_req *subreq)
    4529             : {
    4530           0 :         struct tevent_req *req = tevent_req_callback_data(
    4531             :                 subreq, struct tevent_req);
    4532           0 :         struct dcerpc_netr_LogonControl2Ex_state *state = tevent_req_data(
    4533             :                 req, struct dcerpc_netr_LogonControl2Ex_state);
    4534             :         NTSTATUS status;
    4535             :         TALLOC_CTX *mem_ctx;
    4536             : 
    4537           0 :         if (state->out_mem_ctx) {
    4538           0 :                 mem_ctx = state->out_mem_ctx;
    4539             :         } else {
    4540           0 :                 mem_ctx = state;
    4541             :         }
    4542             : 
    4543           0 :         status = dcerpc_netr_LogonControl2Ex_r_recv(subreq, mem_ctx);
    4544           0 :         TALLOC_FREE(subreq);
    4545           0 :         if (tevent_req_nterror(req, status)) {
    4546           0 :                 return;
    4547             :         }
    4548             : 
    4549             :         /* Copy out parameters */
    4550           0 :         *state->orig.out.query = *state->tmp.out.query;
    4551             : 
    4552             :         /* Copy result */
    4553           0 :         state->orig.out.result = state->tmp.out.result;
    4554             : 
    4555             :         /* Reset temporary structure */
    4556           0 :         NDR_ZERO_STRUCT(state->tmp);
    4557             : 
    4558           0 :         tevent_req_done(req);
    4559             : }
    4560             : 
    4561           0 : NTSTATUS dcerpc_netr_LogonControl2Ex_recv(struct tevent_req *req,
    4562             :                                           TALLOC_CTX *mem_ctx,
    4563             :                                           WERROR *result)
    4564             : {
    4565           0 :         struct dcerpc_netr_LogonControl2Ex_state *state = tevent_req_data(
    4566             :                 req, struct dcerpc_netr_LogonControl2Ex_state);
    4567             :         NTSTATUS status;
    4568             : 
    4569           0 :         if (tevent_req_is_nterror(req, &status)) {
    4570           0 :                 tevent_req_received(req);
    4571           0 :                 return status;
    4572             :         }
    4573             : 
    4574             :         /* Steal possible out parameters to the callers context */
    4575           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4576             : 
    4577             :         /* Return result */
    4578           0 :         *result = state->orig.out.result;
    4579             : 
    4580           0 :         tevent_req_received(req);
    4581           0 :         return NT_STATUS_OK;
    4582             : }
    4583             : 
    4584           0 : NTSTATUS dcerpc_netr_LogonControl2Ex(struct dcerpc_binding_handle *h,
    4585             :                                      TALLOC_CTX *mem_ctx,
    4586             :                                      const char *_logon_server /* [in] [charset(UTF16),unique] */,
    4587             :                                      enum netr_LogonControlCode _function_code /* [in]  */,
    4588             :                                      uint32_t _level /* [in]  */,
    4589             :                                      union netr_CONTROL_DATA_INFORMATION *_data /* [in] [ref,switch_is(function_code)] */,
    4590             :                                      union netr_CONTROL_QUERY_INFORMATION *_query /* [out] [ref,switch_is(level)] */,
    4591             :                                      WERROR *result)
    4592             : {
    4593             :         struct netr_LogonControl2Ex r;
    4594             :         NTSTATUS status;
    4595             : 
    4596             :         /* In parameters */
    4597           0 :         r.in.logon_server = _logon_server;
    4598           0 :         r.in.function_code = _function_code;
    4599           0 :         r.in.level = _level;
    4600           0 :         r.in.data = _data;
    4601             : 
    4602             :         /* Out parameters */
    4603           0 :         r.out.query = _query;
    4604             : 
    4605             :         /* Result */
    4606           0 :         NDR_ZERO_STRUCT(r.out.result);
    4607             : 
    4608           0 :         status = dcerpc_netr_LogonControl2Ex_r(h, mem_ctx, &r);
    4609           0 :         if (!NT_STATUS_IS_OK(status)) {
    4610           0 :                 return status;
    4611             :         }
    4612             : 
    4613             :         /* Return variables */
    4614           0 :         *_query = *r.out.query;
    4615             : 
    4616             :         /* Return result */
    4617           0 :         *result = r.out.result;
    4618             : 
    4619           0 :         return NT_STATUS_OK;
    4620             : }
    4621             : 
    4622             : struct dcerpc_netr_NetrEnumerateTrustedDomains_r_state {
    4623             :         TALLOC_CTX *out_mem_ctx;
    4624             : };
    4625             : 
    4626             : static void dcerpc_netr_NetrEnumerateTrustedDomains_r_done(struct tevent_req *subreq);
    4627             : 
    4628           0 : struct tevent_req *dcerpc_netr_NetrEnumerateTrustedDomains_r_send(TALLOC_CTX *mem_ctx,
    4629             :         struct tevent_context *ev,
    4630             :         struct dcerpc_binding_handle *h,
    4631             :         struct netr_NetrEnumerateTrustedDomains *r)
    4632             : {
    4633             :         struct tevent_req *req;
    4634             :         struct dcerpc_netr_NetrEnumerateTrustedDomains_r_state *state;
    4635             :         struct tevent_req *subreq;
    4636             : 
    4637           0 :         req = tevent_req_create(mem_ctx, &state,
    4638             :                                 struct dcerpc_netr_NetrEnumerateTrustedDomains_r_state);
    4639           0 :         if (req == NULL) {
    4640           0 :                 return NULL;
    4641             :         }
    4642             : 
    4643           0 :         state->out_mem_ctx = talloc_new(state);
    4644           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4645           0 :                 return tevent_req_post(req, ev);
    4646             :         }
    4647             : 
    4648           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4649             :                         NULL, &ndr_table_netlogon,
    4650           0 :                         NDR_NETR_NETRENUMERATETRUSTEDDOMAINS, state->out_mem_ctx, r);
    4651           0 :         if (tevent_req_nomem(subreq, req)) {
    4652           0 :                 return tevent_req_post(req, ev);
    4653             :         }
    4654           0 :         tevent_req_set_callback(subreq, dcerpc_netr_NetrEnumerateTrustedDomains_r_done, req);
    4655             : 
    4656           0 :         return req;
    4657             : }
    4658             : 
    4659           0 : static void dcerpc_netr_NetrEnumerateTrustedDomains_r_done(struct tevent_req *subreq)
    4660             : {
    4661           0 :         struct tevent_req *req =
    4662           0 :                 tevent_req_callback_data(subreq,
    4663             :                 struct tevent_req);
    4664             :         NTSTATUS status;
    4665             : 
    4666           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4667           0 :         TALLOC_FREE(subreq);
    4668           0 :         if (tevent_req_nterror(req, status)) {
    4669           0 :                 return;
    4670             :         }
    4671             : 
    4672           0 :         tevent_req_done(req);
    4673             : }
    4674             : 
    4675           0 : NTSTATUS dcerpc_netr_NetrEnumerateTrustedDomains_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4676             : {
    4677           0 :         struct dcerpc_netr_NetrEnumerateTrustedDomains_r_state *state =
    4678           0 :                 tevent_req_data(req,
    4679             :                 struct dcerpc_netr_NetrEnumerateTrustedDomains_r_state);
    4680             :         NTSTATUS status;
    4681             : 
    4682           0 :         if (tevent_req_is_nterror(req, &status)) {
    4683           0 :                 tevent_req_received(req);
    4684           0 :                 return status;
    4685             :         }
    4686             : 
    4687           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4688             : 
    4689           0 :         tevent_req_received(req);
    4690           0 :         return NT_STATUS_OK;
    4691             : }
    4692             : 
    4693          21 : NTSTATUS dcerpc_netr_NetrEnumerateTrustedDomains_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_NetrEnumerateTrustedDomains *r)
    4694             : {
    4695             :         NTSTATUS status;
    4696             : 
    4697          21 :         status = dcerpc_binding_handle_call(h,
    4698             :                         NULL, &ndr_table_netlogon,
    4699             :                         NDR_NETR_NETRENUMERATETRUSTEDDOMAINS, mem_ctx, r);
    4700             : 
    4701          21 :         return status;
    4702             : }
    4703             : 
    4704             : struct dcerpc_netr_NetrEnumerateTrustedDomains_state {
    4705             :         struct netr_NetrEnumerateTrustedDomains orig;
    4706             :         struct netr_NetrEnumerateTrustedDomains tmp;
    4707             :         TALLOC_CTX *out_mem_ctx;
    4708             : };
    4709             : 
    4710             : static void dcerpc_netr_NetrEnumerateTrustedDomains_done(struct tevent_req *subreq);
    4711             : 
    4712           0 : struct tevent_req *dcerpc_netr_NetrEnumerateTrustedDomains_send(TALLOC_CTX *mem_ctx,
    4713             :                                                                 struct tevent_context *ev,
    4714             :                                                                 struct dcerpc_binding_handle *h,
    4715             :                                                                 const char *_server_name /* [in] [charset(UTF16),unique] */,
    4716             :                                                                 struct netr_Blob *_trusted_domains_blob /* [out] [ref] */)
    4717             : {
    4718             :         struct tevent_req *req;
    4719             :         struct dcerpc_netr_NetrEnumerateTrustedDomains_state *state;
    4720             :         struct tevent_req *subreq;
    4721             : 
    4722           0 :         req = tevent_req_create(mem_ctx, &state,
    4723             :                                 struct dcerpc_netr_NetrEnumerateTrustedDomains_state);
    4724           0 :         if (req == NULL) {
    4725           0 :                 return NULL;
    4726             :         }
    4727           0 :         state->out_mem_ctx = NULL;
    4728             : 
    4729             :         /* In parameters */
    4730           0 :         state->orig.in.server_name = _server_name;
    4731             : 
    4732             :         /* Out parameters */
    4733           0 :         state->orig.out.trusted_domains_blob = _trusted_domains_blob;
    4734             : 
    4735             :         /* Result */
    4736           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4737             : 
    4738           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4739             :                              "dcerpc_netr_NetrEnumerateTrustedDomains_out_memory");
    4740           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4741           0 :                 return tevent_req_post(req, ev);
    4742             :         }
    4743             : 
    4744             :         /* make a temporary copy, that we pass to the dispatch function */
    4745           0 :         state->tmp = state->orig;
    4746             : 
    4747           0 :         subreq = dcerpc_netr_NetrEnumerateTrustedDomains_r_send(state, ev, h, &state->tmp);
    4748           0 :         if (tevent_req_nomem(subreq, req)) {
    4749           0 :                 return tevent_req_post(req, ev);
    4750             :         }
    4751           0 :         tevent_req_set_callback(subreq, dcerpc_netr_NetrEnumerateTrustedDomains_done, req);
    4752           0 :         return req;
    4753             : }
    4754             : 
    4755           0 : static void dcerpc_netr_NetrEnumerateTrustedDomains_done(struct tevent_req *subreq)
    4756             : {
    4757           0 :         struct tevent_req *req = tevent_req_callback_data(
    4758             :                 subreq, struct tevent_req);
    4759           0 :         struct dcerpc_netr_NetrEnumerateTrustedDomains_state *state = tevent_req_data(
    4760             :                 req, struct dcerpc_netr_NetrEnumerateTrustedDomains_state);
    4761             :         NTSTATUS status;
    4762             :         TALLOC_CTX *mem_ctx;
    4763             : 
    4764           0 :         if (state->out_mem_ctx) {
    4765           0 :                 mem_ctx = state->out_mem_ctx;
    4766             :         } else {
    4767           0 :                 mem_ctx = state;
    4768             :         }
    4769             : 
    4770           0 :         status = dcerpc_netr_NetrEnumerateTrustedDomains_r_recv(subreq, mem_ctx);
    4771           0 :         TALLOC_FREE(subreq);
    4772           0 :         if (tevent_req_nterror(req, status)) {
    4773           0 :                 return;
    4774             :         }
    4775             : 
    4776             :         /* Copy out parameters */
    4777           0 :         *state->orig.out.trusted_domains_blob = *state->tmp.out.trusted_domains_blob;
    4778             : 
    4779             :         /* Copy result */
    4780           0 :         state->orig.out.result = state->tmp.out.result;
    4781             : 
    4782             :         /* Reset temporary structure */
    4783           0 :         NDR_ZERO_STRUCT(state->tmp);
    4784             : 
    4785           0 :         tevent_req_done(req);
    4786             : }
    4787             : 
    4788           0 : NTSTATUS dcerpc_netr_NetrEnumerateTrustedDomains_recv(struct tevent_req *req,
    4789             :                                                       TALLOC_CTX *mem_ctx,
    4790             :                                                       NTSTATUS *result)
    4791             : {
    4792           0 :         struct dcerpc_netr_NetrEnumerateTrustedDomains_state *state = tevent_req_data(
    4793             :                 req, struct dcerpc_netr_NetrEnumerateTrustedDomains_state);
    4794             :         NTSTATUS status;
    4795             : 
    4796           0 :         if (tevent_req_is_nterror(req, &status)) {
    4797           0 :                 tevent_req_received(req);
    4798           0 :                 return status;
    4799             :         }
    4800             : 
    4801             :         /* Steal possible out parameters to the callers context */
    4802           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4803             : 
    4804             :         /* Return result */
    4805           0 :         *result = state->orig.out.result;
    4806             : 
    4807           0 :         tevent_req_received(req);
    4808           0 :         return NT_STATUS_OK;
    4809             : }
    4810             : 
    4811           0 : NTSTATUS dcerpc_netr_NetrEnumerateTrustedDomains(struct dcerpc_binding_handle *h,
    4812             :                                                  TALLOC_CTX *mem_ctx,
    4813             :                                                  const char *_server_name /* [in] [charset(UTF16),unique] */,
    4814             :                                                  struct netr_Blob *_trusted_domains_blob /* [out] [ref] */,
    4815             :                                                  NTSTATUS *result)
    4816             : {
    4817             :         struct netr_NetrEnumerateTrustedDomains r;
    4818             :         NTSTATUS status;
    4819             : 
    4820             :         /* In parameters */
    4821           0 :         r.in.server_name = _server_name;
    4822             : 
    4823             :         /* Out parameters */
    4824           0 :         r.out.trusted_domains_blob = _trusted_domains_blob;
    4825             : 
    4826             :         /* Result */
    4827           0 :         NDR_ZERO_STRUCT(r.out.result);
    4828             : 
    4829           0 :         status = dcerpc_netr_NetrEnumerateTrustedDomains_r(h, mem_ctx, &r);
    4830           0 :         if (!NT_STATUS_IS_OK(status)) {
    4831           0 :                 return status;
    4832             :         }
    4833             : 
    4834             :         /* Return variables */
    4835           0 :         *_trusted_domains_blob = *r.out.trusted_domains_blob;
    4836             : 
    4837             :         /* Return result */
    4838           0 :         *result = r.out.result;
    4839             : 
    4840           0 :         return NT_STATUS_OK;
    4841             : }
    4842             : 
    4843             : struct dcerpc_netr_DsRGetDCName_r_state {
    4844             :         TALLOC_CTX *out_mem_ctx;
    4845             : };
    4846             : 
    4847             : static void dcerpc_netr_DsRGetDCName_r_done(struct tevent_req *subreq);
    4848             : 
    4849           0 : struct tevent_req *dcerpc_netr_DsRGetDCName_r_send(TALLOC_CTX *mem_ctx,
    4850             :         struct tevent_context *ev,
    4851             :         struct dcerpc_binding_handle *h,
    4852             :         struct netr_DsRGetDCName *r)
    4853             : {
    4854             :         struct tevent_req *req;
    4855             :         struct dcerpc_netr_DsRGetDCName_r_state *state;
    4856             :         struct tevent_req *subreq;
    4857             : 
    4858           0 :         req = tevent_req_create(mem_ctx, &state,
    4859             :                                 struct dcerpc_netr_DsRGetDCName_r_state);
    4860           0 :         if (req == NULL) {
    4861           0 :                 return NULL;
    4862             :         }
    4863             : 
    4864           0 :         state->out_mem_ctx = talloc_new(state);
    4865           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4866           0 :                 return tevent_req_post(req, ev);
    4867             :         }
    4868             : 
    4869           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4870             :                         NULL, &ndr_table_netlogon,
    4871           0 :                         NDR_NETR_DSRGETDCNAME, state->out_mem_ctx, r);
    4872           0 :         if (tevent_req_nomem(subreq, req)) {
    4873           0 :                 return tevent_req_post(req, ev);
    4874             :         }
    4875           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsRGetDCName_r_done, req);
    4876             : 
    4877           0 :         return req;
    4878             : }
    4879             : 
    4880           0 : static void dcerpc_netr_DsRGetDCName_r_done(struct tevent_req *subreq)
    4881             : {
    4882           0 :         struct tevent_req *req =
    4883           0 :                 tevent_req_callback_data(subreq,
    4884             :                 struct tevent_req);
    4885             :         NTSTATUS status;
    4886             : 
    4887           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4888           0 :         TALLOC_FREE(subreq);
    4889           0 :         if (tevent_req_nterror(req, status)) {
    4890           0 :                 return;
    4891             :         }
    4892             : 
    4893           0 :         tevent_req_done(req);
    4894             : }
    4895             : 
    4896           0 : NTSTATUS dcerpc_netr_DsRGetDCName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4897             : {
    4898           0 :         struct dcerpc_netr_DsRGetDCName_r_state *state =
    4899           0 :                 tevent_req_data(req,
    4900             :                 struct dcerpc_netr_DsRGetDCName_r_state);
    4901             :         NTSTATUS status;
    4902             : 
    4903           0 :         if (tevent_req_is_nterror(req, &status)) {
    4904           0 :                 tevent_req_received(req);
    4905           0 :                 return status;
    4906             :         }
    4907             : 
    4908           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4909             : 
    4910           0 :         tevent_req_received(req);
    4911           0 :         return NT_STATUS_OK;
    4912             : }
    4913             : 
    4914          38 : NTSTATUS dcerpc_netr_DsRGetDCName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_DsRGetDCName *r)
    4915             : {
    4916             :         NTSTATUS status;
    4917             : 
    4918          38 :         status = dcerpc_binding_handle_call(h,
    4919             :                         NULL, &ndr_table_netlogon,
    4920             :                         NDR_NETR_DSRGETDCNAME, mem_ctx, r);
    4921             : 
    4922          38 :         return status;
    4923             : }
    4924             : 
    4925             : struct dcerpc_netr_DsRGetDCName_state {
    4926             :         struct netr_DsRGetDCName orig;
    4927             :         struct netr_DsRGetDCName tmp;
    4928             :         TALLOC_CTX *out_mem_ctx;
    4929             : };
    4930             : 
    4931             : static void dcerpc_netr_DsRGetDCName_done(struct tevent_req *subreq);
    4932             : 
    4933           0 : struct tevent_req *dcerpc_netr_DsRGetDCName_send(TALLOC_CTX *mem_ctx,
    4934             :                                                  struct tevent_context *ev,
    4935             :                                                  struct dcerpc_binding_handle *h,
    4936             :                                                  const char *_server_unc /* [in] [charset(UTF16),unique] */,
    4937             :                                                  const char *_domain_name /* [in] [charset(UTF16),unique] */,
    4938             :                                                  struct GUID *_domain_guid /* [in] [unique] */,
    4939             :                                                  struct GUID *_site_guid /* [in] [unique] */,
    4940             :                                                  uint32_t _flags /* [in]  */,
    4941             :                                                  struct netr_DsRGetDCNameInfo **_info /* [out] [ref] */)
    4942             : {
    4943             :         struct tevent_req *req;
    4944             :         struct dcerpc_netr_DsRGetDCName_state *state;
    4945             :         struct tevent_req *subreq;
    4946             : 
    4947           0 :         req = tevent_req_create(mem_ctx, &state,
    4948             :                                 struct dcerpc_netr_DsRGetDCName_state);
    4949           0 :         if (req == NULL) {
    4950           0 :                 return NULL;
    4951             :         }
    4952           0 :         state->out_mem_ctx = NULL;
    4953             : 
    4954             :         /* In parameters */
    4955           0 :         state->orig.in.server_unc = _server_unc;
    4956           0 :         state->orig.in.domain_name = _domain_name;
    4957           0 :         state->orig.in.domain_guid = _domain_guid;
    4958           0 :         state->orig.in.site_guid = _site_guid;
    4959           0 :         state->orig.in.flags = _flags;
    4960             : 
    4961             :         /* Out parameters */
    4962           0 :         state->orig.out.info = _info;
    4963             : 
    4964             :         /* Result */
    4965           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4966             : 
    4967           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4968             :                              "dcerpc_netr_DsRGetDCName_out_memory");
    4969           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4970           0 :                 return tevent_req_post(req, ev);
    4971             :         }
    4972             : 
    4973             :         /* make a temporary copy, that we pass to the dispatch function */
    4974           0 :         state->tmp = state->orig;
    4975             : 
    4976           0 :         subreq = dcerpc_netr_DsRGetDCName_r_send(state, ev, h, &state->tmp);
    4977           0 :         if (tevent_req_nomem(subreq, req)) {
    4978           0 :                 return tevent_req_post(req, ev);
    4979             :         }
    4980           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsRGetDCName_done, req);
    4981           0 :         return req;
    4982             : }
    4983             : 
    4984           0 : static void dcerpc_netr_DsRGetDCName_done(struct tevent_req *subreq)
    4985             : {
    4986           0 :         struct tevent_req *req = tevent_req_callback_data(
    4987             :                 subreq, struct tevent_req);
    4988           0 :         struct dcerpc_netr_DsRGetDCName_state *state = tevent_req_data(
    4989             :                 req, struct dcerpc_netr_DsRGetDCName_state);
    4990             :         NTSTATUS status;
    4991             :         TALLOC_CTX *mem_ctx;
    4992             : 
    4993           0 :         if (state->out_mem_ctx) {
    4994           0 :                 mem_ctx = state->out_mem_ctx;
    4995             :         } else {
    4996           0 :                 mem_ctx = state;
    4997             :         }
    4998             : 
    4999           0 :         status = dcerpc_netr_DsRGetDCName_r_recv(subreq, mem_ctx);
    5000           0 :         TALLOC_FREE(subreq);
    5001           0 :         if (tevent_req_nterror(req, status)) {
    5002           0 :                 return;
    5003             :         }
    5004             : 
    5005             :         /* Copy out parameters */
    5006           0 :         *state->orig.out.info = *state->tmp.out.info;
    5007             : 
    5008             :         /* Copy result */
    5009           0 :         state->orig.out.result = state->tmp.out.result;
    5010             : 
    5011             :         /* Reset temporary structure */
    5012           0 :         NDR_ZERO_STRUCT(state->tmp);
    5013             : 
    5014           0 :         tevent_req_done(req);
    5015             : }
    5016             : 
    5017           0 : NTSTATUS dcerpc_netr_DsRGetDCName_recv(struct tevent_req *req,
    5018             :                                        TALLOC_CTX *mem_ctx,
    5019             :                                        WERROR *result)
    5020             : {
    5021           0 :         struct dcerpc_netr_DsRGetDCName_state *state = tevent_req_data(
    5022             :                 req, struct dcerpc_netr_DsRGetDCName_state);
    5023             :         NTSTATUS status;
    5024             : 
    5025           0 :         if (tevent_req_is_nterror(req, &status)) {
    5026           0 :                 tevent_req_received(req);
    5027           0 :                 return status;
    5028             :         }
    5029             : 
    5030             :         /* Steal possible out parameters to the callers context */
    5031           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5032             : 
    5033             :         /* Return result */
    5034           0 :         *result = state->orig.out.result;
    5035             : 
    5036           0 :         tevent_req_received(req);
    5037           0 :         return NT_STATUS_OK;
    5038             : }
    5039             : 
    5040           2 : NTSTATUS dcerpc_netr_DsRGetDCName(struct dcerpc_binding_handle *h,
    5041             :                                   TALLOC_CTX *mem_ctx,
    5042             :                                   const char *_server_unc /* [in] [charset(UTF16),unique] */,
    5043             :                                   const char *_domain_name /* [in] [charset(UTF16),unique] */,
    5044             :                                   struct GUID *_domain_guid /* [in] [unique] */,
    5045             :                                   struct GUID *_site_guid /* [in] [unique] */,
    5046             :                                   uint32_t _flags /* [in]  */,
    5047             :                                   struct netr_DsRGetDCNameInfo **_info /* [out] [ref] */,
    5048             :                                   WERROR *result)
    5049             : {
    5050             :         struct netr_DsRGetDCName r;
    5051             :         NTSTATUS status;
    5052             : 
    5053             :         /* In parameters */
    5054           2 :         r.in.server_unc = _server_unc;
    5055           2 :         r.in.domain_name = _domain_name;
    5056           2 :         r.in.domain_guid = _domain_guid;
    5057           2 :         r.in.site_guid = _site_guid;
    5058           2 :         r.in.flags = _flags;
    5059             : 
    5060             :         /* Out parameters */
    5061           2 :         r.out.info = _info;
    5062             : 
    5063             :         /* Result */
    5064           2 :         NDR_ZERO_STRUCT(r.out.result);
    5065             : 
    5066           2 :         status = dcerpc_netr_DsRGetDCName_r(h, mem_ctx, &r);
    5067           2 :         if (!NT_STATUS_IS_OK(status)) {
    5068           0 :                 return status;
    5069             :         }
    5070             : 
    5071             :         /* Return variables */
    5072           2 :         *_info = *r.out.info;
    5073             : 
    5074             :         /* Return result */
    5075           2 :         *result = r.out.result;
    5076             : 
    5077           2 :         return NT_STATUS_OK;
    5078             : }
    5079             : 
    5080             : struct dcerpc_netr_LogonGetCapabilities_r_state {
    5081             :         TALLOC_CTX *out_mem_ctx;
    5082             : };
    5083             : 
    5084             : static void dcerpc_netr_LogonGetCapabilities_r_done(struct tevent_req *subreq);
    5085             : 
    5086         188 : struct tevent_req *dcerpc_netr_LogonGetCapabilities_r_send(TALLOC_CTX *mem_ctx,
    5087             :         struct tevent_context *ev,
    5088             :         struct dcerpc_binding_handle *h,
    5089             :         struct netr_LogonGetCapabilities *r)
    5090             : {
    5091             :         struct tevent_req *req;
    5092             :         struct dcerpc_netr_LogonGetCapabilities_r_state *state;
    5093             :         struct tevent_req *subreq;
    5094             : 
    5095         188 :         req = tevent_req_create(mem_ctx, &state,
    5096             :                                 struct dcerpc_netr_LogonGetCapabilities_r_state);
    5097         188 :         if (req == NULL) {
    5098           0 :                 return NULL;
    5099             :         }
    5100             : 
    5101         188 :         state->out_mem_ctx = talloc_new(state);
    5102         188 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5103           0 :                 return tevent_req_post(req, ev);
    5104             :         }
    5105             : 
    5106         188 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5107             :                         NULL, &ndr_table_netlogon,
    5108         188 :                         NDR_NETR_LOGONGETCAPABILITIES, state->out_mem_ctx, r);
    5109         188 :         if (tevent_req_nomem(subreq, req)) {
    5110           0 :                 return tevent_req_post(req, ev);
    5111             :         }
    5112         188 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonGetCapabilities_r_done, req);
    5113             : 
    5114         188 :         return req;
    5115             : }
    5116             : 
    5117         188 : static void dcerpc_netr_LogonGetCapabilities_r_done(struct tevent_req *subreq)
    5118             : {
    5119         156 :         struct tevent_req *req =
    5120         188 :                 tevent_req_callback_data(subreq,
    5121             :                 struct tevent_req);
    5122             :         NTSTATUS status;
    5123             : 
    5124         188 :         status = dcerpc_binding_handle_call_recv(subreq);
    5125         188 :         TALLOC_FREE(subreq);
    5126         188 :         if (tevent_req_nterror(req, status)) {
    5127           0 :                 return;
    5128             :         }
    5129             : 
    5130         188 :         tevent_req_done(req);
    5131             : }
    5132             : 
    5133         188 : NTSTATUS dcerpc_netr_LogonGetCapabilities_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5134             : {
    5135         156 :         struct dcerpc_netr_LogonGetCapabilities_r_state *state =
    5136         188 :                 tevent_req_data(req,
    5137             :                 struct dcerpc_netr_LogonGetCapabilities_r_state);
    5138             :         NTSTATUS status;
    5139             : 
    5140         188 :         if (tevent_req_is_nterror(req, &status)) {
    5141           0 :                 tevent_req_received(req);
    5142           0 :                 return status;
    5143             :         }
    5144             : 
    5145         188 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5146             : 
    5147         188 :         tevent_req_received(req);
    5148         188 :         return NT_STATUS_OK;
    5149             : }
    5150             : 
    5151         552 : NTSTATUS dcerpc_netr_LogonGetCapabilities_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_LogonGetCapabilities *r)
    5152             : {
    5153             :         NTSTATUS status;
    5154             : 
    5155         552 :         status = dcerpc_binding_handle_call(h,
    5156             :                         NULL, &ndr_table_netlogon,
    5157             :                         NDR_NETR_LOGONGETCAPABILITIES, mem_ctx, r);
    5158             : 
    5159         552 :         return status;
    5160             : }
    5161             : 
    5162             : struct dcerpc_netr_LogonGetCapabilities_state {
    5163             :         struct netr_LogonGetCapabilities orig;
    5164             :         struct netr_LogonGetCapabilities tmp;
    5165             :         TALLOC_CTX *out_mem_ctx;
    5166             : };
    5167             : 
    5168             : static void dcerpc_netr_LogonGetCapabilities_done(struct tevent_req *subreq);
    5169             : 
    5170          93 : struct tevent_req *dcerpc_netr_LogonGetCapabilities_send(TALLOC_CTX *mem_ctx,
    5171             :                                                          struct tevent_context *ev,
    5172             :                                                          struct dcerpc_binding_handle *h,
    5173             :                                                          const char *_server_name /* [in] [charset(UTF16),ref] */,
    5174             :                                                          const char *_computer_name /* [in] [charset(UTF16),unique] */,
    5175             :                                                          struct netr_Authenticator *_credential /* [in] [ref] */,
    5176             :                                                          struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    5177             :                                                          uint32_t _query_level /* [in]  */,
    5178             :                                                          union netr_Capabilities *_capabilities /* [out] [ref,switch_is(query_level)] */)
    5179             : {
    5180             :         struct tevent_req *req;
    5181             :         struct dcerpc_netr_LogonGetCapabilities_state *state;
    5182             :         struct tevent_req *subreq;
    5183             : 
    5184          93 :         req = tevent_req_create(mem_ctx, &state,
    5185             :                                 struct dcerpc_netr_LogonGetCapabilities_state);
    5186          93 :         if (req == NULL) {
    5187           0 :                 return NULL;
    5188             :         }
    5189          93 :         state->out_mem_ctx = NULL;
    5190             : 
    5191             :         /* In parameters */
    5192          93 :         state->orig.in.server_name = _server_name;
    5193          93 :         state->orig.in.computer_name = _computer_name;
    5194          93 :         state->orig.in.credential = _credential;
    5195          93 :         state->orig.in.return_authenticator = _return_authenticator;
    5196          93 :         state->orig.in.query_level = _query_level;
    5197             : 
    5198             :         /* Out parameters */
    5199          93 :         state->orig.out.return_authenticator = _return_authenticator;
    5200          93 :         state->orig.out.capabilities = _capabilities;
    5201             : 
    5202             :         /* Result */
    5203          93 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5204             : 
    5205          93 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5206             :                              "dcerpc_netr_LogonGetCapabilities_out_memory");
    5207          93 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5208           0 :                 return tevent_req_post(req, ev);
    5209             :         }
    5210             : 
    5211             :         /* make a temporary copy, that we pass to the dispatch function */
    5212          93 :         state->tmp = state->orig;
    5213             : 
    5214          93 :         subreq = dcerpc_netr_LogonGetCapabilities_r_send(state, ev, h, &state->tmp);
    5215          93 :         if (tevent_req_nomem(subreq, req)) {
    5216           0 :                 return tevent_req_post(req, ev);
    5217             :         }
    5218          93 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonGetCapabilities_done, req);
    5219          93 :         return req;
    5220             : }
    5221             : 
    5222          93 : static void dcerpc_netr_LogonGetCapabilities_done(struct tevent_req *subreq)
    5223             : {
    5224          93 :         struct tevent_req *req = tevent_req_callback_data(
    5225             :                 subreq, struct tevent_req);
    5226          93 :         struct dcerpc_netr_LogonGetCapabilities_state *state = tevent_req_data(
    5227             :                 req, struct dcerpc_netr_LogonGetCapabilities_state);
    5228             :         NTSTATUS status;
    5229             :         TALLOC_CTX *mem_ctx;
    5230             : 
    5231          93 :         if (state->out_mem_ctx) {
    5232          93 :                 mem_ctx = state->out_mem_ctx;
    5233             :         } else {
    5234           0 :                 mem_ctx = state;
    5235             :         }
    5236             : 
    5237          93 :         status = dcerpc_netr_LogonGetCapabilities_r_recv(subreq, mem_ctx);
    5238          93 :         TALLOC_FREE(subreq);
    5239          93 :         if (tevent_req_nterror(req, status)) {
    5240           0 :                 return;
    5241             :         }
    5242             : 
    5243             :         /* Copy out parameters */
    5244          93 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    5245          93 :         *state->orig.out.capabilities = *state->tmp.out.capabilities;
    5246             : 
    5247             :         /* Copy result */
    5248          93 :         state->orig.out.result = state->tmp.out.result;
    5249             : 
    5250             :         /* Reset temporary structure */
    5251          93 :         NDR_ZERO_STRUCT(state->tmp);
    5252             : 
    5253          93 :         tevent_req_done(req);
    5254             : }
    5255             : 
    5256          93 : NTSTATUS dcerpc_netr_LogonGetCapabilities_recv(struct tevent_req *req,
    5257             :                                                TALLOC_CTX *mem_ctx,
    5258             :                                                NTSTATUS *result)
    5259             : {
    5260          93 :         struct dcerpc_netr_LogonGetCapabilities_state *state = tevent_req_data(
    5261             :                 req, struct dcerpc_netr_LogonGetCapabilities_state);
    5262             :         NTSTATUS status;
    5263             : 
    5264          93 :         if (tevent_req_is_nterror(req, &status)) {
    5265           0 :                 tevent_req_received(req);
    5266           0 :                 return status;
    5267             :         }
    5268             : 
    5269             :         /* Steal possible out parameters to the callers context */
    5270          93 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5271             : 
    5272             :         /* Return result */
    5273          93 :         *result = state->orig.out.result;
    5274             : 
    5275          93 :         tevent_req_received(req);
    5276          93 :         return NT_STATUS_OK;
    5277             : }
    5278             : 
    5279           0 : NTSTATUS dcerpc_netr_LogonGetCapabilities(struct dcerpc_binding_handle *h,
    5280             :                                           TALLOC_CTX *mem_ctx,
    5281             :                                           const char *_server_name /* [in] [charset(UTF16),ref] */,
    5282             :                                           const char *_computer_name /* [in] [charset(UTF16),unique] */,
    5283             :                                           struct netr_Authenticator *_credential /* [in] [ref] */,
    5284             :                                           struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    5285             :                                           uint32_t _query_level /* [in]  */,
    5286             :                                           union netr_Capabilities *_capabilities /* [out] [ref,switch_is(query_level)] */,
    5287             :                                           NTSTATUS *result)
    5288             : {
    5289             :         struct netr_LogonGetCapabilities r;
    5290             :         NTSTATUS status;
    5291             : 
    5292             :         /* In parameters */
    5293           0 :         r.in.server_name = _server_name;
    5294           0 :         r.in.computer_name = _computer_name;
    5295           0 :         r.in.credential = _credential;
    5296           0 :         r.in.return_authenticator = _return_authenticator;
    5297           0 :         r.in.query_level = _query_level;
    5298             : 
    5299             :         /* Out parameters */
    5300           0 :         r.out.return_authenticator = _return_authenticator;
    5301           0 :         r.out.capabilities = _capabilities;
    5302             : 
    5303             :         /* Result */
    5304           0 :         NDR_ZERO_STRUCT(r.out.result);
    5305             : 
    5306           0 :         status = dcerpc_netr_LogonGetCapabilities_r(h, mem_ctx, &r);
    5307           0 :         if (!NT_STATUS_IS_OK(status)) {
    5308           0 :                 return status;
    5309             :         }
    5310             : 
    5311             :         /* Return variables */
    5312           0 :         *_return_authenticator = *r.out.return_authenticator;
    5313           0 :         *_capabilities = *r.out.capabilities;
    5314             : 
    5315             :         /* Return result */
    5316           0 :         *result = r.out.result;
    5317             : 
    5318           0 :         return NT_STATUS_OK;
    5319             : }
    5320             : 
    5321             : struct dcerpc_netr_LogonGetTrustRid_r_state {
    5322             :         TALLOC_CTX *out_mem_ctx;
    5323             : };
    5324             : 
    5325             : static void dcerpc_netr_LogonGetTrustRid_r_done(struct tevent_req *subreq);
    5326             : 
    5327           0 : struct tevent_req *dcerpc_netr_LogonGetTrustRid_r_send(TALLOC_CTX *mem_ctx,
    5328             :         struct tevent_context *ev,
    5329             :         struct dcerpc_binding_handle *h,
    5330             :         struct netr_LogonGetTrustRid *r)
    5331             : {
    5332             :         struct tevent_req *req;
    5333             :         struct dcerpc_netr_LogonGetTrustRid_r_state *state;
    5334             :         struct tevent_req *subreq;
    5335             : 
    5336           0 :         req = tevent_req_create(mem_ctx, &state,
    5337             :                                 struct dcerpc_netr_LogonGetTrustRid_r_state);
    5338           0 :         if (req == NULL) {
    5339           0 :                 return NULL;
    5340             :         }
    5341             : 
    5342           0 :         state->out_mem_ctx = talloc_new(state);
    5343           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5344           0 :                 return tevent_req_post(req, ev);
    5345             :         }
    5346             : 
    5347           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5348             :                         NULL, &ndr_table_netlogon,
    5349           0 :                         NDR_NETR_LOGONGETTRUSTRID, state->out_mem_ctx, r);
    5350           0 :         if (tevent_req_nomem(subreq, req)) {
    5351           0 :                 return tevent_req_post(req, ev);
    5352             :         }
    5353           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonGetTrustRid_r_done, req);
    5354             : 
    5355           0 :         return req;
    5356             : }
    5357             : 
    5358           0 : static void dcerpc_netr_LogonGetTrustRid_r_done(struct tevent_req *subreq)
    5359             : {
    5360           0 :         struct tevent_req *req =
    5361           0 :                 tevent_req_callback_data(subreq,
    5362             :                 struct tevent_req);
    5363             :         NTSTATUS status;
    5364             : 
    5365           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5366           0 :         TALLOC_FREE(subreq);
    5367           0 :         if (tevent_req_nterror(req, status)) {
    5368           0 :                 return;
    5369             :         }
    5370             : 
    5371           0 :         tevent_req_done(req);
    5372             : }
    5373             : 
    5374           0 : NTSTATUS dcerpc_netr_LogonGetTrustRid_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5375             : {
    5376           0 :         struct dcerpc_netr_LogonGetTrustRid_r_state *state =
    5377           0 :                 tevent_req_data(req,
    5378             :                 struct dcerpc_netr_LogonGetTrustRid_r_state);
    5379             :         NTSTATUS status;
    5380             : 
    5381           0 :         if (tevent_req_is_nterror(req, &status)) {
    5382           0 :                 tevent_req_received(req);
    5383           0 :                 return status;
    5384             :         }
    5385             : 
    5386           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5387             : 
    5388           0 :         tevent_req_received(req);
    5389           0 :         return NT_STATUS_OK;
    5390             : }
    5391             : 
    5392           0 : NTSTATUS dcerpc_netr_LogonGetTrustRid_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_LogonGetTrustRid *r)
    5393             : {
    5394             :         NTSTATUS status;
    5395             : 
    5396           0 :         status = dcerpc_binding_handle_call(h,
    5397             :                         NULL, &ndr_table_netlogon,
    5398             :                         NDR_NETR_LOGONGETTRUSTRID, mem_ctx, r);
    5399             : 
    5400           0 :         return status;
    5401             : }
    5402             : 
    5403             : struct dcerpc_netr_LogonGetTrustRid_state {
    5404             :         struct netr_LogonGetTrustRid orig;
    5405             :         struct netr_LogonGetTrustRid tmp;
    5406             :         TALLOC_CTX *out_mem_ctx;
    5407             : };
    5408             : 
    5409             : static void dcerpc_netr_LogonGetTrustRid_done(struct tevent_req *subreq);
    5410             : 
    5411           0 : struct tevent_req *dcerpc_netr_LogonGetTrustRid_send(TALLOC_CTX *mem_ctx,
    5412             :                                                      struct tevent_context *ev,
    5413             :                                                      struct dcerpc_binding_handle *h,
    5414             :                                                      const char *_server_name /* [in] [charset(UTF16),unique] */,
    5415             :                                                      const char *_domain_name /* [in] [charset(UTF16),unique] */,
    5416             :                                                      uint32_t *_rid /* [out] [ref] */)
    5417             : {
    5418             :         struct tevent_req *req;
    5419             :         struct dcerpc_netr_LogonGetTrustRid_state *state;
    5420             :         struct tevent_req *subreq;
    5421             : 
    5422           0 :         req = tevent_req_create(mem_ctx, &state,
    5423             :                                 struct dcerpc_netr_LogonGetTrustRid_state);
    5424           0 :         if (req == NULL) {
    5425           0 :                 return NULL;
    5426             :         }
    5427           0 :         state->out_mem_ctx = NULL;
    5428             : 
    5429             :         /* In parameters */
    5430           0 :         state->orig.in.server_name = _server_name;
    5431           0 :         state->orig.in.domain_name = _domain_name;
    5432             : 
    5433             :         /* Out parameters */
    5434           0 :         state->orig.out.rid = _rid;
    5435             : 
    5436             :         /* Result */
    5437           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5438             : 
    5439           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5440             :                              "dcerpc_netr_LogonGetTrustRid_out_memory");
    5441           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5442           0 :                 return tevent_req_post(req, ev);
    5443             :         }
    5444             : 
    5445             :         /* make a temporary copy, that we pass to the dispatch function */
    5446           0 :         state->tmp = state->orig;
    5447             : 
    5448           0 :         subreq = dcerpc_netr_LogonGetTrustRid_r_send(state, ev, h, &state->tmp);
    5449           0 :         if (tevent_req_nomem(subreq, req)) {
    5450           0 :                 return tevent_req_post(req, ev);
    5451             :         }
    5452           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonGetTrustRid_done, req);
    5453           0 :         return req;
    5454             : }
    5455             : 
    5456           0 : static void dcerpc_netr_LogonGetTrustRid_done(struct tevent_req *subreq)
    5457             : {
    5458           0 :         struct tevent_req *req = tevent_req_callback_data(
    5459             :                 subreq, struct tevent_req);
    5460           0 :         struct dcerpc_netr_LogonGetTrustRid_state *state = tevent_req_data(
    5461             :                 req, struct dcerpc_netr_LogonGetTrustRid_state);
    5462             :         NTSTATUS status;
    5463             :         TALLOC_CTX *mem_ctx;
    5464             : 
    5465           0 :         if (state->out_mem_ctx) {
    5466           0 :                 mem_ctx = state->out_mem_ctx;
    5467             :         } else {
    5468           0 :                 mem_ctx = state;
    5469             :         }
    5470             : 
    5471           0 :         status = dcerpc_netr_LogonGetTrustRid_r_recv(subreq, mem_ctx);
    5472           0 :         TALLOC_FREE(subreq);
    5473           0 :         if (tevent_req_nterror(req, status)) {
    5474           0 :                 return;
    5475             :         }
    5476             : 
    5477             :         /* Copy out parameters */
    5478           0 :         *state->orig.out.rid = *state->tmp.out.rid;
    5479             : 
    5480             :         /* Copy result */
    5481           0 :         state->orig.out.result = state->tmp.out.result;
    5482             : 
    5483             :         /* Reset temporary structure */
    5484           0 :         NDR_ZERO_STRUCT(state->tmp);
    5485             : 
    5486           0 :         tevent_req_done(req);
    5487             : }
    5488             : 
    5489           0 : NTSTATUS dcerpc_netr_LogonGetTrustRid_recv(struct tevent_req *req,
    5490             :                                            TALLOC_CTX *mem_ctx,
    5491             :                                            WERROR *result)
    5492             : {
    5493           0 :         struct dcerpc_netr_LogonGetTrustRid_state *state = tevent_req_data(
    5494             :                 req, struct dcerpc_netr_LogonGetTrustRid_state);
    5495             :         NTSTATUS status;
    5496             : 
    5497           0 :         if (tevent_req_is_nterror(req, &status)) {
    5498           0 :                 tevent_req_received(req);
    5499           0 :                 return status;
    5500             :         }
    5501             : 
    5502             :         /* Steal possible out parameters to the callers context */
    5503           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5504             : 
    5505             :         /* Return result */
    5506           0 :         *result = state->orig.out.result;
    5507             : 
    5508           0 :         tevent_req_received(req);
    5509           0 :         return NT_STATUS_OK;
    5510             : }
    5511             : 
    5512           0 : NTSTATUS dcerpc_netr_LogonGetTrustRid(struct dcerpc_binding_handle *h,
    5513             :                                       TALLOC_CTX *mem_ctx,
    5514             :                                       const char *_server_name /* [in] [charset(UTF16),unique] */,
    5515             :                                       const char *_domain_name /* [in] [charset(UTF16),unique] */,
    5516             :                                       uint32_t *_rid /* [out] [ref] */,
    5517             :                                       WERROR *result)
    5518             : {
    5519             :         struct netr_LogonGetTrustRid r;
    5520             :         NTSTATUS status;
    5521             : 
    5522             :         /* In parameters */
    5523           0 :         r.in.server_name = _server_name;
    5524           0 :         r.in.domain_name = _domain_name;
    5525             : 
    5526             :         /* Out parameters */
    5527           0 :         r.out.rid = _rid;
    5528             : 
    5529             :         /* Result */
    5530           0 :         NDR_ZERO_STRUCT(r.out.result);
    5531             : 
    5532           0 :         status = dcerpc_netr_LogonGetTrustRid_r(h, mem_ctx, &r);
    5533           0 :         if (!NT_STATUS_IS_OK(status)) {
    5534           0 :                 return status;
    5535             :         }
    5536             : 
    5537             :         /* Return variables */
    5538           0 :         *_rid = *r.out.rid;
    5539             : 
    5540             :         /* Return result */
    5541           0 :         *result = r.out.result;
    5542             : 
    5543           0 :         return NT_STATUS_OK;
    5544             : }
    5545             : 
    5546             : struct dcerpc_netr_ServerAuthenticate3_r_state {
    5547             :         TALLOC_CTX *out_mem_ctx;
    5548             : };
    5549             : 
    5550             : static void dcerpc_netr_ServerAuthenticate3_r_done(struct tevent_req *subreq);
    5551             : 
    5552         108 : struct tevent_req *dcerpc_netr_ServerAuthenticate3_r_send(TALLOC_CTX *mem_ctx,
    5553             :         struct tevent_context *ev,
    5554             :         struct dcerpc_binding_handle *h,
    5555             :         struct netr_ServerAuthenticate3 *r)
    5556             : {
    5557             :         struct tevent_req *req;
    5558             :         struct dcerpc_netr_ServerAuthenticate3_r_state *state;
    5559             :         struct tevent_req *subreq;
    5560             : 
    5561         108 :         req = tevent_req_create(mem_ctx, &state,
    5562             :                                 struct dcerpc_netr_ServerAuthenticate3_r_state);
    5563         108 :         if (req == NULL) {
    5564           0 :                 return NULL;
    5565             :         }
    5566             : 
    5567         108 :         state->out_mem_ctx = talloc_new(state);
    5568         108 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5569           0 :                 return tevent_req_post(req, ev);
    5570             :         }
    5571             : 
    5572         108 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5573             :                         NULL, &ndr_table_netlogon,
    5574         108 :                         NDR_NETR_SERVERAUTHENTICATE3, state->out_mem_ctx, r);
    5575         108 :         if (tevent_req_nomem(subreq, req)) {
    5576           0 :                 return tevent_req_post(req, ev);
    5577             :         }
    5578         108 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerAuthenticate3_r_done, req);
    5579             : 
    5580         108 :         return req;
    5581             : }
    5582             : 
    5583         108 : static void dcerpc_netr_ServerAuthenticate3_r_done(struct tevent_req *subreq)
    5584             : {
    5585          88 :         struct tevent_req *req =
    5586         108 :                 tevent_req_callback_data(subreq,
    5587             :                 struct tevent_req);
    5588             :         NTSTATUS status;
    5589             : 
    5590         108 :         status = dcerpc_binding_handle_call_recv(subreq);
    5591         108 :         TALLOC_FREE(subreq);
    5592         108 :         if (tevent_req_nterror(req, status)) {
    5593           0 :                 return;
    5594             :         }
    5595             : 
    5596         108 :         tevent_req_done(req);
    5597             : }
    5598             : 
    5599         108 : NTSTATUS dcerpc_netr_ServerAuthenticate3_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5600             : {
    5601          88 :         struct dcerpc_netr_ServerAuthenticate3_r_state *state =
    5602         108 :                 tevent_req_data(req,
    5603             :                 struct dcerpc_netr_ServerAuthenticate3_r_state);
    5604             :         NTSTATUS status;
    5605             : 
    5606         108 :         if (tevent_req_is_nterror(req, &status)) {
    5607           0 :                 tevent_req_received(req);
    5608           0 :                 return status;
    5609             :         }
    5610             : 
    5611         108 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5612             : 
    5613         108 :         tevent_req_received(req);
    5614         108 :         return NT_STATUS_OK;
    5615             : }
    5616             : 
    5617         557 : NTSTATUS dcerpc_netr_ServerAuthenticate3_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_ServerAuthenticate3 *r)
    5618             : {
    5619             :         NTSTATUS status;
    5620             : 
    5621         557 :         status = dcerpc_binding_handle_call(h,
    5622             :                         NULL, &ndr_table_netlogon,
    5623             :                         NDR_NETR_SERVERAUTHENTICATE3, mem_ctx, r);
    5624             : 
    5625         557 :         return status;
    5626             : }
    5627             : 
    5628             : struct dcerpc_netr_ServerAuthenticate3_state {
    5629             :         struct netr_ServerAuthenticate3 orig;
    5630             :         struct netr_ServerAuthenticate3 tmp;
    5631             :         TALLOC_CTX *out_mem_ctx;
    5632             : };
    5633             : 
    5634             : static void dcerpc_netr_ServerAuthenticate3_done(struct tevent_req *subreq);
    5635             : 
    5636         108 : struct tevent_req *dcerpc_netr_ServerAuthenticate3_send(TALLOC_CTX *mem_ctx,
    5637             :                                                         struct tevent_context *ev,
    5638             :                                                         struct dcerpc_binding_handle *h,
    5639             :                                                         const char *_server_name /* [in] [charset(UTF16),unique] */,
    5640             :                                                         const char *_account_name /* [in] [charset(UTF16),ref] */,
    5641             :                                                         enum netr_SchannelType _secure_channel_type /* [in]  */,
    5642             :                                                         const char *_computer_name /* [in] [charset(UTF16),ref] */,
    5643             :                                                         struct netr_Credential *_credentials /* [in] [ref] */,
    5644             :                                                         struct netr_Credential *_return_credentials /* [out] [ref] */,
    5645             :                                                         uint32_t *_negotiate_flags /* [in,out] [ref] */,
    5646             :                                                         uint32_t *_rid /* [out] [ref] */)
    5647             : {
    5648             :         struct tevent_req *req;
    5649             :         struct dcerpc_netr_ServerAuthenticate3_state *state;
    5650             :         struct tevent_req *subreq;
    5651             : 
    5652         108 :         req = tevent_req_create(mem_ctx, &state,
    5653             :                                 struct dcerpc_netr_ServerAuthenticate3_state);
    5654         108 :         if (req == NULL) {
    5655           0 :                 return NULL;
    5656             :         }
    5657         108 :         state->out_mem_ctx = NULL;
    5658             : 
    5659             :         /* In parameters */
    5660         108 :         state->orig.in.server_name = _server_name;
    5661         108 :         state->orig.in.account_name = _account_name;
    5662         108 :         state->orig.in.secure_channel_type = _secure_channel_type;
    5663         108 :         state->orig.in.computer_name = _computer_name;
    5664         108 :         state->orig.in.credentials = _credentials;
    5665         108 :         state->orig.in.negotiate_flags = _negotiate_flags;
    5666             : 
    5667             :         /* Out parameters */
    5668         108 :         state->orig.out.return_credentials = _return_credentials;
    5669         108 :         state->orig.out.negotiate_flags = _negotiate_flags;
    5670         108 :         state->orig.out.rid = _rid;
    5671             : 
    5672             :         /* Result */
    5673         108 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5674             : 
    5675         108 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5676             :                              "dcerpc_netr_ServerAuthenticate3_out_memory");
    5677         108 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5678           0 :                 return tevent_req_post(req, ev);
    5679             :         }
    5680             : 
    5681             :         /* make a temporary copy, that we pass to the dispatch function */
    5682         108 :         state->tmp = state->orig;
    5683             : 
    5684         108 :         subreq = dcerpc_netr_ServerAuthenticate3_r_send(state, ev, h, &state->tmp);
    5685         108 :         if (tevent_req_nomem(subreq, req)) {
    5686           0 :                 return tevent_req_post(req, ev);
    5687             :         }
    5688         108 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerAuthenticate3_done, req);
    5689         108 :         return req;
    5690             : }
    5691             : 
    5692         108 : static void dcerpc_netr_ServerAuthenticate3_done(struct tevent_req *subreq)
    5693             : {
    5694         108 :         struct tevent_req *req = tevent_req_callback_data(
    5695             :                 subreq, struct tevent_req);
    5696         108 :         struct dcerpc_netr_ServerAuthenticate3_state *state = tevent_req_data(
    5697             :                 req, struct dcerpc_netr_ServerAuthenticate3_state);
    5698             :         NTSTATUS status;
    5699             :         TALLOC_CTX *mem_ctx;
    5700             : 
    5701         108 :         if (state->out_mem_ctx) {
    5702         108 :                 mem_ctx = state->out_mem_ctx;
    5703             :         } else {
    5704           0 :                 mem_ctx = state;
    5705             :         }
    5706             : 
    5707         108 :         status = dcerpc_netr_ServerAuthenticate3_r_recv(subreq, mem_ctx);
    5708         108 :         TALLOC_FREE(subreq);
    5709         108 :         if (tevent_req_nterror(req, status)) {
    5710           0 :                 return;
    5711             :         }
    5712             : 
    5713             :         /* Copy out parameters */
    5714         108 :         *state->orig.out.return_credentials = *state->tmp.out.return_credentials;
    5715         108 :         *state->orig.out.negotiate_flags = *state->tmp.out.negotiate_flags;
    5716         108 :         *state->orig.out.rid = *state->tmp.out.rid;
    5717             : 
    5718             :         /* Copy result */
    5719         108 :         state->orig.out.result = state->tmp.out.result;
    5720             : 
    5721             :         /* Reset temporary structure */
    5722         108 :         NDR_ZERO_STRUCT(state->tmp);
    5723             : 
    5724         108 :         tevent_req_done(req);
    5725             : }
    5726             : 
    5727         108 : NTSTATUS dcerpc_netr_ServerAuthenticate3_recv(struct tevent_req *req,
    5728             :                                               TALLOC_CTX *mem_ctx,
    5729             :                                               NTSTATUS *result)
    5730             : {
    5731         108 :         struct dcerpc_netr_ServerAuthenticate3_state *state = tevent_req_data(
    5732             :                 req, struct dcerpc_netr_ServerAuthenticate3_state);
    5733             :         NTSTATUS status;
    5734             : 
    5735         108 :         if (tevent_req_is_nterror(req, &status)) {
    5736           0 :                 tevent_req_received(req);
    5737           0 :                 return status;
    5738             :         }
    5739             : 
    5740             :         /* Steal possible out parameters to the callers context */
    5741         108 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5742             : 
    5743             :         /* Return result */
    5744         108 :         *result = state->orig.out.result;
    5745             : 
    5746         108 :         tevent_req_received(req);
    5747         108 :         return NT_STATUS_OK;
    5748             : }
    5749             : 
    5750           0 : NTSTATUS dcerpc_netr_ServerAuthenticate3(struct dcerpc_binding_handle *h,
    5751             :                                          TALLOC_CTX *mem_ctx,
    5752             :                                          const char *_server_name /* [in] [charset(UTF16),unique] */,
    5753             :                                          const char *_account_name /* [in] [charset(UTF16),ref] */,
    5754             :                                          enum netr_SchannelType _secure_channel_type /* [in]  */,
    5755             :                                          const char *_computer_name /* [in] [charset(UTF16),ref] */,
    5756             :                                          struct netr_Credential *_credentials /* [in] [ref] */,
    5757             :                                          struct netr_Credential *_return_credentials /* [out] [ref] */,
    5758             :                                          uint32_t *_negotiate_flags /* [in,out] [ref] */,
    5759             :                                          uint32_t *_rid /* [out] [ref] */,
    5760             :                                          NTSTATUS *result)
    5761             : {
    5762             :         struct netr_ServerAuthenticate3 r;
    5763             :         NTSTATUS status;
    5764             : 
    5765             :         /* In parameters */
    5766           0 :         r.in.server_name = _server_name;
    5767           0 :         r.in.account_name = _account_name;
    5768           0 :         r.in.secure_channel_type = _secure_channel_type;
    5769           0 :         r.in.computer_name = _computer_name;
    5770           0 :         r.in.credentials = _credentials;
    5771           0 :         r.in.negotiate_flags = _negotiate_flags;
    5772             : 
    5773             :         /* Out parameters */
    5774           0 :         r.out.return_credentials = _return_credentials;
    5775           0 :         r.out.negotiate_flags = _negotiate_flags;
    5776           0 :         r.out.rid = _rid;
    5777             : 
    5778             :         /* Result */
    5779           0 :         NDR_ZERO_STRUCT(r.out.result);
    5780             : 
    5781           0 :         status = dcerpc_netr_ServerAuthenticate3_r(h, mem_ctx, &r);
    5782           0 :         if (!NT_STATUS_IS_OK(status)) {
    5783           0 :                 return status;
    5784             :         }
    5785             : 
    5786             :         /* Return variables */
    5787           0 :         *_return_credentials = *r.out.return_credentials;
    5788           0 :         *_negotiate_flags = *r.out.negotiate_flags;
    5789           0 :         *_rid = *r.out.rid;
    5790             : 
    5791             :         /* Return result */
    5792           0 :         *result = r.out.result;
    5793             : 
    5794           0 :         return NT_STATUS_OK;
    5795             : }
    5796             : 
    5797             : struct dcerpc_netr_DsRGetDCNameEx_r_state {
    5798             :         TALLOC_CTX *out_mem_ctx;
    5799             : };
    5800             : 
    5801             : static void dcerpc_netr_DsRGetDCNameEx_r_done(struct tevent_req *subreq);
    5802             : 
    5803           0 : struct tevent_req *dcerpc_netr_DsRGetDCNameEx_r_send(TALLOC_CTX *mem_ctx,
    5804             :         struct tevent_context *ev,
    5805             :         struct dcerpc_binding_handle *h,
    5806             :         struct netr_DsRGetDCNameEx *r)
    5807             : {
    5808             :         struct tevent_req *req;
    5809             :         struct dcerpc_netr_DsRGetDCNameEx_r_state *state;
    5810             :         struct tevent_req *subreq;
    5811             : 
    5812           0 :         req = tevent_req_create(mem_ctx, &state,
    5813             :                                 struct dcerpc_netr_DsRGetDCNameEx_r_state);
    5814           0 :         if (req == NULL) {
    5815           0 :                 return NULL;
    5816             :         }
    5817             : 
    5818           0 :         state->out_mem_ctx = talloc_new(state);
    5819           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5820           0 :                 return tevent_req_post(req, ev);
    5821             :         }
    5822             : 
    5823           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5824             :                         NULL, &ndr_table_netlogon,
    5825           0 :                         NDR_NETR_DSRGETDCNAMEEX, state->out_mem_ctx, r);
    5826           0 :         if (tevent_req_nomem(subreq, req)) {
    5827           0 :                 return tevent_req_post(req, ev);
    5828             :         }
    5829           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsRGetDCNameEx_r_done, req);
    5830             : 
    5831           0 :         return req;
    5832             : }
    5833             : 
    5834           0 : static void dcerpc_netr_DsRGetDCNameEx_r_done(struct tevent_req *subreq)
    5835             : {
    5836           0 :         struct tevent_req *req =
    5837           0 :                 tevent_req_callback_data(subreq,
    5838             :                 struct tevent_req);
    5839             :         NTSTATUS status;
    5840             : 
    5841           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5842           0 :         TALLOC_FREE(subreq);
    5843           0 :         if (tevent_req_nterror(req, status)) {
    5844           0 :                 return;
    5845             :         }
    5846             : 
    5847           0 :         tevent_req_done(req);
    5848             : }
    5849             : 
    5850           0 : NTSTATUS dcerpc_netr_DsRGetDCNameEx_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5851             : {
    5852           0 :         struct dcerpc_netr_DsRGetDCNameEx_r_state *state =
    5853           0 :                 tevent_req_data(req,
    5854             :                 struct dcerpc_netr_DsRGetDCNameEx_r_state);
    5855             :         NTSTATUS status;
    5856             : 
    5857           0 :         if (tevent_req_is_nterror(req, &status)) {
    5858           0 :                 tevent_req_received(req);
    5859           0 :                 return status;
    5860             :         }
    5861             : 
    5862           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5863             : 
    5864           0 :         tevent_req_received(req);
    5865           0 :         return NT_STATUS_OK;
    5866             : }
    5867             : 
    5868          64 : NTSTATUS dcerpc_netr_DsRGetDCNameEx_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_DsRGetDCNameEx *r)
    5869             : {
    5870             :         NTSTATUS status;
    5871             : 
    5872          64 :         status = dcerpc_binding_handle_call(h,
    5873             :                         NULL, &ndr_table_netlogon,
    5874             :                         NDR_NETR_DSRGETDCNAMEEX, mem_ctx, r);
    5875             : 
    5876          64 :         return status;
    5877             : }
    5878             : 
    5879             : struct dcerpc_netr_DsRGetDCNameEx_state {
    5880             :         struct netr_DsRGetDCNameEx orig;
    5881             :         struct netr_DsRGetDCNameEx tmp;
    5882             :         TALLOC_CTX *out_mem_ctx;
    5883             : };
    5884             : 
    5885             : static void dcerpc_netr_DsRGetDCNameEx_done(struct tevent_req *subreq);
    5886             : 
    5887           0 : struct tevent_req *dcerpc_netr_DsRGetDCNameEx_send(TALLOC_CTX *mem_ctx,
    5888             :                                                    struct tevent_context *ev,
    5889             :                                                    struct dcerpc_binding_handle *h,
    5890             :                                                    const char *_server_unc /* [in] [charset(UTF16),unique] */,
    5891             :                                                    const char *_domain_name /* [in] [charset(UTF16),unique] */,
    5892             :                                                    struct GUID *_domain_guid /* [in] [unique] */,
    5893             :                                                    const char *_site_name /* [in] [charset(UTF16),unique] */,
    5894             :                                                    uint32_t _flags /* [in]  */,
    5895             :                                                    struct netr_DsRGetDCNameInfo **_info /* [out] [ref] */)
    5896             : {
    5897             :         struct tevent_req *req;
    5898             :         struct dcerpc_netr_DsRGetDCNameEx_state *state;
    5899             :         struct tevent_req *subreq;
    5900             : 
    5901           0 :         req = tevent_req_create(mem_ctx, &state,
    5902             :                                 struct dcerpc_netr_DsRGetDCNameEx_state);
    5903           0 :         if (req == NULL) {
    5904           0 :                 return NULL;
    5905             :         }
    5906           0 :         state->out_mem_ctx = NULL;
    5907             : 
    5908             :         /* In parameters */
    5909           0 :         state->orig.in.server_unc = _server_unc;
    5910           0 :         state->orig.in.domain_name = _domain_name;
    5911           0 :         state->orig.in.domain_guid = _domain_guid;
    5912           0 :         state->orig.in.site_name = _site_name;
    5913           0 :         state->orig.in.flags = _flags;
    5914             : 
    5915             :         /* Out parameters */
    5916           0 :         state->orig.out.info = _info;
    5917             : 
    5918             :         /* Result */
    5919           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5920             : 
    5921           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5922             :                              "dcerpc_netr_DsRGetDCNameEx_out_memory");
    5923           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5924           0 :                 return tevent_req_post(req, ev);
    5925             :         }
    5926             : 
    5927             :         /* make a temporary copy, that we pass to the dispatch function */
    5928           0 :         state->tmp = state->orig;
    5929             : 
    5930           0 :         subreq = dcerpc_netr_DsRGetDCNameEx_r_send(state, ev, h, &state->tmp);
    5931           0 :         if (tevent_req_nomem(subreq, req)) {
    5932           0 :                 return tevent_req_post(req, ev);
    5933             :         }
    5934           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsRGetDCNameEx_done, req);
    5935           0 :         return req;
    5936             : }
    5937             : 
    5938           0 : static void dcerpc_netr_DsRGetDCNameEx_done(struct tevent_req *subreq)
    5939             : {
    5940           0 :         struct tevent_req *req = tevent_req_callback_data(
    5941             :                 subreq, struct tevent_req);
    5942           0 :         struct dcerpc_netr_DsRGetDCNameEx_state *state = tevent_req_data(
    5943             :                 req, struct dcerpc_netr_DsRGetDCNameEx_state);
    5944             :         NTSTATUS status;
    5945             :         TALLOC_CTX *mem_ctx;
    5946             : 
    5947           0 :         if (state->out_mem_ctx) {
    5948           0 :                 mem_ctx = state->out_mem_ctx;
    5949             :         } else {
    5950           0 :                 mem_ctx = state;
    5951             :         }
    5952             : 
    5953           0 :         status = dcerpc_netr_DsRGetDCNameEx_r_recv(subreq, mem_ctx);
    5954           0 :         TALLOC_FREE(subreq);
    5955           0 :         if (tevent_req_nterror(req, status)) {
    5956           0 :                 return;
    5957             :         }
    5958             : 
    5959             :         /* Copy out parameters */
    5960           0 :         *state->orig.out.info = *state->tmp.out.info;
    5961             : 
    5962             :         /* Copy result */
    5963           0 :         state->orig.out.result = state->tmp.out.result;
    5964             : 
    5965             :         /* Reset temporary structure */
    5966           0 :         NDR_ZERO_STRUCT(state->tmp);
    5967             : 
    5968           0 :         tevent_req_done(req);
    5969             : }
    5970             : 
    5971           0 : NTSTATUS dcerpc_netr_DsRGetDCNameEx_recv(struct tevent_req *req,
    5972             :                                          TALLOC_CTX *mem_ctx,
    5973             :                                          WERROR *result)
    5974             : {
    5975           0 :         struct dcerpc_netr_DsRGetDCNameEx_state *state = tevent_req_data(
    5976             :                 req, struct dcerpc_netr_DsRGetDCNameEx_state);
    5977             :         NTSTATUS status;
    5978             : 
    5979           0 :         if (tevent_req_is_nterror(req, &status)) {
    5980           0 :                 tevent_req_received(req);
    5981           0 :                 return status;
    5982             :         }
    5983             : 
    5984             :         /* Steal possible out parameters to the callers context */
    5985           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5986             : 
    5987             :         /* Return result */
    5988           0 :         *result = state->orig.out.result;
    5989             : 
    5990           0 :         tevent_req_received(req);
    5991           0 :         return NT_STATUS_OK;
    5992             : }
    5993             : 
    5994           0 : NTSTATUS dcerpc_netr_DsRGetDCNameEx(struct dcerpc_binding_handle *h,
    5995             :                                     TALLOC_CTX *mem_ctx,
    5996             :                                     const char *_server_unc /* [in] [charset(UTF16),unique] */,
    5997             :                                     const char *_domain_name /* [in] [charset(UTF16),unique] */,
    5998             :                                     struct GUID *_domain_guid /* [in] [unique] */,
    5999             :                                     const char *_site_name /* [in] [charset(UTF16),unique] */,
    6000             :                                     uint32_t _flags /* [in]  */,
    6001             :                                     struct netr_DsRGetDCNameInfo **_info /* [out] [ref] */,
    6002             :                                     WERROR *result)
    6003             : {
    6004             :         struct netr_DsRGetDCNameEx r;
    6005             :         NTSTATUS status;
    6006             : 
    6007             :         /* In parameters */
    6008           0 :         r.in.server_unc = _server_unc;
    6009           0 :         r.in.domain_name = _domain_name;
    6010           0 :         r.in.domain_guid = _domain_guid;
    6011           0 :         r.in.site_name = _site_name;
    6012           0 :         r.in.flags = _flags;
    6013             : 
    6014             :         /* Out parameters */
    6015           0 :         r.out.info = _info;
    6016             : 
    6017             :         /* Result */
    6018           0 :         NDR_ZERO_STRUCT(r.out.result);
    6019             : 
    6020           0 :         status = dcerpc_netr_DsRGetDCNameEx_r(h, mem_ctx, &r);
    6021           0 :         if (!NT_STATUS_IS_OK(status)) {
    6022           0 :                 return status;
    6023             :         }
    6024             : 
    6025             :         /* Return variables */
    6026           0 :         *_info = *r.out.info;
    6027             : 
    6028             :         /* Return result */
    6029           0 :         *result = r.out.result;
    6030             : 
    6031           0 :         return NT_STATUS_OK;
    6032             : }
    6033             : 
    6034             : struct dcerpc_netr_DsRGetSiteName_r_state {
    6035             :         TALLOC_CTX *out_mem_ctx;
    6036             : };
    6037             : 
    6038             : static void dcerpc_netr_DsRGetSiteName_r_done(struct tevent_req *subreq);
    6039             : 
    6040           0 : struct tevent_req *dcerpc_netr_DsRGetSiteName_r_send(TALLOC_CTX *mem_ctx,
    6041             :         struct tevent_context *ev,
    6042             :         struct dcerpc_binding_handle *h,
    6043             :         struct netr_DsRGetSiteName *r)
    6044             : {
    6045             :         struct tevent_req *req;
    6046             :         struct dcerpc_netr_DsRGetSiteName_r_state *state;
    6047             :         struct tevent_req *subreq;
    6048             : 
    6049           0 :         req = tevent_req_create(mem_ctx, &state,
    6050             :                                 struct dcerpc_netr_DsRGetSiteName_r_state);
    6051           0 :         if (req == NULL) {
    6052           0 :                 return NULL;
    6053             :         }
    6054             : 
    6055           0 :         state->out_mem_ctx = talloc_new(state);
    6056           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6057           0 :                 return tevent_req_post(req, ev);
    6058             :         }
    6059             : 
    6060           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6061             :                         NULL, &ndr_table_netlogon,
    6062           0 :                         NDR_NETR_DSRGETSITENAME, state->out_mem_ctx, r);
    6063           0 :         if (tevent_req_nomem(subreq, req)) {
    6064           0 :                 return tevent_req_post(req, ev);
    6065             :         }
    6066           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsRGetSiteName_r_done, req);
    6067             : 
    6068           0 :         return req;
    6069             : }
    6070             : 
    6071           0 : static void dcerpc_netr_DsRGetSiteName_r_done(struct tevent_req *subreq)
    6072             : {
    6073           0 :         struct tevent_req *req =
    6074           0 :                 tevent_req_callback_data(subreq,
    6075             :                 struct tevent_req);
    6076             :         NTSTATUS status;
    6077             : 
    6078           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6079           0 :         TALLOC_FREE(subreq);
    6080           0 :         if (tevent_req_nterror(req, status)) {
    6081           0 :                 return;
    6082             :         }
    6083             : 
    6084           0 :         tevent_req_done(req);
    6085             : }
    6086             : 
    6087           0 : NTSTATUS dcerpc_netr_DsRGetSiteName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6088             : {
    6089           0 :         struct dcerpc_netr_DsRGetSiteName_r_state *state =
    6090           0 :                 tevent_req_data(req,
    6091             :                 struct dcerpc_netr_DsRGetSiteName_r_state);
    6092             :         NTSTATUS status;
    6093             : 
    6094           0 :         if (tevent_req_is_nterror(req, &status)) {
    6095           0 :                 tevent_req_received(req);
    6096           0 :                 return status;
    6097             :         }
    6098             : 
    6099           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6100             : 
    6101           0 :         tevent_req_received(req);
    6102           0 :         return NT_STATUS_OK;
    6103             : }
    6104             : 
    6105          72 : NTSTATUS dcerpc_netr_DsRGetSiteName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_DsRGetSiteName *r)
    6106             : {
    6107             :         NTSTATUS status;
    6108             : 
    6109          72 :         status = dcerpc_binding_handle_call(h,
    6110             :                         NULL, &ndr_table_netlogon,
    6111             :                         NDR_NETR_DSRGETSITENAME, mem_ctx, r);
    6112             : 
    6113          72 :         return status;
    6114             : }
    6115             : 
    6116             : struct dcerpc_netr_DsRGetSiteName_state {
    6117             :         struct netr_DsRGetSiteName orig;
    6118             :         struct netr_DsRGetSiteName tmp;
    6119             :         TALLOC_CTX *out_mem_ctx;
    6120             : };
    6121             : 
    6122             : static void dcerpc_netr_DsRGetSiteName_done(struct tevent_req *subreq);
    6123             : 
    6124           0 : struct tevent_req *dcerpc_netr_DsRGetSiteName_send(TALLOC_CTX *mem_ctx,
    6125             :                                                    struct tevent_context *ev,
    6126             :                                                    struct dcerpc_binding_handle *h,
    6127             :                                                    const char *_computer_name /* [in] [charset(UTF16),unique] */,
    6128             :                                                    const char **_site /* [out] [charset(UTF16),ref] */)
    6129             : {
    6130             :         struct tevent_req *req;
    6131             :         struct dcerpc_netr_DsRGetSiteName_state *state;
    6132             :         struct tevent_req *subreq;
    6133             : 
    6134           0 :         req = tevent_req_create(mem_ctx, &state,
    6135             :                                 struct dcerpc_netr_DsRGetSiteName_state);
    6136           0 :         if (req == NULL) {
    6137           0 :                 return NULL;
    6138             :         }
    6139           0 :         state->out_mem_ctx = NULL;
    6140             : 
    6141             :         /* In parameters */
    6142           0 :         state->orig.in.computer_name = _computer_name;
    6143             : 
    6144             :         /* Out parameters */
    6145           0 :         state->orig.out.site = _site;
    6146             : 
    6147             :         /* Result */
    6148           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6149             : 
    6150           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6151             :                              "dcerpc_netr_DsRGetSiteName_out_memory");
    6152           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6153           0 :                 return tevent_req_post(req, ev);
    6154             :         }
    6155             : 
    6156             :         /* make a temporary copy, that we pass to the dispatch function */
    6157           0 :         state->tmp = state->orig;
    6158             : 
    6159           0 :         subreq = dcerpc_netr_DsRGetSiteName_r_send(state, ev, h, &state->tmp);
    6160           0 :         if (tevent_req_nomem(subreq, req)) {
    6161           0 :                 return tevent_req_post(req, ev);
    6162             :         }
    6163           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsRGetSiteName_done, req);
    6164           0 :         return req;
    6165             : }
    6166             : 
    6167           0 : static void dcerpc_netr_DsRGetSiteName_done(struct tevent_req *subreq)
    6168             : {
    6169           0 :         struct tevent_req *req = tevent_req_callback_data(
    6170             :                 subreq, struct tevent_req);
    6171           0 :         struct dcerpc_netr_DsRGetSiteName_state *state = tevent_req_data(
    6172             :                 req, struct dcerpc_netr_DsRGetSiteName_state);
    6173             :         NTSTATUS status;
    6174             :         TALLOC_CTX *mem_ctx;
    6175             : 
    6176           0 :         if (state->out_mem_ctx) {
    6177           0 :                 mem_ctx = state->out_mem_ctx;
    6178             :         } else {
    6179           0 :                 mem_ctx = state;
    6180             :         }
    6181             : 
    6182           0 :         status = dcerpc_netr_DsRGetSiteName_r_recv(subreq, mem_ctx);
    6183           0 :         TALLOC_FREE(subreq);
    6184           0 :         if (tevent_req_nterror(req, status)) {
    6185           0 :                 return;
    6186             :         }
    6187             : 
    6188             :         /* Copy out parameters */
    6189           0 :         *state->orig.out.site = *state->tmp.out.site;
    6190             : 
    6191             :         /* Copy result */
    6192           0 :         state->orig.out.result = state->tmp.out.result;
    6193             : 
    6194             :         /* Reset temporary structure */
    6195           0 :         NDR_ZERO_STRUCT(state->tmp);
    6196             : 
    6197           0 :         tevent_req_done(req);
    6198             : }
    6199             : 
    6200           0 : NTSTATUS dcerpc_netr_DsRGetSiteName_recv(struct tevent_req *req,
    6201             :                                          TALLOC_CTX *mem_ctx,
    6202             :                                          WERROR *result)
    6203             : {
    6204           0 :         struct dcerpc_netr_DsRGetSiteName_state *state = tevent_req_data(
    6205             :                 req, struct dcerpc_netr_DsRGetSiteName_state);
    6206             :         NTSTATUS status;
    6207             : 
    6208           0 :         if (tevent_req_is_nterror(req, &status)) {
    6209           0 :                 tevent_req_received(req);
    6210           0 :                 return status;
    6211             :         }
    6212             : 
    6213             :         /* Steal possible out parameters to the callers context */
    6214           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6215             : 
    6216             :         /* Return result */
    6217           0 :         *result = state->orig.out.result;
    6218             : 
    6219           0 :         tevent_req_received(req);
    6220           0 :         return NT_STATUS_OK;
    6221             : }
    6222             : 
    6223           0 : NTSTATUS dcerpc_netr_DsRGetSiteName(struct dcerpc_binding_handle *h,
    6224             :                                     TALLOC_CTX *mem_ctx,
    6225             :                                     const char *_computer_name /* [in] [charset(UTF16),unique] */,
    6226             :                                     const char **_site /* [out] [charset(UTF16),ref] */,
    6227             :                                     WERROR *result)
    6228             : {
    6229             :         struct netr_DsRGetSiteName r;
    6230             :         NTSTATUS status;
    6231             : 
    6232             :         /* In parameters */
    6233           0 :         r.in.computer_name = _computer_name;
    6234             : 
    6235             :         /* Out parameters */
    6236           0 :         r.out.site = _site;
    6237             : 
    6238             :         /* Result */
    6239           0 :         NDR_ZERO_STRUCT(r.out.result);
    6240             : 
    6241           0 :         status = dcerpc_netr_DsRGetSiteName_r(h, mem_ctx, &r);
    6242           0 :         if (!NT_STATUS_IS_OK(status)) {
    6243           0 :                 return status;
    6244             :         }
    6245             : 
    6246             :         /* Return variables */
    6247           0 :         *_site = *r.out.site;
    6248             : 
    6249             :         /* Return result */
    6250           0 :         *result = r.out.result;
    6251             : 
    6252           0 :         return NT_STATUS_OK;
    6253             : }
    6254             : 
    6255             : struct dcerpc_netr_LogonGetDomainInfo_r_state {
    6256             :         TALLOC_CTX *out_mem_ctx;
    6257             : };
    6258             : 
    6259             : static void dcerpc_netr_LogonGetDomainInfo_r_done(struct tevent_req *subreq);
    6260             : 
    6261           0 : struct tevent_req *dcerpc_netr_LogonGetDomainInfo_r_send(TALLOC_CTX *mem_ctx,
    6262             :         struct tevent_context *ev,
    6263             :         struct dcerpc_binding_handle *h,
    6264             :         struct netr_LogonGetDomainInfo *r)
    6265             : {
    6266             :         struct tevent_req *req;
    6267             :         struct dcerpc_netr_LogonGetDomainInfo_r_state *state;
    6268             :         struct tevent_req *subreq;
    6269             : 
    6270           0 :         req = tevent_req_create(mem_ctx, &state,
    6271             :                                 struct dcerpc_netr_LogonGetDomainInfo_r_state);
    6272           0 :         if (req == NULL) {
    6273           0 :                 return NULL;
    6274             :         }
    6275             : 
    6276           0 :         state->out_mem_ctx = talloc_new(state);
    6277           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6278           0 :                 return tevent_req_post(req, ev);
    6279             :         }
    6280             : 
    6281           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6282             :                         NULL, &ndr_table_netlogon,
    6283           0 :                         NDR_NETR_LOGONGETDOMAININFO, state->out_mem_ctx, r);
    6284           0 :         if (tevent_req_nomem(subreq, req)) {
    6285           0 :                 return tevent_req_post(req, ev);
    6286             :         }
    6287           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonGetDomainInfo_r_done, req);
    6288             : 
    6289           0 :         return req;
    6290             : }
    6291             : 
    6292           0 : static void dcerpc_netr_LogonGetDomainInfo_r_done(struct tevent_req *subreq)
    6293             : {
    6294           0 :         struct tevent_req *req =
    6295           0 :                 tevent_req_callback_data(subreq,
    6296             :                 struct tevent_req);
    6297             :         NTSTATUS status;
    6298             : 
    6299           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6300           0 :         TALLOC_FREE(subreq);
    6301           0 :         if (tevent_req_nterror(req, status)) {
    6302           0 :                 return;
    6303             :         }
    6304             : 
    6305           0 :         tevent_req_done(req);
    6306             : }
    6307             : 
    6308           0 : NTSTATUS dcerpc_netr_LogonGetDomainInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6309             : {
    6310           0 :         struct dcerpc_netr_LogonGetDomainInfo_r_state *state =
    6311           0 :                 tevent_req_data(req,
    6312             :                 struct dcerpc_netr_LogonGetDomainInfo_r_state);
    6313             :         NTSTATUS status;
    6314             : 
    6315           0 :         if (tevent_req_is_nterror(req, &status)) {
    6316           0 :                 tevent_req_received(req);
    6317           0 :                 return status;
    6318             :         }
    6319             : 
    6320           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6321             : 
    6322           0 :         tevent_req_received(req);
    6323           0 :         return NT_STATUS_OK;
    6324             : }
    6325             : 
    6326         137 : NTSTATUS dcerpc_netr_LogonGetDomainInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_LogonGetDomainInfo *r)
    6327             : {
    6328             :         NTSTATUS status;
    6329             : 
    6330         137 :         status = dcerpc_binding_handle_call(h,
    6331             :                         NULL, &ndr_table_netlogon,
    6332             :                         NDR_NETR_LOGONGETDOMAININFO, mem_ctx, r);
    6333             : 
    6334         137 :         return status;
    6335             : }
    6336             : 
    6337             : struct dcerpc_netr_LogonGetDomainInfo_state {
    6338             :         struct netr_LogonGetDomainInfo orig;
    6339             :         struct netr_LogonGetDomainInfo tmp;
    6340             :         TALLOC_CTX *out_mem_ctx;
    6341             : };
    6342             : 
    6343             : static void dcerpc_netr_LogonGetDomainInfo_done(struct tevent_req *subreq);
    6344             : 
    6345           0 : struct tevent_req *dcerpc_netr_LogonGetDomainInfo_send(TALLOC_CTX *mem_ctx,
    6346             :                                                        struct tevent_context *ev,
    6347             :                                                        struct dcerpc_binding_handle *h,
    6348             :                                                        const char *_server_name /* [in] [charset(UTF16),ref] */,
    6349             :                                                        const char *_computer_name /* [in] [charset(UTF16),unique] */,
    6350             :                                                        struct netr_Authenticator *_credential /* [in] [ref] */,
    6351             :                                                        struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    6352             :                                                        uint32_t _level /* [in]  */,
    6353             :                                                        union netr_WorkstationInfo *_query /* [in] [ref,switch_is(level)] */,
    6354             :                                                        union netr_DomainInfo *_info /* [out] [ref,switch_is(level)] */)
    6355             : {
    6356             :         struct tevent_req *req;
    6357             :         struct dcerpc_netr_LogonGetDomainInfo_state *state;
    6358             :         struct tevent_req *subreq;
    6359             : 
    6360           0 :         req = tevent_req_create(mem_ctx, &state,
    6361             :                                 struct dcerpc_netr_LogonGetDomainInfo_state);
    6362           0 :         if (req == NULL) {
    6363           0 :                 return NULL;
    6364             :         }
    6365           0 :         state->out_mem_ctx = NULL;
    6366             : 
    6367             :         /* In parameters */
    6368           0 :         state->orig.in.server_name = _server_name;
    6369           0 :         state->orig.in.computer_name = _computer_name;
    6370           0 :         state->orig.in.credential = _credential;
    6371           0 :         state->orig.in.return_authenticator = _return_authenticator;
    6372           0 :         state->orig.in.level = _level;
    6373           0 :         state->orig.in.query = _query;
    6374             : 
    6375             :         /* Out parameters */
    6376           0 :         state->orig.out.return_authenticator = _return_authenticator;
    6377           0 :         state->orig.out.info = _info;
    6378             : 
    6379             :         /* Result */
    6380           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6381             : 
    6382           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6383             :                              "dcerpc_netr_LogonGetDomainInfo_out_memory");
    6384           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6385           0 :                 return tevent_req_post(req, ev);
    6386             :         }
    6387             : 
    6388             :         /* make a temporary copy, that we pass to the dispatch function */
    6389           0 :         state->tmp = state->orig;
    6390             : 
    6391           0 :         subreq = dcerpc_netr_LogonGetDomainInfo_r_send(state, ev, h, &state->tmp);
    6392           0 :         if (tevent_req_nomem(subreq, req)) {
    6393           0 :                 return tevent_req_post(req, ev);
    6394             :         }
    6395           0 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonGetDomainInfo_done, req);
    6396           0 :         return req;
    6397             : }
    6398             : 
    6399           0 : static void dcerpc_netr_LogonGetDomainInfo_done(struct tevent_req *subreq)
    6400             : {
    6401           0 :         struct tevent_req *req = tevent_req_callback_data(
    6402             :                 subreq, struct tevent_req);
    6403           0 :         struct dcerpc_netr_LogonGetDomainInfo_state *state = tevent_req_data(
    6404             :                 req, struct dcerpc_netr_LogonGetDomainInfo_state);
    6405             :         NTSTATUS status;
    6406             :         TALLOC_CTX *mem_ctx;
    6407             : 
    6408           0 :         if (state->out_mem_ctx) {
    6409           0 :                 mem_ctx = state->out_mem_ctx;
    6410             :         } else {
    6411           0 :                 mem_ctx = state;
    6412             :         }
    6413             : 
    6414           0 :         status = dcerpc_netr_LogonGetDomainInfo_r_recv(subreq, mem_ctx);
    6415           0 :         TALLOC_FREE(subreq);
    6416           0 :         if (tevent_req_nterror(req, status)) {
    6417           0 :                 return;
    6418             :         }
    6419             : 
    6420             :         /* Copy out parameters */
    6421           0 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    6422           0 :         *state->orig.out.info = *state->tmp.out.info;
    6423             : 
    6424             :         /* Copy result */
    6425           0 :         state->orig.out.result = state->tmp.out.result;
    6426             : 
    6427             :         /* Reset temporary structure */
    6428           0 :         NDR_ZERO_STRUCT(state->tmp);
    6429             : 
    6430           0 :         tevent_req_done(req);
    6431             : }
    6432             : 
    6433           0 : NTSTATUS dcerpc_netr_LogonGetDomainInfo_recv(struct tevent_req *req,
    6434             :                                              TALLOC_CTX *mem_ctx,
    6435             :                                              NTSTATUS *result)
    6436             : {
    6437           0 :         struct dcerpc_netr_LogonGetDomainInfo_state *state = tevent_req_data(
    6438             :                 req, struct dcerpc_netr_LogonGetDomainInfo_state);
    6439             :         NTSTATUS status;
    6440             : 
    6441           0 :         if (tevent_req_is_nterror(req, &status)) {
    6442           0 :                 tevent_req_received(req);
    6443           0 :                 return status;
    6444             :         }
    6445             : 
    6446             :         /* Steal possible out parameters to the callers context */
    6447           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6448             : 
    6449             :         /* Return result */
    6450           0 :         *result = state->orig.out.result;
    6451             : 
    6452           0 :         tevent_req_received(req);
    6453           0 :         return NT_STATUS_OK;
    6454             : }
    6455             : 
    6456           0 : NTSTATUS dcerpc_netr_LogonGetDomainInfo(struct dcerpc_binding_handle *h,
    6457             :                                         TALLOC_CTX *mem_ctx,
    6458             :                                         const char *_server_name /* [in] [charset(UTF16),ref] */,
    6459             :                                         const char *_computer_name /* [in] [charset(UTF16),unique] */,
    6460             :                                         struct netr_Authenticator *_credential /* [in] [ref] */,
    6461             :                                         struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */,
    6462             :                                         uint32_t _level /* [in]  */,
    6463             :                                         union netr_WorkstationInfo *_query /* [in] [ref,switch_is(level)] */,
    6464             :                                         union netr_DomainInfo *_info /* [out] [ref,switch_is(level)] */,
    6465             :                                         NTSTATUS *result)
    6466             : {
    6467             :         struct netr_LogonGetDomainInfo r;
    6468             :         NTSTATUS status;
    6469             : 
    6470             :         /* In parameters */
    6471           0 :         r.in.server_name = _server_name;
    6472           0 :         r.in.computer_name = _computer_name;
    6473           0 :         r.in.credential = _credential;
    6474           0 :         r.in.return_authenticator = _return_authenticator;
    6475           0 :         r.in.level = _level;
    6476           0 :         r.in.query = _query;
    6477             : 
    6478             :         /* Out parameters */
    6479           0 :         r.out.return_authenticator = _return_authenticator;
    6480           0 :         r.out.info = _info;
    6481             : 
    6482             :         /* Result */
    6483           0 :         NDR_ZERO_STRUCT(r.out.result);
    6484             : 
    6485           0 :         status = dcerpc_netr_LogonGetDomainInfo_r(h, mem_ctx, &r);
    6486           0 :         if (!NT_STATUS_IS_OK(status)) {
    6487           0 :                 return status;
    6488             :         }
    6489             : 
    6490             :         /* Return variables */
    6491           0 :         *_return_authenticator = *r.out.return_authenticator;
    6492           0 :         *_info = *r.out.info;
    6493             : 
    6494             :         /* Return result */
    6495           0 :         *result = r.out.result;
    6496             : 
    6497           0 :         return NT_STATUS_OK;
    6498             : }
    6499             : 
    6500             : struct dcerpc_netr_ServerPasswordSet2_r_state {
    6501             :         TALLOC_CTX *out_mem_ctx;
    6502             : };
    6503             : 
    6504             : static void dcerpc_netr_ServerPasswordSet2_r_done(struct tevent_req *subreq);
    6505             : 
    6506           8 : struct tevent_req *dcerpc_netr_ServerPasswordSet2_r_send(TALLOC_CTX *mem_ctx,
    6507             :         struct tevent_context *ev,
    6508             :         struct dcerpc_binding_handle *h,
    6509             :         struct netr_ServerPasswordSet2 *r)
    6510             : {
    6511             :         struct tevent_req *req;
    6512             :         struct dcerpc_netr_ServerPasswordSet2_r_state *state;
    6513             :         struct tevent_req *subreq;
    6514             : 
    6515           8 :         req = tevent_req_create(mem_ctx, &state,
    6516             :                                 struct dcerpc_netr_ServerPasswordSet2_r_state);
    6517           8 :         if (req == NULL) {
    6518           0 :                 return NULL;
    6519             :         }
    6520             : 
    6521           8 :         state->out_mem_ctx = talloc_new(state);
    6522           8 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6523           0 :                 return tevent_req_post(req, ev);
    6524             :         }
    6525             : 
    6526           8 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6527             :                         NULL, &ndr_table_netlogon,
    6528           8 :                         NDR_NETR_SERVERPASSWORDSET2, state->out_mem_ctx, r);
    6529           8 :         if (tevent_req_nomem(subreq, req)) {
    6530           0 :                 return tevent_req_post(req, ev);
    6531             :         }
    6532           8 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerPasswordSet2_r_done, req);
    6533             : 
    6534           8 :         return req;
    6535             : }
    6536             : 
    6537           8 : static void dcerpc_netr_ServerPasswordSet2_r_done(struct tevent_req *subreq)
    6538             : {
    6539           8 :         struct tevent_req *req =
    6540           8 :                 tevent_req_callback_data(subreq,
    6541             :                 struct tevent_req);
    6542             :         NTSTATUS status;
    6543             : 
    6544           8 :         status = dcerpc_binding_handle_call_recv(subreq);
    6545           8 :         TALLOC_FREE(subreq);
    6546           8 :         if (tevent_req_nterror(req, status)) {
    6547           0 :                 return;
    6548             :         }
    6549             : 
    6550           8 :         tevent_req_done(req);
    6551             : }
    6552             : 
    6553           8 : NTSTATUS dcerpc_netr_ServerPasswordSet2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6554             : {
    6555           8 :         struct dcerpc_netr_ServerPasswordSet2_r_state *state =
    6556           8 :                 tevent_req_data(req,
    6557             :                 struct dcerpc_netr_ServerPasswordSet2_r_state);
    6558             :         NTSTATUS status;
    6559             : 
    6560           8 :         if (tevent_req_is_nterror(req, &status)) {
    6561           0 :                 tevent_req_received(req);
    6562           0 :                 return status;
    6563             :         }
    6564             : 
    6565           8 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6566             : 
    6567           8 :         tevent_req_received(req);
    6568           8 :         return NT_STATUS_OK;
    6569             : }
    6570             : 
    6571         344 : NTSTATUS dcerpc_netr_ServerPasswordSet2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_ServerPasswordSet2 *r)
    6572             : {
    6573             :         NTSTATUS status;
    6574             : 
    6575         344 :         status = dcerpc_binding_handle_call(h,
    6576             :                         NULL, &ndr_table_netlogon,
    6577             :                         NDR_NETR_SERVERPASSWORDSET2, mem_ctx, r);
    6578             : 
    6579         344 :         return status;
    6580             : }
    6581             : 
    6582             : struct dcerpc_netr_ServerPasswordSet2_state {
    6583             :         struct netr_ServerPasswordSet2 orig;
    6584             :         struct netr_ServerPasswordSet2 tmp;
    6585             :         TALLOC_CTX *out_mem_ctx;
    6586             : };
    6587             : 
    6588             : static void dcerpc_netr_ServerPasswordSet2_done(struct tevent_req *subreq);
    6589             : 
    6590           8 : struct tevent_req *dcerpc_netr_ServerPasswordSet2_send(TALLOC_CTX *mem_ctx,
    6591             :                                                        struct tevent_context *ev,
    6592             :                                                        struct dcerpc_binding_handle *h,
    6593             :                                                        const char *_server_name /* [in] [charset(UTF16),unique] */,
    6594             :                                                        const char *_account_name /* [in] [charset(UTF16),ref] */,
    6595             :                                                        enum netr_SchannelType _secure_channel_type /* [in]  */,
    6596             :                                                        const char *_computer_name /* [in] [charset(UTF16),ref] */,
    6597             :                                                        struct netr_Authenticator *_credential /* [in] [ref] */,
    6598             :                                                        struct netr_Authenticator *_return_authenticator /* [out] [ref] */,
    6599             :                                                        struct netr_CryptPassword *_new_password /* [in] [ref] */)
    6600             : {
    6601             :         struct tevent_req *req;
    6602             :         struct dcerpc_netr_ServerPasswordSet2_state *state;
    6603             :         struct tevent_req *subreq;
    6604             : 
    6605           8 :         req = tevent_req_create(mem_ctx, &state,
    6606             :                                 struct dcerpc_netr_ServerPasswordSet2_state);
    6607           8 :         if (req == NULL) {
    6608           0 :                 return NULL;
    6609             :         }
    6610           8 :         state->out_mem_ctx = NULL;
    6611             : 
    6612             :         /* In parameters */
    6613           8 :         state->orig.in.server_name = _server_name;
    6614           8 :         state->orig.in.account_name = _account_name;
    6615           8 :         state->orig.in.secure_channel_type = _secure_channel_type;
    6616           8 :         state->orig.in.computer_name = _computer_name;
    6617           8 :         state->orig.in.credential = _credential;
    6618           8 :         state->orig.in.new_password = _new_password;
    6619             : 
    6620             :         /* Out parameters */
    6621           8 :         state->orig.out.return_authenticator = _return_authenticator;
    6622             : 
    6623             :         /* Result */
    6624           8 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6625             : 
    6626           8 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6627             :                              "dcerpc_netr_ServerPasswordSet2_out_memory");
    6628           8 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6629           0 :                 return tevent_req_post(req, ev);
    6630             :         }
    6631             : 
    6632             :         /* make a temporary copy, that we pass to the dispatch function */
    6633           8 :         state->tmp = state->orig;
    6634             : 
    6635           8 :         subreq = dcerpc_netr_ServerPasswordSet2_r_send(state, ev, h, &state->tmp);
    6636           8 :         if (tevent_req_nomem(subreq, req)) {
    6637           0 :                 return tevent_req_post(req, ev);
    6638             :         }
    6639           8 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerPasswordSet2_done, req);
    6640           8 :         return req;
    6641             : }
    6642             : 
    6643           8 : static void dcerpc_netr_ServerPasswordSet2_done(struct tevent_req *subreq)
    6644             : {
    6645           8 :         struct tevent_req *req = tevent_req_callback_data(
    6646             :                 subreq, struct tevent_req);
    6647           8 :         struct dcerpc_netr_ServerPasswordSet2_state *state = tevent_req_data(
    6648             :                 req, struct dcerpc_netr_ServerPasswordSet2_state);
    6649             :         NTSTATUS status;
    6650             :         TALLOC_CTX *mem_ctx;
    6651             : 
    6652           8 :         if (state->out_mem_ctx) {
    6653           8 :                 mem_ctx = state->out_mem_ctx;
    6654             :         } else {
    6655           0 :                 mem_ctx = state;
    6656             :         }
    6657             : 
    6658           8 :         status = dcerpc_netr_ServerPasswordSet2_r_recv(subreq, mem_ctx);
    6659           8 :         TALLOC_FREE(subreq);
    6660           8 :         if (tevent_req_nterror(req, status)) {
    6661           0 :                 return;
    6662             :         }
    6663             : 
    6664             :         /* Copy out parameters */
    6665           8 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    6666             : 
    6667             :         /* Copy result */
    6668           8 :         state->orig.out.result = state->tmp.out.result;
    6669             : 
    6670             :         /* Reset temporary structure */
    6671           8 :         NDR_ZERO_STRUCT(state->tmp);
    6672             : 
    6673           8 :         tevent_req_done(req);
    6674             : }
    6675             : 
    6676           8 : NTSTATUS dcerpc_netr_ServerPasswordSet2_recv(struct tevent_req *req,
    6677             :                                              TALLOC_CTX *mem_ctx,
    6678             :                                              NTSTATUS *result)
    6679             : {
    6680           8 :         struct dcerpc_netr_ServerPasswordSet2_state *state = tevent_req_data(
    6681             :                 req, struct dcerpc_netr_ServerPasswordSet2_state);
    6682             :         NTSTATUS status;
    6683             : 
    6684           8 :         if (tevent_req_is_nterror(req, &status)) {
    6685           0 :                 tevent_req_received(req);
    6686           0 :                 return status;
    6687             :         }
    6688             : 
    6689             :         /* Steal possible out parameters to the callers context */
    6690           8 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6691             : 
    6692             :         /* Return result */
    6693           8 :         *result = state->orig.out.result;
    6694             : 
    6695           8 :         tevent_req_received(req);
    6696           8 :         return NT_STATUS_OK;
    6697             : }
    6698             : 
    6699           0 : NTSTATUS dcerpc_netr_ServerPasswordSet2(struct dcerpc_binding_handle *h,
    6700             :                                         TALLOC_CTX *mem_ctx,
    6701             :                                         const char *_server_name /* [in] [charset(UTF16),unique] */,
    6702             :                                         const char *_account_name /* [in] [charset(UTF16),ref] */,
    6703             :                                         enum netr_SchannelType _secure_channel_type /* [in]  */,
    6704             :                                         const char *_computer_name /* [in] [charset(UTF16),ref] */,
    6705             :                                         struct netr_Authenticator *_credential /* [in] [ref] */,
    6706             :                                         struct netr_Authenticator *_return_authenticator /* [out] [ref] */,
    6707             :                                         struct netr_CryptPassword *_new_password /* [in] [ref] */,
    6708             :                                         NTSTATUS *result)
    6709             : {
    6710             :         struct netr_ServerPasswordSet2 r;
    6711             :         NTSTATUS status;
    6712             : 
    6713             :         /* In parameters */
    6714           0 :         r.in.server_name = _server_name;
    6715           0 :         r.in.account_name = _account_name;
    6716           0 :         r.in.secure_channel_type = _secure_channel_type;
    6717           0 :         r.in.computer_name = _computer_name;
    6718           0 :         r.in.credential = _credential;
    6719           0 :         r.in.new_password = _new_password;
    6720             : 
    6721             :         /* Out parameters */
    6722           0 :         r.out.return_authenticator = _return_authenticator;
    6723             : 
    6724             :         /* Result */
    6725           0 :         NDR_ZERO_STRUCT(r.out.result);
    6726             : 
    6727           0 :         status = dcerpc_netr_ServerPasswordSet2_r(h, mem_ctx, &r);
    6728           0 :         if (!NT_STATUS_IS_OK(status)) {
    6729           0 :                 return status;
    6730             :         }
    6731             : 
    6732             :         /* Return variables */
    6733           0 :         *_return_authenticator = *r.out.return_authenticator;
    6734             : 
    6735             :         /* Return result */
    6736           0 :         *result = r.out.result;
    6737             : 
    6738           0 :         return NT_STATUS_OK;
    6739             : }
    6740             : 
    6741             : struct dcerpc_netr_ServerPasswordGet_r_state {
    6742             :         TALLOC_CTX *out_mem_ctx;
    6743             : };
    6744             : 
    6745             : static void dcerpc_netr_ServerPasswordGet_r_done(struct tevent_req *subreq);
    6746             : 
    6747           0 : struct tevent_req *dcerpc_netr_ServerPasswordGet_r_send(TALLOC_CTX *mem_ctx,
    6748             :         struct tevent_context *ev,
    6749             :         struct dcerpc_binding_handle *h,
    6750             :         struct netr_ServerPasswordGet *r)
    6751             : {
    6752             :         struct tevent_req *req;
    6753             :         struct dcerpc_netr_ServerPasswordGet_r_state *state;
    6754             :         struct tevent_req *subreq;
    6755             : 
    6756           0 :         req = tevent_req_create(mem_ctx, &state,
    6757             :                                 struct dcerpc_netr_ServerPasswordGet_r_state);
    6758           0 :         if (req == NULL) {
    6759           0 :                 return NULL;
    6760             :         }
    6761             : 
    6762           0 :         state->out_mem_ctx = talloc_new(state);
    6763           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6764           0 :                 return tevent_req_post(req, ev);
    6765             :         }
    6766             : 
    6767           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6768             :                         NULL, &ndr_table_netlogon,
    6769           0 :                         NDR_NETR_SERVERPASSWORDGET, state->out_mem_ctx, r);
    6770           0 :         if (tevent_req_nomem(subreq, req)) {
    6771           0 :                 return tevent_req_post(req, ev);
    6772             :         }
    6773           0 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerPasswordGet_r_done, req);
    6774             : 
    6775           0 :         return req;
    6776             : }
    6777             : 
    6778           0 : static void dcerpc_netr_ServerPasswordGet_r_done(struct tevent_req *subreq)
    6779             : {
    6780           0 :         struct tevent_req *req =
    6781           0 :                 tevent_req_callback_data(subreq,
    6782             :                 struct tevent_req);
    6783             :         NTSTATUS status;
    6784             : 
    6785           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6786           0 :         TALLOC_FREE(subreq);
    6787           0 :         if (tevent_req_nterror(req, status)) {
    6788           0 :                 return;
    6789             :         }
    6790             : 
    6791           0 :         tevent_req_done(req);
    6792             : }
    6793             : 
    6794           0 : NTSTATUS dcerpc_netr_ServerPasswordGet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6795             : {
    6796           0 :         struct dcerpc_netr_ServerPasswordGet_r_state *state =
    6797           0 :                 tevent_req_data(req,
    6798             :                 struct dcerpc_netr_ServerPasswordGet_r_state);
    6799             :         NTSTATUS status;
    6800             : 
    6801           0 :         if (tevent_req_is_nterror(req, &status)) {
    6802           0 :                 tevent_req_received(req);
    6803           0 :                 return status;
    6804             :         }
    6805             : 
    6806           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6807             : 
    6808           0 :         tevent_req_received(req);
    6809           0 :         return NT_STATUS_OK;
    6810             : }
    6811             : 
    6812          18 : NTSTATUS dcerpc_netr_ServerPasswordGet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_ServerPasswordGet *r)
    6813             : {
    6814             :         NTSTATUS status;
    6815             : 
    6816          18 :         status = dcerpc_binding_handle_call(h,
    6817             :                         NULL, &ndr_table_netlogon,
    6818             :                         NDR_NETR_SERVERPASSWORDGET, mem_ctx, r);
    6819             : 
    6820          18 :         return status;
    6821             : }
    6822             : 
    6823             : struct dcerpc_netr_ServerPasswordGet_state {
    6824             :         struct netr_ServerPasswordGet orig;
    6825             :         struct netr_ServerPasswordGet tmp;
    6826             :         TALLOC_CTX *out_mem_ctx;
    6827             : };
    6828             : 
    6829             : static void dcerpc_netr_ServerPasswordGet_done(struct tevent_req *subreq);
    6830             : 
    6831           0 : struct tevent_req *dcerpc_netr_ServerPasswordGet_send(TALLOC_CTX *mem_ctx,
    6832             :                                                       struct tevent_context *ev,
    6833             :                                                       struct dcerpc_binding_handle *h,
    6834             :                                                       const char *_server_name /* [in] [charset(UTF16),unique] */,
    6835             :                                                       const char *_account_name /* [in] [charset(UTF16),ref] */,
    6836             :                                                       enum netr_SchannelType _secure_channel_type /* [in]  */,
    6837             :                                                       const char *_computer_name /* [in] [charset(UTF16),ref] */,
    6838             :                                                       struct netr_Authenticator *_credential /* [in] [ref] */,
    6839             :                                                       struct netr_Authenticator *_return_authenticator /* [out] [ref] */,
    6840             :                                                       struct samr_Password *_password /* [out] [ref] */)
    6841             : {
    6842             :         struct tevent_req *req;
    6843             :         struct dcerpc_netr_ServerPasswordGet_state *state;
    6844             :         struct tevent_req *subreq;
    6845             : 
    6846           0 :         req = tevent_req_create(mem_ctx, &state,
    6847             :                                 struct dcerpc_netr_ServerPasswordGet_state);
    6848           0 :         if (req == NULL) {
    6849           0 :                 return NULL;
    6850             :         }
    6851           0 :         state->out_mem_ctx = NULL;
    6852             : 
    6853             :         /* In parameters */
    6854           0 :         state->orig.in.server_name = _server_name;
    6855           0 :         state->orig.in.account_name = _account_name;
    6856           0 :         state->orig.in.secure_channel_type = _secure_channel_type;
    6857           0 :         state->orig.in.computer_name = _computer_name;
    6858           0 :         state->orig.in.credential = _credential;
    6859             : 
    6860             :         /* Out parameters */
    6861           0 :         state->orig.out.return_authenticator = _return_authenticator;
    6862           0 :         state->orig.out.password = _password;
    6863             : 
    6864             :         /* Result */
    6865           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6866             : 
    6867           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6868             :                              "dcerpc_netr_ServerPasswordGet_out_memory");
    6869           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6870           0 :                 return tevent_req_post(req, ev);
    6871             :         }
    6872             : 
    6873             :         /* make a temporary copy, that we pass to the dispatch function */
    6874           0 :         state->tmp = state->orig;
    6875             : 
    6876           0 :         subreq = dcerpc_netr_ServerPasswordGet_r_send(state, ev, h, &state->tmp);
    6877           0 :         if (tevent_req_nomem(subreq, req)) {
    6878           0 :                 return tevent_req_post(req, ev);
    6879             :         }
    6880           0 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerPasswordGet_done, req);
    6881           0 :         return req;
    6882             : }
    6883             : 
    6884           0 : static void dcerpc_netr_ServerPasswordGet_done(struct tevent_req *subreq)
    6885             : {
    6886           0 :         struct tevent_req *req = tevent_req_callback_data(
    6887             :                 subreq, struct tevent_req);
    6888           0 :         struct dcerpc_netr_ServerPasswordGet_state *state = tevent_req_data(
    6889             :                 req, struct dcerpc_netr_ServerPasswordGet_state);
    6890             :         NTSTATUS status;
    6891             :         TALLOC_CTX *mem_ctx;
    6892             : 
    6893           0 :         if (state->out_mem_ctx) {
    6894           0 :                 mem_ctx = state->out_mem_ctx;
    6895             :         } else {
    6896           0 :                 mem_ctx = state;
    6897             :         }
    6898             : 
    6899           0 :         status = dcerpc_netr_ServerPasswordGet_r_recv(subreq, mem_ctx);
    6900           0 :         TALLOC_FREE(subreq);
    6901           0 :         if (tevent_req_nterror(req, status)) {
    6902           0 :                 return;
    6903             :         }
    6904             : 
    6905             :         /* Copy out parameters */
    6906           0 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    6907           0 :         *state->orig.out.password = *state->tmp.out.password;
    6908             : 
    6909             :         /* Copy result */
    6910           0 :         state->orig.out.result = state->tmp.out.result;
    6911             : 
    6912             :         /* Reset temporary structure */
    6913           0 :         NDR_ZERO_STRUCT(state->tmp);
    6914             : 
    6915           0 :         tevent_req_done(req);
    6916             : }
    6917             : 
    6918           0 : NTSTATUS dcerpc_netr_ServerPasswordGet_recv(struct tevent_req *req,
    6919             :                                             TALLOC_CTX *mem_ctx,
    6920             :                                             NTSTATUS *result)
    6921             : {
    6922           0 :         struct dcerpc_netr_ServerPasswordGet_state *state = tevent_req_data(
    6923             :                 req, struct dcerpc_netr_ServerPasswordGet_state);
    6924             :         NTSTATUS status;
    6925             : 
    6926           0 :         if (tevent_req_is_nterror(req, &status)) {
    6927           0 :                 tevent_req_received(req);
    6928           0 :                 return status;
    6929             :         }
    6930             : 
    6931             :         /* Steal possible out parameters to the callers context */
    6932           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6933             : 
    6934             :         /* Return result */
    6935           0 :         *result = state->orig.out.result;
    6936             : 
    6937           0 :         tevent_req_received(req);
    6938           0 :         return NT_STATUS_OK;
    6939             : }
    6940             : 
    6941           0 : NTSTATUS dcerpc_netr_ServerPasswordGet(struct dcerpc_binding_handle *h,
    6942             :                                        TALLOC_CTX *mem_ctx,
    6943             :                                        const char *_server_name /* [in] [charset(UTF16),unique] */,
    6944             :                                        const char *_account_name /* [in] [charset(UTF16),ref] */,
    6945             :                                        enum netr_SchannelType _secure_channel_type /* [in]  */,
    6946             :                                        const char *_computer_name /* [in] [charset(UTF16),ref] */,
    6947             :                                        struct netr_Authenticator *_credential /* [in] [ref] */,
    6948             :                                        struct netr_Authenticator *_return_authenticator /* [out] [ref] */,
    6949             :                                        struct samr_Password *_password /* [out] [ref] */,
    6950             :                                        NTSTATUS *result)
    6951             : {
    6952             :         struct netr_ServerPasswordGet r;
    6953             :         NTSTATUS status;
    6954             : 
    6955             :         /* In parameters */
    6956           0 :         r.in.server_name = _server_name;
    6957           0 :         r.in.account_name = _account_name;
    6958           0 :         r.in.secure_channel_type = _secure_channel_type;
    6959           0 :         r.in.computer_name = _computer_name;
    6960           0 :         r.in.credential = _credential;
    6961             : 
    6962             :         /* Out parameters */
    6963           0 :         r.out.return_authenticator = _return_authenticator;
    6964           0 :         r.out.password = _password;
    6965             : 
    6966             :         /* Result */
    6967           0 :         NDR_ZERO_STRUCT(r.out.result);
    6968             : 
    6969           0 :         status = dcerpc_netr_ServerPasswordGet_r(h, mem_ctx, &r);
    6970           0 :         if (!NT_STATUS_IS_OK(status)) {
    6971           0 :                 return status;
    6972             :         }
    6973             : 
    6974             :         /* Return variables */
    6975           0 :         *_return_authenticator = *r.out.return_authenticator;
    6976           0 :         *_password = *r.out.password;
    6977             : 
    6978             :         /* Return result */
    6979           0 :         *result = r.out.result;
    6980             : 
    6981           0 :         return NT_STATUS_OK;
    6982             : }
    6983             : 
    6984             : struct dcerpc_netr_NetrLogonSendToSam_r_state {
    6985             :         TALLOC_CTX *out_mem_ctx;
    6986             : };
    6987             : 
    6988             : static void dcerpc_netr_NetrLogonSendToSam_r_done(struct tevent_req *subreq);
    6989             : 
    6990           0 : struct tevent_req *dcerpc_netr_NetrLogonSendToSam_r_send(TALLOC_CTX *mem_ctx,
    6991             :         struct tevent_context *ev,
    6992             :         struct dcerpc_binding_handle *h,
    6993             :         struct netr_NetrLogonSendToSam *r)
    6994             : {
    6995             :         struct tevent_req *req;
    6996             :         struct dcerpc_netr_NetrLogonSendToSam_r_state *state;
    6997             :         struct tevent_req *subreq;
    6998             : 
    6999           0 :         req = tevent_req_create(mem_ctx, &state,
    7000             :                                 struct dcerpc_netr_NetrLogonSendToSam_r_state);
    7001           0 :         if (req == NULL) {
    7002           0 :                 return NULL;
    7003             :         }
    7004             : 
    7005           0 :         state->out_mem_ctx = talloc_new(state);
    7006           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7007           0 :                 return tevent_req_post(req, ev);
    7008             :         }
    7009             : 
    7010           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7011             :                         NULL, &ndr_table_netlogon,
    7012           0 :                         NDR_NETR_NETRLOGONSENDTOSAM, state->out_mem_ctx, r);
    7013           0 :         if (tevent_req_nomem(subreq, req)) {
    7014           0 :                 return tevent_req_post(req, ev);
    7015             :         }
    7016           0 :         tevent_req_set_callback(subreq, dcerpc_netr_NetrLogonSendToSam_r_done, req);
    7017             : 
    7018           0 :         return req;
    7019             : }
    7020             : 
    7021           0 : static void dcerpc_netr_NetrLogonSendToSam_r_done(struct tevent_req *subreq)
    7022             : {
    7023           0 :         struct tevent_req *req =
    7024           0 :                 tevent_req_callback_data(subreq,
    7025             :                 struct tevent_req);
    7026             :         NTSTATUS status;
    7027             : 
    7028           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7029           0 :         TALLOC_FREE(subreq);
    7030           0 :         if (tevent_req_nterror(req, status)) {
    7031           0 :                 return;
    7032             :         }
    7033             : 
    7034           0 :         tevent_req_done(req);
    7035             : }
    7036             : 
    7037           0 : NTSTATUS dcerpc_netr_NetrLogonSendToSam_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7038             : {
    7039           0 :         struct dcerpc_netr_NetrLogonSendToSam_r_state *state =
    7040           0 :                 tevent_req_data(req,
    7041             :                 struct dcerpc_netr_NetrLogonSendToSam_r_state);
    7042             :         NTSTATUS status;
    7043             : 
    7044           0 :         if (tevent_req_is_nterror(req, &status)) {
    7045           0 :                 tevent_req_received(req);
    7046           0 :                 return status;
    7047             :         }
    7048             : 
    7049           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7050             : 
    7051           0 :         tevent_req_received(req);
    7052           0 :         return NT_STATUS_OK;
    7053             : }
    7054             : 
    7055           0 : NTSTATUS dcerpc_netr_NetrLogonSendToSam_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_NetrLogonSendToSam *r)
    7056             : {
    7057             :         NTSTATUS status;
    7058             : 
    7059           0 :         status = dcerpc_binding_handle_call(h,
    7060             :                         NULL, &ndr_table_netlogon,
    7061             :                         NDR_NETR_NETRLOGONSENDTOSAM, mem_ctx, r);
    7062             : 
    7063           0 :         return status;
    7064             : }
    7065             : 
    7066             : struct dcerpc_netr_NetrLogonSendToSam_state {
    7067             :         struct netr_NetrLogonSendToSam orig;
    7068             :         struct netr_NetrLogonSendToSam tmp;
    7069             :         TALLOC_CTX *out_mem_ctx;
    7070             : };
    7071             : 
    7072             : static void dcerpc_netr_NetrLogonSendToSam_done(struct tevent_req *subreq);
    7073             : 
    7074           0 : struct tevent_req *dcerpc_netr_NetrLogonSendToSam_send(TALLOC_CTX *mem_ctx,
    7075             :                                                        struct tevent_context *ev,
    7076             :                                                        struct dcerpc_binding_handle *h,
    7077             :                                                        const char *_server_name /* [in] [charset(UTF16),unique] */,
    7078             :                                                        const char *_computer_name /* [in] [charset(UTF16),ref] */,
    7079             :                                                        struct netr_Authenticator *_credential /* [in] [ref] */,
    7080             :                                                        struct netr_Authenticator *_return_authenticator /* [out] [ref] */,
    7081             :                                                        uint8_t *_opaque_buffer /* [in] [ref,size_is(buffer_len)] */,
    7082             :                                                        uint32_t _buffer_len /* [in]  */)
    7083             : {
    7084             :         struct tevent_req *req;
    7085             :         struct dcerpc_netr_NetrLogonSendToSam_state *state;
    7086             :         struct tevent_req *subreq;
    7087             : 
    7088           0 :         req = tevent_req_create(mem_ctx, &state,
    7089             :                                 struct dcerpc_netr_NetrLogonSendToSam_state);
    7090           0 :         if (req == NULL) {
    7091           0 :                 return NULL;
    7092             :         }
    7093           0 :         state->out_mem_ctx = NULL;
    7094             : 
    7095             :         /* In parameters */
    7096           0 :         state->orig.in.server_name = _server_name;
    7097           0 :         state->orig.in.computer_name = _computer_name;
    7098           0 :         state->orig.in.credential = _credential;
    7099           0 :         state->orig.in.opaque_buffer = _opaque_buffer;
    7100           0 :         state->orig.in.buffer_len = _buffer_len;
    7101             : 
    7102             :         /* Out parameters */
    7103           0 :         state->orig.out.return_authenticator = _return_authenticator;
    7104             : 
    7105             :         /* Result */
    7106           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7107             : 
    7108           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    7109             :                              "dcerpc_netr_NetrLogonSendToSam_out_memory");
    7110           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7111           0 :                 return tevent_req_post(req, ev);
    7112             :         }
    7113             : 
    7114             :         /* make a temporary copy, that we pass to the dispatch function */
    7115           0 :         state->tmp = state->orig;
    7116             : 
    7117           0 :         subreq = dcerpc_netr_NetrLogonSendToSam_r_send(state, ev, h, &state->tmp);
    7118           0 :         if (tevent_req_nomem(subreq, req)) {
    7119           0 :                 return tevent_req_post(req, ev);
    7120             :         }
    7121           0 :         tevent_req_set_callback(subreq, dcerpc_netr_NetrLogonSendToSam_done, req);
    7122           0 :         return req;
    7123             : }
    7124             : 
    7125           0 : static void dcerpc_netr_NetrLogonSendToSam_done(struct tevent_req *subreq)
    7126             : {
    7127           0 :         struct tevent_req *req = tevent_req_callback_data(
    7128             :                 subreq, struct tevent_req);
    7129           0 :         struct dcerpc_netr_NetrLogonSendToSam_state *state = tevent_req_data(
    7130             :                 req, struct dcerpc_netr_NetrLogonSendToSam_state);
    7131             :         NTSTATUS status;
    7132             :         TALLOC_CTX *mem_ctx;
    7133             : 
    7134           0 :         if (state->out_mem_ctx) {
    7135           0 :                 mem_ctx = state->out_mem_ctx;
    7136             :         } else {
    7137           0 :                 mem_ctx = state;
    7138             :         }
    7139             : 
    7140           0 :         status = dcerpc_netr_NetrLogonSendToSam_r_recv(subreq, mem_ctx);
    7141           0 :         TALLOC_FREE(subreq);
    7142           0 :         if (tevent_req_nterror(req, status)) {
    7143           0 :                 return;
    7144             :         }
    7145             : 
    7146             :         /* Copy out parameters */
    7147           0 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    7148             : 
    7149             :         /* Copy result */
    7150           0 :         state->orig.out.result = state->tmp.out.result;
    7151             : 
    7152             :         /* Reset temporary structure */
    7153           0 :         NDR_ZERO_STRUCT(state->tmp);
    7154             : 
    7155           0 :         tevent_req_done(req);
    7156             : }
    7157             : 
    7158           0 : NTSTATUS dcerpc_netr_NetrLogonSendToSam_recv(struct tevent_req *req,
    7159             :                                              TALLOC_CTX *mem_ctx,
    7160             :                                              NTSTATUS *result)
    7161             : {
    7162           0 :         struct dcerpc_netr_NetrLogonSendToSam_state *state = tevent_req_data(
    7163             :                 req, struct dcerpc_netr_NetrLogonSendToSam_state);
    7164             :         NTSTATUS status;
    7165             : 
    7166           0 :         if (tevent_req_is_nterror(req, &status)) {
    7167           0 :                 tevent_req_received(req);
    7168           0 :                 return status;
    7169             :         }
    7170             : 
    7171             :         /* Steal possible out parameters to the callers context */
    7172           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7173             : 
    7174             :         /* Return result */
    7175           0 :         *result = state->orig.out.result;
    7176             : 
    7177           0 :         tevent_req_received(req);
    7178           0 :         return NT_STATUS_OK;
    7179             : }
    7180             : 
    7181           0 : NTSTATUS dcerpc_netr_NetrLogonSendToSam(struct dcerpc_binding_handle *h,
    7182             :                                         TALLOC_CTX *mem_ctx,
    7183             :                                         const char *_server_name /* [in] [charset(UTF16),unique] */,
    7184             :                                         const char *_computer_name /* [in] [charset(UTF16),ref] */,
    7185             :                                         struct netr_Authenticator *_credential /* [in] [ref] */,
    7186             :                                         struct netr_Authenticator *_return_authenticator /* [out] [ref] */,
    7187             :                                         uint8_t *_opaque_buffer /* [in] [ref,size_is(buffer_len)] */,
    7188             :                                         uint32_t _buffer_len /* [in]  */,
    7189             :                                         NTSTATUS *result)
    7190             : {
    7191             :         struct netr_NetrLogonSendToSam r;
    7192             :         NTSTATUS status;
    7193             : 
    7194             :         /* In parameters */
    7195           0 :         r.in.server_name = _server_name;
    7196           0 :         r.in.computer_name = _computer_name;
    7197           0 :         r.in.credential = _credential;
    7198           0 :         r.in.opaque_buffer = _opaque_buffer;
    7199           0 :         r.in.buffer_len = _buffer_len;
    7200             : 
    7201             :         /* Out parameters */
    7202           0 :         r.out.return_authenticator = _return_authenticator;
    7203             : 
    7204             :         /* Result */
    7205           0 :         NDR_ZERO_STRUCT(r.out.result);
    7206             : 
    7207           0 :         status = dcerpc_netr_NetrLogonSendToSam_r(h, mem_ctx, &r);
    7208           0 :         if (!NT_STATUS_IS_OK(status)) {
    7209           0 :                 return status;
    7210             :         }
    7211             : 
    7212             :         /* Return variables */
    7213           0 :         *_return_authenticator = *r.out.return_authenticator;
    7214             : 
    7215             :         /* Return result */
    7216           0 :         *result = r.out.result;
    7217             : 
    7218           0 :         return NT_STATUS_OK;
    7219             : }
    7220             : 
    7221             : struct dcerpc_netr_DsRAddressToSitenamesW_r_state {
    7222             :         TALLOC_CTX *out_mem_ctx;
    7223             : };
    7224             : 
    7225             : static void dcerpc_netr_DsRAddressToSitenamesW_r_done(struct tevent_req *subreq);
    7226             : 
    7227           0 : struct tevent_req *dcerpc_netr_DsRAddressToSitenamesW_r_send(TALLOC_CTX *mem_ctx,
    7228             :         struct tevent_context *ev,
    7229             :         struct dcerpc_binding_handle *h,
    7230             :         struct netr_DsRAddressToSitenamesW *r)
    7231             : {
    7232             :         struct tevent_req *req;
    7233             :         struct dcerpc_netr_DsRAddressToSitenamesW_r_state *state;
    7234             :         struct tevent_req *subreq;
    7235             : 
    7236           0 :         req = tevent_req_create(mem_ctx, &state,
    7237             :                                 struct dcerpc_netr_DsRAddressToSitenamesW_r_state);
    7238           0 :         if (req == NULL) {
    7239           0 :                 return NULL;
    7240             :         }
    7241             : 
    7242           0 :         state->out_mem_ctx = talloc_new(state);
    7243           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7244           0 :                 return tevent_req_post(req, ev);
    7245             :         }
    7246             : 
    7247           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7248             :                         NULL, &ndr_table_netlogon,
    7249           0 :                         NDR_NETR_DSRADDRESSTOSITENAMESW, state->out_mem_ctx, r);
    7250           0 :         if (tevent_req_nomem(subreq, req)) {
    7251           0 :                 return tevent_req_post(req, ev);
    7252             :         }
    7253           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsRAddressToSitenamesW_r_done, req);
    7254             : 
    7255           0 :         return req;
    7256             : }
    7257             : 
    7258           0 : static void dcerpc_netr_DsRAddressToSitenamesW_r_done(struct tevent_req *subreq)
    7259             : {
    7260           0 :         struct tevent_req *req =
    7261           0 :                 tevent_req_callback_data(subreq,
    7262             :                 struct tevent_req);
    7263             :         NTSTATUS status;
    7264             : 
    7265           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7266           0 :         TALLOC_FREE(subreq);
    7267           0 :         if (tevent_req_nterror(req, status)) {
    7268           0 :                 return;
    7269             :         }
    7270             : 
    7271           0 :         tevent_req_done(req);
    7272             : }
    7273             : 
    7274           0 : NTSTATUS dcerpc_netr_DsRAddressToSitenamesW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7275             : {
    7276           0 :         struct dcerpc_netr_DsRAddressToSitenamesW_r_state *state =
    7277           0 :                 tevent_req_data(req,
    7278             :                 struct dcerpc_netr_DsRAddressToSitenamesW_r_state);
    7279             :         NTSTATUS status;
    7280             : 
    7281           0 :         if (tevent_req_is_nterror(req, &status)) {
    7282           0 :                 tevent_req_received(req);
    7283           0 :                 return status;
    7284             :         }
    7285             : 
    7286           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7287             : 
    7288           0 :         tevent_req_received(req);
    7289           0 :         return NT_STATUS_OK;
    7290             : }
    7291             : 
    7292          54 : NTSTATUS dcerpc_netr_DsRAddressToSitenamesW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_DsRAddressToSitenamesW *r)
    7293             : {
    7294             :         NTSTATUS status;
    7295             : 
    7296          54 :         status = dcerpc_binding_handle_call(h,
    7297             :                         NULL, &ndr_table_netlogon,
    7298             :                         NDR_NETR_DSRADDRESSTOSITENAMESW, mem_ctx, r);
    7299             : 
    7300          54 :         return status;
    7301             : }
    7302             : 
    7303             : struct dcerpc_netr_DsRAddressToSitenamesW_state {
    7304             :         struct netr_DsRAddressToSitenamesW orig;
    7305             :         struct netr_DsRAddressToSitenamesW tmp;
    7306             :         TALLOC_CTX *out_mem_ctx;
    7307             : };
    7308             : 
    7309             : static void dcerpc_netr_DsRAddressToSitenamesW_done(struct tevent_req *subreq);
    7310             : 
    7311           0 : struct tevent_req *dcerpc_netr_DsRAddressToSitenamesW_send(TALLOC_CTX *mem_ctx,
    7312             :                                                            struct tevent_context *ev,
    7313             :                                                            struct dcerpc_binding_handle *h,
    7314             :                                                            const char *_server_name /* [in] [charset(UTF16),unique] */,
    7315             :                                                            uint32_t _count /* [in] [range(0,32000)] */,
    7316             :                                                            struct netr_DsRAddress *_addresses /* [in] [ref,size_is(count)] */,
    7317             :                                                            struct netr_DsRAddressToSitenamesWCtr **_ctr /* [out] [ref] */)
    7318             : {
    7319             :         struct tevent_req *req;
    7320             :         struct dcerpc_netr_DsRAddressToSitenamesW_state *state;
    7321             :         struct tevent_req *subreq;
    7322             : 
    7323           0 :         req = tevent_req_create(mem_ctx, &state,
    7324             :                                 struct dcerpc_netr_DsRAddressToSitenamesW_state);
    7325           0 :         if (req == NULL) {
    7326           0 :                 return NULL;
    7327             :         }
    7328           0 :         state->out_mem_ctx = NULL;
    7329             : 
    7330             :         /* In parameters */
    7331           0 :         state->orig.in.server_name = _server_name;
    7332           0 :         state->orig.in.count = _count;
    7333           0 :         state->orig.in.addresses = _addresses;
    7334             : 
    7335             :         /* Out parameters */
    7336           0 :         state->orig.out.ctr = _ctr;
    7337             : 
    7338             :         /* Result */
    7339           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7340             : 
    7341           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    7342             :                              "dcerpc_netr_DsRAddressToSitenamesW_out_memory");
    7343           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7344           0 :                 return tevent_req_post(req, ev);
    7345             :         }
    7346             : 
    7347             :         /* make a temporary copy, that we pass to the dispatch function */
    7348           0 :         state->tmp = state->orig;
    7349             : 
    7350           0 :         subreq = dcerpc_netr_DsRAddressToSitenamesW_r_send(state, ev, h, &state->tmp);
    7351           0 :         if (tevent_req_nomem(subreq, req)) {
    7352           0 :                 return tevent_req_post(req, ev);
    7353             :         }
    7354           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsRAddressToSitenamesW_done, req);
    7355           0 :         return req;
    7356             : }
    7357             : 
    7358           0 : static void dcerpc_netr_DsRAddressToSitenamesW_done(struct tevent_req *subreq)
    7359             : {
    7360           0 :         struct tevent_req *req = tevent_req_callback_data(
    7361             :                 subreq, struct tevent_req);
    7362           0 :         struct dcerpc_netr_DsRAddressToSitenamesW_state *state = tevent_req_data(
    7363             :                 req, struct dcerpc_netr_DsRAddressToSitenamesW_state);
    7364             :         NTSTATUS status;
    7365             :         TALLOC_CTX *mem_ctx;
    7366             : 
    7367           0 :         if (state->out_mem_ctx) {
    7368           0 :                 mem_ctx = state->out_mem_ctx;
    7369             :         } else {
    7370           0 :                 mem_ctx = state;
    7371             :         }
    7372             : 
    7373           0 :         status = dcerpc_netr_DsRAddressToSitenamesW_r_recv(subreq, mem_ctx);
    7374           0 :         TALLOC_FREE(subreq);
    7375           0 :         if (tevent_req_nterror(req, status)) {
    7376           0 :                 return;
    7377             :         }
    7378             : 
    7379             :         /* Copy out parameters */
    7380           0 :         *state->orig.out.ctr = *state->tmp.out.ctr;
    7381             : 
    7382             :         /* Copy result */
    7383           0 :         state->orig.out.result = state->tmp.out.result;
    7384             : 
    7385             :         /* Reset temporary structure */
    7386           0 :         NDR_ZERO_STRUCT(state->tmp);
    7387             : 
    7388           0 :         tevent_req_done(req);
    7389             : }
    7390             : 
    7391           0 : NTSTATUS dcerpc_netr_DsRAddressToSitenamesW_recv(struct tevent_req *req,
    7392             :                                                  TALLOC_CTX *mem_ctx,
    7393             :                                                  WERROR *result)
    7394             : {
    7395           0 :         struct dcerpc_netr_DsRAddressToSitenamesW_state *state = tevent_req_data(
    7396             :                 req, struct dcerpc_netr_DsRAddressToSitenamesW_state);
    7397             :         NTSTATUS status;
    7398             : 
    7399           0 :         if (tevent_req_is_nterror(req, &status)) {
    7400           0 :                 tevent_req_received(req);
    7401           0 :                 return status;
    7402             :         }
    7403             : 
    7404             :         /* Steal possible out parameters to the callers context */
    7405           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7406             : 
    7407             :         /* Return result */
    7408           0 :         *result = state->orig.out.result;
    7409             : 
    7410           0 :         tevent_req_received(req);
    7411           0 :         return NT_STATUS_OK;
    7412             : }
    7413             : 
    7414           0 : NTSTATUS dcerpc_netr_DsRAddressToSitenamesW(struct dcerpc_binding_handle *h,
    7415             :                                             TALLOC_CTX *mem_ctx,
    7416             :                                             const char *_server_name /* [in] [charset(UTF16),unique] */,
    7417             :                                             uint32_t _count /* [in] [range(0,32000)] */,
    7418             :                                             struct netr_DsRAddress *_addresses /* [in] [ref,size_is(count)] */,
    7419             :                                             struct netr_DsRAddressToSitenamesWCtr **_ctr /* [out] [ref] */,
    7420             :                                             WERROR *result)
    7421             : {
    7422             :         struct netr_DsRAddressToSitenamesW r;
    7423             :         NTSTATUS status;
    7424             : 
    7425             :         /* In parameters */
    7426           0 :         r.in.server_name = _server_name;
    7427           0 :         r.in.count = _count;
    7428           0 :         r.in.addresses = _addresses;
    7429             : 
    7430             :         /* Out parameters */
    7431           0 :         r.out.ctr = _ctr;
    7432             : 
    7433             :         /* Result */
    7434           0 :         NDR_ZERO_STRUCT(r.out.result);
    7435             : 
    7436           0 :         status = dcerpc_netr_DsRAddressToSitenamesW_r(h, mem_ctx, &r);
    7437           0 :         if (!NT_STATUS_IS_OK(status)) {
    7438           0 :                 return status;
    7439             :         }
    7440             : 
    7441             :         /* Return variables */
    7442           0 :         *_ctr = *r.out.ctr;
    7443             : 
    7444             :         /* Return result */
    7445           0 :         *result = r.out.result;
    7446             : 
    7447           0 :         return NT_STATUS_OK;
    7448             : }
    7449             : 
    7450             : struct dcerpc_netr_DsRGetDCNameEx2_r_state {
    7451             :         TALLOC_CTX *out_mem_ctx;
    7452             : };
    7453             : 
    7454             : static void dcerpc_netr_DsRGetDCNameEx2_r_done(struct tevent_req *subreq);
    7455             : 
    7456           0 : struct tevent_req *dcerpc_netr_DsRGetDCNameEx2_r_send(TALLOC_CTX *mem_ctx,
    7457             :         struct tevent_context *ev,
    7458             :         struct dcerpc_binding_handle *h,
    7459             :         struct netr_DsRGetDCNameEx2 *r)
    7460             : {
    7461             :         struct tevent_req *req;
    7462             :         struct dcerpc_netr_DsRGetDCNameEx2_r_state *state;
    7463             :         struct tevent_req *subreq;
    7464             : 
    7465           0 :         req = tevent_req_create(mem_ctx, &state,
    7466             :                                 struct dcerpc_netr_DsRGetDCNameEx2_r_state);
    7467           0 :         if (req == NULL) {
    7468           0 :                 return NULL;
    7469             :         }
    7470             : 
    7471           0 :         state->out_mem_ctx = talloc_new(state);
    7472           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7473           0 :                 return tevent_req_post(req, ev);
    7474             :         }
    7475             : 
    7476           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7477             :                         NULL, &ndr_table_netlogon,
    7478           0 :                         NDR_NETR_DSRGETDCNAMEEX2, state->out_mem_ctx, r);
    7479           0 :         if (tevent_req_nomem(subreq, req)) {
    7480           0 :                 return tevent_req_post(req, ev);
    7481             :         }
    7482           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsRGetDCNameEx2_r_done, req);
    7483             : 
    7484           0 :         return req;
    7485             : }
    7486             : 
    7487           0 : static void dcerpc_netr_DsRGetDCNameEx2_r_done(struct tevent_req *subreq)
    7488             : {
    7489           0 :         struct tevent_req *req =
    7490           0 :                 tevent_req_callback_data(subreq,
    7491             :                 struct tevent_req);
    7492             :         NTSTATUS status;
    7493             : 
    7494           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7495           0 :         TALLOC_FREE(subreq);
    7496           0 :         if (tevent_req_nterror(req, status)) {
    7497           0 :                 return;
    7498             :         }
    7499             : 
    7500           0 :         tevent_req_done(req);
    7501             : }
    7502             : 
    7503           0 : NTSTATUS dcerpc_netr_DsRGetDCNameEx2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7504             : {
    7505           0 :         struct dcerpc_netr_DsRGetDCNameEx2_r_state *state =
    7506           0 :                 tevent_req_data(req,
    7507             :                 struct dcerpc_netr_DsRGetDCNameEx2_r_state);
    7508             :         NTSTATUS status;
    7509             : 
    7510           0 :         if (tevent_req_is_nterror(req, &status)) {
    7511           0 :                 tevent_req_received(req);
    7512           0 :                 return status;
    7513             :         }
    7514             : 
    7515           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7516             : 
    7517           0 :         tevent_req_received(req);
    7518           0 :         return NT_STATUS_OK;
    7519             : }
    7520             : 
    7521         205 : NTSTATUS dcerpc_netr_DsRGetDCNameEx2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_DsRGetDCNameEx2 *r)
    7522             : {
    7523             :         NTSTATUS status;
    7524             : 
    7525         205 :         status = dcerpc_binding_handle_call(h,
    7526             :                         NULL, &ndr_table_netlogon,
    7527             :                         NDR_NETR_DSRGETDCNAMEEX2, mem_ctx, r);
    7528             : 
    7529         205 :         return status;
    7530             : }
    7531             : 
    7532             : struct dcerpc_netr_DsRGetDCNameEx2_state {
    7533             :         struct netr_DsRGetDCNameEx2 orig;
    7534             :         struct netr_DsRGetDCNameEx2 tmp;
    7535             :         TALLOC_CTX *out_mem_ctx;
    7536             : };
    7537             : 
    7538             : static void dcerpc_netr_DsRGetDCNameEx2_done(struct tevent_req *subreq);
    7539             : 
    7540           0 : struct tevent_req *dcerpc_netr_DsRGetDCNameEx2_send(TALLOC_CTX *mem_ctx,
    7541             :                                                     struct tevent_context *ev,
    7542             :                                                     struct dcerpc_binding_handle *h,
    7543             :                                                     const char *_server_unc /* [in] [charset(UTF16),unique] */,
    7544             :                                                     const char *_client_account /* [in] [charset(UTF16),unique] */,
    7545             :                                                     uint32_t _mask /* [in]  */,
    7546             :                                                     const char *_domain_name /* [in] [charset(UTF16),unique] */,
    7547             :                                                     struct GUID *_domain_guid /* [in] [unique] */,
    7548             :                                                     const char *_site_name /* [in] [charset(UTF16),unique] */,
    7549             :                                                     uint32_t _flags /* [in]  */,
    7550             :                                                     struct netr_DsRGetDCNameInfo **_info /* [out] [ref] */)
    7551             : {
    7552             :         struct tevent_req *req;
    7553             :         struct dcerpc_netr_DsRGetDCNameEx2_state *state;
    7554             :         struct tevent_req *subreq;
    7555             : 
    7556           0 :         req = tevent_req_create(mem_ctx, &state,
    7557             :                                 struct dcerpc_netr_DsRGetDCNameEx2_state);
    7558           0 :         if (req == NULL) {
    7559           0 :                 return NULL;
    7560             :         }
    7561           0 :         state->out_mem_ctx = NULL;
    7562             : 
    7563             :         /* In parameters */
    7564           0 :         state->orig.in.server_unc = _server_unc;
    7565           0 :         state->orig.in.client_account = _client_account;
    7566           0 :         state->orig.in.mask = _mask;
    7567           0 :         state->orig.in.domain_name = _domain_name;
    7568           0 :         state->orig.in.domain_guid = _domain_guid;
    7569           0 :         state->orig.in.site_name = _site_name;
    7570           0 :         state->orig.in.flags = _flags;
    7571             : 
    7572             :         /* Out parameters */
    7573           0 :         state->orig.out.info = _info;
    7574             : 
    7575             :         /* Result */
    7576           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7577             : 
    7578           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    7579             :                              "dcerpc_netr_DsRGetDCNameEx2_out_memory");
    7580           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7581           0 :                 return tevent_req_post(req, ev);
    7582             :         }
    7583             : 
    7584             :         /* make a temporary copy, that we pass to the dispatch function */
    7585           0 :         state->tmp = state->orig;
    7586             : 
    7587           0 :         subreq = dcerpc_netr_DsRGetDCNameEx2_r_send(state, ev, h, &state->tmp);
    7588           0 :         if (tevent_req_nomem(subreq, req)) {
    7589           0 :                 return tevent_req_post(req, ev);
    7590             :         }
    7591           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsRGetDCNameEx2_done, req);
    7592           0 :         return req;
    7593             : }
    7594             : 
    7595           0 : static void dcerpc_netr_DsRGetDCNameEx2_done(struct tevent_req *subreq)
    7596             : {
    7597           0 :         struct tevent_req *req = tevent_req_callback_data(
    7598             :                 subreq, struct tevent_req);
    7599           0 :         struct dcerpc_netr_DsRGetDCNameEx2_state *state = tevent_req_data(
    7600             :                 req, struct dcerpc_netr_DsRGetDCNameEx2_state);
    7601             :         NTSTATUS status;
    7602             :         TALLOC_CTX *mem_ctx;
    7603             : 
    7604           0 :         if (state->out_mem_ctx) {
    7605           0 :                 mem_ctx = state->out_mem_ctx;
    7606             :         } else {
    7607           0 :                 mem_ctx = state;
    7608             :         }
    7609             : 
    7610           0 :         status = dcerpc_netr_DsRGetDCNameEx2_r_recv(subreq, mem_ctx);
    7611           0 :         TALLOC_FREE(subreq);
    7612           0 :         if (tevent_req_nterror(req, status)) {
    7613           0 :                 return;
    7614             :         }
    7615             : 
    7616             :         /* Copy out parameters */
    7617           0 :         *state->orig.out.info = *state->tmp.out.info;
    7618             : 
    7619             :         /* Copy result */
    7620           0 :         state->orig.out.result = state->tmp.out.result;
    7621             : 
    7622             :         /* Reset temporary structure */
    7623           0 :         NDR_ZERO_STRUCT(state->tmp);
    7624             : 
    7625           0 :         tevent_req_done(req);
    7626             : }
    7627             : 
    7628           0 : NTSTATUS dcerpc_netr_DsRGetDCNameEx2_recv(struct tevent_req *req,
    7629             :                                           TALLOC_CTX *mem_ctx,
    7630             :                                           WERROR *result)
    7631             : {
    7632           0 :         struct dcerpc_netr_DsRGetDCNameEx2_state *state = tevent_req_data(
    7633             :                 req, struct dcerpc_netr_DsRGetDCNameEx2_state);
    7634             :         NTSTATUS status;
    7635             : 
    7636           0 :         if (tevent_req_is_nterror(req, &status)) {
    7637           0 :                 tevent_req_received(req);
    7638           0 :                 return status;
    7639             :         }
    7640             : 
    7641             :         /* Steal possible out parameters to the callers context */
    7642           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7643             : 
    7644             :         /* Return result */
    7645           0 :         *result = state->orig.out.result;
    7646             : 
    7647           0 :         tevent_req_received(req);
    7648           0 :         return NT_STATUS_OK;
    7649             : }
    7650             : 
    7651           0 : NTSTATUS dcerpc_netr_DsRGetDCNameEx2(struct dcerpc_binding_handle *h,
    7652             :                                      TALLOC_CTX *mem_ctx,
    7653             :                                      const char *_server_unc /* [in] [charset(UTF16),unique] */,
    7654             :                                      const char *_client_account /* [in] [charset(UTF16),unique] */,
    7655             :                                      uint32_t _mask /* [in]  */,
    7656             :                                      const char *_domain_name /* [in] [charset(UTF16),unique] */,
    7657             :                                      struct GUID *_domain_guid /* [in] [unique] */,
    7658             :                                      const char *_site_name /* [in] [charset(UTF16),unique] */,
    7659             :                                      uint32_t _flags /* [in]  */,
    7660             :                                      struct netr_DsRGetDCNameInfo **_info /* [out] [ref] */,
    7661             :                                      WERROR *result)
    7662             : {
    7663             :         struct netr_DsRGetDCNameEx2 r;
    7664             :         NTSTATUS status;
    7665             : 
    7666             :         /* In parameters */
    7667           0 :         r.in.server_unc = _server_unc;
    7668           0 :         r.in.client_account = _client_account;
    7669           0 :         r.in.mask = _mask;
    7670           0 :         r.in.domain_name = _domain_name;
    7671           0 :         r.in.domain_guid = _domain_guid;
    7672           0 :         r.in.site_name = _site_name;
    7673           0 :         r.in.flags = _flags;
    7674             : 
    7675             :         /* Out parameters */
    7676           0 :         r.out.info = _info;
    7677             : 
    7678             :         /* Result */
    7679           0 :         NDR_ZERO_STRUCT(r.out.result);
    7680             : 
    7681           0 :         status = dcerpc_netr_DsRGetDCNameEx2_r(h, mem_ctx, &r);
    7682           0 :         if (!NT_STATUS_IS_OK(status)) {
    7683           0 :                 return status;
    7684             :         }
    7685             : 
    7686             :         /* Return variables */
    7687           0 :         *_info = *r.out.info;
    7688             : 
    7689             :         /* Return result */
    7690           0 :         *result = r.out.result;
    7691             : 
    7692           0 :         return NT_STATUS_OK;
    7693             : }
    7694             : 
    7695             : struct dcerpc_netr_NetrEnumerateTrustedDomainsEx_r_state {
    7696             :         TALLOC_CTX *out_mem_ctx;
    7697             : };
    7698             : 
    7699             : static void dcerpc_netr_NetrEnumerateTrustedDomainsEx_r_done(struct tevent_req *subreq);
    7700             : 
    7701           0 : struct tevent_req *dcerpc_netr_NetrEnumerateTrustedDomainsEx_r_send(TALLOC_CTX *mem_ctx,
    7702             :         struct tevent_context *ev,
    7703             :         struct dcerpc_binding_handle *h,
    7704             :         struct netr_NetrEnumerateTrustedDomainsEx *r)
    7705             : {
    7706             :         struct tevent_req *req;
    7707             :         struct dcerpc_netr_NetrEnumerateTrustedDomainsEx_r_state *state;
    7708             :         struct tevent_req *subreq;
    7709             : 
    7710           0 :         req = tevent_req_create(mem_ctx, &state,
    7711             :                                 struct dcerpc_netr_NetrEnumerateTrustedDomainsEx_r_state);
    7712           0 :         if (req == NULL) {
    7713           0 :                 return NULL;
    7714             :         }
    7715             : 
    7716           0 :         state->out_mem_ctx = talloc_new(state);
    7717           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7718           0 :                 return tevent_req_post(req, ev);
    7719             :         }
    7720             : 
    7721           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7722             :                         NULL, &ndr_table_netlogon,
    7723           0 :                         NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX, state->out_mem_ctx, r);
    7724           0 :         if (tevent_req_nomem(subreq, req)) {
    7725           0 :                 return tevent_req_post(req, ev);
    7726             :         }
    7727           0 :         tevent_req_set_callback(subreq, dcerpc_netr_NetrEnumerateTrustedDomainsEx_r_done, req);
    7728             : 
    7729           0 :         return req;
    7730             : }
    7731             : 
    7732           0 : static void dcerpc_netr_NetrEnumerateTrustedDomainsEx_r_done(struct tevent_req *subreq)
    7733             : {
    7734           0 :         struct tevent_req *req =
    7735           0 :                 tevent_req_callback_data(subreq,
    7736             :                 struct tevent_req);
    7737             :         NTSTATUS status;
    7738             : 
    7739           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7740           0 :         TALLOC_FREE(subreq);
    7741           0 :         if (tevent_req_nterror(req, status)) {
    7742           0 :                 return;
    7743             :         }
    7744             : 
    7745           0 :         tevent_req_done(req);
    7746             : }
    7747             : 
    7748           0 : NTSTATUS dcerpc_netr_NetrEnumerateTrustedDomainsEx_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7749             : {
    7750           0 :         struct dcerpc_netr_NetrEnumerateTrustedDomainsEx_r_state *state =
    7751           0 :                 tevent_req_data(req,
    7752             :                 struct dcerpc_netr_NetrEnumerateTrustedDomainsEx_r_state);
    7753             :         NTSTATUS status;
    7754             : 
    7755           0 :         if (tevent_req_is_nterror(req, &status)) {
    7756           0 :                 tevent_req_received(req);
    7757           0 :                 return status;
    7758             :         }
    7759             : 
    7760           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7761             : 
    7762           0 :         tevent_req_received(req);
    7763           0 :         return NT_STATUS_OK;
    7764             : }
    7765             : 
    7766          18 : NTSTATUS dcerpc_netr_NetrEnumerateTrustedDomainsEx_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_NetrEnumerateTrustedDomainsEx *r)
    7767             : {
    7768             :         NTSTATUS status;
    7769             : 
    7770          18 :         status = dcerpc_binding_handle_call(h,
    7771             :                         NULL, &ndr_table_netlogon,
    7772             :                         NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX, mem_ctx, r);
    7773             : 
    7774          18 :         return status;
    7775             : }
    7776             : 
    7777             : struct dcerpc_netr_NetrEnumerateTrustedDomainsEx_state {
    7778             :         struct netr_NetrEnumerateTrustedDomainsEx orig;
    7779             :         struct netr_NetrEnumerateTrustedDomainsEx tmp;
    7780             :         TALLOC_CTX *out_mem_ctx;
    7781             : };
    7782             : 
    7783             : static void dcerpc_netr_NetrEnumerateTrustedDomainsEx_done(struct tevent_req *subreq);
    7784             : 
    7785           0 : struct tevent_req *dcerpc_netr_NetrEnumerateTrustedDomainsEx_send(TALLOC_CTX *mem_ctx,
    7786             :                                                                   struct tevent_context *ev,
    7787             :                                                                   struct dcerpc_binding_handle *h,
    7788             :                                                                   const char *_server_name /* [in] [charset(UTF16),unique] */,
    7789             :                                                                   struct netr_DomainTrustList *_dom_trust_list /* [out] [ref] */)
    7790             : {
    7791             :         struct tevent_req *req;
    7792             :         struct dcerpc_netr_NetrEnumerateTrustedDomainsEx_state *state;
    7793             :         struct tevent_req *subreq;
    7794             : 
    7795           0 :         req = tevent_req_create(mem_ctx, &state,
    7796             :                                 struct dcerpc_netr_NetrEnumerateTrustedDomainsEx_state);
    7797           0 :         if (req == NULL) {
    7798           0 :                 return NULL;
    7799             :         }
    7800           0 :         state->out_mem_ctx = NULL;
    7801             : 
    7802             :         /* In parameters */
    7803           0 :         state->orig.in.server_name = _server_name;
    7804             : 
    7805             :         /* Out parameters */
    7806           0 :         state->orig.out.dom_trust_list = _dom_trust_list;
    7807             : 
    7808             :         /* Result */
    7809           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7810             : 
    7811           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    7812             :                              "dcerpc_netr_NetrEnumerateTrustedDomainsEx_out_memory");
    7813           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7814           0 :                 return tevent_req_post(req, ev);
    7815             :         }
    7816             : 
    7817             :         /* make a temporary copy, that we pass to the dispatch function */
    7818           0 :         state->tmp = state->orig;
    7819             : 
    7820           0 :         subreq = dcerpc_netr_NetrEnumerateTrustedDomainsEx_r_send(state, ev, h, &state->tmp);
    7821           0 :         if (tevent_req_nomem(subreq, req)) {
    7822           0 :                 return tevent_req_post(req, ev);
    7823             :         }
    7824           0 :         tevent_req_set_callback(subreq, dcerpc_netr_NetrEnumerateTrustedDomainsEx_done, req);
    7825           0 :         return req;
    7826             : }
    7827             : 
    7828           0 : static void dcerpc_netr_NetrEnumerateTrustedDomainsEx_done(struct tevent_req *subreq)
    7829             : {
    7830           0 :         struct tevent_req *req = tevent_req_callback_data(
    7831             :                 subreq, struct tevent_req);
    7832           0 :         struct dcerpc_netr_NetrEnumerateTrustedDomainsEx_state *state = tevent_req_data(
    7833             :                 req, struct dcerpc_netr_NetrEnumerateTrustedDomainsEx_state);
    7834             :         NTSTATUS status;
    7835             :         TALLOC_CTX *mem_ctx;
    7836             : 
    7837           0 :         if (state->out_mem_ctx) {
    7838           0 :                 mem_ctx = state->out_mem_ctx;
    7839             :         } else {
    7840           0 :                 mem_ctx = state;
    7841             :         }
    7842             : 
    7843           0 :         status = dcerpc_netr_NetrEnumerateTrustedDomainsEx_r_recv(subreq, mem_ctx);
    7844           0 :         TALLOC_FREE(subreq);
    7845           0 :         if (tevent_req_nterror(req, status)) {
    7846           0 :                 return;
    7847             :         }
    7848             : 
    7849             :         /* Copy out parameters */
    7850           0 :         *state->orig.out.dom_trust_list = *state->tmp.out.dom_trust_list;
    7851             : 
    7852             :         /* Copy result */
    7853           0 :         state->orig.out.result = state->tmp.out.result;
    7854             : 
    7855             :         /* Reset temporary structure */
    7856           0 :         NDR_ZERO_STRUCT(state->tmp);
    7857             : 
    7858           0 :         tevent_req_done(req);
    7859             : }
    7860             : 
    7861           0 : NTSTATUS dcerpc_netr_NetrEnumerateTrustedDomainsEx_recv(struct tevent_req *req,
    7862             :                                                         TALLOC_CTX *mem_ctx,
    7863             :                                                         WERROR *result)
    7864             : {
    7865           0 :         struct dcerpc_netr_NetrEnumerateTrustedDomainsEx_state *state = tevent_req_data(
    7866             :                 req, struct dcerpc_netr_NetrEnumerateTrustedDomainsEx_state);
    7867             :         NTSTATUS status;
    7868             : 
    7869           0 :         if (tevent_req_is_nterror(req, &status)) {
    7870           0 :                 tevent_req_received(req);
    7871           0 :                 return status;
    7872             :         }
    7873             : 
    7874             :         /* Steal possible out parameters to the callers context */
    7875           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7876             : 
    7877             :         /* Return result */
    7878           0 :         *result = state->orig.out.result;
    7879             : 
    7880           0 :         tevent_req_received(req);
    7881           0 :         return NT_STATUS_OK;
    7882             : }
    7883             : 
    7884           0 : NTSTATUS dcerpc_netr_NetrEnumerateTrustedDomainsEx(struct dcerpc_binding_handle *h,
    7885             :                                                    TALLOC_CTX *mem_ctx,
    7886             :                                                    const char *_server_name /* [in] [charset(UTF16),unique] */,
    7887             :                                                    struct netr_DomainTrustList *_dom_trust_list /* [out] [ref] */,
    7888             :                                                    WERROR *result)
    7889             : {
    7890             :         struct netr_NetrEnumerateTrustedDomainsEx r;
    7891             :         NTSTATUS status;
    7892             : 
    7893             :         /* In parameters */
    7894           0 :         r.in.server_name = _server_name;
    7895             : 
    7896             :         /* Out parameters */
    7897           0 :         r.out.dom_trust_list = _dom_trust_list;
    7898             : 
    7899             :         /* Result */
    7900           0 :         NDR_ZERO_STRUCT(r.out.result);
    7901             : 
    7902           0 :         status = dcerpc_netr_NetrEnumerateTrustedDomainsEx_r(h, mem_ctx, &r);
    7903           0 :         if (!NT_STATUS_IS_OK(status)) {
    7904           0 :                 return status;
    7905             :         }
    7906             : 
    7907             :         /* Return variables */
    7908           0 :         *_dom_trust_list = *r.out.dom_trust_list;
    7909             : 
    7910             :         /* Return result */
    7911           0 :         *result = r.out.result;
    7912             : 
    7913           0 :         return NT_STATUS_OK;
    7914             : }
    7915             : 
    7916             : struct dcerpc_netr_DsRAddressToSitenamesExW_r_state {
    7917             :         TALLOC_CTX *out_mem_ctx;
    7918             : };
    7919             : 
    7920             : static void dcerpc_netr_DsRAddressToSitenamesExW_r_done(struct tevent_req *subreq);
    7921             : 
    7922           0 : struct tevent_req *dcerpc_netr_DsRAddressToSitenamesExW_r_send(TALLOC_CTX *mem_ctx,
    7923             :         struct tevent_context *ev,
    7924             :         struct dcerpc_binding_handle *h,
    7925             :         struct netr_DsRAddressToSitenamesExW *r)
    7926             : {
    7927             :         struct tevent_req *req;
    7928             :         struct dcerpc_netr_DsRAddressToSitenamesExW_r_state *state;
    7929             :         struct tevent_req *subreq;
    7930             : 
    7931           0 :         req = tevent_req_create(mem_ctx, &state,
    7932             :                                 struct dcerpc_netr_DsRAddressToSitenamesExW_r_state);
    7933           0 :         if (req == NULL) {
    7934           0 :                 return NULL;
    7935             :         }
    7936             : 
    7937           0 :         state->out_mem_ctx = talloc_new(state);
    7938           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7939           0 :                 return tevent_req_post(req, ev);
    7940             :         }
    7941             : 
    7942           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7943             :                         NULL, &ndr_table_netlogon,
    7944           0 :                         NDR_NETR_DSRADDRESSTOSITENAMESEXW, state->out_mem_ctx, r);
    7945           0 :         if (tevent_req_nomem(subreq, req)) {
    7946           0 :                 return tevent_req_post(req, ev);
    7947             :         }
    7948           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsRAddressToSitenamesExW_r_done, req);
    7949             : 
    7950           0 :         return req;
    7951             : }
    7952             : 
    7953           0 : static void dcerpc_netr_DsRAddressToSitenamesExW_r_done(struct tevent_req *subreq)
    7954             : {
    7955           0 :         struct tevent_req *req =
    7956           0 :                 tevent_req_callback_data(subreq,
    7957             :                 struct tevent_req);
    7958             :         NTSTATUS status;
    7959             : 
    7960           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7961           0 :         TALLOC_FREE(subreq);
    7962           0 :         if (tevent_req_nterror(req, status)) {
    7963           0 :                 return;
    7964             :         }
    7965             : 
    7966           0 :         tevent_req_done(req);
    7967             : }
    7968             : 
    7969           0 : NTSTATUS dcerpc_netr_DsRAddressToSitenamesExW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7970             : {
    7971           0 :         struct dcerpc_netr_DsRAddressToSitenamesExW_r_state *state =
    7972           0 :                 tevent_req_data(req,
    7973             :                 struct dcerpc_netr_DsRAddressToSitenamesExW_r_state);
    7974             :         NTSTATUS status;
    7975             : 
    7976           0 :         if (tevent_req_is_nterror(req, &status)) {
    7977           0 :                 tevent_req_received(req);
    7978           0 :                 return status;
    7979             :         }
    7980             : 
    7981           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7982             : 
    7983           0 :         tevent_req_received(req);
    7984           0 :         return NT_STATUS_OK;
    7985             : }
    7986             : 
    7987          54 : NTSTATUS dcerpc_netr_DsRAddressToSitenamesExW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_DsRAddressToSitenamesExW *r)
    7988             : {
    7989             :         NTSTATUS status;
    7990             : 
    7991          54 :         status = dcerpc_binding_handle_call(h,
    7992             :                         NULL, &ndr_table_netlogon,
    7993             :                         NDR_NETR_DSRADDRESSTOSITENAMESEXW, mem_ctx, r);
    7994             : 
    7995          54 :         return status;
    7996             : }
    7997             : 
    7998             : struct dcerpc_netr_DsRAddressToSitenamesExW_state {
    7999             :         struct netr_DsRAddressToSitenamesExW orig;
    8000             :         struct netr_DsRAddressToSitenamesExW tmp;
    8001             :         TALLOC_CTX *out_mem_ctx;
    8002             : };
    8003             : 
    8004             : static void dcerpc_netr_DsRAddressToSitenamesExW_done(struct tevent_req *subreq);
    8005             : 
    8006           0 : struct tevent_req *dcerpc_netr_DsRAddressToSitenamesExW_send(TALLOC_CTX *mem_ctx,
    8007             :                                                              struct tevent_context *ev,
    8008             :                                                              struct dcerpc_binding_handle *h,
    8009             :                                                              const char *_server_name /* [in] [charset(UTF16),unique] */,
    8010             :                                                              uint32_t _count /* [in] [range(0,32000)] */,
    8011             :                                                              struct netr_DsRAddress *_addresses /* [in] [ref,size_is(count)] */,
    8012             :                                                              struct netr_DsRAddressToSitenamesExWCtr **_ctr /* [out] [ref] */)
    8013             : {
    8014             :         struct tevent_req *req;
    8015             :         struct dcerpc_netr_DsRAddressToSitenamesExW_state *state;
    8016             :         struct tevent_req *subreq;
    8017             : 
    8018           0 :         req = tevent_req_create(mem_ctx, &state,
    8019             :                                 struct dcerpc_netr_DsRAddressToSitenamesExW_state);
    8020           0 :         if (req == NULL) {
    8021           0 :                 return NULL;
    8022             :         }
    8023           0 :         state->out_mem_ctx = NULL;
    8024             : 
    8025             :         /* In parameters */
    8026           0 :         state->orig.in.server_name = _server_name;
    8027           0 :         state->orig.in.count = _count;
    8028           0 :         state->orig.in.addresses = _addresses;
    8029             : 
    8030             :         /* Out parameters */
    8031           0 :         state->orig.out.ctr = _ctr;
    8032             : 
    8033             :         /* Result */
    8034           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8035             : 
    8036           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    8037             :                              "dcerpc_netr_DsRAddressToSitenamesExW_out_memory");
    8038           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8039           0 :                 return tevent_req_post(req, ev);
    8040             :         }
    8041             : 
    8042             :         /* make a temporary copy, that we pass to the dispatch function */
    8043           0 :         state->tmp = state->orig;
    8044             : 
    8045           0 :         subreq = dcerpc_netr_DsRAddressToSitenamesExW_r_send(state, ev, h, &state->tmp);
    8046           0 :         if (tevent_req_nomem(subreq, req)) {
    8047           0 :                 return tevent_req_post(req, ev);
    8048             :         }
    8049           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsRAddressToSitenamesExW_done, req);
    8050           0 :         return req;
    8051             : }
    8052             : 
    8053           0 : static void dcerpc_netr_DsRAddressToSitenamesExW_done(struct tevent_req *subreq)
    8054             : {
    8055           0 :         struct tevent_req *req = tevent_req_callback_data(
    8056             :                 subreq, struct tevent_req);
    8057           0 :         struct dcerpc_netr_DsRAddressToSitenamesExW_state *state = tevent_req_data(
    8058             :                 req, struct dcerpc_netr_DsRAddressToSitenamesExW_state);
    8059             :         NTSTATUS status;
    8060             :         TALLOC_CTX *mem_ctx;
    8061             : 
    8062           0 :         if (state->out_mem_ctx) {
    8063           0 :                 mem_ctx = state->out_mem_ctx;
    8064             :         } else {
    8065           0 :                 mem_ctx = state;
    8066             :         }
    8067             : 
    8068           0 :         status = dcerpc_netr_DsRAddressToSitenamesExW_r_recv(subreq, mem_ctx);
    8069           0 :         TALLOC_FREE(subreq);
    8070           0 :         if (tevent_req_nterror(req, status)) {
    8071           0 :                 return;
    8072             :         }
    8073             : 
    8074             :         /* Copy out parameters */
    8075           0 :         *state->orig.out.ctr = *state->tmp.out.ctr;
    8076             : 
    8077             :         /* Copy result */
    8078           0 :         state->orig.out.result = state->tmp.out.result;
    8079             : 
    8080             :         /* Reset temporary structure */
    8081           0 :         NDR_ZERO_STRUCT(state->tmp);
    8082             : 
    8083           0 :         tevent_req_done(req);
    8084             : }
    8085             : 
    8086           0 : NTSTATUS dcerpc_netr_DsRAddressToSitenamesExW_recv(struct tevent_req *req,
    8087             :                                                    TALLOC_CTX *mem_ctx,
    8088             :                                                    WERROR *result)
    8089             : {
    8090           0 :         struct dcerpc_netr_DsRAddressToSitenamesExW_state *state = tevent_req_data(
    8091             :                 req, struct dcerpc_netr_DsRAddressToSitenamesExW_state);
    8092             :         NTSTATUS status;
    8093             : 
    8094           0 :         if (tevent_req_is_nterror(req, &status)) {
    8095           0 :                 tevent_req_received(req);
    8096           0 :                 return status;
    8097             :         }
    8098             : 
    8099             :         /* Steal possible out parameters to the callers context */
    8100           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8101             : 
    8102             :         /* Return result */
    8103           0 :         *result = state->orig.out.result;
    8104             : 
    8105           0 :         tevent_req_received(req);
    8106           0 :         return NT_STATUS_OK;
    8107             : }
    8108             : 
    8109           0 : NTSTATUS dcerpc_netr_DsRAddressToSitenamesExW(struct dcerpc_binding_handle *h,
    8110             :                                               TALLOC_CTX *mem_ctx,
    8111             :                                               const char *_server_name /* [in] [charset(UTF16),unique] */,
    8112             :                                               uint32_t _count /* [in] [range(0,32000)] */,
    8113             :                                               struct netr_DsRAddress *_addresses /* [in] [ref,size_is(count)] */,
    8114             :                                               struct netr_DsRAddressToSitenamesExWCtr **_ctr /* [out] [ref] */,
    8115             :                                               WERROR *result)
    8116             : {
    8117             :         struct netr_DsRAddressToSitenamesExW r;
    8118             :         NTSTATUS status;
    8119             : 
    8120             :         /* In parameters */
    8121           0 :         r.in.server_name = _server_name;
    8122           0 :         r.in.count = _count;
    8123           0 :         r.in.addresses = _addresses;
    8124             : 
    8125             :         /* Out parameters */
    8126           0 :         r.out.ctr = _ctr;
    8127             : 
    8128             :         /* Result */
    8129           0 :         NDR_ZERO_STRUCT(r.out.result);
    8130             : 
    8131           0 :         status = dcerpc_netr_DsRAddressToSitenamesExW_r(h, mem_ctx, &r);
    8132           0 :         if (!NT_STATUS_IS_OK(status)) {
    8133           0 :                 return status;
    8134             :         }
    8135             : 
    8136             :         /* Return variables */
    8137           0 :         *_ctr = *r.out.ctr;
    8138             : 
    8139             :         /* Return result */
    8140           0 :         *result = r.out.result;
    8141             : 
    8142           0 :         return NT_STATUS_OK;
    8143             : }
    8144             : 
    8145             : struct dcerpc_netr_DsrGetDcSiteCoverageW_r_state {
    8146             :         TALLOC_CTX *out_mem_ctx;
    8147             : };
    8148             : 
    8149             : static void dcerpc_netr_DsrGetDcSiteCoverageW_r_done(struct tevent_req *subreq);
    8150             : 
    8151           0 : struct tevent_req *dcerpc_netr_DsrGetDcSiteCoverageW_r_send(TALLOC_CTX *mem_ctx,
    8152             :         struct tevent_context *ev,
    8153             :         struct dcerpc_binding_handle *h,
    8154             :         struct netr_DsrGetDcSiteCoverageW *r)
    8155             : {
    8156             :         struct tevent_req *req;
    8157             :         struct dcerpc_netr_DsrGetDcSiteCoverageW_r_state *state;
    8158             :         struct tevent_req *subreq;
    8159             : 
    8160           0 :         req = tevent_req_create(mem_ctx, &state,
    8161             :                                 struct dcerpc_netr_DsrGetDcSiteCoverageW_r_state);
    8162           0 :         if (req == NULL) {
    8163           0 :                 return NULL;
    8164             :         }
    8165             : 
    8166           0 :         state->out_mem_ctx = talloc_new(state);
    8167           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8168           0 :                 return tevent_req_post(req, ev);
    8169             :         }
    8170             : 
    8171           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8172             :                         NULL, &ndr_table_netlogon,
    8173           0 :                         NDR_NETR_DSRGETDCSITECOVERAGEW, state->out_mem_ctx, r);
    8174           0 :         if (tevent_req_nomem(subreq, req)) {
    8175           0 :                 return tevent_req_post(req, ev);
    8176             :         }
    8177           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsrGetDcSiteCoverageW_r_done, req);
    8178             : 
    8179           0 :         return req;
    8180             : }
    8181             : 
    8182           0 : static void dcerpc_netr_DsrGetDcSiteCoverageW_r_done(struct tevent_req *subreq)
    8183             : {
    8184           0 :         struct tevent_req *req =
    8185           0 :                 tevent_req_callback_data(subreq,
    8186             :                 struct tevent_req);
    8187             :         NTSTATUS status;
    8188             : 
    8189           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    8190           0 :         TALLOC_FREE(subreq);
    8191           0 :         if (tevent_req_nterror(req, status)) {
    8192           0 :                 return;
    8193             :         }
    8194             : 
    8195           0 :         tevent_req_done(req);
    8196             : }
    8197             : 
    8198           0 : NTSTATUS dcerpc_netr_DsrGetDcSiteCoverageW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8199             : {
    8200           0 :         struct dcerpc_netr_DsrGetDcSiteCoverageW_r_state *state =
    8201           0 :                 tevent_req_data(req,
    8202             :                 struct dcerpc_netr_DsrGetDcSiteCoverageW_r_state);
    8203             :         NTSTATUS status;
    8204             : 
    8205           0 :         if (tevent_req_is_nterror(req, &status)) {
    8206           0 :                 tevent_req_received(req);
    8207           0 :                 return status;
    8208             :         }
    8209             : 
    8210           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8211             : 
    8212           0 :         tevent_req_received(req);
    8213           0 :         return NT_STATUS_OK;
    8214             : }
    8215             : 
    8216          23 : NTSTATUS dcerpc_netr_DsrGetDcSiteCoverageW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_DsrGetDcSiteCoverageW *r)
    8217             : {
    8218             :         NTSTATUS status;
    8219             : 
    8220          23 :         status = dcerpc_binding_handle_call(h,
    8221             :                         NULL, &ndr_table_netlogon,
    8222             :                         NDR_NETR_DSRGETDCSITECOVERAGEW, mem_ctx, r);
    8223             : 
    8224          23 :         return status;
    8225             : }
    8226             : 
    8227             : struct dcerpc_netr_DsrGetDcSiteCoverageW_state {
    8228             :         struct netr_DsrGetDcSiteCoverageW orig;
    8229             :         struct netr_DsrGetDcSiteCoverageW tmp;
    8230             :         TALLOC_CTX *out_mem_ctx;
    8231             : };
    8232             : 
    8233             : static void dcerpc_netr_DsrGetDcSiteCoverageW_done(struct tevent_req *subreq);
    8234             : 
    8235           0 : struct tevent_req *dcerpc_netr_DsrGetDcSiteCoverageW_send(TALLOC_CTX *mem_ctx,
    8236             :                                                           struct tevent_context *ev,
    8237             :                                                           struct dcerpc_binding_handle *h,
    8238             :                                                           const char *_server_name /* [in] [charset(UTF16),unique] */,
    8239             :                                                           struct DcSitesCtr **_ctr /* [out] [ref] */)
    8240             : {
    8241             :         struct tevent_req *req;
    8242             :         struct dcerpc_netr_DsrGetDcSiteCoverageW_state *state;
    8243             :         struct tevent_req *subreq;
    8244             : 
    8245           0 :         req = tevent_req_create(mem_ctx, &state,
    8246             :                                 struct dcerpc_netr_DsrGetDcSiteCoverageW_state);
    8247           0 :         if (req == NULL) {
    8248           0 :                 return NULL;
    8249             :         }
    8250           0 :         state->out_mem_ctx = NULL;
    8251             : 
    8252             :         /* In parameters */
    8253           0 :         state->orig.in.server_name = _server_name;
    8254             : 
    8255             :         /* Out parameters */
    8256           0 :         state->orig.out.ctr = _ctr;
    8257             : 
    8258             :         /* Result */
    8259           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8260             : 
    8261           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    8262             :                              "dcerpc_netr_DsrGetDcSiteCoverageW_out_memory");
    8263           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8264           0 :                 return tevent_req_post(req, ev);
    8265             :         }
    8266             : 
    8267             :         /* make a temporary copy, that we pass to the dispatch function */
    8268           0 :         state->tmp = state->orig;
    8269             : 
    8270           0 :         subreq = dcerpc_netr_DsrGetDcSiteCoverageW_r_send(state, ev, h, &state->tmp);
    8271           0 :         if (tevent_req_nomem(subreq, req)) {
    8272           0 :                 return tevent_req_post(req, ev);
    8273             :         }
    8274           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsrGetDcSiteCoverageW_done, req);
    8275           0 :         return req;
    8276             : }
    8277             : 
    8278           0 : static void dcerpc_netr_DsrGetDcSiteCoverageW_done(struct tevent_req *subreq)
    8279             : {
    8280           0 :         struct tevent_req *req = tevent_req_callback_data(
    8281             :                 subreq, struct tevent_req);
    8282           0 :         struct dcerpc_netr_DsrGetDcSiteCoverageW_state *state = tevent_req_data(
    8283             :                 req, struct dcerpc_netr_DsrGetDcSiteCoverageW_state);
    8284             :         NTSTATUS status;
    8285             :         TALLOC_CTX *mem_ctx;
    8286             : 
    8287           0 :         if (state->out_mem_ctx) {
    8288           0 :                 mem_ctx = state->out_mem_ctx;
    8289             :         } else {
    8290           0 :                 mem_ctx = state;
    8291             :         }
    8292             : 
    8293           0 :         status = dcerpc_netr_DsrGetDcSiteCoverageW_r_recv(subreq, mem_ctx);
    8294           0 :         TALLOC_FREE(subreq);
    8295           0 :         if (tevent_req_nterror(req, status)) {
    8296           0 :                 return;
    8297             :         }
    8298             : 
    8299             :         /* Copy out parameters */
    8300           0 :         *state->orig.out.ctr = *state->tmp.out.ctr;
    8301             : 
    8302             :         /* Copy result */
    8303           0 :         state->orig.out.result = state->tmp.out.result;
    8304             : 
    8305             :         /* Reset temporary structure */
    8306           0 :         NDR_ZERO_STRUCT(state->tmp);
    8307             : 
    8308           0 :         tevent_req_done(req);
    8309             : }
    8310             : 
    8311           0 : NTSTATUS dcerpc_netr_DsrGetDcSiteCoverageW_recv(struct tevent_req *req,
    8312             :                                                 TALLOC_CTX *mem_ctx,
    8313             :                                                 WERROR *result)
    8314             : {
    8315           0 :         struct dcerpc_netr_DsrGetDcSiteCoverageW_state *state = tevent_req_data(
    8316             :                 req, struct dcerpc_netr_DsrGetDcSiteCoverageW_state);
    8317             :         NTSTATUS status;
    8318             : 
    8319           0 :         if (tevent_req_is_nterror(req, &status)) {
    8320           0 :                 tevent_req_received(req);
    8321           0 :                 return status;
    8322             :         }
    8323             : 
    8324             :         /* Steal possible out parameters to the callers context */
    8325           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8326             : 
    8327             :         /* Return result */
    8328           0 :         *result = state->orig.out.result;
    8329             : 
    8330           0 :         tevent_req_received(req);
    8331           0 :         return NT_STATUS_OK;
    8332             : }
    8333             : 
    8334           5 : NTSTATUS dcerpc_netr_DsrGetDcSiteCoverageW(struct dcerpc_binding_handle *h,
    8335             :                                            TALLOC_CTX *mem_ctx,
    8336             :                                            const char *_server_name /* [in] [charset(UTF16),unique] */,
    8337             :                                            struct DcSitesCtr **_ctr /* [out] [ref] */,
    8338             :                                            WERROR *result)
    8339             : {
    8340             :         struct netr_DsrGetDcSiteCoverageW r;
    8341             :         NTSTATUS status;
    8342             : 
    8343             :         /* In parameters */
    8344           5 :         r.in.server_name = _server_name;
    8345             : 
    8346             :         /* Out parameters */
    8347           5 :         r.out.ctr = _ctr;
    8348             : 
    8349             :         /* Result */
    8350           5 :         NDR_ZERO_STRUCT(r.out.result);
    8351             : 
    8352           5 :         status = dcerpc_netr_DsrGetDcSiteCoverageW_r(h, mem_ctx, &r);
    8353           5 :         if (!NT_STATUS_IS_OK(status)) {
    8354           0 :                 return status;
    8355             :         }
    8356             : 
    8357             :         /* Return variables */
    8358           5 :         *_ctr = *r.out.ctr;
    8359             : 
    8360             :         /* Return result */
    8361           5 :         *result = r.out.result;
    8362             : 
    8363           5 :         return NT_STATUS_OK;
    8364             : }
    8365             : 
    8366             : struct dcerpc_netr_LogonSamLogonEx_r_state {
    8367             :         TALLOC_CTX *out_mem_ctx;
    8368             : };
    8369             : 
    8370             : static void dcerpc_netr_LogonSamLogonEx_r_done(struct tevent_req *subreq);
    8371             : 
    8372          24 : struct tevent_req *dcerpc_netr_LogonSamLogonEx_r_send(TALLOC_CTX *mem_ctx,
    8373             :         struct tevent_context *ev,
    8374             :         struct dcerpc_binding_handle *h,
    8375             :         struct netr_LogonSamLogonEx *r)
    8376             : {
    8377             :         struct tevent_req *req;
    8378             :         struct dcerpc_netr_LogonSamLogonEx_r_state *state;
    8379             :         struct tevent_req *subreq;
    8380             : 
    8381          24 :         req = tevent_req_create(mem_ctx, &state,
    8382             :                                 struct dcerpc_netr_LogonSamLogonEx_r_state);
    8383          24 :         if (req == NULL) {
    8384           0 :                 return NULL;
    8385             :         }
    8386             : 
    8387          24 :         state->out_mem_ctx = talloc_new(state);
    8388          24 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8389           0 :                 return tevent_req_post(req, ev);
    8390             :         }
    8391             : 
    8392          24 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8393             :                         NULL, &ndr_table_netlogon,
    8394          24 :                         NDR_NETR_LOGONSAMLOGONEX, state->out_mem_ctx, r);
    8395          24 :         if (tevent_req_nomem(subreq, req)) {
    8396           0 :                 return tevent_req_post(req, ev);
    8397             :         }
    8398          24 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonSamLogonEx_r_done, req);
    8399             : 
    8400          24 :         return req;
    8401             : }
    8402             : 
    8403          24 : static void dcerpc_netr_LogonSamLogonEx_r_done(struct tevent_req *subreq)
    8404             : {
    8405          20 :         struct tevent_req *req =
    8406          24 :                 tevent_req_callback_data(subreq,
    8407             :                 struct tevent_req);
    8408             :         NTSTATUS status;
    8409             : 
    8410          24 :         status = dcerpc_binding_handle_call_recv(subreq);
    8411          24 :         TALLOC_FREE(subreq);
    8412          24 :         if (tevent_req_nterror(req, status)) {
    8413           0 :                 return;
    8414             :         }
    8415             : 
    8416          24 :         tevent_req_done(req);
    8417             : }
    8418             : 
    8419          24 : NTSTATUS dcerpc_netr_LogonSamLogonEx_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8420             : {
    8421          20 :         struct dcerpc_netr_LogonSamLogonEx_r_state *state =
    8422          24 :                 tevent_req_data(req,
    8423             :                 struct dcerpc_netr_LogonSamLogonEx_r_state);
    8424             :         NTSTATUS status;
    8425             : 
    8426          24 :         if (tevent_req_is_nterror(req, &status)) {
    8427           0 :                 tevent_req_received(req);
    8428           0 :                 return status;
    8429             :         }
    8430             : 
    8431          24 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8432             : 
    8433          24 :         tevent_req_received(req);
    8434          24 :         return NT_STATUS_OK;
    8435             : }
    8436             : 
    8437        5359 : NTSTATUS dcerpc_netr_LogonSamLogonEx_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_LogonSamLogonEx *r)
    8438             : {
    8439             :         NTSTATUS status;
    8440             : 
    8441        5359 :         status = dcerpc_binding_handle_call(h,
    8442             :                         NULL, &ndr_table_netlogon,
    8443             :                         NDR_NETR_LOGONSAMLOGONEX, mem_ctx, r);
    8444             : 
    8445        5359 :         return status;
    8446             : }
    8447             : 
    8448             : struct dcerpc_netr_LogonSamLogonEx_state {
    8449             :         struct netr_LogonSamLogonEx orig;
    8450             :         struct netr_LogonSamLogonEx tmp;
    8451             :         TALLOC_CTX *out_mem_ctx;
    8452             : };
    8453             : 
    8454             : static void dcerpc_netr_LogonSamLogonEx_done(struct tevent_req *subreq);
    8455             : 
    8456          24 : struct tevent_req *dcerpc_netr_LogonSamLogonEx_send(TALLOC_CTX *mem_ctx,
    8457             :                                                     struct tevent_context *ev,
    8458             :                                                     struct dcerpc_binding_handle *h,
    8459             :                                                     const char *_server_name /* [in] [charset(UTF16),unique] */,
    8460             :                                                     const char *_computer_name /* [in] [charset(UTF16),unique] */,
    8461             :                                                     enum netr_LogonInfoClass _logon_level /* [in]  */,
    8462             :                                                     union netr_LogonLevel *_logon /* [in] [ref,switch_is(logon_level)] */,
    8463             :                                                     uint16_t _validation_level /* [in]  */,
    8464             :                                                     union netr_Validation *_validation /* [out] [ref,switch_is(validation_level)] */,
    8465             :                                                     uint8_t *_authoritative /* [out] [ref] */,
    8466             :                                                     uint32_t *_flags /* [in,out] [ref] */)
    8467             : {
    8468             :         struct tevent_req *req;
    8469             :         struct dcerpc_netr_LogonSamLogonEx_state *state;
    8470             :         struct tevent_req *subreq;
    8471             : 
    8472          24 :         req = tevent_req_create(mem_ctx, &state,
    8473             :                                 struct dcerpc_netr_LogonSamLogonEx_state);
    8474          24 :         if (req == NULL) {
    8475           0 :                 return NULL;
    8476             :         }
    8477          24 :         state->out_mem_ctx = NULL;
    8478             : 
    8479             :         /* In parameters */
    8480          24 :         state->orig.in.server_name = _server_name;
    8481          24 :         state->orig.in.computer_name = _computer_name;
    8482          24 :         state->orig.in.logon_level = _logon_level;
    8483          24 :         state->orig.in.logon = _logon;
    8484          24 :         state->orig.in.validation_level = _validation_level;
    8485          24 :         state->orig.in.flags = _flags;
    8486             : 
    8487             :         /* Out parameters */
    8488          24 :         state->orig.out.validation = _validation;
    8489          24 :         state->orig.out.authoritative = _authoritative;
    8490          24 :         state->orig.out.flags = _flags;
    8491             : 
    8492             :         /* Result */
    8493          24 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8494             : 
    8495          24 :         state->out_mem_ctx = talloc_named_const(state, 0,
    8496             :                              "dcerpc_netr_LogonSamLogonEx_out_memory");
    8497          24 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8498           0 :                 return tevent_req_post(req, ev);
    8499             :         }
    8500             : 
    8501             :         /* make a temporary copy, that we pass to the dispatch function */
    8502          24 :         state->tmp = state->orig;
    8503             : 
    8504          24 :         subreq = dcerpc_netr_LogonSamLogonEx_r_send(state, ev, h, &state->tmp);
    8505          24 :         if (tevent_req_nomem(subreq, req)) {
    8506           0 :                 return tevent_req_post(req, ev);
    8507             :         }
    8508          24 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonSamLogonEx_done, req);
    8509          24 :         return req;
    8510             : }
    8511             : 
    8512          24 : static void dcerpc_netr_LogonSamLogonEx_done(struct tevent_req *subreq)
    8513             : {
    8514          24 :         struct tevent_req *req = tevent_req_callback_data(
    8515             :                 subreq, struct tevent_req);
    8516          24 :         struct dcerpc_netr_LogonSamLogonEx_state *state = tevent_req_data(
    8517             :                 req, struct dcerpc_netr_LogonSamLogonEx_state);
    8518             :         NTSTATUS status;
    8519             :         TALLOC_CTX *mem_ctx;
    8520             : 
    8521          24 :         if (state->out_mem_ctx) {
    8522          24 :                 mem_ctx = state->out_mem_ctx;
    8523             :         } else {
    8524           0 :                 mem_ctx = state;
    8525             :         }
    8526             : 
    8527          24 :         status = dcerpc_netr_LogonSamLogonEx_r_recv(subreq, mem_ctx);
    8528          24 :         TALLOC_FREE(subreq);
    8529          24 :         if (tevent_req_nterror(req, status)) {
    8530           0 :                 return;
    8531             :         }
    8532             : 
    8533             :         /* Copy out parameters */
    8534          24 :         *state->orig.out.validation = *state->tmp.out.validation;
    8535          24 :         *state->orig.out.authoritative = *state->tmp.out.authoritative;
    8536          24 :         *state->orig.out.flags = *state->tmp.out.flags;
    8537             : 
    8538             :         /* Copy result */
    8539          24 :         state->orig.out.result = state->tmp.out.result;
    8540             : 
    8541             :         /* Reset temporary structure */
    8542          24 :         NDR_ZERO_STRUCT(state->tmp);
    8543             : 
    8544          24 :         tevent_req_done(req);
    8545             : }
    8546             : 
    8547          24 : NTSTATUS dcerpc_netr_LogonSamLogonEx_recv(struct tevent_req *req,
    8548             :                                           TALLOC_CTX *mem_ctx,
    8549             :                                           NTSTATUS *result)
    8550             : {
    8551          24 :         struct dcerpc_netr_LogonSamLogonEx_state *state = tevent_req_data(
    8552             :                 req, struct dcerpc_netr_LogonSamLogonEx_state);
    8553             :         NTSTATUS status;
    8554             : 
    8555          24 :         if (tevent_req_is_nterror(req, &status)) {
    8556           0 :                 tevent_req_received(req);
    8557           0 :                 return status;
    8558             :         }
    8559             : 
    8560             :         /* Steal possible out parameters to the callers context */
    8561          24 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8562             : 
    8563             :         /* Return result */
    8564          24 :         *result = state->orig.out.result;
    8565             : 
    8566          24 :         tevent_req_received(req);
    8567          24 :         return NT_STATUS_OK;
    8568             : }
    8569             : 
    8570           0 : NTSTATUS dcerpc_netr_LogonSamLogonEx(struct dcerpc_binding_handle *h,
    8571             :                                      TALLOC_CTX *mem_ctx,
    8572             :                                      const char *_server_name /* [in] [charset(UTF16),unique] */,
    8573             :                                      const char *_computer_name /* [in] [charset(UTF16),unique] */,
    8574             :                                      enum netr_LogonInfoClass _logon_level /* [in]  */,
    8575             :                                      union netr_LogonLevel *_logon /* [in] [ref,switch_is(logon_level)] */,
    8576             :                                      uint16_t _validation_level /* [in]  */,
    8577             :                                      union netr_Validation *_validation /* [out] [ref,switch_is(validation_level)] */,
    8578             :                                      uint8_t *_authoritative /* [out] [ref] */,
    8579             :                                      uint32_t *_flags /* [in,out] [ref] */,
    8580             :                                      NTSTATUS *result)
    8581             : {
    8582             :         struct netr_LogonSamLogonEx r;
    8583             :         NTSTATUS status;
    8584             : 
    8585             :         /* In parameters */
    8586           0 :         r.in.server_name = _server_name;
    8587           0 :         r.in.computer_name = _computer_name;
    8588           0 :         r.in.logon_level = _logon_level;
    8589           0 :         r.in.logon = _logon;
    8590           0 :         r.in.validation_level = _validation_level;
    8591           0 :         r.in.flags = _flags;
    8592             : 
    8593             :         /* Out parameters */
    8594           0 :         r.out.validation = _validation;
    8595           0 :         r.out.authoritative = _authoritative;
    8596           0 :         r.out.flags = _flags;
    8597             : 
    8598             :         /* Result */
    8599           0 :         NDR_ZERO_STRUCT(r.out.result);
    8600             : 
    8601           0 :         status = dcerpc_netr_LogonSamLogonEx_r(h, mem_ctx, &r);
    8602           0 :         if (!NT_STATUS_IS_OK(status)) {
    8603           0 :                 return status;
    8604             :         }
    8605             : 
    8606             :         /* Return variables */
    8607           0 :         *_validation = *r.out.validation;
    8608           0 :         *_authoritative = *r.out.authoritative;
    8609           0 :         *_flags = *r.out.flags;
    8610             : 
    8611             :         /* Return result */
    8612           0 :         *result = r.out.result;
    8613             : 
    8614           0 :         return NT_STATUS_OK;
    8615             : }
    8616             : 
    8617             : struct dcerpc_netr_DsrEnumerateDomainTrusts_r_state {
    8618             :         TALLOC_CTX *out_mem_ctx;
    8619             : };
    8620             : 
    8621             : static void dcerpc_netr_DsrEnumerateDomainTrusts_r_done(struct tevent_req *subreq);
    8622             : 
    8623           0 : struct tevent_req *dcerpc_netr_DsrEnumerateDomainTrusts_r_send(TALLOC_CTX *mem_ctx,
    8624             :         struct tevent_context *ev,
    8625             :         struct dcerpc_binding_handle *h,
    8626             :         struct netr_DsrEnumerateDomainTrusts *r)
    8627             : {
    8628             :         struct tevent_req *req;
    8629             :         struct dcerpc_netr_DsrEnumerateDomainTrusts_r_state *state;
    8630             :         struct tevent_req *subreq;
    8631             : 
    8632           0 :         req = tevent_req_create(mem_ctx, &state,
    8633             :                                 struct dcerpc_netr_DsrEnumerateDomainTrusts_r_state);
    8634           0 :         if (req == NULL) {
    8635           0 :                 return NULL;
    8636             :         }
    8637             : 
    8638           0 :         state->out_mem_ctx = talloc_new(state);
    8639           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8640           0 :                 return tevent_req_post(req, ev);
    8641             :         }
    8642             : 
    8643           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8644             :                         NULL, &ndr_table_netlogon,
    8645           0 :                         NDR_NETR_DSRENUMERATEDOMAINTRUSTS, state->out_mem_ctx, r);
    8646           0 :         if (tevent_req_nomem(subreq, req)) {
    8647           0 :                 return tevent_req_post(req, ev);
    8648             :         }
    8649           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsrEnumerateDomainTrusts_r_done, req);
    8650             : 
    8651           0 :         return req;
    8652             : }
    8653             : 
    8654           0 : static void dcerpc_netr_DsrEnumerateDomainTrusts_r_done(struct tevent_req *subreq)
    8655             : {
    8656           0 :         struct tevent_req *req =
    8657           0 :                 tevent_req_callback_data(subreq,
    8658             :                 struct tevent_req);
    8659             :         NTSTATUS status;
    8660             : 
    8661           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    8662           0 :         TALLOC_FREE(subreq);
    8663           0 :         if (tevent_req_nterror(req, status)) {
    8664           0 :                 return;
    8665             :         }
    8666             : 
    8667           0 :         tevent_req_done(req);
    8668             : }
    8669             : 
    8670           0 : NTSTATUS dcerpc_netr_DsrEnumerateDomainTrusts_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8671             : {
    8672           0 :         struct dcerpc_netr_DsrEnumerateDomainTrusts_r_state *state =
    8673           0 :                 tevent_req_data(req,
    8674             :                 struct dcerpc_netr_DsrEnumerateDomainTrusts_r_state);
    8675             :         NTSTATUS status;
    8676             : 
    8677           0 :         if (tevent_req_is_nterror(req, &status)) {
    8678           0 :                 tevent_req_received(req);
    8679           0 :                 return status;
    8680             :         }
    8681             : 
    8682           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8683             : 
    8684           0 :         tevent_req_received(req);
    8685           0 :         return NT_STATUS_OK;
    8686             : }
    8687             : 
    8688          44 : NTSTATUS dcerpc_netr_DsrEnumerateDomainTrusts_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_DsrEnumerateDomainTrusts *r)
    8689             : {
    8690             :         NTSTATUS status;
    8691             : 
    8692          44 :         status = dcerpc_binding_handle_call(h,
    8693             :                         NULL, &ndr_table_netlogon,
    8694             :                         NDR_NETR_DSRENUMERATEDOMAINTRUSTS, mem_ctx, r);
    8695             : 
    8696          44 :         return status;
    8697             : }
    8698             : 
    8699             : struct dcerpc_netr_DsrEnumerateDomainTrusts_state {
    8700             :         struct netr_DsrEnumerateDomainTrusts orig;
    8701             :         struct netr_DsrEnumerateDomainTrusts tmp;
    8702             :         TALLOC_CTX *out_mem_ctx;
    8703             : };
    8704             : 
    8705             : static void dcerpc_netr_DsrEnumerateDomainTrusts_done(struct tevent_req *subreq);
    8706             : 
    8707           0 : struct tevent_req *dcerpc_netr_DsrEnumerateDomainTrusts_send(TALLOC_CTX *mem_ctx,
    8708             :                                                              struct tevent_context *ev,
    8709             :                                                              struct dcerpc_binding_handle *h,
    8710             :                                                              const char *_server_name /* [in] [charset(UTF16),unique] */,
    8711             :                                                              uint32_t _trust_flags /* [in]  */,
    8712             :                                                              struct netr_DomainTrustList *_trusts /* [out] [ref] */)
    8713             : {
    8714             :         struct tevent_req *req;
    8715             :         struct dcerpc_netr_DsrEnumerateDomainTrusts_state *state;
    8716             :         struct tevent_req *subreq;
    8717             : 
    8718           0 :         req = tevent_req_create(mem_ctx, &state,
    8719             :                                 struct dcerpc_netr_DsrEnumerateDomainTrusts_state);
    8720           0 :         if (req == NULL) {
    8721           0 :                 return NULL;
    8722             :         }
    8723           0 :         state->out_mem_ctx = NULL;
    8724             : 
    8725             :         /* In parameters */
    8726           0 :         state->orig.in.server_name = _server_name;
    8727           0 :         state->orig.in.trust_flags = _trust_flags;
    8728             : 
    8729             :         /* Out parameters */
    8730           0 :         state->orig.out.trusts = _trusts;
    8731             : 
    8732             :         /* Result */
    8733           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8734             : 
    8735           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    8736             :                              "dcerpc_netr_DsrEnumerateDomainTrusts_out_memory");
    8737           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8738           0 :                 return tevent_req_post(req, ev);
    8739             :         }
    8740             : 
    8741             :         /* make a temporary copy, that we pass to the dispatch function */
    8742           0 :         state->tmp = state->orig;
    8743             : 
    8744           0 :         subreq = dcerpc_netr_DsrEnumerateDomainTrusts_r_send(state, ev, h, &state->tmp);
    8745           0 :         if (tevent_req_nomem(subreq, req)) {
    8746           0 :                 return tevent_req_post(req, ev);
    8747             :         }
    8748           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsrEnumerateDomainTrusts_done, req);
    8749           0 :         return req;
    8750             : }
    8751             : 
    8752           0 : static void dcerpc_netr_DsrEnumerateDomainTrusts_done(struct tevent_req *subreq)
    8753             : {
    8754           0 :         struct tevent_req *req = tevent_req_callback_data(
    8755             :                 subreq, struct tevent_req);
    8756           0 :         struct dcerpc_netr_DsrEnumerateDomainTrusts_state *state = tevent_req_data(
    8757             :                 req, struct dcerpc_netr_DsrEnumerateDomainTrusts_state);
    8758             :         NTSTATUS status;
    8759             :         TALLOC_CTX *mem_ctx;
    8760             : 
    8761           0 :         if (state->out_mem_ctx) {
    8762           0 :                 mem_ctx = state->out_mem_ctx;
    8763             :         } else {
    8764           0 :                 mem_ctx = state;
    8765             :         }
    8766             : 
    8767           0 :         status = dcerpc_netr_DsrEnumerateDomainTrusts_r_recv(subreq, mem_ctx);
    8768           0 :         TALLOC_FREE(subreq);
    8769           0 :         if (tevent_req_nterror(req, status)) {
    8770           0 :                 return;
    8771             :         }
    8772             : 
    8773             :         /* Copy out parameters */
    8774           0 :         *state->orig.out.trusts = *state->tmp.out.trusts;
    8775             : 
    8776             :         /* Copy result */
    8777           0 :         state->orig.out.result = state->tmp.out.result;
    8778             : 
    8779             :         /* Reset temporary structure */
    8780           0 :         NDR_ZERO_STRUCT(state->tmp);
    8781             : 
    8782           0 :         tevent_req_done(req);
    8783             : }
    8784             : 
    8785           0 : NTSTATUS dcerpc_netr_DsrEnumerateDomainTrusts_recv(struct tevent_req *req,
    8786             :                                                    TALLOC_CTX *mem_ctx,
    8787             :                                                    WERROR *result)
    8788             : {
    8789           0 :         struct dcerpc_netr_DsrEnumerateDomainTrusts_state *state = tevent_req_data(
    8790             :                 req, struct dcerpc_netr_DsrEnumerateDomainTrusts_state);
    8791             :         NTSTATUS status;
    8792             : 
    8793           0 :         if (tevent_req_is_nterror(req, &status)) {
    8794           0 :                 tevent_req_received(req);
    8795           0 :                 return status;
    8796             :         }
    8797             : 
    8798             :         /* Steal possible out parameters to the callers context */
    8799           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8800             : 
    8801             :         /* Return result */
    8802           0 :         *result = state->orig.out.result;
    8803             : 
    8804           0 :         tevent_req_received(req);
    8805           0 :         return NT_STATUS_OK;
    8806             : }
    8807             : 
    8808           7 : NTSTATUS dcerpc_netr_DsrEnumerateDomainTrusts(struct dcerpc_binding_handle *h,
    8809             :                                               TALLOC_CTX *mem_ctx,
    8810             :                                               const char *_server_name /* [in] [charset(UTF16),unique] */,
    8811             :                                               uint32_t _trust_flags /* [in]  */,
    8812             :                                               struct netr_DomainTrustList *_trusts /* [out] [ref] */,
    8813             :                                               WERROR *result)
    8814             : {
    8815             :         struct netr_DsrEnumerateDomainTrusts r;
    8816             :         NTSTATUS status;
    8817             : 
    8818             :         /* In parameters */
    8819           7 :         r.in.server_name = _server_name;
    8820           7 :         r.in.trust_flags = _trust_flags;
    8821             : 
    8822             :         /* Out parameters */
    8823           7 :         r.out.trusts = _trusts;
    8824             : 
    8825             :         /* Result */
    8826           7 :         NDR_ZERO_STRUCT(r.out.result);
    8827             : 
    8828           7 :         status = dcerpc_netr_DsrEnumerateDomainTrusts_r(h, mem_ctx, &r);
    8829           7 :         if (!NT_STATUS_IS_OK(status)) {
    8830           0 :                 return status;
    8831             :         }
    8832             : 
    8833             :         /* Return variables */
    8834           7 :         *_trusts = *r.out.trusts;
    8835             : 
    8836             :         /* Return result */
    8837           7 :         *result = r.out.result;
    8838             : 
    8839           7 :         return NT_STATUS_OK;
    8840             : }
    8841             : 
    8842             : struct dcerpc_netr_DsrDeregisterDNSHostRecords_r_state {
    8843             :         TALLOC_CTX *out_mem_ctx;
    8844             : };
    8845             : 
    8846             : static void dcerpc_netr_DsrDeregisterDNSHostRecords_r_done(struct tevent_req *subreq);
    8847             : 
    8848           0 : struct tevent_req *dcerpc_netr_DsrDeregisterDNSHostRecords_r_send(TALLOC_CTX *mem_ctx,
    8849             :         struct tevent_context *ev,
    8850             :         struct dcerpc_binding_handle *h,
    8851             :         struct netr_DsrDeregisterDNSHostRecords *r)
    8852             : {
    8853             :         struct tevent_req *req;
    8854             :         struct dcerpc_netr_DsrDeregisterDNSHostRecords_r_state *state;
    8855             :         struct tevent_req *subreq;
    8856             : 
    8857           0 :         req = tevent_req_create(mem_ctx, &state,
    8858             :                                 struct dcerpc_netr_DsrDeregisterDNSHostRecords_r_state);
    8859           0 :         if (req == NULL) {
    8860           0 :                 return NULL;
    8861             :         }
    8862             : 
    8863           0 :         state->out_mem_ctx = NULL;
    8864             : 
    8865           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8866             :                         NULL, &ndr_table_netlogon,
    8867             :                         NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS, state, r);
    8868           0 :         if (tevent_req_nomem(subreq, req)) {
    8869           0 :                 return tevent_req_post(req, ev);
    8870             :         }
    8871           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsrDeregisterDNSHostRecords_r_done, req);
    8872             : 
    8873           0 :         return req;
    8874             : }
    8875             : 
    8876           0 : static void dcerpc_netr_DsrDeregisterDNSHostRecords_r_done(struct tevent_req *subreq)
    8877             : {
    8878           0 :         struct tevent_req *req =
    8879           0 :                 tevent_req_callback_data(subreq,
    8880             :                 struct tevent_req);
    8881             :         NTSTATUS status;
    8882             : 
    8883           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    8884           0 :         TALLOC_FREE(subreq);
    8885           0 :         if (tevent_req_nterror(req, status)) {
    8886           0 :                 return;
    8887             :         }
    8888             : 
    8889           0 :         tevent_req_done(req);
    8890             : }
    8891             : 
    8892           0 : NTSTATUS dcerpc_netr_DsrDeregisterDNSHostRecords_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8893             : {
    8894           0 :         struct dcerpc_netr_DsrDeregisterDNSHostRecords_r_state *state =
    8895           0 :                 tevent_req_data(req,
    8896             :                 struct dcerpc_netr_DsrDeregisterDNSHostRecords_r_state);
    8897             :         NTSTATUS status;
    8898             : 
    8899           0 :         if (tevent_req_is_nterror(req, &status)) {
    8900           0 :                 tevent_req_received(req);
    8901           0 :                 return status;
    8902             :         }
    8903             : 
    8904           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8905             : 
    8906           0 :         tevent_req_received(req);
    8907           0 :         return NT_STATUS_OK;
    8908             : }
    8909             : 
    8910           0 : NTSTATUS dcerpc_netr_DsrDeregisterDNSHostRecords_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_DsrDeregisterDNSHostRecords *r)
    8911             : {
    8912             :         NTSTATUS status;
    8913             : 
    8914           0 :         status = dcerpc_binding_handle_call(h,
    8915             :                         NULL, &ndr_table_netlogon,
    8916             :                         NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS, mem_ctx, r);
    8917             : 
    8918           0 :         return status;
    8919             : }
    8920             : 
    8921             : struct dcerpc_netr_DsrDeregisterDNSHostRecords_state {
    8922             :         struct netr_DsrDeregisterDNSHostRecords orig;
    8923             :         struct netr_DsrDeregisterDNSHostRecords tmp;
    8924             :         TALLOC_CTX *out_mem_ctx;
    8925             : };
    8926             : 
    8927             : static void dcerpc_netr_DsrDeregisterDNSHostRecords_done(struct tevent_req *subreq);
    8928             : 
    8929           0 : struct tevent_req *dcerpc_netr_DsrDeregisterDNSHostRecords_send(TALLOC_CTX *mem_ctx,
    8930             :                                                                 struct tevent_context *ev,
    8931             :                                                                 struct dcerpc_binding_handle *h,
    8932             :                                                                 const char *_server_name /* [in] [charset(UTF16),unique] */,
    8933             :                                                                 const char *_domain /* [in] [charset(UTF16),unique] */,
    8934             :                                                                 struct GUID *_domain_guid /* [in] [unique] */,
    8935             :                                                                 struct GUID *_dsa_guid /* [in] [unique] */,
    8936             :                                                                 const char *_dns_host /* [in] [charset(UTF16),ref] */)
    8937             : {
    8938             :         struct tevent_req *req;
    8939             :         struct dcerpc_netr_DsrDeregisterDNSHostRecords_state *state;
    8940             :         struct tevent_req *subreq;
    8941             : 
    8942           0 :         req = tevent_req_create(mem_ctx, &state,
    8943             :                                 struct dcerpc_netr_DsrDeregisterDNSHostRecords_state);
    8944           0 :         if (req == NULL) {
    8945           0 :                 return NULL;
    8946             :         }
    8947           0 :         state->out_mem_ctx = NULL;
    8948             : 
    8949             :         /* In parameters */
    8950           0 :         state->orig.in.server_name = _server_name;
    8951           0 :         state->orig.in.domain = _domain;
    8952           0 :         state->orig.in.domain_guid = _domain_guid;
    8953           0 :         state->orig.in.dsa_guid = _dsa_guid;
    8954           0 :         state->orig.in.dns_host = _dns_host;
    8955             : 
    8956             :         /* Out parameters */
    8957             : 
    8958             :         /* Result */
    8959           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8960             : 
    8961             :         /* make a temporary copy, that we pass to the dispatch function */
    8962           0 :         state->tmp = state->orig;
    8963             : 
    8964           0 :         subreq = dcerpc_netr_DsrDeregisterDNSHostRecords_r_send(state, ev, h, &state->tmp);
    8965           0 :         if (tevent_req_nomem(subreq, req)) {
    8966           0 :                 return tevent_req_post(req, ev);
    8967             :         }
    8968           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsrDeregisterDNSHostRecords_done, req);
    8969           0 :         return req;
    8970             : }
    8971             : 
    8972           0 : static void dcerpc_netr_DsrDeregisterDNSHostRecords_done(struct tevent_req *subreq)
    8973             : {
    8974           0 :         struct tevent_req *req = tevent_req_callback_data(
    8975             :                 subreq, struct tevent_req);
    8976           0 :         struct dcerpc_netr_DsrDeregisterDNSHostRecords_state *state = tevent_req_data(
    8977             :                 req, struct dcerpc_netr_DsrDeregisterDNSHostRecords_state);
    8978             :         NTSTATUS status;
    8979             :         TALLOC_CTX *mem_ctx;
    8980             : 
    8981           0 :         if (state->out_mem_ctx) {
    8982           0 :                 mem_ctx = state->out_mem_ctx;
    8983             :         } else {
    8984           0 :                 mem_ctx = state;
    8985             :         }
    8986             : 
    8987           0 :         status = dcerpc_netr_DsrDeregisterDNSHostRecords_r_recv(subreq, mem_ctx);
    8988           0 :         TALLOC_FREE(subreq);
    8989           0 :         if (tevent_req_nterror(req, status)) {
    8990           0 :                 return;
    8991             :         }
    8992             : 
    8993             :         /* Copy out parameters */
    8994             : 
    8995             :         /* Copy result */
    8996           0 :         state->orig.out.result = state->tmp.out.result;
    8997             : 
    8998             :         /* Reset temporary structure */
    8999           0 :         NDR_ZERO_STRUCT(state->tmp);
    9000             : 
    9001           0 :         tevent_req_done(req);
    9002             : }
    9003             : 
    9004           0 : NTSTATUS dcerpc_netr_DsrDeregisterDNSHostRecords_recv(struct tevent_req *req,
    9005             :                                                       TALLOC_CTX *mem_ctx,
    9006             :                                                       WERROR *result)
    9007             : {
    9008           0 :         struct dcerpc_netr_DsrDeregisterDNSHostRecords_state *state = tevent_req_data(
    9009             :                 req, struct dcerpc_netr_DsrDeregisterDNSHostRecords_state);
    9010             :         NTSTATUS status;
    9011             : 
    9012           0 :         if (tevent_req_is_nterror(req, &status)) {
    9013           0 :                 tevent_req_received(req);
    9014           0 :                 return status;
    9015             :         }
    9016             : 
    9017             :         /* Steal possible out parameters to the callers context */
    9018           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9019             : 
    9020             :         /* Return result */
    9021           0 :         *result = state->orig.out.result;
    9022             : 
    9023           0 :         tevent_req_received(req);
    9024           0 :         return NT_STATUS_OK;
    9025             : }
    9026             : 
    9027           0 : NTSTATUS dcerpc_netr_DsrDeregisterDNSHostRecords(struct dcerpc_binding_handle *h,
    9028             :                                                  TALLOC_CTX *mem_ctx,
    9029             :                                                  const char *_server_name /* [in] [charset(UTF16),unique] */,
    9030             :                                                  const char *_domain /* [in] [charset(UTF16),unique] */,
    9031             :                                                  struct GUID *_domain_guid /* [in] [unique] */,
    9032             :                                                  struct GUID *_dsa_guid /* [in] [unique] */,
    9033             :                                                  const char *_dns_host /* [in] [charset(UTF16),ref] */,
    9034             :                                                  WERROR *result)
    9035             : {
    9036             :         struct netr_DsrDeregisterDNSHostRecords r;
    9037             :         NTSTATUS status;
    9038             : 
    9039             :         /* In parameters */
    9040           0 :         r.in.server_name = _server_name;
    9041           0 :         r.in.domain = _domain;
    9042           0 :         r.in.domain_guid = _domain_guid;
    9043           0 :         r.in.dsa_guid = _dsa_guid;
    9044           0 :         r.in.dns_host = _dns_host;
    9045             : 
    9046             :         /* Out parameters */
    9047             : 
    9048             :         /* Result */
    9049           0 :         NDR_ZERO_STRUCT(r.out.result);
    9050             : 
    9051           0 :         status = dcerpc_netr_DsrDeregisterDNSHostRecords_r(h, mem_ctx, &r);
    9052           0 :         if (!NT_STATUS_IS_OK(status)) {
    9053           0 :                 return status;
    9054             :         }
    9055             : 
    9056             :         /* Return variables */
    9057             : 
    9058             :         /* Return result */
    9059           0 :         *result = r.out.result;
    9060             : 
    9061           0 :         return NT_STATUS_OK;
    9062             : }
    9063             : 
    9064             : struct dcerpc_netr_ServerTrustPasswordsGet_r_state {
    9065             :         TALLOC_CTX *out_mem_ctx;
    9066             : };
    9067             : 
    9068             : static void dcerpc_netr_ServerTrustPasswordsGet_r_done(struct tevent_req *subreq);
    9069             : 
    9070           0 : struct tevent_req *dcerpc_netr_ServerTrustPasswordsGet_r_send(TALLOC_CTX *mem_ctx,
    9071             :         struct tevent_context *ev,
    9072             :         struct dcerpc_binding_handle *h,
    9073             :         struct netr_ServerTrustPasswordsGet *r)
    9074             : {
    9075             :         struct tevent_req *req;
    9076             :         struct dcerpc_netr_ServerTrustPasswordsGet_r_state *state;
    9077             :         struct tevent_req *subreq;
    9078             : 
    9079           0 :         req = tevent_req_create(mem_ctx, &state,
    9080             :                                 struct dcerpc_netr_ServerTrustPasswordsGet_r_state);
    9081           0 :         if (req == NULL) {
    9082           0 :                 return NULL;
    9083             :         }
    9084             : 
    9085           0 :         state->out_mem_ctx = talloc_new(state);
    9086           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9087           0 :                 return tevent_req_post(req, ev);
    9088             :         }
    9089             : 
    9090           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9091             :                         NULL, &ndr_table_netlogon,
    9092           0 :                         NDR_NETR_SERVERTRUSTPASSWORDSGET, state->out_mem_ctx, r);
    9093           0 :         if (tevent_req_nomem(subreq, req)) {
    9094           0 :                 return tevent_req_post(req, ev);
    9095             :         }
    9096           0 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerTrustPasswordsGet_r_done, req);
    9097             : 
    9098           0 :         return req;
    9099             : }
    9100             : 
    9101           0 : static void dcerpc_netr_ServerTrustPasswordsGet_r_done(struct tevent_req *subreq)
    9102             : {
    9103           0 :         struct tevent_req *req =
    9104           0 :                 tevent_req_callback_data(subreq,
    9105             :                 struct tevent_req);
    9106             :         NTSTATUS status;
    9107             : 
    9108           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9109           0 :         TALLOC_FREE(subreq);
    9110           0 :         if (tevent_req_nterror(req, status)) {
    9111           0 :                 return;
    9112             :         }
    9113             : 
    9114           0 :         tevent_req_done(req);
    9115             : }
    9116             : 
    9117           0 : NTSTATUS dcerpc_netr_ServerTrustPasswordsGet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9118             : {
    9119           0 :         struct dcerpc_netr_ServerTrustPasswordsGet_r_state *state =
    9120           0 :                 tevent_req_data(req,
    9121             :                 struct dcerpc_netr_ServerTrustPasswordsGet_r_state);
    9122             :         NTSTATUS status;
    9123             : 
    9124           0 :         if (tevent_req_is_nterror(req, &status)) {
    9125           0 :                 tevent_req_received(req);
    9126           0 :                 return status;
    9127             :         }
    9128             : 
    9129           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9130             : 
    9131           0 :         tevent_req_received(req);
    9132           0 :         return NT_STATUS_OK;
    9133             : }
    9134             : 
    9135          18 : NTSTATUS dcerpc_netr_ServerTrustPasswordsGet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_ServerTrustPasswordsGet *r)
    9136             : {
    9137             :         NTSTATUS status;
    9138             : 
    9139          18 :         status = dcerpc_binding_handle_call(h,
    9140             :                         NULL, &ndr_table_netlogon,
    9141             :                         NDR_NETR_SERVERTRUSTPASSWORDSGET, mem_ctx, r);
    9142             : 
    9143          18 :         return status;
    9144             : }
    9145             : 
    9146             : struct dcerpc_netr_ServerTrustPasswordsGet_state {
    9147             :         struct netr_ServerTrustPasswordsGet orig;
    9148             :         struct netr_ServerTrustPasswordsGet tmp;
    9149             :         TALLOC_CTX *out_mem_ctx;
    9150             : };
    9151             : 
    9152             : static void dcerpc_netr_ServerTrustPasswordsGet_done(struct tevent_req *subreq);
    9153             : 
    9154           0 : struct tevent_req *dcerpc_netr_ServerTrustPasswordsGet_send(TALLOC_CTX *mem_ctx,
    9155             :                                                             struct tevent_context *ev,
    9156             :                                                             struct dcerpc_binding_handle *h,
    9157             :                                                             const char *_server_name /* [in] [charset(UTF16),unique] */,
    9158             :                                                             const char *_account_name /* [in] [charset(UTF16),ref] */,
    9159             :                                                             enum netr_SchannelType _secure_channel_type /* [in]  */,
    9160             :                                                             const char *_computer_name /* [in] [charset(UTF16),ref] */,
    9161             :                                                             struct netr_Authenticator *_credential /* [in] [ref] */,
    9162             :                                                             struct netr_Authenticator *_return_authenticator /* [out] [ref] */,
    9163             :                                                             struct samr_Password *_new_owf_password /* [out] [ref] */,
    9164             :                                                             struct samr_Password *_old_owf_password /* [out] [ref] */)
    9165             : {
    9166             :         struct tevent_req *req;
    9167             :         struct dcerpc_netr_ServerTrustPasswordsGet_state *state;
    9168             :         struct tevent_req *subreq;
    9169             : 
    9170           0 :         req = tevent_req_create(mem_ctx, &state,
    9171             :                                 struct dcerpc_netr_ServerTrustPasswordsGet_state);
    9172           0 :         if (req == NULL) {
    9173           0 :                 return NULL;
    9174             :         }
    9175           0 :         state->out_mem_ctx = NULL;
    9176             : 
    9177             :         /* In parameters */
    9178           0 :         state->orig.in.server_name = _server_name;
    9179           0 :         state->orig.in.account_name = _account_name;
    9180           0 :         state->orig.in.secure_channel_type = _secure_channel_type;
    9181           0 :         state->orig.in.computer_name = _computer_name;
    9182           0 :         state->orig.in.credential = _credential;
    9183             : 
    9184             :         /* Out parameters */
    9185           0 :         state->orig.out.return_authenticator = _return_authenticator;
    9186           0 :         state->orig.out.new_owf_password = _new_owf_password;
    9187           0 :         state->orig.out.old_owf_password = _old_owf_password;
    9188             : 
    9189             :         /* Result */
    9190           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9191             : 
    9192           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9193             :                              "dcerpc_netr_ServerTrustPasswordsGet_out_memory");
    9194           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9195           0 :                 return tevent_req_post(req, ev);
    9196             :         }
    9197             : 
    9198             :         /* make a temporary copy, that we pass to the dispatch function */
    9199           0 :         state->tmp = state->orig;
    9200             : 
    9201           0 :         subreq = dcerpc_netr_ServerTrustPasswordsGet_r_send(state, ev, h, &state->tmp);
    9202           0 :         if (tevent_req_nomem(subreq, req)) {
    9203           0 :                 return tevent_req_post(req, ev);
    9204             :         }
    9205           0 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerTrustPasswordsGet_done, req);
    9206           0 :         return req;
    9207             : }
    9208             : 
    9209           0 : static void dcerpc_netr_ServerTrustPasswordsGet_done(struct tevent_req *subreq)
    9210             : {
    9211           0 :         struct tevent_req *req = tevent_req_callback_data(
    9212             :                 subreq, struct tevent_req);
    9213           0 :         struct dcerpc_netr_ServerTrustPasswordsGet_state *state = tevent_req_data(
    9214             :                 req, struct dcerpc_netr_ServerTrustPasswordsGet_state);
    9215             :         NTSTATUS status;
    9216             :         TALLOC_CTX *mem_ctx;
    9217             : 
    9218           0 :         if (state->out_mem_ctx) {
    9219           0 :                 mem_ctx = state->out_mem_ctx;
    9220             :         } else {
    9221           0 :                 mem_ctx = state;
    9222             :         }
    9223             : 
    9224           0 :         status = dcerpc_netr_ServerTrustPasswordsGet_r_recv(subreq, mem_ctx);
    9225           0 :         TALLOC_FREE(subreq);
    9226           0 :         if (tevent_req_nterror(req, status)) {
    9227           0 :                 return;
    9228             :         }
    9229             : 
    9230             :         /* Copy out parameters */
    9231           0 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    9232           0 :         *state->orig.out.new_owf_password = *state->tmp.out.new_owf_password;
    9233           0 :         *state->orig.out.old_owf_password = *state->tmp.out.old_owf_password;
    9234             : 
    9235             :         /* Copy result */
    9236           0 :         state->orig.out.result = state->tmp.out.result;
    9237             : 
    9238             :         /* Reset temporary structure */
    9239           0 :         NDR_ZERO_STRUCT(state->tmp);
    9240             : 
    9241           0 :         tevent_req_done(req);
    9242             : }
    9243             : 
    9244           0 : NTSTATUS dcerpc_netr_ServerTrustPasswordsGet_recv(struct tevent_req *req,
    9245             :                                                   TALLOC_CTX *mem_ctx,
    9246             :                                                   NTSTATUS *result)
    9247             : {
    9248           0 :         struct dcerpc_netr_ServerTrustPasswordsGet_state *state = tevent_req_data(
    9249             :                 req, struct dcerpc_netr_ServerTrustPasswordsGet_state);
    9250             :         NTSTATUS status;
    9251             : 
    9252           0 :         if (tevent_req_is_nterror(req, &status)) {
    9253           0 :                 tevent_req_received(req);
    9254           0 :                 return status;
    9255             :         }
    9256             : 
    9257             :         /* Steal possible out parameters to the callers context */
    9258           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9259             : 
    9260             :         /* Return result */
    9261           0 :         *result = state->orig.out.result;
    9262             : 
    9263           0 :         tevent_req_received(req);
    9264           0 :         return NT_STATUS_OK;
    9265             : }
    9266             : 
    9267           0 : NTSTATUS dcerpc_netr_ServerTrustPasswordsGet(struct dcerpc_binding_handle *h,
    9268             :                                              TALLOC_CTX *mem_ctx,
    9269             :                                              const char *_server_name /* [in] [charset(UTF16),unique] */,
    9270             :                                              const char *_account_name /* [in] [charset(UTF16),ref] */,
    9271             :                                              enum netr_SchannelType _secure_channel_type /* [in]  */,
    9272             :                                              const char *_computer_name /* [in] [charset(UTF16),ref] */,
    9273             :                                              struct netr_Authenticator *_credential /* [in] [ref] */,
    9274             :                                              struct netr_Authenticator *_return_authenticator /* [out] [ref] */,
    9275             :                                              struct samr_Password *_new_owf_password /* [out] [ref] */,
    9276             :                                              struct samr_Password *_old_owf_password /* [out] [ref] */,
    9277             :                                              NTSTATUS *result)
    9278             : {
    9279             :         struct netr_ServerTrustPasswordsGet r;
    9280             :         NTSTATUS status;
    9281             : 
    9282             :         /* In parameters */
    9283           0 :         r.in.server_name = _server_name;
    9284           0 :         r.in.account_name = _account_name;
    9285           0 :         r.in.secure_channel_type = _secure_channel_type;
    9286           0 :         r.in.computer_name = _computer_name;
    9287           0 :         r.in.credential = _credential;
    9288             : 
    9289             :         /* Out parameters */
    9290           0 :         r.out.return_authenticator = _return_authenticator;
    9291           0 :         r.out.new_owf_password = _new_owf_password;
    9292           0 :         r.out.old_owf_password = _old_owf_password;
    9293             : 
    9294             :         /* Result */
    9295           0 :         NDR_ZERO_STRUCT(r.out.result);
    9296             : 
    9297           0 :         status = dcerpc_netr_ServerTrustPasswordsGet_r(h, mem_ctx, &r);
    9298           0 :         if (!NT_STATUS_IS_OK(status)) {
    9299           0 :                 return status;
    9300             :         }
    9301             : 
    9302             :         /* Return variables */
    9303           0 :         *_return_authenticator = *r.out.return_authenticator;
    9304           0 :         *_new_owf_password = *r.out.new_owf_password;
    9305           0 :         *_old_owf_password = *r.out.old_owf_password;
    9306             : 
    9307             :         /* Return result */
    9308           0 :         *result = r.out.result;
    9309             : 
    9310           0 :         return NT_STATUS_OK;
    9311             : }
    9312             : 
    9313             : struct dcerpc_netr_DsRGetForestTrustInformation_r_state {
    9314             :         TALLOC_CTX *out_mem_ctx;
    9315             : };
    9316             : 
    9317             : static void dcerpc_netr_DsRGetForestTrustInformation_r_done(struct tevent_req *subreq);
    9318             : 
    9319           0 : struct tevent_req *dcerpc_netr_DsRGetForestTrustInformation_r_send(TALLOC_CTX *mem_ctx,
    9320             :         struct tevent_context *ev,
    9321             :         struct dcerpc_binding_handle *h,
    9322             :         struct netr_DsRGetForestTrustInformation *r)
    9323             : {
    9324             :         struct tevent_req *req;
    9325             :         struct dcerpc_netr_DsRGetForestTrustInformation_r_state *state;
    9326             :         struct tevent_req *subreq;
    9327             : 
    9328           0 :         req = tevent_req_create(mem_ctx, &state,
    9329             :                                 struct dcerpc_netr_DsRGetForestTrustInformation_r_state);
    9330           0 :         if (req == NULL) {
    9331           0 :                 return NULL;
    9332             :         }
    9333             : 
    9334           0 :         state->out_mem_ctx = talloc_new(state);
    9335           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9336           0 :                 return tevent_req_post(req, ev);
    9337             :         }
    9338             : 
    9339           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9340             :                         NULL, &ndr_table_netlogon,
    9341           0 :                         NDR_NETR_DSRGETFORESTTRUSTINFORMATION, state->out_mem_ctx, r);
    9342           0 :         if (tevent_req_nomem(subreq, req)) {
    9343           0 :                 return tevent_req_post(req, ev);
    9344             :         }
    9345           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsRGetForestTrustInformation_r_done, req);
    9346             : 
    9347           0 :         return req;
    9348             : }
    9349             : 
    9350           0 : static void dcerpc_netr_DsRGetForestTrustInformation_r_done(struct tevent_req *subreq)
    9351             : {
    9352           0 :         struct tevent_req *req =
    9353           0 :                 tevent_req_callback_data(subreq,
    9354             :                 struct tevent_req);
    9355             :         NTSTATUS status;
    9356             : 
    9357           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9358           0 :         TALLOC_FREE(subreq);
    9359           0 :         if (tevent_req_nterror(req, status)) {
    9360           0 :                 return;
    9361             :         }
    9362             : 
    9363           0 :         tevent_req_done(req);
    9364             : }
    9365             : 
    9366           0 : NTSTATUS dcerpc_netr_DsRGetForestTrustInformation_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9367             : {
    9368           0 :         struct dcerpc_netr_DsRGetForestTrustInformation_r_state *state =
    9369           0 :                 tevent_req_data(req,
    9370             :                 struct dcerpc_netr_DsRGetForestTrustInformation_r_state);
    9371             :         NTSTATUS status;
    9372             : 
    9373           0 :         if (tevent_req_is_nterror(req, &status)) {
    9374           0 :                 tevent_req_received(req);
    9375           0 :                 return status;
    9376             :         }
    9377             : 
    9378           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9379             : 
    9380           0 :         tevent_req_received(req);
    9381           0 :         return NT_STATUS_OK;
    9382             : }
    9383             : 
    9384         176 : NTSTATUS dcerpc_netr_DsRGetForestTrustInformation_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_DsRGetForestTrustInformation *r)
    9385             : {
    9386             :         NTSTATUS status;
    9387             : 
    9388         176 :         status = dcerpc_binding_handle_call(h,
    9389             :                         NULL, &ndr_table_netlogon,
    9390             :                         NDR_NETR_DSRGETFORESTTRUSTINFORMATION, mem_ctx, r);
    9391             : 
    9392         176 :         return status;
    9393             : }
    9394             : 
    9395             : struct dcerpc_netr_DsRGetForestTrustInformation_state {
    9396             :         struct netr_DsRGetForestTrustInformation orig;
    9397             :         struct netr_DsRGetForestTrustInformation tmp;
    9398             :         TALLOC_CTX *out_mem_ctx;
    9399             : };
    9400             : 
    9401             : static void dcerpc_netr_DsRGetForestTrustInformation_done(struct tevent_req *subreq);
    9402             : 
    9403           0 : struct tevent_req *dcerpc_netr_DsRGetForestTrustInformation_send(TALLOC_CTX *mem_ctx,
    9404             :                                                                  struct tevent_context *ev,
    9405             :                                                                  struct dcerpc_binding_handle *h,
    9406             :                                                                  const char *_server_name /* [in] [charset(UTF16),unique] */,
    9407             :                                                                  const char *_trusted_domain_name /* [in] [charset(UTF16),unique] */,
    9408             :                                                                  uint32_t _flags /* [in]  */,
    9409             :                                                                  struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */)
    9410             : {
    9411             :         struct tevent_req *req;
    9412             :         struct dcerpc_netr_DsRGetForestTrustInformation_state *state;
    9413             :         struct tevent_req *subreq;
    9414             : 
    9415           0 :         req = tevent_req_create(mem_ctx, &state,
    9416             :                                 struct dcerpc_netr_DsRGetForestTrustInformation_state);
    9417           0 :         if (req == NULL) {
    9418           0 :                 return NULL;
    9419             :         }
    9420           0 :         state->out_mem_ctx = NULL;
    9421             : 
    9422             :         /* In parameters */
    9423           0 :         state->orig.in.server_name = _server_name;
    9424           0 :         state->orig.in.trusted_domain_name = _trusted_domain_name;
    9425           0 :         state->orig.in.flags = _flags;
    9426             : 
    9427             :         /* Out parameters */
    9428           0 :         state->orig.out.forest_trust_info = _forest_trust_info;
    9429             : 
    9430             :         /* Result */
    9431           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9432             : 
    9433           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9434             :                              "dcerpc_netr_DsRGetForestTrustInformation_out_memory");
    9435           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9436           0 :                 return tevent_req_post(req, ev);
    9437             :         }
    9438             : 
    9439             :         /* make a temporary copy, that we pass to the dispatch function */
    9440           0 :         state->tmp = state->orig;
    9441             : 
    9442           0 :         subreq = dcerpc_netr_DsRGetForestTrustInformation_r_send(state, ev, h, &state->tmp);
    9443           0 :         if (tevent_req_nomem(subreq, req)) {
    9444           0 :                 return tevent_req_post(req, ev);
    9445             :         }
    9446           0 :         tevent_req_set_callback(subreq, dcerpc_netr_DsRGetForestTrustInformation_done, req);
    9447           0 :         return req;
    9448             : }
    9449             : 
    9450           0 : static void dcerpc_netr_DsRGetForestTrustInformation_done(struct tevent_req *subreq)
    9451             : {
    9452           0 :         struct tevent_req *req = tevent_req_callback_data(
    9453             :                 subreq, struct tevent_req);
    9454           0 :         struct dcerpc_netr_DsRGetForestTrustInformation_state *state = tevent_req_data(
    9455             :                 req, struct dcerpc_netr_DsRGetForestTrustInformation_state);
    9456             :         NTSTATUS status;
    9457             :         TALLOC_CTX *mem_ctx;
    9458             : 
    9459           0 :         if (state->out_mem_ctx) {
    9460           0 :                 mem_ctx = state->out_mem_ctx;
    9461             :         } else {
    9462           0 :                 mem_ctx = state;
    9463             :         }
    9464             : 
    9465           0 :         status = dcerpc_netr_DsRGetForestTrustInformation_r_recv(subreq, mem_ctx);
    9466           0 :         TALLOC_FREE(subreq);
    9467           0 :         if (tevent_req_nterror(req, status)) {
    9468           0 :                 return;
    9469             :         }
    9470             : 
    9471             :         /* Copy out parameters */
    9472           0 :         *state->orig.out.forest_trust_info = *state->tmp.out.forest_trust_info;
    9473             : 
    9474             :         /* Copy result */
    9475           0 :         state->orig.out.result = state->tmp.out.result;
    9476             : 
    9477             :         /* Reset temporary structure */
    9478           0 :         NDR_ZERO_STRUCT(state->tmp);
    9479             : 
    9480           0 :         tevent_req_done(req);
    9481             : }
    9482             : 
    9483           0 : NTSTATUS dcerpc_netr_DsRGetForestTrustInformation_recv(struct tevent_req *req,
    9484             :                                                        TALLOC_CTX *mem_ctx,
    9485             :                                                        WERROR *result)
    9486             : {
    9487           0 :         struct dcerpc_netr_DsRGetForestTrustInformation_state *state = tevent_req_data(
    9488             :                 req, struct dcerpc_netr_DsRGetForestTrustInformation_state);
    9489             :         NTSTATUS status;
    9490             : 
    9491           0 :         if (tevent_req_is_nterror(req, &status)) {
    9492           0 :                 tevent_req_received(req);
    9493           0 :                 return status;
    9494             :         }
    9495             : 
    9496             :         /* Steal possible out parameters to the callers context */
    9497           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9498             : 
    9499             :         /* Return result */
    9500           0 :         *result = state->orig.out.result;
    9501             : 
    9502           0 :         tevent_req_received(req);
    9503           0 :         return NT_STATUS_OK;
    9504             : }
    9505             : 
    9506           0 : NTSTATUS dcerpc_netr_DsRGetForestTrustInformation(struct dcerpc_binding_handle *h,
    9507             :                                                   TALLOC_CTX *mem_ctx,
    9508             :                                                   const char *_server_name /* [in] [charset(UTF16),unique] */,
    9509             :                                                   const char *_trusted_domain_name /* [in] [charset(UTF16),unique] */,
    9510             :                                                   uint32_t _flags /* [in]  */,
    9511             :                                                   struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */,
    9512             :                                                   WERROR *result)
    9513             : {
    9514             :         struct netr_DsRGetForestTrustInformation r;
    9515             :         NTSTATUS status;
    9516             : 
    9517             :         /* In parameters */
    9518           0 :         r.in.server_name = _server_name;
    9519           0 :         r.in.trusted_domain_name = _trusted_domain_name;
    9520           0 :         r.in.flags = _flags;
    9521             : 
    9522             :         /* Out parameters */
    9523           0 :         r.out.forest_trust_info = _forest_trust_info;
    9524             : 
    9525             :         /* Result */
    9526           0 :         NDR_ZERO_STRUCT(r.out.result);
    9527             : 
    9528           0 :         status = dcerpc_netr_DsRGetForestTrustInformation_r(h, mem_ctx, &r);
    9529           0 :         if (!NT_STATUS_IS_OK(status)) {
    9530           0 :                 return status;
    9531             :         }
    9532             : 
    9533             :         /* Return variables */
    9534           0 :         *_forest_trust_info = *r.out.forest_trust_info;
    9535             : 
    9536             :         /* Return result */
    9537           0 :         *result = r.out.result;
    9538             : 
    9539           0 :         return NT_STATUS_OK;
    9540             : }
    9541             : 
    9542             : struct dcerpc_netr_GetForestTrustInformation_r_state {
    9543             :         TALLOC_CTX *out_mem_ctx;
    9544             : };
    9545             : 
    9546             : static void dcerpc_netr_GetForestTrustInformation_r_done(struct tevent_req *subreq);
    9547             : 
    9548           0 : struct tevent_req *dcerpc_netr_GetForestTrustInformation_r_send(TALLOC_CTX *mem_ctx,
    9549             :         struct tevent_context *ev,
    9550             :         struct dcerpc_binding_handle *h,
    9551             :         struct netr_GetForestTrustInformation *r)
    9552             : {
    9553             :         struct tevent_req *req;
    9554             :         struct dcerpc_netr_GetForestTrustInformation_r_state *state;
    9555             :         struct tevent_req *subreq;
    9556             : 
    9557           0 :         req = tevent_req_create(mem_ctx, &state,
    9558             :                                 struct dcerpc_netr_GetForestTrustInformation_r_state);
    9559           0 :         if (req == NULL) {
    9560           0 :                 return NULL;
    9561             :         }
    9562             : 
    9563           0 :         state->out_mem_ctx = talloc_new(state);
    9564           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9565           0 :                 return tevent_req_post(req, ev);
    9566             :         }
    9567             : 
    9568           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9569             :                         NULL, &ndr_table_netlogon,
    9570           0 :                         NDR_NETR_GETFORESTTRUSTINFORMATION, state->out_mem_ctx, r);
    9571           0 :         if (tevent_req_nomem(subreq, req)) {
    9572           0 :                 return tevent_req_post(req, ev);
    9573             :         }
    9574           0 :         tevent_req_set_callback(subreq, dcerpc_netr_GetForestTrustInformation_r_done, req);
    9575             : 
    9576           0 :         return req;
    9577             : }
    9578             : 
    9579           0 : static void dcerpc_netr_GetForestTrustInformation_r_done(struct tevent_req *subreq)
    9580             : {
    9581           0 :         struct tevent_req *req =
    9582           0 :                 tevent_req_callback_data(subreq,
    9583             :                 struct tevent_req);
    9584             :         NTSTATUS status;
    9585             : 
    9586           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9587           0 :         TALLOC_FREE(subreq);
    9588           0 :         if (tevent_req_nterror(req, status)) {
    9589           0 :                 return;
    9590             :         }
    9591             : 
    9592           0 :         tevent_req_done(req);
    9593             : }
    9594             : 
    9595           0 : NTSTATUS dcerpc_netr_GetForestTrustInformation_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9596             : {
    9597           0 :         struct dcerpc_netr_GetForestTrustInformation_r_state *state =
    9598           0 :                 tevent_req_data(req,
    9599             :                 struct dcerpc_netr_GetForestTrustInformation_r_state);
    9600             :         NTSTATUS status;
    9601             : 
    9602           0 :         if (tevent_req_is_nterror(req, &status)) {
    9603           0 :                 tevent_req_received(req);
    9604           0 :                 return status;
    9605             :         }
    9606             : 
    9607           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9608             : 
    9609           0 :         tevent_req_received(req);
    9610           0 :         return NT_STATUS_OK;
    9611             : }
    9612             : 
    9613          21 : NTSTATUS dcerpc_netr_GetForestTrustInformation_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_GetForestTrustInformation *r)
    9614             : {
    9615             :         NTSTATUS status;
    9616             : 
    9617          21 :         status = dcerpc_binding_handle_call(h,
    9618             :                         NULL, &ndr_table_netlogon,
    9619             :                         NDR_NETR_GETFORESTTRUSTINFORMATION, mem_ctx, r);
    9620             : 
    9621          21 :         return status;
    9622             : }
    9623             : 
    9624             : struct dcerpc_netr_GetForestTrustInformation_state {
    9625             :         struct netr_GetForestTrustInformation orig;
    9626             :         struct netr_GetForestTrustInformation tmp;
    9627             :         TALLOC_CTX *out_mem_ctx;
    9628             : };
    9629             : 
    9630             : static void dcerpc_netr_GetForestTrustInformation_done(struct tevent_req *subreq);
    9631             : 
    9632           0 : struct tevent_req *dcerpc_netr_GetForestTrustInformation_send(TALLOC_CTX *mem_ctx,
    9633             :                                                               struct tevent_context *ev,
    9634             :                                                               struct dcerpc_binding_handle *h,
    9635             :                                                               const char *_server_name /* [in] [charset(UTF16),unique] */,
    9636             :                                                               const char *_computer_name /* [in] [charset(UTF16),ref] */,
    9637             :                                                               struct netr_Authenticator *_credential /* [in] [ref] */,
    9638             :                                                               struct netr_Authenticator *_return_authenticator /* [out] [ref] */,
    9639             :                                                               uint32_t _flags /* [in]  */,
    9640             :                                                               struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */)
    9641             : {
    9642             :         struct tevent_req *req;
    9643             :         struct dcerpc_netr_GetForestTrustInformation_state *state;
    9644             :         struct tevent_req *subreq;
    9645             : 
    9646           0 :         req = tevent_req_create(mem_ctx, &state,
    9647             :                                 struct dcerpc_netr_GetForestTrustInformation_state);
    9648           0 :         if (req == NULL) {
    9649           0 :                 return NULL;
    9650             :         }
    9651           0 :         state->out_mem_ctx = NULL;
    9652             : 
    9653             :         /* In parameters */
    9654           0 :         state->orig.in.server_name = _server_name;
    9655           0 :         state->orig.in.computer_name = _computer_name;
    9656           0 :         state->orig.in.credential = _credential;
    9657           0 :         state->orig.in.flags = _flags;
    9658             : 
    9659             :         /* Out parameters */
    9660           0 :         state->orig.out.return_authenticator = _return_authenticator;
    9661           0 :         state->orig.out.forest_trust_info = _forest_trust_info;
    9662             : 
    9663             :         /* Result */
    9664           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9665             : 
    9666           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9667             :                              "dcerpc_netr_GetForestTrustInformation_out_memory");
    9668           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9669           0 :                 return tevent_req_post(req, ev);
    9670             :         }
    9671             : 
    9672             :         /* make a temporary copy, that we pass to the dispatch function */
    9673           0 :         state->tmp = state->orig;
    9674             : 
    9675           0 :         subreq = dcerpc_netr_GetForestTrustInformation_r_send(state, ev, h, &state->tmp);
    9676           0 :         if (tevent_req_nomem(subreq, req)) {
    9677           0 :                 return tevent_req_post(req, ev);
    9678             :         }
    9679           0 :         tevent_req_set_callback(subreq, dcerpc_netr_GetForestTrustInformation_done, req);
    9680           0 :         return req;
    9681             : }
    9682             : 
    9683           0 : static void dcerpc_netr_GetForestTrustInformation_done(struct tevent_req *subreq)
    9684             : {
    9685           0 :         struct tevent_req *req = tevent_req_callback_data(
    9686             :                 subreq, struct tevent_req);
    9687           0 :         struct dcerpc_netr_GetForestTrustInformation_state *state = tevent_req_data(
    9688             :                 req, struct dcerpc_netr_GetForestTrustInformation_state);
    9689             :         NTSTATUS status;
    9690             :         TALLOC_CTX *mem_ctx;
    9691             : 
    9692           0 :         if (state->out_mem_ctx) {
    9693           0 :                 mem_ctx = state->out_mem_ctx;
    9694             :         } else {
    9695           0 :                 mem_ctx = state;
    9696             :         }
    9697             : 
    9698           0 :         status = dcerpc_netr_GetForestTrustInformation_r_recv(subreq, mem_ctx);
    9699           0 :         TALLOC_FREE(subreq);
    9700           0 :         if (tevent_req_nterror(req, status)) {
    9701           0 :                 return;
    9702             :         }
    9703             : 
    9704             :         /* Copy out parameters */
    9705           0 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    9706           0 :         *state->orig.out.forest_trust_info = *state->tmp.out.forest_trust_info;
    9707             : 
    9708             :         /* Copy result */
    9709           0 :         state->orig.out.result = state->tmp.out.result;
    9710             : 
    9711             :         /* Reset temporary structure */
    9712           0 :         NDR_ZERO_STRUCT(state->tmp);
    9713             : 
    9714           0 :         tevent_req_done(req);
    9715             : }
    9716             : 
    9717           0 : NTSTATUS dcerpc_netr_GetForestTrustInformation_recv(struct tevent_req *req,
    9718             :                                                     TALLOC_CTX *mem_ctx,
    9719             :                                                     NTSTATUS *result)
    9720             : {
    9721           0 :         struct dcerpc_netr_GetForestTrustInformation_state *state = tevent_req_data(
    9722             :                 req, struct dcerpc_netr_GetForestTrustInformation_state);
    9723             :         NTSTATUS status;
    9724             : 
    9725           0 :         if (tevent_req_is_nterror(req, &status)) {
    9726           0 :                 tevent_req_received(req);
    9727           0 :                 return status;
    9728             :         }
    9729             : 
    9730             :         /* Steal possible out parameters to the callers context */
    9731           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9732             : 
    9733             :         /* Return result */
    9734           0 :         *result = state->orig.out.result;
    9735             : 
    9736           0 :         tevent_req_received(req);
    9737           0 :         return NT_STATUS_OK;
    9738             : }
    9739             : 
    9740           0 : NTSTATUS dcerpc_netr_GetForestTrustInformation(struct dcerpc_binding_handle *h,
    9741             :                                                TALLOC_CTX *mem_ctx,
    9742             :                                                const char *_server_name /* [in] [charset(UTF16),unique] */,
    9743             :                                                const char *_computer_name /* [in] [charset(UTF16),ref] */,
    9744             :                                                struct netr_Authenticator *_credential /* [in] [ref] */,
    9745             :                                                struct netr_Authenticator *_return_authenticator /* [out] [ref] */,
    9746             :                                                uint32_t _flags /* [in]  */,
    9747             :                                                struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */,
    9748             :                                                NTSTATUS *result)
    9749             : {
    9750             :         struct netr_GetForestTrustInformation r;
    9751             :         NTSTATUS status;
    9752             : 
    9753             :         /* In parameters */
    9754           0 :         r.in.server_name = _server_name;
    9755           0 :         r.in.computer_name = _computer_name;
    9756           0 :         r.in.credential = _credential;
    9757           0 :         r.in.flags = _flags;
    9758             : 
    9759             :         /* Out parameters */
    9760           0 :         r.out.return_authenticator = _return_authenticator;
    9761           0 :         r.out.forest_trust_info = _forest_trust_info;
    9762             : 
    9763             :         /* Result */
    9764           0 :         NDR_ZERO_STRUCT(r.out.result);
    9765             : 
    9766           0 :         status = dcerpc_netr_GetForestTrustInformation_r(h, mem_ctx, &r);
    9767           0 :         if (!NT_STATUS_IS_OK(status)) {
    9768           0 :                 return status;
    9769             :         }
    9770             : 
    9771             :         /* Return variables */
    9772           0 :         *_return_authenticator = *r.out.return_authenticator;
    9773           0 :         *_forest_trust_info = *r.out.forest_trust_info;
    9774             : 
    9775             :         /* Return result */
    9776           0 :         *result = r.out.result;
    9777             : 
    9778           0 :         return NT_STATUS_OK;
    9779             : }
    9780             : 
    9781             : struct dcerpc_netr_LogonSamLogonWithFlags_r_state {
    9782             :         TALLOC_CTX *out_mem_ctx;
    9783             : };
    9784             : 
    9785             : static void dcerpc_netr_LogonSamLogonWithFlags_r_done(struct tevent_req *subreq);
    9786             : 
    9787          18 : struct tevent_req *dcerpc_netr_LogonSamLogonWithFlags_r_send(TALLOC_CTX *mem_ctx,
    9788             :         struct tevent_context *ev,
    9789             :         struct dcerpc_binding_handle *h,
    9790             :         struct netr_LogonSamLogonWithFlags *r)
    9791             : {
    9792             :         struct tevent_req *req;
    9793             :         struct dcerpc_netr_LogonSamLogonWithFlags_r_state *state;
    9794             :         struct tevent_req *subreq;
    9795             : 
    9796          18 :         req = tevent_req_create(mem_ctx, &state,
    9797             :                                 struct dcerpc_netr_LogonSamLogonWithFlags_r_state);
    9798          18 :         if (req == NULL) {
    9799           0 :                 return NULL;
    9800             :         }
    9801             : 
    9802          18 :         state->out_mem_ctx = talloc_new(state);
    9803          18 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9804           0 :                 return tevent_req_post(req, ev);
    9805             :         }
    9806             : 
    9807          18 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9808             :                         NULL, &ndr_table_netlogon,
    9809          18 :                         NDR_NETR_LOGONSAMLOGONWITHFLAGS, state->out_mem_ctx, r);
    9810          18 :         if (tevent_req_nomem(subreq, req)) {
    9811           0 :                 return tevent_req_post(req, ev);
    9812             :         }
    9813          18 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonSamLogonWithFlags_r_done, req);
    9814             : 
    9815          18 :         return req;
    9816             : }
    9817             : 
    9818          18 : static void dcerpc_netr_LogonSamLogonWithFlags_r_done(struct tevent_req *subreq)
    9819             : {
    9820          18 :         struct tevent_req *req =
    9821          18 :                 tevent_req_callback_data(subreq,
    9822             :                 struct tevent_req);
    9823             :         NTSTATUS status;
    9824             : 
    9825          18 :         status = dcerpc_binding_handle_call_recv(subreq);
    9826          18 :         TALLOC_FREE(subreq);
    9827          18 :         if (tevent_req_nterror(req, status)) {
    9828           0 :                 return;
    9829             :         }
    9830             : 
    9831          18 :         tevent_req_done(req);
    9832             : }
    9833             : 
    9834          18 : NTSTATUS dcerpc_netr_LogonSamLogonWithFlags_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9835             : {
    9836          18 :         struct dcerpc_netr_LogonSamLogonWithFlags_r_state *state =
    9837          18 :                 tevent_req_data(req,
    9838             :                 struct dcerpc_netr_LogonSamLogonWithFlags_r_state);
    9839             :         NTSTATUS status;
    9840             : 
    9841          18 :         if (tevent_req_is_nterror(req, &status)) {
    9842           0 :                 tevent_req_received(req);
    9843           0 :                 return status;
    9844             :         }
    9845             : 
    9846          18 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9847             : 
    9848          18 :         tevent_req_received(req);
    9849          18 :         return NT_STATUS_OK;
    9850             : }
    9851             : 
    9852        2063 : NTSTATUS dcerpc_netr_LogonSamLogonWithFlags_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_LogonSamLogonWithFlags *r)
    9853             : {
    9854             :         NTSTATUS status;
    9855             : 
    9856        2063 :         status = dcerpc_binding_handle_call(h,
    9857             :                         NULL, &ndr_table_netlogon,
    9858             :                         NDR_NETR_LOGONSAMLOGONWITHFLAGS, mem_ctx, r);
    9859             : 
    9860        2063 :         return status;
    9861             : }
    9862             : 
    9863             : struct dcerpc_netr_LogonSamLogonWithFlags_state {
    9864             :         struct netr_LogonSamLogonWithFlags orig;
    9865             :         struct netr_LogonSamLogonWithFlags tmp;
    9866             :         TALLOC_CTX *out_mem_ctx;
    9867             : };
    9868             : 
    9869             : static void dcerpc_netr_LogonSamLogonWithFlags_done(struct tevent_req *subreq);
    9870             : 
    9871          18 : struct tevent_req *dcerpc_netr_LogonSamLogonWithFlags_send(TALLOC_CTX *mem_ctx,
    9872             :                                                            struct tevent_context *ev,
    9873             :                                                            struct dcerpc_binding_handle *h,
    9874             :                                                            const char *_server_name /* [in] [charset(UTF16),unique] */,
    9875             :                                                            const char *_computer_name /* [in] [charset(UTF16),unique] */,
    9876             :                                                            struct netr_Authenticator *_credential /* [in] [unique] */,
    9877             :                                                            struct netr_Authenticator *_return_authenticator /* [in,out] [unique] */,
    9878             :                                                            enum netr_LogonInfoClass _logon_level /* [in]  */,
    9879             :                                                            union netr_LogonLevel *_logon /* [in] [ref,switch_is(logon_level)] */,
    9880             :                                                            uint16_t _validation_level /* [in]  */,
    9881             :                                                            union netr_Validation *_validation /* [out] [ref,switch_is(validation_level)] */,
    9882             :                                                            uint8_t *_authoritative /* [out] [ref] */,
    9883             :                                                            uint32_t *_flags /* [in,out] [ref] */)
    9884             : {
    9885             :         struct tevent_req *req;
    9886             :         struct dcerpc_netr_LogonSamLogonWithFlags_state *state;
    9887             :         struct tevent_req *subreq;
    9888             : 
    9889          18 :         req = tevent_req_create(mem_ctx, &state,
    9890             :                                 struct dcerpc_netr_LogonSamLogonWithFlags_state);
    9891          18 :         if (req == NULL) {
    9892           0 :                 return NULL;
    9893             :         }
    9894          18 :         state->out_mem_ctx = NULL;
    9895             : 
    9896             :         /* In parameters */
    9897          18 :         state->orig.in.server_name = _server_name;
    9898          18 :         state->orig.in.computer_name = _computer_name;
    9899          18 :         state->orig.in.credential = _credential;
    9900          18 :         state->orig.in.return_authenticator = _return_authenticator;
    9901          18 :         state->orig.in.logon_level = _logon_level;
    9902          18 :         state->orig.in.logon = _logon;
    9903          18 :         state->orig.in.validation_level = _validation_level;
    9904          18 :         state->orig.in.flags = _flags;
    9905             : 
    9906             :         /* Out parameters */
    9907          18 :         state->orig.out.return_authenticator = _return_authenticator;
    9908          18 :         state->orig.out.validation = _validation;
    9909          18 :         state->orig.out.authoritative = _authoritative;
    9910          18 :         state->orig.out.flags = _flags;
    9911             : 
    9912             :         /* Result */
    9913          18 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9914             : 
    9915          18 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9916             :                              "dcerpc_netr_LogonSamLogonWithFlags_out_memory");
    9917          18 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9918           0 :                 return tevent_req_post(req, ev);
    9919             :         }
    9920             : 
    9921             :         /* make a temporary copy, that we pass to the dispatch function */
    9922          18 :         state->tmp = state->orig;
    9923             : 
    9924          18 :         subreq = dcerpc_netr_LogonSamLogonWithFlags_r_send(state, ev, h, &state->tmp);
    9925          18 :         if (tevent_req_nomem(subreq, req)) {
    9926           0 :                 return tevent_req_post(req, ev);
    9927             :         }
    9928          18 :         tevent_req_set_callback(subreq, dcerpc_netr_LogonSamLogonWithFlags_done, req);
    9929          18 :         return req;
    9930             : }
    9931             : 
    9932          18 : static void dcerpc_netr_LogonSamLogonWithFlags_done(struct tevent_req *subreq)
    9933             : {
    9934          18 :         struct tevent_req *req = tevent_req_callback_data(
    9935             :                 subreq, struct tevent_req);
    9936          18 :         struct dcerpc_netr_LogonSamLogonWithFlags_state *state = tevent_req_data(
    9937             :                 req, struct dcerpc_netr_LogonSamLogonWithFlags_state);
    9938             :         NTSTATUS status;
    9939             :         TALLOC_CTX *mem_ctx;
    9940             : 
    9941          18 :         if (state->out_mem_ctx) {
    9942          18 :                 mem_ctx = state->out_mem_ctx;
    9943             :         } else {
    9944           0 :                 mem_ctx = state;
    9945             :         }
    9946             : 
    9947          18 :         status = dcerpc_netr_LogonSamLogonWithFlags_r_recv(subreq, mem_ctx);
    9948          18 :         TALLOC_FREE(subreq);
    9949          18 :         if (tevent_req_nterror(req, status)) {
    9950           0 :                 return;
    9951             :         }
    9952             : 
    9953             :         /* Copy out parameters */
    9954          18 :         if (state->orig.out.return_authenticator && state->tmp.out.return_authenticator) {
    9955          18 :                 *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
    9956             :         }
    9957          18 :         *state->orig.out.validation = *state->tmp.out.validation;
    9958          18 :         *state->orig.out.authoritative = *state->tmp.out.authoritative;
    9959          18 :         *state->orig.out.flags = *state->tmp.out.flags;
    9960             : 
    9961             :         /* Copy result */
    9962          18 :         state->orig.out.result = state->tmp.out.result;
    9963             : 
    9964             :         /* Reset temporary structure */
    9965          18 :         NDR_ZERO_STRUCT(state->tmp);
    9966             : 
    9967          18 :         tevent_req_done(req);
    9968             : }
    9969             : 
    9970          18 : NTSTATUS dcerpc_netr_LogonSamLogonWithFlags_recv(struct tevent_req *req,
    9971             :                                                  TALLOC_CTX *mem_ctx,
    9972             :                                                  NTSTATUS *result)
    9973             : {
    9974          18 :         struct dcerpc_netr_LogonSamLogonWithFlags_state *state = tevent_req_data(
    9975             :                 req, struct dcerpc_netr_LogonSamLogonWithFlags_state);
    9976             :         NTSTATUS status;
    9977             : 
    9978          18 :         if (tevent_req_is_nterror(req, &status)) {
    9979           0 :                 tevent_req_received(req);
    9980           0 :                 return status;
    9981             :         }
    9982             : 
    9983             :         /* Steal possible out parameters to the callers context */
    9984          18 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9985             : 
    9986             :         /* Return result */
    9987          18 :         *result = state->orig.out.result;
    9988             : 
    9989          18 :         tevent_req_received(req);
    9990          18 :         return NT_STATUS_OK;
    9991             : }
    9992             : 
    9993           0 : NTSTATUS dcerpc_netr_LogonSamLogonWithFlags(struct dcerpc_binding_handle *h,
    9994             :                                             TALLOC_CTX *mem_ctx,
    9995             :                                             const char *_server_name /* [in] [charset(UTF16),unique] */,
    9996             :                                             const char *_computer_name /* [in] [charset(UTF16),unique] */,
    9997             :                                             struct netr_Authenticator *_credential /* [in] [unique] */,
    9998             :                                             struct netr_Authenticator *_return_authenticator /* [in,out] [unique] */,
    9999             :                                             enum netr_LogonInfoClass _logon_level /* [in]  */,
   10000             :                                             union netr_LogonLevel *_logon /* [in] [ref,switch_is(logon_level)] */,
   10001             :                                             uint16_t _validation_level /* [in]  */,
   10002             :                                             union netr_Validation *_validation /* [out] [ref,switch_is(validation_level)] */,
   10003             :                                             uint8_t *_authoritative /* [out] [ref] */,
   10004             :                                             uint32_t *_flags /* [in,out] [ref] */,
   10005             :                                             NTSTATUS *result)
   10006             : {
   10007             :         struct netr_LogonSamLogonWithFlags r;
   10008             :         NTSTATUS status;
   10009             : 
   10010             :         /* In parameters */
   10011           0 :         r.in.server_name = _server_name;
   10012           0 :         r.in.computer_name = _computer_name;
   10013           0 :         r.in.credential = _credential;
   10014           0 :         r.in.return_authenticator = _return_authenticator;
   10015           0 :         r.in.logon_level = _logon_level;
   10016           0 :         r.in.logon = _logon;
   10017           0 :         r.in.validation_level = _validation_level;
   10018           0 :         r.in.flags = _flags;
   10019             : 
   10020             :         /* Out parameters */
   10021           0 :         r.out.return_authenticator = _return_authenticator;
   10022           0 :         r.out.validation = _validation;
   10023           0 :         r.out.authoritative = _authoritative;
   10024           0 :         r.out.flags = _flags;
   10025             : 
   10026             :         /* Result */
   10027           0 :         NDR_ZERO_STRUCT(r.out.result);
   10028             : 
   10029           0 :         status = dcerpc_netr_LogonSamLogonWithFlags_r(h, mem_ctx, &r);
   10030           0 :         if (!NT_STATUS_IS_OK(status)) {
   10031           0 :                 return status;
   10032             :         }
   10033             : 
   10034             :         /* Return variables */
   10035           0 :         if (_return_authenticator && r.out.return_authenticator) {
   10036           0 :                 *_return_authenticator = *r.out.return_authenticator;
   10037             :         }
   10038           0 :         *_validation = *r.out.validation;
   10039           0 :         *_authoritative = *r.out.authoritative;
   10040           0 :         *_flags = *r.out.flags;
   10041             : 
   10042             :         /* Return result */
   10043           0 :         *result = r.out.result;
   10044             : 
   10045           0 :         return NT_STATUS_OK;
   10046             : }
   10047             : 
   10048             : struct dcerpc_netr_ServerGetTrustInfo_r_state {
   10049             :         TALLOC_CTX *out_mem_ctx;
   10050             : };
   10051             : 
   10052             : static void dcerpc_netr_ServerGetTrustInfo_r_done(struct tevent_req *subreq);
   10053             : 
   10054           0 : struct tevent_req *dcerpc_netr_ServerGetTrustInfo_r_send(TALLOC_CTX *mem_ctx,
   10055             :         struct tevent_context *ev,
   10056             :         struct dcerpc_binding_handle *h,
   10057             :         struct netr_ServerGetTrustInfo *r)
   10058             : {
   10059             :         struct tevent_req *req;
   10060             :         struct dcerpc_netr_ServerGetTrustInfo_r_state *state;
   10061             :         struct tevent_req *subreq;
   10062             : 
   10063           0 :         req = tevent_req_create(mem_ctx, &state,
   10064             :                                 struct dcerpc_netr_ServerGetTrustInfo_r_state);
   10065           0 :         if (req == NULL) {
   10066           0 :                 return NULL;
   10067             :         }
   10068             : 
   10069           0 :         state->out_mem_ctx = talloc_new(state);
   10070           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10071           0 :                 return tevent_req_post(req, ev);
   10072             :         }
   10073             : 
   10074           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   10075             :                         NULL, &ndr_table_netlogon,
   10076           0 :                         NDR_NETR_SERVERGETTRUSTINFO, state->out_mem_ctx, r);
   10077           0 :         if (tevent_req_nomem(subreq, req)) {
   10078           0 :                 return tevent_req_post(req, ev);
   10079             :         }
   10080           0 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerGetTrustInfo_r_done, req);
   10081             : 
   10082           0 :         return req;
   10083             : }
   10084             : 
   10085           0 : static void dcerpc_netr_ServerGetTrustInfo_r_done(struct tevent_req *subreq)
   10086             : {
   10087           0 :         struct tevent_req *req =
   10088           0 :                 tevent_req_callback_data(subreq,
   10089             :                 struct tevent_req);
   10090             :         NTSTATUS status;
   10091             : 
   10092           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   10093           0 :         TALLOC_FREE(subreq);
   10094           0 :         if (tevent_req_nterror(req, status)) {
   10095           0 :                 return;
   10096             :         }
   10097             : 
   10098           0 :         tevent_req_done(req);
   10099             : }
   10100             : 
   10101           0 : NTSTATUS dcerpc_netr_ServerGetTrustInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   10102             : {
   10103           0 :         struct dcerpc_netr_ServerGetTrustInfo_r_state *state =
   10104           0 :                 tevent_req_data(req,
   10105             :                 struct dcerpc_netr_ServerGetTrustInfo_r_state);
   10106             :         NTSTATUS status;
   10107             : 
   10108           0 :         if (tevent_req_is_nterror(req, &status)) {
   10109           0 :                 tevent_req_received(req);
   10110           0 :                 return status;
   10111             :         }
   10112             : 
   10113           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10114             : 
   10115           0 :         tevent_req_received(req);
   10116           0 :         return NT_STATUS_OK;
   10117             : }
   10118             : 
   10119          39 : NTSTATUS dcerpc_netr_ServerGetTrustInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct netr_ServerGetTrustInfo *r)
   10120             : {
   10121             :         NTSTATUS status;
   10122             : 
   10123          39 :         status = dcerpc_binding_handle_call(h,
   10124             :                         NULL, &ndr_table_netlogon,
   10125             :                         NDR_NETR_SERVERGETTRUSTINFO, mem_ctx, r);
   10126             : 
   10127          39 :         return status;
   10128             : }
   10129             : 
   10130             : struct dcerpc_netr_ServerGetTrustInfo_state {
   10131             :         struct netr_ServerGetTrustInfo orig;
   10132             :         struct netr_ServerGetTrustInfo tmp;
   10133             :         TALLOC_CTX *out_mem_ctx;
   10134             : };
   10135             : 
   10136             : static void dcerpc_netr_ServerGetTrustInfo_done(struct tevent_req *subreq);
   10137             : 
   10138           0 : struct tevent_req *dcerpc_netr_ServerGetTrustInfo_send(TALLOC_CTX *mem_ctx,
   10139             :                                                        struct tevent_context *ev,
   10140             :                                                        struct dcerpc_binding_handle *h,
   10141             :                                                        const char *_server_name /* [in] [charset(UTF16),unique] */,
   10142             :                                                        const char *_account_name /* [in] [charset(UTF16),ref] */,
   10143             :                                                        enum netr_SchannelType _secure_channel_type /* [in]  */,
   10144             :                                                        const char *_computer_name /* [in] [charset(UTF16),ref] */,
   10145             :                                                        struct netr_Authenticator *_credential /* [in] [ref] */,
   10146             :                                                        struct netr_Authenticator *_return_authenticator /* [out] [ref] */,
   10147             :                                                        struct samr_Password *_new_owf_password /* [out] [ref] */,
   10148             :                                                        struct samr_Password *_old_owf_password /* [out] [ref] */,
   10149             :                                                        struct netr_TrustInfo **_trust_info /* [out] [ref] */)
   10150             : {
   10151             :         struct tevent_req *req;
   10152             :         struct dcerpc_netr_ServerGetTrustInfo_state *state;
   10153             :         struct tevent_req *subreq;
   10154             : 
   10155           0 :         req = tevent_req_create(mem_ctx, &state,
   10156             :                                 struct dcerpc_netr_ServerGetTrustInfo_state);
   10157           0 :         if (req == NULL) {
   10158           0 :                 return NULL;
   10159             :         }
   10160           0 :         state->out_mem_ctx = NULL;
   10161             : 
   10162             :         /* In parameters */
   10163           0 :         state->orig.in.server_name = _server_name;
   10164           0 :         state->orig.in.account_name = _account_name;
   10165           0 :         state->orig.in.secure_channel_type = _secure_channel_type;
   10166           0 :         state->orig.in.computer_name = _computer_name;
   10167           0 :         state->orig.in.credential = _credential;
   10168             : 
   10169             :         /* Out parameters */
   10170           0 :         state->orig.out.return_authenticator = _return_authenticator;
   10171           0 :         state->orig.out.new_owf_password = _new_owf_password;
   10172           0 :         state->orig.out.old_owf_password = _old_owf_password;
   10173           0 :         state->orig.out.trust_info = _trust_info;
   10174             : 
   10175             :         /* Result */
   10176           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   10177             : 
   10178           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   10179             :                              "dcerpc_netr_ServerGetTrustInfo_out_memory");
   10180           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10181           0 :                 return tevent_req_post(req, ev);
   10182             :         }
   10183             : 
   10184             :         /* make a temporary copy, that we pass to the dispatch function */
   10185           0 :         state->tmp = state->orig;
   10186             : 
   10187           0 :         subreq = dcerpc_netr_ServerGetTrustInfo_r_send(state, ev, h, &state->tmp);
   10188           0 :         if (tevent_req_nomem(subreq, req)) {
   10189           0 :                 return tevent_req_post(req, ev);
   10190             :         }
   10191           0 :         tevent_req_set_callback(subreq, dcerpc_netr_ServerGetTrustInfo_done, req);
   10192           0 :         return req;
   10193             : }
   10194             : 
   10195           0 : static void dcerpc_netr_ServerGetTrustInfo_done(struct tevent_req *subreq)
   10196             : {
   10197           0 :         struct tevent_req *req = tevent_req_callback_data(
   10198             :                 subreq, struct tevent_req);
   10199           0 :         struct dcerpc_netr_ServerGetTrustInfo_state *state = tevent_req_data(
   10200             :                 req, struct dcerpc_netr_ServerGetTrustInfo_state);
   10201             :         NTSTATUS status;
   10202             :         TALLOC_CTX *mem_ctx;
   10203             : 
   10204           0 :         if (state->out_mem_ctx) {
   10205           0 :                 mem_ctx = state->out_mem_ctx;
   10206             :         } else {
   10207           0 :                 mem_ctx = state;
   10208             :         }
   10209             : 
   10210           0 :         status = dcerpc_netr_ServerGetTrustInfo_r_recv(subreq, mem_ctx);
   10211           0 :         TALLOC_FREE(subreq);
   10212           0 :         if (tevent_req_nterror(req, status)) {
   10213           0 :                 return;
   10214             :         }
   10215             : 
   10216             :         /* Copy out parameters */
   10217           0 :         *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator;
   10218           0 :         *state->orig.out.new_owf_password = *state->tmp.out.new_owf_password;
   10219           0 :         *state->orig.out.old_owf_password = *state->tmp.out.old_owf_password;
   10220           0 :         *state->orig.out.trust_info = *state->tmp.out.trust_info;
   10221             : 
   10222             :         /* Copy result */
   10223           0 :         state->orig.out.result = state->tmp.out.result;
   10224             : 
   10225             :         /* Reset temporary structure */
   10226           0 :         NDR_ZERO_STRUCT(state->tmp);
   10227             : 
   10228           0 :         tevent_req_done(req);
   10229             : }
   10230             : 
   10231           0 : NTSTATUS dcerpc_netr_ServerGetTrustInfo_recv(struct tevent_req *req,
   10232             :                                              TALLOC_CTX *mem_ctx,
   10233             :                                              NTSTATUS *result)
   10234             : {
   10235           0 :         struct dcerpc_netr_ServerGetTrustInfo_state *state = tevent_req_data(
   10236             :                 req, struct dcerpc_netr_ServerGetTrustInfo_state);
   10237             :         NTSTATUS status;
   10238             : 
   10239           0 :         if (tevent_req_is_nterror(req, &status)) {
   10240           0 :                 tevent_req_received(req);
   10241           0 :                 return status;
   10242             :         }
   10243             : 
   10244             :         /* Steal possible out parameters to the callers context */
   10245           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10246             : 
   10247             :         /* Return result */
   10248           0 :         *result = state->orig.out.result;
   10249             : 
   10250           0 :         tevent_req_received(req);
   10251           0 :         return NT_STATUS_OK;
   10252             : }
   10253             : 
   10254           0 : NTSTATUS dcerpc_netr_ServerGetTrustInfo(struct dcerpc_binding_handle *h,
   10255             :                                         TALLOC_CTX *mem_ctx,
   10256             :                                         const char *_server_name /* [in] [charset(UTF16),unique] */,
   10257             :                                         const char *_account_name /* [in] [charset(UTF16),ref] */,
   10258             :                                         enum netr_SchannelType _secure_channel_type /* [in]  */,
   10259             :                                         const char *_computer_name /* [in] [charset(UTF16),ref] */,
   10260             :                                         struct netr_Authenticator *_credential /* [in] [ref] */,
   10261             :                                         struct netr_Authenticator *_return_authenticator /* [out] [ref] */,
   10262             :                                         struct samr_Password *_new_owf_password /* [out] [ref] */,
   10263             :                                         struct samr_Password *_old_owf_password /* [out] [ref] */,
   10264             :                                         struct netr_TrustInfo **_trust_info /* [out] [ref] */,
   10265             :                                         NTSTATUS *result)
   10266             : {
   10267             :         struct netr_ServerGetTrustInfo r;
   10268             :         NTSTATUS status;
   10269             : 
   10270             :         /* In parameters */
   10271           0 :         r.in.server_name = _server_name;
   10272           0 :         r.in.account_name = _account_name;
   10273           0 :         r.in.secure_channel_type = _secure_channel_type;
   10274           0 :         r.in.computer_name = _computer_name;
   10275           0 :         r.in.credential = _credential;
   10276             : 
   10277             :         /* Out parameters */
   10278           0 :         r.out.return_authenticator = _return_authenticator;
   10279           0 :         r.out.new_owf_password = _new_owf_password;
   10280           0 :         r.out.old_owf_password = _old_owf_password;
   10281           0 :         r.out.trust_info = _trust_info;
   10282             : 
   10283             :         /* Result */
   10284           0 :         NDR_ZERO_STRUCT(r.out.result);
   10285             : 
   10286           0 :         status = dcerpc_netr_ServerGetTrustInfo_r(h, mem_ctx, &r);
   10287           0 :         if (!NT_STATUS_IS_OK(status)) {
   10288           0 :                 return status;
   10289             :         }
   10290             : 
   10291             :         /* Return variables */
   10292           0 :         *_return_authenticator = *r.out.return_authenticator;
   10293           0 :         *_new_owf_password = *r.out.new_owf_password;
   10294           0 :         *_old_owf_password = *r.out.old_owf_password;
   10295           0 :         *_trust_info = *r.out.trust_info;
   10296             : 
   10297             :         /* Return result */
   10298           0 :         *result = r.out.result;
   10299             : 
   10300           0 :         return NT_STATUS_OK;
   10301             : }
   10302             : 
   10303             : struct dcerpc_netr_Unused47_r_state {
   10304             :         TALLOC_CTX *out_mem_ctx;
   10305             : };
   10306             : 
   10307             : static void dcerpc_netr_Unused47_r_done(struct tevent_req *subreq);
   10308             : 
   10309           0 : struct tevent_req *dcerpc_netr_Unused47_r_send(TALLOC_CTX *mem_ctx,
   10310             :         struct tevent_context *ev,
   10311             :         struct dcerpc_binding_handle *h,
   10312             :         struct netr_Unused47 *r)
   10313             : {
   10314             :         struct tevent_req *req;
   10315             :         struct dcerpc_netr_Unused47_r_state *state;
   10316             :         struct tevent_req *subreq;
   10317             : 
   10318           0 :         req = tevent_req_create(mem_ctx, &state,
   10319             :                                 struct dcerpc_netr_Unused47_r_state);
   10320           0 :         if (req == NULL) {
   10321           0 :                 return NULL;
   10322             :         }
   10323             : 
   10324           0 :         state->out_mem_ctx = NULL;
   10325             : 
   10326           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   10327             :                         NULL, &ndr_table_netlogon,
   10328             :                         NDR_NETR_UNUSED47, state, r);
   10329           0 :         if (tevent_req_nomem(subreq, req)) {
   10330           0 :                 return tevent_req_post(req, ev);
   10331             :         }
   10332           0 :         tevent_req_set_callback(subreq, dcerpc_netr_Unused47_r_done, req);
   10333             : 
   10334           0 :         return req;
   10335             : }
   10336             : 
   10337           0 : static void dcerpc_netr_Unused47_r_done(struct tevent_req *subreq)
   10338             : {
   10339           0 :         struct tevent_req *req =
   10340           0 :                 tevent_req_callback_data(subreq,
   10341             :                 struct tevent_req);
   10342             :         NTSTATUS status;
   10343             : 
   10344           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   10345           0 :         TALLOC_FREE(subreq);
   10346           0 :         if (tevent_req_nterror(req, status)) {
   10347           0 :                 return;
   10348             :         }
   10349             : 
   10350           0 :         tevent_req_done(req);
   10351             : }
   10352             : 
   10353           0 : NTSTATUS dcerpc_netr_Unused47_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   10354             : {
   10355           0 :         struct dcerpc_netr_Unused47_r_state *state =
   10356