LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_winbind_c.c (source / functions) Hit Total Coverage
Test: coverage report for master 2b515b7d Lines: 1562 3233 48.3 %
Date: 2024-02-28 12:06:22 Functions: 170 260 65.4 %

          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_winbind.h"
       7             : #include "bin/default/librpc/gen_ndr/ndr_winbind_c.h"
       8             : 
       9             : /* winbind - client functions generated by pidl */
      10             : 
      11             : struct dcerpc_wbint_Ping_r_state {
      12             :         TALLOC_CTX *out_mem_ctx;
      13             : };
      14             : 
      15             : static void dcerpc_wbint_Ping_r_done(struct tevent_req *subreq);
      16             : 
      17           4 : struct tevent_req *dcerpc_wbint_Ping_r_send(TALLOC_CTX *mem_ctx,
      18             :         struct tevent_context *ev,
      19             :         struct dcerpc_binding_handle *h,
      20             :         struct wbint_Ping *r)
      21             : {
      22           0 :         struct tevent_req *req;
      23           0 :         struct dcerpc_wbint_Ping_r_state *state;
      24           0 :         struct tevent_req *subreq;
      25             : 
      26           4 :         req = tevent_req_create(mem_ctx, &state,
      27             :                                 struct dcerpc_wbint_Ping_r_state);
      28           4 :         if (req == NULL) {
      29           0 :                 return NULL;
      30             :         }
      31             : 
      32           4 :         state->out_mem_ctx = talloc_new(state);
      33           4 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
      34           0 :                 return tevent_req_post(req, ev);
      35             :         }
      36             : 
      37           4 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
      38             :                         NULL, &ndr_table_winbind,
      39           4 :                         NDR_WBINT_PING, state->out_mem_ctx, r);
      40           4 :         if (tevent_req_nomem(subreq, req)) {
      41           0 :                 return tevent_req_post(req, ev);
      42             :         }
      43           4 :         tevent_req_set_callback(subreq, dcerpc_wbint_Ping_r_done, req);
      44             : 
      45           4 :         return req;
      46             : }
      47             : 
      48           4 : static void dcerpc_wbint_Ping_r_done(struct tevent_req *subreq)
      49             : {
      50           0 :         struct tevent_req *req =
      51           4 :                 tevent_req_callback_data(subreq,
      52             :                 struct tevent_req);
      53           0 :         NTSTATUS status;
      54             : 
      55           4 :         status = dcerpc_binding_handle_call_recv(subreq);
      56           4 :         TALLOC_FREE(subreq);
      57           4 :         if (tevent_req_nterror(req, status)) {
      58           0 :                 return;
      59             :         }
      60             : 
      61           4 :         tevent_req_done(req);
      62             : }
      63             : 
      64           4 : NTSTATUS dcerpc_wbint_Ping_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
      65             : {
      66           0 :         struct dcerpc_wbint_Ping_r_state *state =
      67           4 :                 tevent_req_data(req,
      68             :                 struct dcerpc_wbint_Ping_r_state);
      69           0 :         NTSTATUS status;
      70             : 
      71           4 :         if (tevent_req_is_nterror(req, &status)) {
      72           0 :                 tevent_req_received(req);
      73           0 :                 return status;
      74             :         }
      75             : 
      76           4 :         talloc_steal(mem_ctx, state->out_mem_ctx);
      77             : 
      78           4 :         tevent_req_received(req);
      79           4 :         return NT_STATUS_OK;
      80             : }
      81             : 
      82           0 : NTSTATUS dcerpc_wbint_Ping_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_Ping *r)
      83             : {
      84           0 :         NTSTATUS status;
      85             : 
      86           0 :         status = dcerpc_binding_handle_call(h,
      87             :                         NULL, &ndr_table_winbind,
      88             :                         NDR_WBINT_PING, mem_ctx, r);
      89             : 
      90           0 :         return status;
      91             : }
      92             : 
      93             : struct dcerpc_wbint_Ping_state {
      94             :         struct wbint_Ping orig;
      95             :         struct wbint_Ping tmp;
      96             :         TALLOC_CTX *out_mem_ctx;
      97             : };
      98             : 
      99             : static void dcerpc_wbint_Ping_done(struct tevent_req *subreq);
     100             : 
     101           4 : struct tevent_req *dcerpc_wbint_Ping_send(TALLOC_CTX *mem_ctx,
     102             :                                           struct tevent_context *ev,
     103             :                                           struct dcerpc_binding_handle *h,
     104             :                                           uint32_t _in_data /* [in]  */,
     105             :                                           uint32_t *_out_data /* [out] [ref] */)
     106             : {
     107           0 :         struct tevent_req *req;
     108           0 :         struct dcerpc_wbint_Ping_state *state;
     109           0 :         struct tevent_req *subreq;
     110             : 
     111           4 :         req = tevent_req_create(mem_ctx, &state,
     112             :                                 struct dcerpc_wbint_Ping_state);
     113           4 :         if (req == NULL) {
     114           0 :                 return NULL;
     115             :         }
     116           4 :         state->out_mem_ctx = NULL;
     117             : 
     118             :         /* In parameters */
     119           4 :         state->orig.in.in_data = _in_data;
     120             : 
     121             :         /* Out parameters */
     122           4 :         state->orig.out.out_data = _out_data;
     123             : 
     124             :         /* Result */
     125           4 :         NDR_ZERO_STRUCT(state->orig.out.result);
     126             : 
     127           4 :         state->out_mem_ctx = talloc_named_const(state, 0,
     128             :                              "dcerpc_wbint_Ping_out_memory");
     129           4 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     130           0 :                 return tevent_req_post(req, ev);
     131             :         }
     132             : 
     133             :         /* make a temporary copy, that we pass to the dispatch function */
     134           4 :         state->tmp = state->orig;
     135             : 
     136           4 :         subreq = dcerpc_wbint_Ping_r_send(state, ev, h, &state->tmp);
     137           4 :         if (tevent_req_nomem(subreq, req)) {
     138           0 :                 return tevent_req_post(req, ev);
     139             :         }
     140           4 :         tevent_req_set_callback(subreq, dcerpc_wbint_Ping_done, req);
     141           4 :         return req;
     142             : }
     143             : 
     144           4 : static void dcerpc_wbint_Ping_done(struct tevent_req *subreq)
     145             : {
     146           4 :         struct tevent_req *req = tevent_req_callback_data(
     147             :                 subreq, struct tevent_req);
     148           4 :         struct dcerpc_wbint_Ping_state *state = tevent_req_data(
     149             :                 req, struct dcerpc_wbint_Ping_state);
     150           0 :         NTSTATUS status;
     151           0 :         TALLOC_CTX *mem_ctx;
     152             : 
     153           4 :         if (state->out_mem_ctx) {
     154           4 :                 mem_ctx = state->out_mem_ctx;
     155             :         } else {
     156           0 :                 mem_ctx = state;
     157             :         }
     158             : 
     159           4 :         status = dcerpc_wbint_Ping_r_recv(subreq, mem_ctx);
     160           4 :         TALLOC_FREE(subreq);
     161           4 :         if (tevent_req_nterror(req, status)) {
     162           0 :                 return;
     163             :         }
     164             : 
     165             :         /* Copy out parameters */
     166           4 :         *state->orig.out.out_data = *state->tmp.out.out_data;
     167             : 
     168             :         /* Copy result */
     169           4 :         state->orig.out.result = state->tmp.out.result;
     170             : 
     171             :         /* Reset temporary structure */
     172           4 :         NDR_ZERO_STRUCT(state->tmp);
     173             : 
     174           4 :         tevent_req_done(req);
     175             : }
     176             : 
     177           4 : NTSTATUS dcerpc_wbint_Ping_recv(struct tevent_req *req,
     178             :                                 TALLOC_CTX *mem_ctx,
     179             :                                 NTSTATUS *result)
     180             : {
     181           4 :         struct dcerpc_wbint_Ping_state *state = tevent_req_data(
     182             :                 req, struct dcerpc_wbint_Ping_state);
     183           0 :         NTSTATUS status;
     184             : 
     185           4 :         if (tevent_req_is_nterror(req, &status)) {
     186           0 :                 tevent_req_received(req);
     187           0 :                 return status;
     188             :         }
     189             : 
     190             :         /* Steal possible out parameters to the callers context */
     191           4 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     192             : 
     193             :         /* Return result */
     194           4 :         *result = state->orig.out.result;
     195             : 
     196           4 :         tevent_req_received(req);
     197           4 :         return NT_STATUS_OK;
     198             : }
     199             : 
     200           0 : NTSTATUS dcerpc_wbint_Ping(struct dcerpc_binding_handle *h,
     201             :                            TALLOC_CTX *mem_ctx,
     202             :                            uint32_t _in_data /* [in]  */,
     203             :                            uint32_t *_out_data /* [out] [ref] */,
     204             :                            NTSTATUS *result)
     205             : {
     206           0 :         struct wbint_Ping r;
     207           0 :         NTSTATUS status;
     208             : 
     209             :         /* In parameters */
     210           0 :         r.in.in_data = _in_data;
     211             : 
     212             :         /* Out parameters */
     213           0 :         r.out.out_data = _out_data;
     214             : 
     215             :         /* Result */
     216           0 :         NDR_ZERO_STRUCT(r.out.result);
     217             : 
     218           0 :         status = dcerpc_wbint_Ping_r(h, mem_ctx, &r);
     219           0 :         if (!NT_STATUS_IS_OK(status)) {
     220           0 :                 return status;
     221             :         }
     222             : 
     223             :         /* Return variables */
     224           0 :         *_out_data = *r.out.out_data;
     225             : 
     226             :         /* Return result */
     227           0 :         *result = r.out.result;
     228             : 
     229           0 :         return NT_STATUS_OK;
     230             : }
     231             : 
     232             : struct dcerpc_wbint_LookupSid_r_state {
     233             :         TALLOC_CTX *out_mem_ctx;
     234             : };
     235             : 
     236             : static void dcerpc_wbint_LookupSid_r_done(struct tevent_req *subreq);
     237             : 
     238       17674 : struct tevent_req *dcerpc_wbint_LookupSid_r_send(TALLOC_CTX *mem_ctx,
     239             :         struct tevent_context *ev,
     240             :         struct dcerpc_binding_handle *h,
     241             :         struct wbint_LookupSid *r)
     242             : {
     243           0 :         struct tevent_req *req;
     244           0 :         struct dcerpc_wbint_LookupSid_r_state *state;
     245           0 :         struct tevent_req *subreq;
     246             : 
     247       17674 :         req = tevent_req_create(mem_ctx, &state,
     248             :                                 struct dcerpc_wbint_LookupSid_r_state);
     249       17674 :         if (req == NULL) {
     250           0 :                 return NULL;
     251             :         }
     252             : 
     253       17674 :         state->out_mem_ctx = talloc_new(state);
     254       17674 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     255           0 :                 return tevent_req_post(req, ev);
     256             :         }
     257             : 
     258       17674 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     259             :                         NULL, &ndr_table_winbind,
     260       17674 :                         NDR_WBINT_LOOKUPSID, state->out_mem_ctx, r);
     261       17674 :         if (tevent_req_nomem(subreq, req)) {
     262           0 :                 return tevent_req_post(req, ev);
     263             :         }
     264       17674 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupSid_r_done, req);
     265             : 
     266       17674 :         return req;
     267             : }
     268             : 
     269       17674 : static void dcerpc_wbint_LookupSid_r_done(struct tevent_req *subreq)
     270             : {
     271           0 :         struct tevent_req *req =
     272       17674 :                 tevent_req_callback_data(subreq,
     273             :                 struct tevent_req);
     274           0 :         NTSTATUS status;
     275             : 
     276       17674 :         status = dcerpc_binding_handle_call_recv(subreq);
     277       17674 :         TALLOC_FREE(subreq);
     278       17674 :         if (tevent_req_nterror(req, status)) {
     279           0 :                 return;
     280             :         }
     281             : 
     282       17674 :         tevent_req_done(req);
     283             : }
     284             : 
     285       17674 : NTSTATUS dcerpc_wbint_LookupSid_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     286             : {
     287           0 :         struct dcerpc_wbint_LookupSid_r_state *state =
     288       17674 :                 tevent_req_data(req,
     289             :                 struct dcerpc_wbint_LookupSid_r_state);
     290           0 :         NTSTATUS status;
     291             : 
     292       17674 :         if (tevent_req_is_nterror(req, &status)) {
     293           0 :                 tevent_req_received(req);
     294           0 :                 return status;
     295             :         }
     296             : 
     297       17674 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     298             : 
     299       17674 :         tevent_req_received(req);
     300       17674 :         return NT_STATUS_OK;
     301             : }
     302             : 
     303           0 : NTSTATUS dcerpc_wbint_LookupSid_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupSid *r)
     304             : {
     305           0 :         NTSTATUS status;
     306             : 
     307           0 :         status = dcerpc_binding_handle_call(h,
     308             :                         NULL, &ndr_table_winbind,
     309             :                         NDR_WBINT_LOOKUPSID, mem_ctx, r);
     310             : 
     311           0 :         return status;
     312             : }
     313             : 
     314             : struct dcerpc_wbint_LookupSid_state {
     315             :         struct wbint_LookupSid orig;
     316             :         struct wbint_LookupSid tmp;
     317             :         TALLOC_CTX *out_mem_ctx;
     318             : };
     319             : 
     320             : static void dcerpc_wbint_LookupSid_done(struct tevent_req *subreq);
     321             : 
     322       17674 : struct tevent_req *dcerpc_wbint_LookupSid_send(TALLOC_CTX *mem_ctx,
     323             :                                                struct tevent_context *ev,
     324             :                                                struct dcerpc_binding_handle *h,
     325             :                                                struct dom_sid *_sid /* [in] [ref] */,
     326             :                                                enum lsa_SidType *_type /* [out] [ref] */,
     327             :                                                const char **_domain /* [out] [charset(UTF8),ref] */,
     328             :                                                const char **_name /* [out] [charset(UTF8),ref] */)
     329             : {
     330           0 :         struct tevent_req *req;
     331           0 :         struct dcerpc_wbint_LookupSid_state *state;
     332           0 :         struct tevent_req *subreq;
     333             : 
     334       17674 :         req = tevent_req_create(mem_ctx, &state,
     335             :                                 struct dcerpc_wbint_LookupSid_state);
     336       17674 :         if (req == NULL) {
     337           0 :                 return NULL;
     338             :         }
     339       17674 :         state->out_mem_ctx = NULL;
     340             : 
     341             :         /* In parameters */
     342       17674 :         state->orig.in.sid = _sid;
     343             : 
     344             :         /* Out parameters */
     345       17674 :         state->orig.out.type = _type;
     346       17674 :         state->orig.out.domain = _domain;
     347       17674 :         state->orig.out.name = _name;
     348             : 
     349             :         /* Result */
     350       17674 :         NDR_ZERO_STRUCT(state->orig.out.result);
     351             : 
     352       17674 :         state->out_mem_ctx = talloc_named_const(state, 0,
     353             :                              "dcerpc_wbint_LookupSid_out_memory");
     354       17674 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     355           0 :                 return tevent_req_post(req, ev);
     356             :         }
     357             : 
     358             :         /* make a temporary copy, that we pass to the dispatch function */
     359       17674 :         state->tmp = state->orig;
     360             : 
     361       17674 :         subreq = dcerpc_wbint_LookupSid_r_send(state, ev, h, &state->tmp);
     362       17674 :         if (tevent_req_nomem(subreq, req)) {
     363           0 :                 return tevent_req_post(req, ev);
     364             :         }
     365       17674 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupSid_done, req);
     366       17674 :         return req;
     367             : }
     368             : 
     369       17674 : static void dcerpc_wbint_LookupSid_done(struct tevent_req *subreq)
     370             : {
     371       17674 :         struct tevent_req *req = tevent_req_callback_data(
     372             :                 subreq, struct tevent_req);
     373       17674 :         struct dcerpc_wbint_LookupSid_state *state = tevent_req_data(
     374             :                 req, struct dcerpc_wbint_LookupSid_state);
     375           0 :         NTSTATUS status;
     376           0 :         TALLOC_CTX *mem_ctx;
     377             : 
     378       17674 :         if (state->out_mem_ctx) {
     379       17674 :                 mem_ctx = state->out_mem_ctx;
     380             :         } else {
     381           0 :                 mem_ctx = state;
     382             :         }
     383             : 
     384       17674 :         status = dcerpc_wbint_LookupSid_r_recv(subreq, mem_ctx);
     385       17674 :         TALLOC_FREE(subreq);
     386       17674 :         if (tevent_req_nterror(req, status)) {
     387           0 :                 return;
     388             :         }
     389             : 
     390             :         /* Copy out parameters */
     391       17674 :         *state->orig.out.type = *state->tmp.out.type;
     392       17674 :         *state->orig.out.domain = *state->tmp.out.domain;
     393       17674 :         *state->orig.out.name = *state->tmp.out.name;
     394             : 
     395             :         /* Copy result */
     396       17674 :         state->orig.out.result = state->tmp.out.result;
     397             : 
     398             :         /* Reset temporary structure */
     399       17674 :         NDR_ZERO_STRUCT(state->tmp);
     400             : 
     401       17674 :         tevent_req_done(req);
     402             : }
     403             : 
     404       17674 : NTSTATUS dcerpc_wbint_LookupSid_recv(struct tevent_req *req,
     405             :                                      TALLOC_CTX *mem_ctx,
     406             :                                      NTSTATUS *result)
     407             : {
     408       17674 :         struct dcerpc_wbint_LookupSid_state *state = tevent_req_data(
     409             :                 req, struct dcerpc_wbint_LookupSid_state);
     410           0 :         NTSTATUS status;
     411             : 
     412       17674 :         if (tevent_req_is_nterror(req, &status)) {
     413           0 :                 tevent_req_received(req);
     414           0 :                 return status;
     415             :         }
     416             : 
     417             :         /* Steal possible out parameters to the callers context */
     418       17674 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     419             : 
     420             :         /* Return result */
     421       17674 :         *result = state->orig.out.result;
     422             : 
     423       17674 :         tevent_req_received(req);
     424       17674 :         return NT_STATUS_OK;
     425             : }
     426             : 
     427           0 : NTSTATUS dcerpc_wbint_LookupSid(struct dcerpc_binding_handle *h,
     428             :                                 TALLOC_CTX *mem_ctx,
     429             :                                 struct dom_sid *_sid /* [in] [ref] */,
     430             :                                 enum lsa_SidType *_type /* [out] [ref] */,
     431             :                                 const char **_domain /* [out] [charset(UTF8),ref] */,
     432             :                                 const char **_name /* [out] [charset(UTF8),ref] */,
     433             :                                 NTSTATUS *result)
     434             : {
     435           0 :         struct wbint_LookupSid r;
     436           0 :         NTSTATUS status;
     437             : 
     438             :         /* In parameters */
     439           0 :         r.in.sid = _sid;
     440             : 
     441             :         /* Out parameters */
     442           0 :         r.out.type = _type;
     443           0 :         r.out.domain = _domain;
     444           0 :         r.out.name = _name;
     445             : 
     446             :         /* Result */
     447           0 :         NDR_ZERO_STRUCT(r.out.result);
     448             : 
     449           0 :         status = dcerpc_wbint_LookupSid_r(h, mem_ctx, &r);
     450           0 :         if (!NT_STATUS_IS_OK(status)) {
     451           0 :                 return status;
     452             :         }
     453             : 
     454             :         /* Return variables */
     455           0 :         *_type = *r.out.type;
     456           0 :         *_domain = *r.out.domain;
     457           0 :         *_name = *r.out.name;
     458             : 
     459             :         /* Return result */
     460           0 :         *result = r.out.result;
     461             : 
     462           0 :         return NT_STATUS_OK;
     463             : }
     464             : 
     465             : struct dcerpc_wbint_LookupSids_r_state {
     466             :         TALLOC_CTX *out_mem_ctx;
     467             : };
     468             : 
     469             : static void dcerpc_wbint_LookupSids_r_done(struct tevent_req *subreq);
     470             : 
     471        1160 : struct tevent_req *dcerpc_wbint_LookupSids_r_send(TALLOC_CTX *mem_ctx,
     472             :         struct tevent_context *ev,
     473             :         struct dcerpc_binding_handle *h,
     474             :         struct wbint_LookupSids *r)
     475             : {
     476           0 :         struct tevent_req *req;
     477           0 :         struct dcerpc_wbint_LookupSids_r_state *state;
     478           0 :         struct tevent_req *subreq;
     479             : 
     480        1160 :         req = tevent_req_create(mem_ctx, &state,
     481             :                                 struct dcerpc_wbint_LookupSids_r_state);
     482        1160 :         if (req == NULL) {
     483           0 :                 return NULL;
     484             :         }
     485             : 
     486        1160 :         state->out_mem_ctx = talloc_new(state);
     487        1160 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     488           0 :                 return tevent_req_post(req, ev);
     489             :         }
     490             : 
     491        1160 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     492             :                         NULL, &ndr_table_winbind,
     493        1160 :                         NDR_WBINT_LOOKUPSIDS, state->out_mem_ctx, r);
     494        1160 :         if (tevent_req_nomem(subreq, req)) {
     495           0 :                 return tevent_req_post(req, ev);
     496             :         }
     497        1160 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupSids_r_done, req);
     498             : 
     499        1160 :         return req;
     500             : }
     501             : 
     502        1160 : static void dcerpc_wbint_LookupSids_r_done(struct tevent_req *subreq)
     503             : {
     504           0 :         struct tevent_req *req =
     505        1160 :                 tevent_req_callback_data(subreq,
     506             :                 struct tevent_req);
     507           0 :         NTSTATUS status;
     508             : 
     509        1160 :         status = dcerpc_binding_handle_call_recv(subreq);
     510        1160 :         TALLOC_FREE(subreq);
     511        1160 :         if (tevent_req_nterror(req, status)) {
     512           0 :                 return;
     513             :         }
     514             : 
     515        1160 :         tevent_req_done(req);
     516             : }
     517             : 
     518        1160 : NTSTATUS dcerpc_wbint_LookupSids_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     519             : {
     520           0 :         struct dcerpc_wbint_LookupSids_r_state *state =
     521        1160 :                 tevent_req_data(req,
     522             :                 struct dcerpc_wbint_LookupSids_r_state);
     523           0 :         NTSTATUS status;
     524             : 
     525        1160 :         if (tevent_req_is_nterror(req, &status)) {
     526           0 :                 tevent_req_received(req);
     527           0 :                 return status;
     528             :         }
     529             : 
     530        1160 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     531             : 
     532        1160 :         tevent_req_received(req);
     533        1160 :         return NT_STATUS_OK;
     534             : }
     535             : 
     536           0 : NTSTATUS dcerpc_wbint_LookupSids_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupSids *r)
     537             : {
     538           0 :         NTSTATUS status;
     539             : 
     540           0 :         status = dcerpc_binding_handle_call(h,
     541             :                         NULL, &ndr_table_winbind,
     542             :                         NDR_WBINT_LOOKUPSIDS, mem_ctx, r);
     543             : 
     544           0 :         return status;
     545             : }
     546             : 
     547             : struct dcerpc_wbint_LookupSids_state {
     548             :         struct wbint_LookupSids orig;
     549             :         struct wbint_LookupSids tmp;
     550             :         TALLOC_CTX *out_mem_ctx;
     551             : };
     552             : 
     553             : static void dcerpc_wbint_LookupSids_done(struct tevent_req *subreq);
     554             : 
     555        1160 : struct tevent_req *dcerpc_wbint_LookupSids_send(TALLOC_CTX *mem_ctx,
     556             :                                                 struct tevent_context *ev,
     557             :                                                 struct dcerpc_binding_handle *h,
     558             :                                                 struct lsa_SidArray *_sids /* [in] [ref] */,
     559             :                                                 struct lsa_RefDomainList *_domains /* [out] [ref] */,
     560             :                                                 struct lsa_TransNameArray *_names /* [out] [ref] */)
     561             : {
     562           0 :         struct tevent_req *req;
     563           0 :         struct dcerpc_wbint_LookupSids_state *state;
     564           0 :         struct tevent_req *subreq;
     565             : 
     566        1160 :         req = tevent_req_create(mem_ctx, &state,
     567             :                                 struct dcerpc_wbint_LookupSids_state);
     568        1160 :         if (req == NULL) {
     569           0 :                 return NULL;
     570             :         }
     571        1160 :         state->out_mem_ctx = NULL;
     572             : 
     573             :         /* In parameters */
     574        1160 :         state->orig.in.sids = _sids;
     575             : 
     576             :         /* Out parameters */
     577        1160 :         state->orig.out.domains = _domains;
     578        1160 :         state->orig.out.names = _names;
     579             : 
     580             :         /* Result */
     581        1160 :         NDR_ZERO_STRUCT(state->orig.out.result);
     582             : 
     583        1160 :         state->out_mem_ctx = talloc_named_const(state, 0,
     584             :                              "dcerpc_wbint_LookupSids_out_memory");
     585        1160 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     586           0 :                 return tevent_req_post(req, ev);
     587             :         }
     588             : 
     589             :         /* make a temporary copy, that we pass to the dispatch function */
     590        1160 :         state->tmp = state->orig;
     591             : 
     592        1160 :         subreq = dcerpc_wbint_LookupSids_r_send(state, ev, h, &state->tmp);
     593        1160 :         if (tevent_req_nomem(subreq, req)) {
     594           0 :                 return tevent_req_post(req, ev);
     595             :         }
     596        1160 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupSids_done, req);
     597        1160 :         return req;
     598             : }
     599             : 
     600        1160 : static void dcerpc_wbint_LookupSids_done(struct tevent_req *subreq)
     601             : {
     602        1160 :         struct tevent_req *req = tevent_req_callback_data(
     603             :                 subreq, struct tevent_req);
     604        1160 :         struct dcerpc_wbint_LookupSids_state *state = tevent_req_data(
     605             :                 req, struct dcerpc_wbint_LookupSids_state);
     606           0 :         NTSTATUS status;
     607           0 :         TALLOC_CTX *mem_ctx;
     608             : 
     609        1160 :         if (state->out_mem_ctx) {
     610        1160 :                 mem_ctx = state->out_mem_ctx;
     611             :         } else {
     612           0 :                 mem_ctx = state;
     613             :         }
     614             : 
     615        1160 :         status = dcerpc_wbint_LookupSids_r_recv(subreq, mem_ctx);
     616        1160 :         TALLOC_FREE(subreq);
     617        1160 :         if (tevent_req_nterror(req, status)) {
     618           0 :                 return;
     619             :         }
     620             : 
     621             :         /* Copy out parameters */
     622        1160 :         *state->orig.out.domains = *state->tmp.out.domains;
     623        1160 :         *state->orig.out.names = *state->tmp.out.names;
     624             : 
     625             :         /* Copy result */
     626        1160 :         state->orig.out.result = state->tmp.out.result;
     627             : 
     628             :         /* Reset temporary structure */
     629        1160 :         NDR_ZERO_STRUCT(state->tmp);
     630             : 
     631        1160 :         tevent_req_done(req);
     632             : }
     633             : 
     634        1160 : NTSTATUS dcerpc_wbint_LookupSids_recv(struct tevent_req *req,
     635             :                                       TALLOC_CTX *mem_ctx,
     636             :                                       NTSTATUS *result)
     637             : {
     638        1160 :         struct dcerpc_wbint_LookupSids_state *state = tevent_req_data(
     639             :                 req, struct dcerpc_wbint_LookupSids_state);
     640           0 :         NTSTATUS status;
     641             : 
     642        1160 :         if (tevent_req_is_nterror(req, &status)) {
     643           0 :                 tevent_req_received(req);
     644           0 :                 return status;
     645             :         }
     646             : 
     647             :         /* Steal possible out parameters to the callers context */
     648        1160 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     649             : 
     650             :         /* Return result */
     651        1160 :         *result = state->orig.out.result;
     652             : 
     653        1160 :         tevent_req_received(req);
     654        1160 :         return NT_STATUS_OK;
     655             : }
     656             : 
     657           0 : NTSTATUS dcerpc_wbint_LookupSids(struct dcerpc_binding_handle *h,
     658             :                                  TALLOC_CTX *mem_ctx,
     659             :                                  struct lsa_SidArray *_sids /* [in] [ref] */,
     660             :                                  struct lsa_RefDomainList *_domains /* [out] [ref] */,
     661             :                                  struct lsa_TransNameArray *_names /* [out] [ref] */,
     662             :                                  NTSTATUS *result)
     663             : {
     664           0 :         struct wbint_LookupSids r;
     665           0 :         NTSTATUS status;
     666             : 
     667             :         /* In parameters */
     668           0 :         r.in.sids = _sids;
     669             : 
     670             :         /* Out parameters */
     671           0 :         r.out.domains = _domains;
     672           0 :         r.out.names = _names;
     673             : 
     674             :         /* Result */
     675           0 :         NDR_ZERO_STRUCT(r.out.result);
     676             : 
     677           0 :         status = dcerpc_wbint_LookupSids_r(h, mem_ctx, &r);
     678           0 :         if (!NT_STATUS_IS_OK(status)) {
     679           0 :                 return status;
     680             :         }
     681             : 
     682             :         /* Return variables */
     683           0 :         *_domains = *r.out.domains;
     684           0 :         *_names = *r.out.names;
     685             : 
     686             :         /* Return result */
     687           0 :         *result = r.out.result;
     688             : 
     689           0 :         return NT_STATUS_OK;
     690             : }
     691             : 
     692             : struct dcerpc_wbint_LookupName_r_state {
     693             :         TALLOC_CTX *out_mem_ctx;
     694             : };
     695             : 
     696             : static void dcerpc_wbint_LookupName_r_done(struct tevent_req *subreq);
     697             : 
     698      100788 : struct tevent_req *dcerpc_wbint_LookupName_r_send(TALLOC_CTX *mem_ctx,
     699             :         struct tevent_context *ev,
     700             :         struct dcerpc_binding_handle *h,
     701             :         struct wbint_LookupName *r)
     702             : {
     703           0 :         struct tevent_req *req;
     704           0 :         struct dcerpc_wbint_LookupName_r_state *state;
     705           0 :         struct tevent_req *subreq;
     706             : 
     707      100788 :         req = tevent_req_create(mem_ctx, &state,
     708             :                                 struct dcerpc_wbint_LookupName_r_state);
     709      100788 :         if (req == NULL) {
     710           0 :                 return NULL;
     711             :         }
     712             : 
     713      100788 :         state->out_mem_ctx = talloc_new(state);
     714      100788 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     715           0 :                 return tevent_req_post(req, ev);
     716             :         }
     717             : 
     718      100788 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     719             :                         NULL, &ndr_table_winbind,
     720      100788 :                         NDR_WBINT_LOOKUPNAME, state->out_mem_ctx, r);
     721      100788 :         if (tevent_req_nomem(subreq, req)) {
     722           0 :                 return tevent_req_post(req, ev);
     723             :         }
     724      100788 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupName_r_done, req);
     725             : 
     726      100788 :         return req;
     727             : }
     728             : 
     729      100788 : static void dcerpc_wbint_LookupName_r_done(struct tevent_req *subreq)
     730             : {
     731           0 :         struct tevent_req *req =
     732      100788 :                 tevent_req_callback_data(subreq,
     733             :                 struct tevent_req);
     734           0 :         NTSTATUS status;
     735             : 
     736      100788 :         status = dcerpc_binding_handle_call_recv(subreq);
     737      100788 :         TALLOC_FREE(subreq);
     738      100788 :         if (tevent_req_nterror(req, status)) {
     739           0 :                 return;
     740             :         }
     741             : 
     742      100788 :         tevent_req_done(req);
     743             : }
     744             : 
     745      100788 : NTSTATUS dcerpc_wbint_LookupName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     746             : {
     747           0 :         struct dcerpc_wbint_LookupName_r_state *state =
     748      100788 :                 tevent_req_data(req,
     749             :                 struct dcerpc_wbint_LookupName_r_state);
     750           0 :         NTSTATUS status;
     751             : 
     752      100788 :         if (tevent_req_is_nterror(req, &status)) {
     753           0 :                 tevent_req_received(req);
     754           0 :                 return status;
     755             :         }
     756             : 
     757      100788 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     758             : 
     759      100788 :         tevent_req_received(req);
     760      100788 :         return NT_STATUS_OK;
     761             : }
     762             : 
     763           0 : NTSTATUS dcerpc_wbint_LookupName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupName *r)
     764             : {
     765           0 :         NTSTATUS status;
     766             : 
     767           0 :         status = dcerpc_binding_handle_call(h,
     768             :                         NULL, &ndr_table_winbind,
     769             :                         NDR_WBINT_LOOKUPNAME, mem_ctx, r);
     770             : 
     771           0 :         return status;
     772             : }
     773             : 
     774             : struct dcerpc_wbint_LookupName_state {
     775             :         struct wbint_LookupName orig;
     776             :         struct wbint_LookupName tmp;
     777             :         TALLOC_CTX *out_mem_ctx;
     778             : };
     779             : 
     780             : static void dcerpc_wbint_LookupName_done(struct tevent_req *subreq);
     781             : 
     782      100788 : struct tevent_req *dcerpc_wbint_LookupName_send(TALLOC_CTX *mem_ctx,
     783             :                                                 struct tevent_context *ev,
     784             :                                                 struct dcerpc_binding_handle *h,
     785             :                                                 const char *_domain /* [in] [charset(UTF8),ref] */,
     786             :                                                 const char *_name /* [in] [charset(UTF8),ref] */,
     787             :                                                 uint32_t _flags /* [in]  */,
     788             :                                                 enum lsa_SidType *_type /* [out] [ref] */,
     789             :                                                 struct dom_sid *_sid /* [out] [ref] */)
     790             : {
     791           0 :         struct tevent_req *req;
     792           0 :         struct dcerpc_wbint_LookupName_state *state;
     793           0 :         struct tevent_req *subreq;
     794             : 
     795      100788 :         req = tevent_req_create(mem_ctx, &state,
     796             :                                 struct dcerpc_wbint_LookupName_state);
     797      100788 :         if (req == NULL) {
     798           0 :                 return NULL;
     799             :         }
     800      100788 :         state->out_mem_ctx = NULL;
     801             : 
     802             :         /* In parameters */
     803      100788 :         state->orig.in.domain = _domain;
     804      100788 :         state->orig.in.name = _name;
     805      100788 :         state->orig.in.flags = _flags;
     806             : 
     807             :         /* Out parameters */
     808      100788 :         state->orig.out.type = _type;
     809      100788 :         state->orig.out.sid = _sid;
     810             : 
     811             :         /* Result */
     812      100788 :         NDR_ZERO_STRUCT(state->orig.out.result);
     813             : 
     814      100788 :         state->out_mem_ctx = talloc_named_const(state, 0,
     815             :                              "dcerpc_wbint_LookupName_out_memory");
     816      100788 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     817           0 :                 return tevent_req_post(req, ev);
     818             :         }
     819             : 
     820             :         /* make a temporary copy, that we pass to the dispatch function */
     821      100788 :         state->tmp = state->orig;
     822             : 
     823      100788 :         subreq = dcerpc_wbint_LookupName_r_send(state, ev, h, &state->tmp);
     824      100788 :         if (tevent_req_nomem(subreq, req)) {
     825           0 :                 return tevent_req_post(req, ev);
     826             :         }
     827      100788 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupName_done, req);
     828      100788 :         return req;
     829             : }
     830             : 
     831      100788 : static void dcerpc_wbint_LookupName_done(struct tevent_req *subreq)
     832             : {
     833      100788 :         struct tevent_req *req = tevent_req_callback_data(
     834             :                 subreq, struct tevent_req);
     835      100788 :         struct dcerpc_wbint_LookupName_state *state = tevent_req_data(
     836             :                 req, struct dcerpc_wbint_LookupName_state);
     837           0 :         NTSTATUS status;
     838           0 :         TALLOC_CTX *mem_ctx;
     839             : 
     840      100788 :         if (state->out_mem_ctx) {
     841      100788 :                 mem_ctx = state->out_mem_ctx;
     842             :         } else {
     843           0 :                 mem_ctx = state;
     844             :         }
     845             : 
     846      100788 :         status = dcerpc_wbint_LookupName_r_recv(subreq, mem_ctx);
     847      100788 :         TALLOC_FREE(subreq);
     848      100788 :         if (tevent_req_nterror(req, status)) {
     849           0 :                 return;
     850             :         }
     851             : 
     852             :         /* Copy out parameters */
     853      100788 :         *state->orig.out.type = *state->tmp.out.type;
     854      100788 :         *state->orig.out.sid = *state->tmp.out.sid;
     855             : 
     856             :         /* Copy result */
     857      100788 :         state->orig.out.result = state->tmp.out.result;
     858             : 
     859             :         /* Reset temporary structure */
     860      100788 :         NDR_ZERO_STRUCT(state->tmp);
     861             : 
     862      100788 :         tevent_req_done(req);
     863             : }
     864             : 
     865      100788 : NTSTATUS dcerpc_wbint_LookupName_recv(struct tevent_req *req,
     866             :                                       TALLOC_CTX *mem_ctx,
     867             :                                       NTSTATUS *result)
     868             : {
     869      100788 :         struct dcerpc_wbint_LookupName_state *state = tevent_req_data(
     870             :                 req, struct dcerpc_wbint_LookupName_state);
     871           0 :         NTSTATUS status;
     872             : 
     873      100788 :         if (tevent_req_is_nterror(req, &status)) {
     874           0 :                 tevent_req_received(req);
     875           0 :                 return status;
     876             :         }
     877             : 
     878             :         /* Steal possible out parameters to the callers context */
     879      100788 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     880             : 
     881             :         /* Return result */
     882      100788 :         *result = state->orig.out.result;
     883             : 
     884      100788 :         tevent_req_received(req);
     885      100788 :         return NT_STATUS_OK;
     886             : }
     887             : 
     888           0 : NTSTATUS dcerpc_wbint_LookupName(struct dcerpc_binding_handle *h,
     889             :                                  TALLOC_CTX *mem_ctx,
     890             :                                  const char *_domain /* [in] [charset(UTF8),ref] */,
     891             :                                  const char *_name /* [in] [charset(UTF8),ref] */,
     892             :                                  uint32_t _flags /* [in]  */,
     893             :                                  enum lsa_SidType *_type /* [out] [ref] */,
     894             :                                  struct dom_sid *_sid /* [out] [ref] */,
     895             :                                  NTSTATUS *result)
     896             : {
     897           0 :         struct wbint_LookupName r;
     898           0 :         NTSTATUS status;
     899             : 
     900             :         /* In parameters */
     901           0 :         r.in.domain = _domain;
     902           0 :         r.in.name = _name;
     903           0 :         r.in.flags = _flags;
     904             : 
     905             :         /* Out parameters */
     906           0 :         r.out.type = _type;
     907           0 :         r.out.sid = _sid;
     908             : 
     909             :         /* Result */
     910           0 :         NDR_ZERO_STRUCT(r.out.result);
     911             : 
     912           0 :         status = dcerpc_wbint_LookupName_r(h, mem_ctx, &r);
     913           0 :         if (!NT_STATUS_IS_OK(status)) {
     914           0 :                 return status;
     915             :         }
     916             : 
     917             :         /* Return variables */
     918           0 :         *_type = *r.out.type;
     919           0 :         *_sid = *r.out.sid;
     920             : 
     921             :         /* Return result */
     922           0 :         *result = r.out.result;
     923             : 
     924           0 :         return NT_STATUS_OK;
     925             : }
     926             : 
     927             : struct dcerpc_wbint_Sids2UnixIDs_r_state {
     928             :         TALLOC_CTX *out_mem_ctx;
     929             : };
     930             : 
     931             : static void dcerpc_wbint_Sids2UnixIDs_r_done(struct tevent_req *subreq);
     932             : 
     933        4167 : struct tevent_req *dcerpc_wbint_Sids2UnixIDs_r_send(TALLOC_CTX *mem_ctx,
     934             :         struct tevent_context *ev,
     935             :         struct dcerpc_binding_handle *h,
     936             :         struct wbint_Sids2UnixIDs *r)
     937             : {
     938           0 :         struct tevent_req *req;
     939           0 :         struct dcerpc_wbint_Sids2UnixIDs_r_state *state;
     940           0 :         struct tevent_req *subreq;
     941             : 
     942        4167 :         req = tevent_req_create(mem_ctx, &state,
     943             :                                 struct dcerpc_wbint_Sids2UnixIDs_r_state);
     944        4167 :         if (req == NULL) {
     945           0 :                 return NULL;
     946             :         }
     947             : 
     948        4167 :         state->out_mem_ctx = talloc_new(state);
     949        4167 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     950           0 :                 return tevent_req_post(req, ev);
     951             :         }
     952             : 
     953        4167 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     954             :                         NULL, &ndr_table_winbind,
     955        4167 :                         NDR_WBINT_SIDS2UNIXIDS, state->out_mem_ctx, r);
     956        4167 :         if (tevent_req_nomem(subreq, req)) {
     957           0 :                 return tevent_req_post(req, ev);
     958             :         }
     959        4167 :         tevent_req_set_callback(subreq, dcerpc_wbint_Sids2UnixIDs_r_done, req);
     960             : 
     961        4167 :         return req;
     962             : }
     963             : 
     964        4167 : static void dcerpc_wbint_Sids2UnixIDs_r_done(struct tevent_req *subreq)
     965             : {
     966           0 :         struct tevent_req *req =
     967        4167 :                 tevent_req_callback_data(subreq,
     968             :                 struct tevent_req);
     969           0 :         NTSTATUS status;
     970             : 
     971        4167 :         status = dcerpc_binding_handle_call_recv(subreq);
     972        4167 :         TALLOC_FREE(subreq);
     973        4167 :         if (tevent_req_nterror(req, status)) {
     974           0 :                 return;
     975             :         }
     976             : 
     977        4167 :         tevent_req_done(req);
     978             : }
     979             : 
     980        4167 : NTSTATUS dcerpc_wbint_Sids2UnixIDs_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     981             : {
     982           0 :         struct dcerpc_wbint_Sids2UnixIDs_r_state *state =
     983        4167 :                 tevent_req_data(req,
     984             :                 struct dcerpc_wbint_Sids2UnixIDs_r_state);
     985           0 :         NTSTATUS status;
     986             : 
     987        4167 :         if (tevent_req_is_nterror(req, &status)) {
     988           0 :                 tevent_req_received(req);
     989           0 :                 return status;
     990             :         }
     991             : 
     992        4167 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     993             : 
     994        4167 :         tevent_req_received(req);
     995        4167 :         return NT_STATUS_OK;
     996             : }
     997             : 
     998           0 : NTSTATUS dcerpc_wbint_Sids2UnixIDs_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_Sids2UnixIDs *r)
     999             : {
    1000           0 :         NTSTATUS status;
    1001             : 
    1002           0 :         status = dcerpc_binding_handle_call(h,
    1003             :                         NULL, &ndr_table_winbind,
    1004             :                         NDR_WBINT_SIDS2UNIXIDS, mem_ctx, r);
    1005             : 
    1006           0 :         return status;
    1007             : }
    1008             : 
    1009             : struct dcerpc_wbint_Sids2UnixIDs_state {
    1010             :         struct wbint_Sids2UnixIDs orig;
    1011             :         struct wbint_Sids2UnixIDs tmp;
    1012             :         TALLOC_CTX *out_mem_ctx;
    1013             : };
    1014             : 
    1015             : static void dcerpc_wbint_Sids2UnixIDs_done(struct tevent_req *subreq);
    1016             : 
    1017        4167 : struct tevent_req *dcerpc_wbint_Sids2UnixIDs_send(TALLOC_CTX *mem_ctx,
    1018             :                                                   struct tevent_context *ev,
    1019             :                                                   struct dcerpc_binding_handle *h,
    1020             :                                                   struct lsa_RefDomainList *_domains /* [in] [ref] */,
    1021             :                                                   struct wbint_TransIDArray *_ids /* [in,out] [ref] */)
    1022             : {
    1023           0 :         struct tevent_req *req;
    1024           0 :         struct dcerpc_wbint_Sids2UnixIDs_state *state;
    1025           0 :         struct tevent_req *subreq;
    1026             : 
    1027        4167 :         req = tevent_req_create(mem_ctx, &state,
    1028             :                                 struct dcerpc_wbint_Sids2UnixIDs_state);
    1029        4167 :         if (req == NULL) {
    1030           0 :                 return NULL;
    1031             :         }
    1032        4167 :         state->out_mem_ctx = NULL;
    1033             : 
    1034             :         /* In parameters */
    1035        4167 :         state->orig.in.domains = _domains;
    1036        4167 :         state->orig.in.ids = _ids;
    1037             : 
    1038             :         /* Out parameters */
    1039        4167 :         state->orig.out.ids = _ids;
    1040             : 
    1041             :         /* Result */
    1042        4167 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1043             : 
    1044        4167 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1045             :                              "dcerpc_wbint_Sids2UnixIDs_out_memory");
    1046        4167 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1047           0 :                 return tevent_req_post(req, ev);
    1048             :         }
    1049             : 
    1050             :         /* make a temporary copy, that we pass to the dispatch function */
    1051        4167 :         state->tmp = state->orig;
    1052             : 
    1053        4167 :         subreq = dcerpc_wbint_Sids2UnixIDs_r_send(state, ev, h, &state->tmp);
    1054        4167 :         if (tevent_req_nomem(subreq, req)) {
    1055           0 :                 return tevent_req_post(req, ev);
    1056             :         }
    1057        4167 :         tevent_req_set_callback(subreq, dcerpc_wbint_Sids2UnixIDs_done, req);
    1058        4167 :         return req;
    1059             : }
    1060             : 
    1061        4167 : static void dcerpc_wbint_Sids2UnixIDs_done(struct tevent_req *subreq)
    1062             : {
    1063        4167 :         struct tevent_req *req = tevent_req_callback_data(
    1064             :                 subreq, struct tevent_req);
    1065        4167 :         struct dcerpc_wbint_Sids2UnixIDs_state *state = tevent_req_data(
    1066             :                 req, struct dcerpc_wbint_Sids2UnixIDs_state);
    1067           0 :         NTSTATUS status;
    1068           0 :         TALLOC_CTX *mem_ctx;
    1069             : 
    1070        4167 :         if (state->out_mem_ctx) {
    1071        4167 :                 mem_ctx = state->out_mem_ctx;
    1072             :         } else {
    1073           0 :                 mem_ctx = state;
    1074             :         }
    1075             : 
    1076        4167 :         status = dcerpc_wbint_Sids2UnixIDs_r_recv(subreq, mem_ctx);
    1077        4167 :         TALLOC_FREE(subreq);
    1078        4167 :         if (tevent_req_nterror(req, status)) {
    1079           0 :                 return;
    1080             :         }
    1081             : 
    1082             :         /* Copy out parameters */
    1083        4167 :         *state->orig.out.ids = *state->tmp.out.ids;
    1084             : 
    1085             :         /* Copy result */
    1086        4167 :         state->orig.out.result = state->tmp.out.result;
    1087             : 
    1088             :         /* Reset temporary structure */
    1089        4167 :         NDR_ZERO_STRUCT(state->tmp);
    1090             : 
    1091        4167 :         tevent_req_done(req);
    1092             : }
    1093             : 
    1094        4167 : NTSTATUS dcerpc_wbint_Sids2UnixIDs_recv(struct tevent_req *req,
    1095             :                                         TALLOC_CTX *mem_ctx,
    1096             :                                         NTSTATUS *result)
    1097             : {
    1098        4167 :         struct dcerpc_wbint_Sids2UnixIDs_state *state = tevent_req_data(
    1099             :                 req, struct dcerpc_wbint_Sids2UnixIDs_state);
    1100           0 :         NTSTATUS status;
    1101             : 
    1102        4167 :         if (tevent_req_is_nterror(req, &status)) {
    1103           0 :                 tevent_req_received(req);
    1104           0 :                 return status;
    1105             :         }
    1106             : 
    1107             :         /* Steal possible out parameters to the callers context */
    1108        4167 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1109             : 
    1110             :         /* Return result */
    1111        4167 :         *result = state->orig.out.result;
    1112             : 
    1113        4167 :         tevent_req_received(req);
    1114        4167 :         return NT_STATUS_OK;
    1115             : }
    1116             : 
    1117           0 : NTSTATUS dcerpc_wbint_Sids2UnixIDs(struct dcerpc_binding_handle *h,
    1118             :                                    TALLOC_CTX *mem_ctx,
    1119             :                                    struct lsa_RefDomainList *_domains /* [in] [ref] */,
    1120             :                                    struct wbint_TransIDArray *_ids /* [in,out] [ref] */,
    1121             :                                    NTSTATUS *result)
    1122             : {
    1123           0 :         struct wbint_Sids2UnixIDs r;
    1124           0 :         NTSTATUS status;
    1125             : 
    1126             :         /* In parameters */
    1127           0 :         r.in.domains = _domains;
    1128           0 :         r.in.ids = _ids;
    1129             : 
    1130             :         /* Out parameters */
    1131           0 :         r.out.ids = _ids;
    1132             : 
    1133             :         /* Result */
    1134           0 :         NDR_ZERO_STRUCT(r.out.result);
    1135             : 
    1136           0 :         status = dcerpc_wbint_Sids2UnixIDs_r(h, mem_ctx, &r);
    1137           0 :         if (!NT_STATUS_IS_OK(status)) {
    1138           0 :                 return status;
    1139             :         }
    1140             : 
    1141             :         /* Return variables */
    1142           0 :         *_ids = *r.out.ids;
    1143             : 
    1144             :         /* Return result */
    1145           0 :         *result = r.out.result;
    1146             : 
    1147           0 :         return NT_STATUS_OK;
    1148             : }
    1149             : 
    1150             : struct dcerpc_wbint_UnixIDs2Sids_r_state {
    1151             :         TALLOC_CTX *out_mem_ctx;
    1152             : };
    1153             : 
    1154             : static void dcerpc_wbint_UnixIDs2Sids_r_done(struct tevent_req *subreq);
    1155             : 
    1156         488 : struct tevent_req *dcerpc_wbint_UnixIDs2Sids_r_send(TALLOC_CTX *mem_ctx,
    1157             :         struct tevent_context *ev,
    1158             :         struct dcerpc_binding_handle *h,
    1159             :         struct wbint_UnixIDs2Sids *r)
    1160             : {
    1161           0 :         struct tevent_req *req;
    1162           0 :         struct dcerpc_wbint_UnixIDs2Sids_r_state *state;
    1163           0 :         struct tevent_req *subreq;
    1164             : 
    1165         488 :         req = tevent_req_create(mem_ctx, &state,
    1166             :                                 struct dcerpc_wbint_UnixIDs2Sids_r_state);
    1167         488 :         if (req == NULL) {
    1168           0 :                 return NULL;
    1169             :         }
    1170             : 
    1171         488 :         state->out_mem_ctx = talloc_new(state);
    1172         488 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1173           0 :                 return tevent_req_post(req, ev);
    1174             :         }
    1175             : 
    1176         488 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1177             :                         NULL, &ndr_table_winbind,
    1178         488 :                         NDR_WBINT_UNIXIDS2SIDS, state->out_mem_ctx, r);
    1179         488 :         if (tevent_req_nomem(subreq, req)) {
    1180           0 :                 return tevent_req_post(req, ev);
    1181             :         }
    1182         488 :         tevent_req_set_callback(subreq, dcerpc_wbint_UnixIDs2Sids_r_done, req);
    1183             : 
    1184         488 :         return req;
    1185             : }
    1186             : 
    1187         488 : static void dcerpc_wbint_UnixIDs2Sids_r_done(struct tevent_req *subreq)
    1188             : {
    1189           0 :         struct tevent_req *req =
    1190         488 :                 tevent_req_callback_data(subreq,
    1191             :                 struct tevent_req);
    1192           0 :         NTSTATUS status;
    1193             : 
    1194         488 :         status = dcerpc_binding_handle_call_recv(subreq);
    1195         488 :         TALLOC_FREE(subreq);
    1196         488 :         if (tevent_req_nterror(req, status)) {
    1197           0 :                 return;
    1198             :         }
    1199             : 
    1200         488 :         tevent_req_done(req);
    1201             : }
    1202             : 
    1203         488 : NTSTATUS dcerpc_wbint_UnixIDs2Sids_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1204             : {
    1205           0 :         struct dcerpc_wbint_UnixIDs2Sids_r_state *state =
    1206         488 :                 tevent_req_data(req,
    1207             :                 struct dcerpc_wbint_UnixIDs2Sids_r_state);
    1208           0 :         NTSTATUS status;
    1209             : 
    1210         488 :         if (tevent_req_is_nterror(req, &status)) {
    1211           0 :                 tevent_req_received(req);
    1212           0 :                 return status;
    1213             :         }
    1214             : 
    1215         488 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1216             : 
    1217         488 :         tevent_req_received(req);
    1218         488 :         return NT_STATUS_OK;
    1219             : }
    1220             : 
    1221           0 : NTSTATUS dcerpc_wbint_UnixIDs2Sids_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_UnixIDs2Sids *r)
    1222             : {
    1223           0 :         NTSTATUS status;
    1224             : 
    1225           0 :         status = dcerpc_binding_handle_call(h,
    1226             :                         NULL, &ndr_table_winbind,
    1227             :                         NDR_WBINT_UNIXIDS2SIDS, mem_ctx, r);
    1228             : 
    1229           0 :         return status;
    1230             : }
    1231             : 
    1232             : struct dcerpc_wbint_UnixIDs2Sids_state {
    1233             :         struct wbint_UnixIDs2Sids orig;
    1234             :         struct wbint_UnixIDs2Sids tmp;
    1235             :         TALLOC_CTX *out_mem_ctx;
    1236             : };
    1237             : 
    1238             : static void dcerpc_wbint_UnixIDs2Sids_done(struct tevent_req *subreq);
    1239             : 
    1240         488 : struct tevent_req *dcerpc_wbint_UnixIDs2Sids_send(TALLOC_CTX *mem_ctx,
    1241             :                                                   struct tevent_context *ev,
    1242             :                                                   struct dcerpc_binding_handle *h,
    1243             :                                                   const char *_domain_name /* [in] [charset(UTF8),ref] */,
    1244             :                                                   struct dom_sid _domain_sid /* [in]  */,
    1245             :                                                   uint32_t _num_ids /* [in]  */,
    1246             :                                                   struct unixid *_xids /* [in,out]  */,
    1247             :                                                   struct dom_sid *_sids /* [out]  */)
    1248             : {
    1249           0 :         struct tevent_req *req;
    1250           0 :         struct dcerpc_wbint_UnixIDs2Sids_state *state;
    1251           0 :         struct tevent_req *subreq;
    1252             : 
    1253         488 :         req = tevent_req_create(mem_ctx, &state,
    1254             :                                 struct dcerpc_wbint_UnixIDs2Sids_state);
    1255         488 :         if (req == NULL) {
    1256           0 :                 return NULL;
    1257             :         }
    1258         488 :         state->out_mem_ctx = NULL;
    1259             : 
    1260             :         /* In parameters */
    1261         488 :         state->orig.in.domain_name = _domain_name;
    1262         488 :         state->orig.in.domain_sid = _domain_sid;
    1263         488 :         state->orig.in.num_ids = _num_ids;
    1264         488 :         state->orig.in.xids = _xids;
    1265             : 
    1266             :         /* Out parameters */
    1267         488 :         state->orig.out.xids = _xids;
    1268         488 :         state->orig.out.sids = _sids;
    1269             : 
    1270             :         /* Result */
    1271         488 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1272             : 
    1273         488 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1274             :                              "dcerpc_wbint_UnixIDs2Sids_out_memory");
    1275         488 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1276           0 :                 return tevent_req_post(req, ev);
    1277             :         }
    1278             : 
    1279             :         /* make a temporary copy, that we pass to the dispatch function */
    1280         488 :         state->tmp = state->orig;
    1281             : 
    1282         488 :         subreq = dcerpc_wbint_UnixIDs2Sids_r_send(state, ev, h, &state->tmp);
    1283         488 :         if (tevent_req_nomem(subreq, req)) {
    1284           0 :                 return tevent_req_post(req, ev);
    1285             :         }
    1286         488 :         tevent_req_set_callback(subreq, dcerpc_wbint_UnixIDs2Sids_done, req);
    1287         488 :         return req;
    1288             : }
    1289             : 
    1290         488 : static void dcerpc_wbint_UnixIDs2Sids_done(struct tevent_req *subreq)
    1291             : {
    1292         488 :         struct tevent_req *req = tevent_req_callback_data(
    1293             :                 subreq, struct tevent_req);
    1294         488 :         struct dcerpc_wbint_UnixIDs2Sids_state *state = tevent_req_data(
    1295             :                 req, struct dcerpc_wbint_UnixIDs2Sids_state);
    1296           0 :         NTSTATUS status;
    1297           0 :         TALLOC_CTX *mem_ctx;
    1298             : 
    1299         488 :         if (state->out_mem_ctx) {
    1300         488 :                 mem_ctx = state->out_mem_ctx;
    1301             :         } else {
    1302           0 :                 mem_ctx = state;
    1303             :         }
    1304             : 
    1305         488 :         status = dcerpc_wbint_UnixIDs2Sids_r_recv(subreq, mem_ctx);
    1306         488 :         TALLOC_FREE(subreq);
    1307         488 :         if (tevent_req_nterror(req, status)) {
    1308           0 :                 return;
    1309             :         }
    1310             : 
    1311             :         /* Copy out parameters */
    1312             :         {
    1313           0 :                 size_t _copy_len_xids;
    1314         488 :                 _copy_len_xids = state->tmp.in.num_ids;
    1315         488 :                 if (state->orig.out.xids != state->tmp.out.xids) {
    1316         488 :                         memcpy(state->orig.out.xids, state->tmp.out.xids, _copy_len_xids * sizeof(*state->orig.out.xids));
    1317             :                 }
    1318             :         }
    1319             :         {
    1320           0 :                 size_t _copy_len_sids;
    1321         488 :                 _copy_len_sids = state->tmp.in.num_ids;
    1322         488 :                 if (state->orig.out.sids != state->tmp.out.sids) {
    1323         488 :                         memcpy(state->orig.out.sids, state->tmp.out.sids, _copy_len_sids * sizeof(*state->orig.out.sids));
    1324             :                 }
    1325             :         }
    1326             : 
    1327             :         /* Copy result */
    1328         488 :         state->orig.out.result = state->tmp.out.result;
    1329             : 
    1330             :         /* Reset temporary structure */
    1331         488 :         NDR_ZERO_STRUCT(state->tmp);
    1332             : 
    1333         488 :         tevent_req_done(req);
    1334             : }
    1335             : 
    1336         488 : NTSTATUS dcerpc_wbint_UnixIDs2Sids_recv(struct tevent_req *req,
    1337             :                                         TALLOC_CTX *mem_ctx,
    1338             :                                         NTSTATUS *result)
    1339             : {
    1340         488 :         struct dcerpc_wbint_UnixIDs2Sids_state *state = tevent_req_data(
    1341             :                 req, struct dcerpc_wbint_UnixIDs2Sids_state);
    1342           0 :         NTSTATUS status;
    1343             : 
    1344         488 :         if (tevent_req_is_nterror(req, &status)) {
    1345           0 :                 tevent_req_received(req);
    1346           0 :                 return status;
    1347             :         }
    1348             : 
    1349             :         /* Steal possible out parameters to the callers context */
    1350         488 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1351             : 
    1352             :         /* Return result */
    1353         488 :         *result = state->orig.out.result;
    1354             : 
    1355         488 :         tevent_req_received(req);
    1356         488 :         return NT_STATUS_OK;
    1357             : }
    1358             : 
    1359           0 : NTSTATUS dcerpc_wbint_UnixIDs2Sids(struct dcerpc_binding_handle *h,
    1360             :                                    TALLOC_CTX *mem_ctx,
    1361             :                                    const char *_domain_name /* [in] [charset(UTF8),ref] */,
    1362             :                                    struct dom_sid _domain_sid /* [in]  */,
    1363             :                                    uint32_t _num_ids /* [in]  */,
    1364             :                                    struct unixid *_xids /* [in,out]  */,
    1365             :                                    struct dom_sid *_sids /* [out]  */,
    1366             :                                    NTSTATUS *result)
    1367             : {
    1368           0 :         struct wbint_UnixIDs2Sids r;
    1369           0 :         NTSTATUS status;
    1370             : 
    1371             :         /* In parameters */
    1372           0 :         r.in.domain_name = _domain_name;
    1373           0 :         r.in.domain_sid = _domain_sid;
    1374           0 :         r.in.num_ids = _num_ids;
    1375           0 :         r.in.xids = _xids;
    1376             : 
    1377             :         /* Out parameters */
    1378           0 :         r.out.xids = _xids;
    1379           0 :         r.out.sids = _sids;
    1380             : 
    1381             :         /* Result */
    1382           0 :         NDR_ZERO_STRUCT(r.out.result);
    1383             : 
    1384           0 :         status = dcerpc_wbint_UnixIDs2Sids_r(h, mem_ctx, &r);
    1385           0 :         if (!NT_STATUS_IS_OK(status)) {
    1386           0 :                 return status;
    1387             :         }
    1388             : 
    1389             :         /* Return variables */
    1390             :         {
    1391           0 :                 size_t _copy_len_xids;
    1392           0 :                 _copy_len_xids = r.in.num_ids;
    1393           0 :                 if (_xids != r.out.xids) {
    1394           0 :                         memcpy(_xids, r.out.xids, _copy_len_xids * sizeof(*_xids));
    1395             :                 }
    1396             :         }
    1397             :         {
    1398           0 :                 size_t _copy_len_sids;
    1399           0 :                 _copy_len_sids = r.in.num_ids;
    1400           0 :                 if (_sids != r.out.sids) {
    1401           0 :                         memcpy(_sids, r.out.sids, _copy_len_sids * sizeof(*_sids));
    1402             :                 }
    1403             :         }
    1404             : 
    1405             :         /* Return result */
    1406           0 :         *result = r.out.result;
    1407             : 
    1408           0 :         return NT_STATUS_OK;
    1409             : }
    1410             : 
    1411             : struct dcerpc_wbint_AllocateUid_r_state {
    1412             :         TALLOC_CTX *out_mem_ctx;
    1413             : };
    1414             : 
    1415             : static void dcerpc_wbint_AllocateUid_r_done(struct tevent_req *subreq);
    1416             : 
    1417           6 : struct tevent_req *dcerpc_wbint_AllocateUid_r_send(TALLOC_CTX *mem_ctx,
    1418             :         struct tevent_context *ev,
    1419             :         struct dcerpc_binding_handle *h,
    1420             :         struct wbint_AllocateUid *r)
    1421             : {
    1422           0 :         struct tevent_req *req;
    1423           0 :         struct dcerpc_wbint_AllocateUid_r_state *state;
    1424           0 :         struct tevent_req *subreq;
    1425             : 
    1426           6 :         req = tevent_req_create(mem_ctx, &state,
    1427             :                                 struct dcerpc_wbint_AllocateUid_r_state);
    1428           6 :         if (req == NULL) {
    1429           0 :                 return NULL;
    1430             :         }
    1431             : 
    1432           6 :         state->out_mem_ctx = talloc_new(state);
    1433           6 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1434           0 :                 return tevent_req_post(req, ev);
    1435             :         }
    1436             : 
    1437           6 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1438             :                         NULL, &ndr_table_winbind,
    1439           6 :                         NDR_WBINT_ALLOCATEUID, state->out_mem_ctx, r);
    1440           6 :         if (tevent_req_nomem(subreq, req)) {
    1441           0 :                 return tevent_req_post(req, ev);
    1442             :         }
    1443           6 :         tevent_req_set_callback(subreq, dcerpc_wbint_AllocateUid_r_done, req);
    1444             : 
    1445           6 :         return req;
    1446             : }
    1447             : 
    1448           6 : static void dcerpc_wbint_AllocateUid_r_done(struct tevent_req *subreq)
    1449             : {
    1450           0 :         struct tevent_req *req =
    1451           6 :                 tevent_req_callback_data(subreq,
    1452             :                 struct tevent_req);
    1453           0 :         NTSTATUS status;
    1454             : 
    1455           6 :         status = dcerpc_binding_handle_call_recv(subreq);
    1456           6 :         TALLOC_FREE(subreq);
    1457           6 :         if (tevent_req_nterror(req, status)) {
    1458           0 :                 return;
    1459             :         }
    1460             : 
    1461           6 :         tevent_req_done(req);
    1462             : }
    1463             : 
    1464           6 : NTSTATUS dcerpc_wbint_AllocateUid_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1465             : {
    1466           0 :         struct dcerpc_wbint_AllocateUid_r_state *state =
    1467           6 :                 tevent_req_data(req,
    1468             :                 struct dcerpc_wbint_AllocateUid_r_state);
    1469           0 :         NTSTATUS status;
    1470             : 
    1471           6 :         if (tevent_req_is_nterror(req, &status)) {
    1472           0 :                 tevent_req_received(req);
    1473           0 :                 return status;
    1474             :         }
    1475             : 
    1476           6 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1477             : 
    1478           6 :         tevent_req_received(req);
    1479           6 :         return NT_STATUS_OK;
    1480             : }
    1481             : 
    1482           0 : NTSTATUS dcerpc_wbint_AllocateUid_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_AllocateUid *r)
    1483             : {
    1484           0 :         NTSTATUS status;
    1485             : 
    1486           0 :         status = dcerpc_binding_handle_call(h,
    1487             :                         NULL, &ndr_table_winbind,
    1488             :                         NDR_WBINT_ALLOCATEUID, mem_ctx, r);
    1489             : 
    1490           0 :         return status;
    1491             : }
    1492             : 
    1493             : struct dcerpc_wbint_AllocateUid_state {
    1494             :         struct wbint_AllocateUid orig;
    1495             :         struct wbint_AllocateUid tmp;
    1496             :         TALLOC_CTX *out_mem_ctx;
    1497             : };
    1498             : 
    1499             : static void dcerpc_wbint_AllocateUid_done(struct tevent_req *subreq);
    1500             : 
    1501           6 : struct tevent_req *dcerpc_wbint_AllocateUid_send(TALLOC_CTX *mem_ctx,
    1502             :                                                  struct tevent_context *ev,
    1503             :                                                  struct dcerpc_binding_handle *h,
    1504             :                                                  uint64_t *_uid /* [out] [ref] */)
    1505             : {
    1506           0 :         struct tevent_req *req;
    1507           0 :         struct dcerpc_wbint_AllocateUid_state *state;
    1508           0 :         struct tevent_req *subreq;
    1509             : 
    1510           6 :         req = tevent_req_create(mem_ctx, &state,
    1511             :                                 struct dcerpc_wbint_AllocateUid_state);
    1512           6 :         if (req == NULL) {
    1513           0 :                 return NULL;
    1514             :         }
    1515           6 :         state->out_mem_ctx = NULL;
    1516             : 
    1517             :         /* In parameters */
    1518             : 
    1519             :         /* Out parameters */
    1520           6 :         state->orig.out.uid = _uid;
    1521             : 
    1522             :         /* Result */
    1523           6 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1524             : 
    1525           6 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1526             :                              "dcerpc_wbint_AllocateUid_out_memory");
    1527           6 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1528           0 :                 return tevent_req_post(req, ev);
    1529             :         }
    1530             : 
    1531             :         /* make a temporary copy, that we pass to the dispatch function */
    1532           6 :         state->tmp = state->orig;
    1533             : 
    1534           6 :         subreq = dcerpc_wbint_AllocateUid_r_send(state, ev, h, &state->tmp);
    1535           6 :         if (tevent_req_nomem(subreq, req)) {
    1536           0 :                 return tevent_req_post(req, ev);
    1537             :         }
    1538           6 :         tevent_req_set_callback(subreq, dcerpc_wbint_AllocateUid_done, req);
    1539           6 :         return req;
    1540             : }
    1541             : 
    1542           6 : static void dcerpc_wbint_AllocateUid_done(struct tevent_req *subreq)
    1543             : {
    1544           6 :         struct tevent_req *req = tevent_req_callback_data(
    1545             :                 subreq, struct tevent_req);
    1546           6 :         struct dcerpc_wbint_AllocateUid_state *state = tevent_req_data(
    1547             :                 req, struct dcerpc_wbint_AllocateUid_state);
    1548           0 :         NTSTATUS status;
    1549           0 :         TALLOC_CTX *mem_ctx;
    1550             : 
    1551           6 :         if (state->out_mem_ctx) {
    1552           6 :                 mem_ctx = state->out_mem_ctx;
    1553             :         } else {
    1554           0 :                 mem_ctx = state;
    1555             :         }
    1556             : 
    1557           6 :         status = dcerpc_wbint_AllocateUid_r_recv(subreq, mem_ctx);
    1558           6 :         TALLOC_FREE(subreq);
    1559           6 :         if (tevent_req_nterror(req, status)) {
    1560           0 :                 return;
    1561             :         }
    1562             : 
    1563             :         /* Copy out parameters */
    1564           6 :         *state->orig.out.uid = *state->tmp.out.uid;
    1565             : 
    1566             :         /* Copy result */
    1567           6 :         state->orig.out.result = state->tmp.out.result;
    1568             : 
    1569             :         /* Reset temporary structure */
    1570           6 :         NDR_ZERO_STRUCT(state->tmp);
    1571             : 
    1572           6 :         tevent_req_done(req);
    1573             : }
    1574             : 
    1575           6 : NTSTATUS dcerpc_wbint_AllocateUid_recv(struct tevent_req *req,
    1576             :                                        TALLOC_CTX *mem_ctx,
    1577             :                                        NTSTATUS *result)
    1578             : {
    1579           6 :         struct dcerpc_wbint_AllocateUid_state *state = tevent_req_data(
    1580             :                 req, struct dcerpc_wbint_AllocateUid_state);
    1581           0 :         NTSTATUS status;
    1582             : 
    1583           6 :         if (tevent_req_is_nterror(req, &status)) {
    1584           0 :                 tevent_req_received(req);
    1585           0 :                 return status;
    1586             :         }
    1587             : 
    1588             :         /* Steal possible out parameters to the callers context */
    1589           6 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1590             : 
    1591             :         /* Return result */
    1592           6 :         *result = state->orig.out.result;
    1593             : 
    1594           6 :         tevent_req_received(req);
    1595           6 :         return NT_STATUS_OK;
    1596             : }
    1597             : 
    1598           0 : NTSTATUS dcerpc_wbint_AllocateUid(struct dcerpc_binding_handle *h,
    1599             :                                   TALLOC_CTX *mem_ctx,
    1600             :                                   uint64_t *_uid /* [out] [ref] */,
    1601             :                                   NTSTATUS *result)
    1602             : {
    1603           0 :         struct wbint_AllocateUid r;
    1604           0 :         NTSTATUS status;
    1605             : 
    1606             :         /* In parameters */
    1607             : 
    1608             :         /* Out parameters */
    1609           0 :         r.out.uid = _uid;
    1610             : 
    1611             :         /* Result */
    1612           0 :         NDR_ZERO_STRUCT(r.out.result);
    1613             : 
    1614           0 :         status = dcerpc_wbint_AllocateUid_r(h, mem_ctx, &r);
    1615           0 :         if (!NT_STATUS_IS_OK(status)) {
    1616           0 :                 return status;
    1617             :         }
    1618             : 
    1619             :         /* Return variables */
    1620           0 :         *_uid = *r.out.uid;
    1621             : 
    1622             :         /* Return result */
    1623           0 :         *result = r.out.result;
    1624             : 
    1625           0 :         return NT_STATUS_OK;
    1626             : }
    1627             : 
    1628             : struct dcerpc_wbint_AllocateGid_r_state {
    1629             :         TALLOC_CTX *out_mem_ctx;
    1630             : };
    1631             : 
    1632             : static void dcerpc_wbint_AllocateGid_r_done(struct tevent_req *subreq);
    1633             : 
    1634         431 : struct tevent_req *dcerpc_wbint_AllocateGid_r_send(TALLOC_CTX *mem_ctx,
    1635             :         struct tevent_context *ev,
    1636             :         struct dcerpc_binding_handle *h,
    1637             :         struct wbint_AllocateGid *r)
    1638             : {
    1639           0 :         struct tevent_req *req;
    1640           0 :         struct dcerpc_wbint_AllocateGid_r_state *state;
    1641           0 :         struct tevent_req *subreq;
    1642             : 
    1643         431 :         req = tevent_req_create(mem_ctx, &state,
    1644             :                                 struct dcerpc_wbint_AllocateGid_r_state);
    1645         431 :         if (req == NULL) {
    1646           0 :                 return NULL;
    1647             :         }
    1648             : 
    1649         431 :         state->out_mem_ctx = talloc_new(state);
    1650         431 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1651           0 :                 return tevent_req_post(req, ev);
    1652             :         }
    1653             : 
    1654         431 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1655             :                         NULL, &ndr_table_winbind,
    1656         431 :                         NDR_WBINT_ALLOCATEGID, state->out_mem_ctx, r);
    1657         431 :         if (tevent_req_nomem(subreq, req)) {
    1658           0 :                 return tevent_req_post(req, ev);
    1659             :         }
    1660         431 :         tevent_req_set_callback(subreq, dcerpc_wbint_AllocateGid_r_done, req);
    1661             : 
    1662         431 :         return req;
    1663             : }
    1664             : 
    1665         431 : static void dcerpc_wbint_AllocateGid_r_done(struct tevent_req *subreq)
    1666             : {
    1667           0 :         struct tevent_req *req =
    1668         431 :                 tevent_req_callback_data(subreq,
    1669             :                 struct tevent_req);
    1670           0 :         NTSTATUS status;
    1671             : 
    1672         431 :         status = dcerpc_binding_handle_call_recv(subreq);
    1673         431 :         TALLOC_FREE(subreq);
    1674         431 :         if (tevent_req_nterror(req, status)) {
    1675           0 :                 return;
    1676             :         }
    1677             : 
    1678         431 :         tevent_req_done(req);
    1679             : }
    1680             : 
    1681         431 : NTSTATUS dcerpc_wbint_AllocateGid_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1682             : {
    1683           0 :         struct dcerpc_wbint_AllocateGid_r_state *state =
    1684         431 :                 tevent_req_data(req,
    1685             :                 struct dcerpc_wbint_AllocateGid_r_state);
    1686           0 :         NTSTATUS status;
    1687             : 
    1688         431 :         if (tevent_req_is_nterror(req, &status)) {
    1689           0 :                 tevent_req_received(req);
    1690           0 :                 return status;
    1691             :         }
    1692             : 
    1693         431 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1694             : 
    1695         431 :         tevent_req_received(req);
    1696         431 :         return NT_STATUS_OK;
    1697             : }
    1698             : 
    1699           0 : NTSTATUS dcerpc_wbint_AllocateGid_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_AllocateGid *r)
    1700             : {
    1701           0 :         NTSTATUS status;
    1702             : 
    1703           0 :         status = dcerpc_binding_handle_call(h,
    1704             :                         NULL, &ndr_table_winbind,
    1705             :                         NDR_WBINT_ALLOCATEGID, mem_ctx, r);
    1706             : 
    1707           0 :         return status;
    1708             : }
    1709             : 
    1710             : struct dcerpc_wbint_AllocateGid_state {
    1711             :         struct wbint_AllocateGid orig;
    1712             :         struct wbint_AllocateGid tmp;
    1713             :         TALLOC_CTX *out_mem_ctx;
    1714             : };
    1715             : 
    1716             : static void dcerpc_wbint_AllocateGid_done(struct tevent_req *subreq);
    1717             : 
    1718         431 : struct tevent_req *dcerpc_wbint_AllocateGid_send(TALLOC_CTX *mem_ctx,
    1719             :                                                  struct tevent_context *ev,
    1720             :                                                  struct dcerpc_binding_handle *h,
    1721             :                                                  uint64_t *_gid /* [out] [ref] */)
    1722             : {
    1723           0 :         struct tevent_req *req;
    1724           0 :         struct dcerpc_wbint_AllocateGid_state *state;
    1725           0 :         struct tevent_req *subreq;
    1726             : 
    1727         431 :         req = tevent_req_create(mem_ctx, &state,
    1728             :                                 struct dcerpc_wbint_AllocateGid_state);
    1729         431 :         if (req == NULL) {
    1730           0 :                 return NULL;
    1731             :         }
    1732         431 :         state->out_mem_ctx = NULL;
    1733             : 
    1734             :         /* In parameters */
    1735             : 
    1736             :         /* Out parameters */
    1737         431 :         state->orig.out.gid = _gid;
    1738             : 
    1739             :         /* Result */
    1740         431 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1741             : 
    1742         431 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1743             :                              "dcerpc_wbint_AllocateGid_out_memory");
    1744         431 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1745           0 :                 return tevent_req_post(req, ev);
    1746             :         }
    1747             : 
    1748             :         /* make a temporary copy, that we pass to the dispatch function */
    1749         431 :         state->tmp = state->orig;
    1750             : 
    1751         431 :         subreq = dcerpc_wbint_AllocateGid_r_send(state, ev, h, &state->tmp);
    1752         431 :         if (tevent_req_nomem(subreq, req)) {
    1753           0 :                 return tevent_req_post(req, ev);
    1754             :         }
    1755         431 :         tevent_req_set_callback(subreq, dcerpc_wbint_AllocateGid_done, req);
    1756         431 :         return req;
    1757             : }
    1758             : 
    1759         431 : static void dcerpc_wbint_AllocateGid_done(struct tevent_req *subreq)
    1760             : {
    1761         431 :         struct tevent_req *req = tevent_req_callback_data(
    1762             :                 subreq, struct tevent_req);
    1763         431 :         struct dcerpc_wbint_AllocateGid_state *state = tevent_req_data(
    1764             :                 req, struct dcerpc_wbint_AllocateGid_state);
    1765           0 :         NTSTATUS status;
    1766           0 :         TALLOC_CTX *mem_ctx;
    1767             : 
    1768         431 :         if (state->out_mem_ctx) {
    1769         431 :                 mem_ctx = state->out_mem_ctx;
    1770             :         } else {
    1771           0 :                 mem_ctx = state;
    1772             :         }
    1773             : 
    1774         431 :         status = dcerpc_wbint_AllocateGid_r_recv(subreq, mem_ctx);
    1775         431 :         TALLOC_FREE(subreq);
    1776         431 :         if (tevent_req_nterror(req, status)) {
    1777           0 :                 return;
    1778             :         }
    1779             : 
    1780             :         /* Copy out parameters */
    1781         431 :         *state->orig.out.gid = *state->tmp.out.gid;
    1782             : 
    1783             :         /* Copy result */
    1784         431 :         state->orig.out.result = state->tmp.out.result;
    1785             : 
    1786             :         /* Reset temporary structure */
    1787         431 :         NDR_ZERO_STRUCT(state->tmp);
    1788             : 
    1789         431 :         tevent_req_done(req);
    1790             : }
    1791             : 
    1792         431 : NTSTATUS dcerpc_wbint_AllocateGid_recv(struct tevent_req *req,
    1793             :                                        TALLOC_CTX *mem_ctx,
    1794             :                                        NTSTATUS *result)
    1795             : {
    1796         431 :         struct dcerpc_wbint_AllocateGid_state *state = tevent_req_data(
    1797             :                 req, struct dcerpc_wbint_AllocateGid_state);
    1798           0 :         NTSTATUS status;
    1799             : 
    1800         431 :         if (tevent_req_is_nterror(req, &status)) {
    1801           0 :                 tevent_req_received(req);
    1802           0 :                 return status;
    1803             :         }
    1804             : 
    1805             :         /* Steal possible out parameters to the callers context */
    1806         431 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1807             : 
    1808             :         /* Return result */
    1809         431 :         *result = state->orig.out.result;
    1810             : 
    1811         431 :         tevent_req_received(req);
    1812         431 :         return NT_STATUS_OK;
    1813             : }
    1814             : 
    1815           0 : NTSTATUS dcerpc_wbint_AllocateGid(struct dcerpc_binding_handle *h,
    1816             :                                   TALLOC_CTX *mem_ctx,
    1817             :                                   uint64_t *_gid /* [out] [ref] */,
    1818             :                                   NTSTATUS *result)
    1819             : {
    1820           0 :         struct wbint_AllocateGid r;
    1821           0 :         NTSTATUS status;
    1822             : 
    1823             :         /* In parameters */
    1824             : 
    1825             :         /* Out parameters */
    1826           0 :         r.out.gid = _gid;
    1827             : 
    1828             :         /* Result */
    1829           0 :         NDR_ZERO_STRUCT(r.out.result);
    1830             : 
    1831           0 :         status = dcerpc_wbint_AllocateGid_r(h, mem_ctx, &r);
    1832           0 :         if (!NT_STATUS_IS_OK(status)) {
    1833           0 :                 return status;
    1834             :         }
    1835             : 
    1836             :         /* Return variables */
    1837           0 :         *_gid = *r.out.gid;
    1838             : 
    1839             :         /* Return result */
    1840           0 :         *result = r.out.result;
    1841             : 
    1842           0 :         return NT_STATUS_OK;
    1843             : }
    1844             : 
    1845             : struct dcerpc_wbint_GetNssInfo_r_state {
    1846             :         TALLOC_CTX *out_mem_ctx;
    1847             : };
    1848             : 
    1849             : static void dcerpc_wbint_GetNssInfo_r_done(struct tevent_req *subreq);
    1850             : 
    1851       99717 : struct tevent_req *dcerpc_wbint_GetNssInfo_r_send(TALLOC_CTX *mem_ctx,
    1852             :         struct tevent_context *ev,
    1853             :         struct dcerpc_binding_handle *h,
    1854             :         struct wbint_GetNssInfo *r)
    1855             : {
    1856           0 :         struct tevent_req *req;
    1857           0 :         struct dcerpc_wbint_GetNssInfo_r_state *state;
    1858           0 :         struct tevent_req *subreq;
    1859             : 
    1860       99717 :         req = tevent_req_create(mem_ctx, &state,
    1861             :                                 struct dcerpc_wbint_GetNssInfo_r_state);
    1862       99717 :         if (req == NULL) {
    1863           0 :                 return NULL;
    1864             :         }
    1865             : 
    1866       99717 :         state->out_mem_ctx = talloc_new(state);
    1867       99717 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1868           0 :                 return tevent_req_post(req, ev);
    1869             :         }
    1870             : 
    1871       99717 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1872             :                         NULL, &ndr_table_winbind,
    1873       99717 :                         NDR_WBINT_GETNSSINFO, state->out_mem_ctx, r);
    1874       99717 :         if (tevent_req_nomem(subreq, req)) {
    1875           0 :                 return tevent_req_post(req, ev);
    1876             :         }
    1877       99717 :         tevent_req_set_callback(subreq, dcerpc_wbint_GetNssInfo_r_done, req);
    1878             : 
    1879       99717 :         return req;
    1880             : }
    1881             : 
    1882       99717 : static void dcerpc_wbint_GetNssInfo_r_done(struct tevent_req *subreq)
    1883             : {
    1884           0 :         struct tevent_req *req =
    1885       99717 :                 tevent_req_callback_data(subreq,
    1886             :                 struct tevent_req);
    1887           0 :         NTSTATUS status;
    1888             : 
    1889       99717 :         status = dcerpc_binding_handle_call_recv(subreq);
    1890       99717 :         TALLOC_FREE(subreq);
    1891       99717 :         if (tevent_req_nterror(req, status)) {
    1892           0 :                 return;
    1893             :         }
    1894             : 
    1895       99717 :         tevent_req_done(req);
    1896             : }
    1897             : 
    1898       99717 : NTSTATUS dcerpc_wbint_GetNssInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1899             : {
    1900           0 :         struct dcerpc_wbint_GetNssInfo_r_state *state =
    1901       99717 :                 tevent_req_data(req,
    1902             :                 struct dcerpc_wbint_GetNssInfo_r_state);
    1903           0 :         NTSTATUS status;
    1904             : 
    1905       99717 :         if (tevent_req_is_nterror(req, &status)) {
    1906           0 :                 tevent_req_received(req);
    1907           0 :                 return status;
    1908             :         }
    1909             : 
    1910       99717 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1911             : 
    1912       99717 :         tevent_req_received(req);
    1913       99717 :         return NT_STATUS_OK;
    1914             : }
    1915             : 
    1916           0 : NTSTATUS dcerpc_wbint_GetNssInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_GetNssInfo *r)
    1917             : {
    1918           0 :         NTSTATUS status;
    1919             : 
    1920           0 :         status = dcerpc_binding_handle_call(h,
    1921             :                         NULL, &ndr_table_winbind,
    1922             :                         NDR_WBINT_GETNSSINFO, mem_ctx, r);
    1923             : 
    1924           0 :         return status;
    1925             : }
    1926             : 
    1927             : struct dcerpc_wbint_GetNssInfo_state {
    1928             :         struct wbint_GetNssInfo orig;
    1929             :         struct wbint_GetNssInfo tmp;
    1930             :         TALLOC_CTX *out_mem_ctx;
    1931             : };
    1932             : 
    1933             : static void dcerpc_wbint_GetNssInfo_done(struct tevent_req *subreq);
    1934             : 
    1935       99717 : struct tevent_req *dcerpc_wbint_GetNssInfo_send(TALLOC_CTX *mem_ctx,
    1936             :                                                 struct tevent_context *ev,
    1937             :                                                 struct dcerpc_binding_handle *h,
    1938             :                                                 struct wbint_userinfo *_info /* [in,out] [ref] */)
    1939             : {
    1940           0 :         struct tevent_req *req;
    1941           0 :         struct dcerpc_wbint_GetNssInfo_state *state;
    1942           0 :         struct tevent_req *subreq;
    1943             : 
    1944       99717 :         req = tevent_req_create(mem_ctx, &state,
    1945             :                                 struct dcerpc_wbint_GetNssInfo_state);
    1946       99717 :         if (req == NULL) {
    1947           0 :                 return NULL;
    1948             :         }
    1949       99717 :         state->out_mem_ctx = NULL;
    1950             : 
    1951             :         /* In parameters */
    1952       99717 :         state->orig.in.info = _info;
    1953             : 
    1954             :         /* Out parameters */
    1955       99717 :         state->orig.out.info = _info;
    1956             : 
    1957             :         /* Result */
    1958       99717 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1959             : 
    1960       99717 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1961             :                              "dcerpc_wbint_GetNssInfo_out_memory");
    1962       99717 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1963           0 :                 return tevent_req_post(req, ev);
    1964             :         }
    1965             : 
    1966             :         /* make a temporary copy, that we pass to the dispatch function */
    1967       99717 :         state->tmp = state->orig;
    1968             : 
    1969       99717 :         subreq = dcerpc_wbint_GetNssInfo_r_send(state, ev, h, &state->tmp);
    1970       99717 :         if (tevent_req_nomem(subreq, req)) {
    1971           0 :                 return tevent_req_post(req, ev);
    1972             :         }
    1973       99717 :         tevent_req_set_callback(subreq, dcerpc_wbint_GetNssInfo_done, req);
    1974       99717 :         return req;
    1975             : }
    1976             : 
    1977       99717 : static void dcerpc_wbint_GetNssInfo_done(struct tevent_req *subreq)
    1978             : {
    1979       99717 :         struct tevent_req *req = tevent_req_callback_data(
    1980             :                 subreq, struct tevent_req);
    1981       99717 :         struct dcerpc_wbint_GetNssInfo_state *state = tevent_req_data(
    1982             :                 req, struct dcerpc_wbint_GetNssInfo_state);
    1983           0 :         NTSTATUS status;
    1984           0 :         TALLOC_CTX *mem_ctx;
    1985             : 
    1986       99717 :         if (state->out_mem_ctx) {
    1987       99717 :                 mem_ctx = state->out_mem_ctx;
    1988             :         } else {
    1989           0 :                 mem_ctx = state;
    1990             :         }
    1991             : 
    1992       99717 :         status = dcerpc_wbint_GetNssInfo_r_recv(subreq, mem_ctx);
    1993       99717 :         TALLOC_FREE(subreq);
    1994       99717 :         if (tevent_req_nterror(req, status)) {
    1995           0 :                 return;
    1996             :         }
    1997             : 
    1998             :         /* Copy out parameters */
    1999       99717 :         *state->orig.out.info = *state->tmp.out.info;
    2000             : 
    2001             :         /* Copy result */
    2002       99717 :         state->orig.out.result = state->tmp.out.result;
    2003             : 
    2004             :         /* Reset temporary structure */
    2005       99717 :         NDR_ZERO_STRUCT(state->tmp);
    2006             : 
    2007       99717 :         tevent_req_done(req);
    2008             : }
    2009             : 
    2010       99717 : NTSTATUS dcerpc_wbint_GetNssInfo_recv(struct tevent_req *req,
    2011             :                                       TALLOC_CTX *mem_ctx,
    2012             :                                       NTSTATUS *result)
    2013             : {
    2014       99717 :         struct dcerpc_wbint_GetNssInfo_state *state = tevent_req_data(
    2015             :                 req, struct dcerpc_wbint_GetNssInfo_state);
    2016           0 :         NTSTATUS status;
    2017             : 
    2018       99717 :         if (tevent_req_is_nterror(req, &status)) {
    2019           0 :                 tevent_req_received(req);
    2020           0 :                 return status;
    2021             :         }
    2022             : 
    2023             :         /* Steal possible out parameters to the callers context */
    2024       99717 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2025             : 
    2026             :         /* Return result */
    2027       99717 :         *result = state->orig.out.result;
    2028             : 
    2029       99717 :         tevent_req_received(req);
    2030       99717 :         return NT_STATUS_OK;
    2031             : }
    2032             : 
    2033           0 : NTSTATUS dcerpc_wbint_GetNssInfo(struct dcerpc_binding_handle *h,
    2034             :                                  TALLOC_CTX *mem_ctx,
    2035             :                                  struct wbint_userinfo *_info /* [in,out] [ref] */,
    2036             :                                  NTSTATUS *result)
    2037             : {
    2038           0 :         struct wbint_GetNssInfo r;
    2039           0 :         NTSTATUS status;
    2040             : 
    2041             :         /* In parameters */
    2042           0 :         r.in.info = _info;
    2043             : 
    2044             :         /* Out parameters */
    2045           0 :         r.out.info = _info;
    2046             : 
    2047             :         /* Result */
    2048           0 :         NDR_ZERO_STRUCT(r.out.result);
    2049             : 
    2050           0 :         status = dcerpc_wbint_GetNssInfo_r(h, mem_ctx, &r);
    2051           0 :         if (!NT_STATUS_IS_OK(status)) {
    2052           0 :                 return status;
    2053             :         }
    2054             : 
    2055             :         /* Return variables */
    2056           0 :         *_info = *r.out.info;
    2057             : 
    2058             :         /* Return result */
    2059           0 :         *result = r.out.result;
    2060             : 
    2061           0 :         return NT_STATUS_OK;
    2062             : }
    2063             : 
    2064             : struct dcerpc_wbint_LookupUserAliases_r_state {
    2065             :         TALLOC_CTX *out_mem_ctx;
    2066             : };
    2067             : 
    2068             : static void dcerpc_wbint_LookupUserAliases_r_done(struct tevent_req *subreq);
    2069             : 
    2070        4222 : struct tevent_req *dcerpc_wbint_LookupUserAliases_r_send(TALLOC_CTX *mem_ctx,
    2071             :         struct tevent_context *ev,
    2072             :         struct dcerpc_binding_handle *h,
    2073             :         struct wbint_LookupUserAliases *r)
    2074             : {
    2075           0 :         struct tevent_req *req;
    2076           0 :         struct dcerpc_wbint_LookupUserAliases_r_state *state;
    2077           0 :         struct tevent_req *subreq;
    2078             : 
    2079        4222 :         req = tevent_req_create(mem_ctx, &state,
    2080             :                                 struct dcerpc_wbint_LookupUserAliases_r_state);
    2081        4222 :         if (req == NULL) {
    2082           0 :                 return NULL;
    2083             :         }
    2084             : 
    2085        4222 :         state->out_mem_ctx = talloc_new(state);
    2086        4222 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2087           0 :                 return tevent_req_post(req, ev);
    2088             :         }
    2089             : 
    2090        4222 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2091             :                         NULL, &ndr_table_winbind,
    2092        4222 :                         NDR_WBINT_LOOKUPUSERALIASES, state->out_mem_ctx, r);
    2093        4222 :         if (tevent_req_nomem(subreq, req)) {
    2094           0 :                 return tevent_req_post(req, ev);
    2095             :         }
    2096        4222 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupUserAliases_r_done, req);
    2097             : 
    2098        4222 :         return req;
    2099             : }
    2100             : 
    2101        4222 : static void dcerpc_wbint_LookupUserAliases_r_done(struct tevent_req *subreq)
    2102             : {
    2103           0 :         struct tevent_req *req =
    2104        4222 :                 tevent_req_callback_data(subreq,
    2105             :                 struct tevent_req);
    2106           0 :         NTSTATUS status;
    2107             : 
    2108        4222 :         status = dcerpc_binding_handle_call_recv(subreq);
    2109        4222 :         TALLOC_FREE(subreq);
    2110        4222 :         if (tevent_req_nterror(req, status)) {
    2111           0 :                 return;
    2112             :         }
    2113             : 
    2114        4222 :         tevent_req_done(req);
    2115             : }
    2116             : 
    2117        4222 : NTSTATUS dcerpc_wbint_LookupUserAliases_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2118             : {
    2119           0 :         struct dcerpc_wbint_LookupUserAliases_r_state *state =
    2120        4222 :                 tevent_req_data(req,
    2121             :                 struct dcerpc_wbint_LookupUserAliases_r_state);
    2122           0 :         NTSTATUS status;
    2123             : 
    2124        4222 :         if (tevent_req_is_nterror(req, &status)) {
    2125           0 :                 tevent_req_received(req);
    2126           0 :                 return status;
    2127             :         }
    2128             : 
    2129        4222 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2130             : 
    2131        4222 :         tevent_req_received(req);
    2132        4222 :         return NT_STATUS_OK;
    2133             : }
    2134             : 
    2135           0 : NTSTATUS dcerpc_wbint_LookupUserAliases_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupUserAliases *r)
    2136             : {
    2137           0 :         NTSTATUS status;
    2138             : 
    2139           0 :         status = dcerpc_binding_handle_call(h,
    2140             :                         NULL, &ndr_table_winbind,
    2141             :                         NDR_WBINT_LOOKUPUSERALIASES, mem_ctx, r);
    2142             : 
    2143           0 :         return status;
    2144             : }
    2145             : 
    2146             : struct dcerpc_wbint_LookupUserAliases_state {
    2147             :         struct wbint_LookupUserAliases orig;
    2148             :         struct wbint_LookupUserAliases tmp;
    2149             :         TALLOC_CTX *out_mem_ctx;
    2150             : };
    2151             : 
    2152             : static void dcerpc_wbint_LookupUserAliases_done(struct tevent_req *subreq);
    2153             : 
    2154        4222 : struct tevent_req *dcerpc_wbint_LookupUserAliases_send(TALLOC_CTX *mem_ctx,
    2155             :                                                        struct tevent_context *ev,
    2156             :                                                        struct dcerpc_binding_handle *h,
    2157             :                                                        struct wbint_SidArray *_sids /* [in] [ref] */,
    2158             :                                                        struct wbint_RidArray *_rids /* [out] [ref] */)
    2159             : {
    2160           0 :         struct tevent_req *req;
    2161           0 :         struct dcerpc_wbint_LookupUserAliases_state *state;
    2162           0 :         struct tevent_req *subreq;
    2163             : 
    2164        4222 :         req = tevent_req_create(mem_ctx, &state,
    2165             :                                 struct dcerpc_wbint_LookupUserAliases_state);
    2166        4222 :         if (req == NULL) {
    2167           0 :                 return NULL;
    2168             :         }
    2169        4222 :         state->out_mem_ctx = NULL;
    2170             : 
    2171             :         /* In parameters */
    2172        4222 :         state->orig.in.sids = _sids;
    2173             : 
    2174             :         /* Out parameters */
    2175        4222 :         state->orig.out.rids = _rids;
    2176             : 
    2177             :         /* Result */
    2178        4222 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2179             : 
    2180        4222 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2181             :                              "dcerpc_wbint_LookupUserAliases_out_memory");
    2182        4222 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2183           0 :                 return tevent_req_post(req, ev);
    2184             :         }
    2185             : 
    2186             :         /* make a temporary copy, that we pass to the dispatch function */
    2187        4222 :         state->tmp = state->orig;
    2188             : 
    2189        4222 :         subreq = dcerpc_wbint_LookupUserAliases_r_send(state, ev, h, &state->tmp);
    2190        4222 :         if (tevent_req_nomem(subreq, req)) {
    2191           0 :                 return tevent_req_post(req, ev);
    2192             :         }
    2193        4222 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupUserAliases_done, req);
    2194        4222 :         return req;
    2195             : }
    2196             : 
    2197        4222 : static void dcerpc_wbint_LookupUserAliases_done(struct tevent_req *subreq)
    2198             : {
    2199        4222 :         struct tevent_req *req = tevent_req_callback_data(
    2200             :                 subreq, struct tevent_req);
    2201        4222 :         struct dcerpc_wbint_LookupUserAliases_state *state = tevent_req_data(
    2202             :                 req, struct dcerpc_wbint_LookupUserAliases_state);
    2203           0 :         NTSTATUS status;
    2204           0 :         TALLOC_CTX *mem_ctx;
    2205             : 
    2206        4222 :         if (state->out_mem_ctx) {
    2207        4222 :                 mem_ctx = state->out_mem_ctx;
    2208             :         } else {
    2209           0 :                 mem_ctx = state;
    2210             :         }
    2211             : 
    2212        4222 :         status = dcerpc_wbint_LookupUserAliases_r_recv(subreq, mem_ctx);
    2213        4222 :         TALLOC_FREE(subreq);
    2214        4222 :         if (tevent_req_nterror(req, status)) {
    2215           0 :                 return;
    2216             :         }
    2217             : 
    2218             :         /* Copy out parameters */
    2219        4222 :         *state->orig.out.rids = *state->tmp.out.rids;
    2220             : 
    2221             :         /* Copy result */
    2222        4222 :         state->orig.out.result = state->tmp.out.result;
    2223             : 
    2224             :         /* Reset temporary structure */
    2225        4222 :         NDR_ZERO_STRUCT(state->tmp);
    2226             : 
    2227        4222 :         tevent_req_done(req);
    2228             : }
    2229             : 
    2230        4222 : NTSTATUS dcerpc_wbint_LookupUserAliases_recv(struct tevent_req *req,
    2231             :                                              TALLOC_CTX *mem_ctx,
    2232             :                                              NTSTATUS *result)
    2233             : {
    2234        4222 :         struct dcerpc_wbint_LookupUserAliases_state *state = tevent_req_data(
    2235             :                 req, struct dcerpc_wbint_LookupUserAliases_state);
    2236           0 :         NTSTATUS status;
    2237             : 
    2238        4222 :         if (tevent_req_is_nterror(req, &status)) {
    2239           0 :                 tevent_req_received(req);
    2240           0 :                 return status;
    2241             :         }
    2242             : 
    2243             :         /* Steal possible out parameters to the callers context */
    2244        4222 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2245             : 
    2246             :         /* Return result */
    2247        4222 :         *result = state->orig.out.result;
    2248             : 
    2249        4222 :         tevent_req_received(req);
    2250        4222 :         return NT_STATUS_OK;
    2251             : }
    2252             : 
    2253           0 : NTSTATUS dcerpc_wbint_LookupUserAliases(struct dcerpc_binding_handle *h,
    2254             :                                         TALLOC_CTX *mem_ctx,
    2255             :                                         struct wbint_SidArray *_sids /* [in] [ref] */,
    2256             :                                         struct wbint_RidArray *_rids /* [out] [ref] */,
    2257             :                                         NTSTATUS *result)
    2258             : {
    2259           0 :         struct wbint_LookupUserAliases r;
    2260           0 :         NTSTATUS status;
    2261             : 
    2262             :         /* In parameters */
    2263           0 :         r.in.sids = _sids;
    2264             : 
    2265             :         /* Out parameters */
    2266           0 :         r.out.rids = _rids;
    2267             : 
    2268             :         /* Result */
    2269           0 :         NDR_ZERO_STRUCT(r.out.result);
    2270             : 
    2271           0 :         status = dcerpc_wbint_LookupUserAliases_r(h, mem_ctx, &r);
    2272           0 :         if (!NT_STATUS_IS_OK(status)) {
    2273           0 :                 return status;
    2274             :         }
    2275             : 
    2276             :         /* Return variables */
    2277           0 :         *_rids = *r.out.rids;
    2278             : 
    2279             :         /* Return result */
    2280           0 :         *result = r.out.result;
    2281             : 
    2282           0 :         return NT_STATUS_OK;
    2283             : }
    2284             : 
    2285             : struct dcerpc_wbint_LookupUserGroups_r_state {
    2286             :         TALLOC_CTX *out_mem_ctx;
    2287             : };
    2288             : 
    2289             : static void dcerpc_wbint_LookupUserGroups_r_done(struct tevent_req *subreq);
    2290             : 
    2291        2250 : struct tevent_req *dcerpc_wbint_LookupUserGroups_r_send(TALLOC_CTX *mem_ctx,
    2292             :         struct tevent_context *ev,
    2293             :         struct dcerpc_binding_handle *h,
    2294             :         struct wbint_LookupUserGroups *r)
    2295             : {
    2296           0 :         struct tevent_req *req;
    2297           0 :         struct dcerpc_wbint_LookupUserGroups_r_state *state;
    2298           0 :         struct tevent_req *subreq;
    2299             : 
    2300        2250 :         req = tevent_req_create(mem_ctx, &state,
    2301             :                                 struct dcerpc_wbint_LookupUserGroups_r_state);
    2302        2250 :         if (req == NULL) {
    2303           0 :                 return NULL;
    2304             :         }
    2305             : 
    2306        2250 :         state->out_mem_ctx = talloc_new(state);
    2307        2250 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2308           0 :                 return tevent_req_post(req, ev);
    2309             :         }
    2310             : 
    2311        2250 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2312             :                         NULL, &ndr_table_winbind,
    2313        2250 :                         NDR_WBINT_LOOKUPUSERGROUPS, state->out_mem_ctx, r);
    2314        2250 :         if (tevent_req_nomem(subreq, req)) {
    2315           0 :                 return tevent_req_post(req, ev);
    2316             :         }
    2317        2250 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupUserGroups_r_done, req);
    2318             : 
    2319        2250 :         return req;
    2320             : }
    2321             : 
    2322        2250 : static void dcerpc_wbint_LookupUserGroups_r_done(struct tevent_req *subreq)
    2323             : {
    2324           0 :         struct tevent_req *req =
    2325        2250 :                 tevent_req_callback_data(subreq,
    2326             :                 struct tevent_req);
    2327           0 :         NTSTATUS status;
    2328             : 
    2329        2250 :         status = dcerpc_binding_handle_call_recv(subreq);
    2330        2250 :         TALLOC_FREE(subreq);
    2331        2250 :         if (tevent_req_nterror(req, status)) {
    2332           0 :                 return;
    2333             :         }
    2334             : 
    2335        2250 :         tevent_req_done(req);
    2336             : }
    2337             : 
    2338        2250 : NTSTATUS dcerpc_wbint_LookupUserGroups_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2339             : {
    2340           0 :         struct dcerpc_wbint_LookupUserGroups_r_state *state =
    2341        2250 :                 tevent_req_data(req,
    2342             :                 struct dcerpc_wbint_LookupUserGroups_r_state);
    2343           0 :         NTSTATUS status;
    2344             : 
    2345        2250 :         if (tevent_req_is_nterror(req, &status)) {
    2346           0 :                 tevent_req_received(req);
    2347           0 :                 return status;
    2348             :         }
    2349             : 
    2350        2250 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2351             : 
    2352        2250 :         tevent_req_received(req);
    2353        2250 :         return NT_STATUS_OK;
    2354             : }
    2355             : 
    2356           0 : NTSTATUS dcerpc_wbint_LookupUserGroups_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupUserGroups *r)
    2357             : {
    2358           0 :         NTSTATUS status;
    2359             : 
    2360           0 :         status = dcerpc_binding_handle_call(h,
    2361             :                         NULL, &ndr_table_winbind,
    2362             :                         NDR_WBINT_LOOKUPUSERGROUPS, mem_ctx, r);
    2363             : 
    2364           0 :         return status;
    2365             : }
    2366             : 
    2367             : struct dcerpc_wbint_LookupUserGroups_state {
    2368             :         struct wbint_LookupUserGroups orig;
    2369             :         struct wbint_LookupUserGroups tmp;
    2370             :         TALLOC_CTX *out_mem_ctx;
    2371             : };
    2372             : 
    2373             : static void dcerpc_wbint_LookupUserGroups_done(struct tevent_req *subreq);
    2374             : 
    2375        2250 : struct tevent_req *dcerpc_wbint_LookupUserGroups_send(TALLOC_CTX *mem_ctx,
    2376             :                                                       struct tevent_context *ev,
    2377             :                                                       struct dcerpc_binding_handle *h,
    2378             :                                                       struct dom_sid *_sid /* [in] [ref] */,
    2379             :                                                       struct wbint_SidArray *_sids /* [out] [ref] */)
    2380             : {
    2381           0 :         struct tevent_req *req;
    2382           0 :         struct dcerpc_wbint_LookupUserGroups_state *state;
    2383           0 :         struct tevent_req *subreq;
    2384             : 
    2385        2250 :         req = tevent_req_create(mem_ctx, &state,
    2386             :                                 struct dcerpc_wbint_LookupUserGroups_state);
    2387        2250 :         if (req == NULL) {
    2388           0 :                 return NULL;
    2389             :         }
    2390        2250 :         state->out_mem_ctx = NULL;
    2391             : 
    2392             :         /* In parameters */
    2393        2250 :         state->orig.in.sid = _sid;
    2394             : 
    2395             :         /* Out parameters */
    2396        2250 :         state->orig.out.sids = _sids;
    2397             : 
    2398             :         /* Result */
    2399        2250 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2400             : 
    2401        2250 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2402             :                              "dcerpc_wbint_LookupUserGroups_out_memory");
    2403        2250 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2404           0 :                 return tevent_req_post(req, ev);
    2405             :         }
    2406             : 
    2407             :         /* make a temporary copy, that we pass to the dispatch function */
    2408        2250 :         state->tmp = state->orig;
    2409             : 
    2410        2250 :         subreq = dcerpc_wbint_LookupUserGroups_r_send(state, ev, h, &state->tmp);
    2411        2250 :         if (tevent_req_nomem(subreq, req)) {
    2412           0 :                 return tevent_req_post(req, ev);
    2413             :         }
    2414        2250 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupUserGroups_done, req);
    2415        2250 :         return req;
    2416             : }
    2417             : 
    2418        2250 : static void dcerpc_wbint_LookupUserGroups_done(struct tevent_req *subreq)
    2419             : {
    2420        2250 :         struct tevent_req *req = tevent_req_callback_data(
    2421             :                 subreq, struct tevent_req);
    2422        2250 :         struct dcerpc_wbint_LookupUserGroups_state *state = tevent_req_data(
    2423             :                 req, struct dcerpc_wbint_LookupUserGroups_state);
    2424           0 :         NTSTATUS status;
    2425           0 :         TALLOC_CTX *mem_ctx;
    2426             : 
    2427        2250 :         if (state->out_mem_ctx) {
    2428        2250 :                 mem_ctx = state->out_mem_ctx;
    2429             :         } else {
    2430           0 :                 mem_ctx = state;
    2431             :         }
    2432             : 
    2433        2250 :         status = dcerpc_wbint_LookupUserGroups_r_recv(subreq, mem_ctx);
    2434        2250 :         TALLOC_FREE(subreq);
    2435        2250 :         if (tevent_req_nterror(req, status)) {
    2436           0 :                 return;
    2437             :         }
    2438             : 
    2439             :         /* Copy out parameters */
    2440        2250 :         *state->orig.out.sids = *state->tmp.out.sids;
    2441             : 
    2442             :         /* Copy result */
    2443        2250 :         state->orig.out.result = state->tmp.out.result;
    2444             : 
    2445             :         /* Reset temporary structure */
    2446        2250 :         NDR_ZERO_STRUCT(state->tmp);
    2447             : 
    2448        2250 :         tevent_req_done(req);
    2449             : }
    2450             : 
    2451        2250 : NTSTATUS dcerpc_wbint_LookupUserGroups_recv(struct tevent_req *req,
    2452             :                                             TALLOC_CTX *mem_ctx,
    2453             :                                             NTSTATUS *result)
    2454             : {
    2455        2250 :         struct dcerpc_wbint_LookupUserGroups_state *state = tevent_req_data(
    2456             :                 req, struct dcerpc_wbint_LookupUserGroups_state);
    2457           0 :         NTSTATUS status;
    2458             : 
    2459        2250 :         if (tevent_req_is_nterror(req, &status)) {
    2460           0 :                 tevent_req_received(req);
    2461           0 :                 return status;
    2462             :         }
    2463             : 
    2464             :         /* Steal possible out parameters to the callers context */
    2465        2250 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2466             : 
    2467             :         /* Return result */
    2468        2250 :         *result = state->orig.out.result;
    2469             : 
    2470        2250 :         tevent_req_received(req);
    2471        2250 :         return NT_STATUS_OK;
    2472             : }
    2473             : 
    2474           0 : NTSTATUS dcerpc_wbint_LookupUserGroups(struct dcerpc_binding_handle *h,
    2475             :                                        TALLOC_CTX *mem_ctx,
    2476             :                                        struct dom_sid *_sid /* [in] [ref] */,
    2477             :                                        struct wbint_SidArray *_sids /* [out] [ref] */,
    2478             :                                        NTSTATUS *result)
    2479             : {
    2480           0 :         struct wbint_LookupUserGroups r;
    2481           0 :         NTSTATUS status;
    2482             : 
    2483             :         /* In parameters */
    2484           0 :         r.in.sid = _sid;
    2485             : 
    2486             :         /* Out parameters */
    2487           0 :         r.out.sids = _sids;
    2488             : 
    2489             :         /* Result */
    2490           0 :         NDR_ZERO_STRUCT(r.out.result);
    2491             : 
    2492           0 :         status = dcerpc_wbint_LookupUserGroups_r(h, mem_ctx, &r);
    2493           0 :         if (!NT_STATUS_IS_OK(status)) {
    2494           0 :                 return status;
    2495             :         }
    2496             : 
    2497             :         /* Return variables */
    2498           0 :         *_sids = *r.out.sids;
    2499             : 
    2500             :         /* Return result */
    2501           0 :         *result = r.out.result;
    2502             : 
    2503           0 :         return NT_STATUS_OK;
    2504             : }
    2505             : 
    2506             : struct dcerpc_wbint_QuerySequenceNumber_r_state {
    2507             :         TALLOC_CTX *out_mem_ctx;
    2508             : };
    2509             : 
    2510             : static void dcerpc_wbint_QuerySequenceNumber_r_done(struct tevent_req *subreq);
    2511             : 
    2512          32 : struct tevent_req *dcerpc_wbint_QuerySequenceNumber_r_send(TALLOC_CTX *mem_ctx,
    2513             :         struct tevent_context *ev,
    2514             :         struct dcerpc_binding_handle *h,
    2515             :         struct wbint_QuerySequenceNumber *r)
    2516             : {
    2517           0 :         struct tevent_req *req;
    2518           0 :         struct dcerpc_wbint_QuerySequenceNumber_r_state *state;
    2519           0 :         struct tevent_req *subreq;
    2520             : 
    2521          32 :         req = tevent_req_create(mem_ctx, &state,
    2522             :                                 struct dcerpc_wbint_QuerySequenceNumber_r_state);
    2523          32 :         if (req == NULL) {
    2524           0 :                 return NULL;
    2525             :         }
    2526             : 
    2527          32 :         state->out_mem_ctx = talloc_new(state);
    2528          32 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2529           0 :                 return tevent_req_post(req, ev);
    2530             :         }
    2531             : 
    2532          32 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2533             :                         NULL, &ndr_table_winbind,
    2534          32 :                         NDR_WBINT_QUERYSEQUENCENUMBER, state->out_mem_ctx, r);
    2535          32 :         if (tevent_req_nomem(subreq, req)) {
    2536           0 :                 return tevent_req_post(req, ev);
    2537             :         }
    2538          32 :         tevent_req_set_callback(subreq, dcerpc_wbint_QuerySequenceNumber_r_done, req);
    2539             : 
    2540          32 :         return req;
    2541             : }
    2542             : 
    2543          32 : static void dcerpc_wbint_QuerySequenceNumber_r_done(struct tevent_req *subreq)
    2544             : {
    2545           0 :         struct tevent_req *req =
    2546          32 :                 tevent_req_callback_data(subreq,
    2547             :                 struct tevent_req);
    2548           0 :         NTSTATUS status;
    2549             : 
    2550          32 :         status = dcerpc_binding_handle_call_recv(subreq);
    2551          32 :         TALLOC_FREE(subreq);
    2552          32 :         if (tevent_req_nterror(req, status)) {
    2553           0 :                 return;
    2554             :         }
    2555             : 
    2556          32 :         tevent_req_done(req);
    2557             : }
    2558             : 
    2559          32 : NTSTATUS dcerpc_wbint_QuerySequenceNumber_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2560             : {
    2561           0 :         struct dcerpc_wbint_QuerySequenceNumber_r_state *state =
    2562          32 :                 tevent_req_data(req,
    2563             :                 struct dcerpc_wbint_QuerySequenceNumber_r_state);
    2564           0 :         NTSTATUS status;
    2565             : 
    2566          32 :         if (tevent_req_is_nterror(req, &status)) {
    2567           0 :                 tevent_req_received(req);
    2568           0 :                 return status;
    2569             :         }
    2570             : 
    2571          32 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2572             : 
    2573          32 :         tevent_req_received(req);
    2574          32 :         return NT_STATUS_OK;
    2575             : }
    2576             : 
    2577           0 : NTSTATUS dcerpc_wbint_QuerySequenceNumber_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_QuerySequenceNumber *r)
    2578             : {
    2579           0 :         NTSTATUS status;
    2580             : 
    2581           0 :         status = dcerpc_binding_handle_call(h,
    2582             :                         NULL, &ndr_table_winbind,
    2583             :                         NDR_WBINT_QUERYSEQUENCENUMBER, mem_ctx, r);
    2584             : 
    2585           0 :         return status;
    2586             : }
    2587             : 
    2588             : struct dcerpc_wbint_QuerySequenceNumber_state {
    2589             :         struct wbint_QuerySequenceNumber orig;
    2590             :         struct wbint_QuerySequenceNumber tmp;
    2591             :         TALLOC_CTX *out_mem_ctx;
    2592             : };
    2593             : 
    2594             : static void dcerpc_wbint_QuerySequenceNumber_done(struct tevent_req *subreq);
    2595             : 
    2596          32 : struct tevent_req *dcerpc_wbint_QuerySequenceNumber_send(TALLOC_CTX *mem_ctx,
    2597             :                                                          struct tevent_context *ev,
    2598             :                                                          struct dcerpc_binding_handle *h,
    2599             :                                                          uint32_t *_sequence /* [out] [ref] */)
    2600             : {
    2601           0 :         struct tevent_req *req;
    2602           0 :         struct dcerpc_wbint_QuerySequenceNumber_state *state;
    2603           0 :         struct tevent_req *subreq;
    2604             : 
    2605          32 :         req = tevent_req_create(mem_ctx, &state,
    2606             :                                 struct dcerpc_wbint_QuerySequenceNumber_state);
    2607          32 :         if (req == NULL) {
    2608           0 :                 return NULL;
    2609             :         }
    2610          32 :         state->out_mem_ctx = NULL;
    2611             : 
    2612             :         /* In parameters */
    2613             : 
    2614             :         /* Out parameters */
    2615          32 :         state->orig.out.sequence = _sequence;
    2616             : 
    2617             :         /* Result */
    2618          32 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2619             : 
    2620          32 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2621             :                              "dcerpc_wbint_QuerySequenceNumber_out_memory");
    2622          32 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2623           0 :                 return tevent_req_post(req, ev);
    2624             :         }
    2625             : 
    2626             :         /* make a temporary copy, that we pass to the dispatch function */
    2627          32 :         state->tmp = state->orig;
    2628             : 
    2629          32 :         subreq = dcerpc_wbint_QuerySequenceNumber_r_send(state, ev, h, &state->tmp);
    2630          32 :         if (tevent_req_nomem(subreq, req)) {
    2631           0 :                 return tevent_req_post(req, ev);
    2632             :         }
    2633          32 :         tevent_req_set_callback(subreq, dcerpc_wbint_QuerySequenceNumber_done, req);
    2634          32 :         return req;
    2635             : }
    2636             : 
    2637          32 : static void dcerpc_wbint_QuerySequenceNumber_done(struct tevent_req *subreq)
    2638             : {
    2639          32 :         struct tevent_req *req = tevent_req_callback_data(
    2640             :                 subreq, struct tevent_req);
    2641          32 :         struct dcerpc_wbint_QuerySequenceNumber_state *state = tevent_req_data(
    2642             :                 req, struct dcerpc_wbint_QuerySequenceNumber_state);
    2643           0 :         NTSTATUS status;
    2644           0 :         TALLOC_CTX *mem_ctx;
    2645             : 
    2646          32 :         if (state->out_mem_ctx) {
    2647          32 :                 mem_ctx = state->out_mem_ctx;
    2648             :         } else {
    2649           0 :                 mem_ctx = state;
    2650             :         }
    2651             : 
    2652          32 :         status = dcerpc_wbint_QuerySequenceNumber_r_recv(subreq, mem_ctx);
    2653          32 :         TALLOC_FREE(subreq);
    2654          32 :         if (tevent_req_nterror(req, status)) {
    2655           0 :                 return;
    2656             :         }
    2657             : 
    2658             :         /* Copy out parameters */
    2659          32 :         *state->orig.out.sequence = *state->tmp.out.sequence;
    2660             : 
    2661             :         /* Copy result */
    2662          32 :         state->orig.out.result = state->tmp.out.result;
    2663             : 
    2664             :         /* Reset temporary structure */
    2665          32 :         NDR_ZERO_STRUCT(state->tmp);
    2666             : 
    2667          32 :         tevent_req_done(req);
    2668             : }
    2669             : 
    2670          32 : NTSTATUS dcerpc_wbint_QuerySequenceNumber_recv(struct tevent_req *req,
    2671             :                                                TALLOC_CTX *mem_ctx,
    2672             :                                                NTSTATUS *result)
    2673             : {
    2674          32 :         struct dcerpc_wbint_QuerySequenceNumber_state *state = tevent_req_data(
    2675             :                 req, struct dcerpc_wbint_QuerySequenceNumber_state);
    2676           0 :         NTSTATUS status;
    2677             : 
    2678          32 :         if (tevent_req_is_nterror(req, &status)) {
    2679           0 :                 tevent_req_received(req);
    2680           0 :                 return status;
    2681             :         }
    2682             : 
    2683             :         /* Steal possible out parameters to the callers context */
    2684          32 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2685             : 
    2686             :         /* Return result */
    2687          32 :         *result = state->orig.out.result;
    2688             : 
    2689          32 :         tevent_req_received(req);
    2690          32 :         return NT_STATUS_OK;
    2691             : }
    2692             : 
    2693           0 : NTSTATUS dcerpc_wbint_QuerySequenceNumber(struct dcerpc_binding_handle *h,
    2694             :                                           TALLOC_CTX *mem_ctx,
    2695             :                                           uint32_t *_sequence /* [out] [ref] */,
    2696             :                                           NTSTATUS *result)
    2697             : {
    2698           0 :         struct wbint_QuerySequenceNumber r;
    2699           0 :         NTSTATUS status;
    2700             : 
    2701             :         /* In parameters */
    2702             : 
    2703             :         /* Out parameters */
    2704           0 :         r.out.sequence = _sequence;
    2705             : 
    2706             :         /* Result */
    2707           0 :         NDR_ZERO_STRUCT(r.out.result);
    2708             : 
    2709           0 :         status = dcerpc_wbint_QuerySequenceNumber_r(h, mem_ctx, &r);
    2710           0 :         if (!NT_STATUS_IS_OK(status)) {
    2711           0 :                 return status;
    2712             :         }
    2713             : 
    2714             :         /* Return variables */
    2715           0 :         *_sequence = *r.out.sequence;
    2716             : 
    2717             :         /* Return result */
    2718           0 :         *result = r.out.result;
    2719             : 
    2720           0 :         return NT_STATUS_OK;
    2721             : }
    2722             : 
    2723             : struct dcerpc_wbint_LookupGroupMembers_r_state {
    2724             :         TALLOC_CTX *out_mem_ctx;
    2725             : };
    2726             : 
    2727             : static void dcerpc_wbint_LookupGroupMembers_r_done(struct tevent_req *subreq);
    2728             : 
    2729          12 : struct tevent_req *dcerpc_wbint_LookupGroupMembers_r_send(TALLOC_CTX *mem_ctx,
    2730             :         struct tevent_context *ev,
    2731             :         struct dcerpc_binding_handle *h,
    2732             :         struct wbint_LookupGroupMembers *r)
    2733             : {
    2734           0 :         struct tevent_req *req;
    2735           0 :         struct dcerpc_wbint_LookupGroupMembers_r_state *state;
    2736           0 :         struct tevent_req *subreq;
    2737             : 
    2738          12 :         req = tevent_req_create(mem_ctx, &state,
    2739             :                                 struct dcerpc_wbint_LookupGroupMembers_r_state);
    2740          12 :         if (req == NULL) {
    2741           0 :                 return NULL;
    2742             :         }
    2743             : 
    2744          12 :         state->out_mem_ctx = talloc_new(state);
    2745          12 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2746           0 :                 return tevent_req_post(req, ev);
    2747             :         }
    2748             : 
    2749          12 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2750             :                         NULL, &ndr_table_winbind,
    2751          12 :                         NDR_WBINT_LOOKUPGROUPMEMBERS, state->out_mem_ctx, r);
    2752          12 :         if (tevent_req_nomem(subreq, req)) {
    2753           0 :                 return tevent_req_post(req, ev);
    2754             :         }
    2755          12 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupGroupMembers_r_done, req);
    2756             : 
    2757          12 :         return req;
    2758             : }
    2759             : 
    2760          12 : static void dcerpc_wbint_LookupGroupMembers_r_done(struct tevent_req *subreq)
    2761             : {
    2762           0 :         struct tevent_req *req =
    2763          12 :                 tevent_req_callback_data(subreq,
    2764             :                 struct tevent_req);
    2765           0 :         NTSTATUS status;
    2766             : 
    2767          12 :         status = dcerpc_binding_handle_call_recv(subreq);
    2768          12 :         TALLOC_FREE(subreq);
    2769          12 :         if (tevent_req_nterror(req, status)) {
    2770           0 :                 return;
    2771             :         }
    2772             : 
    2773          12 :         tevent_req_done(req);
    2774             : }
    2775             : 
    2776          12 : NTSTATUS dcerpc_wbint_LookupGroupMembers_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2777             : {
    2778           0 :         struct dcerpc_wbint_LookupGroupMembers_r_state *state =
    2779          12 :                 tevent_req_data(req,
    2780             :                 struct dcerpc_wbint_LookupGroupMembers_r_state);
    2781           0 :         NTSTATUS status;
    2782             : 
    2783          12 :         if (tevent_req_is_nterror(req, &status)) {
    2784           0 :                 tevent_req_received(req);
    2785           0 :                 return status;
    2786             :         }
    2787             : 
    2788          12 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2789             : 
    2790          12 :         tevent_req_received(req);
    2791          12 :         return NT_STATUS_OK;
    2792             : }
    2793             : 
    2794           0 : NTSTATUS dcerpc_wbint_LookupGroupMembers_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupGroupMembers *r)
    2795             : {
    2796           0 :         NTSTATUS status;
    2797             : 
    2798           0 :         status = dcerpc_binding_handle_call(h,
    2799             :                         NULL, &ndr_table_winbind,
    2800             :                         NDR_WBINT_LOOKUPGROUPMEMBERS, mem_ctx, r);
    2801             : 
    2802           0 :         return status;
    2803             : }
    2804             : 
    2805             : struct dcerpc_wbint_LookupGroupMembers_state {
    2806             :         struct wbint_LookupGroupMembers orig;
    2807             :         struct wbint_LookupGroupMembers tmp;
    2808             :         TALLOC_CTX *out_mem_ctx;
    2809             : };
    2810             : 
    2811             : static void dcerpc_wbint_LookupGroupMembers_done(struct tevent_req *subreq);
    2812             : 
    2813          12 : struct tevent_req *dcerpc_wbint_LookupGroupMembers_send(TALLOC_CTX *mem_ctx,
    2814             :                                                         struct tevent_context *ev,
    2815             :                                                         struct dcerpc_binding_handle *h,
    2816             :                                                         struct dom_sid *_sid /* [in] [ref] */,
    2817             :                                                         enum lsa_SidType _type /* [in]  */,
    2818             :                                                         struct wbint_Principals *_members /* [out] [ref] */)
    2819             : {
    2820           0 :         struct tevent_req *req;
    2821           0 :         struct dcerpc_wbint_LookupGroupMembers_state *state;
    2822           0 :         struct tevent_req *subreq;
    2823             : 
    2824          12 :         req = tevent_req_create(mem_ctx, &state,
    2825             :                                 struct dcerpc_wbint_LookupGroupMembers_state);
    2826          12 :         if (req == NULL) {
    2827           0 :                 return NULL;
    2828             :         }
    2829          12 :         state->out_mem_ctx = NULL;
    2830             : 
    2831             :         /* In parameters */
    2832          12 :         state->orig.in.sid = _sid;
    2833          12 :         state->orig.in.type = _type;
    2834             : 
    2835             :         /* Out parameters */
    2836          12 :         state->orig.out.members = _members;
    2837             : 
    2838             :         /* Result */
    2839          12 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2840             : 
    2841          12 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2842             :                              "dcerpc_wbint_LookupGroupMembers_out_memory");
    2843          12 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2844           0 :                 return tevent_req_post(req, ev);
    2845             :         }
    2846             : 
    2847             :         /* make a temporary copy, that we pass to the dispatch function */
    2848          12 :         state->tmp = state->orig;
    2849             : 
    2850          12 :         subreq = dcerpc_wbint_LookupGroupMembers_r_send(state, ev, h, &state->tmp);
    2851          12 :         if (tevent_req_nomem(subreq, req)) {
    2852           0 :                 return tevent_req_post(req, ev);
    2853             :         }
    2854          12 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupGroupMembers_done, req);
    2855          12 :         return req;
    2856             : }
    2857             : 
    2858          12 : static void dcerpc_wbint_LookupGroupMembers_done(struct tevent_req *subreq)
    2859             : {
    2860          12 :         struct tevent_req *req = tevent_req_callback_data(
    2861             :                 subreq, struct tevent_req);
    2862          12 :         struct dcerpc_wbint_LookupGroupMembers_state *state = tevent_req_data(
    2863             :                 req, struct dcerpc_wbint_LookupGroupMembers_state);
    2864           0 :         NTSTATUS status;
    2865           0 :         TALLOC_CTX *mem_ctx;
    2866             : 
    2867          12 :         if (state->out_mem_ctx) {
    2868          12 :                 mem_ctx = state->out_mem_ctx;
    2869             :         } else {
    2870           0 :                 mem_ctx = state;
    2871             :         }
    2872             : 
    2873          12 :         status = dcerpc_wbint_LookupGroupMembers_r_recv(subreq, mem_ctx);
    2874          12 :         TALLOC_FREE(subreq);
    2875          12 :         if (tevent_req_nterror(req, status)) {
    2876           0 :                 return;
    2877             :         }
    2878             : 
    2879             :         /* Copy out parameters */
    2880          12 :         *state->orig.out.members = *state->tmp.out.members;
    2881             : 
    2882             :         /* Copy result */
    2883          12 :         state->orig.out.result = state->tmp.out.result;
    2884             : 
    2885             :         /* Reset temporary structure */
    2886          12 :         NDR_ZERO_STRUCT(state->tmp);
    2887             : 
    2888          12 :         tevent_req_done(req);
    2889             : }
    2890             : 
    2891          12 : NTSTATUS dcerpc_wbint_LookupGroupMembers_recv(struct tevent_req *req,
    2892             :                                               TALLOC_CTX *mem_ctx,
    2893             :                                               NTSTATUS *result)
    2894             : {
    2895          12 :         struct dcerpc_wbint_LookupGroupMembers_state *state = tevent_req_data(
    2896             :                 req, struct dcerpc_wbint_LookupGroupMembers_state);
    2897           0 :         NTSTATUS status;
    2898             : 
    2899          12 :         if (tevent_req_is_nterror(req, &status)) {
    2900           0 :                 tevent_req_received(req);
    2901           0 :                 return status;
    2902             :         }
    2903             : 
    2904             :         /* Steal possible out parameters to the callers context */
    2905          12 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2906             : 
    2907             :         /* Return result */
    2908          12 :         *result = state->orig.out.result;
    2909             : 
    2910          12 :         tevent_req_received(req);
    2911          12 :         return NT_STATUS_OK;
    2912             : }
    2913             : 
    2914           0 : NTSTATUS dcerpc_wbint_LookupGroupMembers(struct dcerpc_binding_handle *h,
    2915             :                                          TALLOC_CTX *mem_ctx,
    2916             :                                          struct dom_sid *_sid /* [in] [ref] */,
    2917             :                                          enum lsa_SidType _type /* [in]  */,
    2918             :                                          struct wbint_Principals *_members /* [out] [ref] */,
    2919             :                                          NTSTATUS *result)
    2920             : {
    2921           0 :         struct wbint_LookupGroupMembers r;
    2922           0 :         NTSTATUS status;
    2923             : 
    2924             :         /* In parameters */
    2925           0 :         r.in.sid = _sid;
    2926           0 :         r.in.type = _type;
    2927             : 
    2928             :         /* Out parameters */
    2929           0 :         r.out.members = _members;
    2930             : 
    2931             :         /* Result */
    2932           0 :         NDR_ZERO_STRUCT(r.out.result);
    2933             : 
    2934           0 :         status = dcerpc_wbint_LookupGroupMembers_r(h, mem_ctx, &r);
    2935           0 :         if (!NT_STATUS_IS_OK(status)) {
    2936           0 :                 return status;
    2937             :         }
    2938             : 
    2939             :         /* Return variables */
    2940           0 :         *_members = *r.out.members;
    2941             : 
    2942             :         /* Return result */
    2943           0 :         *result = r.out.result;
    2944             : 
    2945           0 :         return NT_STATUS_OK;
    2946             : }
    2947             : 
    2948             : struct dcerpc_wbint_LookupAliasMembers_r_state {
    2949             :         TALLOC_CTX *out_mem_ctx;
    2950             : };
    2951             : 
    2952             : static void dcerpc_wbint_LookupAliasMembers_r_done(struct tevent_req *subreq);
    2953             : 
    2954           2 : struct tevent_req *dcerpc_wbint_LookupAliasMembers_r_send(TALLOC_CTX *mem_ctx,
    2955             :         struct tevent_context *ev,
    2956             :         struct dcerpc_binding_handle *h,
    2957             :         struct wbint_LookupAliasMembers *r)
    2958             : {
    2959           0 :         struct tevent_req *req;
    2960           0 :         struct dcerpc_wbint_LookupAliasMembers_r_state *state;
    2961           0 :         struct tevent_req *subreq;
    2962             : 
    2963           2 :         req = tevent_req_create(mem_ctx, &state,
    2964             :                                 struct dcerpc_wbint_LookupAliasMembers_r_state);
    2965           2 :         if (req == NULL) {
    2966           0 :                 return NULL;
    2967             :         }
    2968             : 
    2969           2 :         state->out_mem_ctx = talloc_new(state);
    2970           2 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2971           0 :                 return tevent_req_post(req, ev);
    2972             :         }
    2973             : 
    2974           2 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2975             :                         NULL, &ndr_table_winbind,
    2976           2 :                         NDR_WBINT_LOOKUPALIASMEMBERS, state->out_mem_ctx, r);
    2977           2 :         if (tevent_req_nomem(subreq, req)) {
    2978           0 :                 return tevent_req_post(req, ev);
    2979             :         }
    2980           2 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupAliasMembers_r_done, req);
    2981             : 
    2982           2 :         return req;
    2983             : }
    2984             : 
    2985           2 : static void dcerpc_wbint_LookupAliasMembers_r_done(struct tevent_req *subreq)
    2986             : {
    2987           0 :         struct tevent_req *req =
    2988           2 :                 tevent_req_callback_data(subreq,
    2989             :                 struct tevent_req);
    2990           0 :         NTSTATUS status;
    2991             : 
    2992           2 :         status = dcerpc_binding_handle_call_recv(subreq);
    2993           2 :         TALLOC_FREE(subreq);
    2994           2 :         if (tevent_req_nterror(req, status)) {
    2995           0 :                 return;
    2996             :         }
    2997             : 
    2998           2 :         tevent_req_done(req);
    2999             : }
    3000             : 
    3001           2 : NTSTATUS dcerpc_wbint_LookupAliasMembers_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3002             : {
    3003           0 :         struct dcerpc_wbint_LookupAliasMembers_r_state *state =
    3004           2 :                 tevent_req_data(req,
    3005             :                 struct dcerpc_wbint_LookupAliasMembers_r_state);
    3006           0 :         NTSTATUS status;
    3007             : 
    3008           2 :         if (tevent_req_is_nterror(req, &status)) {
    3009           0 :                 tevent_req_received(req);
    3010           0 :                 return status;
    3011             :         }
    3012             : 
    3013           2 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3014             : 
    3015           2 :         tevent_req_received(req);
    3016           2 :         return NT_STATUS_OK;
    3017             : }
    3018             : 
    3019           0 : NTSTATUS dcerpc_wbint_LookupAliasMembers_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupAliasMembers *r)
    3020             : {
    3021           0 :         NTSTATUS status;
    3022             : 
    3023           0 :         status = dcerpc_binding_handle_call(h,
    3024             :                         NULL, &ndr_table_winbind,
    3025             :                         NDR_WBINT_LOOKUPALIASMEMBERS, mem_ctx, r);
    3026             : 
    3027           0 :         return status;
    3028             : }
    3029             : 
    3030             : struct dcerpc_wbint_LookupAliasMembers_state {
    3031             :         struct wbint_LookupAliasMembers orig;
    3032             :         struct wbint_LookupAliasMembers tmp;
    3033             :         TALLOC_CTX *out_mem_ctx;
    3034             : };
    3035             : 
    3036             : static void dcerpc_wbint_LookupAliasMembers_done(struct tevent_req *subreq);
    3037             : 
    3038           2 : struct tevent_req *dcerpc_wbint_LookupAliasMembers_send(TALLOC_CTX *mem_ctx,
    3039             :                                                         struct tevent_context *ev,
    3040             :                                                         struct dcerpc_binding_handle *h,
    3041             :                                                         struct dom_sid *_sid /* [in] [ref] */,
    3042             :                                                         enum lsa_SidType _type /* [in]  */,
    3043             :                                                         struct wbint_SidArray *_sids /* [out] [ref] */)
    3044             : {
    3045           0 :         struct tevent_req *req;
    3046           0 :         struct dcerpc_wbint_LookupAliasMembers_state *state;
    3047           0 :         struct tevent_req *subreq;
    3048             : 
    3049           2 :         req = tevent_req_create(mem_ctx, &state,
    3050             :                                 struct dcerpc_wbint_LookupAliasMembers_state);
    3051           2 :         if (req == NULL) {
    3052           0 :                 return NULL;
    3053             :         }
    3054           2 :         state->out_mem_ctx = NULL;
    3055             : 
    3056             :         /* In parameters */
    3057           2 :         state->orig.in.sid = _sid;
    3058           2 :         state->orig.in.type = _type;
    3059             : 
    3060             :         /* Out parameters */
    3061           2 :         state->orig.out.sids = _sids;
    3062             : 
    3063             :         /* Result */
    3064           2 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3065             : 
    3066           2 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3067             :                              "dcerpc_wbint_LookupAliasMembers_out_memory");
    3068           2 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3069           0 :                 return tevent_req_post(req, ev);
    3070             :         }
    3071             : 
    3072             :         /* make a temporary copy, that we pass to the dispatch function */
    3073           2 :         state->tmp = state->orig;
    3074             : 
    3075           2 :         subreq = dcerpc_wbint_LookupAliasMembers_r_send(state, ev, h, &state->tmp);
    3076           2 :         if (tevent_req_nomem(subreq, req)) {
    3077           0 :                 return tevent_req_post(req, ev);
    3078             :         }
    3079           2 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupAliasMembers_done, req);
    3080           2 :         return req;
    3081             : }
    3082             : 
    3083           2 : static void dcerpc_wbint_LookupAliasMembers_done(struct tevent_req *subreq)
    3084             : {
    3085           2 :         struct tevent_req *req = tevent_req_callback_data(
    3086             :                 subreq, struct tevent_req);
    3087           2 :         struct dcerpc_wbint_LookupAliasMembers_state *state = tevent_req_data(
    3088             :                 req, struct dcerpc_wbint_LookupAliasMembers_state);
    3089           0 :         NTSTATUS status;
    3090           0 :         TALLOC_CTX *mem_ctx;
    3091             : 
    3092           2 :         if (state->out_mem_ctx) {
    3093           2 :                 mem_ctx = state->out_mem_ctx;
    3094             :         } else {
    3095           0 :                 mem_ctx = state;
    3096             :         }
    3097             : 
    3098           2 :         status = dcerpc_wbint_LookupAliasMembers_r_recv(subreq, mem_ctx);
    3099           2 :         TALLOC_FREE(subreq);
    3100           2 :         if (tevent_req_nterror(req, status)) {
    3101           0 :                 return;
    3102             :         }
    3103             : 
    3104             :         /* Copy out parameters */
    3105           2 :         *state->orig.out.sids = *state->tmp.out.sids;
    3106             : 
    3107             :         /* Copy result */
    3108           2 :         state->orig.out.result = state->tmp.out.result;
    3109             : 
    3110             :         /* Reset temporary structure */
    3111           2 :         NDR_ZERO_STRUCT(state->tmp);
    3112             : 
    3113           2 :         tevent_req_done(req);
    3114             : }
    3115             : 
    3116           2 : NTSTATUS dcerpc_wbint_LookupAliasMembers_recv(struct tevent_req *req,
    3117             :                                               TALLOC_CTX *mem_ctx,
    3118             :                                               NTSTATUS *result)
    3119             : {
    3120           2 :         struct dcerpc_wbint_LookupAliasMembers_state *state = tevent_req_data(
    3121             :                 req, struct dcerpc_wbint_LookupAliasMembers_state);
    3122           0 :         NTSTATUS status;
    3123             : 
    3124           2 :         if (tevent_req_is_nterror(req, &status)) {
    3125           0 :                 tevent_req_received(req);
    3126           0 :                 return status;
    3127             :         }
    3128             : 
    3129             :         /* Steal possible out parameters to the callers context */
    3130           2 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3131             : 
    3132             :         /* Return result */
    3133           2 :         *result = state->orig.out.result;
    3134             : 
    3135           2 :         tevent_req_received(req);
    3136           2 :         return NT_STATUS_OK;
    3137             : }
    3138             : 
    3139           0 : NTSTATUS dcerpc_wbint_LookupAliasMembers(struct dcerpc_binding_handle *h,
    3140             :                                          TALLOC_CTX *mem_ctx,
    3141             :                                          struct dom_sid *_sid /* [in] [ref] */,
    3142             :                                          enum lsa_SidType _type /* [in]  */,
    3143             :                                          struct wbint_SidArray *_sids /* [out] [ref] */,
    3144             :                                          NTSTATUS *result)
    3145             : {
    3146           0 :         struct wbint_LookupAliasMembers r;
    3147           0 :         NTSTATUS status;
    3148             : 
    3149             :         /* In parameters */
    3150           0 :         r.in.sid = _sid;
    3151           0 :         r.in.type = _type;
    3152             : 
    3153             :         /* Out parameters */
    3154           0 :         r.out.sids = _sids;
    3155             : 
    3156             :         /* Result */
    3157           0 :         NDR_ZERO_STRUCT(r.out.result);
    3158             : 
    3159           0 :         status = dcerpc_wbint_LookupAliasMembers_r(h, mem_ctx, &r);
    3160           0 :         if (!NT_STATUS_IS_OK(status)) {
    3161           0 :                 return status;
    3162             :         }
    3163             : 
    3164             :         /* Return variables */
    3165           0 :         *_sids = *r.out.sids;
    3166             : 
    3167             :         /* Return result */
    3168           0 :         *result = r.out.result;
    3169             : 
    3170           0 :         return NT_STATUS_OK;
    3171             : }
    3172             : 
    3173             : struct dcerpc_wbint_QueryGroupList_r_state {
    3174             :         TALLOC_CTX *out_mem_ctx;
    3175             : };
    3176             : 
    3177             : static void dcerpc_wbint_QueryGroupList_r_done(struct tevent_req *subreq);
    3178             : 
    3179         112 : struct tevent_req *dcerpc_wbint_QueryGroupList_r_send(TALLOC_CTX *mem_ctx,
    3180             :         struct tevent_context *ev,
    3181             :         struct dcerpc_binding_handle *h,
    3182             :         struct wbint_QueryGroupList *r)
    3183             : {
    3184           0 :         struct tevent_req *req;
    3185           0 :         struct dcerpc_wbint_QueryGroupList_r_state *state;
    3186           0 :         struct tevent_req *subreq;
    3187             : 
    3188         112 :         req = tevent_req_create(mem_ctx, &state,
    3189             :                                 struct dcerpc_wbint_QueryGroupList_r_state);
    3190         112 :         if (req == NULL) {
    3191           0 :                 return NULL;
    3192             :         }
    3193             : 
    3194         112 :         state->out_mem_ctx = talloc_new(state);
    3195         112 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3196           0 :                 return tevent_req_post(req, ev);
    3197             :         }
    3198             : 
    3199         112 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3200             :                         NULL, &ndr_table_winbind,
    3201         112 :                         NDR_WBINT_QUERYGROUPLIST, state->out_mem_ctx, r);
    3202         112 :         if (tevent_req_nomem(subreq, req)) {
    3203           0 :                 return tevent_req_post(req, ev);
    3204             :         }
    3205         112 :         tevent_req_set_callback(subreq, dcerpc_wbint_QueryGroupList_r_done, req);
    3206             : 
    3207         112 :         return req;
    3208             : }
    3209             : 
    3210         112 : static void dcerpc_wbint_QueryGroupList_r_done(struct tevent_req *subreq)
    3211             : {
    3212           0 :         struct tevent_req *req =
    3213         112 :                 tevent_req_callback_data(subreq,
    3214             :                 struct tevent_req);
    3215           0 :         NTSTATUS status;
    3216             : 
    3217         112 :         status = dcerpc_binding_handle_call_recv(subreq);
    3218         112 :         TALLOC_FREE(subreq);
    3219         112 :         if (tevent_req_nterror(req, status)) {
    3220           0 :                 return;
    3221             :         }
    3222             : 
    3223         112 :         tevent_req_done(req);
    3224             : }
    3225             : 
    3226         112 : NTSTATUS dcerpc_wbint_QueryGroupList_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3227             : {
    3228           0 :         struct dcerpc_wbint_QueryGroupList_r_state *state =
    3229         112 :                 tevent_req_data(req,
    3230             :                 struct dcerpc_wbint_QueryGroupList_r_state);
    3231           0 :         NTSTATUS status;
    3232             : 
    3233         112 :         if (tevent_req_is_nterror(req, &status)) {
    3234           0 :                 tevent_req_received(req);
    3235           0 :                 return status;
    3236             :         }
    3237             : 
    3238         112 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3239             : 
    3240         112 :         tevent_req_received(req);
    3241         112 :         return NT_STATUS_OK;
    3242             : }
    3243             : 
    3244           0 : NTSTATUS dcerpc_wbint_QueryGroupList_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_QueryGroupList *r)
    3245             : {
    3246           0 :         NTSTATUS status;
    3247             : 
    3248           0 :         status = dcerpc_binding_handle_call(h,
    3249             :                         NULL, &ndr_table_winbind,
    3250             :                         NDR_WBINT_QUERYGROUPLIST, mem_ctx, r);
    3251             : 
    3252           0 :         return status;
    3253             : }
    3254             : 
    3255             : struct dcerpc_wbint_QueryGroupList_state {
    3256             :         struct wbint_QueryGroupList orig;
    3257             :         struct wbint_QueryGroupList tmp;
    3258             :         TALLOC_CTX *out_mem_ctx;
    3259             : };
    3260             : 
    3261             : static void dcerpc_wbint_QueryGroupList_done(struct tevent_req *subreq);
    3262             : 
    3263         112 : struct tevent_req *dcerpc_wbint_QueryGroupList_send(TALLOC_CTX *mem_ctx,
    3264             :                                                     struct tevent_context *ev,
    3265             :                                                     struct dcerpc_binding_handle *h,
    3266             :                                                     struct wbint_Principals *_groups /* [out] [ref] */)
    3267             : {
    3268           0 :         struct tevent_req *req;
    3269           0 :         struct dcerpc_wbint_QueryGroupList_state *state;
    3270           0 :         struct tevent_req *subreq;
    3271             : 
    3272         112 :         req = tevent_req_create(mem_ctx, &state,
    3273             :                                 struct dcerpc_wbint_QueryGroupList_state);
    3274         112 :         if (req == NULL) {
    3275           0 :                 return NULL;
    3276             :         }
    3277         112 :         state->out_mem_ctx = NULL;
    3278             : 
    3279             :         /* In parameters */
    3280             : 
    3281             :         /* Out parameters */
    3282         112 :         state->orig.out.groups = _groups;
    3283             : 
    3284             :         /* Result */
    3285         112 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3286             : 
    3287         112 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3288             :                              "dcerpc_wbint_QueryGroupList_out_memory");
    3289         112 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3290           0 :                 return tevent_req_post(req, ev);
    3291             :         }
    3292             : 
    3293             :         /* make a temporary copy, that we pass to the dispatch function */
    3294         112 :         state->tmp = state->orig;
    3295             : 
    3296         112 :         subreq = dcerpc_wbint_QueryGroupList_r_send(state, ev, h, &state->tmp);
    3297         112 :         if (tevent_req_nomem(subreq, req)) {
    3298           0 :                 return tevent_req_post(req, ev);
    3299             :         }
    3300         112 :         tevent_req_set_callback(subreq, dcerpc_wbint_QueryGroupList_done, req);
    3301         112 :         return req;
    3302             : }
    3303             : 
    3304         112 : static void dcerpc_wbint_QueryGroupList_done(struct tevent_req *subreq)
    3305             : {
    3306         112 :         struct tevent_req *req = tevent_req_callback_data(
    3307             :                 subreq, struct tevent_req);
    3308         112 :         struct dcerpc_wbint_QueryGroupList_state *state = tevent_req_data(
    3309             :                 req, struct dcerpc_wbint_QueryGroupList_state);
    3310           0 :         NTSTATUS status;
    3311           0 :         TALLOC_CTX *mem_ctx;
    3312             : 
    3313         112 :         if (state->out_mem_ctx) {
    3314         112 :                 mem_ctx = state->out_mem_ctx;
    3315             :         } else {
    3316           0 :                 mem_ctx = state;
    3317             :         }
    3318             : 
    3319         112 :         status = dcerpc_wbint_QueryGroupList_r_recv(subreq, mem_ctx);
    3320         112 :         TALLOC_FREE(subreq);
    3321         112 :         if (tevent_req_nterror(req, status)) {
    3322           0 :                 return;
    3323             :         }
    3324             : 
    3325             :         /* Copy out parameters */
    3326         112 :         *state->orig.out.groups = *state->tmp.out.groups;
    3327             : 
    3328             :         /* Copy result */
    3329         112 :         state->orig.out.result = state->tmp.out.result;
    3330             : 
    3331             :         /* Reset temporary structure */
    3332         112 :         NDR_ZERO_STRUCT(state->tmp);
    3333             : 
    3334         112 :         tevent_req_done(req);
    3335             : }
    3336             : 
    3337         112 : NTSTATUS dcerpc_wbint_QueryGroupList_recv(struct tevent_req *req,
    3338             :                                           TALLOC_CTX *mem_ctx,
    3339             :                                           NTSTATUS *result)
    3340             : {
    3341         112 :         struct dcerpc_wbint_QueryGroupList_state *state = tevent_req_data(
    3342             :                 req, struct dcerpc_wbint_QueryGroupList_state);
    3343           0 :         NTSTATUS status;
    3344             : 
    3345         112 :         if (tevent_req_is_nterror(req, &status)) {
    3346           0 :                 tevent_req_received(req);
    3347           0 :                 return status;
    3348             :         }
    3349             : 
    3350             :         /* Steal possible out parameters to the callers context */
    3351         112 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3352             : 
    3353             :         /* Return result */
    3354         112 :         *result = state->orig.out.result;
    3355             : 
    3356         112 :         tevent_req_received(req);
    3357         112 :         return NT_STATUS_OK;
    3358             : }
    3359             : 
    3360           0 : NTSTATUS dcerpc_wbint_QueryGroupList(struct dcerpc_binding_handle *h,
    3361             :                                      TALLOC_CTX *mem_ctx,
    3362             :                                      struct wbint_Principals *_groups /* [out] [ref] */,
    3363             :                                      NTSTATUS *result)
    3364             : {
    3365           0 :         struct wbint_QueryGroupList r;
    3366           0 :         NTSTATUS status;
    3367             : 
    3368             :         /* In parameters */
    3369             : 
    3370             :         /* Out parameters */
    3371           0 :         r.out.groups = _groups;
    3372             : 
    3373             :         /* Result */
    3374           0 :         NDR_ZERO_STRUCT(r.out.result);
    3375             : 
    3376           0 :         status = dcerpc_wbint_QueryGroupList_r(h, mem_ctx, &r);
    3377           0 :         if (!NT_STATUS_IS_OK(status)) {
    3378           0 :                 return status;
    3379             :         }
    3380             : 
    3381             :         /* Return variables */
    3382           0 :         *_groups = *r.out.groups;
    3383             : 
    3384             :         /* Return result */
    3385           0 :         *result = r.out.result;
    3386             : 
    3387           0 :         return NT_STATUS_OK;
    3388             : }
    3389             : 
    3390             : struct dcerpc_wbint_QueryUserRidList_r_state {
    3391             :         TALLOC_CTX *out_mem_ctx;
    3392             : };
    3393             : 
    3394             : static void dcerpc_wbint_QueryUserRidList_r_done(struct tevent_req *subreq);
    3395             : 
    3396         140 : struct tevent_req *dcerpc_wbint_QueryUserRidList_r_send(TALLOC_CTX *mem_ctx,
    3397             :         struct tevent_context *ev,
    3398             :         struct dcerpc_binding_handle *h,
    3399             :         struct wbint_QueryUserRidList *r)
    3400             : {
    3401           0 :         struct tevent_req *req;
    3402           0 :         struct dcerpc_wbint_QueryUserRidList_r_state *state;
    3403           0 :         struct tevent_req *subreq;
    3404             : 
    3405         140 :         req = tevent_req_create(mem_ctx, &state,
    3406             :                                 struct dcerpc_wbint_QueryUserRidList_r_state);
    3407         140 :         if (req == NULL) {
    3408           0 :                 return NULL;
    3409             :         }
    3410             : 
    3411         140 :         state->out_mem_ctx = talloc_new(state);
    3412         140 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3413           0 :                 return tevent_req_post(req, ev);
    3414             :         }
    3415             : 
    3416         140 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3417             :                         NULL, &ndr_table_winbind,
    3418         140 :                         NDR_WBINT_QUERYUSERRIDLIST, state->out_mem_ctx, r);
    3419         140 :         if (tevent_req_nomem(subreq, req)) {
    3420           0 :                 return tevent_req_post(req, ev);
    3421             :         }
    3422         140 :         tevent_req_set_callback(subreq, dcerpc_wbint_QueryUserRidList_r_done, req);
    3423             : 
    3424         140 :         return req;
    3425             : }
    3426             : 
    3427         140 : static void dcerpc_wbint_QueryUserRidList_r_done(struct tevent_req *subreq)
    3428             : {
    3429           0 :         struct tevent_req *req =
    3430         140 :                 tevent_req_callback_data(subreq,
    3431             :                 struct tevent_req);
    3432           0 :         NTSTATUS status;
    3433             : 
    3434         140 :         status = dcerpc_binding_handle_call_recv(subreq);
    3435         140 :         TALLOC_FREE(subreq);
    3436         140 :         if (tevent_req_nterror(req, status)) {
    3437           0 :                 return;
    3438             :         }
    3439             : 
    3440         140 :         tevent_req_done(req);
    3441             : }
    3442             : 
    3443         140 : NTSTATUS dcerpc_wbint_QueryUserRidList_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3444             : {
    3445           0 :         struct dcerpc_wbint_QueryUserRidList_r_state *state =
    3446         140 :                 tevent_req_data(req,
    3447             :                 struct dcerpc_wbint_QueryUserRidList_r_state);
    3448           0 :         NTSTATUS status;
    3449             : 
    3450         140 :         if (tevent_req_is_nterror(req, &status)) {
    3451           0 :                 tevent_req_received(req);
    3452           0 :                 return status;
    3453             :         }
    3454             : 
    3455         140 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3456             : 
    3457         140 :         tevent_req_received(req);
    3458         140 :         return NT_STATUS_OK;
    3459             : }
    3460             : 
    3461           0 : NTSTATUS dcerpc_wbint_QueryUserRidList_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_QueryUserRidList *r)
    3462             : {
    3463           0 :         NTSTATUS status;
    3464             : 
    3465           0 :         status = dcerpc_binding_handle_call(h,
    3466             :                         NULL, &ndr_table_winbind,
    3467             :                         NDR_WBINT_QUERYUSERRIDLIST, mem_ctx, r);
    3468             : 
    3469           0 :         return status;
    3470             : }
    3471             : 
    3472             : struct dcerpc_wbint_QueryUserRidList_state {
    3473             :         struct wbint_QueryUserRidList orig;
    3474             :         struct wbint_QueryUserRidList tmp;
    3475             :         TALLOC_CTX *out_mem_ctx;
    3476             : };
    3477             : 
    3478             : static void dcerpc_wbint_QueryUserRidList_done(struct tevent_req *subreq);
    3479             : 
    3480         140 : struct tevent_req *dcerpc_wbint_QueryUserRidList_send(TALLOC_CTX *mem_ctx,
    3481             :                                                       struct tevent_context *ev,
    3482             :                                                       struct dcerpc_binding_handle *h,
    3483             :                                                       struct wbint_RidArray *_rids /* [out] [ref] */)
    3484             : {
    3485           0 :         struct tevent_req *req;
    3486           0 :         struct dcerpc_wbint_QueryUserRidList_state *state;
    3487           0 :         struct tevent_req *subreq;
    3488             : 
    3489         140 :         req = tevent_req_create(mem_ctx, &state,
    3490             :                                 struct dcerpc_wbint_QueryUserRidList_state);
    3491         140 :         if (req == NULL) {
    3492           0 :                 return NULL;
    3493             :         }
    3494         140 :         state->out_mem_ctx = NULL;
    3495             : 
    3496             :         /* In parameters */
    3497             : 
    3498             :         /* Out parameters */
    3499         140 :         state->orig.out.rids = _rids;
    3500             : 
    3501             :         /* Result */
    3502         140 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3503             : 
    3504         140 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3505             :                              "dcerpc_wbint_QueryUserRidList_out_memory");
    3506         140 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3507           0 :                 return tevent_req_post(req, ev);
    3508             :         }
    3509             : 
    3510             :         /* make a temporary copy, that we pass to the dispatch function */
    3511         140 :         state->tmp = state->orig;
    3512             : 
    3513         140 :         subreq = dcerpc_wbint_QueryUserRidList_r_send(state, ev, h, &state->tmp);
    3514         140 :         if (tevent_req_nomem(subreq, req)) {
    3515           0 :                 return tevent_req_post(req, ev);
    3516             :         }
    3517         140 :         tevent_req_set_callback(subreq, dcerpc_wbint_QueryUserRidList_done, req);
    3518         140 :         return req;
    3519             : }
    3520             : 
    3521         140 : static void dcerpc_wbint_QueryUserRidList_done(struct tevent_req *subreq)
    3522             : {
    3523         140 :         struct tevent_req *req = tevent_req_callback_data(
    3524             :                 subreq, struct tevent_req);
    3525         140 :         struct dcerpc_wbint_QueryUserRidList_state *state = tevent_req_data(
    3526             :                 req, struct dcerpc_wbint_QueryUserRidList_state);
    3527           0 :         NTSTATUS status;
    3528           0 :         TALLOC_CTX *mem_ctx;
    3529             : 
    3530         140 :         if (state->out_mem_ctx) {
    3531         140 :                 mem_ctx = state->out_mem_ctx;
    3532             :         } else {
    3533           0 :                 mem_ctx = state;
    3534             :         }
    3535             : 
    3536         140 :         status = dcerpc_wbint_QueryUserRidList_r_recv(subreq, mem_ctx);
    3537         140 :         TALLOC_FREE(subreq);
    3538         140 :         if (tevent_req_nterror(req, status)) {
    3539           0 :                 return;
    3540             :         }
    3541             : 
    3542             :         /* Copy out parameters */
    3543         140 :         *state->orig.out.rids = *state->tmp.out.rids;
    3544             : 
    3545             :         /* Copy result */
    3546         140 :         state->orig.out.result = state->tmp.out.result;
    3547             : 
    3548             :         /* Reset temporary structure */
    3549         140 :         NDR_ZERO_STRUCT(state->tmp);
    3550             : 
    3551         140 :         tevent_req_done(req);
    3552             : }
    3553             : 
    3554         140 : NTSTATUS dcerpc_wbint_QueryUserRidList_recv(struct tevent_req *req,
    3555             :                                             TALLOC_CTX *mem_ctx,
    3556             :                                             NTSTATUS *result)
    3557             : {
    3558         140 :         struct dcerpc_wbint_QueryUserRidList_state *state = tevent_req_data(
    3559             :                 req, struct dcerpc_wbint_QueryUserRidList_state);
    3560           0 :         NTSTATUS status;
    3561             : 
    3562         140 :         if (tevent_req_is_nterror(req, &status)) {
    3563           0 :                 tevent_req_received(req);
    3564           0 :                 return status;
    3565             :         }
    3566             : 
    3567             :         /* Steal possible out parameters to the callers context */
    3568         140 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3569             : 
    3570             :         /* Return result */
    3571         140 :         *result = state->orig.out.result;
    3572             : 
    3573         140 :         tevent_req_received(req);
    3574         140 :         return NT_STATUS_OK;
    3575             : }
    3576             : 
    3577           0 : NTSTATUS dcerpc_wbint_QueryUserRidList(struct dcerpc_binding_handle *h,
    3578             :                                        TALLOC_CTX *mem_ctx,
    3579             :                                        struct wbint_RidArray *_rids /* [out] [ref] */,
    3580             :                                        NTSTATUS *result)
    3581             : {
    3582           0 :         struct wbint_QueryUserRidList r;
    3583           0 :         NTSTATUS status;
    3584             : 
    3585             :         /* In parameters */
    3586             : 
    3587             :         /* Out parameters */
    3588           0 :         r.out.rids = _rids;
    3589             : 
    3590             :         /* Result */
    3591           0 :         NDR_ZERO_STRUCT(r.out.result);
    3592             : 
    3593           0 :         status = dcerpc_wbint_QueryUserRidList_r(h, mem_ctx, &r);
    3594           0 :         if (!NT_STATUS_IS_OK(status)) {
    3595           0 :                 return status;
    3596             :         }
    3597             : 
    3598             :         /* Return variables */
    3599           0 :         *_rids = *r.out.rids;
    3600             : 
    3601             :         /* Return result */
    3602           0 :         *result = r.out.result;
    3603             : 
    3604           0 :         return NT_STATUS_OK;
    3605             : }
    3606             : 
    3607             : struct dcerpc_wbint_DsGetDcName_r_state {
    3608             :         TALLOC_CTX *out_mem_ctx;
    3609             : };
    3610             : 
    3611             : static void dcerpc_wbint_DsGetDcName_r_done(struct tevent_req *subreq);
    3612             : 
    3613          88 : struct tevent_req *dcerpc_wbint_DsGetDcName_r_send(TALLOC_CTX *mem_ctx,
    3614             :         struct tevent_context *ev,
    3615             :         struct dcerpc_binding_handle *h,
    3616             :         struct wbint_DsGetDcName *r)
    3617             : {
    3618           0 :         struct tevent_req *req;
    3619           0 :         struct dcerpc_wbint_DsGetDcName_r_state *state;
    3620           0 :         struct tevent_req *subreq;
    3621             : 
    3622          88 :         req = tevent_req_create(mem_ctx, &state,
    3623             :                                 struct dcerpc_wbint_DsGetDcName_r_state);
    3624          88 :         if (req == NULL) {
    3625           0 :                 return NULL;
    3626             :         }
    3627             : 
    3628          88 :         state->out_mem_ctx = talloc_new(state);
    3629          88 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3630           0 :                 return tevent_req_post(req, ev);
    3631             :         }
    3632             : 
    3633          88 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3634             :                         NULL, &ndr_table_winbind,
    3635          88 :                         NDR_WBINT_DSGETDCNAME, state->out_mem_ctx, r);
    3636          88 :         if (tevent_req_nomem(subreq, req)) {
    3637           0 :                 return tevent_req_post(req, ev);
    3638             :         }
    3639          88 :         tevent_req_set_callback(subreq, dcerpc_wbint_DsGetDcName_r_done, req);
    3640             : 
    3641          88 :         return req;
    3642             : }
    3643             : 
    3644          88 : static void dcerpc_wbint_DsGetDcName_r_done(struct tevent_req *subreq)
    3645             : {
    3646           0 :         struct tevent_req *req =
    3647          88 :                 tevent_req_callback_data(subreq,
    3648             :                 struct tevent_req);
    3649           0 :         NTSTATUS status;
    3650             : 
    3651          88 :         status = dcerpc_binding_handle_call_recv(subreq);
    3652          88 :         TALLOC_FREE(subreq);
    3653          88 :         if (tevent_req_nterror(req, status)) {
    3654           0 :                 return;
    3655             :         }
    3656             : 
    3657          88 :         tevent_req_done(req);
    3658             : }
    3659             : 
    3660          88 : NTSTATUS dcerpc_wbint_DsGetDcName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3661             : {
    3662           0 :         struct dcerpc_wbint_DsGetDcName_r_state *state =
    3663          88 :                 tevent_req_data(req,
    3664             :                 struct dcerpc_wbint_DsGetDcName_r_state);
    3665           0 :         NTSTATUS status;
    3666             : 
    3667          88 :         if (tevent_req_is_nterror(req, &status)) {
    3668           0 :                 tevent_req_received(req);
    3669           0 :                 return status;
    3670             :         }
    3671             : 
    3672          88 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3673             : 
    3674          88 :         tevent_req_received(req);
    3675          88 :         return NT_STATUS_OK;
    3676             : }
    3677             : 
    3678           0 : NTSTATUS dcerpc_wbint_DsGetDcName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_DsGetDcName *r)
    3679             : {
    3680           0 :         NTSTATUS status;
    3681             : 
    3682           0 :         status = dcerpc_binding_handle_call(h,
    3683             :                         NULL, &ndr_table_winbind,
    3684             :                         NDR_WBINT_DSGETDCNAME, mem_ctx, r);
    3685             : 
    3686           0 :         return status;
    3687             : }
    3688             : 
    3689             : struct dcerpc_wbint_DsGetDcName_state {
    3690             :         struct wbint_DsGetDcName orig;
    3691             :         struct wbint_DsGetDcName tmp;
    3692             :         TALLOC_CTX *out_mem_ctx;
    3693             : };
    3694             : 
    3695             : static void dcerpc_wbint_DsGetDcName_done(struct tevent_req *subreq);
    3696             : 
    3697          88 : struct tevent_req *dcerpc_wbint_DsGetDcName_send(TALLOC_CTX *mem_ctx,
    3698             :                                                  struct tevent_context *ev,
    3699             :                                                  struct dcerpc_binding_handle *h,
    3700             :                                                  const char *_domain_name /* [in] [charset(UTF8),ref] */,
    3701             :                                                  struct GUID *_domain_guid /* [in] [unique] */,
    3702             :                                                  const char *_site_name /* [in] [charset(UTF8),unique] */,
    3703             :                                                  uint32_t _flags /* [in]  */,
    3704             :                                                  struct netr_DsRGetDCNameInfo **_dc_info /* [out] [ref] */)
    3705             : {
    3706           0 :         struct tevent_req *req;
    3707           0 :         struct dcerpc_wbint_DsGetDcName_state *state;
    3708           0 :         struct tevent_req *subreq;
    3709             : 
    3710          88 :         req = tevent_req_create(mem_ctx, &state,
    3711             :                                 struct dcerpc_wbint_DsGetDcName_state);
    3712          88 :         if (req == NULL) {
    3713           0 :                 return NULL;
    3714             :         }
    3715          88 :         state->out_mem_ctx = NULL;
    3716             : 
    3717             :         /* In parameters */
    3718          88 :         state->orig.in.domain_name = _domain_name;
    3719          88 :         state->orig.in.domain_guid = _domain_guid;
    3720          88 :         state->orig.in.site_name = _site_name;
    3721          88 :         state->orig.in.flags = _flags;
    3722             : 
    3723             :         /* Out parameters */
    3724          88 :         state->orig.out.dc_info = _dc_info;
    3725             : 
    3726             :         /* Result */
    3727          88 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3728             : 
    3729          88 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3730             :                              "dcerpc_wbint_DsGetDcName_out_memory");
    3731          88 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3732           0 :                 return tevent_req_post(req, ev);
    3733             :         }
    3734             : 
    3735             :         /* make a temporary copy, that we pass to the dispatch function */
    3736          88 :         state->tmp = state->orig;
    3737             : 
    3738          88 :         subreq = dcerpc_wbint_DsGetDcName_r_send(state, ev, h, &state->tmp);
    3739          88 :         if (tevent_req_nomem(subreq, req)) {
    3740           0 :                 return tevent_req_post(req, ev);
    3741             :         }
    3742          88 :         tevent_req_set_callback(subreq, dcerpc_wbint_DsGetDcName_done, req);
    3743          88 :         return req;
    3744             : }
    3745             : 
    3746          88 : static void dcerpc_wbint_DsGetDcName_done(struct tevent_req *subreq)
    3747             : {
    3748          88 :         struct tevent_req *req = tevent_req_callback_data(
    3749             :                 subreq, struct tevent_req);
    3750          88 :         struct dcerpc_wbint_DsGetDcName_state *state = tevent_req_data(
    3751             :                 req, struct dcerpc_wbint_DsGetDcName_state);
    3752           0 :         NTSTATUS status;
    3753           0 :         TALLOC_CTX *mem_ctx;
    3754             : 
    3755          88 :         if (state->out_mem_ctx) {
    3756          88 :                 mem_ctx = state->out_mem_ctx;
    3757             :         } else {
    3758           0 :                 mem_ctx = state;
    3759             :         }
    3760             : 
    3761          88 :         status = dcerpc_wbint_DsGetDcName_r_recv(subreq, mem_ctx);
    3762          88 :         TALLOC_FREE(subreq);
    3763          88 :         if (tevent_req_nterror(req, status)) {
    3764           0 :                 return;
    3765             :         }
    3766             : 
    3767             :         /* Copy out parameters */
    3768          88 :         *state->orig.out.dc_info = *state->tmp.out.dc_info;
    3769             : 
    3770             :         /* Copy result */
    3771          88 :         state->orig.out.result = state->tmp.out.result;
    3772             : 
    3773             :         /* Reset temporary structure */
    3774          88 :         NDR_ZERO_STRUCT(state->tmp);
    3775             : 
    3776          88 :         tevent_req_done(req);
    3777             : }
    3778             : 
    3779          88 : NTSTATUS dcerpc_wbint_DsGetDcName_recv(struct tevent_req *req,
    3780             :                                        TALLOC_CTX *mem_ctx,
    3781             :                                        NTSTATUS *result)
    3782             : {
    3783          88 :         struct dcerpc_wbint_DsGetDcName_state *state = tevent_req_data(
    3784             :                 req, struct dcerpc_wbint_DsGetDcName_state);
    3785           0 :         NTSTATUS status;
    3786             : 
    3787          88 :         if (tevent_req_is_nterror(req, &status)) {
    3788           0 :                 tevent_req_received(req);
    3789           0 :                 return status;
    3790             :         }
    3791             : 
    3792             :         /* Steal possible out parameters to the callers context */
    3793          88 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3794             : 
    3795             :         /* Return result */
    3796          88 :         *result = state->orig.out.result;
    3797             : 
    3798          88 :         tevent_req_received(req);
    3799          88 :         return NT_STATUS_OK;
    3800             : }
    3801             : 
    3802           0 : NTSTATUS dcerpc_wbint_DsGetDcName(struct dcerpc_binding_handle *h,
    3803             :                                   TALLOC_CTX *mem_ctx,
    3804             :                                   const char *_domain_name /* [in] [charset(UTF8),ref] */,
    3805             :                                   struct GUID *_domain_guid /* [in] [unique] */,
    3806             :                                   const char *_site_name /* [in] [charset(UTF8),unique] */,
    3807             :                                   uint32_t _flags /* [in]  */,
    3808             :                                   struct netr_DsRGetDCNameInfo **_dc_info /* [out] [ref] */,
    3809             :                                   NTSTATUS *result)
    3810             : {
    3811           0 :         struct wbint_DsGetDcName r;
    3812           0 :         NTSTATUS status;
    3813             : 
    3814             :         /* In parameters */
    3815           0 :         r.in.domain_name = _domain_name;
    3816           0 :         r.in.domain_guid = _domain_guid;
    3817           0 :         r.in.site_name = _site_name;
    3818           0 :         r.in.flags = _flags;
    3819             : 
    3820             :         /* Out parameters */
    3821           0 :         r.out.dc_info = _dc_info;
    3822             : 
    3823             :         /* Result */
    3824           0 :         NDR_ZERO_STRUCT(r.out.result);
    3825             : 
    3826           0 :         status = dcerpc_wbint_DsGetDcName_r(h, mem_ctx, &r);
    3827           0 :         if (!NT_STATUS_IS_OK(status)) {
    3828           0 :                 return status;
    3829             :         }
    3830             : 
    3831             :         /* Return variables */
    3832           0 :         *_dc_info = *r.out.dc_info;
    3833             : 
    3834             :         /* Return result */
    3835           0 :         *result = r.out.result;
    3836             : 
    3837           0 :         return NT_STATUS_OK;
    3838             : }
    3839             : 
    3840             : struct dcerpc_wbint_LookupRids_r_state {
    3841             :         TALLOC_CTX *out_mem_ctx;
    3842             : };
    3843             : 
    3844             : static void dcerpc_wbint_LookupRids_r_done(struct tevent_req *subreq);
    3845             : 
    3846         100 : struct tevent_req *dcerpc_wbint_LookupRids_r_send(TALLOC_CTX *mem_ctx,
    3847             :         struct tevent_context *ev,
    3848             :         struct dcerpc_binding_handle *h,
    3849             :         struct wbint_LookupRids *r)
    3850             : {
    3851           0 :         struct tevent_req *req;
    3852           0 :         struct dcerpc_wbint_LookupRids_r_state *state;
    3853           0 :         struct tevent_req *subreq;
    3854             : 
    3855         100 :         req = tevent_req_create(mem_ctx, &state,
    3856             :                                 struct dcerpc_wbint_LookupRids_r_state);
    3857         100 :         if (req == NULL) {
    3858           0 :                 return NULL;
    3859             :         }
    3860             : 
    3861         100 :         state->out_mem_ctx = talloc_new(state);
    3862         100 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3863           0 :                 return tevent_req_post(req, ev);
    3864             :         }
    3865             : 
    3866         100 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3867             :                         NULL, &ndr_table_winbind,
    3868         100 :                         NDR_WBINT_LOOKUPRIDS, state->out_mem_ctx, r);
    3869         100 :         if (tevent_req_nomem(subreq, req)) {
    3870           0 :                 return tevent_req_post(req, ev);
    3871             :         }
    3872         100 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupRids_r_done, req);
    3873             : 
    3874         100 :         return req;
    3875             : }
    3876             : 
    3877         100 : static void dcerpc_wbint_LookupRids_r_done(struct tevent_req *subreq)
    3878             : {
    3879           0 :         struct tevent_req *req =
    3880         100 :                 tevent_req_callback_data(subreq,
    3881             :                 struct tevent_req);
    3882           0 :         NTSTATUS status;
    3883             : 
    3884         100 :         status = dcerpc_binding_handle_call_recv(subreq);
    3885         100 :         TALLOC_FREE(subreq);
    3886         100 :         if (tevent_req_nterror(req, status)) {
    3887           0 :                 return;
    3888             :         }
    3889             : 
    3890         100 :         tevent_req_done(req);
    3891             : }
    3892             : 
    3893         100 : NTSTATUS dcerpc_wbint_LookupRids_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3894             : {
    3895           0 :         struct dcerpc_wbint_LookupRids_r_state *state =
    3896         100 :                 tevent_req_data(req,
    3897             :                 struct dcerpc_wbint_LookupRids_r_state);
    3898           0 :         NTSTATUS status;
    3899             : 
    3900         100 :         if (tevent_req_is_nterror(req, &status)) {
    3901           0 :                 tevent_req_received(req);
    3902           0 :                 return status;
    3903             :         }
    3904             : 
    3905         100 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3906             : 
    3907         100 :         tevent_req_received(req);
    3908         100 :         return NT_STATUS_OK;
    3909             : }
    3910             : 
    3911           0 : NTSTATUS dcerpc_wbint_LookupRids_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupRids *r)
    3912             : {
    3913           0 :         NTSTATUS status;
    3914             : 
    3915           0 :         status = dcerpc_binding_handle_call(h,
    3916             :                         NULL, &ndr_table_winbind,
    3917             :                         NDR_WBINT_LOOKUPRIDS, mem_ctx, r);
    3918             : 
    3919           0 :         return status;
    3920             : }
    3921             : 
    3922             : struct dcerpc_wbint_LookupRids_state {
    3923             :         struct wbint_LookupRids orig;
    3924             :         struct wbint_LookupRids tmp;
    3925             :         TALLOC_CTX *out_mem_ctx;
    3926             : };
    3927             : 
    3928             : static void dcerpc_wbint_LookupRids_done(struct tevent_req *subreq);
    3929             : 
    3930         100 : struct tevent_req *dcerpc_wbint_LookupRids_send(TALLOC_CTX *mem_ctx,
    3931             :                                                 struct tevent_context *ev,
    3932             :                                                 struct dcerpc_binding_handle *h,
    3933             :                                                 struct dom_sid *_domain_sid /* [in] [ref] */,
    3934             :                                                 struct wbint_RidArray *_rids /* [in] [ref] */,
    3935             :                                                 const char **_domain_name /* [out] [charset(UTF8),ref] */,
    3936             :                                                 struct wbint_Principals *_names /* [out] [ref] */)
    3937             : {
    3938           0 :         struct tevent_req *req;
    3939           0 :         struct dcerpc_wbint_LookupRids_state *state;
    3940           0 :         struct tevent_req *subreq;
    3941             : 
    3942         100 :         req = tevent_req_create(mem_ctx, &state,
    3943             :                                 struct dcerpc_wbint_LookupRids_state);
    3944         100 :         if (req == NULL) {
    3945           0 :                 return NULL;
    3946             :         }
    3947         100 :         state->out_mem_ctx = NULL;
    3948             : 
    3949             :         /* In parameters */
    3950         100 :         state->orig.in.domain_sid = _domain_sid;
    3951         100 :         state->orig.in.rids = _rids;
    3952             : 
    3953             :         /* Out parameters */
    3954         100 :         state->orig.out.domain_name = _domain_name;
    3955         100 :         state->orig.out.names = _names;
    3956             : 
    3957             :         /* Result */
    3958         100 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3959             : 
    3960         100 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3961             :                              "dcerpc_wbint_LookupRids_out_memory");
    3962         100 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3963           0 :                 return tevent_req_post(req, ev);
    3964             :         }
    3965             : 
    3966             :         /* make a temporary copy, that we pass to the dispatch function */
    3967         100 :         state->tmp = state->orig;
    3968             : 
    3969         100 :         subreq = dcerpc_wbint_LookupRids_r_send(state, ev, h, &state->tmp);
    3970         100 :         if (tevent_req_nomem(subreq, req)) {
    3971           0 :                 return tevent_req_post(req, ev);
    3972             :         }
    3973         100 :         tevent_req_set_callback(subreq, dcerpc_wbint_LookupRids_done, req);
    3974         100 :         return req;
    3975             : }
    3976             : 
    3977         100 : static void dcerpc_wbint_LookupRids_done(struct tevent_req *subreq)
    3978             : {
    3979         100 :         struct tevent_req *req = tevent_req_callback_data(
    3980             :                 subreq, struct tevent_req);
    3981         100 :         struct dcerpc_wbint_LookupRids_state *state = tevent_req_data(
    3982             :                 req, struct dcerpc_wbint_LookupRids_state);
    3983           0 :         NTSTATUS status;
    3984           0 :         TALLOC_CTX *mem_ctx;
    3985             : 
    3986         100 :         if (state->out_mem_ctx) {
    3987         100 :                 mem_ctx = state->out_mem_ctx;
    3988             :         } else {
    3989           0 :                 mem_ctx = state;
    3990             :         }
    3991             : 
    3992         100 :         status = dcerpc_wbint_LookupRids_r_recv(subreq, mem_ctx);
    3993         100 :         TALLOC_FREE(subreq);
    3994         100 :         if (tevent_req_nterror(req, status)) {
    3995           0 :                 return;
    3996             :         }
    3997             : 
    3998             :         /* Copy out parameters */
    3999         100 :         *state->orig.out.domain_name = *state->tmp.out.domain_name;
    4000         100 :         *state->orig.out.names = *state->tmp.out.names;
    4001             : 
    4002             :         /* Copy result */
    4003         100 :         state->orig.out.result = state->tmp.out.result;
    4004             : 
    4005             :         /* Reset temporary structure */
    4006         100 :         NDR_ZERO_STRUCT(state->tmp);
    4007             : 
    4008         100 :         tevent_req_done(req);
    4009             : }
    4010             : 
    4011         100 : NTSTATUS dcerpc_wbint_LookupRids_recv(struct tevent_req *req,
    4012             :                                       TALLOC_CTX *mem_ctx,
    4013             :                                       NTSTATUS *result)
    4014             : {
    4015         100 :         struct dcerpc_wbint_LookupRids_state *state = tevent_req_data(
    4016             :                 req, struct dcerpc_wbint_LookupRids_state);
    4017           0 :         NTSTATUS status;
    4018             : 
    4019         100 :         if (tevent_req_is_nterror(req, &status)) {
    4020           0 :                 tevent_req_received(req);
    4021           0 :                 return status;
    4022             :         }
    4023             : 
    4024             :         /* Steal possible out parameters to the callers context */
    4025         100 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4026             : 
    4027             :         /* Return result */
    4028         100 :         *result = state->orig.out.result;
    4029             : 
    4030         100 :         tevent_req_received(req);
    4031         100 :         return NT_STATUS_OK;
    4032             : }
    4033             : 
    4034           0 : NTSTATUS dcerpc_wbint_LookupRids(struct dcerpc_binding_handle *h,
    4035             :                                  TALLOC_CTX *mem_ctx,
    4036             :                                  struct dom_sid *_domain_sid /* [in] [ref] */,
    4037             :                                  struct wbint_RidArray *_rids /* [in] [ref] */,
    4038             :                                  const char **_domain_name /* [out] [charset(UTF8),ref] */,
    4039             :                                  struct wbint_Principals *_names /* [out] [ref] */,
    4040             :                                  NTSTATUS *result)
    4041             : {
    4042           0 :         struct wbint_LookupRids r;
    4043           0 :         NTSTATUS status;
    4044             : 
    4045             :         /* In parameters */
    4046           0 :         r.in.domain_sid = _domain_sid;
    4047           0 :         r.in.rids = _rids;
    4048             : 
    4049             :         /* Out parameters */
    4050           0 :         r.out.domain_name = _domain_name;
    4051           0 :         r.out.names = _names;
    4052             : 
    4053             :         /* Result */
    4054           0 :         NDR_ZERO_STRUCT(r.out.result);
    4055             : 
    4056           0 :         status = dcerpc_wbint_LookupRids_r(h, mem_ctx, &r);
    4057           0 :         if (!NT_STATUS_IS_OK(status)) {
    4058           0 :                 return status;
    4059             :         }
    4060             : 
    4061             :         /* Return variables */
    4062           0 :         *_domain_name = *r.out.domain_name;
    4063           0 :         *_names = *r.out.names;
    4064             : 
    4065             :         /* Return result */
    4066           0 :         *result = r.out.result;
    4067             : 
    4068           0 :         return NT_STATUS_OK;
    4069             : }
    4070             : 
    4071             : struct dcerpc_wbint_CheckMachineAccount_r_state {
    4072             :         TALLOC_CTX *out_mem_ctx;
    4073             : };
    4074             : 
    4075             : static void dcerpc_wbint_CheckMachineAccount_r_done(struct tevent_req *subreq);
    4076             : 
    4077          14 : struct tevent_req *dcerpc_wbint_CheckMachineAccount_r_send(TALLOC_CTX *mem_ctx,
    4078             :         struct tevent_context *ev,
    4079             :         struct dcerpc_binding_handle *h,
    4080             :         struct wbint_CheckMachineAccount *r)
    4081             : {
    4082           0 :         struct tevent_req *req;
    4083           0 :         struct dcerpc_wbint_CheckMachineAccount_r_state *state;
    4084           0 :         struct tevent_req *subreq;
    4085             : 
    4086          14 :         req = tevent_req_create(mem_ctx, &state,
    4087             :                                 struct dcerpc_wbint_CheckMachineAccount_r_state);
    4088          14 :         if (req == NULL) {
    4089           0 :                 return NULL;
    4090             :         }
    4091             : 
    4092          14 :         state->out_mem_ctx = NULL;
    4093             : 
    4094          14 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4095             :                         NULL, &ndr_table_winbind,
    4096             :                         NDR_WBINT_CHECKMACHINEACCOUNT, state, r);
    4097          14 :         if (tevent_req_nomem(subreq, req)) {
    4098           0 :                 return tevent_req_post(req, ev);
    4099             :         }
    4100          14 :         tevent_req_set_callback(subreq, dcerpc_wbint_CheckMachineAccount_r_done, req);
    4101             : 
    4102          14 :         return req;
    4103             : }
    4104             : 
    4105          14 : static void dcerpc_wbint_CheckMachineAccount_r_done(struct tevent_req *subreq)
    4106             : {
    4107           0 :         struct tevent_req *req =
    4108          14 :                 tevent_req_callback_data(subreq,
    4109             :                 struct tevent_req);
    4110           0 :         NTSTATUS status;
    4111             : 
    4112          14 :         status = dcerpc_binding_handle_call_recv(subreq);
    4113          14 :         TALLOC_FREE(subreq);
    4114          14 :         if (tevent_req_nterror(req, status)) {
    4115           0 :                 return;
    4116             :         }
    4117             : 
    4118          14 :         tevent_req_done(req);
    4119             : }
    4120             : 
    4121          14 : NTSTATUS dcerpc_wbint_CheckMachineAccount_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4122             : {
    4123           0 :         struct dcerpc_wbint_CheckMachineAccount_r_state *state =
    4124          14 :                 tevent_req_data(req,
    4125             :                 struct dcerpc_wbint_CheckMachineAccount_r_state);
    4126           0 :         NTSTATUS status;
    4127             : 
    4128          14 :         if (tevent_req_is_nterror(req, &status)) {
    4129           0 :                 tevent_req_received(req);
    4130           0 :                 return status;
    4131             :         }
    4132             : 
    4133          14 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4134             : 
    4135          14 :         tevent_req_received(req);
    4136          14 :         return NT_STATUS_OK;
    4137             : }
    4138             : 
    4139           0 : NTSTATUS dcerpc_wbint_CheckMachineAccount_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_CheckMachineAccount *r)
    4140             : {
    4141           0 :         NTSTATUS status;
    4142             : 
    4143           0 :         status = dcerpc_binding_handle_call(h,
    4144             :                         NULL, &ndr_table_winbind,
    4145             :                         NDR_WBINT_CHECKMACHINEACCOUNT, mem_ctx, r);
    4146             : 
    4147           0 :         return status;
    4148             : }
    4149             : 
    4150             : struct dcerpc_wbint_CheckMachineAccount_state {
    4151             :         struct wbint_CheckMachineAccount orig;
    4152             :         struct wbint_CheckMachineAccount tmp;
    4153             :         TALLOC_CTX *out_mem_ctx;
    4154             : };
    4155             : 
    4156             : static void dcerpc_wbint_CheckMachineAccount_done(struct tevent_req *subreq);
    4157             : 
    4158          14 : struct tevent_req *dcerpc_wbint_CheckMachineAccount_send(TALLOC_CTX *mem_ctx,
    4159             :                                                          struct tevent_context *ev,
    4160             :                                                          struct dcerpc_binding_handle *h)
    4161             : {
    4162           0 :         struct tevent_req *req;
    4163           0 :         struct dcerpc_wbint_CheckMachineAccount_state *state;
    4164           0 :         struct tevent_req *subreq;
    4165             : 
    4166          14 :         req = tevent_req_create(mem_ctx, &state,
    4167             :                                 struct dcerpc_wbint_CheckMachineAccount_state);
    4168          14 :         if (req == NULL) {
    4169           0 :                 return NULL;
    4170             :         }
    4171          14 :         state->out_mem_ctx = NULL;
    4172             : 
    4173             :         /* In parameters */
    4174             : 
    4175             :         /* Out parameters */
    4176             : 
    4177             :         /* Result */
    4178          14 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4179             : 
    4180             :         /* make a temporary copy, that we pass to the dispatch function */
    4181          14 :         state->tmp = state->orig;
    4182             : 
    4183          14 :         subreq = dcerpc_wbint_CheckMachineAccount_r_send(state, ev, h, &state->tmp);
    4184          14 :         if (tevent_req_nomem(subreq, req)) {
    4185           0 :                 return tevent_req_post(req, ev);
    4186             :         }
    4187          14 :         tevent_req_set_callback(subreq, dcerpc_wbint_CheckMachineAccount_done, req);
    4188          14 :         return req;
    4189             : }
    4190             : 
    4191          14 : static void dcerpc_wbint_CheckMachineAccount_done(struct tevent_req *subreq)
    4192             : {
    4193          14 :         struct tevent_req *req = tevent_req_callback_data(
    4194             :                 subreq, struct tevent_req);
    4195          14 :         struct dcerpc_wbint_CheckMachineAccount_state *state = tevent_req_data(
    4196             :                 req, struct dcerpc_wbint_CheckMachineAccount_state);
    4197           0 :         NTSTATUS status;
    4198           0 :         TALLOC_CTX *mem_ctx;
    4199             : 
    4200          14 :         if (state->out_mem_ctx) {
    4201           0 :                 mem_ctx = state->out_mem_ctx;
    4202             :         } else {
    4203          14 :                 mem_ctx = state;
    4204             :         }
    4205             : 
    4206          14 :         status = dcerpc_wbint_CheckMachineAccount_r_recv(subreq, mem_ctx);
    4207          14 :         TALLOC_FREE(subreq);
    4208          14 :         if (tevent_req_nterror(req, status)) {
    4209           0 :                 return;
    4210             :         }
    4211             : 
    4212             :         /* Copy out parameters */
    4213             : 
    4214             :         /* Copy result */
    4215          14 :         state->orig.out.result = state->tmp.out.result;
    4216             : 
    4217             :         /* Reset temporary structure */
    4218          14 :         NDR_ZERO_STRUCT(state->tmp);
    4219             : 
    4220          14 :         tevent_req_done(req);
    4221             : }
    4222             : 
    4223          14 : NTSTATUS dcerpc_wbint_CheckMachineAccount_recv(struct tevent_req *req,
    4224             :                                                TALLOC_CTX *mem_ctx,
    4225             :                                                NTSTATUS *result)
    4226             : {
    4227          14 :         struct dcerpc_wbint_CheckMachineAccount_state *state = tevent_req_data(
    4228             :                 req, struct dcerpc_wbint_CheckMachineAccount_state);
    4229           0 :         NTSTATUS status;
    4230             : 
    4231          14 :         if (tevent_req_is_nterror(req, &status)) {
    4232           0 :                 tevent_req_received(req);
    4233           0 :                 return status;
    4234             :         }
    4235             : 
    4236             :         /* Steal possible out parameters to the callers context */
    4237          14 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4238             : 
    4239             :         /* Return result */
    4240          14 :         *result = state->orig.out.result;
    4241             : 
    4242          14 :         tevent_req_received(req);
    4243          14 :         return NT_STATUS_OK;
    4244             : }
    4245             : 
    4246           0 : NTSTATUS dcerpc_wbint_CheckMachineAccount(struct dcerpc_binding_handle *h,
    4247             :                                           TALLOC_CTX *mem_ctx,
    4248             :                                           NTSTATUS *result)
    4249             : {
    4250           0 :         struct wbint_CheckMachineAccount r;
    4251           0 :         NTSTATUS status;
    4252             : 
    4253             :         /* In parameters */
    4254             : 
    4255             :         /* Out parameters */
    4256             : 
    4257             :         /* Result */
    4258           0 :         NDR_ZERO_STRUCT(r.out.result);
    4259             : 
    4260           0 :         status = dcerpc_wbint_CheckMachineAccount_r(h, mem_ctx, &r);
    4261           0 :         if (!NT_STATUS_IS_OK(status)) {
    4262           0 :                 return status;
    4263             :         }
    4264             : 
    4265             :         /* Return variables */
    4266             : 
    4267             :         /* Return result */
    4268           0 :         *result = r.out.result;
    4269             : 
    4270           0 :         return NT_STATUS_OK;
    4271             : }
    4272             : 
    4273             : struct dcerpc_wbint_ChangeMachineAccount_r_state {
    4274             :         TALLOC_CTX *out_mem_ctx;
    4275             : };
    4276             : 
    4277             : static void dcerpc_wbint_ChangeMachineAccount_r_done(struct tevent_req *subreq);
    4278             : 
    4279          16 : struct tevent_req *dcerpc_wbint_ChangeMachineAccount_r_send(TALLOC_CTX *mem_ctx,
    4280             :         struct tevent_context *ev,
    4281             :         struct dcerpc_binding_handle *h,
    4282             :         struct wbint_ChangeMachineAccount *r)
    4283             : {
    4284           0 :         struct tevent_req *req;
    4285           0 :         struct dcerpc_wbint_ChangeMachineAccount_r_state *state;
    4286           0 :         struct tevent_req *subreq;
    4287             : 
    4288          16 :         req = tevent_req_create(mem_ctx, &state,
    4289             :                                 struct dcerpc_wbint_ChangeMachineAccount_r_state);
    4290          16 :         if (req == NULL) {
    4291           0 :                 return NULL;
    4292             :         }
    4293             : 
    4294          16 :         state->out_mem_ctx = NULL;
    4295             : 
    4296          16 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4297             :                         NULL, &ndr_table_winbind,
    4298             :                         NDR_WBINT_CHANGEMACHINEACCOUNT, state, r);
    4299          16 :         if (tevent_req_nomem(subreq, req)) {
    4300           0 :                 return tevent_req_post(req, ev);
    4301             :         }
    4302          16 :         tevent_req_set_callback(subreq, dcerpc_wbint_ChangeMachineAccount_r_done, req);
    4303             : 
    4304          16 :         return req;
    4305             : }
    4306             : 
    4307          16 : static void dcerpc_wbint_ChangeMachineAccount_r_done(struct tevent_req *subreq)
    4308             : {
    4309           0 :         struct tevent_req *req =
    4310          16 :                 tevent_req_callback_data(subreq,
    4311             :                 struct tevent_req);
    4312           0 :         NTSTATUS status;
    4313             : 
    4314          16 :         status = dcerpc_binding_handle_call_recv(subreq);
    4315          16 :         TALLOC_FREE(subreq);
    4316          16 :         if (tevent_req_nterror(req, status)) {
    4317           0 :                 return;
    4318             :         }
    4319             : 
    4320          16 :         tevent_req_done(req);
    4321             : }
    4322             : 
    4323          16 : NTSTATUS dcerpc_wbint_ChangeMachineAccount_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4324             : {
    4325           0 :         struct dcerpc_wbint_ChangeMachineAccount_r_state *state =
    4326          16 :                 tevent_req_data(req,
    4327             :                 struct dcerpc_wbint_ChangeMachineAccount_r_state);
    4328           0 :         NTSTATUS status;
    4329             : 
    4330          16 :         if (tevent_req_is_nterror(req, &status)) {
    4331           0 :                 tevent_req_received(req);
    4332           0 :                 return status;
    4333             :         }
    4334             : 
    4335          16 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4336             : 
    4337          16 :         tevent_req_received(req);
    4338          16 :         return NT_STATUS_OK;
    4339             : }
    4340             : 
    4341           0 : NTSTATUS dcerpc_wbint_ChangeMachineAccount_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_ChangeMachineAccount *r)
    4342             : {
    4343           0 :         NTSTATUS status;
    4344             : 
    4345           0 :         status = dcerpc_binding_handle_call(h,
    4346             :                         NULL, &ndr_table_winbind,
    4347             :                         NDR_WBINT_CHANGEMACHINEACCOUNT, mem_ctx, r);
    4348             : 
    4349           0 :         return status;
    4350             : }
    4351             : 
    4352             : struct dcerpc_wbint_ChangeMachineAccount_state {
    4353             :         struct wbint_ChangeMachineAccount orig;
    4354             :         struct wbint_ChangeMachineAccount tmp;
    4355             :         TALLOC_CTX *out_mem_ctx;
    4356             : };
    4357             : 
    4358             : static void dcerpc_wbint_ChangeMachineAccount_done(struct tevent_req *subreq);
    4359             : 
    4360          16 : struct tevent_req *dcerpc_wbint_ChangeMachineAccount_send(TALLOC_CTX *mem_ctx,
    4361             :                                                           struct tevent_context *ev,
    4362             :                                                           struct dcerpc_binding_handle *h,
    4363             :                                                           const char *_dcname /* [in] [charset(UTF8),unique] */)
    4364             : {
    4365           0 :         struct tevent_req *req;
    4366           0 :         struct dcerpc_wbint_ChangeMachineAccount_state *state;
    4367           0 :         struct tevent_req *subreq;
    4368             : 
    4369          16 :         req = tevent_req_create(mem_ctx, &state,
    4370             :                                 struct dcerpc_wbint_ChangeMachineAccount_state);
    4371          16 :         if (req == NULL) {
    4372           0 :                 return NULL;
    4373             :         }
    4374          16 :         state->out_mem_ctx = NULL;
    4375             : 
    4376             :         /* In parameters */
    4377          16 :         state->orig.in.dcname = _dcname;
    4378             : 
    4379             :         /* Out parameters */
    4380             : 
    4381             :         /* Result */
    4382          16 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4383             : 
    4384             :         /* make a temporary copy, that we pass to the dispatch function */
    4385          16 :         state->tmp = state->orig;
    4386             : 
    4387          16 :         subreq = dcerpc_wbint_ChangeMachineAccount_r_send(state, ev, h, &state->tmp);
    4388          16 :         if (tevent_req_nomem(subreq, req)) {
    4389           0 :                 return tevent_req_post(req, ev);
    4390             :         }
    4391          16 :         tevent_req_set_callback(subreq, dcerpc_wbint_ChangeMachineAccount_done, req);
    4392          16 :         return req;
    4393             : }
    4394             : 
    4395          16 : static void dcerpc_wbint_ChangeMachineAccount_done(struct tevent_req *subreq)
    4396             : {
    4397          16 :         struct tevent_req *req = tevent_req_callback_data(
    4398             :                 subreq, struct tevent_req);
    4399          16 :         struct dcerpc_wbint_ChangeMachineAccount_state *state = tevent_req_data(
    4400             :                 req, struct dcerpc_wbint_ChangeMachineAccount_state);
    4401           0 :         NTSTATUS status;
    4402           0 :         TALLOC_CTX *mem_ctx;
    4403             : 
    4404          16 :         if (state->out_mem_ctx) {
    4405           0 :                 mem_ctx = state->out_mem_ctx;
    4406             :         } else {
    4407          16 :                 mem_ctx = state;
    4408             :         }
    4409             : 
    4410          16 :         status = dcerpc_wbint_ChangeMachineAccount_r_recv(subreq, mem_ctx);
    4411          16 :         TALLOC_FREE(subreq);
    4412          16 :         if (tevent_req_nterror(req, status)) {
    4413           0 :                 return;
    4414             :         }
    4415             : 
    4416             :         /* Copy out parameters */
    4417             : 
    4418             :         /* Copy result */
    4419          16 :         state->orig.out.result = state->tmp.out.result;
    4420             : 
    4421             :         /* Reset temporary structure */
    4422          16 :         NDR_ZERO_STRUCT(state->tmp);
    4423             : 
    4424          16 :         tevent_req_done(req);
    4425             : }
    4426             : 
    4427          16 : NTSTATUS dcerpc_wbint_ChangeMachineAccount_recv(struct tevent_req *req,
    4428             :                                                 TALLOC_CTX *mem_ctx,
    4429             :                                                 NTSTATUS *result)
    4430             : {
    4431          16 :         struct dcerpc_wbint_ChangeMachineAccount_state *state = tevent_req_data(
    4432             :                 req, struct dcerpc_wbint_ChangeMachineAccount_state);
    4433           0 :         NTSTATUS status;
    4434             : 
    4435          16 :         if (tevent_req_is_nterror(req, &status)) {
    4436           0 :                 tevent_req_received(req);
    4437           0 :                 return status;
    4438             :         }
    4439             : 
    4440             :         /* Steal possible out parameters to the callers context */
    4441          16 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4442             : 
    4443             :         /* Return result */
    4444          16 :         *result = state->orig.out.result;
    4445             : 
    4446          16 :         tevent_req_received(req);
    4447          16 :         return NT_STATUS_OK;
    4448             : }
    4449             : 
    4450           0 : NTSTATUS dcerpc_wbint_ChangeMachineAccount(struct dcerpc_binding_handle *h,
    4451             :                                            TALLOC_CTX *mem_ctx,
    4452             :                                            const char *_dcname /* [in] [charset(UTF8),unique] */,
    4453             :                                            NTSTATUS *result)
    4454             : {
    4455           0 :         struct wbint_ChangeMachineAccount r;
    4456           0 :         NTSTATUS status;
    4457             : 
    4458             :         /* In parameters */
    4459           0 :         r.in.dcname = _dcname;
    4460             : 
    4461             :         /* Out parameters */
    4462             : 
    4463             :         /* Result */
    4464           0 :         NDR_ZERO_STRUCT(r.out.result);
    4465             : 
    4466           0 :         status = dcerpc_wbint_ChangeMachineAccount_r(h, mem_ctx, &r);
    4467           0 :         if (!NT_STATUS_IS_OK(status)) {
    4468           0 :                 return status;
    4469             :         }
    4470             : 
    4471             :         /* Return variables */
    4472             : 
    4473             :         /* Return result */
    4474           0 :         *result = r.out.result;
    4475             : 
    4476           0 :         return NT_STATUS_OK;
    4477             : }
    4478             : 
    4479             : struct dcerpc_wbint_PingDc_r_state {
    4480             :         TALLOC_CTX *out_mem_ctx;
    4481             : };
    4482             : 
    4483             : static void dcerpc_wbint_PingDc_r_done(struct tevent_req *subreq);
    4484             : 
    4485          76 : struct tevent_req *dcerpc_wbint_PingDc_r_send(TALLOC_CTX *mem_ctx,
    4486             :         struct tevent_context *ev,
    4487             :         struct dcerpc_binding_handle *h,
    4488             :         struct wbint_PingDc *r)
    4489             : {
    4490           0 :         struct tevent_req *req;
    4491           0 :         struct dcerpc_wbint_PingDc_r_state *state;
    4492           0 :         struct tevent_req *subreq;
    4493             : 
    4494          76 :         req = tevent_req_create(mem_ctx, &state,
    4495             :                                 struct dcerpc_wbint_PingDc_r_state);
    4496          76 :         if (req == NULL) {
    4497           0 :                 return NULL;
    4498             :         }
    4499             : 
    4500          76 :         state->out_mem_ctx = talloc_new(state);
    4501          76 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4502           0 :                 return tevent_req_post(req, ev);
    4503             :         }
    4504             : 
    4505          76 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4506             :                         NULL, &ndr_table_winbind,
    4507          76 :                         NDR_WBINT_PINGDC, state->out_mem_ctx, r);
    4508          76 :         if (tevent_req_nomem(subreq, req)) {
    4509           0 :                 return tevent_req_post(req, ev);
    4510             :         }
    4511          76 :         tevent_req_set_callback(subreq, dcerpc_wbint_PingDc_r_done, req);
    4512             : 
    4513          76 :         return req;
    4514             : }
    4515             : 
    4516          76 : static void dcerpc_wbint_PingDc_r_done(struct tevent_req *subreq)
    4517             : {
    4518           0 :         struct tevent_req *req =
    4519          76 :                 tevent_req_callback_data(subreq,
    4520             :                 struct tevent_req);
    4521           0 :         NTSTATUS status;
    4522             : 
    4523          76 :         status = dcerpc_binding_handle_call_recv(subreq);
    4524          76 :         TALLOC_FREE(subreq);
    4525          76 :         if (tevent_req_nterror(req, status)) {
    4526           0 :                 return;
    4527             :         }
    4528             : 
    4529          76 :         tevent_req_done(req);
    4530             : }
    4531             : 
    4532          76 : NTSTATUS dcerpc_wbint_PingDc_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4533             : {
    4534           0 :         struct dcerpc_wbint_PingDc_r_state *state =
    4535          76 :                 tevent_req_data(req,
    4536             :                 struct dcerpc_wbint_PingDc_r_state);
    4537           0 :         NTSTATUS status;
    4538             : 
    4539          76 :         if (tevent_req_is_nterror(req, &status)) {
    4540           0 :                 tevent_req_received(req);
    4541           0 :                 return status;
    4542             :         }
    4543             : 
    4544          76 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4545             : 
    4546          76 :         tevent_req_received(req);
    4547          76 :         return NT_STATUS_OK;
    4548             : }
    4549             : 
    4550           0 : NTSTATUS dcerpc_wbint_PingDc_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_PingDc *r)
    4551             : {
    4552           0 :         NTSTATUS status;
    4553             : 
    4554           0 :         status = dcerpc_binding_handle_call(h,
    4555             :                         NULL, &ndr_table_winbind,
    4556             :                         NDR_WBINT_PINGDC, mem_ctx, r);
    4557             : 
    4558           0 :         return status;
    4559             : }
    4560             : 
    4561             : struct dcerpc_wbint_PingDc_state {
    4562             :         struct wbint_PingDc orig;
    4563             :         struct wbint_PingDc tmp;
    4564             :         TALLOC_CTX *out_mem_ctx;
    4565             : };
    4566             : 
    4567             : static void dcerpc_wbint_PingDc_done(struct tevent_req *subreq);
    4568             : 
    4569          76 : struct tevent_req *dcerpc_wbint_PingDc_send(TALLOC_CTX *mem_ctx,
    4570             :                                             struct tevent_context *ev,
    4571             :                                             struct dcerpc_binding_handle *h,
    4572             :                                             const char **_dcname /* [out] [charset(UTF8),ref] */)
    4573             : {
    4574           0 :         struct tevent_req *req;
    4575           0 :         struct dcerpc_wbint_PingDc_state *state;
    4576           0 :         struct tevent_req *subreq;
    4577             : 
    4578          76 :         req = tevent_req_create(mem_ctx, &state,
    4579             :                                 struct dcerpc_wbint_PingDc_state);
    4580          76 :         if (req == NULL) {
    4581           0 :                 return NULL;
    4582             :         }
    4583          76 :         state->out_mem_ctx = NULL;
    4584             : 
    4585             :         /* In parameters */
    4586             : 
    4587             :         /* Out parameters */
    4588          76 :         state->orig.out.dcname = _dcname;
    4589             : 
    4590             :         /* Result */
    4591          76 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4592             : 
    4593          76 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4594             :                              "dcerpc_wbint_PingDc_out_memory");
    4595          76 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4596           0 :                 return tevent_req_post(req, ev);
    4597             :         }
    4598             : 
    4599             :         /* make a temporary copy, that we pass to the dispatch function */
    4600          76 :         state->tmp = state->orig;
    4601             : 
    4602          76 :         subreq = dcerpc_wbint_PingDc_r_send(state, ev, h, &state->tmp);
    4603          76 :         if (tevent_req_nomem(subreq, req)) {
    4604           0 :                 return tevent_req_post(req, ev);
    4605             :         }
    4606          76 :         tevent_req_set_callback(subreq, dcerpc_wbint_PingDc_done, req);
    4607          76 :         return req;
    4608             : }
    4609             : 
    4610          76 : static void dcerpc_wbint_PingDc_done(struct tevent_req *subreq)
    4611             : {
    4612          76 :         struct tevent_req *req = tevent_req_callback_data(
    4613             :                 subreq, struct tevent_req);
    4614          76 :         struct dcerpc_wbint_PingDc_state *state = tevent_req_data(
    4615             :                 req, struct dcerpc_wbint_PingDc_state);
    4616           0 :         NTSTATUS status;
    4617           0 :         TALLOC_CTX *mem_ctx;
    4618             : 
    4619          76 :         if (state->out_mem_ctx) {
    4620          76 :                 mem_ctx = state->out_mem_ctx;
    4621             :         } else {
    4622           0 :                 mem_ctx = state;
    4623             :         }
    4624             : 
    4625          76 :         status = dcerpc_wbint_PingDc_r_recv(subreq, mem_ctx);
    4626          76 :         TALLOC_FREE(subreq);
    4627          76 :         if (tevent_req_nterror(req, status)) {
    4628           0 :                 return;
    4629             :         }
    4630             : 
    4631             :         /* Copy out parameters */
    4632          76 :         *state->orig.out.dcname = *state->tmp.out.dcname;
    4633             : 
    4634             :         /* Copy result */
    4635          76 :         state->orig.out.result = state->tmp.out.result;
    4636             : 
    4637             :         /* Reset temporary structure */
    4638          76 :         NDR_ZERO_STRUCT(state->tmp);
    4639             : 
    4640          76 :         tevent_req_done(req);
    4641             : }
    4642             : 
    4643          76 : NTSTATUS dcerpc_wbint_PingDc_recv(struct tevent_req *req,
    4644             :                                   TALLOC_CTX *mem_ctx,
    4645             :                                   NTSTATUS *result)
    4646             : {
    4647          76 :         struct dcerpc_wbint_PingDc_state *state = tevent_req_data(
    4648             :                 req, struct dcerpc_wbint_PingDc_state);
    4649           0 :         NTSTATUS status;
    4650             : 
    4651          76 :         if (tevent_req_is_nterror(req, &status)) {
    4652           0 :                 tevent_req_received(req);
    4653           0 :                 return status;
    4654             :         }
    4655             : 
    4656             :         /* Steal possible out parameters to the callers context */
    4657          76 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4658             : 
    4659             :         /* Return result */
    4660          76 :         *result = state->orig.out.result;
    4661             : 
    4662          76 :         tevent_req_received(req);
    4663          76 :         return NT_STATUS_OK;
    4664             : }
    4665             : 
    4666           0 : NTSTATUS dcerpc_wbint_PingDc(struct dcerpc_binding_handle *h,
    4667             :                              TALLOC_CTX *mem_ctx,
    4668             :                              const char **_dcname /* [out] [charset(UTF8),ref] */,
    4669             :                              NTSTATUS *result)
    4670             : {
    4671           0 :         struct wbint_PingDc r;
    4672           0 :         NTSTATUS status;
    4673             : 
    4674             :         /* In parameters */
    4675             : 
    4676             :         /* Out parameters */
    4677           0 :         r.out.dcname = _dcname;
    4678             : 
    4679             :         /* Result */
    4680           0 :         NDR_ZERO_STRUCT(r.out.result);
    4681             : 
    4682           0 :         status = dcerpc_wbint_PingDc_r(h, mem_ctx, &r);
    4683           0 :         if (!NT_STATUS_IS_OK(status)) {
    4684           0 :                 return status;
    4685             :         }
    4686             : 
    4687             :         /* Return variables */
    4688           0 :         *_dcname = *r.out.dcname;
    4689             : 
    4690             :         /* Return result */
    4691           0 :         *result = r.out.result;
    4692             : 
    4693           0 :         return NT_STATUS_OK;
    4694             : }
    4695             : 
    4696             : struct dcerpc_wbint_ListTrustedDomains_r_state {
    4697             :         TALLOC_CTX *out_mem_ctx;
    4698             : };
    4699             : 
    4700             : static void dcerpc_wbint_ListTrustedDomains_r_done(struct tevent_req *subreq);
    4701             : 
    4702           8 : struct tevent_req *dcerpc_wbint_ListTrustedDomains_r_send(TALLOC_CTX *mem_ctx,
    4703             :         struct tevent_context *ev,
    4704             :         struct dcerpc_binding_handle *h,
    4705             :         struct wbint_ListTrustedDomains *r)
    4706             : {
    4707           0 :         struct tevent_req *req;
    4708           0 :         struct dcerpc_wbint_ListTrustedDomains_r_state *state;
    4709           0 :         struct tevent_req *subreq;
    4710             : 
    4711           8 :         req = tevent_req_create(mem_ctx, &state,
    4712             :                                 struct dcerpc_wbint_ListTrustedDomains_r_state);
    4713           8 :         if (req == NULL) {
    4714           0 :                 return NULL;
    4715             :         }
    4716             : 
    4717           8 :         state->out_mem_ctx = talloc_new(state);
    4718           8 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4719           0 :                 return tevent_req_post(req, ev);
    4720             :         }
    4721             : 
    4722           8 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4723             :                         NULL, &ndr_table_winbind,
    4724           8 :                         NDR_WBINT_LISTTRUSTEDDOMAINS, state->out_mem_ctx, r);
    4725           8 :         if (tevent_req_nomem(subreq, req)) {
    4726           0 :                 return tevent_req_post(req, ev);
    4727             :         }
    4728           8 :         tevent_req_set_callback(subreq, dcerpc_wbint_ListTrustedDomains_r_done, req);
    4729             : 
    4730           8 :         return req;
    4731             : }
    4732             : 
    4733           8 : static void dcerpc_wbint_ListTrustedDomains_r_done(struct tevent_req *subreq)
    4734             : {
    4735           0 :         struct tevent_req *req =
    4736           8 :                 tevent_req_callback_data(subreq,
    4737             :                 struct tevent_req);
    4738           0 :         NTSTATUS status;
    4739             : 
    4740           8 :         status = dcerpc_binding_handle_call_recv(subreq);
    4741           8 :         TALLOC_FREE(subreq);
    4742           8 :         if (tevent_req_nterror(req, status)) {
    4743           0 :                 return;
    4744             :         }
    4745             : 
    4746           8 :         tevent_req_done(req);
    4747             : }
    4748             : 
    4749           8 : NTSTATUS dcerpc_wbint_ListTrustedDomains_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4750             : {
    4751           0 :         struct dcerpc_wbint_ListTrustedDomains_r_state *state =
    4752           8 :                 tevent_req_data(req,
    4753             :                 struct dcerpc_wbint_ListTrustedDomains_r_state);
    4754           0 :         NTSTATUS status;
    4755             : 
    4756           8 :         if (tevent_req_is_nterror(req, &status)) {
    4757           0 :                 tevent_req_received(req);
    4758           0 :                 return status;
    4759             :         }
    4760             : 
    4761           8 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4762             : 
    4763           8 :         tevent_req_received(req);
    4764           8 :         return NT_STATUS_OK;
    4765             : }
    4766             : 
    4767           0 : NTSTATUS dcerpc_wbint_ListTrustedDomains_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_ListTrustedDomains *r)
    4768             : {
    4769           0 :         NTSTATUS status;
    4770             : 
    4771           0 :         status = dcerpc_binding_handle_call(h,
    4772             :                         NULL, &ndr_table_winbind,
    4773             :                         NDR_WBINT_LISTTRUSTEDDOMAINS, mem_ctx, r);
    4774             : 
    4775           0 :         return status;
    4776             : }
    4777             : 
    4778             : struct dcerpc_wbint_ListTrustedDomains_state {
    4779             :         struct wbint_ListTrustedDomains orig;
    4780             :         struct wbint_ListTrustedDomains tmp;
    4781             :         TALLOC_CTX *out_mem_ctx;
    4782             : };
    4783             : 
    4784             : static void dcerpc_wbint_ListTrustedDomains_done(struct tevent_req *subreq);
    4785             : 
    4786           8 : struct tevent_req *dcerpc_wbint_ListTrustedDomains_send(TALLOC_CTX *mem_ctx,
    4787             :                                                         struct tevent_context *ev,
    4788             :                                                         struct dcerpc_binding_handle *h,
    4789             :                                                         const char *_client_name /* [in] [charset(UTF8),ref] */,
    4790             :                                                         uint64_t _client_pid /* [in]  */,
    4791             :                                                         struct netr_DomainTrustList *_domains /* [out] [ref] */)
    4792             : {
    4793           0 :         struct tevent_req *req;
    4794           0 :         struct dcerpc_wbint_ListTrustedDomains_state *state;
    4795           0 :         struct tevent_req *subreq;
    4796             : 
    4797           8 :         req = tevent_req_create(mem_ctx, &state,
    4798             :                                 struct dcerpc_wbint_ListTrustedDomains_state);
    4799           8 :         if (req == NULL) {
    4800           0 :                 return NULL;
    4801             :         }
    4802           8 :         state->out_mem_ctx = NULL;
    4803             : 
    4804             :         /* In parameters */
    4805           8 :         state->orig.in.client_name = _client_name;
    4806           8 :         state->orig.in.client_pid = _client_pid;
    4807             : 
    4808             :         /* Out parameters */
    4809           8 :         state->orig.out.domains = _domains;
    4810             : 
    4811             :         /* Result */
    4812           8 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4813             : 
    4814           8 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4815             :                              "dcerpc_wbint_ListTrustedDomains_out_memory");
    4816           8 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4817           0 :                 return tevent_req_post(req, ev);
    4818             :         }
    4819             : 
    4820             :         /* make a temporary copy, that we pass to the dispatch function */
    4821           8 :         state->tmp = state->orig;
    4822             : 
    4823           8 :         subreq = dcerpc_wbint_ListTrustedDomains_r_send(state, ev, h, &state->tmp);
    4824           8 :         if (tevent_req_nomem(subreq, req)) {
    4825           0 :                 return tevent_req_post(req, ev);
    4826             :         }
    4827           8 :         tevent_req_set_callback(subreq, dcerpc_wbint_ListTrustedDomains_done, req);
    4828           8 :         return req;
    4829             : }
    4830             : 
    4831           8 : static void dcerpc_wbint_ListTrustedDomains_done(struct tevent_req *subreq)
    4832             : {
    4833           8 :         struct tevent_req *req = tevent_req_callback_data(
    4834             :                 subreq, struct tevent_req);
    4835           8 :         struct dcerpc_wbint_ListTrustedDomains_state *state = tevent_req_data(
    4836             :                 req, struct dcerpc_wbint_ListTrustedDomains_state);
    4837           0 :         NTSTATUS status;
    4838           0 :         TALLOC_CTX *mem_ctx;
    4839             : 
    4840           8 :         if (state->out_mem_ctx) {
    4841           8 :                 mem_ctx = state->out_mem_ctx;
    4842             :         } else {
    4843           0 :                 mem_ctx = state;
    4844             :         }
    4845             : 
    4846           8 :         status = dcerpc_wbint_ListTrustedDomains_r_recv(subreq, mem_ctx);
    4847           8 :         TALLOC_FREE(subreq);
    4848           8 :         if (tevent_req_nterror(req, status)) {
    4849           0 :                 return;
    4850             :         }
    4851             : 
    4852             :         /* Copy out parameters */
    4853           8 :         *state->orig.out.domains = *state->tmp.out.domains;
    4854             : 
    4855             :         /* Copy result */
    4856           8 :         state->orig.out.result = state->tmp.out.result;
    4857             : 
    4858             :         /* Reset temporary structure */
    4859           8 :         NDR_ZERO_STRUCT(state->tmp);
    4860             : 
    4861           8 :         tevent_req_done(req);
    4862             : }
    4863             : 
    4864           8 : NTSTATUS dcerpc_wbint_ListTrustedDomains_recv(struct tevent_req *req,
    4865             :                                               TALLOC_CTX *mem_ctx,
    4866             :                                               NTSTATUS *result)
    4867             : {
    4868           8 :         struct dcerpc_wbint_ListTrustedDomains_state *state = tevent_req_data(
    4869             :                 req, struct dcerpc_wbint_ListTrustedDomains_state);
    4870           0 :         NTSTATUS status;
    4871             : 
    4872           8 :         if (tevent_req_is_nterror(req, &status)) {
    4873           0 :                 tevent_req_received(req);
    4874           0 :                 return status;
    4875             :         }
    4876             : 
    4877             :         /* Steal possible out parameters to the callers context */
    4878           8 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4879             : 
    4880             :         /* Return result */
    4881           8 :         *result = state->orig.out.result;
    4882             : 
    4883           8 :         tevent_req_received(req);
    4884           8 :         return NT_STATUS_OK;
    4885             : }
    4886             : 
    4887           0 : NTSTATUS dcerpc_wbint_ListTrustedDomains(struct dcerpc_binding_handle *h,
    4888             :                                          TALLOC_CTX *mem_ctx,
    4889             :                                          const char *_client_name /* [in] [charset(UTF8),ref] */,
    4890             :                                          uint64_t _client_pid /* [in]  */,
    4891             :                                          struct netr_DomainTrustList *_domains /* [out] [ref] */,
    4892             :                                          NTSTATUS *result)
    4893             : {
    4894           0 :         struct wbint_ListTrustedDomains r;
    4895           0 :         NTSTATUS status;
    4896             : 
    4897             :         /* In parameters */
    4898           0 :         r.in.client_name = _client_name;
    4899           0 :         r.in.client_pid = _client_pid;
    4900             : 
    4901             :         /* Out parameters */
    4902           0 :         r.out.domains = _domains;
    4903             : 
    4904             :         /* Result */
    4905           0 :         NDR_ZERO_STRUCT(r.out.result);
    4906             : 
    4907           0 :         status = dcerpc_wbint_ListTrustedDomains_r(h, mem_ctx, &r);
    4908           0 :         if (!NT_STATUS_IS_OK(status)) {
    4909           0 :                 return status;
    4910             :         }
    4911             : 
    4912             :         /* Return variables */
    4913           0 :         *_domains = *r.out.domains;
    4914             : 
    4915             :         /* Return result */
    4916           0 :         *result = r.out.result;
    4917             : 
    4918           0 :         return NT_STATUS_OK;
    4919             : }
    4920             : 
    4921             : struct dcerpc_wbint_PamAuth_r_state {
    4922             :         TALLOC_CTX *out_mem_ctx;
    4923             : };
    4924             : 
    4925             : static void dcerpc_wbint_PamAuth_r_done(struct tevent_req *subreq);
    4926             : 
    4927         391 : struct tevent_req *dcerpc_wbint_PamAuth_r_send(TALLOC_CTX *mem_ctx,
    4928             :         struct tevent_context *ev,
    4929             :         struct dcerpc_binding_handle *h,
    4930             :         struct wbint_PamAuth *r)
    4931             : {
    4932           0 :         struct tevent_req *req;
    4933           0 :         struct dcerpc_wbint_PamAuth_r_state *state;
    4934           0 :         struct tevent_req *subreq;
    4935             : 
    4936         391 :         req = tevent_req_create(mem_ctx, &state,
    4937             :                                 struct dcerpc_wbint_PamAuth_r_state);
    4938         391 :         if (req == NULL) {
    4939           0 :                 return NULL;
    4940             :         }
    4941             : 
    4942         391 :         state->out_mem_ctx = talloc_new(state);
    4943         391 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4944           0 :                 return tevent_req_post(req, ev);
    4945             :         }
    4946             : 
    4947         391 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4948             :                         NULL, &ndr_table_winbind,
    4949         391 :                         NDR_WBINT_PAMAUTH, state->out_mem_ctx, r);
    4950         391 :         if (tevent_req_nomem(subreq, req)) {
    4951           0 :                 return tevent_req_post(req, ev);
    4952             :         }
    4953         391 :         tevent_req_set_callback(subreq, dcerpc_wbint_PamAuth_r_done, req);
    4954             : 
    4955         391 :         return req;
    4956             : }
    4957             : 
    4958         391 : static void dcerpc_wbint_PamAuth_r_done(struct tevent_req *subreq)
    4959             : {
    4960           0 :         struct tevent_req *req =
    4961         391 :                 tevent_req_callback_data(subreq,
    4962             :                 struct tevent_req);
    4963           0 :         NTSTATUS status;
    4964             : 
    4965         391 :         status = dcerpc_binding_handle_call_recv(subreq);
    4966         391 :         TALLOC_FREE(subreq);
    4967         391 :         if (tevent_req_nterror(req, status)) {
    4968           0 :                 return;
    4969             :         }
    4970             : 
    4971         391 :         tevent_req_done(req);
    4972             : }
    4973             : 
    4974         391 : NTSTATUS dcerpc_wbint_PamAuth_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4975             : {
    4976           0 :         struct dcerpc_wbint_PamAuth_r_state *state =
    4977         391 :                 tevent_req_data(req,
    4978             :                 struct dcerpc_wbint_PamAuth_r_state);
    4979           0 :         NTSTATUS status;
    4980             : 
    4981         391 :         if (tevent_req_is_nterror(req, &status)) {
    4982           0 :                 tevent_req_received(req);
    4983           0 :                 return status;
    4984             :         }
    4985             : 
    4986         391 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4987             : 
    4988         391 :         tevent_req_received(req);
    4989         391 :         return NT_STATUS_OK;
    4990             : }
    4991             : 
    4992           0 : NTSTATUS dcerpc_wbint_PamAuth_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_PamAuth *r)
    4993             : {
    4994           0 :         NTSTATUS status;
    4995             : 
    4996           0 :         status = dcerpc_binding_handle_call(h,
    4997             :                         NULL, &ndr_table_winbind,
    4998             :                         NDR_WBINT_PAMAUTH, mem_ctx, r);
    4999             : 
    5000           0 :         return status;
    5001             : }
    5002             : 
    5003             : struct dcerpc_wbint_PamAuth_state {
    5004             :         struct wbint_PamAuth orig;
    5005             :         struct wbint_PamAuth tmp;
    5006             :         TALLOC_CTX *out_mem_ctx;
    5007             : };
    5008             : 
    5009             : static void dcerpc_wbint_PamAuth_done(struct tevent_req *subreq);
    5010             : 
    5011           0 : struct tevent_req *dcerpc_wbint_PamAuth_send(TALLOC_CTX *mem_ctx,
    5012             :                                              struct tevent_context *ev,
    5013             :                                              struct dcerpc_binding_handle *h,
    5014             :                                              const char *_client_name /* [in] [charset(UTF8),ref] */,
    5015             :                                              uint64_t _client_pid /* [in]  */,
    5016             :                                              uint32_t _flags /* [in]  */,
    5017             :                                              struct wbint_AuthUserInfo *_info /* [in] [ref] */,
    5018             :                                              struct wbint_SidArray *_require_membership_of_sid /* [in] [ref] */,
    5019             :                                              struct wbint_Validation *_validation /* [out] [ref] */)
    5020             : {
    5021           0 :         struct tevent_req *req;
    5022           0 :         struct dcerpc_wbint_PamAuth_state *state;
    5023           0 :         struct tevent_req *subreq;
    5024             : 
    5025           0 :         req = tevent_req_create(mem_ctx, &state,
    5026             :                                 struct dcerpc_wbint_PamAuth_state);
    5027           0 :         if (req == NULL) {
    5028           0 :                 return NULL;
    5029             :         }
    5030           0 :         state->out_mem_ctx = NULL;
    5031             : 
    5032             :         /* In parameters */
    5033           0 :         state->orig.in.client_name = _client_name;
    5034           0 :         state->orig.in.client_pid = _client_pid;
    5035           0 :         state->orig.in.flags = _flags;
    5036           0 :         state->orig.in.info = _info;
    5037           0 :         state->orig.in.require_membership_of_sid = _require_membership_of_sid;
    5038             : 
    5039             :         /* Out parameters */
    5040           0 :         state->orig.out.validation = _validation;
    5041             : 
    5042             :         /* Result */
    5043           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5044             : 
    5045           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5046             :                              "dcerpc_wbint_PamAuth_out_memory");
    5047           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5048           0 :                 return tevent_req_post(req, ev);
    5049             :         }
    5050             : 
    5051             :         /* make a temporary copy, that we pass to the dispatch function */
    5052           0 :         state->tmp = state->orig;
    5053             : 
    5054           0 :         subreq = dcerpc_wbint_PamAuth_r_send(state, ev, h, &state->tmp);
    5055           0 :         if (tevent_req_nomem(subreq, req)) {
    5056           0 :                 return tevent_req_post(req, ev);
    5057             :         }
    5058           0 :         tevent_req_set_callback(subreq, dcerpc_wbint_PamAuth_done, req);
    5059           0 :         return req;
    5060             : }
    5061             : 
    5062           0 : static void dcerpc_wbint_PamAuth_done(struct tevent_req *subreq)
    5063             : {
    5064           0 :         struct tevent_req *req = tevent_req_callback_data(
    5065             :                 subreq, struct tevent_req);
    5066           0 :         struct dcerpc_wbint_PamAuth_state *state = tevent_req_data(
    5067             :                 req, struct dcerpc_wbint_PamAuth_state);
    5068           0 :         NTSTATUS status;
    5069           0 :         TALLOC_CTX *mem_ctx;
    5070             : 
    5071           0 :         if (state->out_mem_ctx) {
    5072           0 :                 mem_ctx = state->out_mem_ctx;
    5073             :         } else {
    5074           0 :                 mem_ctx = state;
    5075             :         }
    5076             : 
    5077           0 :         status = dcerpc_wbint_PamAuth_r_recv(subreq, mem_ctx);
    5078           0 :         TALLOC_FREE(subreq);
    5079           0 :         if (tevent_req_nterror(req, status)) {
    5080           0 :                 return;
    5081             :         }
    5082             : 
    5083             :         /* Copy out parameters */
    5084           0 :         *state->orig.out.validation = *state->tmp.out.validation;
    5085             : 
    5086             :         /* Copy result */
    5087           0 :         state->orig.out.result = state->tmp.out.result;
    5088             : 
    5089             :         /* Reset temporary structure */
    5090           0 :         NDR_ZERO_STRUCT(state->tmp);
    5091             : 
    5092           0 :         tevent_req_done(req);
    5093             : }
    5094             : 
    5095           0 : NTSTATUS dcerpc_wbint_PamAuth_recv(struct tevent_req *req,
    5096             :                                    TALLOC_CTX *mem_ctx,
    5097             :                                    NTSTATUS *result)
    5098             : {
    5099           0 :         struct dcerpc_wbint_PamAuth_state *state = tevent_req_data(
    5100             :                 req, struct dcerpc_wbint_PamAuth_state);
    5101           0 :         NTSTATUS status;
    5102             : 
    5103           0 :         if (tevent_req_is_nterror(req, &status)) {
    5104           0 :                 tevent_req_received(req);
    5105           0 :                 return status;
    5106             :         }
    5107             : 
    5108             :         /* Steal possible out parameters to the callers context */
    5109           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5110             : 
    5111             :         /* Return result */
    5112           0 :         *result = state->orig.out.result;
    5113             : 
    5114           0 :         tevent_req_received(req);
    5115           0 :         return NT_STATUS_OK;
    5116             : }
    5117             : 
    5118           0 : NTSTATUS dcerpc_wbint_PamAuth(struct dcerpc_binding_handle *h,
    5119             :                               TALLOC_CTX *mem_ctx,
    5120             :                               const char *_client_name /* [in] [charset(UTF8),ref] */,
    5121             :                               uint64_t _client_pid /* [in]  */,
    5122             :                               uint32_t _flags /* [in]  */,
    5123             :                               struct wbint_AuthUserInfo *_info /* [in] [ref] */,
    5124             :                               struct wbint_SidArray *_require_membership_of_sid /* [in] [ref] */,
    5125             :                               struct wbint_Validation *_validation /* [out] [ref] */,
    5126             :                               NTSTATUS *result)
    5127             : {
    5128           0 :         struct wbint_PamAuth r;
    5129           0 :         NTSTATUS status;
    5130             : 
    5131             :         /* In parameters */
    5132           0 :         r.in.client_name = _client_name;
    5133           0 :         r.in.client_pid = _client_pid;
    5134           0 :         r.in.flags = _flags;
    5135           0 :         r.in.info = _info;
    5136           0 :         r.in.require_membership_of_sid = _require_membership_of_sid;
    5137             : 
    5138             :         /* Out parameters */
    5139           0 :         r.out.validation = _validation;
    5140             : 
    5141             :         /* Result */
    5142           0 :         NDR_ZERO_STRUCT(r.out.result);
    5143             : 
    5144           0 :         status = dcerpc_wbint_PamAuth_r(h, mem_ctx, &r);
    5145           0 :         if (!NT_STATUS_IS_OK(status)) {
    5146           0 :                 return status;
    5147             :         }
    5148             : 
    5149             :         /* Return variables */
    5150           0 :         *_validation = *r.out.validation;
    5151             : 
    5152             :         /* Return result */
    5153           0 :         *result = r.out.result;
    5154             : 
    5155           0 :         return NT_STATUS_OK;
    5156             : }
    5157             : 
    5158             : struct dcerpc_wbint_PamAuthCrap_r_state {
    5159             :         TALLOC_CTX *out_mem_ctx;
    5160             : };
    5161             : 
    5162             : static void dcerpc_wbint_PamAuthCrap_r_done(struct tevent_req *subreq);
    5163             : 
    5164         710 : struct tevent_req *dcerpc_wbint_PamAuthCrap_r_send(TALLOC_CTX *mem_ctx,
    5165             :         struct tevent_context *ev,
    5166             :         struct dcerpc_binding_handle *h,
    5167             :         struct wbint_PamAuthCrap *r)
    5168             : {
    5169           0 :         struct tevent_req *req;
    5170           0 :         struct dcerpc_wbint_PamAuthCrap_r_state *state;
    5171           0 :         struct tevent_req *subreq;
    5172             : 
    5173         710 :         req = tevent_req_create(mem_ctx, &state,
    5174             :                                 struct dcerpc_wbint_PamAuthCrap_r_state);
    5175         710 :         if (req == NULL) {
    5176           0 :                 return NULL;
    5177             :         }
    5178             : 
    5179         710 :         state->out_mem_ctx = talloc_new(state);
    5180         710 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5181           0 :                 return tevent_req_post(req, ev);
    5182             :         }
    5183             : 
    5184         710 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5185             :                         NULL, &ndr_table_winbind,
    5186         710 :                         NDR_WBINT_PAMAUTHCRAP, state->out_mem_ctx, r);
    5187         710 :         if (tevent_req_nomem(subreq, req)) {
    5188           0 :                 return tevent_req_post(req, ev);
    5189             :         }
    5190         710 :         tevent_req_set_callback(subreq, dcerpc_wbint_PamAuthCrap_r_done, req);
    5191             : 
    5192         710 :         return req;
    5193             : }
    5194             : 
    5195         710 : static void dcerpc_wbint_PamAuthCrap_r_done(struct tevent_req *subreq)
    5196             : {
    5197           0 :         struct tevent_req *req =
    5198         710 :                 tevent_req_callback_data(subreq,
    5199             :                 struct tevent_req);
    5200           0 :         NTSTATUS status;
    5201             : 
    5202         710 :         status = dcerpc_binding_handle_call_recv(subreq);
    5203         710 :         TALLOC_FREE(subreq);
    5204         710 :         if (tevent_req_nterror(req, status)) {
    5205           0 :                 return;
    5206             :         }
    5207             : 
    5208         710 :         tevent_req_done(req);
    5209             : }
    5210             : 
    5211         710 : NTSTATUS dcerpc_wbint_PamAuthCrap_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5212             : {
    5213           0 :         struct dcerpc_wbint_PamAuthCrap_r_state *state =
    5214         710 :                 tevent_req_data(req,
    5215             :                 struct dcerpc_wbint_PamAuthCrap_r_state);
    5216           0 :         NTSTATUS status;
    5217             : 
    5218         710 :         if (tevent_req_is_nterror(req, &status)) {
    5219           0 :                 tevent_req_received(req);
    5220           0 :                 return status;
    5221             :         }
    5222             : 
    5223         710 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5224             : 
    5225         710 :         tevent_req_received(req);
    5226         710 :         return NT_STATUS_OK;
    5227             : }
    5228             : 
    5229           0 : NTSTATUS dcerpc_wbint_PamAuthCrap_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_PamAuthCrap *r)
    5230             : {
    5231           0 :         NTSTATUS status;
    5232             : 
    5233           0 :         status = dcerpc_binding_handle_call(h,
    5234             :                         NULL, &ndr_table_winbind,
    5235             :                         NDR_WBINT_PAMAUTHCRAP, mem_ctx, r);
    5236             : 
    5237           0 :         return status;
    5238             : }
    5239             : 
    5240             : struct dcerpc_wbint_PamAuthCrap_state {
    5241             :         struct wbint_PamAuthCrap orig;
    5242             :         struct wbint_PamAuthCrap tmp;
    5243             :         TALLOC_CTX *out_mem_ctx;
    5244             : };
    5245             : 
    5246             : static void dcerpc_wbint_PamAuthCrap_done(struct tevent_req *subreq);
    5247             : 
    5248         710 : struct tevent_req *dcerpc_wbint_PamAuthCrap_send(TALLOC_CTX *mem_ctx,
    5249             :                                                  struct tevent_context *ev,
    5250             :                                                  struct dcerpc_binding_handle *h,
    5251             :                                                  const char *_client_name /* [in] [charset(UTF8),ref] */,
    5252             :                                                  uint64_t _client_pid /* [in]  */,
    5253             :                                                  uint32_t _flags /* [in]  */,
    5254             :                                                  const char *_user /* [in] [charset(UTF8),ref] */,
    5255             :                                                  const char *_domain /* [in] [charset(UTF8),ref] */,
    5256             :                                                  const char *_workstation /* [in] [charset(UTF8),ref] */,
    5257             :                                                  DATA_BLOB _lm_resp /* [in] [flag(LIBNDR_FLAG_IS_SECRET)] */,
    5258             :                                                  DATA_BLOB _nt_resp /* [in] [flag(LIBNDR_FLAG_IS_SECRET)] */,
    5259             :                                                  DATA_BLOB _chal /* [in] [flag(LIBNDR_FLAG_IS_SECRET)] */,
    5260             :                                                  uint32_t _logon_parameters /* [in]  */,
    5261             :                                                  struct wbint_SidArray *_require_membership_of_sid /* [in] [ref] */,
    5262             :                                                  uint8_t *_authoritative /* [out] [ref] */,
    5263             :                                                  struct wbint_PamAuthCrapValidation *_validation /* [out] [ref] */)
    5264             : {
    5265           0 :         struct tevent_req *req;
    5266           0 :         struct dcerpc_wbint_PamAuthCrap_state *state;
    5267           0 :         struct tevent_req *subreq;
    5268             : 
    5269         710 :         req = tevent_req_create(mem_ctx, &state,
    5270             :                                 struct dcerpc_wbint_PamAuthCrap_state);
    5271         710 :         if (req == NULL) {
    5272           0 :                 return NULL;
    5273             :         }
    5274         710 :         state->out_mem_ctx = NULL;
    5275             : 
    5276             :         /* In parameters */
    5277         710 :         state->orig.in.client_name = _client_name;
    5278         710 :         state->orig.in.client_pid = _client_pid;
    5279         710 :         state->orig.in.flags = _flags;
    5280         710 :         state->orig.in.user = _user;
    5281         710 :         state->orig.in.domain = _domain;
    5282         710 :         state->orig.in.workstation = _workstation;
    5283         710 :         state->orig.in.lm_resp = _lm_resp;
    5284         710 :         state->orig.in.nt_resp = _nt_resp;
    5285         710 :         state->orig.in.chal = _chal;
    5286         710 :         state->orig.in.logon_parameters = _logon_parameters;
    5287         710 :         state->orig.in.require_membership_of_sid = _require_membership_of_sid;
    5288             : 
    5289             :         /* Out parameters */
    5290         710 :         state->orig.out.authoritative = _authoritative;
    5291         710 :         state->orig.out.validation = _validation;
    5292             : 
    5293             :         /* Result */
    5294         710 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5295             : 
    5296         710 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5297             :                              "dcerpc_wbint_PamAuthCrap_out_memory");
    5298         710 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5299           0 :                 return tevent_req_post(req, ev);
    5300             :         }
    5301             : 
    5302             :         /* make a temporary copy, that we pass to the dispatch function */
    5303         710 :         state->tmp = state->orig;
    5304             : 
    5305         710 :         subreq = dcerpc_wbint_PamAuthCrap_r_send(state, ev, h, &state->tmp);
    5306         710 :         if (tevent_req_nomem(subreq, req)) {
    5307           0 :                 return tevent_req_post(req, ev);
    5308             :         }
    5309         710 :         tevent_req_set_callback(subreq, dcerpc_wbint_PamAuthCrap_done, req);
    5310         710 :         return req;
    5311             : }
    5312             : 
    5313         710 : static void dcerpc_wbint_PamAuthCrap_done(struct tevent_req *subreq)
    5314             : {
    5315         710 :         struct tevent_req *req = tevent_req_callback_data(
    5316             :                 subreq, struct tevent_req);
    5317         710 :         struct dcerpc_wbint_PamAuthCrap_state *state = tevent_req_data(
    5318             :                 req, struct dcerpc_wbint_PamAuthCrap_state);
    5319           0 :         NTSTATUS status;
    5320           0 :         TALLOC_CTX *mem_ctx;
    5321             : 
    5322         710 :         if (state->out_mem_ctx) {
    5323         710 :                 mem_ctx = state->out_mem_ctx;
    5324             :         } else {
    5325           0 :                 mem_ctx = state;
    5326             :         }
    5327             : 
    5328         710 :         status = dcerpc_wbint_PamAuthCrap_r_recv(subreq, mem_ctx);
    5329         710 :         TALLOC_FREE(subreq);
    5330         710 :         if (tevent_req_nterror(req, status)) {
    5331           0 :                 return;
    5332             :         }
    5333             : 
    5334             :         /* Copy out parameters */
    5335         710 :         *state->orig.out.authoritative = *state->tmp.out.authoritative;
    5336         710 :         *state->orig.out.validation = *state->tmp.out.validation;
    5337             : 
    5338             :         /* Copy result */
    5339         710 :         state->orig.out.result = state->tmp.out.result;
    5340             : 
    5341             :         /* Reset temporary structure */
    5342         710 :         NDR_ZERO_STRUCT(state->tmp);
    5343             : 
    5344         710 :         tevent_req_done(req);
    5345             : }
    5346             : 
    5347         710 : NTSTATUS dcerpc_wbint_PamAuthCrap_recv(struct tevent_req *req,
    5348             :                                        TALLOC_CTX *mem_ctx,
    5349             :                                        NTSTATUS *result)
    5350             : {
    5351         710 :         struct dcerpc_wbint_PamAuthCrap_state *state = tevent_req_data(
    5352             :                 req, struct dcerpc_wbint_PamAuthCrap_state);
    5353           0 :         NTSTATUS status;
    5354             : 
    5355         710 :         if (tevent_req_is_nterror(req, &status)) {
    5356           0 :                 tevent_req_received(req);
    5357           0 :                 return status;
    5358             :         }
    5359             : 
    5360             :         /* Steal possible out parameters to the callers context */
    5361         710 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5362             : 
    5363             :         /* Return result */
    5364         710 :         *result = state->orig.out.result;
    5365             : 
    5366         710 :         tevent_req_received(req);
    5367         710 :         return NT_STATUS_OK;
    5368             : }
    5369             : 
    5370           0 : NTSTATUS dcerpc_wbint_PamAuthCrap(struct dcerpc_binding_handle *h,
    5371             :                                   TALLOC_CTX *mem_ctx,
    5372             :                                   const char *_client_name /* [in] [charset(UTF8),ref] */,
    5373             :                                   uint64_t _client_pid /* [in]  */,
    5374             :                                   uint32_t _flags /* [in]  */,
    5375             :                                   const char *_user /* [in] [charset(UTF8),ref] */,
    5376             :                                   const char *_domain /* [in] [charset(UTF8),ref] */,
    5377             :                                   const char *_workstation /* [in] [charset(UTF8),ref] */,
    5378             :                                   DATA_BLOB _lm_resp /* [in] [flag(LIBNDR_FLAG_IS_SECRET)] */,
    5379             :                                   DATA_BLOB _nt_resp /* [in] [flag(LIBNDR_FLAG_IS_SECRET)] */,
    5380             :                                   DATA_BLOB _chal /* [in] [flag(LIBNDR_FLAG_IS_SECRET)] */,
    5381             :                                   uint32_t _logon_parameters /* [in]  */,
    5382             :                                   struct wbint_SidArray *_require_membership_of_sid /* [in] [ref] */,
    5383             :                                   uint8_t *_authoritative /* [out] [ref] */,
    5384             :                                   struct wbint_PamAuthCrapValidation *_validation /* [out] [ref] */,
    5385             :                                   NTSTATUS *result)
    5386             : {
    5387           0 :         struct wbint_PamAuthCrap r;
    5388           0 :         NTSTATUS status;
    5389             : 
    5390             :         /* In parameters */
    5391           0 :         r.in.client_name = _client_name;
    5392           0 :         r.in.client_pid = _client_pid;
    5393           0 :         r.in.flags = _flags;
    5394           0 :         r.in.user = _user;
    5395           0 :         r.in.domain = _domain;
    5396           0 :         r.in.workstation = _workstation;
    5397           0 :         r.in.lm_resp = _lm_resp;
    5398           0 :         r.in.nt_resp = _nt_resp;
    5399           0 :         r.in.chal = _chal;
    5400           0 :         r.in.logon_parameters = _logon_parameters;
    5401           0 :         r.in.require_membership_of_sid = _require_membership_of_sid;
    5402             : 
    5403             :         /* Out parameters */
    5404           0 :         r.out.authoritative = _authoritative;
    5405           0 :         r.out.validation = _validation;
    5406             : 
    5407             :         /* Result */
    5408           0 :         NDR_ZERO_STRUCT(r.out.result);
    5409             : 
    5410           0 :         status = dcerpc_wbint_PamAuthCrap_r(h, mem_ctx, &r);
    5411           0 :         if (!NT_STATUS_IS_OK(status)) {
    5412           0 :                 return status;
    5413             :         }
    5414             : 
    5415             :         /* Return variables */
    5416           0 :         *_authoritative = *r.out.authoritative;
    5417           0 :         *_validation = *r.out.validation;
    5418             : 
    5419             :         /* Return result */
    5420           0 :         *result = r.out.result;
    5421             : 
    5422           0 :         return NT_STATUS_OK;
    5423             : }
    5424             : 
    5425             : struct dcerpc_wbint_PamLogOff_r_state {
    5426             :         TALLOC_CTX *out_mem_ctx;
    5427             : };
    5428             : 
    5429             : static void dcerpc_wbint_PamLogOff_r_done(struct tevent_req *subreq);
    5430             : 
    5431          20 : struct tevent_req *dcerpc_wbint_PamLogOff_r_send(TALLOC_CTX *mem_ctx,
    5432             :         struct tevent_context *ev,
    5433             :         struct dcerpc_binding_handle *h,
    5434             :         struct wbint_PamLogOff *r)
    5435             : {
    5436           0 :         struct tevent_req *req;
    5437           0 :         struct dcerpc_wbint_PamLogOff_r_state *state;
    5438           0 :         struct tevent_req *subreq;
    5439             : 
    5440          20 :         req = tevent_req_create(mem_ctx, &state,
    5441             :                                 struct dcerpc_wbint_PamLogOff_r_state);
    5442          20 :         if (req == NULL) {
    5443           0 :                 return NULL;
    5444             :         }
    5445             : 
    5446          20 :         state->out_mem_ctx = NULL;
    5447             : 
    5448          20 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5449             :                         NULL, &ndr_table_winbind,
    5450             :                         NDR_WBINT_PAMLOGOFF, state, r);
    5451          20 :         if (tevent_req_nomem(subreq, req)) {
    5452           0 :                 return tevent_req_post(req, ev);
    5453             :         }
    5454          20 :         tevent_req_set_callback(subreq, dcerpc_wbint_PamLogOff_r_done, req);
    5455             : 
    5456          20 :         return req;
    5457             : }
    5458             : 
    5459          20 : static void dcerpc_wbint_PamLogOff_r_done(struct tevent_req *subreq)
    5460             : {
    5461           0 :         struct tevent_req *req =
    5462          20 :                 tevent_req_callback_data(subreq,
    5463             :                 struct tevent_req);
    5464           0 :         NTSTATUS status;
    5465             : 
    5466          20 :         status = dcerpc_binding_handle_call_recv(subreq);
    5467          20 :         TALLOC_FREE(subreq);
    5468          20 :         if (tevent_req_nterror(req, status)) {
    5469           0 :                 return;
    5470             :         }
    5471             : 
    5472          20 :         tevent_req_done(req);
    5473             : }
    5474             : 
    5475          20 : NTSTATUS dcerpc_wbint_PamLogOff_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5476             : {
    5477           0 :         struct dcerpc_wbint_PamLogOff_r_state *state =
    5478          20 :                 tevent_req_data(req,
    5479             :                 struct dcerpc_wbint_PamLogOff_r_state);
    5480           0 :         NTSTATUS status;
    5481             : 
    5482          20 :         if (tevent_req_is_nterror(req, &status)) {
    5483           0 :                 tevent_req_received(req);
    5484           0 :                 return status;
    5485             :         }
    5486             : 
    5487          20 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5488             : 
    5489          20 :         tevent_req_received(req);
    5490          20 :         return NT_STATUS_OK;
    5491             : }
    5492             : 
    5493           0 : NTSTATUS dcerpc_wbint_PamLogOff_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_PamLogOff *r)
    5494             : {
    5495           0 :         NTSTATUS status;
    5496             : 
    5497           0 :         status = dcerpc_binding_handle_call(h,
    5498             :                         NULL, &ndr_table_winbind,
    5499             :                         NDR_WBINT_PAMLOGOFF, mem_ctx, r);
    5500             : 
    5501           0 :         return status;
    5502             : }
    5503             : 
    5504             : struct dcerpc_wbint_PamLogOff_state {
    5505             :         struct wbint_PamLogOff orig;
    5506             :         struct wbint_PamLogOff tmp;
    5507             :         TALLOC_CTX *out_mem_ctx;
    5508             : };
    5509             : 
    5510             : static void dcerpc_wbint_PamLogOff_done(struct tevent_req *subreq);
    5511             : 
    5512           0 : struct tevent_req *dcerpc_wbint_PamLogOff_send(TALLOC_CTX *mem_ctx,
    5513             :                                                struct tevent_context *ev,
    5514             :                                                struct dcerpc_binding_handle *h,
    5515             :                                                const char *_client_name /* [in] [charset(UTF8),ref] */,
    5516             :                                                uint64_t _client_pid /* [in]  */,
    5517             :                                                uint32_t _flags /* [in]  */,
    5518             :                                                const char *_user /* [in] [charset(UTF8),ref] */,
    5519             :                                                const char *_krb5ccname /* [in] [charset(UTF8),ref] */,
    5520             :                                                uint64_t _uid /* [in]  */)
    5521             : {
    5522           0 :         struct tevent_req *req;
    5523           0 :         struct dcerpc_wbint_PamLogOff_state *state;
    5524           0 :         struct tevent_req *subreq;
    5525             : 
    5526           0 :         req = tevent_req_create(mem_ctx, &state,
    5527             :                                 struct dcerpc_wbint_PamLogOff_state);
    5528           0 :         if (req == NULL) {
    5529           0 :                 return NULL;
    5530             :         }
    5531           0 :         state->out_mem_ctx = NULL;
    5532             : 
    5533             :         /* In parameters */
    5534           0 :         state->orig.in.client_name = _client_name;
    5535           0 :         state->orig.in.client_pid = _client_pid;
    5536           0 :         state->orig.in.flags = _flags;
    5537           0 :         state->orig.in.user = _user;
    5538           0 :         state->orig.in.krb5ccname = _krb5ccname;
    5539           0 :         state->orig.in.uid = _uid;
    5540             : 
    5541             :         /* Out parameters */
    5542             : 
    5543             :         /* Result */
    5544           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5545             : 
    5546             :         /* make a temporary copy, that we pass to the dispatch function */
    5547           0 :         state->tmp = state->orig;
    5548             : 
    5549           0 :         subreq = dcerpc_wbint_PamLogOff_r_send(state, ev, h, &state->tmp);
    5550           0 :         if (tevent_req_nomem(subreq, req)) {
    5551           0 :                 return tevent_req_post(req, ev);
    5552             :         }
    5553           0 :         tevent_req_set_callback(subreq, dcerpc_wbint_PamLogOff_done, req);
    5554           0 :         return req;
    5555             : }
    5556             : 
    5557           0 : static void dcerpc_wbint_PamLogOff_done(struct tevent_req *subreq)
    5558             : {
    5559           0 :         struct tevent_req *req = tevent_req_callback_data(
    5560             :                 subreq, struct tevent_req);
    5561           0 :         struct dcerpc_wbint_PamLogOff_state *state = tevent_req_data(
    5562             :                 req, struct dcerpc_wbint_PamLogOff_state);
    5563           0 :         NTSTATUS status;
    5564           0 :         TALLOC_CTX *mem_ctx;
    5565             : 
    5566           0 :         if (state->out_mem_ctx) {
    5567           0 :                 mem_ctx = state->out_mem_ctx;
    5568             :         } else {
    5569           0 :                 mem_ctx = state;
    5570             :         }
    5571             : 
    5572           0 :         status = dcerpc_wbint_PamLogOff_r_recv(subreq, mem_ctx);
    5573           0 :         TALLOC_FREE(subreq);
    5574           0 :         if (tevent_req_nterror(req, status)) {
    5575           0 :                 return;
    5576             :         }
    5577             : 
    5578             :         /* Copy out parameters */
    5579             : 
    5580             :         /* Copy result */
    5581           0 :         state->orig.out.result = state->tmp.out.result;
    5582             : 
    5583             :         /* Reset temporary structure */
    5584           0 :         NDR_ZERO_STRUCT(state->tmp);
    5585             : 
    5586           0 :         tevent_req_done(req);
    5587             : }
    5588             : 
    5589           0 : NTSTATUS dcerpc_wbint_PamLogOff_recv(struct tevent_req *req,
    5590             :                                      TALLOC_CTX *mem_ctx,
    5591             :                                      NTSTATUS *result)
    5592             : {
    5593           0 :         struct dcerpc_wbint_PamLogOff_state *state = tevent_req_data(
    5594             :                 req, struct dcerpc_wbint_PamLogOff_state);
    5595           0 :         NTSTATUS status;
    5596             : 
    5597           0 :         if (tevent_req_is_nterror(req, &status)) {
    5598           0 :                 tevent_req_received(req);
    5599           0 :                 return status;
    5600             :         }
    5601             : 
    5602             :         /* Steal possible out parameters to the callers context */
    5603           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5604             : 
    5605             :         /* Return result */
    5606           0 :         *result = state->orig.out.result;
    5607             : 
    5608           0 :         tevent_req_received(req);
    5609           0 :         return NT_STATUS_OK;
    5610             : }
    5611             : 
    5612           0 : NTSTATUS dcerpc_wbint_PamLogOff(struct dcerpc_binding_handle *h,
    5613             :                                 TALLOC_CTX *mem_ctx,
    5614             :                                 const char *_client_name /* [in] [charset(UTF8),ref] */,
    5615             :                                 uint64_t _client_pid /* [in]  */,
    5616             :                                 uint32_t _flags /* [in]  */,
    5617             :                                 const char *_user /* [in] [charset(UTF8),ref] */,
    5618             :                                 const char *_krb5ccname /* [in] [charset(UTF8),ref] */,
    5619             :                                 uint64_t _uid /* [in]  */,
    5620             :                                 NTSTATUS *result)
    5621             : {
    5622           0 :         struct wbint_PamLogOff r;
    5623           0 :         NTSTATUS status;
    5624             : 
    5625             :         /* In parameters */
    5626           0 :         r.in.client_name = _client_name;
    5627           0 :         r.in.client_pid = _client_pid;
    5628           0 :         r.in.flags = _flags;
    5629           0 :         r.in.user = _user;
    5630           0 :         r.in.krb5ccname = _krb5ccname;
    5631           0 :         r.in.uid = _uid;
    5632             : 
    5633             :         /* Out parameters */
    5634             : 
    5635             :         /* Result */
    5636           0 :         NDR_ZERO_STRUCT(r.out.result);
    5637             : 
    5638           0 :         status = dcerpc_wbint_PamLogOff_r(h, mem_ctx, &r);
    5639           0 :         if (!NT_STATUS_IS_OK(status)) {
    5640           0 :                 return status;
    5641             :         }
    5642             : 
    5643             :         /* Return variables */
    5644             : 
    5645             :         /* Return result */
    5646           0 :         *result = r.out.result;
    5647             : 
    5648           0 :         return NT_STATUS_OK;
    5649             : }
    5650             : 
    5651             : struct dcerpc_wbint_PamAuthCrapChangePassword_r_state {
    5652             :         TALLOC_CTX *out_mem_ctx;
    5653             : };
    5654             : 
    5655             : static void dcerpc_wbint_PamAuthCrapChangePassword_r_done(struct tevent_req *subreq);
    5656             : 
    5657           2 : struct tevent_req *dcerpc_wbint_PamAuthCrapChangePassword_r_send(TALLOC_CTX *mem_ctx,
    5658             :         struct tevent_context *ev,
    5659             :         struct dcerpc_binding_handle *h,
    5660             :         struct wbint_PamAuthCrapChangePassword *r)
    5661             : {
    5662           0 :         struct tevent_req *req;
    5663           0 :         struct dcerpc_wbint_PamAuthCrapChangePassword_r_state *state;
    5664           0 :         struct tevent_req *subreq;
    5665             : 
    5666           2 :         req = tevent_req_create(mem_ctx, &state,
    5667             :                                 struct dcerpc_wbint_PamAuthCrapChangePassword_r_state);
    5668           2 :         if (req == NULL) {
    5669           0 :                 return NULL;
    5670             :         }
    5671             : 
    5672           2 :         state->out_mem_ctx = NULL;
    5673             : 
    5674           2 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5675             :                         NULL, &ndr_table_winbind,
    5676             :                         NDR_WBINT_PAMAUTHCRAPCHANGEPASSWORD, state, r);
    5677           2 :         if (tevent_req_nomem(subreq, req)) {
    5678           0 :                 return tevent_req_post(req, ev);
    5679             :         }
    5680           2 :         tevent_req_set_callback(subreq, dcerpc_wbint_PamAuthCrapChangePassword_r_done, req);
    5681             : 
    5682           2 :         return req;
    5683             : }
    5684             : 
    5685           2 : static void dcerpc_wbint_PamAuthCrapChangePassword_r_done(struct tevent_req *subreq)
    5686             : {
    5687           0 :         struct tevent_req *req =
    5688           2 :                 tevent_req_callback_data(subreq,
    5689             :                 struct tevent_req);
    5690           0 :         NTSTATUS status;
    5691             : 
    5692           2 :         status = dcerpc_binding_handle_call_recv(subreq);
    5693           2 :         TALLOC_FREE(subreq);
    5694           2 :         if (tevent_req_nterror(req, status)) {
    5695           0 :                 return;
    5696             :         }
    5697             : 
    5698           2 :         tevent_req_done(req);
    5699             : }
    5700             : 
    5701           2 : NTSTATUS dcerpc_wbint_PamAuthCrapChangePassword_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5702             : {
    5703           0 :         struct dcerpc_wbint_PamAuthCrapChangePassword_r_state *state =
    5704           2 :                 tevent_req_data(req,
    5705             :                 struct dcerpc_wbint_PamAuthCrapChangePassword_r_state);
    5706           0 :         NTSTATUS status;
    5707             : 
    5708           2 :         if (tevent_req_is_nterror(req, &status)) {
    5709           0 :                 tevent_req_received(req);
    5710           0 :                 return status;
    5711             :         }
    5712             : 
    5713           2 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5714             : 
    5715           2 :         tevent_req_received(req);
    5716           2 :         return NT_STATUS_OK;
    5717             : }
    5718             : 
    5719           0 : NTSTATUS dcerpc_wbint_PamAuthCrapChangePassword_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_PamAuthCrapChangePassword *r)
    5720             : {
    5721           0 :         NTSTATUS status;
    5722             : 
    5723           0 :         status = dcerpc_binding_handle_call(h,
    5724             :                         NULL, &ndr_table_winbind,
    5725             :                         NDR_WBINT_PAMAUTHCRAPCHANGEPASSWORD, mem_ctx, r);
    5726             : 
    5727           0 :         return status;
    5728             : }
    5729             : 
    5730             : struct dcerpc_wbint_PamAuthCrapChangePassword_state {
    5731             :         struct wbint_PamAuthCrapChangePassword orig;
    5732             :         struct wbint_PamAuthCrapChangePassword tmp;
    5733             :         TALLOC_CTX *out_mem_ctx;
    5734             : };
    5735             : 
    5736             : static void dcerpc_wbint_PamAuthCrapChangePassword_done(struct tevent_req *subreq);
    5737             : 
    5738           0 : struct tevent_req *dcerpc_wbint_PamAuthCrapChangePassword_send(TALLOC_CTX *mem_ctx,
    5739             :                                                                struct tevent_context *ev,
    5740             :                                                                struct dcerpc_binding_handle *h,
    5741             :                                                                const char *_client_name /* [in] [charset(UTF8),ref] */,
    5742             :                                                                uint64_t _client_pid /* [in]  */,
    5743             :                                                                const char *_user /* [in] [charset(UTF8),ref] */,
    5744             :                                                                const char *_domain /* [in] [charset(UTF8),ref] */,
    5745             :                                                                DATA_BLOB _new_nt_pswd /* [in] [flag(LIBNDR_FLAG_IS_SECRET)] */,
    5746             :                                                                DATA_BLOB _old_nt_hash_enc /* [in] [flag(LIBNDR_FLAG_IS_SECRET)] */,
    5747             :                                                                DATA_BLOB _new_lm_pswd /* [in] [flag(LIBNDR_FLAG_IS_SECRET)] */,
    5748             :                                                                DATA_BLOB _old_lm_hash_enc /* [in] [flag(LIBNDR_FLAG_IS_SECRET)] */)
    5749             : {
    5750           0 :         struct tevent_req *req;
    5751           0 :         struct dcerpc_wbint_PamAuthCrapChangePassword_state *state;
    5752           0 :         struct tevent_req *subreq;
    5753             : 
    5754           0 :         req = tevent_req_create(mem_ctx, &state,
    5755             :                                 struct dcerpc_wbint_PamAuthCrapChangePassword_state);
    5756           0 :         if (req == NULL) {
    5757           0 :                 return NULL;
    5758             :         }
    5759           0 :         state->out_mem_ctx = NULL;
    5760             : 
    5761             :         /* In parameters */
    5762           0 :         state->orig.in.client_name = _client_name;
    5763           0 :         state->orig.in.client_pid = _client_pid;
    5764           0 :         state->orig.in.user = _user;
    5765           0 :         state->orig.in.domain = _domain;
    5766           0 :         state->orig.in.new_nt_pswd = _new_nt_pswd;
    5767           0 :         state->orig.in.old_nt_hash_enc = _old_nt_hash_enc;
    5768           0 :         state->orig.in.new_lm_pswd = _new_lm_pswd;
    5769           0 :         state->orig.in.old_lm_hash_enc = _old_lm_hash_enc;
    5770             : 
    5771             :         /* Out parameters */
    5772             : 
    5773             :         /* Result */
    5774           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5775             : 
    5776             :         /* make a temporary copy, that we pass to the dispatch function */
    5777           0 :         state->tmp = state->orig;
    5778             : 
    5779           0 :         subreq = dcerpc_wbint_PamAuthCrapChangePassword_r_send(state, ev, h, &state->tmp);
    5780           0 :         if (tevent_req_nomem(subreq, req)) {
    5781           0 :                 return tevent_req_post(req, ev);
    5782             :         }
    5783           0 :         tevent_req_set_callback(subreq, dcerpc_wbint_PamAuthCrapChangePassword_done, req);
    5784           0 :         return req;
    5785             : }
    5786             : 
    5787           0 : static void dcerpc_wbint_PamAuthCrapChangePassword_done(struct tevent_req *subreq)
    5788             : {
    5789           0 :         struct tevent_req *req = tevent_req_callback_data(
    5790             :                 subreq, struct tevent_req);
    5791           0 :         struct dcerpc_wbint_PamAuthCrapChangePassword_state *state = tevent_req_data(
    5792             :                 req, struct dcerpc_wbint_PamAuthCrapChangePassword_state);
    5793           0 :         NTSTATUS status;
    5794           0 :         TALLOC_CTX *mem_ctx;
    5795             : 
    5796           0 :         if (state->out_mem_ctx) {
    5797           0 :                 mem_ctx = state->out_mem_ctx;
    5798             :         } else {
    5799           0 :                 mem_ctx = state;
    5800             :         }
    5801             : 
    5802           0 :         status = dcerpc_wbint_PamAuthCrapChangePassword_r_recv(subreq, mem_ctx);
    5803           0 :         TALLOC_FREE(subreq);
    5804           0 :         if (tevent_req_nterror(req, status)) {
    5805           0 :                 return;
    5806             :         }
    5807             : 
    5808             :         /* Copy out parameters */
    5809             : 
    5810             :         /* Copy result */
    5811           0 :         state->orig.out.result = state->tmp.out.result;
    5812             : 
    5813             :         /* Reset temporary structure */
    5814           0 :         NDR_ZERO_STRUCT(state->tmp);
    5815             : 
    5816           0 :         tevent_req_done(req);
    5817             : }
    5818             : 
    5819           0 : NTSTATUS dcerpc_wbint_PamAuthCrapChangePassword_recv(struct tevent_req *req,
    5820             :                                                      TALLOC_CTX *mem_ctx,
    5821             :                                                      NTSTATUS *result)
    5822             : {
    5823           0 :         struct dcerpc_wbint_PamAuthCrapChangePassword_state *state = tevent_req_data(
    5824             :                 req, struct dcerpc_wbint_PamAuthCrapChangePassword_state);
    5825           0 :         NTSTATUS status;
    5826             : 
    5827           0 :         if (tevent_req_is_nterror(req, &status)) {
    5828           0 :                 tevent_req_received(req);
    5829           0 :                 return status;
    5830             :         }
    5831             : 
    5832             :         /* Steal possible out parameters to the callers context */
    5833           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5834             : 
    5835             :         /* Return result */
    5836           0 :         *result = state->orig.out.result;
    5837             : 
    5838           0 :         tevent_req_received(req);
    5839           0 :         return NT_STATUS_OK;
    5840             : }
    5841             : 
    5842           0 : NTSTATUS dcerpc_wbint_PamAuthCrapChangePassword(struct dcerpc_binding_handle *h,
    5843             :                                                 TALLOC_CTX *mem_ctx,
    5844             :                                                 const char *_client_name /* [in] [charset(UTF8),ref] */,
    5845             :                                                 uint64_t _client_pid /* [in]  */,
    5846             :                                                 const char *_user /* [in] [charset(UTF8),ref] */,
    5847             :                                                 const char *_domain /* [in] [charset(UTF8),ref] */,
    5848             :                                                 DATA_BLOB _new_nt_pswd /* [in] [flag(LIBNDR_FLAG_IS_SECRET)] */,
    5849             :                                                 DATA_BLOB _old_nt_hash_enc /* [in] [flag(LIBNDR_FLAG_IS_SECRET)] */,
    5850             :                                                 DATA_BLOB _new_lm_pswd /* [in] [flag(LIBNDR_FLAG_IS_SECRET)] */,
    5851             :                                                 DATA_BLOB _old_lm_hash_enc /* [in] [flag(LIBNDR_FLAG_IS_SECRET)] */,
    5852             :                                                 NTSTATUS *result)
    5853             : {
    5854           0 :         struct wbint_PamAuthCrapChangePassword r;
    5855           0 :         NTSTATUS status;
    5856             : 
    5857             :         /* In parameters */
    5858           0 :         r.in.client_name = _client_name;
    5859           0 :         r.in.client_pid = _client_pid;
    5860           0 :         r.in.user = _user;
    5861           0 :         r.in.domain = _domain;
    5862           0 :         r.in.new_nt_pswd = _new_nt_pswd;
    5863           0 :         r.in.old_nt_hash_enc = _old_nt_hash_enc;
    5864           0 :         r.in.new_lm_pswd = _new_lm_pswd;
    5865           0 :         r.in.old_lm_hash_enc = _old_lm_hash_enc;
    5866             : 
    5867             :         /* Out parameters */
    5868             : 
    5869             :         /* Result */
    5870           0 :         NDR_ZERO_STRUCT(r.out.result);
    5871             : 
    5872           0 :         status = dcerpc_wbint_PamAuthCrapChangePassword_r(h, mem_ctx, &r);
    5873           0 :         if (!NT_STATUS_IS_OK(status)) {
    5874           0 :                 return status;
    5875             :         }
    5876             : 
    5877             :         /* Return variables */
    5878             : 
    5879             :         /* Return result */
    5880           0 :         *result = r.out.result;
    5881             : 
    5882           0 :         return NT_STATUS_OK;
    5883             : }
    5884             : 
    5885             : struct dcerpc_wbint_PamAuthChangePassword_r_state {
    5886             :         TALLOC_CTX *out_mem_ctx;
    5887             : };
    5888             : 
    5889             : static void dcerpc_wbint_PamAuthChangePassword_r_done(struct tevent_req *subreq);
    5890             : 
    5891          14 : struct tevent_req *dcerpc_wbint_PamAuthChangePassword_r_send(TALLOC_CTX *mem_ctx,
    5892             :         struct tevent_context *ev,
    5893             :         struct dcerpc_binding_handle *h,
    5894             :         struct wbint_PamAuthChangePassword *r)
    5895             : {
    5896           0 :         struct tevent_req *req;
    5897           0 :         struct dcerpc_wbint_PamAuthChangePassword_r_state *state;
    5898           0 :         struct tevent_req *subreq;
    5899             : 
    5900          14 :         req = tevent_req_create(mem_ctx, &state,
    5901             :                                 struct dcerpc_wbint_PamAuthChangePassword_r_state);
    5902          14 :         if (req == NULL) {
    5903           0 :                 return NULL;
    5904             :         }
    5905             : 
    5906          14 :         state->out_mem_ctx = talloc_new(state);
    5907          14 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5908           0 :                 return tevent_req_post(req, ev);
    5909             :         }
    5910             : 
    5911          14 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5912             :                         NULL, &ndr_table_winbind,
    5913          14 :                         NDR_WBINT_PAMAUTHCHANGEPASSWORD, state->out_mem_ctx, r);
    5914          14 :         if (tevent_req_nomem(subreq, req)) {
    5915           0 :                 return tevent_req_post(req, ev);
    5916             :         }
    5917          14 :         tevent_req_set_callback(subreq, dcerpc_wbint_PamAuthChangePassword_r_done, req);
    5918             : 
    5919          14 :         return req;
    5920             : }
    5921             : 
    5922          14 : static void dcerpc_wbint_PamAuthChangePassword_r_done(struct tevent_req *subreq)
    5923             : {
    5924           0 :         struct tevent_req *req =
    5925          14 :                 tevent_req_callback_data(subreq,
    5926             :                 struct tevent_req);
    5927           0 :         NTSTATUS status;
    5928             : 
    5929          14 :         status = dcerpc_binding_handle_call_recv(subreq);
    5930          14 :         TALLOC_FREE(subreq);
    5931          14 :         if (tevent_req_nterror(req, status)) {
    5932           0 :                 return;
    5933             :         }
    5934             : 
    5935          14 :         tevent_req_done(req);
    5936             : }
    5937             : 
    5938          14 : NTSTATUS dcerpc_wbint_PamAuthChangePassword_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5939             : {
    5940           0 :         struct dcerpc_wbint_PamAuthChangePassword_r_state *state =
    5941          14 :                 tevent_req_data(req,
    5942             :                 struct dcerpc_wbint_PamAuthChangePassword_r_state);
    5943           0 :         NTSTATUS status;
    5944             : 
    5945          14 :         if (tevent_req_is_nterror(req, &status)) {
    5946           0 :                 tevent_req_received(req);
    5947           0 :                 return status;
    5948             :         }
    5949             : 
    5950          14 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5951             : 
    5952          14 :         tevent_req_received(req);
    5953          14 :         return NT_STATUS_OK;
    5954             : }
    5955             : 
    5956           0 : NTSTATUS dcerpc_wbint_PamAuthChangePassword_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_PamAuthChangePassword *r)
    5957             : {
    5958           0 :         NTSTATUS status;
    5959             : 
    5960           0 :         status = dcerpc_binding_handle_call(h,
    5961             :                         NULL, &ndr_table_winbind,
    5962             :                         NDR_WBINT_PAMAUTHCHANGEPASSWORD, mem_ctx, r);
    5963             : 
    5964           0 :         return status;
    5965             : }
    5966             : 
    5967             : struct dcerpc_wbint_PamAuthChangePassword_state {
    5968             :         struct wbint_PamAuthChangePassword orig;
    5969             :         struct wbint_PamAuthChangePassword tmp;
    5970             :         TALLOC_CTX *out_mem_ctx;
    5971             : };
    5972             : 
    5973             : static void dcerpc_wbint_PamAuthChangePassword_done(struct tevent_req *subreq);
    5974             : 
    5975           0 : struct tevent_req *dcerpc_wbint_PamAuthChangePassword_send(TALLOC_CTX *mem_ctx,
    5976             :                                                            struct tevent_context *ev,
    5977             :                                                            struct dcerpc_binding_handle *h,
    5978             :                                                            const char *_client_name /* [in] [charset(UTF8),ref] */,
    5979             :                                                            uint64_t _client_pid /* [in]  */,
    5980             :                                                            uint32_t _flags /* [in]  */,
    5981             :                                                            const char *_user /* [in] [charset(UTF8),ref] */,
    5982             :                                                            const char *_old_password /* [in] [charset(UTF8),flag(LIBNDR_FLAG_IS_SECRET),ref] */,
    5983             :                                                            const char *_new_password /* [in] [charset(UTF8),flag(LIBNDR_FLAG_IS_SECRET),ref] */,
    5984             :                                                            struct samr_DomInfo1 **_dominfo /* [out] [ref] */,
    5985             :                                                            enum samPwdChangeReason *_reject_reason /* [out] [ref] */)
    5986             : {
    5987           0 :         struct tevent_req *req;
    5988           0 :         struct dcerpc_wbint_PamAuthChangePassword_state *state;
    5989           0 :         struct tevent_req *subreq;
    5990             : 
    5991           0 :         req = tevent_req_create(mem_ctx, &state,
    5992             :                                 struct dcerpc_wbint_PamAuthChangePassword_state);
    5993           0 :         if (req == NULL) {
    5994           0 :                 return NULL;
    5995             :         }
    5996           0 :         state->out_mem_ctx = NULL;
    5997             : 
    5998             :         /* In parameters */
    5999           0 :         state->orig.in.client_name = _client_name;
    6000           0 :         state->orig.in.client_pid = _client_pid;
    6001           0 :         state->orig.in.flags = _flags;
    6002           0 :         state->orig.in.user = _user;
    6003           0 :         state->orig.in.old_password = _old_password;
    6004           0 :         state->orig.in.new_password = _new_password;
    6005             : 
    6006             :         /* Out parameters */
    6007           0 :         state->orig.out.dominfo = _dominfo;
    6008           0 :         state->orig.out.reject_reason = _reject_reason;
    6009             : 
    6010             :         /* Result */
    6011           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6012             : 
    6013           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6014             :                              "dcerpc_wbint_PamAuthChangePassword_out_memory");
    6015           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6016           0 :                 return tevent_req_post(req, ev);
    6017             :         }
    6018             : 
    6019             :         /* make a temporary copy, that we pass to the dispatch function */
    6020           0 :         state->tmp = state->orig;
    6021             : 
    6022           0 :         subreq = dcerpc_wbint_PamAuthChangePassword_r_send(state, ev, h, &state->tmp);
    6023           0 :         if (tevent_req_nomem(subreq, req)) {
    6024           0 :                 return tevent_req_post(req, ev);
    6025             :         }
    6026           0 :         tevent_req_set_callback(subreq, dcerpc_wbint_PamAuthChangePassword_done, req);
    6027           0 :         return req;
    6028             : }
    6029             : 
    6030           0 : static void dcerpc_wbint_PamAuthChangePassword_done(struct tevent_req *subreq)
    6031             : {
    6032           0 :         struct tevent_req *req = tevent_req_callback_data(
    6033             :                 subreq, struct tevent_req);
    6034           0 :         struct dcerpc_wbint_PamAuthChangePassword_state *state = tevent_req_data(
    6035             :                 req, struct dcerpc_wbint_PamAuthChangePassword_state);
    6036           0 :         NTSTATUS status;
    6037           0 :         TALLOC_CTX *mem_ctx;
    6038             : 
    6039           0 :         if (state->out_mem_ctx) {
    6040           0 :                 mem_ctx = state->out_mem_ctx;
    6041             :         } else {
    6042           0 :                 mem_ctx = state;
    6043             :         }
    6044             : 
    6045           0 :         status = dcerpc_wbint_PamAuthChangePassword_r_recv(subreq, mem_ctx);
    6046           0 :         TALLOC_FREE(subreq);
    6047           0 :         if (tevent_req_nterror(req, status)) {
    6048           0 :                 return;
    6049             :         }
    6050             : 
    6051             :         /* Copy out parameters */
    6052           0 :         *state->orig.out.dominfo = *state->tmp.out.dominfo;
    6053           0 :         *state->orig.out.reject_reason = *state->tmp.out.reject_reason;
    6054             : 
    6055             :         /* Copy result */
    6056           0 :         state->orig.out.result = state->tmp.out.result;
    6057             : 
    6058             :         /* Reset temporary structure */
    6059           0 :         NDR_ZERO_STRUCT(state->tmp);
    6060             : 
    6061           0 :         tevent_req_done(req);
    6062             : }
    6063             : 
    6064           0 : NTSTATUS dcerpc_wbint_PamAuthChangePassword_recv(struct tevent_req *req,
    6065             :                                                  TALLOC_CTX *mem_ctx,
    6066             :                                                  NTSTATUS *result)
    6067             : {
    6068           0 :         struct dcerpc_wbint_PamAuthChangePassword_state *state = tevent_req_data(
    6069             :                 req, struct dcerpc_wbint_PamAuthChangePassword_state);
    6070           0 :         NTSTATUS status;
    6071             : 
    6072           0 :         if (tevent_req_is_nterror(req, &status)) {
    6073           0 :                 tevent_req_received(req);
    6074           0 :                 return status;
    6075             :         }
    6076             : 
    6077             :         /* Steal possible out parameters to the callers context */
    6078           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6079             : 
    6080             :         /* Return result */
    6081           0 :         *result = state->orig.out.result;
    6082             : 
    6083           0 :         tevent_req_received(req);
    6084           0 :         return NT_STATUS_OK;
    6085             : }
    6086             : 
    6087           0 : NTSTATUS dcerpc_wbint_PamAuthChangePassword(struct dcerpc_binding_handle *h,
    6088             :                                             TALLOC_CTX *mem_ctx,
    6089             :                                             const char *_client_name /* [in] [charset(UTF8),ref] */,
    6090             :                                             uint64_t _client_pid /* [in]  */,
    6091             :                                             uint32_t _flags /* [in]  */,
    6092             :                                             const char *_user /* [in] [charset(UTF8),ref] */,
    6093             :                                             const char *_old_password /* [in] [charset(UTF8),flag(LIBNDR_FLAG_IS_SECRET),ref] */,
    6094             :                                             const char *_new_password /* [in] [charset(UTF8),flag(LIBNDR_FLAG_IS_SECRET),ref] */,
    6095             :                                             struct samr_DomInfo1 **_dominfo /* [out] [ref] */,
    6096             :                                             enum samPwdChangeReason *_reject_reason /* [out] [ref] */,
    6097             :                                             NTSTATUS *result)
    6098             : {
    6099           0 :         struct wbint_PamAuthChangePassword r;
    6100           0 :         NTSTATUS status;
    6101             : 
    6102             :         /* In parameters */
    6103           0 :         r.in.client_name = _client_name;
    6104           0 :         r.in.client_pid = _client_pid;
    6105           0 :         r.in.flags = _flags;
    6106           0 :         r.in.user = _user;
    6107           0 :         r.in.old_password = _old_password;
    6108           0 :         r.in.new_password = _new_password;
    6109             : 
    6110             :         /* Out parameters */
    6111           0 :         r.out.dominfo = _dominfo;
    6112           0 :         r.out.reject_reason = _reject_reason;
    6113             : 
    6114             :         /* Result */
    6115           0 :         NDR_ZERO_STRUCT(r.out.result);
    6116             : 
    6117           0 :         status = dcerpc_wbint_PamAuthChangePassword_r(h, mem_ctx, &r);
    6118           0 :         if (!NT_STATUS_IS_OK(status)) {
    6119           0 :                 return status;
    6120             :         }
    6121             : 
    6122             :         /* Return variables */
    6123           0 :         *_dominfo = *r.out.dominfo;
    6124           0 :         *_reject_reason = *r.out.reject_reason;
    6125             : 
    6126             :         /* Return result */
    6127           0 :         *result = r.out.result;
    6128             : 
    6129           0 :         return NT_STATUS_OK;
    6130             : }
    6131             : 
    6132             : struct dcerpc_wbint_InitConnection_r_state {
    6133             :         TALLOC_CTX *out_mem_ctx;
    6134             : };
    6135             : 
    6136             : static void dcerpc_wbint_InitConnection_r_done(struct tevent_req *subreq);
    6137             : 
    6138         103 : struct tevent_req *dcerpc_wbint_InitConnection_r_send(TALLOC_CTX *mem_ctx,
    6139             :         struct tevent_context *ev,
    6140             :         struct dcerpc_binding_handle *h,
    6141             :         struct wbint_InitConnection *r)
    6142             : {
    6143           0 :         struct tevent_req *req;
    6144           0 :         struct dcerpc_wbint_InitConnection_r_state *state;
    6145           0 :         struct tevent_req *subreq;
    6146             : 
    6147         103 :         req = tevent_req_create(mem_ctx, &state,
    6148             :                                 struct dcerpc_wbint_InitConnection_r_state);
    6149         103 :         if (req == NULL) {
    6150           0 :                 return NULL;
    6151             :         }
    6152             : 
    6153         103 :         state->out_mem_ctx = talloc_new(state);
    6154         103 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6155           0 :                 return tevent_req_post(req, ev);
    6156             :         }
    6157             : 
    6158         103 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6159             :                         NULL, &ndr_table_winbind,
    6160         103 :                         NDR_WBINT_INITCONNECTION, state->out_mem_ctx, r);
    6161         103 :         if (tevent_req_nomem(subreq, req)) {
    6162           0 :                 return tevent_req_post(req, ev);
    6163             :         }
    6164         103 :         tevent_req_set_callback(subreq, dcerpc_wbint_InitConnection_r_done, req);
    6165             : 
    6166         103 :         return req;
    6167             : }
    6168             : 
    6169         103 : static void dcerpc_wbint_InitConnection_r_done(struct tevent_req *subreq)
    6170             : {
    6171           0 :         struct tevent_req *req =
    6172         103 :                 tevent_req_callback_data(subreq,
    6173             :                 struct tevent_req);
    6174           0 :         NTSTATUS status;
    6175             : 
    6176         103 :         status = dcerpc_binding_handle_call_recv(subreq);
    6177         103 :         TALLOC_FREE(subreq);
    6178         103 :         if (tevent_req_nterror(req, status)) {
    6179           0 :                 return;
    6180             :         }
    6181             : 
    6182         103 :         tevent_req_done(req);
    6183             : }
    6184             : 
    6185         103 : NTSTATUS dcerpc_wbint_InitConnection_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6186             : {
    6187           0 :         struct dcerpc_wbint_InitConnection_r_state *state =
    6188         103 :                 tevent_req_data(req,
    6189             :                 struct dcerpc_wbint_InitConnection_r_state);
    6190           0 :         NTSTATUS status;
    6191             : 
    6192         103 :         if (tevent_req_is_nterror(req, &status)) {
    6193           0 :                 tevent_req_received(req);
    6194           0 :                 return status;
    6195             :         }
    6196             : 
    6197         103 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6198             : 
    6199         103 :         tevent_req_received(req);
    6200         103 :         return NT_STATUS_OK;
    6201             : }
    6202             : 
    6203           0 : NTSTATUS dcerpc_wbint_InitConnection_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_InitConnection *r)
    6204             : {
    6205           0 :         NTSTATUS status;
    6206             : 
    6207           0 :         status = dcerpc_binding_handle_call(h,
    6208             :                         NULL, &ndr_table_winbind,
    6209             :                         NDR_WBINT_INITCONNECTION, mem_ctx, r);
    6210             : 
    6211           0 :         return status;
    6212             : }
    6213             : 
    6214             : struct dcerpc_wbint_InitConnection_state {
    6215             :         struct wbint_InitConnection orig;
    6216             :         struct wbint_InitConnection tmp;
    6217             :         TALLOC_CTX *out_mem_ctx;
    6218             : };
    6219             : 
    6220             : static void dcerpc_wbint_InitConnection_done(struct tevent_req *subreq);
    6221             : 
    6222           0 : struct tevent_req *dcerpc_wbint_InitConnection_send(TALLOC_CTX *mem_ctx,
    6223             :                                                     struct tevent_context *ev,
    6224             :                                                     struct dcerpc_binding_handle *h,
    6225             :                                                     const char *_dcname /* [in] [charset(UTF8),ref] */,
    6226             :                                                     const char **_name /* [out] [charset(UTF8),ref] */,
    6227             :                                                     const char **_alt_name /* [out] [charset(UTF8),ref] */,
    6228             :                                                     struct dom_sid *_sid /* [out] [ref] */,
    6229             :                                                     enum DomainInfoFlags *_flags /* [out] [ref] */)
    6230             : {
    6231           0 :         struct tevent_req *req;
    6232           0 :         struct dcerpc_wbint_InitConnection_state *state;
    6233           0 :         struct tevent_req *subreq;
    6234             : 
    6235           0 :         req = tevent_req_create(mem_ctx, &state,
    6236             :                                 struct dcerpc_wbint_InitConnection_state);
    6237           0 :         if (req == NULL) {
    6238           0 :                 return NULL;
    6239             :         }
    6240           0 :         state->out_mem_ctx = NULL;
    6241             : 
    6242             :         /* In parameters */
    6243           0 :         state->orig.in.dcname = _dcname;
    6244             : 
    6245             :         /* Out parameters */
    6246           0 :         state->orig.out.name = _name;
    6247           0 :         state->orig.out.alt_name = _alt_name;
    6248           0 :         state->orig.out.sid = _sid;
    6249           0 :         state->orig.out.flags = _flags;
    6250             : 
    6251             :         /* Result */
    6252           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6253             : 
    6254           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6255             :                              "dcerpc_wbint_InitConnection_out_memory");
    6256           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6257           0 :                 return tevent_req_post(req, ev);
    6258             :         }
    6259             : 
    6260             :         /* make a temporary copy, that we pass to the dispatch function */
    6261           0 :         state->tmp = state->orig;
    6262             : 
    6263           0 :         subreq = dcerpc_wbint_InitConnection_r_send(state, ev, h, &state->tmp);
    6264           0 :         if (tevent_req_nomem(subreq, req)) {
    6265           0 :                 return tevent_req_post(req, ev);
    6266             :         }
    6267           0 :         tevent_req_set_callback(subreq, dcerpc_wbint_InitConnection_done, req);
    6268           0 :         return req;
    6269             : }
    6270             : 
    6271           0 : static void dcerpc_wbint_InitConnection_done(struct tevent_req *subreq)
    6272             : {
    6273           0 :         struct tevent_req *req = tevent_req_callback_data(
    6274             :                 subreq, struct tevent_req);
    6275           0 :         struct dcerpc_wbint_InitConnection_state *state = tevent_req_data(
    6276             :                 req, struct dcerpc_wbint_InitConnection_state);
    6277           0 :         NTSTATUS status;
    6278           0 :         TALLOC_CTX *mem_ctx;
    6279             : 
    6280           0 :         if (state->out_mem_ctx) {
    6281           0 :                 mem_ctx = state->out_mem_ctx;
    6282             :         } else {
    6283           0 :                 mem_ctx = state;
    6284             :         }
    6285             : 
    6286           0 :         status = dcerpc_wbint_InitConnection_r_recv(subreq, mem_ctx);
    6287           0 :         TALLOC_FREE(subreq);
    6288           0 :         if (tevent_req_nterror(req, status)) {
    6289           0 :                 return;
    6290             :         }
    6291             : 
    6292             :         /* Copy out parameters */
    6293           0 :         *state->orig.out.name = *state->tmp.out.name;
    6294           0 :         *state->orig.out.alt_name = *state->tmp.out.alt_name;
    6295           0 :         *state->orig.out.sid = *state->tmp.out.sid;
    6296           0 :         *state->orig.out.flags = *state->tmp.out.flags;
    6297             : 
    6298             :         /* Copy result */
    6299           0 :         state->orig.out.result = state->tmp.out.result;
    6300             : 
    6301             :         /* Reset temporary structure */
    6302           0 :         NDR_ZERO_STRUCT(state->tmp);
    6303             : 
    6304           0 :         tevent_req_done(req);
    6305             : }
    6306             : 
    6307           0 : NTSTATUS dcerpc_wbint_InitConnection_recv(struct tevent_req *req,
    6308             :                                           TALLOC_CTX *mem_ctx,
    6309             :                                           NTSTATUS *result)
    6310             : {
    6311           0 :         struct dcerpc_wbint_InitConnection_state *state = tevent_req_data(
    6312             :                 req, struct dcerpc_wbint_InitConnection_state);
    6313           0 :         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             :         /* Steal possible out parameters to the callers context */
    6321           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6322             : 
    6323             :         /* Return result */
    6324           0 :         *result = state->orig.out.result;
    6325             : 
    6326           0 :         tevent_req_received(req);
    6327           0 :         return NT_STATUS_OK;
    6328             : }
    6329             : 
    6330           0 : NTSTATUS dcerpc_wbint_InitConnection(struct dcerpc_binding_handle *h,
    6331             :                                      TALLOC_CTX *mem_ctx,
    6332             :                                      const char *_dcname /* [in] [charset(UTF8),ref] */,
    6333             :                                      const char **_name /* [out] [charset(UTF8),ref] */,
    6334             :                                      const char **_alt_name /* [out] [charset(UTF8),ref] */,
    6335             :                                      struct dom_sid *_sid /* [out] [ref] */,
    6336             :                                      enum DomainInfoFlags *_flags /* [out] [ref] */,
    6337             :                                      NTSTATUS *result)
    6338             : {
    6339           0 :         struct wbint_InitConnection r;
    6340           0 :         NTSTATUS status;
    6341             : 
    6342             :         /* In parameters */
    6343           0 :         r.in.dcname = _dcname;
    6344             : 
    6345             :         /* Out parameters */
    6346           0 :         r.out.name = _name;
    6347           0 :         r.out.alt_name = _alt_name;
    6348           0 :         r.out.sid = _sid;
    6349           0 :         r.out.flags = _flags;
    6350             : 
    6351             :         /* Result */
    6352           0 :         NDR_ZERO_STRUCT(r.out.result);
    6353             : 
    6354           0 :         status = dcerpc_wbint_InitConnection_r(h, mem_ctx, &r);
    6355           0 :         if (!NT_STATUS_IS_OK(status)) {
    6356           0 :                 return status;
    6357             :         }
    6358             : 
    6359             :         /* Return variables */
    6360           0 :         *_name = *r.out.name;
    6361           0 :         *_alt_name = *r.out.alt_name;
    6362           0 :         *_sid = *r.out.sid;
    6363           0 :         *_flags = *r.out.flags;
    6364             : 
    6365             :         /* Return result */
    6366           0 :         *result = r.out.result;
    6367             : 
    6368           0 :         return NT_STATUS_OK;
    6369             : }
    6370             : 
    6371             : struct dcerpc_winbind_SamLogon_r_state {
    6372             :         TALLOC_CTX *out_mem_ctx;
    6373             : };
    6374             : 
    6375             : static void dcerpc_winbind_SamLogon_r_done(struct tevent_req *subreq);
    6376             : 
    6377        1128 : struct tevent_req *dcerpc_winbind_SamLogon_r_send(TALLOC_CTX *mem_ctx,
    6378             :         struct tevent_context *ev,
    6379             :         struct dcerpc_binding_handle *h,
    6380             :         struct winbind_SamLogon *r)
    6381             : {
    6382           6 :         struct tevent_req *req;
    6383           6 :         struct dcerpc_winbind_SamLogon_r_state *state;
    6384           6 :         struct tevent_req *subreq;
    6385             : 
    6386        1128 :         req = tevent_req_create(mem_ctx, &state,
    6387             :                                 struct dcerpc_winbind_SamLogon_r_state);
    6388        1128 :         if (req == NULL) {
    6389           0 :                 return NULL;
    6390             :         }
    6391             : 
    6392        1128 :         state->out_mem_ctx = talloc_new(state);
    6393        1128 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6394           0 :                 return tevent_req_post(req, ev);
    6395             :         }
    6396             : 
    6397        1134 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6398             :                         NULL, &ndr_table_winbind,
    6399        1128 :                         NDR_WINBIND_SAMLOGON, state->out_mem_ctx, r);
    6400        1128 :         if (tevent_req_nomem(subreq, req)) {
    6401           0 :                 return tevent_req_post(req, ev);
    6402             :         }
    6403        1128 :         tevent_req_set_callback(subreq, dcerpc_winbind_SamLogon_r_done, req);
    6404             : 
    6405        1128 :         return req;
    6406             : }
    6407             : 
    6408        1128 : static void dcerpc_winbind_SamLogon_r_done(struct tevent_req *subreq)
    6409             : {
    6410           6 :         struct tevent_req *req =
    6411        1128 :                 tevent_req_callback_data(subreq,
    6412             :                 struct tevent_req);
    6413           6 :         NTSTATUS status;
    6414             : 
    6415        1128 :         status = dcerpc_binding_handle_call_recv(subreq);
    6416        1128 :         TALLOC_FREE(subreq);
    6417        1128 :         if (tevent_req_nterror(req, status)) {
    6418           2 :                 return;
    6419             :         }
    6420             : 
    6421        1126 :         tevent_req_done(req);
    6422             : }
    6423             : 
    6424        1128 : NTSTATUS dcerpc_winbind_SamLogon_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6425             : {
    6426           6 :         struct dcerpc_winbind_SamLogon_r_state *state =
    6427        1128 :                 tevent_req_data(req,
    6428             :                 struct dcerpc_winbind_SamLogon_r_state);
    6429           6 :         NTSTATUS status;
    6430             : 
    6431        1128 :         if (tevent_req_is_nterror(req, &status)) {
    6432           2 :                 tevent_req_received(req);
    6433           2 :                 return status;
    6434             :         }
    6435             : 
    6436        1126 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6437             : 
    6438        1126 :         tevent_req_received(req);
    6439        1126 :         return NT_STATUS_OK;
    6440             : }
    6441             : 
    6442           0 : NTSTATUS dcerpc_winbind_SamLogon_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct winbind_SamLogon *r)
    6443             : {
    6444           0 :         NTSTATUS status;
    6445             : 
    6446           0 :         status = dcerpc_binding_handle_call(h,
    6447             :                         NULL, &ndr_table_winbind,
    6448             :                         NDR_WINBIND_SAMLOGON, mem_ctx, r);
    6449             : 
    6450           0 :         return status;
    6451             : }
    6452             : 
    6453             : /*
    6454             :  * The following functions are skipped because
    6455             :  * an [out] argument validation is not a pointer or array:
    6456             :  *
    6457             :  * dcerpc_winbind_SamLogon_send()
    6458             :  * dcerpc_winbind_SamLogon_recv()
    6459             :  * dcerpc_winbind_SamLogon()
    6460             :  */
    6461             : 
    6462             : struct dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r_state {
    6463             :         TALLOC_CTX *out_mem_ctx;
    6464             : };
    6465             : 
    6466             : static void dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r_done(struct tevent_req *subreq);
    6467             : 
    6468           0 : struct tevent_req *dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r_send(TALLOC_CTX *mem_ctx,
    6469             :         struct tevent_context *ev,
    6470             :         struct dcerpc_binding_handle *h,
    6471             :         struct winbind_DsrUpdateReadOnlyServerDnsRecords *r)
    6472             : {
    6473           0 :         struct tevent_req *req;
    6474           0 :         struct dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r_state *state;
    6475           0 :         struct tevent_req *subreq;
    6476             : 
    6477           0 :         req = tevent_req_create(mem_ctx, &state,
    6478             :                                 struct dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r_state);
    6479           0 :         if (req == NULL) {
    6480           0 :                 return NULL;
    6481             :         }
    6482             : 
    6483           0 :         state->out_mem_ctx = talloc_new(state);
    6484           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6485           0 :                 return tevent_req_post(req, ev);
    6486             :         }
    6487             : 
    6488           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6489             :                         NULL, &ndr_table_winbind,
    6490           0 :                         NDR_WINBIND_DSRUPDATEREADONLYSERVERDNSRECORDS, state->out_mem_ctx, r);
    6491           0 :         if (tevent_req_nomem(subreq, req)) {
    6492           0 :                 return tevent_req_post(req, ev);
    6493             :         }
    6494           0 :         tevent_req_set_callback(subreq, dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r_done, req);
    6495             : 
    6496           0 :         return req;
    6497             : }
    6498             : 
    6499           0 : static void dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r_done(struct tevent_req *subreq)
    6500             : {
    6501           0 :         struct tevent_req *req =
    6502           0 :                 tevent_req_callback_data(subreq,
    6503             :                 struct tevent_req);
    6504           0 :         NTSTATUS status;
    6505             : 
    6506           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6507           0 :         TALLOC_FREE(subreq);
    6508           0 :         if (tevent_req_nterror(req, status)) {
    6509           0 :                 return;
    6510             :         }
    6511             : 
    6512           0 :         tevent_req_done(req);
    6513             : }
    6514             : 
    6515           0 : NTSTATUS dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6516             : {
    6517           0 :         struct dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r_state *state =
    6518           0 :                 tevent_req_data(req,
    6519             :                 struct dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r_state);
    6520           0 :         NTSTATUS status;
    6521             : 
    6522           0 :         if (tevent_req_is_nterror(req, &status)) {
    6523           0 :                 tevent_req_received(req);
    6524           0 :                 return status;
    6525             :         }
    6526             : 
    6527           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6528             : 
    6529           0 :         tevent_req_received(req);
    6530           0 :         return NT_STATUS_OK;
    6531             : }
    6532             : 
    6533           5 : NTSTATUS dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct winbind_DsrUpdateReadOnlyServerDnsRecords *r)
    6534             : {
    6535           0 :         NTSTATUS status;
    6536             : 
    6537           5 :         status = dcerpc_binding_handle_call(h,
    6538             :                         NULL, &ndr_table_winbind,
    6539             :                         NDR_WINBIND_DSRUPDATEREADONLYSERVERDNSRECORDS, mem_ctx, r);
    6540             : 
    6541           5 :         return status;
    6542             : }
    6543             : 
    6544             : struct dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_state {
    6545             :         struct winbind_DsrUpdateReadOnlyServerDnsRecords orig;
    6546             :         struct winbind_DsrUpdateReadOnlyServerDnsRecords tmp;
    6547             :         TALLOC_CTX *out_mem_ctx;
    6548             : };
    6549             : 
    6550             : static void dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_done(struct tevent_req *subreq);
    6551             : 
    6552           0 : struct tevent_req *dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_send(TALLOC_CTX *mem_ctx,
    6553             :                                                                          struct tevent_context *ev,
    6554             :                                                                          struct dcerpc_binding_handle *h,
    6555             :                                                                          const char *_site_name /* [in] [charset(UTF16),unique] */,
    6556             :                                                                          uint32_t _dns_ttl /* [in]  */,
    6557             :                                                                          struct NL_DNS_NAME_INFO_ARRAY *_dns_names /* [in,out] [ref] */)
    6558             : {
    6559           0 :         struct tevent_req *req;
    6560           0 :         struct dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_state *state;
    6561           0 :         struct tevent_req *subreq;
    6562             : 
    6563           0 :         req = tevent_req_create(mem_ctx, &state,
    6564             :                                 struct dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_state);
    6565           0 :         if (req == NULL) {
    6566           0 :                 return NULL;
    6567             :         }
    6568           0 :         state->out_mem_ctx = NULL;
    6569             : 
    6570             :         /* In parameters */
    6571           0 :         state->orig.in.site_name = _site_name;
    6572           0 :         state->orig.in.dns_ttl = _dns_ttl;
    6573           0 :         state->orig.in.dns_names = _dns_names;
    6574             : 
    6575             :         /* Out parameters */
    6576           0 :         state->orig.out.dns_names = _dns_names;
    6577             : 
    6578             :         /* Result */
    6579           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6580             : 
    6581           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6582             :                              "dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_out_memory");
    6583           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6584           0 :                 return tevent_req_post(req, ev);
    6585             :         }
    6586             : 
    6587             :         /* make a temporary copy, that we pass to the dispatch function */
    6588           0 :         state->tmp = state->orig;
    6589             : 
    6590           0 :         subreq = dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r_send(state, ev, h, &state->tmp);
    6591           0 :         if (tevent_req_nomem(subreq, req)) {
    6592           0 :                 return tevent_req_post(req, ev);
    6593             :         }
    6594           0 :         tevent_req_set_callback(subreq, dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_done, req);
    6595           0 :         return req;
    6596             : }
    6597             : 
    6598           0 : static void dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_done(struct tevent_req *subreq)
    6599             : {
    6600           0 :         struct tevent_req *req = tevent_req_callback_data(
    6601             :                 subreq, struct tevent_req);
    6602           0 :         struct dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_state *state = tevent_req_data(
    6603             :                 req, struct dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_state);
    6604           0 :         NTSTATUS status;
    6605           0 :         TALLOC_CTX *mem_ctx;
    6606             : 
    6607           0 :         if (state->out_mem_ctx) {
    6608           0 :                 mem_ctx = state->out_mem_ctx;
    6609             :         } else {
    6610           0 :                 mem_ctx = state;
    6611             :         }
    6612             : 
    6613           0 :         status = dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r_recv(subreq, mem_ctx);
    6614           0 :         TALLOC_FREE(subreq);
    6615           0 :         if (tevent_req_nterror(req, status)) {
    6616           0 :                 return;
    6617             :         }
    6618             : 
    6619             :         /* Copy out parameters */
    6620           0 :         *state->orig.out.dns_names = *state->tmp.out.dns_names;
    6621             : 
    6622             :         /* Copy result */
    6623           0 :         state->orig.out.result = state->tmp.out.result;
    6624             : 
    6625             :         /* Reset temporary structure */
    6626           0 :         NDR_ZERO_STRUCT(state->tmp);
    6627             : 
    6628           0 :         tevent_req_done(req);
    6629             : }
    6630             : 
    6631           0 : NTSTATUS dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_recv(struct tevent_req *req,
    6632             :                                                                TALLOC_CTX *mem_ctx,
    6633             :                                                                NTSTATUS *result)
    6634             : {
    6635           0 :         struct dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_state *state = tevent_req_data(
    6636             :                 req, struct dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_state);
    6637           0 :         NTSTATUS status;
    6638             : 
    6639           0 :         if (tevent_req_is_nterror(req, &status)) {
    6640           0 :                 tevent_req_received(req);
    6641           0 :                 return status;
    6642             :         }
    6643             : 
    6644             :         /* Steal possible out parameters to the callers context */
    6645           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6646             : 
    6647             :         /* Return result */
    6648           0 :         *result = state->orig.out.result;
    6649             : 
    6650           0 :         tevent_req_received(req);
    6651           0 :         return NT_STATUS_OK;
    6652             : }
    6653             : 
    6654           0 : NTSTATUS dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords(struct dcerpc_binding_handle *h,
    6655             :                                                           TALLOC_CTX *mem_ctx,
    6656             :                                                           const char *_site_name /* [in] [charset(UTF16),unique] */,
    6657             :                                                           uint32_t _dns_ttl /* [in]  */,
    6658             :                                                           struct NL_DNS_NAME_INFO_ARRAY *_dns_names /* [in,out] [ref] */,
    6659             :                                                           NTSTATUS *result)
    6660             : {
    6661           0 :         struct winbind_DsrUpdateReadOnlyServerDnsRecords r;
    6662           0 :         NTSTATUS status;
    6663             : 
    6664             :         /* In parameters */
    6665           0 :         r.in.site_name = _site_name;
    6666           0 :         r.in.dns_ttl = _dns_ttl;
    6667           0 :         r.in.dns_names = _dns_names;
    6668             : 
    6669             :         /* Out parameters */
    6670           0 :         r.out.dns_names = _dns_names;
    6671             : 
    6672             :         /* Result */
    6673           0 :         NDR_ZERO_STRUCT(r.out.result);
    6674             : 
    6675           0 :         status = dcerpc_winbind_DsrUpdateReadOnlyServerDnsRecords_r(h, mem_ctx, &r);
    6676           0 :         if (!NT_STATUS_IS_OK(status)) {
    6677           0 :                 return status;
    6678             :         }
    6679             : 
    6680             :         /* Return variables */
    6681           0 :         *_dns_names = *r.out.dns_names;
    6682             : 
    6683             :         /* Return result */
    6684           0 :         *result = r.out.result;
    6685             : 
    6686           0 :         return NT_STATUS_OK;
    6687             : }
    6688             : 
    6689             : struct dcerpc_winbind_LogonControl_r_state {
    6690             :         TALLOC_CTX *out_mem_ctx;
    6691             : };
    6692             : 
    6693             : static void dcerpc_winbind_LogonControl_r_done(struct tevent_req *subreq);
    6694             : 
    6695         165 : struct tevent_req *dcerpc_winbind_LogonControl_r_send(TALLOC_CTX *mem_ctx,
    6696             :         struct tevent_context *ev,
    6697             :         struct dcerpc_binding_handle *h,
    6698             :         struct winbind_LogonControl *r)
    6699             : {
    6700          16 :         struct tevent_req *req;
    6701          16 :         struct dcerpc_winbind_LogonControl_r_state *state;
    6702          16 :         struct tevent_req *subreq;
    6703             : 
    6704         165 :         req = tevent_req_create(mem_ctx, &state,
    6705             :                                 struct dcerpc_winbind_LogonControl_r_state);
    6706         165 :         if (req == NULL) {
    6707           0 :                 return NULL;
    6708             :         }
    6709             : 
    6710         165 :         state->out_mem_ctx = talloc_new(state);
    6711         165 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6712           0 :                 return tevent_req_post(req, ev);
    6713             :         }
    6714             : 
    6715         181 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6716             :                         NULL, &ndr_table_winbind,
    6717         165 :                         NDR_WINBIND_LOGONCONTROL, state->out_mem_ctx, r);
    6718         165 :         if (tevent_req_nomem(subreq, req)) {
    6719           0 :                 return tevent_req_post(req, ev);
    6720             :         }
    6721         165 :         tevent_req_set_callback(subreq, dcerpc_winbind_LogonControl_r_done, req);
    6722             : 
    6723         165 :         return req;
    6724             : }
    6725             : 
    6726         165 : static void dcerpc_winbind_LogonControl_r_done(struct tevent_req *subreq)
    6727             : {
    6728          16 :         struct tevent_req *req =
    6729         165 :                 tevent_req_callback_data(subreq,
    6730             :                 struct tevent_req);
    6731          16 :         NTSTATUS status;
    6732             : 
    6733         165 :         status = dcerpc_binding_handle_call_recv(subreq);
    6734         165 :         TALLOC_FREE(subreq);
    6735         165 :         if (tevent_req_nterror(req, status)) {
    6736           0 :                 return;
    6737             :         }
    6738             : 
    6739         165 :         tevent_req_done(req);
    6740             : }
    6741             : 
    6742         165 : NTSTATUS dcerpc_winbind_LogonControl_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6743             : {
    6744          16 :         struct dcerpc_winbind_LogonControl_r_state *state =
    6745         165 :                 tevent_req_data(req,
    6746             :                 struct dcerpc_winbind_LogonControl_r_state);
    6747          16 :         NTSTATUS status;
    6748             : 
    6749         165 :         if (tevent_req_is_nterror(req, &status)) {
    6750           0 :                 tevent_req_received(req);
    6751           0 :                 return status;
    6752             :         }
    6753             : 
    6754         165 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6755             : 
    6756         165 :         tevent_req_received(req);
    6757         165 :         return NT_STATUS_OK;
    6758             : }
    6759             : 
    6760           0 : NTSTATUS dcerpc_winbind_LogonControl_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct winbind_LogonControl *r)
    6761             : {
    6762           0 :         NTSTATUS status;
    6763             : 
    6764           0 :         status = dcerpc_binding_handle_call(h,
    6765             :                         NULL, &ndr_table_winbind,
    6766             :                         NDR_WINBIND_LOGONCONTROL, mem_ctx, r);
    6767             : 
    6768           0 :         return status;
    6769             : }
    6770             : 
    6771             : struct dcerpc_winbind_LogonControl_state {
    6772             :         struct winbind_LogonControl orig;
    6773             :         struct winbind_LogonControl tmp;
    6774             :         TALLOC_CTX *out_mem_ctx;
    6775             : };
    6776             : 
    6777             : static void dcerpc_winbind_LogonControl_done(struct tevent_req *subreq);
    6778             : 
    6779         165 : struct tevent_req *dcerpc_winbind_LogonControl_send(TALLOC_CTX *mem_ctx,
    6780             :                                                     struct tevent_context *ev,
    6781             :                                                     struct dcerpc_binding_handle *h,
    6782             :                                                     enum netr_LogonControlCode _function_code /* [in]  */,
    6783             :                                                     uint32_t _level /* [in]  */,
    6784             :                                                     union netr_CONTROL_DATA_INFORMATION *_data /* [in] [ref,switch_is(function_code)] */,
    6785             :                                                     union netr_CONTROL_QUERY_INFORMATION *_query /* [out] [ref,switch_is(level)] */)
    6786             : {
    6787          16 :         struct tevent_req *req;
    6788          16 :         struct dcerpc_winbind_LogonControl_state *state;
    6789          16 :         struct tevent_req *subreq;
    6790             : 
    6791         165 :         req = tevent_req_create(mem_ctx, &state,
    6792             :                                 struct dcerpc_winbind_LogonControl_state);
    6793         165 :         if (req == NULL) {
    6794           0 :                 return NULL;
    6795             :         }
    6796         165 :         state->out_mem_ctx = NULL;
    6797             : 
    6798             :         /* In parameters */
    6799         165 :         state->orig.in.function_code = _function_code;
    6800         165 :         state->orig.in.level = _level;
    6801         165 :         state->orig.in.data = _data;
    6802             : 
    6803             :         /* Out parameters */
    6804         165 :         state->orig.out.query = _query;
    6805             : 
    6806             :         /* Result */
    6807         165 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6808             : 
    6809         165 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6810             :                              "dcerpc_winbind_LogonControl_out_memory");
    6811         165 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6812           0 :                 return tevent_req_post(req, ev);
    6813             :         }
    6814             : 
    6815             :         /* make a temporary copy, that we pass to the dispatch function */
    6816         165 :         state->tmp = state->orig;
    6817             : 
    6818         165 :         subreq = dcerpc_winbind_LogonControl_r_send(state, ev, h, &state->tmp);
    6819         165 :         if (tevent_req_nomem(subreq, req)) {
    6820           0 :                 return tevent_req_post(req, ev);
    6821             :         }
    6822         165 :         tevent_req_set_callback(subreq, dcerpc_winbind_LogonControl_done, req);
    6823         165 :         return req;
    6824             : }
    6825             : 
    6826         165 : static void dcerpc_winbind_LogonControl_done(struct tevent_req *subreq)
    6827             : {
    6828         165 :         struct tevent_req *req = tevent_req_callback_data(
    6829             :                 subreq, struct tevent_req);
    6830         165 :         struct dcerpc_winbind_LogonControl_state *state = tevent_req_data(
    6831             :                 req, struct dcerpc_winbind_LogonControl_state);
    6832          16 :         NTSTATUS status;
    6833          16 :         TALLOC_CTX *mem_ctx;
    6834             : 
    6835         165 :         if (state->out_mem_ctx) {
    6836         165 :                 mem_ctx = state->out_mem_ctx;
    6837             :         } else {
    6838           0 :                 mem_ctx = state;
    6839             :         }
    6840             : 
    6841         165 :         status = dcerpc_winbind_LogonControl_r_recv(subreq, mem_ctx);
    6842         165 :         TALLOC_FREE(subreq);
    6843         165 :         if (tevent_req_nterror(req, status)) {
    6844           0 :                 return;
    6845             :         }
    6846             : 
    6847             :         /* Copy out parameters */
    6848         165 :         *state->orig.out.query = *state->tmp.out.query;
    6849             : 
    6850             :         /* Copy result */
    6851         165 :         state->orig.out.result = state->tmp.out.result;
    6852             : 
    6853             :         /* Reset temporary structure */
    6854         165 :         NDR_ZERO_STRUCT(state->tmp);
    6855             : 
    6856         165 :         tevent_req_done(req);
    6857             : }
    6858             : 
    6859         165 : NTSTATUS dcerpc_winbind_LogonControl_recv(struct tevent_req *req,
    6860             :                                           TALLOC_CTX *mem_ctx,
    6861             :                                           WERROR *result)
    6862             : {
    6863         165 :         struct dcerpc_winbind_LogonControl_state *state = tevent_req_data(
    6864             :                 req, struct dcerpc_winbind_LogonControl_state);
    6865          16 :         NTSTATUS status;
    6866             : 
    6867         165 :         if (tevent_req_is_nterror(req, &status)) {
    6868           0 :                 tevent_req_received(req);
    6869           0 :                 return status;
    6870             :         }
    6871             : 
    6872             :         /* Steal possible out parameters to the callers context */
    6873         165 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6874             : 
    6875             :         /* Return result */
    6876         165 :         *result = state->orig.out.result;
    6877             : 
    6878         165 :         tevent_req_received(req);
    6879         165 :         return NT_STATUS_OK;
    6880             : }
    6881             : 
    6882           0 : NTSTATUS dcerpc_winbind_LogonControl(struct dcerpc_binding_handle *h,
    6883             :                                      TALLOC_CTX *mem_ctx,
    6884             :                                      enum netr_LogonControlCode _function_code /* [in]  */,
    6885             :                                      uint32_t _level /* [in]  */,
    6886             :                                      union netr_CONTROL_DATA_INFORMATION *_data /* [in] [ref,switch_is(function_code)] */,
    6887             :                                      union netr_CONTROL_QUERY_INFORMATION *_query /* [out] [ref,switch_is(level)] */,
    6888             :                                      WERROR *result)
    6889             : {
    6890           0 :         struct winbind_LogonControl r;
    6891           0 :         NTSTATUS status;
    6892             : 
    6893             :         /* In parameters */
    6894           0 :         r.in.function_code = _function_code;
    6895           0 :         r.in.level = _level;
    6896           0 :         r.in.data = _data;
    6897             : 
    6898             :         /* Out parameters */
    6899           0 :         r.out.query = _query;
    6900             : 
    6901             :         /* Result */
    6902           0 :         NDR_ZERO_STRUCT(r.out.result);
    6903             : 
    6904           0 :         status = dcerpc_winbind_LogonControl_r(h, mem_ctx, &r);
    6905           0 :         if (!NT_STATUS_IS_OK(status)) {
    6906           0 :                 return status;
    6907             :         }
    6908             : 
    6909             :         /* Return variables */
    6910           0 :         *_query = *r.out.query;
    6911             : 
    6912             :         /* Return result */
    6913           0 :         *result = r.out.result;
    6914             : 
    6915           0 :         return NT_STATUS_OK;
    6916             : }
    6917             : 
    6918             : struct dcerpc_winbind_GetForestTrustInformation_r_state {
    6919             :         TALLOC_CTX *out_mem_ctx;
    6920             : };
    6921             : 
    6922             : static void dcerpc_winbind_GetForestTrustInformation_r_done(struct tevent_req *subreq);
    6923             : 
    6924          20 : struct tevent_req *dcerpc_winbind_GetForestTrustInformation_r_send(TALLOC_CTX *mem_ctx,
    6925             :         struct tevent_context *ev,
    6926             :         struct dcerpc_binding_handle *h,
    6927             :         struct winbind_GetForestTrustInformation *r)
    6928             : {
    6929           0 :         struct tevent_req *req;
    6930           0 :         struct dcerpc_winbind_GetForestTrustInformation_r_state *state;
    6931           0 :         struct tevent_req *subreq;
    6932             : 
    6933          20 :         req = tevent_req_create(mem_ctx, &state,
    6934             :                                 struct dcerpc_winbind_GetForestTrustInformation_r_state);
    6935          20 :         if (req == NULL) {
    6936           0 :                 return NULL;
    6937             :         }
    6938             : 
    6939          20 :         state->out_mem_ctx = talloc_new(state);
    6940          20 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6941           0 :                 return tevent_req_post(req, ev);
    6942             :         }
    6943             : 
    6944          20 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6945             :                         NULL, &ndr_table_winbind,
    6946          20 :                         NDR_WINBIND_GETFORESTTRUSTINFORMATION, state->out_mem_ctx, r);
    6947          20 :         if (tevent_req_nomem(subreq, req)) {
    6948           0 :                 return tevent_req_post(req, ev);
    6949             :         }
    6950          20 :         tevent_req_set_callback(subreq, dcerpc_winbind_GetForestTrustInformation_r_done, req);
    6951             : 
    6952          20 :         return req;
    6953             : }
    6954             : 
    6955          20 : static void dcerpc_winbind_GetForestTrustInformation_r_done(struct tevent_req *subreq)
    6956             : {
    6957           0 :         struct tevent_req *req =
    6958          20 :                 tevent_req_callback_data(subreq,
    6959             :                 struct tevent_req);
    6960           0 :         NTSTATUS status;
    6961             : 
    6962          20 :         status = dcerpc_binding_handle_call_recv(subreq);
    6963          20 :         TALLOC_FREE(subreq);
    6964          20 :         if (tevent_req_nterror(req, status)) {
    6965           0 :                 return;
    6966             :         }
    6967             : 
    6968          20 :         tevent_req_done(req);
    6969             : }
    6970             : 
    6971          20 : NTSTATUS dcerpc_winbind_GetForestTrustInformation_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6972             : {
    6973           0 :         struct dcerpc_winbind_GetForestTrustInformation_r_state *state =
    6974          20 :                 tevent_req_data(req,
    6975             :                 struct dcerpc_winbind_GetForestTrustInformation_r_state);
    6976           0 :         NTSTATUS status;
    6977             : 
    6978          20 :         if (tevent_req_is_nterror(req, &status)) {
    6979           0 :                 tevent_req_received(req);
    6980           0 :                 return status;
    6981             :         }
    6982             : 
    6983          20 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6984             : 
    6985          20 :         tevent_req_received(req);
    6986          20 :         return NT_STATUS_OK;
    6987             : }
    6988             : 
    6989           0 : NTSTATUS dcerpc_winbind_GetForestTrustInformation_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct winbind_GetForestTrustInformation *r)
    6990             : {
    6991           0 :         NTSTATUS status;
    6992             : 
    6993           0 :         status = dcerpc_binding_handle_call(h,
    6994             :                         NULL, &ndr_table_winbind,
    6995             :                         NDR_WINBIND_GETFORESTTRUSTINFORMATION, mem_ctx, r);
    6996             : 
    6997           0 :         return status;
    6998             : }
    6999             : 
    7000             : struct dcerpc_winbind_GetForestTrustInformation_state {
    7001             :         struct winbind_GetForestTrustInformation orig;
    7002             :         struct winbind_GetForestTrustInformation tmp;
    7003             :         TALLOC_CTX *out_mem_ctx;
    7004             : };
    7005             : 
    7006             : static void dcerpc_winbind_GetForestTrustInformation_done(struct tevent_req *subreq);
    7007             : 
    7008          20 : struct tevent_req *dcerpc_winbind_GetForestTrustInformation_send(TALLOC_CTX *mem_ctx,
    7009             :                                                                  struct tevent_context *ev,
    7010             :                                                                  struct dcerpc_binding_handle *h,
    7011             :                                                                  const char *_trusted_domain_name /* [in] [charset(UTF16),unique] */,
    7012             :                                                                  uint32_t _flags /* [in]  */,
    7013             :                                                                  struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */)
    7014             : {
    7015           0 :         struct tevent_req *req;
    7016           0 :         struct dcerpc_winbind_GetForestTrustInformation_state *state;
    7017           0 :         struct tevent_req *subreq;
    7018             : 
    7019          20 :         req = tevent_req_create(mem_ctx, &state,
    7020             :                                 struct dcerpc_winbind_GetForestTrustInformation_state);
    7021          20 :         if (req == NULL) {
    7022           0 :                 return NULL;
    7023             :         }
    7024          20 :         state->out_mem_ctx = NULL;
    7025             : 
    7026             :         /* In parameters */
    7027          20 :         state->orig.in.trusted_domain_name = _trusted_domain_name;
    7028          20 :         state->orig.in.flags = _flags;
    7029             : 
    7030             :         /* Out parameters */
    7031          20 :         state->orig.out.forest_trust_info = _forest_trust_info;
    7032             : 
    7033             :         /* Result */
    7034          20 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7035             : 
    7036          20 :         state->out_mem_ctx = talloc_named_const(state, 0,
    7037             :                              "dcerpc_winbind_GetForestTrustInformation_out_memory");
    7038          20 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7039           0 :                 return tevent_req_post(req, ev);
    7040             :         }
    7041             : 
    7042             :         /* make a temporary copy, that we pass to the dispatch function */
    7043          20 :         state->tmp = state->orig;
    7044             : 
    7045          20 :         subreq = dcerpc_winbind_GetForestTrustInformation_r_send(state, ev, h, &state->tmp);
    7046          20 :         if (tevent_req_nomem(subreq, req)) {
    7047           0 :                 return tevent_req_post(req, ev);
    7048             :         }
    7049          20 :         tevent_req_set_callback(subreq, dcerpc_winbind_GetForestTrustInformation_done, req);
    7050          20 :         return req;
    7051             : }
    7052             : 
    7053          20 : static void dcerpc_winbind_GetForestTrustInformation_done(struct tevent_req *subreq)
    7054             : {
    7055          20 :         struct tevent_req *req = tevent_req_callback_data(
    7056             :                 subreq, struct tevent_req);
    7057          20 :         struct dcerpc_winbind_GetForestTrustInformation_state *state = tevent_req_data(
    7058             :                 req, struct dcerpc_winbind_GetForestTrustInformation_state);
    7059           0 :         NTSTATUS status;
    7060           0 :         TALLOC_CTX *mem_ctx;
    7061             : 
    7062          20 :         if (state->out_mem_ctx) {
    7063          20 :                 mem_ctx = state->out_mem_ctx;
    7064             :         } else {
    7065           0 :                 mem_ctx = state;
    7066             :         }
    7067             : 
    7068          20 :         status = dcerpc_winbind_GetForestTrustInformation_r_recv(subreq, mem_ctx);
    7069          20 :         TALLOC_FREE(subreq);
    7070          20 :         if (tevent_req_nterror(req, status)) {
    7071           0 :                 return;
    7072             :         }
    7073             : 
    7074             :         /* Copy out parameters */
    7075          20 :         *state->orig.out.forest_trust_info = *state->tmp.out.forest_trust_info;
    7076             : 
    7077             :         /* Copy result */
    7078          20 :         state->orig.out.result = state->tmp.out.result;
    7079             : 
    7080             :         /* Reset temporary structure */
    7081          20 :         NDR_ZERO_STRUCT(state->tmp);
    7082             : 
    7083          20 :         tevent_req_done(req);
    7084             : }
    7085             : 
    7086          20 : NTSTATUS dcerpc_winbind_GetForestTrustInformation_recv(struct tevent_req *req,
    7087             :                                                        TALLOC_CTX *mem_ctx,
    7088             :                                                        WERROR *result)
    7089             : {
    7090          20 :         struct dcerpc_winbind_GetForestTrustInformation_state *state = tevent_req_data(
    7091             :                 req, struct dcerpc_winbind_GetForestTrustInformation_state);
    7092           0 :         NTSTATUS status;
    7093             : 
    7094          20 :         if (tevent_req_is_nterror(req, &status)) {
    7095           0 :                 tevent_req_received(req);
    7096           0 :                 return status;
    7097             :         }
    7098             : 
    7099             :         /* Steal possible out parameters to the callers context */
    7100          20 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7101             : 
    7102             :         /* Return result */
    7103          20 :         *result = state->orig.out.result;
    7104             : 
    7105          20 :         tevent_req_received(req);
    7106          20 :         return NT_STATUS_OK;
    7107             : }
    7108             : 
    7109           0 : NTSTATUS dcerpc_winbind_GetForestTrustInformation(struct dcerpc_binding_handle *h,
    7110             :                                                   TALLOC_CTX *mem_ctx,
    7111             :                                                   const char *_trusted_domain_name /* [in] [charset(UTF16),unique] */,
    7112             :                                                   uint32_t _flags /* [in]  */,
    7113             :                                                   struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */,
    7114             :                                                   WERROR *result)
    7115             : {
    7116           0 :         struct winbind_GetForestTrustInformation r;
    7117           0 :         NTSTATUS status;
    7118             : 
    7119             :         /* In parameters */
    7120           0 :         r.in.trusted_domain_name = _trusted_domain_name;
    7121           0 :         r.in.flags = _flags;
    7122             : 
    7123             :         /* Out parameters */
    7124           0 :         r.out.forest_trust_info = _forest_trust_info;
    7125             : 
    7126             :         /* Result */
    7127           0 :         NDR_ZERO_STRUCT(r.out.result);
    7128             : 
    7129           0 :         status = dcerpc_winbind_GetForestTrustInformation_r(h, mem_ctx, &r);
    7130           0 :         if (!NT_STATUS_IS_OK(status)) {
    7131           0 :                 return status;
    7132             :         }
    7133             : 
    7134             :         /* Return variables */
    7135           0 :         *_forest_trust_info = *r.out.forest_trust_info;
    7136             : 
    7137             :         /* Return result */
    7138           0 :         *result = r.out.result;
    7139             : 
    7140           0 :         return NT_STATUS_OK;
    7141             : }
    7142             : 
    7143             : struct dcerpc_winbind_SendToSam_r_state {
    7144             :         TALLOC_CTX *out_mem_ctx;
    7145             : };
    7146             : 
    7147             : static void dcerpc_winbind_SendToSam_r_done(struct tevent_req *subreq);
    7148             : 
    7149          17 : struct tevent_req *dcerpc_winbind_SendToSam_r_send(TALLOC_CTX *mem_ctx,
    7150             :         struct tevent_context *ev,
    7151             :         struct dcerpc_binding_handle *h,
    7152             :         struct winbind_SendToSam *r)
    7153             : {
    7154           0 :         struct tevent_req *req;
    7155           0 :         struct dcerpc_winbind_SendToSam_r_state *state;
    7156           0 :         struct tevent_req *subreq;
    7157             : 
    7158          17 :         req = tevent_req_create(mem_ctx, &state,
    7159             :                                 struct dcerpc_winbind_SendToSam_r_state);
    7160          17 :         if (req == NULL) {
    7161           0 :                 return NULL;
    7162             :         }
    7163             : 
    7164          17 :         state->out_mem_ctx = NULL;
    7165             : 
    7166          17 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7167             :                         NULL, &ndr_table_winbind,
    7168             :                         NDR_WINBIND_SENDTOSAM, state, r);
    7169          17 :         if (tevent_req_nomem(subreq, req)) {
    7170           0 :                 return tevent_req_post(req, ev);
    7171             :         }
    7172          17 :         tevent_req_set_callback(subreq, dcerpc_winbind_SendToSam_r_done, req);
    7173             : 
    7174          17 :         return req;
    7175             : }
    7176             : 
    7177           0 : static void dcerpc_winbind_SendToSam_r_done(struct tevent_req *subreq)
    7178             : {
    7179           0 :         struct tevent_req *req =
    7180           0 :                 tevent_req_callback_data(subreq,
    7181             :                 struct tevent_req);
    7182           0 :         NTSTATUS status;
    7183             : 
    7184           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7185           0 :         TALLOC_FREE(subreq);
    7186           0 :         if (tevent_req_nterror(req, status)) {
    7187           0 :                 return;
    7188             :         }
    7189             : 
    7190           0 :         tevent_req_done(req);
    7191             : }
    7192             : 
    7193           0 : NTSTATUS dcerpc_winbind_SendToSam_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7194             : {
    7195           0 :         struct dcerpc_winbind_SendToSam_r_state *state =
    7196           0 :                 tevent_req_data(req,
    7197             :                 struct dcerpc_winbind_SendToSam_r_state);
    7198           0 :         NTSTATUS status;
    7199             : 
    7200           0 :         if (tevent_req_is_nterror(req, &status)) {
    7201           0 :                 tevent_req_received(req);
    7202           0 :                 return status;
    7203             :         }
    7204             : 
    7205           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7206             : 
    7207           0 :         tevent_req_received(req);
    7208           0 :         return NT_STATUS_OK;
    7209             : }
    7210             : 
    7211           0 : NTSTATUS dcerpc_winbind_SendToSam_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct winbind_SendToSam *r)
    7212             : {
    7213           0 :         NTSTATUS status;
    7214             : 
    7215           0 :         status = dcerpc_binding_handle_call(h,
    7216             :                         NULL, &ndr_table_winbind,
    7217             :                         NDR_WINBIND_SENDTOSAM, mem_ctx, r);
    7218             : 
    7219           0 :         return status;
    7220             : }
    7221             : 
    7222             : struct dcerpc_winbind_SendToSam_state {
    7223             :         struct winbind_SendToSam orig;
    7224             :         struct winbind_SendToSam tmp;
    7225             :         TALLOC_CTX *out_mem_ctx;
    7226             : };
    7227             : 
    7228             : static void dcerpc_winbind_SendToSam_done(struct tevent_req *subreq);
    7229             : 
    7230           0 : struct tevent_req *dcerpc_winbind_SendToSam_send(TALLOC_CTX *mem_ctx,
    7231             :                                                  struct tevent_context *ev,
    7232             :                                                  struct dcerpc_binding_handle *h,
    7233             :                                                  struct netr_SendToSamBase _message /* [in]  */)
    7234             : {
    7235           0 :         struct tevent_req *req;
    7236           0 :         struct dcerpc_winbind_SendToSam_state *state;
    7237           0 :         struct tevent_req *subreq;
    7238             : 
    7239           0 :         req = tevent_req_create(mem_ctx, &state,
    7240             :                                 struct dcerpc_winbind_SendToSam_state);
    7241           0 :         if (req == NULL) {
    7242           0 :                 return NULL;
    7243             :         }
    7244           0 :         state->out_mem_ctx = NULL;
    7245             : 
    7246             :         /* In parameters */
    7247           0 :         state->orig.in.message = _message;
    7248             : 
    7249             :         /* Out parameters */
    7250             : 
    7251             :         /* Result */
    7252           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7253             : 
    7254             :         /* make a temporary copy, that we pass to the dispatch function */
    7255           0 :         state->tmp = state->orig;
    7256             : 
    7257           0 :         subreq = dcerpc_winbind_SendToSam_r_send(state, ev, h, &state->tmp);
    7258           0 :         if (tevent_req_nomem(subreq, req)) {
    7259           0 :                 return tevent_req_post(req, ev);
    7260             :         }
    7261           0 :         tevent_req_set_callback(subreq, dcerpc_winbind_SendToSam_done, req);
    7262           0 :         return req;
    7263             : }
    7264             : 
    7265           0 : static void dcerpc_winbind_SendToSam_done(struct tevent_req *subreq)
    7266             : {
    7267           0 :         struct tevent_req *req = tevent_req_callback_data(
    7268             :                 subreq, struct tevent_req);
    7269           0 :         struct dcerpc_winbind_SendToSam_state *state = tevent_req_data(
    7270             :                 req, struct dcerpc_winbind_SendToSam_state);
    7271           0 :         NTSTATUS status;
    7272           0 :         TALLOC_CTX *mem_ctx;
    7273             : 
    7274           0 :         if (state->out_mem_ctx) {
    7275           0 :                 mem_ctx = state->out_mem_ctx;
    7276             :         } else {
    7277           0 :                 mem_ctx = state;
    7278             :         }
    7279             : 
    7280           0 :         status = dcerpc_winbind_SendToSam_r_recv(subreq, mem_ctx);
    7281           0 :         TALLOC_FREE(subreq);
    7282           0 :         if (tevent_req_nterror(req, status)) {
    7283           0 :                 return;
    7284             :         }
    7285             : 
    7286             :         /* Copy out parameters */
    7287             : 
    7288             :         /* Copy result */
    7289           0 :         state->orig.out.result = state->tmp.out.result;
    7290             : 
    7291             :         /* Reset temporary structure */
    7292           0 :         NDR_ZERO_STRUCT(state->tmp);
    7293             : 
    7294           0 :         tevent_req_done(req);
    7295             : }
    7296             : 
    7297           0 : NTSTATUS dcerpc_winbind_SendToSam_recv(struct tevent_req *req,
    7298             :                                        TALLOC_CTX *mem_ctx,
    7299             :                                        NTSTATUS *result)
    7300             : {
    7301           0 :         struct dcerpc_winbind_SendToSam_state *state = tevent_req_data(
    7302             :                 req, struct dcerpc_winbind_SendToSam_state);
    7303           0 :         NTSTATUS status;
    7304             : 
    7305           0 :         if (tevent_req_is_nterror(req, &status)) {
    7306           0 :                 tevent_req_received(req);
    7307           0 :                 return status;
    7308             :         }
    7309             : 
    7310             :         /* Steal possible out parameters to the callers context */
    7311           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7312             : 
    7313             :         /* Return result */
    7314           0 :         *result = state->orig.out.result;
    7315             : 
    7316           0 :         tevent_req_received(req);
    7317           0 :         return NT_STATUS_OK;
    7318             : }
    7319             : 
    7320           0 : NTSTATUS dcerpc_winbind_SendToSam(struct dcerpc_binding_handle *h,
    7321             :                                   TALLOC_CTX *mem_ctx,
    7322             :                                   struct netr_SendToSamBase _message /* [in]  */,
    7323             :                                   NTSTATUS *result)
    7324             : {
    7325           0 :         struct winbind_SendToSam r;
    7326           0 :         NTSTATUS status;
    7327             : 
    7328             :         /* In parameters */
    7329           0 :         r.in.message = _message;
    7330             : 
    7331             :         /* Out parameters */
    7332             : 
    7333             :         /* Result */
    7334           0 :         NDR_ZERO_STRUCT(r.out.result);
    7335             : 
    7336           0 :         status = dcerpc_winbind_SendToSam_r(h, mem_ctx, &r);
    7337           0 :         if (!NT_STATUS_IS_OK(status)) {
    7338           0 :                 return status;
    7339             :         }
    7340             : 
    7341             :         /* Return variables */
    7342             : 
    7343             :         /* Return result */
    7344           0 :         *result = r.out.result;
    7345             : 
    7346           0 :         return NT_STATUS_OK;
    7347             : }
    7348             : 

Generated by: LCOV version 1.14