LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_lsa_c.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 563 5186 10.9 %
Date: 2021-09-23 10:06:22 Functions: 92 480 19.2 %

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