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 recycleplus df22b230 Lines: 1354 2626 51.6 %
Date: 2024-02-14 10:14:15 Functions: 149 252 59.1 %

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

Generated by: LCOV version 1.14