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 v4-17-test 1498b464 Lines: 1429 2688 53.2 %
Date: 2024-06-13 04:01:37 Functions: 152 252 60.3 %

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

Generated by: LCOV version 1.13