LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_samr_c.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 960 6801 14.1 %
Date: 2024-04-21 15:09:00 Functions: 149 552 27.0 %

          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_samr.h"
       7             : #include "bin/default/librpc/gen_ndr/ndr_samr_c.h"
       8             : 
       9             : /* samr - client functions generated by pidl */
      10             : 
      11             : struct dcerpc_samr_Connect_r_state {
      12             :         TALLOC_CTX *out_mem_ctx;
      13             : };
      14             : 
      15             : static void dcerpc_samr_Connect_r_done(struct tevent_req *subreq);
      16             : 
      17          12 : struct tevent_req *dcerpc_samr_Connect_r_send(TALLOC_CTX *mem_ctx,
      18             :         struct tevent_context *ev,
      19             :         struct dcerpc_binding_handle *h,
      20             :         struct samr_Connect *r)
      21             : {
      22           0 :         struct tevent_req *req;
      23           0 :         struct dcerpc_samr_Connect_r_state *state;
      24           0 :         struct tevent_req *subreq;
      25             : 
      26          12 :         req = tevent_req_create(mem_ctx, &state,
      27             :                                 struct dcerpc_samr_Connect_r_state);
      28          12 :         if (req == NULL) {
      29           0 :                 return NULL;
      30             :         }
      31             : 
      32          12 :         state->out_mem_ctx = talloc_new(state);
      33          12 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
      34           0 :                 return tevent_req_post(req, ev);
      35             :         }
      36             : 
      37          12 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
      38             :                         NULL, &ndr_table_samr,
      39          12 :                         NDR_SAMR_CONNECT, state->out_mem_ctx, r);
      40          12 :         if (tevent_req_nomem(subreq, req)) {
      41           0 :                 return tevent_req_post(req, ev);
      42             :         }
      43          12 :         tevent_req_set_callback(subreq, dcerpc_samr_Connect_r_done, req);
      44             : 
      45          12 :         return req;
      46             : }
      47             : 
      48          12 : static void dcerpc_samr_Connect_r_done(struct tevent_req *subreq)
      49             : {
      50           0 :         struct tevent_req *req =
      51          12 :                 tevent_req_callback_data(subreq,
      52             :                 struct tevent_req);
      53           0 :         NTSTATUS status;
      54             : 
      55          12 :         status = dcerpc_binding_handle_call_recv(subreq);
      56          12 :         TALLOC_FREE(subreq);
      57          12 :         if (tevent_req_nterror(req, status)) {
      58           0 :                 return;
      59             :         }
      60             : 
      61          12 :         tevent_req_done(req);
      62             : }
      63             : 
      64          12 : NTSTATUS dcerpc_samr_Connect_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
      65             : {
      66           0 :         struct dcerpc_samr_Connect_r_state *state =
      67          12 :                 tevent_req_data(req,
      68             :                 struct dcerpc_samr_Connect_r_state);
      69           0 :         NTSTATUS status;
      70             : 
      71          12 :         if (tevent_req_is_nterror(req, &status)) {
      72           0 :                 tevent_req_received(req);
      73           0 :                 return status;
      74             :         }
      75             : 
      76          12 :         talloc_steal(mem_ctx, state->out_mem_ctx);
      77             : 
      78          12 :         tevent_req_received(req);
      79          12 :         return NT_STATUS_OK;
      80             : }
      81             : 
      82        1627 : NTSTATUS dcerpc_samr_Connect_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_Connect *r)
      83             : {
      84         174 :         NTSTATUS status;
      85             : 
      86        1627 :         status = dcerpc_binding_handle_call(h,
      87             :                         NULL, &ndr_table_samr,
      88             :                         NDR_SAMR_CONNECT, mem_ctx, r);
      89             : 
      90        1627 :         return status;
      91             : }
      92             : 
      93             : struct dcerpc_samr_Connect_state {
      94             :         struct samr_Connect orig;
      95             :         struct samr_Connect tmp;
      96             :         TALLOC_CTX *out_mem_ctx;
      97             : };
      98             : 
      99             : static void dcerpc_samr_Connect_done(struct tevent_req *subreq);
     100             : 
     101           0 : struct tevent_req *dcerpc_samr_Connect_send(TALLOC_CTX *mem_ctx,
     102             :                                             struct tevent_context *ev,
     103             :                                             struct dcerpc_binding_handle *h,
     104             :                                             uint16_t *_system_name /* [in] [unique] */,
     105             :                                             uint32_t _access_mask /* [in]  */,
     106             :                                             struct policy_handle *_connect_handle /* [out] [ref] */)
     107             : {
     108           0 :         struct tevent_req *req;
     109           0 :         struct dcerpc_samr_Connect_state *state;
     110           0 :         struct tevent_req *subreq;
     111             : 
     112           0 :         req = tevent_req_create(mem_ctx, &state,
     113             :                                 struct dcerpc_samr_Connect_state);
     114           0 :         if (req == NULL) {
     115           0 :                 return NULL;
     116             :         }
     117           0 :         state->out_mem_ctx = NULL;
     118             : 
     119             :         /* In parameters */
     120           0 :         state->orig.in.system_name = _system_name;
     121           0 :         state->orig.in.access_mask = _access_mask;
     122             : 
     123             :         /* Out parameters */
     124           0 :         state->orig.out.connect_handle = _connect_handle;
     125             : 
     126             :         /* Result */
     127           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     128             : 
     129           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     130             :                              "dcerpc_samr_Connect_out_memory");
     131           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     132           0 :                 return tevent_req_post(req, ev);
     133             :         }
     134             : 
     135             :         /* make a temporary copy, that we pass to the dispatch function */
     136           0 :         state->tmp = state->orig;
     137             : 
     138           0 :         subreq = dcerpc_samr_Connect_r_send(state, ev, h, &state->tmp);
     139           0 :         if (tevent_req_nomem(subreq, req)) {
     140           0 :                 return tevent_req_post(req, ev);
     141             :         }
     142           0 :         tevent_req_set_callback(subreq, dcerpc_samr_Connect_done, req);
     143           0 :         return req;
     144             : }
     145             : 
     146           0 : static void dcerpc_samr_Connect_done(struct tevent_req *subreq)
     147             : {
     148           0 :         struct tevent_req *req = tevent_req_callback_data(
     149             :                 subreq, struct tevent_req);
     150           0 :         struct dcerpc_samr_Connect_state *state = tevent_req_data(
     151             :                 req, struct dcerpc_samr_Connect_state);
     152           0 :         NTSTATUS status;
     153           0 :         TALLOC_CTX *mem_ctx;
     154             : 
     155           0 :         if (state->out_mem_ctx) {
     156           0 :                 mem_ctx = state->out_mem_ctx;
     157             :         } else {
     158           0 :                 mem_ctx = state;
     159             :         }
     160             : 
     161           0 :         status = dcerpc_samr_Connect_r_recv(subreq, mem_ctx);
     162           0 :         TALLOC_FREE(subreq);
     163           0 :         if (tevent_req_nterror(req, status)) {
     164           0 :                 return;
     165             :         }
     166             : 
     167             :         /* Copy out parameters */
     168           0 :         *state->orig.out.connect_handle = *state->tmp.out.connect_handle;
     169             : 
     170             :         /* Copy result */
     171           0 :         state->orig.out.result = state->tmp.out.result;
     172             : 
     173             :         /* Reset temporary structure */
     174           0 :         NDR_ZERO_STRUCT(state->tmp);
     175             : 
     176           0 :         tevent_req_done(req);
     177             : }
     178             : 
     179           0 : NTSTATUS dcerpc_samr_Connect_recv(struct tevent_req *req,
     180             :                                   TALLOC_CTX *mem_ctx,
     181             :                                   NTSTATUS *result)
     182             : {
     183           0 :         struct dcerpc_samr_Connect_state *state = tevent_req_data(
     184             :                 req, struct dcerpc_samr_Connect_state);
     185           0 :         NTSTATUS status;
     186             : 
     187           0 :         if (tevent_req_is_nterror(req, &status)) {
     188           0 :                 tevent_req_received(req);
     189           0 :                 return status;
     190             :         }
     191             : 
     192             :         /* Steal possible out parameters to the callers context */
     193           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     194             : 
     195             :         /* Return result */
     196           0 :         *result = state->orig.out.result;
     197             : 
     198           0 :         tevent_req_received(req);
     199           0 :         return NT_STATUS_OK;
     200             : }
     201             : 
     202           0 : NTSTATUS dcerpc_samr_Connect(struct dcerpc_binding_handle *h,
     203             :                              TALLOC_CTX *mem_ctx,
     204             :                              uint16_t *_system_name /* [in] [unique] */,
     205             :                              uint32_t _access_mask /* [in]  */,
     206             :                              struct policy_handle *_connect_handle /* [out] [ref] */,
     207             :                              NTSTATUS *result)
     208             : {
     209           0 :         struct samr_Connect r;
     210           0 :         NTSTATUS status;
     211             : 
     212             :         /* In parameters */
     213           0 :         r.in.system_name = _system_name;
     214           0 :         r.in.access_mask = _access_mask;
     215             : 
     216             :         /* Out parameters */
     217           0 :         r.out.connect_handle = _connect_handle;
     218             : 
     219             :         /* Result */
     220           0 :         NDR_ZERO_STRUCT(r.out.result);
     221             : 
     222           0 :         status = dcerpc_samr_Connect_r(h, mem_ctx, &r);
     223           0 :         if (!NT_STATUS_IS_OK(status)) {
     224           0 :                 return status;
     225             :         }
     226             : 
     227             :         /* Return variables */
     228           0 :         *_connect_handle = *r.out.connect_handle;
     229             : 
     230             :         /* Return result */
     231           0 :         *result = r.out.result;
     232             : 
     233           0 :         return NT_STATUS_OK;
     234             : }
     235             : 
     236             : struct dcerpc_samr_Close_r_state {
     237             :         TALLOC_CTX *out_mem_ctx;
     238             : };
     239             : 
     240             : static void dcerpc_samr_Close_r_done(struct tevent_req *subreq);
     241             : 
     242          41 : struct tevent_req *dcerpc_samr_Close_r_send(TALLOC_CTX *mem_ctx,
     243             :         struct tevent_context *ev,
     244             :         struct dcerpc_binding_handle *h,
     245             :         struct samr_Close *r)
     246             : {
     247           0 :         struct tevent_req *req;
     248           0 :         struct dcerpc_samr_Close_r_state *state;
     249           0 :         struct tevent_req *subreq;
     250             : 
     251          41 :         req = tevent_req_create(mem_ctx, &state,
     252             :                                 struct dcerpc_samr_Close_r_state);
     253          41 :         if (req == NULL) {
     254           0 :                 return NULL;
     255             :         }
     256             : 
     257          41 :         state->out_mem_ctx = talloc_new(state);
     258          41 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     259           0 :                 return tevent_req_post(req, ev);
     260             :         }
     261             : 
     262          41 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     263             :                         NULL, &ndr_table_samr,
     264          41 :                         NDR_SAMR_CLOSE, state->out_mem_ctx, r);
     265          41 :         if (tevent_req_nomem(subreq, req)) {
     266           0 :                 return tevent_req_post(req, ev);
     267             :         }
     268          41 :         tevent_req_set_callback(subreq, dcerpc_samr_Close_r_done, req);
     269             : 
     270          41 :         return req;
     271             : }
     272             : 
     273          41 : static void dcerpc_samr_Close_r_done(struct tevent_req *subreq)
     274             : {
     275           0 :         struct tevent_req *req =
     276          41 :                 tevent_req_callback_data(subreq,
     277             :                 struct tevent_req);
     278           0 :         NTSTATUS status;
     279             : 
     280          41 :         status = dcerpc_binding_handle_call_recv(subreq);
     281          41 :         TALLOC_FREE(subreq);
     282          41 :         if (tevent_req_nterror(req, status)) {
     283           0 :                 return;
     284             :         }
     285             : 
     286          41 :         tevent_req_done(req);
     287             : }
     288             : 
     289          41 : NTSTATUS dcerpc_samr_Close_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     290             : {
     291           0 :         struct dcerpc_samr_Close_r_state *state =
     292          41 :                 tevent_req_data(req,
     293             :                 struct dcerpc_samr_Close_r_state);
     294           0 :         NTSTATUS status;
     295             : 
     296          41 :         if (tevent_req_is_nterror(req, &status)) {
     297           0 :                 tevent_req_received(req);
     298           0 :                 return status;
     299             :         }
     300             : 
     301          41 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     302             : 
     303          41 :         tevent_req_received(req);
     304          41 :         return NT_STATUS_OK;
     305             : }
     306             : 
     307        6466 : NTSTATUS dcerpc_samr_Close_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_Close *r)
     308             : {
     309          12 :         NTSTATUS status;
     310             : 
     311        6466 :         status = dcerpc_binding_handle_call(h,
     312             :                         NULL, &ndr_table_samr,
     313             :                         NDR_SAMR_CLOSE, mem_ctx, r);
     314             : 
     315        6466 :         return status;
     316             : }
     317             : 
     318             : struct dcerpc_samr_Close_state {
     319             :         struct samr_Close orig;
     320             :         struct samr_Close tmp;
     321             :         TALLOC_CTX *out_mem_ctx;
     322             : };
     323             : 
     324             : static void dcerpc_samr_Close_done(struct tevent_req *subreq);
     325             : 
     326           0 : struct tevent_req *dcerpc_samr_Close_send(TALLOC_CTX *mem_ctx,
     327             :                                           struct tevent_context *ev,
     328             :                                           struct dcerpc_binding_handle *h,
     329             :                                           struct policy_handle *_handle /* [in,out] [ref] */)
     330             : {
     331           0 :         struct tevent_req *req;
     332           0 :         struct dcerpc_samr_Close_state *state;
     333           0 :         struct tevent_req *subreq;
     334             : 
     335           0 :         req = tevent_req_create(mem_ctx, &state,
     336             :                                 struct dcerpc_samr_Close_state);
     337           0 :         if (req == NULL) {
     338           0 :                 return NULL;
     339             :         }
     340           0 :         state->out_mem_ctx = NULL;
     341             : 
     342             :         /* In parameters */
     343           0 :         state->orig.in.handle = _handle;
     344             : 
     345             :         /* Out parameters */
     346           0 :         state->orig.out.handle = _handle;
     347             : 
     348             :         /* Result */
     349           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     350             : 
     351           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     352             :                              "dcerpc_samr_Close_out_memory");
     353           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     354           0 :                 return tevent_req_post(req, ev);
     355             :         }
     356             : 
     357             :         /* make a temporary copy, that we pass to the dispatch function */
     358           0 :         state->tmp = state->orig;
     359             : 
     360           0 :         subreq = dcerpc_samr_Close_r_send(state, ev, h, &state->tmp);
     361           0 :         if (tevent_req_nomem(subreq, req)) {
     362           0 :                 return tevent_req_post(req, ev);
     363             :         }
     364           0 :         tevent_req_set_callback(subreq, dcerpc_samr_Close_done, req);
     365           0 :         return req;
     366             : }
     367             : 
     368           0 : static void dcerpc_samr_Close_done(struct tevent_req *subreq)
     369             : {
     370           0 :         struct tevent_req *req = tevent_req_callback_data(
     371             :                 subreq, struct tevent_req);
     372           0 :         struct dcerpc_samr_Close_state *state = tevent_req_data(
     373             :                 req, struct dcerpc_samr_Close_state);
     374           0 :         NTSTATUS status;
     375           0 :         TALLOC_CTX *mem_ctx;
     376             : 
     377           0 :         if (state->out_mem_ctx) {
     378           0 :                 mem_ctx = state->out_mem_ctx;
     379             :         } else {
     380           0 :                 mem_ctx = state;
     381             :         }
     382             : 
     383           0 :         status = dcerpc_samr_Close_r_recv(subreq, mem_ctx);
     384           0 :         TALLOC_FREE(subreq);
     385           0 :         if (tevent_req_nterror(req, status)) {
     386           0 :                 return;
     387             :         }
     388             : 
     389             :         /* Copy out parameters */
     390           0 :         *state->orig.out.handle = *state->tmp.out.handle;
     391             : 
     392             :         /* Copy result */
     393           0 :         state->orig.out.result = state->tmp.out.result;
     394             : 
     395             :         /* Reset temporary structure */
     396           0 :         NDR_ZERO_STRUCT(state->tmp);
     397             : 
     398           0 :         tevent_req_done(req);
     399             : }
     400             : 
     401           0 : NTSTATUS dcerpc_samr_Close_recv(struct tevent_req *req,
     402             :                                 TALLOC_CTX *mem_ctx,
     403             :                                 NTSTATUS *result)
     404             : {
     405           0 :         struct dcerpc_samr_Close_state *state = tevent_req_data(
     406             :                 req, struct dcerpc_samr_Close_state);
     407           0 :         NTSTATUS status;
     408             : 
     409           0 :         if (tevent_req_is_nterror(req, &status)) {
     410           0 :                 tevent_req_received(req);
     411           0 :                 return status;
     412             :         }
     413             : 
     414             :         /* Steal possible out parameters to the callers context */
     415           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     416             : 
     417             :         /* Return result */
     418           0 :         *result = state->orig.out.result;
     419             : 
     420           0 :         tevent_req_received(req);
     421           0 :         return NT_STATUS_OK;
     422             : }
     423             : 
     424        2090 : NTSTATUS dcerpc_samr_Close(struct dcerpc_binding_handle *h,
     425             :                            TALLOC_CTX *mem_ctx,
     426             :                            struct policy_handle *_handle /* [in,out] [ref] */,
     427             :                            NTSTATUS *result)
     428             : {
     429           0 :         struct samr_Close r;
     430           0 :         NTSTATUS status;
     431             : 
     432             :         /* In parameters */
     433        2090 :         r.in.handle = _handle;
     434             : 
     435             :         /* Out parameters */
     436        2090 :         r.out.handle = _handle;
     437             : 
     438             :         /* Result */
     439        2090 :         NDR_ZERO_STRUCT(r.out.result);
     440             : 
     441        2090 :         status = dcerpc_samr_Close_r(h, mem_ctx, &r);
     442        2090 :         if (!NT_STATUS_IS_OK(status)) {
     443           0 :                 return status;
     444             :         }
     445             : 
     446             :         /* Return variables */
     447        2090 :         *_handle = *r.out.handle;
     448             : 
     449             :         /* Return result */
     450        2090 :         *result = r.out.result;
     451             : 
     452        2090 :         return NT_STATUS_OK;
     453             : }
     454             : 
     455             : struct dcerpc_samr_SetSecurity_r_state {
     456             :         TALLOC_CTX *out_mem_ctx;
     457             : };
     458             : 
     459             : static void dcerpc_samr_SetSecurity_r_done(struct tevent_req *subreq);
     460             : 
     461           0 : struct tevent_req *dcerpc_samr_SetSecurity_r_send(TALLOC_CTX *mem_ctx,
     462             :         struct tevent_context *ev,
     463             :         struct dcerpc_binding_handle *h,
     464             :         struct samr_SetSecurity *r)
     465             : {
     466           0 :         struct tevent_req *req;
     467           0 :         struct dcerpc_samr_SetSecurity_r_state *state;
     468           0 :         struct tevent_req *subreq;
     469             : 
     470           0 :         req = tevent_req_create(mem_ctx, &state,
     471             :                                 struct dcerpc_samr_SetSecurity_r_state);
     472           0 :         if (req == NULL) {
     473           0 :                 return NULL;
     474             :         }
     475             : 
     476           0 :         state->out_mem_ctx = NULL;
     477             : 
     478           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     479             :                         NULL, &ndr_table_samr,
     480             :                         NDR_SAMR_SETSECURITY, state, r);
     481           0 :         if (tevent_req_nomem(subreq, req)) {
     482           0 :                 return tevent_req_post(req, ev);
     483             :         }
     484           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetSecurity_r_done, req);
     485             : 
     486           0 :         return req;
     487             : }
     488             : 
     489           0 : static void dcerpc_samr_SetSecurity_r_done(struct tevent_req *subreq)
     490             : {
     491           0 :         struct tevent_req *req =
     492           0 :                 tevent_req_callback_data(subreq,
     493             :                 struct tevent_req);
     494           0 :         NTSTATUS status;
     495             : 
     496           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     497           0 :         TALLOC_FREE(subreq);
     498           0 :         if (tevent_req_nterror(req, status)) {
     499           0 :                 return;
     500             :         }
     501             : 
     502           0 :         tevent_req_done(req);
     503             : }
     504             : 
     505           0 : NTSTATUS dcerpc_samr_SetSecurity_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     506             : {
     507           0 :         struct dcerpc_samr_SetSecurity_r_state *state =
     508           0 :                 tevent_req_data(req,
     509             :                 struct dcerpc_samr_SetSecurity_r_state);
     510           0 :         NTSTATUS status;
     511             : 
     512           0 :         if (tevent_req_is_nterror(req, &status)) {
     513           0 :                 tevent_req_received(req);
     514           0 :                 return status;
     515             :         }
     516             : 
     517           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     518             : 
     519           0 :         tevent_req_received(req);
     520           0 :         return NT_STATUS_OK;
     521             : }
     522             : 
     523           4 : NTSTATUS dcerpc_samr_SetSecurity_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_SetSecurity *r)
     524             : {
     525           0 :         NTSTATUS status;
     526             : 
     527           4 :         status = dcerpc_binding_handle_call(h,
     528             :                         NULL, &ndr_table_samr,
     529             :                         NDR_SAMR_SETSECURITY, mem_ctx, r);
     530             : 
     531           4 :         return status;
     532             : }
     533             : 
     534             : struct dcerpc_samr_SetSecurity_state {
     535             :         struct samr_SetSecurity orig;
     536             :         struct samr_SetSecurity tmp;
     537             :         TALLOC_CTX *out_mem_ctx;
     538             : };
     539             : 
     540             : static void dcerpc_samr_SetSecurity_done(struct tevent_req *subreq);
     541             : 
     542           0 : struct tevent_req *dcerpc_samr_SetSecurity_send(TALLOC_CTX *mem_ctx,
     543             :                                                 struct tevent_context *ev,
     544             :                                                 struct dcerpc_binding_handle *h,
     545             :                                                 struct policy_handle *_handle /* [in] [ref] */,
     546             :                                                 uint32_t _sec_info /* [in]  */,
     547             :                                                 struct sec_desc_buf *_sdbuf /* [in] [ref] */)
     548             : {
     549           0 :         struct tevent_req *req;
     550           0 :         struct dcerpc_samr_SetSecurity_state *state;
     551           0 :         struct tevent_req *subreq;
     552             : 
     553           0 :         req = tevent_req_create(mem_ctx, &state,
     554             :                                 struct dcerpc_samr_SetSecurity_state);
     555           0 :         if (req == NULL) {
     556           0 :                 return NULL;
     557             :         }
     558           0 :         state->out_mem_ctx = NULL;
     559             : 
     560             :         /* In parameters */
     561           0 :         state->orig.in.handle = _handle;
     562           0 :         state->orig.in.sec_info = _sec_info;
     563           0 :         state->orig.in.sdbuf = _sdbuf;
     564             : 
     565             :         /* Out parameters */
     566             : 
     567             :         /* Result */
     568           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     569             : 
     570             :         /* make a temporary copy, that we pass to the dispatch function */
     571           0 :         state->tmp = state->orig;
     572             : 
     573           0 :         subreq = dcerpc_samr_SetSecurity_r_send(state, ev, h, &state->tmp);
     574           0 :         if (tevent_req_nomem(subreq, req)) {
     575           0 :                 return tevent_req_post(req, ev);
     576             :         }
     577           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetSecurity_done, req);
     578           0 :         return req;
     579             : }
     580             : 
     581           0 : static void dcerpc_samr_SetSecurity_done(struct tevent_req *subreq)
     582             : {
     583           0 :         struct tevent_req *req = tevent_req_callback_data(
     584             :                 subreq, struct tevent_req);
     585           0 :         struct dcerpc_samr_SetSecurity_state *state = tevent_req_data(
     586             :                 req, struct dcerpc_samr_SetSecurity_state);
     587           0 :         NTSTATUS status;
     588           0 :         TALLOC_CTX *mem_ctx;
     589             : 
     590           0 :         if (state->out_mem_ctx) {
     591           0 :                 mem_ctx = state->out_mem_ctx;
     592             :         } else {
     593           0 :                 mem_ctx = state;
     594             :         }
     595             : 
     596           0 :         status = dcerpc_samr_SetSecurity_r_recv(subreq, mem_ctx);
     597           0 :         TALLOC_FREE(subreq);
     598           0 :         if (tevent_req_nterror(req, status)) {
     599           0 :                 return;
     600             :         }
     601             : 
     602             :         /* Copy out parameters */
     603             : 
     604             :         /* Copy result */
     605           0 :         state->orig.out.result = state->tmp.out.result;
     606             : 
     607             :         /* Reset temporary structure */
     608           0 :         NDR_ZERO_STRUCT(state->tmp);
     609             : 
     610           0 :         tevent_req_done(req);
     611             : }
     612             : 
     613           0 : NTSTATUS dcerpc_samr_SetSecurity_recv(struct tevent_req *req,
     614             :                                       TALLOC_CTX *mem_ctx,
     615             :                                       NTSTATUS *result)
     616             : {
     617           0 :         struct dcerpc_samr_SetSecurity_state *state = tevent_req_data(
     618             :                 req, struct dcerpc_samr_SetSecurity_state);
     619           0 :         NTSTATUS status;
     620             : 
     621           0 :         if (tevent_req_is_nterror(req, &status)) {
     622           0 :                 tevent_req_received(req);
     623           0 :                 return status;
     624             :         }
     625             : 
     626             :         /* Steal possible out parameters to the callers context */
     627           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     628             : 
     629             :         /* Return result */
     630           0 :         *result = state->orig.out.result;
     631             : 
     632           0 :         tevent_req_received(req);
     633           0 :         return NT_STATUS_OK;
     634             : }
     635             : 
     636           0 : NTSTATUS dcerpc_samr_SetSecurity(struct dcerpc_binding_handle *h,
     637             :                                  TALLOC_CTX *mem_ctx,
     638             :                                  struct policy_handle *_handle /* [in] [ref] */,
     639             :                                  uint32_t _sec_info /* [in]  */,
     640             :                                  struct sec_desc_buf *_sdbuf /* [in] [ref] */,
     641             :                                  NTSTATUS *result)
     642             : {
     643           0 :         struct samr_SetSecurity r;
     644           0 :         NTSTATUS status;
     645             : 
     646             :         /* In parameters */
     647           0 :         r.in.handle = _handle;
     648           0 :         r.in.sec_info = _sec_info;
     649           0 :         r.in.sdbuf = _sdbuf;
     650             : 
     651             :         /* Out parameters */
     652             : 
     653             :         /* Result */
     654           0 :         NDR_ZERO_STRUCT(r.out.result);
     655             : 
     656           0 :         status = dcerpc_samr_SetSecurity_r(h, mem_ctx, &r);
     657           0 :         if (!NT_STATUS_IS_OK(status)) {
     658           0 :                 return status;
     659             :         }
     660             : 
     661             :         /* Return variables */
     662             : 
     663             :         /* Return result */
     664           0 :         *result = r.out.result;
     665             : 
     666           0 :         return NT_STATUS_OK;
     667             : }
     668             : 
     669             : struct dcerpc_samr_QuerySecurity_r_state {
     670             :         TALLOC_CTX *out_mem_ctx;
     671             : };
     672             : 
     673             : static void dcerpc_samr_QuerySecurity_r_done(struct tevent_req *subreq);
     674             : 
     675           0 : struct tevent_req *dcerpc_samr_QuerySecurity_r_send(TALLOC_CTX *mem_ctx,
     676             :         struct tevent_context *ev,
     677             :         struct dcerpc_binding_handle *h,
     678             :         struct samr_QuerySecurity *r)
     679             : {
     680           0 :         struct tevent_req *req;
     681           0 :         struct dcerpc_samr_QuerySecurity_r_state *state;
     682           0 :         struct tevent_req *subreq;
     683             : 
     684           0 :         req = tevent_req_create(mem_ctx, &state,
     685             :                                 struct dcerpc_samr_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_samr,
     697           0 :                         NDR_SAMR_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_samr_QuerySecurity_r_done, req);
     702             : 
     703           0 :         return req;
     704             : }
     705             : 
     706           0 : static void dcerpc_samr_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           0 :         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_samr_QuerySecurity_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     723             : {
     724           0 :         struct dcerpc_samr_QuerySecurity_r_state *state =
     725           0 :                 tevent_req_data(req,
     726             :                 struct dcerpc_samr_QuerySecurity_r_state);
     727           0 :         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         330 : NTSTATUS dcerpc_samr_QuerySecurity_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_QuerySecurity *r)
     741             : {
     742           0 :         NTSTATUS status;
     743             : 
     744         330 :         status = dcerpc_binding_handle_call(h,
     745             :                         NULL, &ndr_table_samr,
     746             :                         NDR_SAMR_QUERYSECURITY, mem_ctx, r);
     747             : 
     748         330 :         return status;
     749             : }
     750             : 
     751             : struct dcerpc_samr_QuerySecurity_state {
     752             :         struct samr_QuerySecurity orig;
     753             :         struct samr_QuerySecurity tmp;
     754             :         TALLOC_CTX *out_mem_ctx;
     755             : };
     756             : 
     757             : static void dcerpc_samr_QuerySecurity_done(struct tevent_req *subreq);
     758             : 
     759           0 : struct tevent_req *dcerpc_samr_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           0 :         struct tevent_req *req;
     767           0 :         struct dcerpc_samr_QuerySecurity_state *state;
     768           0 :         struct tevent_req *subreq;
     769             : 
     770           0 :         req = tevent_req_create(mem_ctx, &state,
     771             :                                 struct dcerpc_samr_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_samr_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_samr_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_samr_QuerySecurity_done, req);
     801           0 :         return req;
     802             : }
     803             : 
     804           0 : static void dcerpc_samr_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_samr_QuerySecurity_state *state = tevent_req_data(
     809             :                 req, struct dcerpc_samr_QuerySecurity_state);
     810           0 :         NTSTATUS status;
     811           0 :         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_samr_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_samr_QuerySecurity_recv(struct tevent_req *req,
     838             :                                         TALLOC_CTX *mem_ctx,
     839             :                                         NTSTATUS *result)
     840             : {
     841           0 :         struct dcerpc_samr_QuerySecurity_state *state = tevent_req_data(
     842             :                 req, struct dcerpc_samr_QuerySecurity_state);
     843           0 :         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         136 : NTSTATUS dcerpc_samr_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           0 :         struct samr_QuerySecurity r;
     868           0 :         NTSTATUS status;
     869             : 
     870             :         /* In parameters */
     871         136 :         r.in.handle = _handle;
     872         136 :         r.in.sec_info = _sec_info;
     873             : 
     874             :         /* Out parameters */
     875         136 :         r.out.sdbuf = _sdbuf;
     876             : 
     877             :         /* Result */
     878         136 :         NDR_ZERO_STRUCT(r.out.result);
     879             : 
     880         136 :         status = dcerpc_samr_QuerySecurity_r(h, mem_ctx, &r);
     881         136 :         if (!NT_STATUS_IS_OK(status)) {
     882           0 :                 return status;
     883             :         }
     884             : 
     885             :         /* Return variables */
     886         136 :         *_sdbuf = *r.out.sdbuf;
     887             : 
     888             :         /* Return result */
     889         136 :         *result = r.out.result;
     890             : 
     891         136 :         return NT_STATUS_OK;
     892             : }
     893             : 
     894             : struct dcerpc_samr_Shutdown_r_state {
     895             :         TALLOC_CTX *out_mem_ctx;
     896             : };
     897             : 
     898             : static void dcerpc_samr_Shutdown_r_done(struct tevent_req *subreq);
     899             : 
     900           0 : struct tevent_req *dcerpc_samr_Shutdown_r_send(TALLOC_CTX *mem_ctx,
     901             :         struct tevent_context *ev,
     902             :         struct dcerpc_binding_handle *h,
     903             :         struct samr_Shutdown *r)
     904             : {
     905           0 :         struct tevent_req *req;
     906           0 :         struct dcerpc_samr_Shutdown_r_state *state;
     907           0 :         struct tevent_req *subreq;
     908             : 
     909           0 :         req = tevent_req_create(mem_ctx, &state,
     910             :                                 struct dcerpc_samr_Shutdown_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_samr,
     919             :                         NDR_SAMR_SHUTDOWN, 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_samr_Shutdown_r_done, req);
     924             : 
     925           0 :         return req;
     926             : }
     927             : 
     928           0 : static void dcerpc_samr_Shutdown_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           0 :         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_samr_Shutdown_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     945             : {
     946           0 :         struct dcerpc_samr_Shutdown_r_state *state =
     947           0 :                 tevent_req_data(req,
     948             :                 struct dcerpc_samr_Shutdown_r_state);
     949           0 :         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_samr_Shutdown_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_Shutdown *r)
     963             : {
     964           0 :         NTSTATUS status;
     965             : 
     966           0 :         status = dcerpc_binding_handle_call(h,
     967             :                         NULL, &ndr_table_samr,
     968             :                         NDR_SAMR_SHUTDOWN, mem_ctx, r);
     969             : 
     970           0 :         return status;
     971             : }
     972             : 
     973             : struct dcerpc_samr_Shutdown_state {
     974             :         struct samr_Shutdown orig;
     975             :         struct samr_Shutdown tmp;
     976             :         TALLOC_CTX *out_mem_ctx;
     977             : };
     978             : 
     979             : static void dcerpc_samr_Shutdown_done(struct tevent_req *subreq);
     980             : 
     981           0 : struct tevent_req *dcerpc_samr_Shutdown_send(TALLOC_CTX *mem_ctx,
     982             :                                              struct tevent_context *ev,
     983             :                                              struct dcerpc_binding_handle *h,
     984             :                                              struct policy_handle *_connect_handle /* [in] [ref] */)
     985             : {
     986           0 :         struct tevent_req *req;
     987           0 :         struct dcerpc_samr_Shutdown_state *state;
     988           0 :         struct tevent_req *subreq;
     989             : 
     990           0 :         req = tevent_req_create(mem_ctx, &state,
     991             :                                 struct dcerpc_samr_Shutdown_state);
     992           0 :         if (req == NULL) {
     993           0 :                 return NULL;
     994             :         }
     995           0 :         state->out_mem_ctx = NULL;
     996             : 
     997             :         /* In parameters */
     998           0 :         state->orig.in.connect_handle = _connect_handle;
     999             : 
    1000             :         /* Out parameters */
    1001             : 
    1002             :         /* Result */
    1003           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1004             : 
    1005             :         /* make a temporary copy, that we pass to the dispatch function */
    1006           0 :         state->tmp = state->orig;
    1007             : 
    1008           0 :         subreq = dcerpc_samr_Shutdown_r_send(state, ev, h, &state->tmp);
    1009           0 :         if (tevent_req_nomem(subreq, req)) {
    1010           0 :                 return tevent_req_post(req, ev);
    1011             :         }
    1012           0 :         tevent_req_set_callback(subreq, dcerpc_samr_Shutdown_done, req);
    1013           0 :         return req;
    1014             : }
    1015             : 
    1016           0 : static void dcerpc_samr_Shutdown_done(struct tevent_req *subreq)
    1017             : {
    1018           0 :         struct tevent_req *req = tevent_req_callback_data(
    1019             :                 subreq, struct tevent_req);
    1020           0 :         struct dcerpc_samr_Shutdown_state *state = tevent_req_data(
    1021             :                 req, struct dcerpc_samr_Shutdown_state);
    1022           0 :         NTSTATUS status;
    1023           0 :         TALLOC_CTX *mem_ctx;
    1024             : 
    1025           0 :         if (state->out_mem_ctx) {
    1026           0 :                 mem_ctx = state->out_mem_ctx;
    1027             :         } else {
    1028           0 :                 mem_ctx = state;
    1029             :         }
    1030             : 
    1031           0 :         status = dcerpc_samr_Shutdown_r_recv(subreq, mem_ctx);
    1032           0 :         TALLOC_FREE(subreq);
    1033           0 :         if (tevent_req_nterror(req, status)) {
    1034           0 :                 return;
    1035             :         }
    1036             : 
    1037             :         /* Copy out parameters */
    1038             : 
    1039             :         /* Copy result */
    1040           0 :         state->orig.out.result = state->tmp.out.result;
    1041             : 
    1042             :         /* Reset temporary structure */
    1043           0 :         NDR_ZERO_STRUCT(state->tmp);
    1044             : 
    1045           0 :         tevent_req_done(req);
    1046             : }
    1047             : 
    1048           0 : NTSTATUS dcerpc_samr_Shutdown_recv(struct tevent_req *req,
    1049             :                                    TALLOC_CTX *mem_ctx,
    1050             :                                    NTSTATUS *result)
    1051             : {
    1052           0 :         struct dcerpc_samr_Shutdown_state *state = tevent_req_data(
    1053             :                 req, struct dcerpc_samr_Shutdown_state);
    1054           0 :         NTSTATUS status;
    1055             : 
    1056           0 :         if (tevent_req_is_nterror(req, &status)) {
    1057           0 :                 tevent_req_received(req);
    1058           0 :                 return status;
    1059             :         }
    1060             : 
    1061             :         /* Steal possible out parameters to the callers context */
    1062           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1063             : 
    1064             :         /* Return result */
    1065           0 :         *result = state->orig.out.result;
    1066             : 
    1067           0 :         tevent_req_received(req);
    1068           0 :         return NT_STATUS_OK;
    1069             : }
    1070             : 
    1071           0 : NTSTATUS dcerpc_samr_Shutdown(struct dcerpc_binding_handle *h,
    1072             :                               TALLOC_CTX *mem_ctx,
    1073             :                               struct policy_handle *_connect_handle /* [in] [ref] */,
    1074             :                               NTSTATUS *result)
    1075             : {
    1076           0 :         struct samr_Shutdown r;
    1077           0 :         NTSTATUS status;
    1078             : 
    1079             :         /* In parameters */
    1080           0 :         r.in.connect_handle = _connect_handle;
    1081             : 
    1082             :         /* Out parameters */
    1083             : 
    1084             :         /* Result */
    1085           0 :         NDR_ZERO_STRUCT(r.out.result);
    1086             : 
    1087           0 :         status = dcerpc_samr_Shutdown_r(h, mem_ctx, &r);
    1088           0 :         if (!NT_STATUS_IS_OK(status)) {
    1089           0 :                 return status;
    1090             :         }
    1091             : 
    1092             :         /* Return variables */
    1093             : 
    1094             :         /* Return result */
    1095           0 :         *result = r.out.result;
    1096             : 
    1097           0 :         return NT_STATUS_OK;
    1098             : }
    1099             : 
    1100             : struct dcerpc_samr_LookupDomain_r_state {
    1101             :         TALLOC_CTX *out_mem_ctx;
    1102             : };
    1103             : 
    1104             : static void dcerpc_samr_LookupDomain_r_done(struct tevent_req *subreq);
    1105             : 
    1106          10 : struct tevent_req *dcerpc_samr_LookupDomain_r_send(TALLOC_CTX *mem_ctx,
    1107             :         struct tevent_context *ev,
    1108             :         struct dcerpc_binding_handle *h,
    1109             :         struct samr_LookupDomain *r)
    1110             : {
    1111           0 :         struct tevent_req *req;
    1112           0 :         struct dcerpc_samr_LookupDomain_r_state *state;
    1113           0 :         struct tevent_req *subreq;
    1114             : 
    1115          10 :         req = tevent_req_create(mem_ctx, &state,
    1116             :                                 struct dcerpc_samr_LookupDomain_r_state);
    1117          10 :         if (req == NULL) {
    1118           0 :                 return NULL;
    1119             :         }
    1120             : 
    1121          10 :         state->out_mem_ctx = talloc_new(state);
    1122          10 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1123           0 :                 return tevent_req_post(req, ev);
    1124             :         }
    1125             : 
    1126          10 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1127             :                         NULL, &ndr_table_samr,
    1128          10 :                         NDR_SAMR_LOOKUPDOMAIN, state->out_mem_ctx, r);
    1129          10 :         if (tevent_req_nomem(subreq, req)) {
    1130           0 :                 return tevent_req_post(req, ev);
    1131             :         }
    1132          10 :         tevent_req_set_callback(subreq, dcerpc_samr_LookupDomain_r_done, req);
    1133             : 
    1134          10 :         return req;
    1135             : }
    1136             : 
    1137          10 : static void dcerpc_samr_LookupDomain_r_done(struct tevent_req *subreq)
    1138             : {
    1139           0 :         struct tevent_req *req =
    1140          10 :                 tevent_req_callback_data(subreq,
    1141             :                 struct tevent_req);
    1142           0 :         NTSTATUS status;
    1143             : 
    1144          10 :         status = dcerpc_binding_handle_call_recv(subreq);
    1145          10 :         TALLOC_FREE(subreq);
    1146          10 :         if (tevent_req_nterror(req, status)) {
    1147           0 :                 return;
    1148             :         }
    1149             : 
    1150          10 :         tevent_req_done(req);
    1151             : }
    1152             : 
    1153          10 : NTSTATUS dcerpc_samr_LookupDomain_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1154             : {
    1155           0 :         struct dcerpc_samr_LookupDomain_r_state *state =
    1156          10 :                 tevent_req_data(req,
    1157             :                 struct dcerpc_samr_LookupDomain_r_state);
    1158           0 :         NTSTATUS status;
    1159             : 
    1160          10 :         if (tevent_req_is_nterror(req, &status)) {
    1161           0 :                 tevent_req_received(req);
    1162           0 :                 return status;
    1163             :         }
    1164             : 
    1165          10 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1166             : 
    1167          10 :         tevent_req_received(req);
    1168          10 :         return NT_STATUS_OK;
    1169             : }
    1170             : 
    1171         860 : NTSTATUS dcerpc_samr_LookupDomain_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_LookupDomain *r)
    1172             : {
    1173           0 :         NTSTATUS status;
    1174             : 
    1175         860 :         status = dcerpc_binding_handle_call(h,
    1176             :                         NULL, &ndr_table_samr,
    1177             :                         NDR_SAMR_LOOKUPDOMAIN, mem_ctx, r);
    1178             : 
    1179         860 :         return status;
    1180             : }
    1181             : 
    1182             : struct dcerpc_samr_LookupDomain_state {
    1183             :         struct samr_LookupDomain orig;
    1184             :         struct samr_LookupDomain tmp;
    1185             :         TALLOC_CTX *out_mem_ctx;
    1186             : };
    1187             : 
    1188             : static void dcerpc_samr_LookupDomain_done(struct tevent_req *subreq);
    1189             : 
    1190           0 : struct tevent_req *dcerpc_samr_LookupDomain_send(TALLOC_CTX *mem_ctx,
    1191             :                                                  struct tevent_context *ev,
    1192             :                                                  struct dcerpc_binding_handle *h,
    1193             :                                                  struct policy_handle *_connect_handle /* [in] [ref] */,
    1194             :                                                  struct lsa_String *_domain_name /* [in] [ref] */,
    1195             :                                                  struct dom_sid2 **_sid /* [out] [ref] */)
    1196             : {
    1197           0 :         struct tevent_req *req;
    1198           0 :         struct dcerpc_samr_LookupDomain_state *state;
    1199           0 :         struct tevent_req *subreq;
    1200             : 
    1201           0 :         req = tevent_req_create(mem_ctx, &state,
    1202             :                                 struct dcerpc_samr_LookupDomain_state);
    1203           0 :         if (req == NULL) {
    1204           0 :                 return NULL;
    1205             :         }
    1206           0 :         state->out_mem_ctx = NULL;
    1207             : 
    1208             :         /* In parameters */
    1209           0 :         state->orig.in.connect_handle = _connect_handle;
    1210           0 :         state->orig.in.domain_name = _domain_name;
    1211             : 
    1212             :         /* Out parameters */
    1213           0 :         state->orig.out.sid = _sid;
    1214             : 
    1215             :         /* Result */
    1216           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1217             : 
    1218           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1219             :                              "dcerpc_samr_LookupDomain_out_memory");
    1220           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1221           0 :                 return tevent_req_post(req, ev);
    1222             :         }
    1223             : 
    1224             :         /* make a temporary copy, that we pass to the dispatch function */
    1225           0 :         state->tmp = state->orig;
    1226             : 
    1227           0 :         subreq = dcerpc_samr_LookupDomain_r_send(state, ev, h, &state->tmp);
    1228           0 :         if (tevent_req_nomem(subreq, req)) {
    1229           0 :                 return tevent_req_post(req, ev);
    1230             :         }
    1231           0 :         tevent_req_set_callback(subreq, dcerpc_samr_LookupDomain_done, req);
    1232           0 :         return req;
    1233             : }
    1234             : 
    1235           0 : static void dcerpc_samr_LookupDomain_done(struct tevent_req *subreq)
    1236             : {
    1237           0 :         struct tevent_req *req = tevent_req_callback_data(
    1238             :                 subreq, struct tevent_req);
    1239           0 :         struct dcerpc_samr_LookupDomain_state *state = tevent_req_data(
    1240             :                 req, struct dcerpc_samr_LookupDomain_state);
    1241           0 :         NTSTATUS status;
    1242           0 :         TALLOC_CTX *mem_ctx;
    1243             : 
    1244           0 :         if (state->out_mem_ctx) {
    1245           0 :                 mem_ctx = state->out_mem_ctx;
    1246             :         } else {
    1247           0 :                 mem_ctx = state;
    1248             :         }
    1249             : 
    1250           0 :         status = dcerpc_samr_LookupDomain_r_recv(subreq, mem_ctx);
    1251           0 :         TALLOC_FREE(subreq);
    1252           0 :         if (tevent_req_nterror(req, status)) {
    1253           0 :                 return;
    1254             :         }
    1255             : 
    1256             :         /* Copy out parameters */
    1257           0 :         *state->orig.out.sid = *state->tmp.out.sid;
    1258             : 
    1259             :         /* Copy result */
    1260           0 :         state->orig.out.result = state->tmp.out.result;
    1261             : 
    1262             :         /* Reset temporary structure */
    1263           0 :         NDR_ZERO_STRUCT(state->tmp);
    1264             : 
    1265           0 :         tevent_req_done(req);
    1266             : }
    1267             : 
    1268           0 : NTSTATUS dcerpc_samr_LookupDomain_recv(struct tevent_req *req,
    1269             :                                        TALLOC_CTX *mem_ctx,
    1270             :                                        NTSTATUS *result)
    1271             : {
    1272           0 :         struct dcerpc_samr_LookupDomain_state *state = tevent_req_data(
    1273             :                 req, struct dcerpc_samr_LookupDomain_state);
    1274           0 :         NTSTATUS status;
    1275             : 
    1276           0 :         if (tevent_req_is_nterror(req, &status)) {
    1277           0 :                 tevent_req_received(req);
    1278           0 :                 return status;
    1279             :         }
    1280             : 
    1281             :         /* Steal possible out parameters to the callers context */
    1282           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1283             : 
    1284             :         /* Return result */
    1285           0 :         *result = state->orig.out.result;
    1286             : 
    1287           0 :         tevent_req_received(req);
    1288           0 :         return NT_STATUS_OK;
    1289             : }
    1290             : 
    1291         168 : NTSTATUS dcerpc_samr_LookupDomain(struct dcerpc_binding_handle *h,
    1292             :                                   TALLOC_CTX *mem_ctx,
    1293             :                                   struct policy_handle *_connect_handle /* [in] [ref] */,
    1294             :                                   struct lsa_String *_domain_name /* [in] [ref] */,
    1295             :                                   struct dom_sid2 **_sid /* [out] [ref] */,
    1296             :                                   NTSTATUS *result)
    1297             : {
    1298           0 :         struct samr_LookupDomain r;
    1299           0 :         NTSTATUS status;
    1300             : 
    1301             :         /* In parameters */
    1302         168 :         r.in.connect_handle = _connect_handle;
    1303         168 :         r.in.domain_name = _domain_name;
    1304             : 
    1305             :         /* Out parameters */
    1306         168 :         r.out.sid = _sid;
    1307             : 
    1308             :         /* Result */
    1309         168 :         NDR_ZERO_STRUCT(r.out.result);
    1310             : 
    1311         168 :         status = dcerpc_samr_LookupDomain_r(h, mem_ctx, &r);
    1312         168 :         if (!NT_STATUS_IS_OK(status)) {
    1313           0 :                 return status;
    1314             :         }
    1315             : 
    1316             :         /* Return variables */
    1317         168 :         *_sid = *r.out.sid;
    1318             : 
    1319             :         /* Return result */
    1320         168 :         *result = r.out.result;
    1321             : 
    1322         168 :         return NT_STATUS_OK;
    1323             : }
    1324             : 
    1325             : struct dcerpc_samr_EnumDomains_r_state {
    1326             :         TALLOC_CTX *out_mem_ctx;
    1327             : };
    1328             : 
    1329             : static void dcerpc_samr_EnumDomains_r_done(struct tevent_req *subreq);
    1330             : 
    1331           2 : struct tevent_req *dcerpc_samr_EnumDomains_r_send(TALLOC_CTX *mem_ctx,
    1332             :         struct tevent_context *ev,
    1333             :         struct dcerpc_binding_handle *h,
    1334             :         struct samr_EnumDomains *r)
    1335             : {
    1336           0 :         struct tevent_req *req;
    1337           0 :         struct dcerpc_samr_EnumDomains_r_state *state;
    1338           0 :         struct tevent_req *subreq;
    1339             : 
    1340           2 :         req = tevent_req_create(mem_ctx, &state,
    1341             :                                 struct dcerpc_samr_EnumDomains_r_state);
    1342           2 :         if (req == NULL) {
    1343           0 :                 return NULL;
    1344             :         }
    1345             : 
    1346           2 :         state->out_mem_ctx = talloc_new(state);
    1347           2 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1348           0 :                 return tevent_req_post(req, ev);
    1349             :         }
    1350             : 
    1351           2 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1352             :                         NULL, &ndr_table_samr,
    1353           2 :                         NDR_SAMR_ENUMDOMAINS, state->out_mem_ctx, r);
    1354           2 :         if (tevent_req_nomem(subreq, req)) {
    1355           0 :                 return tevent_req_post(req, ev);
    1356             :         }
    1357           2 :         tevent_req_set_callback(subreq, dcerpc_samr_EnumDomains_r_done, req);
    1358             : 
    1359           2 :         return req;
    1360             : }
    1361             : 
    1362           2 : static void dcerpc_samr_EnumDomains_r_done(struct tevent_req *subreq)
    1363             : {
    1364           0 :         struct tevent_req *req =
    1365           2 :                 tevent_req_callback_data(subreq,
    1366             :                 struct tevent_req);
    1367           0 :         NTSTATUS status;
    1368             : 
    1369           2 :         status = dcerpc_binding_handle_call_recv(subreq);
    1370           2 :         TALLOC_FREE(subreq);
    1371           2 :         if (tevent_req_nterror(req, status)) {
    1372           0 :                 return;
    1373             :         }
    1374             : 
    1375           2 :         tevent_req_done(req);
    1376             : }
    1377             : 
    1378           2 : NTSTATUS dcerpc_samr_EnumDomains_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1379             : {
    1380           0 :         struct dcerpc_samr_EnumDomains_r_state *state =
    1381           2 :                 tevent_req_data(req,
    1382             :                 struct dcerpc_samr_EnumDomains_r_state);
    1383           0 :         NTSTATUS status;
    1384             : 
    1385           2 :         if (tevent_req_is_nterror(req, &status)) {
    1386           0 :                 tevent_req_received(req);
    1387           0 :                 return status;
    1388             :         }
    1389             : 
    1390           2 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1391             : 
    1392           2 :         tevent_req_received(req);
    1393           2 :         return NT_STATUS_OK;
    1394             : }
    1395             : 
    1396         224 : NTSTATUS dcerpc_samr_EnumDomains_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_EnumDomains *r)
    1397             : {
    1398           0 :         NTSTATUS status;
    1399             : 
    1400         224 :         status = dcerpc_binding_handle_call(h,
    1401             :                         NULL, &ndr_table_samr,
    1402             :                         NDR_SAMR_ENUMDOMAINS, mem_ctx, r);
    1403             : 
    1404         224 :         return status;
    1405             : }
    1406             : 
    1407             : struct dcerpc_samr_EnumDomains_state {
    1408             :         struct samr_EnumDomains orig;
    1409             :         struct samr_EnumDomains tmp;
    1410             :         TALLOC_CTX *out_mem_ctx;
    1411             : };
    1412             : 
    1413             : static void dcerpc_samr_EnumDomains_done(struct tevent_req *subreq);
    1414             : 
    1415           0 : struct tevent_req *dcerpc_samr_EnumDomains_send(TALLOC_CTX *mem_ctx,
    1416             :                                                 struct tevent_context *ev,
    1417             :                                                 struct dcerpc_binding_handle *h,
    1418             :                                                 struct policy_handle *_connect_handle /* [in] [ref] */,
    1419             :                                                 uint32_t *_resume_handle /* [in,out] [ref] */,
    1420             :                                                 struct samr_SamArray **_sam /* [out] [ref] */,
    1421             :                                                 uint32_t _buf_size /* [in]  */,
    1422             :                                                 uint32_t *_num_entries /* [out] [ref] */)
    1423             : {
    1424           0 :         struct tevent_req *req;
    1425           0 :         struct dcerpc_samr_EnumDomains_state *state;
    1426           0 :         struct tevent_req *subreq;
    1427             : 
    1428           0 :         req = tevent_req_create(mem_ctx, &state,
    1429             :                                 struct dcerpc_samr_EnumDomains_state);
    1430           0 :         if (req == NULL) {
    1431           0 :                 return NULL;
    1432             :         }
    1433           0 :         state->out_mem_ctx = NULL;
    1434             : 
    1435             :         /* In parameters */
    1436           0 :         state->orig.in.connect_handle = _connect_handle;
    1437           0 :         state->orig.in.resume_handle = _resume_handle;
    1438           0 :         state->orig.in.buf_size = _buf_size;
    1439             : 
    1440             :         /* Out parameters */
    1441           0 :         state->orig.out.resume_handle = _resume_handle;
    1442           0 :         state->orig.out.sam = _sam;
    1443           0 :         state->orig.out.num_entries = _num_entries;
    1444             : 
    1445             :         /* Result */
    1446           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1447             : 
    1448           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1449             :                              "dcerpc_samr_EnumDomains_out_memory");
    1450           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1451           0 :                 return tevent_req_post(req, ev);
    1452             :         }
    1453             : 
    1454             :         /* make a temporary copy, that we pass to the dispatch function */
    1455           0 :         state->tmp = state->orig;
    1456             : 
    1457           0 :         subreq = dcerpc_samr_EnumDomains_r_send(state, ev, h, &state->tmp);
    1458           0 :         if (tevent_req_nomem(subreq, req)) {
    1459           0 :                 return tevent_req_post(req, ev);
    1460             :         }
    1461           0 :         tevent_req_set_callback(subreq, dcerpc_samr_EnumDomains_done, req);
    1462           0 :         return req;
    1463             : }
    1464             : 
    1465           0 : static void dcerpc_samr_EnumDomains_done(struct tevent_req *subreq)
    1466             : {
    1467           0 :         struct tevent_req *req = tevent_req_callback_data(
    1468             :                 subreq, struct tevent_req);
    1469           0 :         struct dcerpc_samr_EnumDomains_state *state = tevent_req_data(
    1470             :                 req, struct dcerpc_samr_EnumDomains_state);
    1471           0 :         NTSTATUS status;
    1472           0 :         TALLOC_CTX *mem_ctx;
    1473             : 
    1474           0 :         if (state->out_mem_ctx) {
    1475           0 :                 mem_ctx = state->out_mem_ctx;
    1476             :         } else {
    1477           0 :                 mem_ctx = state;
    1478             :         }
    1479             : 
    1480           0 :         status = dcerpc_samr_EnumDomains_r_recv(subreq, mem_ctx);
    1481           0 :         TALLOC_FREE(subreq);
    1482           0 :         if (tevent_req_nterror(req, status)) {
    1483           0 :                 return;
    1484             :         }
    1485             : 
    1486             :         /* Copy out parameters */
    1487           0 :         *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
    1488           0 :         *state->orig.out.sam = *state->tmp.out.sam;
    1489           0 :         *state->orig.out.num_entries = *state->tmp.out.num_entries;
    1490             : 
    1491             :         /* Copy result */
    1492           0 :         state->orig.out.result = state->tmp.out.result;
    1493             : 
    1494             :         /* Reset temporary structure */
    1495           0 :         NDR_ZERO_STRUCT(state->tmp);
    1496             : 
    1497           0 :         tevent_req_done(req);
    1498             : }
    1499             : 
    1500           0 : NTSTATUS dcerpc_samr_EnumDomains_recv(struct tevent_req *req,
    1501             :                                       TALLOC_CTX *mem_ctx,
    1502             :                                       NTSTATUS *result)
    1503             : {
    1504           0 :         struct dcerpc_samr_EnumDomains_state *state = tevent_req_data(
    1505             :                 req, struct dcerpc_samr_EnumDomains_state);
    1506           0 :         NTSTATUS status;
    1507             : 
    1508           0 :         if (tevent_req_is_nterror(req, &status)) {
    1509           0 :                 tevent_req_received(req);
    1510           0 :                 return status;
    1511             :         }
    1512             : 
    1513             :         /* Steal possible out parameters to the callers context */
    1514           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1515             : 
    1516             :         /* Return result */
    1517           0 :         *result = state->orig.out.result;
    1518             : 
    1519           0 :         tevent_req_received(req);
    1520           0 :         return NT_STATUS_OK;
    1521             : }
    1522             : 
    1523          90 : NTSTATUS dcerpc_samr_EnumDomains(struct dcerpc_binding_handle *h,
    1524             :                                  TALLOC_CTX *mem_ctx,
    1525             :                                  struct policy_handle *_connect_handle /* [in] [ref] */,
    1526             :                                  uint32_t *_resume_handle /* [in,out] [ref] */,
    1527             :                                  struct samr_SamArray **_sam /* [out] [ref] */,
    1528             :                                  uint32_t _buf_size /* [in]  */,
    1529             :                                  uint32_t *_num_entries /* [out] [ref] */,
    1530             :                                  NTSTATUS *result)
    1531             : {
    1532           0 :         struct samr_EnumDomains r;
    1533           0 :         NTSTATUS status;
    1534             : 
    1535             :         /* In parameters */
    1536          90 :         r.in.connect_handle = _connect_handle;
    1537          90 :         r.in.resume_handle = _resume_handle;
    1538          90 :         r.in.buf_size = _buf_size;
    1539             : 
    1540             :         /* Out parameters */
    1541          90 :         r.out.resume_handle = _resume_handle;
    1542          90 :         r.out.sam = _sam;
    1543          90 :         r.out.num_entries = _num_entries;
    1544             : 
    1545             :         /* Result */
    1546          90 :         NDR_ZERO_STRUCT(r.out.result);
    1547             : 
    1548          90 :         status = dcerpc_samr_EnumDomains_r(h, mem_ctx, &r);
    1549          90 :         if (!NT_STATUS_IS_OK(status)) {
    1550           0 :                 return status;
    1551             :         }
    1552             : 
    1553             :         /* Return variables */
    1554          90 :         *_resume_handle = *r.out.resume_handle;
    1555          90 :         *_sam = *r.out.sam;
    1556          90 :         *_num_entries = *r.out.num_entries;
    1557             : 
    1558             :         /* Return result */
    1559          90 :         *result = r.out.result;
    1560             : 
    1561          90 :         return NT_STATUS_OK;
    1562             : }
    1563             : 
    1564             : struct dcerpc_samr_OpenDomain_r_state {
    1565             :         TALLOC_CTX *out_mem_ctx;
    1566             : };
    1567             : 
    1568             : static void dcerpc_samr_OpenDomain_r_done(struct tevent_req *subreq);
    1569             : 
    1570          10 : struct tevent_req *dcerpc_samr_OpenDomain_r_send(TALLOC_CTX *mem_ctx,
    1571             :         struct tevent_context *ev,
    1572             :         struct dcerpc_binding_handle *h,
    1573             :         struct samr_OpenDomain *r)
    1574             : {
    1575           0 :         struct tevent_req *req;
    1576           0 :         struct dcerpc_samr_OpenDomain_r_state *state;
    1577           0 :         struct tevent_req *subreq;
    1578             : 
    1579          10 :         req = tevent_req_create(mem_ctx, &state,
    1580             :                                 struct dcerpc_samr_OpenDomain_r_state);
    1581          10 :         if (req == NULL) {
    1582           0 :                 return NULL;
    1583             :         }
    1584             : 
    1585          10 :         state->out_mem_ctx = talloc_new(state);
    1586          10 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1587           0 :                 return tevent_req_post(req, ev);
    1588             :         }
    1589             : 
    1590          10 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1591             :                         NULL, &ndr_table_samr,
    1592          10 :                         NDR_SAMR_OPENDOMAIN, state->out_mem_ctx, r);
    1593          10 :         if (tevent_req_nomem(subreq, req)) {
    1594           0 :                 return tevent_req_post(req, ev);
    1595             :         }
    1596          10 :         tevent_req_set_callback(subreq, dcerpc_samr_OpenDomain_r_done, req);
    1597             : 
    1598          10 :         return req;
    1599             : }
    1600             : 
    1601          10 : static void dcerpc_samr_OpenDomain_r_done(struct tevent_req *subreq)
    1602             : {
    1603           0 :         struct tevent_req *req =
    1604          10 :                 tevent_req_callback_data(subreq,
    1605             :                 struct tevent_req);
    1606           0 :         NTSTATUS status;
    1607             : 
    1608          10 :         status = dcerpc_binding_handle_call_recv(subreq);
    1609          10 :         TALLOC_FREE(subreq);
    1610          10 :         if (tevent_req_nterror(req, status)) {
    1611           0 :                 return;
    1612             :         }
    1613             : 
    1614          10 :         tevent_req_done(req);
    1615             : }
    1616             : 
    1617          10 : NTSTATUS dcerpc_samr_OpenDomain_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1618             : {
    1619           0 :         struct dcerpc_samr_OpenDomain_r_state *state =
    1620          10 :                 tevent_req_data(req,
    1621             :                 struct dcerpc_samr_OpenDomain_r_state);
    1622           0 :         NTSTATUS status;
    1623             : 
    1624          10 :         if (tevent_req_is_nterror(req, &status)) {
    1625           0 :                 tevent_req_received(req);
    1626           0 :                 return status;
    1627             :         }
    1628             : 
    1629          10 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1630             : 
    1631          10 :         tevent_req_received(req);
    1632          10 :         return NT_STATUS_OK;
    1633             : }
    1634             : 
    1635        2434 : NTSTATUS dcerpc_samr_OpenDomain_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_OpenDomain *r)
    1636             : {
    1637         168 :         NTSTATUS status;
    1638             : 
    1639        2434 :         status = dcerpc_binding_handle_call(h,
    1640             :                         NULL, &ndr_table_samr,
    1641             :                         NDR_SAMR_OPENDOMAIN, mem_ctx, r);
    1642             : 
    1643        2434 :         return status;
    1644             : }
    1645             : 
    1646             : struct dcerpc_samr_OpenDomain_state {
    1647             :         struct samr_OpenDomain orig;
    1648             :         struct samr_OpenDomain tmp;
    1649             :         TALLOC_CTX *out_mem_ctx;
    1650             : };
    1651             : 
    1652             : static void dcerpc_samr_OpenDomain_done(struct tevent_req *subreq);
    1653             : 
    1654           0 : struct tevent_req *dcerpc_samr_OpenDomain_send(TALLOC_CTX *mem_ctx,
    1655             :                                                struct tevent_context *ev,
    1656             :                                                struct dcerpc_binding_handle *h,
    1657             :                                                struct policy_handle *_connect_handle /* [in] [ref] */,
    1658             :                                                uint32_t _access_mask /* [in]  */,
    1659             :                                                struct dom_sid2 *_sid /* [in] [ref] */,
    1660             :                                                struct policy_handle *_domain_handle /* [out] [ref] */)
    1661             : {
    1662           0 :         struct tevent_req *req;
    1663           0 :         struct dcerpc_samr_OpenDomain_state *state;
    1664           0 :         struct tevent_req *subreq;
    1665             : 
    1666           0 :         req = tevent_req_create(mem_ctx, &state,
    1667             :                                 struct dcerpc_samr_OpenDomain_state);
    1668           0 :         if (req == NULL) {
    1669           0 :                 return NULL;
    1670             :         }
    1671           0 :         state->out_mem_ctx = NULL;
    1672             : 
    1673             :         /* In parameters */
    1674           0 :         state->orig.in.connect_handle = _connect_handle;
    1675           0 :         state->orig.in.access_mask = _access_mask;
    1676           0 :         state->orig.in.sid = _sid;
    1677             : 
    1678             :         /* Out parameters */
    1679           0 :         state->orig.out.domain_handle = _domain_handle;
    1680             : 
    1681             :         /* Result */
    1682           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1683             : 
    1684           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1685             :                              "dcerpc_samr_OpenDomain_out_memory");
    1686           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1687           0 :                 return tevent_req_post(req, ev);
    1688             :         }
    1689             : 
    1690             :         /* make a temporary copy, that we pass to the dispatch function */
    1691           0 :         state->tmp = state->orig;
    1692             : 
    1693           0 :         subreq = dcerpc_samr_OpenDomain_r_send(state, ev, h, &state->tmp);
    1694           0 :         if (tevent_req_nomem(subreq, req)) {
    1695           0 :                 return tevent_req_post(req, ev);
    1696             :         }
    1697           0 :         tevent_req_set_callback(subreq, dcerpc_samr_OpenDomain_done, req);
    1698           0 :         return req;
    1699             : }
    1700             : 
    1701           0 : static void dcerpc_samr_OpenDomain_done(struct tevent_req *subreq)
    1702             : {
    1703           0 :         struct tevent_req *req = tevent_req_callback_data(
    1704             :                 subreq, struct tevent_req);
    1705           0 :         struct dcerpc_samr_OpenDomain_state *state = tevent_req_data(
    1706             :                 req, struct dcerpc_samr_OpenDomain_state);
    1707           0 :         NTSTATUS status;
    1708           0 :         TALLOC_CTX *mem_ctx;
    1709             : 
    1710           0 :         if (state->out_mem_ctx) {
    1711           0 :                 mem_ctx = state->out_mem_ctx;
    1712             :         } else {
    1713           0 :                 mem_ctx = state;
    1714             :         }
    1715             : 
    1716           0 :         status = dcerpc_samr_OpenDomain_r_recv(subreq, mem_ctx);
    1717           0 :         TALLOC_FREE(subreq);
    1718           0 :         if (tevent_req_nterror(req, status)) {
    1719           0 :                 return;
    1720             :         }
    1721             : 
    1722             :         /* Copy out parameters */
    1723           0 :         *state->orig.out.domain_handle = *state->tmp.out.domain_handle;
    1724             : 
    1725             :         /* Copy result */
    1726           0 :         state->orig.out.result = state->tmp.out.result;
    1727             : 
    1728             :         /* Reset temporary structure */
    1729           0 :         NDR_ZERO_STRUCT(state->tmp);
    1730             : 
    1731           0 :         tevent_req_done(req);
    1732             : }
    1733             : 
    1734           0 : NTSTATUS dcerpc_samr_OpenDomain_recv(struct tevent_req *req,
    1735             :                                      TALLOC_CTX *mem_ctx,
    1736             :                                      NTSTATUS *result)
    1737             : {
    1738           0 :         struct dcerpc_samr_OpenDomain_state *state = tevent_req_data(
    1739             :                 req, struct dcerpc_samr_OpenDomain_state);
    1740           0 :         NTSTATUS status;
    1741             : 
    1742           0 :         if (tevent_req_is_nterror(req, &status)) {
    1743           0 :                 tevent_req_received(req);
    1744           0 :                 return status;
    1745             :         }
    1746             : 
    1747             :         /* Steal possible out parameters to the callers context */
    1748           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1749             : 
    1750             :         /* Return result */
    1751           0 :         *result = state->orig.out.result;
    1752             : 
    1753           0 :         tevent_req_received(req);
    1754           0 :         return NT_STATUS_OK;
    1755             : }
    1756             : 
    1757         357 : NTSTATUS dcerpc_samr_OpenDomain(struct dcerpc_binding_handle *h,
    1758             :                                 TALLOC_CTX *mem_ctx,
    1759             :                                 struct policy_handle *_connect_handle /* [in] [ref] */,
    1760             :                                 uint32_t _access_mask /* [in]  */,
    1761             :                                 struct dom_sid2 *_sid /* [in] [ref] */,
    1762             :                                 struct policy_handle *_domain_handle /* [out] [ref] */,
    1763             :                                 NTSTATUS *result)
    1764             : {
    1765           0 :         struct samr_OpenDomain r;
    1766           0 :         NTSTATUS status;
    1767             : 
    1768             :         /* In parameters */
    1769         357 :         r.in.connect_handle = _connect_handle;
    1770         357 :         r.in.access_mask = _access_mask;
    1771         357 :         r.in.sid = _sid;
    1772             : 
    1773             :         /* Out parameters */
    1774         357 :         r.out.domain_handle = _domain_handle;
    1775             : 
    1776             :         /* Result */
    1777         357 :         NDR_ZERO_STRUCT(r.out.result);
    1778             : 
    1779         357 :         status = dcerpc_samr_OpenDomain_r(h, mem_ctx, &r);
    1780         357 :         if (!NT_STATUS_IS_OK(status)) {
    1781           0 :                 return status;
    1782             :         }
    1783             : 
    1784             :         /* Return variables */
    1785         357 :         *_domain_handle = *r.out.domain_handle;
    1786             : 
    1787             :         /* Return result */
    1788         357 :         *result = r.out.result;
    1789             : 
    1790         357 :         return NT_STATUS_OK;
    1791             : }
    1792             : 
    1793             : struct dcerpc_samr_QueryDomainInfo_r_state {
    1794             :         TALLOC_CTX *out_mem_ctx;
    1795             : };
    1796             : 
    1797             : static void dcerpc_samr_QueryDomainInfo_r_done(struct tevent_req *subreq);
    1798             : 
    1799           0 : struct tevent_req *dcerpc_samr_QueryDomainInfo_r_send(TALLOC_CTX *mem_ctx,
    1800             :         struct tevent_context *ev,
    1801             :         struct dcerpc_binding_handle *h,
    1802             :         struct samr_QueryDomainInfo *r)
    1803             : {
    1804           0 :         struct tevent_req *req;
    1805           0 :         struct dcerpc_samr_QueryDomainInfo_r_state *state;
    1806           0 :         struct tevent_req *subreq;
    1807             : 
    1808           0 :         req = tevent_req_create(mem_ctx, &state,
    1809             :                                 struct dcerpc_samr_QueryDomainInfo_r_state);
    1810           0 :         if (req == NULL) {
    1811           0 :                 return NULL;
    1812             :         }
    1813             : 
    1814           0 :         state->out_mem_ctx = talloc_new(state);
    1815           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1816           0 :                 return tevent_req_post(req, ev);
    1817             :         }
    1818             : 
    1819           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1820             :                         NULL, &ndr_table_samr,
    1821           0 :                         NDR_SAMR_QUERYDOMAININFO, state->out_mem_ctx, r);
    1822           0 :         if (tevent_req_nomem(subreq, req)) {
    1823           0 :                 return tevent_req_post(req, ev);
    1824             :         }
    1825           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryDomainInfo_r_done, req);
    1826             : 
    1827           0 :         return req;
    1828             : }
    1829             : 
    1830           0 : static void dcerpc_samr_QueryDomainInfo_r_done(struct tevent_req *subreq)
    1831             : {
    1832           0 :         struct tevent_req *req =
    1833           0 :                 tevent_req_callback_data(subreq,
    1834             :                 struct tevent_req);
    1835           0 :         NTSTATUS status;
    1836             : 
    1837           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1838           0 :         TALLOC_FREE(subreq);
    1839           0 :         if (tevent_req_nterror(req, status)) {
    1840           0 :                 return;
    1841             :         }
    1842             : 
    1843           0 :         tevent_req_done(req);
    1844             : }
    1845             : 
    1846           0 : NTSTATUS dcerpc_samr_QueryDomainInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1847             : {
    1848           0 :         struct dcerpc_samr_QueryDomainInfo_r_state *state =
    1849           0 :                 tevent_req_data(req,
    1850             :                 struct dcerpc_samr_QueryDomainInfo_r_state);
    1851           0 :         NTSTATUS status;
    1852             : 
    1853           0 :         if (tevent_req_is_nterror(req, &status)) {
    1854           0 :                 tevent_req_received(req);
    1855           0 :                 return status;
    1856             :         }
    1857             : 
    1858           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1859             : 
    1860           0 :         tevent_req_received(req);
    1861           0 :         return NT_STATUS_OK;
    1862             : }
    1863             : 
    1864         359 : NTSTATUS dcerpc_samr_QueryDomainInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_QueryDomainInfo *r)
    1865             : {
    1866           0 :         NTSTATUS status;
    1867             : 
    1868         359 :         status = dcerpc_binding_handle_call(h,
    1869             :                         NULL, &ndr_table_samr,
    1870             :                         NDR_SAMR_QUERYDOMAININFO, mem_ctx, r);
    1871             : 
    1872         359 :         return status;
    1873             : }
    1874             : 
    1875             : struct dcerpc_samr_QueryDomainInfo_state {
    1876             :         struct samr_QueryDomainInfo orig;
    1877             :         struct samr_QueryDomainInfo tmp;
    1878             :         TALLOC_CTX *out_mem_ctx;
    1879             : };
    1880             : 
    1881             : static void dcerpc_samr_QueryDomainInfo_done(struct tevent_req *subreq);
    1882             : 
    1883           0 : struct tevent_req *dcerpc_samr_QueryDomainInfo_send(TALLOC_CTX *mem_ctx,
    1884             :                                                     struct tevent_context *ev,
    1885             :                                                     struct dcerpc_binding_handle *h,
    1886             :                                                     struct policy_handle *_domain_handle /* [in] [ref] */,
    1887             :                                                     enum samr_DomainInfoClass _level /* [in]  */,
    1888             :                                                     union samr_DomainInfo **_info /* [out] [ref,switch_is(level)] */)
    1889             : {
    1890           0 :         struct tevent_req *req;
    1891           0 :         struct dcerpc_samr_QueryDomainInfo_state *state;
    1892           0 :         struct tevent_req *subreq;
    1893             : 
    1894           0 :         req = tevent_req_create(mem_ctx, &state,
    1895             :                                 struct dcerpc_samr_QueryDomainInfo_state);
    1896           0 :         if (req == NULL) {
    1897           0 :                 return NULL;
    1898             :         }
    1899           0 :         state->out_mem_ctx = NULL;
    1900             : 
    1901             :         /* In parameters */
    1902           0 :         state->orig.in.domain_handle = _domain_handle;
    1903           0 :         state->orig.in.level = _level;
    1904             : 
    1905             :         /* Out parameters */
    1906           0 :         state->orig.out.info = _info;
    1907             : 
    1908             :         /* Result */
    1909           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1910             : 
    1911           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1912             :                              "dcerpc_samr_QueryDomainInfo_out_memory");
    1913           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1914           0 :                 return tevent_req_post(req, ev);
    1915             :         }
    1916             : 
    1917             :         /* make a temporary copy, that we pass to the dispatch function */
    1918           0 :         state->tmp = state->orig;
    1919             : 
    1920           0 :         subreq = dcerpc_samr_QueryDomainInfo_r_send(state, ev, h, &state->tmp);
    1921           0 :         if (tevent_req_nomem(subreq, req)) {
    1922           0 :                 return tevent_req_post(req, ev);
    1923             :         }
    1924           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryDomainInfo_done, req);
    1925           0 :         return req;
    1926             : }
    1927             : 
    1928           0 : static void dcerpc_samr_QueryDomainInfo_done(struct tevent_req *subreq)
    1929             : {
    1930           0 :         struct tevent_req *req = tevent_req_callback_data(
    1931             :                 subreq, struct tevent_req);
    1932           0 :         struct dcerpc_samr_QueryDomainInfo_state *state = tevent_req_data(
    1933             :                 req, struct dcerpc_samr_QueryDomainInfo_state);
    1934           0 :         NTSTATUS status;
    1935           0 :         TALLOC_CTX *mem_ctx;
    1936             : 
    1937           0 :         if (state->out_mem_ctx) {
    1938           0 :                 mem_ctx = state->out_mem_ctx;
    1939             :         } else {
    1940           0 :                 mem_ctx = state;
    1941             :         }
    1942             : 
    1943           0 :         status = dcerpc_samr_QueryDomainInfo_r_recv(subreq, mem_ctx);
    1944           0 :         TALLOC_FREE(subreq);
    1945           0 :         if (tevent_req_nterror(req, status)) {
    1946           0 :                 return;
    1947             :         }
    1948             : 
    1949             :         /* Copy out parameters */
    1950           0 :         *state->orig.out.info = *state->tmp.out.info;
    1951             : 
    1952             :         /* Copy result */
    1953           0 :         state->orig.out.result = state->tmp.out.result;
    1954             : 
    1955             :         /* Reset temporary structure */
    1956           0 :         NDR_ZERO_STRUCT(state->tmp);
    1957             : 
    1958           0 :         tevent_req_done(req);
    1959             : }
    1960             : 
    1961           0 : NTSTATUS dcerpc_samr_QueryDomainInfo_recv(struct tevent_req *req,
    1962             :                                           TALLOC_CTX *mem_ctx,
    1963             :                                           NTSTATUS *result)
    1964             : {
    1965           0 :         struct dcerpc_samr_QueryDomainInfo_state *state = tevent_req_data(
    1966             :                 req, struct dcerpc_samr_QueryDomainInfo_state);
    1967           0 :         NTSTATUS status;
    1968             : 
    1969           0 :         if (tevent_req_is_nterror(req, &status)) {
    1970           0 :                 tevent_req_received(req);
    1971           0 :                 return status;
    1972             :         }
    1973             : 
    1974             :         /* Steal possible out parameters to the callers context */
    1975           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1976             : 
    1977             :         /* Return result */
    1978           0 :         *result = state->orig.out.result;
    1979             : 
    1980           0 :         tevent_req_received(req);
    1981           0 :         return NT_STATUS_OK;
    1982             : }
    1983             : 
    1984          15 : NTSTATUS dcerpc_samr_QueryDomainInfo(struct dcerpc_binding_handle *h,
    1985             :                                      TALLOC_CTX *mem_ctx,
    1986             :                                      struct policy_handle *_domain_handle /* [in] [ref] */,
    1987             :                                      enum samr_DomainInfoClass _level /* [in]  */,
    1988             :                                      union samr_DomainInfo **_info /* [out] [ref,switch_is(level)] */,
    1989             :                                      NTSTATUS *result)
    1990             : {
    1991           0 :         struct samr_QueryDomainInfo r;
    1992           0 :         NTSTATUS status;
    1993             : 
    1994             :         /* In parameters */
    1995          15 :         r.in.domain_handle = _domain_handle;
    1996          15 :         r.in.level = _level;
    1997             : 
    1998             :         /* Out parameters */
    1999          15 :         r.out.info = _info;
    2000             : 
    2001             :         /* Result */
    2002          15 :         NDR_ZERO_STRUCT(r.out.result);
    2003             : 
    2004          15 :         status = dcerpc_samr_QueryDomainInfo_r(h, mem_ctx, &r);
    2005          15 :         if (!NT_STATUS_IS_OK(status)) {
    2006           0 :                 return status;
    2007             :         }
    2008             : 
    2009             :         /* Return variables */
    2010          15 :         *_info = *r.out.info;
    2011             : 
    2012             :         /* Return result */
    2013          15 :         *result = r.out.result;
    2014             : 
    2015          15 :         return NT_STATUS_OK;
    2016             : }
    2017             : 
    2018             : struct dcerpc_samr_SetDomainInfo_r_state {
    2019             :         TALLOC_CTX *out_mem_ctx;
    2020             : };
    2021             : 
    2022             : static void dcerpc_samr_SetDomainInfo_r_done(struct tevent_req *subreq);
    2023             : 
    2024           0 : struct tevent_req *dcerpc_samr_SetDomainInfo_r_send(TALLOC_CTX *mem_ctx,
    2025             :         struct tevent_context *ev,
    2026             :         struct dcerpc_binding_handle *h,
    2027             :         struct samr_SetDomainInfo *r)
    2028             : {
    2029           0 :         struct tevent_req *req;
    2030           0 :         struct dcerpc_samr_SetDomainInfo_r_state *state;
    2031           0 :         struct tevent_req *subreq;
    2032             : 
    2033           0 :         req = tevent_req_create(mem_ctx, &state,
    2034             :                                 struct dcerpc_samr_SetDomainInfo_r_state);
    2035           0 :         if (req == NULL) {
    2036           0 :                 return NULL;
    2037             :         }
    2038             : 
    2039           0 :         state->out_mem_ctx = NULL;
    2040             : 
    2041           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2042             :                         NULL, &ndr_table_samr,
    2043             :                         NDR_SAMR_SETDOMAININFO, state, r);
    2044           0 :         if (tevent_req_nomem(subreq, req)) {
    2045           0 :                 return tevent_req_post(req, ev);
    2046             :         }
    2047           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetDomainInfo_r_done, req);
    2048             : 
    2049           0 :         return req;
    2050             : }
    2051             : 
    2052           0 : static void dcerpc_samr_SetDomainInfo_r_done(struct tevent_req *subreq)
    2053             : {
    2054           0 :         struct tevent_req *req =
    2055           0 :                 tevent_req_callback_data(subreq,
    2056             :                 struct tevent_req);
    2057           0 :         NTSTATUS status;
    2058             : 
    2059           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2060           0 :         TALLOC_FREE(subreq);
    2061           0 :         if (tevent_req_nterror(req, status)) {
    2062           0 :                 return;
    2063             :         }
    2064             : 
    2065           0 :         tevent_req_done(req);
    2066             : }
    2067             : 
    2068           0 : NTSTATUS dcerpc_samr_SetDomainInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2069             : {
    2070           0 :         struct dcerpc_samr_SetDomainInfo_r_state *state =
    2071           0 :                 tevent_req_data(req,
    2072             :                 struct dcerpc_samr_SetDomainInfo_r_state);
    2073           0 :         NTSTATUS status;
    2074             : 
    2075           0 :         if (tevent_req_is_nterror(req, &status)) {
    2076           0 :                 tevent_req_received(req);
    2077           0 :                 return status;
    2078             :         }
    2079             : 
    2080           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2081             : 
    2082           0 :         tevent_req_received(req);
    2083           0 :         return NT_STATUS_OK;
    2084             : }
    2085             : 
    2086         314 : NTSTATUS dcerpc_samr_SetDomainInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_SetDomainInfo *r)
    2087             : {
    2088           0 :         NTSTATUS status;
    2089             : 
    2090         314 :         status = dcerpc_binding_handle_call(h,
    2091             :                         NULL, &ndr_table_samr,
    2092             :                         NDR_SAMR_SETDOMAININFO, mem_ctx, r);
    2093             : 
    2094         314 :         return status;
    2095             : }
    2096             : 
    2097             : struct dcerpc_samr_SetDomainInfo_state {
    2098             :         struct samr_SetDomainInfo orig;
    2099             :         struct samr_SetDomainInfo tmp;
    2100             :         TALLOC_CTX *out_mem_ctx;
    2101             : };
    2102             : 
    2103             : static void dcerpc_samr_SetDomainInfo_done(struct tevent_req *subreq);
    2104             : 
    2105           0 : struct tevent_req *dcerpc_samr_SetDomainInfo_send(TALLOC_CTX *mem_ctx,
    2106             :                                                   struct tevent_context *ev,
    2107             :                                                   struct dcerpc_binding_handle *h,
    2108             :                                                   struct policy_handle *_domain_handle /* [in] [ref] */,
    2109             :                                                   enum samr_DomainInfoClass _level /* [in]  */,
    2110             :                                                   union samr_DomainInfo *_info /* [in] [ref,switch_is(level)] */)
    2111             : {
    2112           0 :         struct tevent_req *req;
    2113           0 :         struct dcerpc_samr_SetDomainInfo_state *state;
    2114           0 :         struct tevent_req *subreq;
    2115             : 
    2116           0 :         req = tevent_req_create(mem_ctx, &state,
    2117             :                                 struct dcerpc_samr_SetDomainInfo_state);
    2118           0 :         if (req == NULL) {
    2119           0 :                 return NULL;
    2120             :         }
    2121           0 :         state->out_mem_ctx = NULL;
    2122             : 
    2123             :         /* In parameters */
    2124           0 :         state->orig.in.domain_handle = _domain_handle;
    2125           0 :         state->orig.in.level = _level;
    2126           0 :         state->orig.in.info = _info;
    2127             : 
    2128             :         /* Out parameters */
    2129             : 
    2130             :         /* Result */
    2131           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2132             : 
    2133             :         /* make a temporary copy, that we pass to the dispatch function */
    2134           0 :         state->tmp = state->orig;
    2135             : 
    2136           0 :         subreq = dcerpc_samr_SetDomainInfo_r_send(state, ev, h, &state->tmp);
    2137           0 :         if (tevent_req_nomem(subreq, req)) {
    2138           0 :                 return tevent_req_post(req, ev);
    2139             :         }
    2140           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetDomainInfo_done, req);
    2141           0 :         return req;
    2142             : }
    2143             : 
    2144           0 : static void dcerpc_samr_SetDomainInfo_done(struct tevent_req *subreq)
    2145             : {
    2146           0 :         struct tevent_req *req = tevent_req_callback_data(
    2147             :                 subreq, struct tevent_req);
    2148           0 :         struct dcerpc_samr_SetDomainInfo_state *state = tevent_req_data(
    2149             :                 req, struct dcerpc_samr_SetDomainInfo_state);
    2150           0 :         NTSTATUS status;
    2151           0 :         TALLOC_CTX *mem_ctx;
    2152             : 
    2153           0 :         if (state->out_mem_ctx) {
    2154           0 :                 mem_ctx = state->out_mem_ctx;
    2155             :         } else {
    2156           0 :                 mem_ctx = state;
    2157             :         }
    2158             : 
    2159           0 :         status = dcerpc_samr_SetDomainInfo_r_recv(subreq, mem_ctx);
    2160           0 :         TALLOC_FREE(subreq);
    2161           0 :         if (tevent_req_nterror(req, status)) {
    2162           0 :                 return;
    2163             :         }
    2164             : 
    2165             :         /* Copy out parameters */
    2166             : 
    2167             :         /* Copy result */
    2168           0 :         state->orig.out.result = state->tmp.out.result;
    2169             : 
    2170             :         /* Reset temporary structure */
    2171           0 :         NDR_ZERO_STRUCT(state->tmp);
    2172             : 
    2173           0 :         tevent_req_done(req);
    2174             : }
    2175             : 
    2176           0 : NTSTATUS dcerpc_samr_SetDomainInfo_recv(struct tevent_req *req,
    2177             :                                         TALLOC_CTX *mem_ctx,
    2178             :                                         NTSTATUS *result)
    2179             : {
    2180           0 :         struct dcerpc_samr_SetDomainInfo_state *state = tevent_req_data(
    2181             :                 req, struct dcerpc_samr_SetDomainInfo_state);
    2182           0 :         NTSTATUS status;
    2183             : 
    2184           0 :         if (tevent_req_is_nterror(req, &status)) {
    2185           0 :                 tevent_req_received(req);
    2186           0 :                 return status;
    2187             :         }
    2188             : 
    2189             :         /* Steal possible out parameters to the callers context */
    2190           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2191             : 
    2192             :         /* Return result */
    2193           0 :         *result = state->orig.out.result;
    2194             : 
    2195           0 :         tevent_req_received(req);
    2196           0 :         return NT_STATUS_OK;
    2197             : }
    2198             : 
    2199           2 : NTSTATUS dcerpc_samr_SetDomainInfo(struct dcerpc_binding_handle *h,
    2200             :                                    TALLOC_CTX *mem_ctx,
    2201             :                                    struct policy_handle *_domain_handle /* [in] [ref] */,
    2202             :                                    enum samr_DomainInfoClass _level /* [in]  */,
    2203             :                                    union samr_DomainInfo *_info /* [in] [ref,switch_is(level)] */,
    2204             :                                    NTSTATUS *result)
    2205             : {
    2206           0 :         struct samr_SetDomainInfo r;
    2207           0 :         NTSTATUS status;
    2208             : 
    2209             :         /* In parameters */
    2210           2 :         r.in.domain_handle = _domain_handle;
    2211           2 :         r.in.level = _level;
    2212           2 :         r.in.info = _info;
    2213             : 
    2214             :         /* Out parameters */
    2215             : 
    2216             :         /* Result */
    2217           2 :         NDR_ZERO_STRUCT(r.out.result);
    2218             : 
    2219           2 :         status = dcerpc_samr_SetDomainInfo_r(h, mem_ctx, &r);
    2220           2 :         if (!NT_STATUS_IS_OK(status)) {
    2221           0 :                 return status;
    2222             :         }
    2223             : 
    2224             :         /* Return variables */
    2225             : 
    2226             :         /* Return result */
    2227           2 :         *result = r.out.result;
    2228             : 
    2229           2 :         return NT_STATUS_OK;
    2230             : }
    2231             : 
    2232             : struct dcerpc_samr_CreateDomainGroup_r_state {
    2233             :         TALLOC_CTX *out_mem_ctx;
    2234             : };
    2235             : 
    2236             : static void dcerpc_samr_CreateDomainGroup_r_done(struct tevent_req *subreq);
    2237             : 
    2238           2 : struct tevent_req *dcerpc_samr_CreateDomainGroup_r_send(TALLOC_CTX *mem_ctx,
    2239             :         struct tevent_context *ev,
    2240             :         struct dcerpc_binding_handle *h,
    2241             :         struct samr_CreateDomainGroup *r)
    2242             : {
    2243           0 :         struct tevent_req *req;
    2244           0 :         struct dcerpc_samr_CreateDomainGroup_r_state *state;
    2245           0 :         struct tevent_req *subreq;
    2246             : 
    2247           2 :         req = tevent_req_create(mem_ctx, &state,
    2248             :                                 struct dcerpc_samr_CreateDomainGroup_r_state);
    2249           2 :         if (req == NULL) {
    2250           0 :                 return NULL;
    2251             :         }
    2252             : 
    2253           2 :         state->out_mem_ctx = talloc_new(state);
    2254           2 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2255           0 :                 return tevent_req_post(req, ev);
    2256             :         }
    2257             : 
    2258           2 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2259             :                         NULL, &ndr_table_samr,
    2260           2 :                         NDR_SAMR_CREATEDOMAINGROUP, state->out_mem_ctx, r);
    2261           2 :         if (tevent_req_nomem(subreq, req)) {
    2262           0 :                 return tevent_req_post(req, ev);
    2263             :         }
    2264           2 :         tevent_req_set_callback(subreq, dcerpc_samr_CreateDomainGroup_r_done, req);
    2265             : 
    2266           2 :         return req;
    2267             : }
    2268             : 
    2269           2 : static void dcerpc_samr_CreateDomainGroup_r_done(struct tevent_req *subreq)
    2270             : {
    2271           0 :         struct tevent_req *req =
    2272           2 :                 tevent_req_callback_data(subreq,
    2273             :                 struct tevent_req);
    2274           0 :         NTSTATUS status;
    2275             : 
    2276           2 :         status = dcerpc_binding_handle_call_recv(subreq);
    2277           2 :         TALLOC_FREE(subreq);
    2278           2 :         if (tevent_req_nterror(req, status)) {
    2279           0 :                 return;
    2280             :         }
    2281             : 
    2282           2 :         tevent_req_done(req);
    2283             : }
    2284             : 
    2285           2 : NTSTATUS dcerpc_samr_CreateDomainGroup_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2286             : {
    2287           0 :         struct dcerpc_samr_CreateDomainGroup_r_state *state =
    2288           2 :                 tevent_req_data(req,
    2289             :                 struct dcerpc_samr_CreateDomainGroup_r_state);
    2290           0 :         NTSTATUS status;
    2291             : 
    2292           2 :         if (tevent_req_is_nterror(req, &status)) {
    2293           0 :                 tevent_req_received(req);
    2294           0 :                 return status;
    2295             :         }
    2296             : 
    2297           2 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2298             : 
    2299           2 :         tevent_req_received(req);
    2300           2 :         return NT_STATUS_OK;
    2301             : }
    2302             : 
    2303        1584 : NTSTATUS dcerpc_samr_CreateDomainGroup_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_CreateDomainGroup *r)
    2304             : {
    2305           0 :         NTSTATUS status;
    2306             : 
    2307        1584 :         status = dcerpc_binding_handle_call(h,
    2308             :                         NULL, &ndr_table_samr,
    2309             :                         NDR_SAMR_CREATEDOMAINGROUP, mem_ctx, r);
    2310             : 
    2311        1584 :         return status;
    2312             : }
    2313             : 
    2314             : struct dcerpc_samr_CreateDomainGroup_state {
    2315             :         struct samr_CreateDomainGroup orig;
    2316             :         struct samr_CreateDomainGroup tmp;
    2317             :         TALLOC_CTX *out_mem_ctx;
    2318             : };
    2319             : 
    2320             : static void dcerpc_samr_CreateDomainGroup_done(struct tevent_req *subreq);
    2321             : 
    2322           0 : struct tevent_req *dcerpc_samr_CreateDomainGroup_send(TALLOC_CTX *mem_ctx,
    2323             :                                                       struct tevent_context *ev,
    2324             :                                                       struct dcerpc_binding_handle *h,
    2325             :                                                       struct policy_handle *_domain_handle /* [in] [ref] */,
    2326             :                                                       struct lsa_String *_name /* [in] [ref] */,
    2327             :                                                       uint32_t _access_mask /* [in]  */,
    2328             :                                                       struct policy_handle *_group_handle /* [out] [ref] */,
    2329             :                                                       uint32_t *_rid /* [out] [ref] */)
    2330             : {
    2331           0 :         struct tevent_req *req;
    2332           0 :         struct dcerpc_samr_CreateDomainGroup_state *state;
    2333           0 :         struct tevent_req *subreq;
    2334             : 
    2335           0 :         req = tevent_req_create(mem_ctx, &state,
    2336             :                                 struct dcerpc_samr_CreateDomainGroup_state);
    2337           0 :         if (req == NULL) {
    2338           0 :                 return NULL;
    2339             :         }
    2340           0 :         state->out_mem_ctx = NULL;
    2341             : 
    2342             :         /* In parameters */
    2343           0 :         state->orig.in.domain_handle = _domain_handle;
    2344           0 :         state->orig.in.name = _name;
    2345           0 :         state->orig.in.access_mask = _access_mask;
    2346             : 
    2347             :         /* Out parameters */
    2348           0 :         state->orig.out.group_handle = _group_handle;
    2349           0 :         state->orig.out.rid = _rid;
    2350             : 
    2351             :         /* Result */
    2352           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2353             : 
    2354           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2355             :                              "dcerpc_samr_CreateDomainGroup_out_memory");
    2356           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2357           0 :                 return tevent_req_post(req, ev);
    2358             :         }
    2359             : 
    2360             :         /* make a temporary copy, that we pass to the dispatch function */
    2361           0 :         state->tmp = state->orig;
    2362             : 
    2363           0 :         subreq = dcerpc_samr_CreateDomainGroup_r_send(state, ev, h, &state->tmp);
    2364           0 :         if (tevent_req_nomem(subreq, req)) {
    2365           0 :                 return tevent_req_post(req, ev);
    2366             :         }
    2367           0 :         tevent_req_set_callback(subreq, dcerpc_samr_CreateDomainGroup_done, req);
    2368           0 :         return req;
    2369             : }
    2370             : 
    2371           0 : static void dcerpc_samr_CreateDomainGroup_done(struct tevent_req *subreq)
    2372             : {
    2373           0 :         struct tevent_req *req = tevent_req_callback_data(
    2374             :                 subreq, struct tevent_req);
    2375           0 :         struct dcerpc_samr_CreateDomainGroup_state *state = tevent_req_data(
    2376             :                 req, struct dcerpc_samr_CreateDomainGroup_state);
    2377           0 :         NTSTATUS status;
    2378           0 :         TALLOC_CTX *mem_ctx;
    2379             : 
    2380           0 :         if (state->out_mem_ctx) {
    2381           0 :                 mem_ctx = state->out_mem_ctx;
    2382             :         } else {
    2383           0 :                 mem_ctx = state;
    2384             :         }
    2385             : 
    2386           0 :         status = dcerpc_samr_CreateDomainGroup_r_recv(subreq, mem_ctx);
    2387           0 :         TALLOC_FREE(subreq);
    2388           0 :         if (tevent_req_nterror(req, status)) {
    2389           0 :                 return;
    2390             :         }
    2391             : 
    2392             :         /* Copy out parameters */
    2393           0 :         *state->orig.out.group_handle = *state->tmp.out.group_handle;
    2394           0 :         *state->orig.out.rid = *state->tmp.out.rid;
    2395             : 
    2396             :         /* Copy result */
    2397           0 :         state->orig.out.result = state->tmp.out.result;
    2398             : 
    2399             :         /* Reset temporary structure */
    2400           0 :         NDR_ZERO_STRUCT(state->tmp);
    2401             : 
    2402           0 :         tevent_req_done(req);
    2403             : }
    2404             : 
    2405           0 : NTSTATUS dcerpc_samr_CreateDomainGroup_recv(struct tevent_req *req,
    2406             :                                             TALLOC_CTX *mem_ctx,
    2407             :                                             NTSTATUS *result)
    2408             : {
    2409           0 :         struct dcerpc_samr_CreateDomainGroup_state *state = tevent_req_data(
    2410             :                 req, struct dcerpc_samr_CreateDomainGroup_state);
    2411           0 :         NTSTATUS status;
    2412             : 
    2413           0 :         if (tevent_req_is_nterror(req, &status)) {
    2414           0 :                 tevent_req_received(req);
    2415           0 :                 return status;
    2416             :         }
    2417             : 
    2418             :         /* Steal possible out parameters to the callers context */
    2419           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2420             : 
    2421             :         /* Return result */
    2422           0 :         *result = state->orig.out.result;
    2423             : 
    2424           0 :         tevent_req_received(req);
    2425           0 :         return NT_STATUS_OK;
    2426             : }
    2427             : 
    2428          72 : NTSTATUS dcerpc_samr_CreateDomainGroup(struct dcerpc_binding_handle *h,
    2429             :                                        TALLOC_CTX *mem_ctx,
    2430             :                                        struct policy_handle *_domain_handle /* [in] [ref] */,
    2431             :                                        struct lsa_String *_name /* [in] [ref] */,
    2432             :                                        uint32_t _access_mask /* [in]  */,
    2433             :                                        struct policy_handle *_group_handle /* [out] [ref] */,
    2434             :                                        uint32_t *_rid /* [out] [ref] */,
    2435             :                                        NTSTATUS *result)
    2436             : {
    2437           0 :         struct samr_CreateDomainGroup r;
    2438           0 :         NTSTATUS status;
    2439             : 
    2440             :         /* In parameters */
    2441          72 :         r.in.domain_handle = _domain_handle;
    2442          72 :         r.in.name = _name;
    2443          72 :         r.in.access_mask = _access_mask;
    2444             : 
    2445             :         /* Out parameters */
    2446          72 :         r.out.group_handle = _group_handle;
    2447          72 :         r.out.rid = _rid;
    2448             : 
    2449             :         /* Result */
    2450          72 :         NDR_ZERO_STRUCT(r.out.result);
    2451             : 
    2452          72 :         status = dcerpc_samr_CreateDomainGroup_r(h, mem_ctx, &r);
    2453          72 :         if (!NT_STATUS_IS_OK(status)) {
    2454           0 :                 return status;
    2455             :         }
    2456             : 
    2457             :         /* Return variables */
    2458          72 :         *_group_handle = *r.out.group_handle;
    2459          72 :         *_rid = *r.out.rid;
    2460             : 
    2461             :         /* Return result */
    2462          72 :         *result = r.out.result;
    2463             : 
    2464          72 :         return NT_STATUS_OK;
    2465             : }
    2466             : 
    2467             : struct dcerpc_samr_EnumDomainGroups_r_state {
    2468             :         TALLOC_CTX *out_mem_ctx;
    2469             : };
    2470             : 
    2471             : static void dcerpc_samr_EnumDomainGroups_r_done(struct tevent_req *subreq);
    2472             : 
    2473           5 : struct tevent_req *dcerpc_samr_EnumDomainGroups_r_send(TALLOC_CTX *mem_ctx,
    2474             :         struct tevent_context *ev,
    2475             :         struct dcerpc_binding_handle *h,
    2476             :         struct samr_EnumDomainGroups *r)
    2477             : {
    2478           0 :         struct tevent_req *req;
    2479           0 :         struct dcerpc_samr_EnumDomainGroups_r_state *state;
    2480           0 :         struct tevent_req *subreq;
    2481             : 
    2482           5 :         req = tevent_req_create(mem_ctx, &state,
    2483             :                                 struct dcerpc_samr_EnumDomainGroups_r_state);
    2484           5 :         if (req == NULL) {
    2485           0 :                 return NULL;
    2486             :         }
    2487             : 
    2488           5 :         state->out_mem_ctx = talloc_new(state);
    2489           5 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2490           0 :                 return tevent_req_post(req, ev);
    2491             :         }
    2492             : 
    2493           5 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2494             :                         NULL, &ndr_table_samr,
    2495           5 :                         NDR_SAMR_ENUMDOMAINGROUPS, state->out_mem_ctx, r);
    2496           5 :         if (tevent_req_nomem(subreq, req)) {
    2497           0 :                 return tevent_req_post(req, ev);
    2498             :         }
    2499           5 :         tevent_req_set_callback(subreq, dcerpc_samr_EnumDomainGroups_r_done, req);
    2500             : 
    2501           5 :         return req;
    2502             : }
    2503             : 
    2504           5 : static void dcerpc_samr_EnumDomainGroups_r_done(struct tevent_req *subreq)
    2505             : {
    2506           0 :         struct tevent_req *req =
    2507           5 :                 tevent_req_callback_data(subreq,
    2508             :                 struct tevent_req);
    2509           0 :         NTSTATUS status;
    2510             : 
    2511           5 :         status = dcerpc_binding_handle_call_recv(subreq);
    2512           5 :         TALLOC_FREE(subreq);
    2513           5 :         if (tevent_req_nterror(req, status)) {
    2514           0 :                 return;
    2515             :         }
    2516             : 
    2517           5 :         tevent_req_done(req);
    2518             : }
    2519             : 
    2520           5 : NTSTATUS dcerpc_samr_EnumDomainGroups_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2521             : {
    2522           0 :         struct dcerpc_samr_EnumDomainGroups_r_state *state =
    2523           5 :                 tevent_req_data(req,
    2524             :                 struct dcerpc_samr_EnumDomainGroups_r_state);
    2525           0 :         NTSTATUS status;
    2526             : 
    2527           5 :         if (tevent_req_is_nterror(req, &status)) {
    2528           0 :                 tevent_req_received(req);
    2529           0 :                 return status;
    2530             :         }
    2531             : 
    2532           5 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2533             : 
    2534           5 :         tevent_req_received(req);
    2535           5 :         return NT_STATUS_OK;
    2536             : }
    2537             : 
    2538         141 : NTSTATUS dcerpc_samr_EnumDomainGroups_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_EnumDomainGroups *r)
    2539             : {
    2540           0 :         NTSTATUS status;
    2541             : 
    2542         141 :         status = dcerpc_binding_handle_call(h,
    2543             :                         NULL, &ndr_table_samr,
    2544             :                         NDR_SAMR_ENUMDOMAINGROUPS, mem_ctx, r);
    2545             : 
    2546         141 :         return status;
    2547             : }
    2548             : 
    2549             : struct dcerpc_samr_EnumDomainGroups_state {
    2550             :         struct samr_EnumDomainGroups orig;
    2551             :         struct samr_EnumDomainGroups tmp;
    2552             :         TALLOC_CTX *out_mem_ctx;
    2553             : };
    2554             : 
    2555             : static void dcerpc_samr_EnumDomainGroups_done(struct tevent_req *subreq);
    2556             : 
    2557           0 : struct tevent_req *dcerpc_samr_EnumDomainGroups_send(TALLOC_CTX *mem_ctx,
    2558             :                                                      struct tevent_context *ev,
    2559             :                                                      struct dcerpc_binding_handle *h,
    2560             :                                                      struct policy_handle *_domain_handle /* [in] [ref] */,
    2561             :                                                      uint32_t *_resume_handle /* [in,out] [ref] */,
    2562             :                                                      struct samr_SamArray **_sam /* [out] [ref] */,
    2563             :                                                      uint32_t _max_size /* [in]  */,
    2564             :                                                      uint32_t *_num_entries /* [out] [ref] */)
    2565             : {
    2566           0 :         struct tevent_req *req;
    2567           0 :         struct dcerpc_samr_EnumDomainGroups_state *state;
    2568           0 :         struct tevent_req *subreq;
    2569             : 
    2570           0 :         req = tevent_req_create(mem_ctx, &state,
    2571             :                                 struct dcerpc_samr_EnumDomainGroups_state);
    2572           0 :         if (req == NULL) {
    2573           0 :                 return NULL;
    2574             :         }
    2575           0 :         state->out_mem_ctx = NULL;
    2576             : 
    2577             :         /* In parameters */
    2578           0 :         state->orig.in.domain_handle = _domain_handle;
    2579           0 :         state->orig.in.resume_handle = _resume_handle;
    2580           0 :         state->orig.in.max_size = _max_size;
    2581             : 
    2582             :         /* Out parameters */
    2583           0 :         state->orig.out.resume_handle = _resume_handle;
    2584           0 :         state->orig.out.sam = _sam;
    2585           0 :         state->orig.out.num_entries = _num_entries;
    2586             : 
    2587             :         /* Result */
    2588           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2589             : 
    2590           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2591             :                              "dcerpc_samr_EnumDomainGroups_out_memory");
    2592           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2593           0 :                 return tevent_req_post(req, ev);
    2594             :         }
    2595             : 
    2596             :         /* make a temporary copy, that we pass to the dispatch function */
    2597           0 :         state->tmp = state->orig;
    2598             : 
    2599           0 :         subreq = dcerpc_samr_EnumDomainGroups_r_send(state, ev, h, &state->tmp);
    2600           0 :         if (tevent_req_nomem(subreq, req)) {
    2601           0 :                 return tevent_req_post(req, ev);
    2602             :         }
    2603           0 :         tevent_req_set_callback(subreq, dcerpc_samr_EnumDomainGroups_done, req);
    2604           0 :         return req;
    2605             : }
    2606             : 
    2607           0 : static void dcerpc_samr_EnumDomainGroups_done(struct tevent_req *subreq)
    2608             : {
    2609           0 :         struct tevent_req *req = tevent_req_callback_data(
    2610             :                 subreq, struct tevent_req);
    2611           0 :         struct dcerpc_samr_EnumDomainGroups_state *state = tevent_req_data(
    2612             :                 req, struct dcerpc_samr_EnumDomainGroups_state);
    2613           0 :         NTSTATUS status;
    2614           0 :         TALLOC_CTX *mem_ctx;
    2615             : 
    2616           0 :         if (state->out_mem_ctx) {
    2617           0 :                 mem_ctx = state->out_mem_ctx;
    2618             :         } else {
    2619           0 :                 mem_ctx = state;
    2620             :         }
    2621             : 
    2622           0 :         status = dcerpc_samr_EnumDomainGroups_r_recv(subreq, mem_ctx);
    2623           0 :         TALLOC_FREE(subreq);
    2624           0 :         if (tevent_req_nterror(req, status)) {
    2625           0 :                 return;
    2626             :         }
    2627             : 
    2628             :         /* Copy out parameters */
    2629           0 :         *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
    2630           0 :         *state->orig.out.sam = *state->tmp.out.sam;
    2631           0 :         *state->orig.out.num_entries = *state->tmp.out.num_entries;
    2632             : 
    2633             :         /* Copy result */
    2634           0 :         state->orig.out.result = state->tmp.out.result;
    2635             : 
    2636             :         /* Reset temporary structure */
    2637           0 :         NDR_ZERO_STRUCT(state->tmp);
    2638             : 
    2639           0 :         tevent_req_done(req);
    2640             : }
    2641             : 
    2642           0 : NTSTATUS dcerpc_samr_EnumDomainGroups_recv(struct tevent_req *req,
    2643             :                                            TALLOC_CTX *mem_ctx,
    2644             :                                            NTSTATUS *result)
    2645             : {
    2646           0 :         struct dcerpc_samr_EnumDomainGroups_state *state = tevent_req_data(
    2647             :                 req, struct dcerpc_samr_EnumDomainGroups_state);
    2648           0 :         NTSTATUS status;
    2649             : 
    2650           0 :         if (tevent_req_is_nterror(req, &status)) {
    2651           0 :                 tevent_req_received(req);
    2652           0 :                 return status;
    2653             :         }
    2654             : 
    2655             :         /* Steal possible out parameters to the callers context */
    2656           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2657             : 
    2658             :         /* Return result */
    2659           0 :         *result = state->orig.out.result;
    2660             : 
    2661           0 :         tevent_req_received(req);
    2662           0 :         return NT_STATUS_OK;
    2663             : }
    2664             : 
    2665           0 : NTSTATUS dcerpc_samr_EnumDomainGroups(struct dcerpc_binding_handle *h,
    2666             :                                       TALLOC_CTX *mem_ctx,
    2667             :                                       struct policy_handle *_domain_handle /* [in] [ref] */,
    2668             :                                       uint32_t *_resume_handle /* [in,out] [ref] */,
    2669             :                                       struct samr_SamArray **_sam /* [out] [ref] */,
    2670             :                                       uint32_t _max_size /* [in]  */,
    2671             :                                       uint32_t *_num_entries /* [out] [ref] */,
    2672             :                                       NTSTATUS *result)
    2673             : {
    2674           0 :         struct samr_EnumDomainGroups r;
    2675           0 :         NTSTATUS status;
    2676             : 
    2677             :         /* In parameters */
    2678           0 :         r.in.domain_handle = _domain_handle;
    2679           0 :         r.in.resume_handle = _resume_handle;
    2680           0 :         r.in.max_size = _max_size;
    2681             : 
    2682             :         /* Out parameters */
    2683           0 :         r.out.resume_handle = _resume_handle;
    2684           0 :         r.out.sam = _sam;
    2685           0 :         r.out.num_entries = _num_entries;
    2686             : 
    2687             :         /* Result */
    2688           0 :         NDR_ZERO_STRUCT(r.out.result);
    2689             : 
    2690           0 :         status = dcerpc_samr_EnumDomainGroups_r(h, mem_ctx, &r);
    2691           0 :         if (!NT_STATUS_IS_OK(status)) {
    2692           0 :                 return status;
    2693             :         }
    2694             : 
    2695             :         /* Return variables */
    2696           0 :         *_resume_handle = *r.out.resume_handle;
    2697           0 :         *_sam = *r.out.sam;
    2698           0 :         *_num_entries = *r.out.num_entries;
    2699             : 
    2700             :         /* Return result */
    2701           0 :         *result = r.out.result;
    2702             : 
    2703           0 :         return NT_STATUS_OK;
    2704             : }
    2705             : 
    2706             : struct dcerpc_samr_CreateUser_r_state {
    2707             :         TALLOC_CTX *out_mem_ctx;
    2708             : };
    2709             : 
    2710             : static void dcerpc_samr_CreateUser_r_done(struct tevent_req *subreq);
    2711             : 
    2712           3 : struct tevent_req *dcerpc_samr_CreateUser_r_send(TALLOC_CTX *mem_ctx,
    2713             :         struct tevent_context *ev,
    2714             :         struct dcerpc_binding_handle *h,
    2715             :         struct samr_CreateUser *r)
    2716             : {
    2717           0 :         struct tevent_req *req;
    2718           0 :         struct dcerpc_samr_CreateUser_r_state *state;
    2719           0 :         struct tevent_req *subreq;
    2720             : 
    2721           3 :         req = tevent_req_create(mem_ctx, &state,
    2722             :                                 struct dcerpc_samr_CreateUser_r_state);
    2723           3 :         if (req == NULL) {
    2724           0 :                 return NULL;
    2725             :         }
    2726             : 
    2727           3 :         state->out_mem_ctx = talloc_new(state);
    2728           3 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2729           0 :                 return tevent_req_post(req, ev);
    2730             :         }
    2731             : 
    2732           3 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2733             :                         NULL, &ndr_table_samr,
    2734           3 :                         NDR_SAMR_CREATEUSER, state->out_mem_ctx, r);
    2735           3 :         if (tevent_req_nomem(subreq, req)) {
    2736           0 :                 return tevent_req_post(req, ev);
    2737             :         }
    2738           3 :         tevent_req_set_callback(subreq, dcerpc_samr_CreateUser_r_done, req);
    2739             : 
    2740           3 :         return req;
    2741             : }
    2742             : 
    2743           3 : static void dcerpc_samr_CreateUser_r_done(struct tevent_req *subreq)
    2744             : {
    2745           0 :         struct tevent_req *req =
    2746           3 :                 tevent_req_callback_data(subreq,
    2747             :                 struct tevent_req);
    2748           0 :         NTSTATUS status;
    2749             : 
    2750           3 :         status = dcerpc_binding_handle_call_recv(subreq);
    2751           3 :         TALLOC_FREE(subreq);
    2752           3 :         if (tevent_req_nterror(req, status)) {
    2753           0 :                 return;
    2754             :         }
    2755             : 
    2756           3 :         tevent_req_done(req);
    2757             : }
    2758             : 
    2759           3 : NTSTATUS dcerpc_samr_CreateUser_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2760             : {
    2761           0 :         struct dcerpc_samr_CreateUser_r_state *state =
    2762           3 :                 tevent_req_data(req,
    2763             :                 struct dcerpc_samr_CreateUser_r_state);
    2764           0 :         NTSTATUS status;
    2765             : 
    2766           3 :         if (tevent_req_is_nterror(req, &status)) {
    2767           0 :                 tevent_req_received(req);
    2768           0 :                 return status;
    2769             :         }
    2770             : 
    2771           3 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2772             : 
    2773           3 :         tevent_req_received(req);
    2774           3 :         return NT_STATUS_OK;
    2775             : }
    2776             : 
    2777        1566 : NTSTATUS dcerpc_samr_CreateUser_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_CreateUser *r)
    2778             : {
    2779           0 :         NTSTATUS status;
    2780             : 
    2781        1566 :         status = dcerpc_binding_handle_call(h,
    2782             :                         NULL, &ndr_table_samr,
    2783             :                         NDR_SAMR_CREATEUSER, mem_ctx, r);
    2784             : 
    2785        1566 :         return status;
    2786             : }
    2787             : 
    2788             : struct dcerpc_samr_CreateUser_state {
    2789             :         struct samr_CreateUser orig;
    2790             :         struct samr_CreateUser tmp;
    2791             :         TALLOC_CTX *out_mem_ctx;
    2792             : };
    2793             : 
    2794             : static void dcerpc_samr_CreateUser_done(struct tevent_req *subreq);
    2795             : 
    2796           0 : struct tevent_req *dcerpc_samr_CreateUser_send(TALLOC_CTX *mem_ctx,
    2797             :                                                struct tevent_context *ev,
    2798             :                                                struct dcerpc_binding_handle *h,
    2799             :                                                struct policy_handle *_domain_handle /* [in] [ref] */,
    2800             :                                                struct lsa_String *_account_name /* [in] [ref] */,
    2801             :                                                uint32_t _access_mask /* [in]  */,
    2802             :                                                struct policy_handle *_user_handle /* [out] [ref] */,
    2803             :                                                uint32_t *_rid /* [out] [ref] */)
    2804             : {
    2805           0 :         struct tevent_req *req;
    2806           0 :         struct dcerpc_samr_CreateUser_state *state;
    2807           0 :         struct tevent_req *subreq;
    2808             : 
    2809           0 :         req = tevent_req_create(mem_ctx, &state,
    2810             :                                 struct dcerpc_samr_CreateUser_state);
    2811           0 :         if (req == NULL) {
    2812           0 :                 return NULL;
    2813             :         }
    2814           0 :         state->out_mem_ctx = NULL;
    2815             : 
    2816             :         /* In parameters */
    2817           0 :         state->orig.in.domain_handle = _domain_handle;
    2818           0 :         state->orig.in.account_name = _account_name;
    2819           0 :         state->orig.in.access_mask = _access_mask;
    2820             : 
    2821             :         /* Out parameters */
    2822           0 :         state->orig.out.user_handle = _user_handle;
    2823           0 :         state->orig.out.rid = _rid;
    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_samr_CreateUser_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_samr_CreateUser_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_samr_CreateUser_done, req);
    2842           0 :         return req;
    2843             : }
    2844             : 
    2845           0 : static void dcerpc_samr_CreateUser_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_samr_CreateUser_state *state = tevent_req_data(
    2850             :                 req, struct dcerpc_samr_CreateUser_state);
    2851           0 :         NTSTATUS status;
    2852           0 :         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_samr_CreateUser_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.user_handle = *state->tmp.out.user_handle;
    2868           0 :         *state->orig.out.rid = *state->tmp.out.rid;
    2869             : 
    2870             :         /* Copy result */
    2871           0 :         state->orig.out.result = state->tmp.out.result;
    2872             : 
    2873             :         /* Reset temporary structure */
    2874           0 :         NDR_ZERO_STRUCT(state->tmp);
    2875             : 
    2876           0 :         tevent_req_done(req);
    2877             : }
    2878             : 
    2879           0 : NTSTATUS dcerpc_samr_CreateUser_recv(struct tevent_req *req,
    2880             :                                      TALLOC_CTX *mem_ctx,
    2881             :                                      NTSTATUS *result)
    2882             : {
    2883           0 :         struct dcerpc_samr_CreateUser_state *state = tevent_req_data(
    2884             :                 req, struct dcerpc_samr_CreateUser_state);
    2885           0 :         NTSTATUS status;
    2886             : 
    2887           0 :         if (tevent_req_is_nterror(req, &status)) {
    2888           0 :                 tevent_req_received(req);
    2889           0 :                 return status;
    2890             :         }
    2891             : 
    2892             :         /* Steal possible out parameters to the callers context */
    2893           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2894             : 
    2895             :         /* Return result */
    2896           0 :         *result = state->orig.out.result;
    2897             : 
    2898           0 :         tevent_req_received(req);
    2899           0 :         return NT_STATUS_OK;
    2900             : }
    2901             : 
    2902           0 : NTSTATUS dcerpc_samr_CreateUser(struct dcerpc_binding_handle *h,
    2903             :                                 TALLOC_CTX *mem_ctx,
    2904             :                                 struct policy_handle *_domain_handle /* [in] [ref] */,
    2905             :                                 struct lsa_String *_account_name /* [in] [ref] */,
    2906             :                                 uint32_t _access_mask /* [in]  */,
    2907             :                                 struct policy_handle *_user_handle /* [out] [ref] */,
    2908             :                                 uint32_t *_rid /* [out] [ref] */,
    2909             :                                 NTSTATUS *result)
    2910             : {
    2911           0 :         struct samr_CreateUser r;
    2912           0 :         NTSTATUS status;
    2913             : 
    2914             :         /* In parameters */
    2915           0 :         r.in.domain_handle = _domain_handle;
    2916           0 :         r.in.account_name = _account_name;
    2917           0 :         r.in.access_mask = _access_mask;
    2918             : 
    2919             :         /* Out parameters */
    2920           0 :         r.out.user_handle = _user_handle;
    2921           0 :         r.out.rid = _rid;
    2922             : 
    2923             :         /* Result */
    2924           0 :         NDR_ZERO_STRUCT(r.out.result);
    2925             : 
    2926           0 :         status = dcerpc_samr_CreateUser_r(h, mem_ctx, &r);
    2927           0 :         if (!NT_STATUS_IS_OK(status)) {
    2928           0 :                 return status;
    2929             :         }
    2930             : 
    2931             :         /* Return variables */
    2932           0 :         *_user_handle = *r.out.user_handle;
    2933           0 :         *_rid = *r.out.rid;
    2934             : 
    2935             :         /* Return result */
    2936           0 :         *result = r.out.result;
    2937             : 
    2938           0 :         return NT_STATUS_OK;
    2939             : }
    2940             : 
    2941             : struct dcerpc_samr_EnumDomainUsers_r_state {
    2942             :         TALLOC_CTX *out_mem_ctx;
    2943             : };
    2944             : 
    2945             : static void dcerpc_samr_EnumDomainUsers_r_done(struct tevent_req *subreq);
    2946             : 
    2947           4 : struct tevent_req *dcerpc_samr_EnumDomainUsers_r_send(TALLOC_CTX *mem_ctx,
    2948             :         struct tevent_context *ev,
    2949             :         struct dcerpc_binding_handle *h,
    2950             :         struct samr_EnumDomainUsers *r)
    2951             : {
    2952           0 :         struct tevent_req *req;
    2953           0 :         struct dcerpc_samr_EnumDomainUsers_r_state *state;
    2954           0 :         struct tevent_req *subreq;
    2955             : 
    2956           4 :         req = tevent_req_create(mem_ctx, &state,
    2957             :                                 struct dcerpc_samr_EnumDomainUsers_r_state);
    2958           4 :         if (req == NULL) {
    2959           0 :                 return NULL;
    2960             :         }
    2961             : 
    2962           4 :         state->out_mem_ctx = talloc_new(state);
    2963           4 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2964           0 :                 return tevent_req_post(req, ev);
    2965             :         }
    2966             : 
    2967           4 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2968             :                         NULL, &ndr_table_samr,
    2969           4 :                         NDR_SAMR_ENUMDOMAINUSERS, state->out_mem_ctx, r);
    2970           4 :         if (tevent_req_nomem(subreq, req)) {
    2971           0 :                 return tevent_req_post(req, ev);
    2972             :         }
    2973           4 :         tevent_req_set_callback(subreq, dcerpc_samr_EnumDomainUsers_r_done, req);
    2974             : 
    2975           4 :         return req;
    2976             : }
    2977             : 
    2978           4 : static void dcerpc_samr_EnumDomainUsers_r_done(struct tevent_req *subreq)
    2979             : {
    2980           0 :         struct tevent_req *req =
    2981           4 :                 tevent_req_callback_data(subreq,
    2982             :                 struct tevent_req);
    2983           0 :         NTSTATUS status;
    2984             : 
    2985           4 :         status = dcerpc_binding_handle_call_recv(subreq);
    2986           4 :         TALLOC_FREE(subreq);
    2987           4 :         if (tevent_req_nterror(req, status)) {
    2988           0 :                 return;
    2989             :         }
    2990             : 
    2991           4 :         tevent_req_done(req);
    2992             : }
    2993             : 
    2994           4 : NTSTATUS dcerpc_samr_EnumDomainUsers_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2995             : {
    2996           0 :         struct dcerpc_samr_EnumDomainUsers_r_state *state =
    2997           4 :                 tevent_req_data(req,
    2998             :                 struct dcerpc_samr_EnumDomainUsers_r_state);
    2999           0 :         NTSTATUS status;
    3000             : 
    3001           4 :         if (tevent_req_is_nterror(req, &status)) {
    3002           0 :                 tevent_req_received(req);
    3003           0 :                 return status;
    3004             :         }
    3005             : 
    3006           4 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3007             : 
    3008           4 :         tevent_req_received(req);
    3009           4 :         return NT_STATUS_OK;
    3010             : }
    3011             : 
    3012         150 : NTSTATUS dcerpc_samr_EnumDomainUsers_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_EnumDomainUsers *r)
    3013             : {
    3014           0 :         NTSTATUS status;
    3015             : 
    3016         150 :         status = dcerpc_binding_handle_call(h,
    3017             :                         NULL, &ndr_table_samr,
    3018             :                         NDR_SAMR_ENUMDOMAINUSERS, mem_ctx, r);
    3019             : 
    3020         150 :         return status;
    3021             : }
    3022             : 
    3023             : struct dcerpc_samr_EnumDomainUsers_state {
    3024             :         struct samr_EnumDomainUsers orig;
    3025             :         struct samr_EnumDomainUsers tmp;
    3026             :         TALLOC_CTX *out_mem_ctx;
    3027             : };
    3028             : 
    3029             : static void dcerpc_samr_EnumDomainUsers_done(struct tevent_req *subreq);
    3030             : 
    3031           0 : struct tevent_req *dcerpc_samr_EnumDomainUsers_send(TALLOC_CTX *mem_ctx,
    3032             :                                                     struct tevent_context *ev,
    3033             :                                                     struct dcerpc_binding_handle *h,
    3034             :                                                     struct policy_handle *_domain_handle /* [in] [ref] */,
    3035             :                                                     uint32_t *_resume_handle /* [in,out] [ref] */,
    3036             :                                                     uint32_t _acct_flags /* [in]  */,
    3037             :                                                     struct samr_SamArray **_sam /* [out] [ref] */,
    3038             :                                                     uint32_t _max_size /* [in]  */,
    3039             :                                                     uint32_t *_num_entries /* [out] [ref] */)
    3040             : {
    3041           0 :         struct tevent_req *req;
    3042           0 :         struct dcerpc_samr_EnumDomainUsers_state *state;
    3043           0 :         struct tevent_req *subreq;
    3044             : 
    3045           0 :         req = tevent_req_create(mem_ctx, &state,
    3046             :                                 struct dcerpc_samr_EnumDomainUsers_state);
    3047           0 :         if (req == NULL) {
    3048           0 :                 return NULL;
    3049             :         }
    3050           0 :         state->out_mem_ctx = NULL;
    3051             : 
    3052             :         /* In parameters */
    3053           0 :         state->orig.in.domain_handle = _domain_handle;
    3054           0 :         state->orig.in.resume_handle = _resume_handle;
    3055           0 :         state->orig.in.acct_flags = _acct_flags;
    3056           0 :         state->orig.in.max_size = _max_size;
    3057             : 
    3058             :         /* Out parameters */
    3059           0 :         state->orig.out.resume_handle = _resume_handle;
    3060           0 :         state->orig.out.sam = _sam;
    3061           0 :         state->orig.out.num_entries = _num_entries;
    3062             : 
    3063             :         /* Result */
    3064           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3065             : 
    3066           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3067             :                              "dcerpc_samr_EnumDomainUsers_out_memory");
    3068           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3069           0 :                 return tevent_req_post(req, ev);
    3070             :         }
    3071             : 
    3072             :         /* make a temporary copy, that we pass to the dispatch function */
    3073           0 :         state->tmp = state->orig;
    3074             : 
    3075           0 :         subreq = dcerpc_samr_EnumDomainUsers_r_send(state, ev, h, &state->tmp);
    3076           0 :         if (tevent_req_nomem(subreq, req)) {
    3077           0 :                 return tevent_req_post(req, ev);
    3078             :         }
    3079           0 :         tevent_req_set_callback(subreq, dcerpc_samr_EnumDomainUsers_done, req);
    3080           0 :         return req;
    3081             : }
    3082             : 
    3083           0 : static void dcerpc_samr_EnumDomainUsers_done(struct tevent_req *subreq)
    3084             : {
    3085           0 :         struct tevent_req *req = tevent_req_callback_data(
    3086             :                 subreq, struct tevent_req);
    3087           0 :         struct dcerpc_samr_EnumDomainUsers_state *state = tevent_req_data(
    3088             :                 req, struct dcerpc_samr_EnumDomainUsers_state);
    3089           0 :         NTSTATUS status;
    3090           0 :         TALLOC_CTX *mem_ctx;
    3091             : 
    3092           0 :         if (state->out_mem_ctx) {
    3093           0 :                 mem_ctx = state->out_mem_ctx;
    3094             :         } else {
    3095           0 :                 mem_ctx = state;
    3096             :         }
    3097             : 
    3098           0 :         status = dcerpc_samr_EnumDomainUsers_r_recv(subreq, mem_ctx);
    3099           0 :         TALLOC_FREE(subreq);
    3100           0 :         if (tevent_req_nterror(req, status)) {
    3101           0 :                 return;
    3102             :         }
    3103             : 
    3104             :         /* Copy out parameters */
    3105           0 :         *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
    3106           0 :         *state->orig.out.sam = *state->tmp.out.sam;
    3107           0 :         *state->orig.out.num_entries = *state->tmp.out.num_entries;
    3108             : 
    3109             :         /* Copy result */
    3110           0 :         state->orig.out.result = state->tmp.out.result;
    3111             : 
    3112             :         /* Reset temporary structure */
    3113           0 :         NDR_ZERO_STRUCT(state->tmp);
    3114             : 
    3115           0 :         tevent_req_done(req);
    3116             : }
    3117             : 
    3118           0 : NTSTATUS dcerpc_samr_EnumDomainUsers_recv(struct tevent_req *req,
    3119             :                                           TALLOC_CTX *mem_ctx,
    3120             :                                           NTSTATUS *result)
    3121             : {
    3122           0 :         struct dcerpc_samr_EnumDomainUsers_state *state = tevent_req_data(
    3123             :                 req, struct dcerpc_samr_EnumDomainUsers_state);
    3124           0 :         NTSTATUS status;
    3125             : 
    3126           0 :         if (tevent_req_is_nterror(req, &status)) {
    3127           0 :                 tevent_req_received(req);
    3128           0 :                 return status;
    3129             :         }
    3130             : 
    3131             :         /* Steal possible out parameters to the callers context */
    3132           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3133             : 
    3134             :         /* Return result */
    3135           0 :         *result = state->orig.out.result;
    3136             : 
    3137           0 :         tevent_req_received(req);
    3138           0 :         return NT_STATUS_OK;
    3139             : }
    3140             : 
    3141           9 : NTSTATUS dcerpc_samr_EnumDomainUsers(struct dcerpc_binding_handle *h,
    3142             :                                      TALLOC_CTX *mem_ctx,
    3143             :                                      struct policy_handle *_domain_handle /* [in] [ref] */,
    3144             :                                      uint32_t *_resume_handle /* [in,out] [ref] */,
    3145             :                                      uint32_t _acct_flags /* [in]  */,
    3146             :                                      struct samr_SamArray **_sam /* [out] [ref] */,
    3147             :                                      uint32_t _max_size /* [in]  */,
    3148             :                                      uint32_t *_num_entries /* [out] [ref] */,
    3149             :                                      NTSTATUS *result)
    3150             : {
    3151           0 :         struct samr_EnumDomainUsers r;
    3152           0 :         NTSTATUS status;
    3153             : 
    3154             :         /* In parameters */
    3155           9 :         r.in.domain_handle = _domain_handle;
    3156           9 :         r.in.resume_handle = _resume_handle;
    3157           9 :         r.in.acct_flags = _acct_flags;
    3158           9 :         r.in.max_size = _max_size;
    3159             : 
    3160             :         /* Out parameters */
    3161           9 :         r.out.resume_handle = _resume_handle;
    3162           9 :         r.out.sam = _sam;
    3163           9 :         r.out.num_entries = _num_entries;
    3164             : 
    3165             :         /* Result */
    3166           9 :         NDR_ZERO_STRUCT(r.out.result);
    3167             : 
    3168           9 :         status = dcerpc_samr_EnumDomainUsers_r(h, mem_ctx, &r);
    3169           9 :         if (!NT_STATUS_IS_OK(status)) {
    3170           0 :                 return status;
    3171             :         }
    3172             : 
    3173             :         /* Return variables */
    3174           9 :         *_resume_handle = *r.out.resume_handle;
    3175           9 :         *_sam = *r.out.sam;
    3176           9 :         *_num_entries = *r.out.num_entries;
    3177             : 
    3178             :         /* Return result */
    3179           9 :         *result = r.out.result;
    3180             : 
    3181           9 :         return NT_STATUS_OK;
    3182             : }
    3183             : 
    3184             : struct dcerpc_samr_CreateDomAlias_r_state {
    3185             :         TALLOC_CTX *out_mem_ctx;
    3186             : };
    3187             : 
    3188             : static void dcerpc_samr_CreateDomAlias_r_done(struct tevent_req *subreq);
    3189             : 
    3190           0 : struct tevent_req *dcerpc_samr_CreateDomAlias_r_send(TALLOC_CTX *mem_ctx,
    3191             :         struct tevent_context *ev,
    3192             :         struct dcerpc_binding_handle *h,
    3193             :         struct samr_CreateDomAlias *r)
    3194             : {
    3195           0 :         struct tevent_req *req;
    3196           0 :         struct dcerpc_samr_CreateDomAlias_r_state *state;
    3197           0 :         struct tevent_req *subreq;
    3198             : 
    3199           0 :         req = tevent_req_create(mem_ctx, &state,
    3200             :                                 struct dcerpc_samr_CreateDomAlias_r_state);
    3201           0 :         if (req == NULL) {
    3202           0 :                 return NULL;
    3203             :         }
    3204             : 
    3205           0 :         state->out_mem_ctx = talloc_new(state);
    3206           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3207           0 :                 return tevent_req_post(req, ev);
    3208             :         }
    3209             : 
    3210           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3211             :                         NULL, &ndr_table_samr,
    3212           0 :                         NDR_SAMR_CREATEDOMALIAS, state->out_mem_ctx, r);
    3213           0 :         if (tevent_req_nomem(subreq, req)) {
    3214           0 :                 return tevent_req_post(req, ev);
    3215             :         }
    3216           0 :         tevent_req_set_callback(subreq, dcerpc_samr_CreateDomAlias_r_done, req);
    3217             : 
    3218           0 :         return req;
    3219             : }
    3220             : 
    3221           0 : static void dcerpc_samr_CreateDomAlias_r_done(struct tevent_req *subreq)
    3222             : {
    3223           0 :         struct tevent_req *req =
    3224           0 :                 tevent_req_callback_data(subreq,
    3225             :                 struct tevent_req);
    3226           0 :         NTSTATUS status;
    3227             : 
    3228           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3229           0 :         TALLOC_FREE(subreq);
    3230           0 :         if (tevent_req_nterror(req, status)) {
    3231           0 :                 return;
    3232             :         }
    3233             : 
    3234           0 :         tevent_req_done(req);
    3235             : }
    3236             : 
    3237           0 : NTSTATUS dcerpc_samr_CreateDomAlias_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3238             : {
    3239           0 :         struct dcerpc_samr_CreateDomAlias_r_state *state =
    3240           0 :                 tevent_req_data(req,
    3241             :                 struct dcerpc_samr_CreateDomAlias_r_state);
    3242           0 :         NTSTATUS status;
    3243             : 
    3244           0 :         if (tevent_req_is_nterror(req, &status)) {
    3245           0 :                 tevent_req_received(req);
    3246           0 :                 return status;
    3247             :         }
    3248             : 
    3249           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3250             : 
    3251           0 :         tevent_req_received(req);
    3252           0 :         return NT_STATUS_OK;
    3253             : }
    3254             : 
    3255        1510 : NTSTATUS dcerpc_samr_CreateDomAlias_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_CreateDomAlias *r)
    3256             : {
    3257           0 :         NTSTATUS status;
    3258             : 
    3259        1510 :         status = dcerpc_binding_handle_call(h,
    3260             :                         NULL, &ndr_table_samr,
    3261             :                         NDR_SAMR_CREATEDOMALIAS, mem_ctx, r);
    3262             : 
    3263        1510 :         return status;
    3264             : }
    3265             : 
    3266             : struct dcerpc_samr_CreateDomAlias_state {
    3267             :         struct samr_CreateDomAlias orig;
    3268             :         struct samr_CreateDomAlias tmp;
    3269             :         TALLOC_CTX *out_mem_ctx;
    3270             : };
    3271             : 
    3272             : static void dcerpc_samr_CreateDomAlias_done(struct tevent_req *subreq);
    3273             : 
    3274           0 : struct tevent_req *dcerpc_samr_CreateDomAlias_send(TALLOC_CTX *mem_ctx,
    3275             :                                                    struct tevent_context *ev,
    3276             :                                                    struct dcerpc_binding_handle *h,
    3277             :                                                    struct policy_handle *_domain_handle /* [in] [ref] */,
    3278             :                                                    struct lsa_String *_alias_name /* [in] [ref] */,
    3279             :                                                    uint32_t _access_mask /* [in]  */,
    3280             :                                                    struct policy_handle *_alias_handle /* [out] [ref] */,
    3281             :                                                    uint32_t *_rid /* [out] [ref] */)
    3282             : {
    3283           0 :         struct tevent_req *req;
    3284           0 :         struct dcerpc_samr_CreateDomAlias_state *state;
    3285           0 :         struct tevent_req *subreq;
    3286             : 
    3287           0 :         req = tevent_req_create(mem_ctx, &state,
    3288             :                                 struct dcerpc_samr_CreateDomAlias_state);
    3289           0 :         if (req == NULL) {
    3290           0 :                 return NULL;
    3291             :         }
    3292           0 :         state->out_mem_ctx = NULL;
    3293             : 
    3294             :         /* In parameters */
    3295           0 :         state->orig.in.domain_handle = _domain_handle;
    3296           0 :         state->orig.in.alias_name = _alias_name;
    3297           0 :         state->orig.in.access_mask = _access_mask;
    3298             : 
    3299             :         /* Out parameters */
    3300           0 :         state->orig.out.alias_handle = _alias_handle;
    3301           0 :         state->orig.out.rid = _rid;
    3302             : 
    3303             :         /* Result */
    3304           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3305             : 
    3306           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3307             :                              "dcerpc_samr_CreateDomAlias_out_memory");
    3308           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3309           0 :                 return tevent_req_post(req, ev);
    3310             :         }
    3311             : 
    3312             :         /* make a temporary copy, that we pass to the dispatch function */
    3313           0 :         state->tmp = state->orig;
    3314             : 
    3315           0 :         subreq = dcerpc_samr_CreateDomAlias_r_send(state, ev, h, &state->tmp);
    3316           0 :         if (tevent_req_nomem(subreq, req)) {
    3317           0 :                 return tevent_req_post(req, ev);
    3318             :         }
    3319           0 :         tevent_req_set_callback(subreq, dcerpc_samr_CreateDomAlias_done, req);
    3320           0 :         return req;
    3321             : }
    3322             : 
    3323           0 : static void dcerpc_samr_CreateDomAlias_done(struct tevent_req *subreq)
    3324             : {
    3325           0 :         struct tevent_req *req = tevent_req_callback_data(
    3326             :                 subreq, struct tevent_req);
    3327           0 :         struct dcerpc_samr_CreateDomAlias_state *state = tevent_req_data(
    3328             :                 req, struct dcerpc_samr_CreateDomAlias_state);
    3329           0 :         NTSTATUS status;
    3330           0 :         TALLOC_CTX *mem_ctx;
    3331             : 
    3332           0 :         if (state->out_mem_ctx) {
    3333           0 :                 mem_ctx = state->out_mem_ctx;
    3334             :         } else {
    3335           0 :                 mem_ctx = state;
    3336             :         }
    3337             : 
    3338           0 :         status = dcerpc_samr_CreateDomAlias_r_recv(subreq, mem_ctx);
    3339           0 :         TALLOC_FREE(subreq);
    3340           0 :         if (tevent_req_nterror(req, status)) {
    3341           0 :                 return;
    3342             :         }
    3343             : 
    3344             :         /* Copy out parameters */
    3345           0 :         *state->orig.out.alias_handle = *state->tmp.out.alias_handle;
    3346           0 :         *state->orig.out.rid = *state->tmp.out.rid;
    3347             : 
    3348             :         /* Copy result */
    3349           0 :         state->orig.out.result = state->tmp.out.result;
    3350             : 
    3351             :         /* Reset temporary structure */
    3352           0 :         NDR_ZERO_STRUCT(state->tmp);
    3353             : 
    3354           0 :         tevent_req_done(req);
    3355             : }
    3356             : 
    3357           0 : NTSTATUS dcerpc_samr_CreateDomAlias_recv(struct tevent_req *req,
    3358             :                                          TALLOC_CTX *mem_ctx,
    3359             :                                          NTSTATUS *result)
    3360             : {
    3361           0 :         struct dcerpc_samr_CreateDomAlias_state *state = tevent_req_data(
    3362             :                 req, struct dcerpc_samr_CreateDomAlias_state);
    3363           0 :         NTSTATUS status;
    3364             : 
    3365           0 :         if (tevent_req_is_nterror(req, &status)) {
    3366           0 :                 tevent_req_received(req);
    3367           0 :                 return status;
    3368             :         }
    3369             : 
    3370             :         /* Steal possible out parameters to the callers context */
    3371           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3372             : 
    3373             :         /* Return result */
    3374           0 :         *result = state->orig.out.result;
    3375             : 
    3376           0 :         tevent_req_received(req);
    3377           0 :         return NT_STATUS_OK;
    3378             : }
    3379             : 
    3380           0 : NTSTATUS dcerpc_samr_CreateDomAlias(struct dcerpc_binding_handle *h,
    3381             :                                     TALLOC_CTX *mem_ctx,
    3382             :                                     struct policy_handle *_domain_handle /* [in] [ref] */,
    3383             :                                     struct lsa_String *_alias_name /* [in] [ref] */,
    3384             :                                     uint32_t _access_mask /* [in]  */,
    3385             :                                     struct policy_handle *_alias_handle /* [out] [ref] */,
    3386             :                                     uint32_t *_rid /* [out] [ref] */,
    3387             :                                     NTSTATUS *result)
    3388             : {
    3389           0 :         struct samr_CreateDomAlias r;
    3390           0 :         NTSTATUS status;
    3391             : 
    3392             :         /* In parameters */
    3393           0 :         r.in.domain_handle = _domain_handle;
    3394           0 :         r.in.alias_name = _alias_name;
    3395           0 :         r.in.access_mask = _access_mask;
    3396             : 
    3397             :         /* Out parameters */
    3398           0 :         r.out.alias_handle = _alias_handle;
    3399           0 :         r.out.rid = _rid;
    3400             : 
    3401             :         /* Result */
    3402           0 :         NDR_ZERO_STRUCT(r.out.result);
    3403             : 
    3404           0 :         status = dcerpc_samr_CreateDomAlias_r(h, mem_ctx, &r);
    3405           0 :         if (!NT_STATUS_IS_OK(status)) {
    3406           0 :                 return status;
    3407             :         }
    3408             : 
    3409             :         /* Return variables */
    3410           0 :         *_alias_handle = *r.out.alias_handle;
    3411           0 :         *_rid = *r.out.rid;
    3412             : 
    3413             :         /* Return result */
    3414           0 :         *result = r.out.result;
    3415             : 
    3416           0 :         return NT_STATUS_OK;
    3417             : }
    3418             : 
    3419             : struct dcerpc_samr_EnumDomainAliases_r_state {
    3420             :         TALLOC_CTX *out_mem_ctx;
    3421             : };
    3422             : 
    3423             : static void dcerpc_samr_EnumDomainAliases_r_done(struct tevent_req *subreq);
    3424             : 
    3425           0 : struct tevent_req *dcerpc_samr_EnumDomainAliases_r_send(TALLOC_CTX *mem_ctx,
    3426             :         struct tevent_context *ev,
    3427             :         struct dcerpc_binding_handle *h,
    3428             :         struct samr_EnumDomainAliases *r)
    3429             : {
    3430           0 :         struct tevent_req *req;
    3431           0 :         struct dcerpc_samr_EnumDomainAliases_r_state *state;
    3432           0 :         struct tevent_req *subreq;
    3433             : 
    3434           0 :         req = tevent_req_create(mem_ctx, &state,
    3435             :                                 struct dcerpc_samr_EnumDomainAliases_r_state);
    3436           0 :         if (req == NULL) {
    3437           0 :                 return NULL;
    3438             :         }
    3439             : 
    3440           0 :         state->out_mem_ctx = talloc_new(state);
    3441           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3442           0 :                 return tevent_req_post(req, ev);
    3443             :         }
    3444             : 
    3445           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3446             :                         NULL, &ndr_table_samr,
    3447           0 :                         NDR_SAMR_ENUMDOMAINALIASES, state->out_mem_ctx, r);
    3448           0 :         if (tevent_req_nomem(subreq, req)) {
    3449           0 :                 return tevent_req_post(req, ev);
    3450             :         }
    3451           0 :         tevent_req_set_callback(subreq, dcerpc_samr_EnumDomainAliases_r_done, req);
    3452             : 
    3453           0 :         return req;
    3454             : }
    3455             : 
    3456           0 : static void dcerpc_samr_EnumDomainAliases_r_done(struct tevent_req *subreq)
    3457             : {
    3458           0 :         struct tevent_req *req =
    3459           0 :                 tevent_req_callback_data(subreq,
    3460             :                 struct tevent_req);
    3461           0 :         NTSTATUS status;
    3462             : 
    3463           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3464           0 :         TALLOC_FREE(subreq);
    3465           0 :         if (tevent_req_nterror(req, status)) {
    3466           0 :                 return;
    3467             :         }
    3468             : 
    3469           0 :         tevent_req_done(req);
    3470             : }
    3471             : 
    3472           0 : NTSTATUS dcerpc_samr_EnumDomainAliases_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3473             : {
    3474           0 :         struct dcerpc_samr_EnumDomainAliases_r_state *state =
    3475           0 :                 tevent_req_data(req,
    3476             :                 struct dcerpc_samr_EnumDomainAliases_r_state);
    3477           0 :         NTSTATUS status;
    3478             : 
    3479           0 :         if (tevent_req_is_nterror(req, &status)) {
    3480           0 :                 tevent_req_received(req);
    3481           0 :                 return status;
    3482             :         }
    3483             : 
    3484           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3485             : 
    3486           0 :         tevent_req_received(req);
    3487           0 :         return NT_STATUS_OK;
    3488             : }
    3489             : 
    3490          47 : NTSTATUS dcerpc_samr_EnumDomainAliases_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_EnumDomainAliases *r)
    3491             : {
    3492           0 :         NTSTATUS status;
    3493             : 
    3494          47 :         status = dcerpc_binding_handle_call(h,
    3495             :                         NULL, &ndr_table_samr,
    3496             :                         NDR_SAMR_ENUMDOMAINALIASES, mem_ctx, r);
    3497             : 
    3498          47 :         return status;
    3499             : }
    3500             : 
    3501             : struct dcerpc_samr_EnumDomainAliases_state {
    3502             :         struct samr_EnumDomainAliases orig;
    3503             :         struct samr_EnumDomainAliases tmp;
    3504             :         TALLOC_CTX *out_mem_ctx;
    3505             : };
    3506             : 
    3507             : static void dcerpc_samr_EnumDomainAliases_done(struct tevent_req *subreq);
    3508             : 
    3509           0 : struct tevent_req *dcerpc_samr_EnumDomainAliases_send(TALLOC_CTX *mem_ctx,
    3510             :                                                       struct tevent_context *ev,
    3511             :                                                       struct dcerpc_binding_handle *h,
    3512             :                                                       struct policy_handle *_domain_handle /* [in] [ref] */,
    3513             :                                                       uint32_t *_resume_handle /* [in,out] [ref] */,
    3514             :                                                       struct samr_SamArray **_sam /* [out] [ref] */,
    3515             :                                                       uint32_t _max_size /* [in]  */,
    3516             :                                                       uint32_t *_num_entries /* [out] [ref] */)
    3517             : {
    3518           0 :         struct tevent_req *req;
    3519           0 :         struct dcerpc_samr_EnumDomainAliases_state *state;
    3520           0 :         struct tevent_req *subreq;
    3521             : 
    3522           0 :         req = tevent_req_create(mem_ctx, &state,
    3523             :                                 struct dcerpc_samr_EnumDomainAliases_state);
    3524           0 :         if (req == NULL) {
    3525           0 :                 return NULL;
    3526             :         }
    3527           0 :         state->out_mem_ctx = NULL;
    3528             : 
    3529             :         /* In parameters */
    3530           0 :         state->orig.in.domain_handle = _domain_handle;
    3531           0 :         state->orig.in.resume_handle = _resume_handle;
    3532           0 :         state->orig.in.max_size = _max_size;
    3533             : 
    3534             :         /* Out parameters */
    3535           0 :         state->orig.out.resume_handle = _resume_handle;
    3536           0 :         state->orig.out.sam = _sam;
    3537           0 :         state->orig.out.num_entries = _num_entries;
    3538             : 
    3539             :         /* Result */
    3540           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3541             : 
    3542           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3543             :                              "dcerpc_samr_EnumDomainAliases_out_memory");
    3544           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3545           0 :                 return tevent_req_post(req, ev);
    3546             :         }
    3547             : 
    3548             :         /* make a temporary copy, that we pass to the dispatch function */
    3549           0 :         state->tmp = state->orig;
    3550             : 
    3551           0 :         subreq = dcerpc_samr_EnumDomainAliases_r_send(state, ev, h, &state->tmp);
    3552           0 :         if (tevent_req_nomem(subreq, req)) {
    3553           0 :                 return tevent_req_post(req, ev);
    3554             :         }
    3555           0 :         tevent_req_set_callback(subreq, dcerpc_samr_EnumDomainAliases_done, req);
    3556           0 :         return req;
    3557             : }
    3558             : 
    3559           0 : static void dcerpc_samr_EnumDomainAliases_done(struct tevent_req *subreq)
    3560             : {
    3561           0 :         struct tevent_req *req = tevent_req_callback_data(
    3562             :                 subreq, struct tevent_req);
    3563           0 :         struct dcerpc_samr_EnumDomainAliases_state *state = tevent_req_data(
    3564             :                 req, struct dcerpc_samr_EnumDomainAliases_state);
    3565           0 :         NTSTATUS status;
    3566           0 :         TALLOC_CTX *mem_ctx;
    3567             : 
    3568           0 :         if (state->out_mem_ctx) {
    3569           0 :                 mem_ctx = state->out_mem_ctx;
    3570             :         } else {
    3571           0 :                 mem_ctx = state;
    3572             :         }
    3573             : 
    3574           0 :         status = dcerpc_samr_EnumDomainAliases_r_recv(subreq, mem_ctx);
    3575           0 :         TALLOC_FREE(subreq);
    3576           0 :         if (tevent_req_nterror(req, status)) {
    3577           0 :                 return;
    3578             :         }
    3579             : 
    3580             :         /* Copy out parameters */
    3581           0 :         *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
    3582           0 :         *state->orig.out.sam = *state->tmp.out.sam;
    3583           0 :         *state->orig.out.num_entries = *state->tmp.out.num_entries;
    3584             : 
    3585             :         /* Copy result */
    3586           0 :         state->orig.out.result = state->tmp.out.result;
    3587             : 
    3588             :         /* Reset temporary structure */
    3589           0 :         NDR_ZERO_STRUCT(state->tmp);
    3590             : 
    3591           0 :         tevent_req_done(req);
    3592             : }
    3593             : 
    3594           0 : NTSTATUS dcerpc_samr_EnumDomainAliases_recv(struct tevent_req *req,
    3595             :                                             TALLOC_CTX *mem_ctx,
    3596             :                                             NTSTATUS *result)
    3597             : {
    3598           0 :         struct dcerpc_samr_EnumDomainAliases_state *state = tevent_req_data(
    3599             :                 req, struct dcerpc_samr_EnumDomainAliases_state);
    3600           0 :         NTSTATUS status;
    3601             : 
    3602           0 :         if (tevent_req_is_nterror(req, &status)) {
    3603           0 :                 tevent_req_received(req);
    3604           0 :                 return status;
    3605             :         }
    3606             : 
    3607             :         /* Steal possible out parameters to the callers context */
    3608           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3609             : 
    3610             :         /* Return result */
    3611           0 :         *result = state->orig.out.result;
    3612             : 
    3613           0 :         tevent_req_received(req);
    3614           0 :         return NT_STATUS_OK;
    3615             : }
    3616             : 
    3617          16 : NTSTATUS dcerpc_samr_EnumDomainAliases(struct dcerpc_binding_handle *h,
    3618             :                                        TALLOC_CTX *mem_ctx,
    3619             :                                        struct policy_handle *_domain_handle /* [in] [ref] */,
    3620             :                                        uint32_t *_resume_handle /* [in,out] [ref] */,
    3621             :                                        struct samr_SamArray **_sam /* [out] [ref] */,
    3622             :                                        uint32_t _max_size /* [in]  */,
    3623             :                                        uint32_t *_num_entries /* [out] [ref] */,
    3624             :                                        NTSTATUS *result)
    3625             : {
    3626           0 :         struct samr_EnumDomainAliases r;
    3627           0 :         NTSTATUS status;
    3628             : 
    3629             :         /* In parameters */
    3630          16 :         r.in.domain_handle = _domain_handle;
    3631          16 :         r.in.resume_handle = _resume_handle;
    3632          16 :         r.in.max_size = _max_size;
    3633             : 
    3634             :         /* Out parameters */
    3635          16 :         r.out.resume_handle = _resume_handle;
    3636          16 :         r.out.sam = _sam;
    3637          16 :         r.out.num_entries = _num_entries;
    3638             : 
    3639             :         /* Result */
    3640          16 :         NDR_ZERO_STRUCT(r.out.result);
    3641             : 
    3642          16 :         status = dcerpc_samr_EnumDomainAliases_r(h, mem_ctx, &r);
    3643          16 :         if (!NT_STATUS_IS_OK(status)) {
    3644           0 :                 return status;
    3645             :         }
    3646             : 
    3647             :         /* Return variables */
    3648          16 :         *_resume_handle = *r.out.resume_handle;
    3649          16 :         *_sam = *r.out.sam;
    3650          16 :         *_num_entries = *r.out.num_entries;
    3651             : 
    3652             :         /* Return result */
    3653          16 :         *result = r.out.result;
    3654             : 
    3655          16 :         return NT_STATUS_OK;
    3656             : }
    3657             : 
    3658             : struct dcerpc_samr_GetAliasMembership_r_state {
    3659             :         TALLOC_CTX *out_mem_ctx;
    3660             : };
    3661             : 
    3662             : static void dcerpc_samr_GetAliasMembership_r_done(struct tevent_req *subreq);
    3663             : 
    3664           0 : struct tevent_req *dcerpc_samr_GetAliasMembership_r_send(TALLOC_CTX *mem_ctx,
    3665             :         struct tevent_context *ev,
    3666             :         struct dcerpc_binding_handle *h,
    3667             :         struct samr_GetAliasMembership *r)
    3668             : {
    3669           0 :         struct tevent_req *req;
    3670           0 :         struct dcerpc_samr_GetAliasMembership_r_state *state;
    3671           0 :         struct tevent_req *subreq;
    3672             : 
    3673           0 :         req = tevent_req_create(mem_ctx, &state,
    3674             :                                 struct dcerpc_samr_GetAliasMembership_r_state);
    3675           0 :         if (req == NULL) {
    3676           0 :                 return NULL;
    3677             :         }
    3678             : 
    3679           0 :         state->out_mem_ctx = talloc_new(state);
    3680           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3681           0 :                 return tevent_req_post(req, ev);
    3682             :         }
    3683             : 
    3684           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3685             :                         NULL, &ndr_table_samr,
    3686           0 :                         NDR_SAMR_GETALIASMEMBERSHIP, state->out_mem_ctx, r);
    3687           0 :         if (tevent_req_nomem(subreq, req)) {
    3688           0 :                 return tevent_req_post(req, ev);
    3689             :         }
    3690           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetAliasMembership_r_done, req);
    3691             : 
    3692           0 :         return req;
    3693             : }
    3694             : 
    3695           0 : static void dcerpc_samr_GetAliasMembership_r_done(struct tevent_req *subreq)
    3696             : {
    3697           0 :         struct tevent_req *req =
    3698           0 :                 tevent_req_callback_data(subreq,
    3699             :                 struct tevent_req);
    3700           0 :         NTSTATUS status;
    3701             : 
    3702           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3703           0 :         TALLOC_FREE(subreq);
    3704           0 :         if (tevent_req_nterror(req, status)) {
    3705           0 :                 return;
    3706             :         }
    3707             : 
    3708           0 :         tevent_req_done(req);
    3709             : }
    3710             : 
    3711           0 : NTSTATUS dcerpc_samr_GetAliasMembership_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3712             : {
    3713           0 :         struct dcerpc_samr_GetAliasMembership_r_state *state =
    3714           0 :                 tevent_req_data(req,
    3715             :                 struct dcerpc_samr_GetAliasMembership_r_state);
    3716           0 :         NTSTATUS status;
    3717             : 
    3718           0 :         if (tevent_req_is_nterror(req, &status)) {
    3719           0 :                 tevent_req_received(req);
    3720           0 :                 return status;
    3721             :         }
    3722             : 
    3723           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3724             : 
    3725           0 :         tevent_req_received(req);
    3726           0 :         return NT_STATUS_OK;
    3727             : }
    3728             : 
    3729         425 : NTSTATUS dcerpc_samr_GetAliasMembership_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_GetAliasMembership *r)
    3730             : {
    3731           0 :         NTSTATUS status;
    3732             : 
    3733         425 :         status = dcerpc_binding_handle_call(h,
    3734             :                         NULL, &ndr_table_samr,
    3735             :                         NDR_SAMR_GETALIASMEMBERSHIP, mem_ctx, r);
    3736             : 
    3737         425 :         return status;
    3738             : }
    3739             : 
    3740             : struct dcerpc_samr_GetAliasMembership_state {
    3741             :         struct samr_GetAliasMembership orig;
    3742             :         struct samr_GetAliasMembership tmp;
    3743             :         TALLOC_CTX *out_mem_ctx;
    3744             : };
    3745             : 
    3746             : static void dcerpc_samr_GetAliasMembership_done(struct tevent_req *subreq);
    3747             : 
    3748           0 : struct tevent_req *dcerpc_samr_GetAliasMembership_send(TALLOC_CTX *mem_ctx,
    3749             :                                                        struct tevent_context *ev,
    3750             :                                                        struct dcerpc_binding_handle *h,
    3751             :                                                        struct policy_handle *_domain_handle /* [in] [ref] */,
    3752             :                                                        struct lsa_SidArray *_sids /* [in] [ref] */,
    3753             :                                                        struct samr_Ids *_rids /* [out] [ref] */)
    3754             : {
    3755           0 :         struct tevent_req *req;
    3756           0 :         struct dcerpc_samr_GetAliasMembership_state *state;
    3757           0 :         struct tevent_req *subreq;
    3758             : 
    3759           0 :         req = tevent_req_create(mem_ctx, &state,
    3760             :                                 struct dcerpc_samr_GetAliasMembership_state);
    3761           0 :         if (req == NULL) {
    3762           0 :                 return NULL;
    3763             :         }
    3764           0 :         state->out_mem_ctx = NULL;
    3765             : 
    3766             :         /* In parameters */
    3767           0 :         state->orig.in.domain_handle = _domain_handle;
    3768           0 :         state->orig.in.sids = _sids;
    3769             : 
    3770             :         /* Out parameters */
    3771           0 :         state->orig.out.rids = _rids;
    3772             : 
    3773             :         /* Result */
    3774           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3775             : 
    3776           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3777             :                              "dcerpc_samr_GetAliasMembership_out_memory");
    3778           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3779           0 :                 return tevent_req_post(req, ev);
    3780             :         }
    3781             : 
    3782             :         /* make a temporary copy, that we pass to the dispatch function */
    3783           0 :         state->tmp = state->orig;
    3784             : 
    3785           0 :         subreq = dcerpc_samr_GetAliasMembership_r_send(state, ev, h, &state->tmp);
    3786           0 :         if (tevent_req_nomem(subreq, req)) {
    3787           0 :                 return tevent_req_post(req, ev);
    3788             :         }
    3789           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetAliasMembership_done, req);
    3790           0 :         return req;
    3791             : }
    3792             : 
    3793           0 : static void dcerpc_samr_GetAliasMembership_done(struct tevent_req *subreq)
    3794             : {
    3795           0 :         struct tevent_req *req = tevent_req_callback_data(
    3796             :                 subreq, struct tevent_req);
    3797           0 :         struct dcerpc_samr_GetAliasMembership_state *state = tevent_req_data(
    3798             :                 req, struct dcerpc_samr_GetAliasMembership_state);
    3799           0 :         NTSTATUS status;
    3800           0 :         TALLOC_CTX *mem_ctx;
    3801             : 
    3802           0 :         if (state->out_mem_ctx) {
    3803           0 :                 mem_ctx = state->out_mem_ctx;
    3804             :         } else {
    3805           0 :                 mem_ctx = state;
    3806             :         }
    3807             : 
    3808           0 :         status = dcerpc_samr_GetAliasMembership_r_recv(subreq, mem_ctx);
    3809           0 :         TALLOC_FREE(subreq);
    3810           0 :         if (tevent_req_nterror(req, status)) {
    3811           0 :                 return;
    3812             :         }
    3813             : 
    3814             :         /* Copy out parameters */
    3815           0 :         *state->orig.out.rids = *state->tmp.out.rids;
    3816             : 
    3817             :         /* Copy result */
    3818           0 :         state->orig.out.result = state->tmp.out.result;
    3819             : 
    3820             :         /* Reset temporary structure */
    3821           0 :         NDR_ZERO_STRUCT(state->tmp);
    3822             : 
    3823           0 :         tevent_req_done(req);
    3824             : }
    3825             : 
    3826           0 : NTSTATUS dcerpc_samr_GetAliasMembership_recv(struct tevent_req *req,
    3827             :                                              TALLOC_CTX *mem_ctx,
    3828             :                                              NTSTATUS *result)
    3829             : {
    3830           0 :         struct dcerpc_samr_GetAliasMembership_state *state = tevent_req_data(
    3831             :                 req, struct dcerpc_samr_GetAliasMembership_state);
    3832           0 :         NTSTATUS status;
    3833             : 
    3834           0 :         if (tevent_req_is_nterror(req, &status)) {
    3835           0 :                 tevent_req_received(req);
    3836           0 :                 return status;
    3837             :         }
    3838             : 
    3839             :         /* Steal possible out parameters to the callers context */
    3840           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3841             : 
    3842             :         /* Return result */
    3843           0 :         *result = state->orig.out.result;
    3844             : 
    3845           0 :         tevent_req_received(req);
    3846           0 :         return NT_STATUS_OK;
    3847             : }
    3848             : 
    3849          85 : NTSTATUS dcerpc_samr_GetAliasMembership(struct dcerpc_binding_handle *h,
    3850             :                                         TALLOC_CTX *mem_ctx,
    3851             :                                         struct policy_handle *_domain_handle /* [in] [ref] */,
    3852             :                                         struct lsa_SidArray *_sids /* [in] [ref] */,
    3853             :                                         struct samr_Ids *_rids /* [out] [ref] */,
    3854             :                                         NTSTATUS *result)
    3855             : {
    3856           0 :         struct samr_GetAliasMembership r;
    3857           0 :         NTSTATUS status;
    3858             : 
    3859             :         /* In parameters */
    3860          85 :         r.in.domain_handle = _domain_handle;
    3861          85 :         r.in.sids = _sids;
    3862             : 
    3863             :         /* Out parameters */
    3864          85 :         r.out.rids = _rids;
    3865             : 
    3866             :         /* Result */
    3867          85 :         NDR_ZERO_STRUCT(r.out.result);
    3868             : 
    3869          85 :         status = dcerpc_samr_GetAliasMembership_r(h, mem_ctx, &r);
    3870          85 :         if (!NT_STATUS_IS_OK(status)) {
    3871           0 :                 return status;
    3872             :         }
    3873             : 
    3874             :         /* Return variables */
    3875          85 :         *_rids = *r.out.rids;
    3876             : 
    3877             :         /* Return result */
    3878          85 :         *result = r.out.result;
    3879             : 
    3880          85 :         return NT_STATUS_OK;
    3881             : }
    3882             : 
    3883             : struct dcerpc_samr_LookupNames_r_state {
    3884             :         TALLOC_CTX *out_mem_ctx;
    3885             : };
    3886             : 
    3887             : static void dcerpc_samr_LookupNames_r_done(struct tevent_req *subreq);
    3888             : 
    3889          45 : struct tevent_req *dcerpc_samr_LookupNames_r_send(TALLOC_CTX *mem_ctx,
    3890             :         struct tevent_context *ev,
    3891             :         struct dcerpc_binding_handle *h,
    3892             :         struct samr_LookupNames *r)
    3893             : {
    3894           0 :         struct tevent_req *req;
    3895           0 :         struct dcerpc_samr_LookupNames_r_state *state;
    3896           0 :         struct tevent_req *subreq;
    3897             : 
    3898          45 :         req = tevent_req_create(mem_ctx, &state,
    3899             :                                 struct dcerpc_samr_LookupNames_r_state);
    3900          45 :         if (req == NULL) {
    3901           0 :                 return NULL;
    3902             :         }
    3903             : 
    3904          45 :         state->out_mem_ctx = talloc_new(state);
    3905          45 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3906           0 :                 return tevent_req_post(req, ev);
    3907             :         }
    3908             : 
    3909          45 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3910             :                         NULL, &ndr_table_samr,
    3911          45 :                         NDR_SAMR_LOOKUPNAMES, state->out_mem_ctx, r);
    3912          45 :         if (tevent_req_nomem(subreq, req)) {
    3913           0 :                 return tevent_req_post(req, ev);
    3914             :         }
    3915          45 :         tevent_req_set_callback(subreq, dcerpc_samr_LookupNames_r_done, req);
    3916             : 
    3917          45 :         return req;
    3918             : }
    3919             : 
    3920          45 : static void dcerpc_samr_LookupNames_r_done(struct tevent_req *subreq)
    3921             : {
    3922           0 :         struct tevent_req *req =
    3923          45 :                 tevent_req_callback_data(subreq,
    3924             :                 struct tevent_req);
    3925           0 :         NTSTATUS status;
    3926             : 
    3927          45 :         status = dcerpc_binding_handle_call_recv(subreq);
    3928          45 :         TALLOC_FREE(subreq);
    3929          45 :         if (tevent_req_nterror(req, status)) {
    3930           0 :                 return;
    3931             :         }
    3932             : 
    3933          45 :         tevent_req_done(req);
    3934             : }
    3935             : 
    3936          45 : NTSTATUS dcerpc_samr_LookupNames_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3937             : {
    3938           0 :         struct dcerpc_samr_LookupNames_r_state *state =
    3939          45 :                 tevent_req_data(req,
    3940             :                 struct dcerpc_samr_LookupNames_r_state);
    3941           0 :         NTSTATUS status;
    3942             : 
    3943          45 :         if (tevent_req_is_nterror(req, &status)) {
    3944           0 :                 tevent_req_received(req);
    3945           0 :                 return status;
    3946             :         }
    3947             : 
    3948          45 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3949             : 
    3950          45 :         tevent_req_received(req);
    3951          45 :         return NT_STATUS_OK;
    3952             : }
    3953             : 
    3954        2485 : NTSTATUS dcerpc_samr_LookupNames_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_LookupNames *r)
    3955             : {
    3956           0 :         NTSTATUS status;
    3957             : 
    3958        2485 :         status = dcerpc_binding_handle_call(h,
    3959             :                         NULL, &ndr_table_samr,
    3960             :                         NDR_SAMR_LOOKUPNAMES, mem_ctx, r);
    3961             : 
    3962        2485 :         return status;
    3963             : }
    3964             : 
    3965             : struct dcerpc_samr_LookupNames_state {
    3966             :         struct samr_LookupNames orig;
    3967             :         struct samr_LookupNames tmp;
    3968             :         TALLOC_CTX *out_mem_ctx;
    3969             : };
    3970             : 
    3971             : static void dcerpc_samr_LookupNames_done(struct tevent_req *subreq);
    3972             : 
    3973           0 : struct tevent_req *dcerpc_samr_LookupNames_send(TALLOC_CTX *mem_ctx,
    3974             :                                                 struct tevent_context *ev,
    3975             :                                                 struct dcerpc_binding_handle *h,
    3976             :                                                 struct policy_handle *_domain_handle /* [in] [ref] */,
    3977             :                                                 uint32_t _num_names /* [in] [range(0,1000)] */,
    3978             :                                                 struct lsa_String *_names /* [in] [length_is(num_names),size_is(1000)] */,
    3979             :                                                 struct samr_Ids *_rids /* [out] [ref] */,
    3980             :                                                 struct samr_Ids *_types /* [out] [ref] */)
    3981             : {
    3982           0 :         struct tevent_req *req;
    3983           0 :         struct dcerpc_samr_LookupNames_state *state;
    3984           0 :         struct tevent_req *subreq;
    3985             : 
    3986           0 :         req = tevent_req_create(mem_ctx, &state,
    3987             :                                 struct dcerpc_samr_LookupNames_state);
    3988           0 :         if (req == NULL) {
    3989           0 :                 return NULL;
    3990             :         }
    3991           0 :         state->out_mem_ctx = NULL;
    3992             : 
    3993             :         /* In parameters */
    3994           0 :         state->orig.in.domain_handle = _domain_handle;
    3995           0 :         state->orig.in.num_names = _num_names;
    3996           0 :         state->orig.in.names = _names;
    3997             : 
    3998             :         /* Out parameters */
    3999           0 :         state->orig.out.rids = _rids;
    4000           0 :         state->orig.out.types = _types;
    4001             : 
    4002             :         /* Result */
    4003           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4004             : 
    4005           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4006             :                              "dcerpc_samr_LookupNames_out_memory");
    4007           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4008           0 :                 return tevent_req_post(req, ev);
    4009             :         }
    4010             : 
    4011             :         /* make a temporary copy, that we pass to the dispatch function */
    4012           0 :         state->tmp = state->orig;
    4013             : 
    4014           0 :         subreq = dcerpc_samr_LookupNames_r_send(state, ev, h, &state->tmp);
    4015           0 :         if (tevent_req_nomem(subreq, req)) {
    4016           0 :                 return tevent_req_post(req, ev);
    4017             :         }
    4018           0 :         tevent_req_set_callback(subreq, dcerpc_samr_LookupNames_done, req);
    4019           0 :         return req;
    4020             : }
    4021             : 
    4022           0 : static void dcerpc_samr_LookupNames_done(struct tevent_req *subreq)
    4023             : {
    4024           0 :         struct tevent_req *req = tevent_req_callback_data(
    4025             :                 subreq, struct tevent_req);
    4026           0 :         struct dcerpc_samr_LookupNames_state *state = tevent_req_data(
    4027             :                 req, struct dcerpc_samr_LookupNames_state);
    4028           0 :         NTSTATUS status;
    4029           0 :         TALLOC_CTX *mem_ctx;
    4030             : 
    4031           0 :         if (state->out_mem_ctx) {
    4032           0 :                 mem_ctx = state->out_mem_ctx;
    4033             :         } else {
    4034           0 :                 mem_ctx = state;
    4035             :         }
    4036             : 
    4037           0 :         status = dcerpc_samr_LookupNames_r_recv(subreq, mem_ctx);
    4038           0 :         TALLOC_FREE(subreq);
    4039           0 :         if (tevent_req_nterror(req, status)) {
    4040           0 :                 return;
    4041             :         }
    4042             : 
    4043             :         /* Copy out parameters */
    4044           0 :         *state->orig.out.rids = *state->tmp.out.rids;
    4045           0 :         *state->orig.out.types = *state->tmp.out.types;
    4046             : 
    4047             :         /* Copy result */
    4048           0 :         state->orig.out.result = state->tmp.out.result;
    4049             : 
    4050             :         /* Reset temporary structure */
    4051           0 :         NDR_ZERO_STRUCT(state->tmp);
    4052             : 
    4053           0 :         tevent_req_done(req);
    4054             : }
    4055             : 
    4056           0 : NTSTATUS dcerpc_samr_LookupNames_recv(struct tevent_req *req,
    4057             :                                       TALLOC_CTX *mem_ctx,
    4058             :                                       NTSTATUS *result)
    4059             : {
    4060           0 :         struct dcerpc_samr_LookupNames_state *state = tevent_req_data(
    4061             :                 req, struct dcerpc_samr_LookupNames_state);
    4062           0 :         NTSTATUS status;
    4063             : 
    4064           0 :         if (tevent_req_is_nterror(req, &status)) {
    4065           0 :                 tevent_req_received(req);
    4066           0 :                 return status;
    4067             :         }
    4068             : 
    4069             :         /* Steal possible out parameters to the callers context */
    4070           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4071             : 
    4072             :         /* Return result */
    4073           0 :         *result = state->orig.out.result;
    4074             : 
    4075           0 :         tevent_req_received(req);
    4076           0 :         return NT_STATUS_OK;
    4077             : }
    4078             : 
    4079         289 : NTSTATUS dcerpc_samr_LookupNames(struct dcerpc_binding_handle *h,
    4080             :                                  TALLOC_CTX *mem_ctx,
    4081             :                                  struct policy_handle *_domain_handle /* [in] [ref] */,
    4082             :                                  uint32_t _num_names /* [in] [range(0,1000)] */,
    4083             :                                  struct lsa_String *_names /* [in] [length_is(num_names),size_is(1000)] */,
    4084             :                                  struct samr_Ids *_rids /* [out] [ref] */,
    4085             :                                  struct samr_Ids *_types /* [out] [ref] */,
    4086             :                                  NTSTATUS *result)
    4087             : {
    4088           0 :         struct samr_LookupNames r;
    4089           0 :         NTSTATUS status;
    4090             : 
    4091             :         /* In parameters */
    4092         289 :         r.in.domain_handle = _domain_handle;
    4093         289 :         r.in.num_names = _num_names;
    4094         289 :         r.in.names = _names;
    4095             : 
    4096             :         /* Out parameters */
    4097         289 :         r.out.rids = _rids;
    4098         289 :         r.out.types = _types;
    4099             : 
    4100             :         /* Result */
    4101         289 :         NDR_ZERO_STRUCT(r.out.result);
    4102             : 
    4103         289 :         status = dcerpc_samr_LookupNames_r(h, mem_ctx, &r);
    4104         289 :         if (!NT_STATUS_IS_OK(status)) {
    4105           0 :                 return status;
    4106             :         }
    4107             : 
    4108             :         /* Return variables */
    4109         289 :         *_rids = *r.out.rids;
    4110         289 :         *_types = *r.out.types;
    4111             : 
    4112             :         /* Return result */
    4113         289 :         *result = r.out.result;
    4114             : 
    4115         289 :         return NT_STATUS_OK;
    4116             : }
    4117             : 
    4118             : struct dcerpc_samr_LookupRids_r_state {
    4119             :         TALLOC_CTX *out_mem_ctx;
    4120             : };
    4121             : 
    4122             : static void dcerpc_samr_LookupRids_r_done(struct tevent_req *subreq);
    4123             : 
    4124           0 : struct tevent_req *dcerpc_samr_LookupRids_r_send(TALLOC_CTX *mem_ctx,
    4125             :         struct tevent_context *ev,
    4126             :         struct dcerpc_binding_handle *h,
    4127             :         struct samr_LookupRids *r)
    4128             : {
    4129           0 :         struct tevent_req *req;
    4130           0 :         struct dcerpc_samr_LookupRids_r_state *state;
    4131           0 :         struct tevent_req *subreq;
    4132             : 
    4133           0 :         req = tevent_req_create(mem_ctx, &state,
    4134             :                                 struct dcerpc_samr_LookupRids_r_state);
    4135           0 :         if (req == NULL) {
    4136           0 :                 return NULL;
    4137             :         }
    4138             : 
    4139           0 :         state->out_mem_ctx = talloc_new(state);
    4140           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4141           0 :                 return tevent_req_post(req, ev);
    4142             :         }
    4143             : 
    4144           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4145             :                         NULL, &ndr_table_samr,
    4146           0 :                         NDR_SAMR_LOOKUPRIDS, state->out_mem_ctx, r);
    4147           0 :         if (tevent_req_nomem(subreq, req)) {
    4148           0 :                 return tevent_req_post(req, ev);
    4149             :         }
    4150           0 :         tevent_req_set_callback(subreq, dcerpc_samr_LookupRids_r_done, req);
    4151             : 
    4152           0 :         return req;
    4153             : }
    4154             : 
    4155           0 : static void dcerpc_samr_LookupRids_r_done(struct tevent_req *subreq)
    4156             : {
    4157           0 :         struct tevent_req *req =
    4158           0 :                 tevent_req_callback_data(subreq,
    4159             :                 struct tevent_req);
    4160           0 :         NTSTATUS status;
    4161             : 
    4162           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4163           0 :         TALLOC_FREE(subreq);
    4164           0 :         if (tevent_req_nterror(req, status)) {
    4165           0 :                 return;
    4166             :         }
    4167             : 
    4168           0 :         tevent_req_done(req);
    4169             : }
    4170             : 
    4171           0 : NTSTATUS dcerpc_samr_LookupRids_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4172             : {
    4173           0 :         struct dcerpc_samr_LookupRids_r_state *state =
    4174           0 :                 tevent_req_data(req,
    4175             :                 struct dcerpc_samr_LookupRids_r_state);
    4176           0 :         NTSTATUS status;
    4177             : 
    4178           0 :         if (tevent_req_is_nterror(req, &status)) {
    4179           0 :                 tevent_req_received(req);
    4180           0 :                 return status;
    4181             :         }
    4182             : 
    4183           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4184             : 
    4185           0 :         tevent_req_received(req);
    4186           0 :         return NT_STATUS_OK;
    4187             : }
    4188             : 
    4189        1033 : NTSTATUS dcerpc_samr_LookupRids_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_LookupRids *r)
    4190             : {
    4191           0 :         NTSTATUS status;
    4192             : 
    4193        1033 :         status = dcerpc_binding_handle_call(h,
    4194             :                         NULL, &ndr_table_samr,
    4195             :                         NDR_SAMR_LOOKUPRIDS, mem_ctx, r);
    4196             : 
    4197        1033 :         return status;
    4198             : }
    4199             : 
    4200             : struct dcerpc_samr_LookupRids_state {
    4201             :         struct samr_LookupRids orig;
    4202             :         struct samr_LookupRids tmp;
    4203             :         TALLOC_CTX *out_mem_ctx;
    4204             : };
    4205             : 
    4206             : static void dcerpc_samr_LookupRids_done(struct tevent_req *subreq);
    4207             : 
    4208           0 : struct tevent_req *dcerpc_samr_LookupRids_send(TALLOC_CTX *mem_ctx,
    4209             :                                                struct tevent_context *ev,
    4210             :                                                struct dcerpc_binding_handle *h,
    4211             :                                                struct policy_handle *_domain_handle /* [in] [ref] */,
    4212             :                                                uint32_t _num_rids /* [in] [range(0,1000)] */,
    4213             :                                                uint32_t *_rids /* [in] [length_is(num_rids),size_is(1000)] */,
    4214             :                                                struct lsa_Strings *_names /* [out] [ref] */,
    4215             :                                                struct samr_Ids *_types /* [out] [ref] */)
    4216             : {
    4217           0 :         struct tevent_req *req;
    4218           0 :         struct dcerpc_samr_LookupRids_state *state;
    4219           0 :         struct tevent_req *subreq;
    4220             : 
    4221           0 :         req = tevent_req_create(mem_ctx, &state,
    4222             :                                 struct dcerpc_samr_LookupRids_state);
    4223           0 :         if (req == NULL) {
    4224           0 :                 return NULL;
    4225             :         }
    4226           0 :         state->out_mem_ctx = NULL;
    4227             : 
    4228             :         /* In parameters */
    4229           0 :         state->orig.in.domain_handle = _domain_handle;
    4230           0 :         state->orig.in.num_rids = _num_rids;
    4231           0 :         state->orig.in.rids = _rids;
    4232             : 
    4233             :         /* Out parameters */
    4234           0 :         state->orig.out.names = _names;
    4235           0 :         state->orig.out.types = _types;
    4236             : 
    4237             :         /* Result */
    4238           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4239             : 
    4240           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4241             :                              "dcerpc_samr_LookupRids_out_memory");
    4242           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4243           0 :                 return tevent_req_post(req, ev);
    4244             :         }
    4245             : 
    4246             :         /* make a temporary copy, that we pass to the dispatch function */
    4247           0 :         state->tmp = state->orig;
    4248             : 
    4249           0 :         subreq = dcerpc_samr_LookupRids_r_send(state, ev, h, &state->tmp);
    4250           0 :         if (tevent_req_nomem(subreq, req)) {
    4251           0 :                 return tevent_req_post(req, ev);
    4252             :         }
    4253           0 :         tevent_req_set_callback(subreq, dcerpc_samr_LookupRids_done, req);
    4254           0 :         return req;
    4255             : }
    4256             : 
    4257           0 : static void dcerpc_samr_LookupRids_done(struct tevent_req *subreq)
    4258             : {
    4259           0 :         struct tevent_req *req = tevent_req_callback_data(
    4260             :                 subreq, struct tevent_req);
    4261           0 :         struct dcerpc_samr_LookupRids_state *state = tevent_req_data(
    4262             :                 req, struct dcerpc_samr_LookupRids_state);
    4263           0 :         NTSTATUS status;
    4264           0 :         TALLOC_CTX *mem_ctx;
    4265             : 
    4266           0 :         if (state->out_mem_ctx) {
    4267           0 :                 mem_ctx = state->out_mem_ctx;
    4268             :         } else {
    4269           0 :                 mem_ctx = state;
    4270             :         }
    4271             : 
    4272           0 :         status = dcerpc_samr_LookupRids_r_recv(subreq, mem_ctx);
    4273           0 :         TALLOC_FREE(subreq);
    4274           0 :         if (tevent_req_nterror(req, status)) {
    4275           0 :                 return;
    4276             :         }
    4277             : 
    4278             :         /* Copy out parameters */
    4279           0 :         *state->orig.out.names = *state->tmp.out.names;
    4280           0 :         *state->orig.out.types = *state->tmp.out.types;
    4281             : 
    4282             :         /* Copy result */
    4283           0 :         state->orig.out.result = state->tmp.out.result;
    4284             : 
    4285             :         /* Reset temporary structure */
    4286           0 :         NDR_ZERO_STRUCT(state->tmp);
    4287             : 
    4288           0 :         tevent_req_done(req);
    4289             : }
    4290             : 
    4291           0 : NTSTATUS dcerpc_samr_LookupRids_recv(struct tevent_req *req,
    4292             :                                      TALLOC_CTX *mem_ctx,
    4293             :                                      NTSTATUS *result)
    4294             : {
    4295           0 :         struct dcerpc_samr_LookupRids_state *state = tevent_req_data(
    4296             :                 req, struct dcerpc_samr_LookupRids_state);
    4297           0 :         NTSTATUS status;
    4298             : 
    4299           0 :         if (tevent_req_is_nterror(req, &status)) {
    4300           0 :                 tevent_req_received(req);
    4301           0 :                 return status;
    4302             :         }
    4303             : 
    4304             :         /* Steal possible out parameters to the callers context */
    4305           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4306             : 
    4307             :         /* Return result */
    4308           0 :         *result = state->orig.out.result;
    4309             : 
    4310           0 :         tevent_req_received(req);
    4311           0 :         return NT_STATUS_OK;
    4312             : }
    4313             : 
    4314           9 : NTSTATUS dcerpc_samr_LookupRids(struct dcerpc_binding_handle *h,
    4315             :                                 TALLOC_CTX *mem_ctx,
    4316             :                                 struct policy_handle *_domain_handle /* [in] [ref] */,
    4317             :                                 uint32_t _num_rids /* [in] [range(0,1000)] */,
    4318             :                                 uint32_t *_rids /* [in] [length_is(num_rids),size_is(1000)] */,
    4319             :                                 struct lsa_Strings *_names /* [out] [ref] */,
    4320             :                                 struct samr_Ids *_types /* [out] [ref] */,
    4321             :                                 NTSTATUS *result)
    4322             : {
    4323           0 :         struct samr_LookupRids r;
    4324           0 :         NTSTATUS status;
    4325             : 
    4326             :         /* In parameters */
    4327           9 :         r.in.domain_handle = _domain_handle;
    4328           9 :         r.in.num_rids = _num_rids;
    4329           9 :         r.in.rids = _rids;
    4330             : 
    4331             :         /* Out parameters */
    4332           9 :         r.out.names = _names;
    4333           9 :         r.out.types = _types;
    4334             : 
    4335             :         /* Result */
    4336           9 :         NDR_ZERO_STRUCT(r.out.result);
    4337             : 
    4338           9 :         status = dcerpc_samr_LookupRids_r(h, mem_ctx, &r);
    4339           9 :         if (!NT_STATUS_IS_OK(status)) {
    4340           0 :                 return status;
    4341             :         }
    4342             : 
    4343             :         /* Return variables */
    4344           9 :         *_names = *r.out.names;
    4345           9 :         *_types = *r.out.types;
    4346             : 
    4347             :         /* Return result */
    4348           9 :         *result = r.out.result;
    4349             : 
    4350           9 :         return NT_STATUS_OK;
    4351             : }
    4352             : 
    4353             : struct dcerpc_samr_OpenGroup_r_state {
    4354             :         TALLOC_CTX *out_mem_ctx;
    4355             : };
    4356             : 
    4357             : static void dcerpc_samr_OpenGroup_r_done(struct tevent_req *subreq);
    4358             : 
    4359           3 : struct tevent_req *dcerpc_samr_OpenGroup_r_send(TALLOC_CTX *mem_ctx,
    4360             :         struct tevent_context *ev,
    4361             :         struct dcerpc_binding_handle *h,
    4362             :         struct samr_OpenGroup *r)
    4363             : {
    4364           0 :         struct tevent_req *req;
    4365           0 :         struct dcerpc_samr_OpenGroup_r_state *state;
    4366           0 :         struct tevent_req *subreq;
    4367             : 
    4368           3 :         req = tevent_req_create(mem_ctx, &state,
    4369             :                                 struct dcerpc_samr_OpenGroup_r_state);
    4370           3 :         if (req == NULL) {
    4371           0 :                 return NULL;
    4372             :         }
    4373             : 
    4374           3 :         state->out_mem_ctx = talloc_new(state);
    4375           3 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4376           0 :                 return tevent_req_post(req, ev);
    4377             :         }
    4378             : 
    4379           3 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4380             :                         NULL, &ndr_table_samr,
    4381           3 :                         NDR_SAMR_OPENGROUP, state->out_mem_ctx, r);
    4382           3 :         if (tevent_req_nomem(subreq, req)) {
    4383           0 :                 return tevent_req_post(req, ev);
    4384             :         }
    4385           3 :         tevent_req_set_callback(subreq, dcerpc_samr_OpenGroup_r_done, req);
    4386             : 
    4387           3 :         return req;
    4388             : }
    4389             : 
    4390           3 : static void dcerpc_samr_OpenGroup_r_done(struct tevent_req *subreq)
    4391             : {
    4392           0 :         struct tevent_req *req =
    4393           3 :                 tevent_req_callback_data(subreq,
    4394             :                 struct tevent_req);
    4395           0 :         NTSTATUS status;
    4396             : 
    4397           3 :         status = dcerpc_binding_handle_call_recv(subreq);
    4398           3 :         TALLOC_FREE(subreq);
    4399           3 :         if (tevent_req_nterror(req, status)) {
    4400           0 :                 return;
    4401             :         }
    4402             : 
    4403           3 :         tevent_req_done(req);
    4404             : }
    4405             : 
    4406           3 : NTSTATUS dcerpc_samr_OpenGroup_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4407             : {
    4408           0 :         struct dcerpc_samr_OpenGroup_r_state *state =
    4409           3 :                 tevent_req_data(req,
    4410             :                 struct dcerpc_samr_OpenGroup_r_state);
    4411           0 :         NTSTATUS status;
    4412             : 
    4413           3 :         if (tevent_req_is_nterror(req, &status)) {
    4414           0 :                 tevent_req_received(req);
    4415           0 :                 return status;
    4416             :         }
    4417             : 
    4418           3 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4419             : 
    4420           3 :         tevent_req_received(req);
    4421           3 :         return NT_STATUS_OK;
    4422             : }
    4423             : 
    4424         564 : NTSTATUS dcerpc_samr_OpenGroup_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_OpenGroup *r)
    4425             : {
    4426           0 :         NTSTATUS status;
    4427             : 
    4428         564 :         status = dcerpc_binding_handle_call(h,
    4429             :                         NULL, &ndr_table_samr,
    4430             :                         NDR_SAMR_OPENGROUP, mem_ctx, r);
    4431             : 
    4432         564 :         return status;
    4433             : }
    4434             : 
    4435             : struct dcerpc_samr_OpenGroup_state {
    4436             :         struct samr_OpenGroup orig;
    4437             :         struct samr_OpenGroup tmp;
    4438             :         TALLOC_CTX *out_mem_ctx;
    4439             : };
    4440             : 
    4441             : static void dcerpc_samr_OpenGroup_done(struct tevent_req *subreq);
    4442             : 
    4443           0 : struct tevent_req *dcerpc_samr_OpenGroup_send(TALLOC_CTX *mem_ctx,
    4444             :                                               struct tevent_context *ev,
    4445             :                                               struct dcerpc_binding_handle *h,
    4446             :                                               struct policy_handle *_domain_handle /* [in] [ref] */,
    4447             :                                               uint32_t _access_mask /* [in]  */,
    4448             :                                               uint32_t _rid /* [in]  */,
    4449             :                                               struct policy_handle *_group_handle /* [out] [ref] */)
    4450             : {
    4451           0 :         struct tevent_req *req;
    4452           0 :         struct dcerpc_samr_OpenGroup_state *state;
    4453           0 :         struct tevent_req *subreq;
    4454             : 
    4455           0 :         req = tevent_req_create(mem_ctx, &state,
    4456             :                                 struct dcerpc_samr_OpenGroup_state);
    4457           0 :         if (req == NULL) {
    4458           0 :                 return NULL;
    4459             :         }
    4460           0 :         state->out_mem_ctx = NULL;
    4461             : 
    4462             :         /* In parameters */
    4463           0 :         state->orig.in.domain_handle = _domain_handle;
    4464           0 :         state->orig.in.access_mask = _access_mask;
    4465           0 :         state->orig.in.rid = _rid;
    4466             : 
    4467             :         /* Out parameters */
    4468           0 :         state->orig.out.group_handle = _group_handle;
    4469             : 
    4470             :         /* Result */
    4471           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4472             : 
    4473           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4474             :                              "dcerpc_samr_OpenGroup_out_memory");
    4475           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4476           0 :                 return tevent_req_post(req, ev);
    4477             :         }
    4478             : 
    4479             :         /* make a temporary copy, that we pass to the dispatch function */
    4480           0 :         state->tmp = state->orig;
    4481             : 
    4482           0 :         subreq = dcerpc_samr_OpenGroup_r_send(state, ev, h, &state->tmp);
    4483           0 :         if (tevent_req_nomem(subreq, req)) {
    4484           0 :                 return tevent_req_post(req, ev);
    4485             :         }
    4486           0 :         tevent_req_set_callback(subreq, dcerpc_samr_OpenGroup_done, req);
    4487           0 :         return req;
    4488             : }
    4489             : 
    4490           0 : static void dcerpc_samr_OpenGroup_done(struct tevent_req *subreq)
    4491             : {
    4492           0 :         struct tevent_req *req = tevent_req_callback_data(
    4493             :                 subreq, struct tevent_req);
    4494           0 :         struct dcerpc_samr_OpenGroup_state *state = tevent_req_data(
    4495             :                 req, struct dcerpc_samr_OpenGroup_state);
    4496           0 :         NTSTATUS status;
    4497           0 :         TALLOC_CTX *mem_ctx;
    4498             : 
    4499           0 :         if (state->out_mem_ctx) {
    4500           0 :                 mem_ctx = state->out_mem_ctx;
    4501             :         } else {
    4502           0 :                 mem_ctx = state;
    4503             :         }
    4504             : 
    4505           0 :         status = dcerpc_samr_OpenGroup_r_recv(subreq, mem_ctx);
    4506           0 :         TALLOC_FREE(subreq);
    4507           0 :         if (tevent_req_nterror(req, status)) {
    4508           0 :                 return;
    4509             :         }
    4510             : 
    4511             :         /* Copy out parameters */
    4512           0 :         *state->orig.out.group_handle = *state->tmp.out.group_handle;
    4513             : 
    4514             :         /* Copy result */
    4515           0 :         state->orig.out.result = state->tmp.out.result;
    4516             : 
    4517             :         /* Reset temporary structure */
    4518           0 :         NDR_ZERO_STRUCT(state->tmp);
    4519             : 
    4520           0 :         tevent_req_done(req);
    4521             : }
    4522             : 
    4523           0 : NTSTATUS dcerpc_samr_OpenGroup_recv(struct tevent_req *req,
    4524             :                                     TALLOC_CTX *mem_ctx,
    4525             :                                     NTSTATUS *result)
    4526             : {
    4527           0 :         struct dcerpc_samr_OpenGroup_state *state = tevent_req_data(
    4528             :                 req, struct dcerpc_samr_OpenGroup_state);
    4529           0 :         NTSTATUS status;
    4530             : 
    4531           0 :         if (tevent_req_is_nterror(req, &status)) {
    4532           0 :                 tevent_req_received(req);
    4533           0 :                 return status;
    4534             :         }
    4535             : 
    4536             :         /* Steal possible out parameters to the callers context */
    4537           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4538             : 
    4539             :         /* Return result */
    4540           0 :         *result = state->orig.out.result;
    4541             : 
    4542           0 :         tevent_req_received(req);
    4543           0 :         return NT_STATUS_OK;
    4544             : }
    4545             : 
    4546         159 : NTSTATUS dcerpc_samr_OpenGroup(struct dcerpc_binding_handle *h,
    4547             :                                TALLOC_CTX *mem_ctx,
    4548             :                                struct policy_handle *_domain_handle /* [in] [ref] */,
    4549             :                                uint32_t _access_mask /* [in]  */,
    4550             :                                uint32_t _rid /* [in]  */,
    4551             :                                struct policy_handle *_group_handle /* [out] [ref] */,
    4552             :                                NTSTATUS *result)
    4553             : {
    4554           0 :         struct samr_OpenGroup r;
    4555           0 :         NTSTATUS status;
    4556             : 
    4557             :         /* In parameters */
    4558         159 :         r.in.domain_handle = _domain_handle;
    4559         159 :         r.in.access_mask = _access_mask;
    4560         159 :         r.in.rid = _rid;
    4561             : 
    4562             :         /* Out parameters */
    4563         159 :         r.out.group_handle = _group_handle;
    4564             : 
    4565             :         /* Result */
    4566         159 :         NDR_ZERO_STRUCT(r.out.result);
    4567             : 
    4568         159 :         status = dcerpc_samr_OpenGroup_r(h, mem_ctx, &r);
    4569         159 :         if (!NT_STATUS_IS_OK(status)) {
    4570           0 :                 return status;
    4571             :         }
    4572             : 
    4573             :         /* Return variables */
    4574         159 :         *_group_handle = *r.out.group_handle;
    4575             : 
    4576             :         /* Return result */
    4577         159 :         *result = r.out.result;
    4578             : 
    4579         159 :         return NT_STATUS_OK;
    4580             : }
    4581             : 
    4582             : struct dcerpc_samr_QueryGroupInfo_r_state {
    4583             :         TALLOC_CTX *out_mem_ctx;
    4584             : };
    4585             : 
    4586             : static void dcerpc_samr_QueryGroupInfo_r_done(struct tevent_req *subreq);
    4587             : 
    4588           3 : struct tevent_req *dcerpc_samr_QueryGroupInfo_r_send(TALLOC_CTX *mem_ctx,
    4589             :         struct tevent_context *ev,
    4590             :         struct dcerpc_binding_handle *h,
    4591             :         struct samr_QueryGroupInfo *r)
    4592             : {
    4593           0 :         struct tevent_req *req;
    4594           0 :         struct dcerpc_samr_QueryGroupInfo_r_state *state;
    4595           0 :         struct tevent_req *subreq;
    4596             : 
    4597           3 :         req = tevent_req_create(mem_ctx, &state,
    4598             :                                 struct dcerpc_samr_QueryGroupInfo_r_state);
    4599           3 :         if (req == NULL) {
    4600           0 :                 return NULL;
    4601             :         }
    4602             : 
    4603           3 :         state->out_mem_ctx = talloc_new(state);
    4604           3 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4605           0 :                 return tevent_req_post(req, ev);
    4606             :         }
    4607             : 
    4608           3 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4609             :                         NULL, &ndr_table_samr,
    4610           3 :                         NDR_SAMR_QUERYGROUPINFO, state->out_mem_ctx, r);
    4611           3 :         if (tevent_req_nomem(subreq, req)) {
    4612           0 :                 return tevent_req_post(req, ev);
    4613             :         }
    4614           3 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryGroupInfo_r_done, req);
    4615             : 
    4616           3 :         return req;
    4617             : }
    4618             : 
    4619           3 : static void dcerpc_samr_QueryGroupInfo_r_done(struct tevent_req *subreq)
    4620             : {
    4621           0 :         struct tevent_req *req =
    4622           3 :                 tevent_req_callback_data(subreq,
    4623             :                 struct tevent_req);
    4624           0 :         NTSTATUS status;
    4625             : 
    4626           3 :         status = dcerpc_binding_handle_call_recv(subreq);
    4627           3 :         TALLOC_FREE(subreq);
    4628           3 :         if (tevent_req_nterror(req, status)) {
    4629           0 :                 return;
    4630             :         }
    4631             : 
    4632           3 :         tevent_req_done(req);
    4633             : }
    4634             : 
    4635           3 : NTSTATUS dcerpc_samr_QueryGroupInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4636             : {
    4637           0 :         struct dcerpc_samr_QueryGroupInfo_r_state *state =
    4638           3 :                 tevent_req_data(req,
    4639             :                 struct dcerpc_samr_QueryGroupInfo_r_state);
    4640           0 :         NTSTATUS status;
    4641             : 
    4642           3 :         if (tevent_req_is_nterror(req, &status)) {
    4643           0 :                 tevent_req_received(req);
    4644           0 :                 return status;
    4645             :         }
    4646             : 
    4647           3 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4648             : 
    4649           3 :         tevent_req_received(req);
    4650           3 :         return NT_STATUS_OK;
    4651             : }
    4652             : 
    4653         260 : NTSTATUS dcerpc_samr_QueryGroupInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_QueryGroupInfo *r)
    4654             : {
    4655           0 :         NTSTATUS status;
    4656             : 
    4657         260 :         status = dcerpc_binding_handle_call(h,
    4658             :                         NULL, &ndr_table_samr,
    4659             :                         NDR_SAMR_QUERYGROUPINFO, mem_ctx, r);
    4660             : 
    4661         260 :         return status;
    4662             : }
    4663             : 
    4664             : struct dcerpc_samr_QueryGroupInfo_state {
    4665             :         struct samr_QueryGroupInfo orig;
    4666             :         struct samr_QueryGroupInfo tmp;
    4667             :         TALLOC_CTX *out_mem_ctx;
    4668             : };
    4669             : 
    4670             : static void dcerpc_samr_QueryGroupInfo_done(struct tevent_req *subreq);
    4671             : 
    4672           0 : struct tevent_req *dcerpc_samr_QueryGroupInfo_send(TALLOC_CTX *mem_ctx,
    4673             :                                                    struct tevent_context *ev,
    4674             :                                                    struct dcerpc_binding_handle *h,
    4675             :                                                    struct policy_handle *_group_handle /* [in] [ref] */,
    4676             :                                                    enum samr_GroupInfoEnum _level /* [in]  */,
    4677             :                                                    union samr_GroupInfo **_info /* [out] [ref,switch_is(level)] */)
    4678             : {
    4679           0 :         struct tevent_req *req;
    4680           0 :         struct dcerpc_samr_QueryGroupInfo_state *state;
    4681           0 :         struct tevent_req *subreq;
    4682             : 
    4683           0 :         req = tevent_req_create(mem_ctx, &state,
    4684             :                                 struct dcerpc_samr_QueryGroupInfo_state);
    4685           0 :         if (req == NULL) {
    4686           0 :                 return NULL;
    4687             :         }
    4688           0 :         state->out_mem_ctx = NULL;
    4689             : 
    4690             :         /* In parameters */
    4691           0 :         state->orig.in.group_handle = _group_handle;
    4692           0 :         state->orig.in.level = _level;
    4693             : 
    4694             :         /* Out parameters */
    4695           0 :         state->orig.out.info = _info;
    4696             : 
    4697             :         /* Result */
    4698           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4699             : 
    4700           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4701             :                              "dcerpc_samr_QueryGroupInfo_out_memory");
    4702           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4703           0 :                 return tevent_req_post(req, ev);
    4704             :         }
    4705             : 
    4706             :         /* make a temporary copy, that we pass to the dispatch function */
    4707           0 :         state->tmp = state->orig;
    4708             : 
    4709           0 :         subreq = dcerpc_samr_QueryGroupInfo_r_send(state, ev, h, &state->tmp);
    4710           0 :         if (tevent_req_nomem(subreq, req)) {
    4711           0 :                 return tevent_req_post(req, ev);
    4712             :         }
    4713           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryGroupInfo_done, req);
    4714           0 :         return req;
    4715             : }
    4716             : 
    4717           0 : static void dcerpc_samr_QueryGroupInfo_done(struct tevent_req *subreq)
    4718             : {
    4719           0 :         struct tevent_req *req = tevent_req_callback_data(
    4720             :                 subreq, struct tevent_req);
    4721           0 :         struct dcerpc_samr_QueryGroupInfo_state *state = tevent_req_data(
    4722             :                 req, struct dcerpc_samr_QueryGroupInfo_state);
    4723           0 :         NTSTATUS status;
    4724           0 :         TALLOC_CTX *mem_ctx;
    4725             : 
    4726           0 :         if (state->out_mem_ctx) {
    4727           0 :                 mem_ctx = state->out_mem_ctx;
    4728             :         } else {
    4729           0 :                 mem_ctx = state;
    4730             :         }
    4731             : 
    4732           0 :         status = dcerpc_samr_QueryGroupInfo_r_recv(subreq, mem_ctx);
    4733           0 :         TALLOC_FREE(subreq);
    4734           0 :         if (tevent_req_nterror(req, status)) {
    4735           0 :                 return;
    4736             :         }
    4737             : 
    4738             :         /* Copy out parameters */
    4739           0 :         *state->orig.out.info = *state->tmp.out.info;
    4740             : 
    4741             :         /* Copy result */
    4742           0 :         state->orig.out.result = state->tmp.out.result;
    4743             : 
    4744             :         /* Reset temporary structure */
    4745           0 :         NDR_ZERO_STRUCT(state->tmp);
    4746             : 
    4747           0 :         tevent_req_done(req);
    4748             : }
    4749             : 
    4750           0 : NTSTATUS dcerpc_samr_QueryGroupInfo_recv(struct tevent_req *req,
    4751             :                                          TALLOC_CTX *mem_ctx,
    4752             :                                          NTSTATUS *result)
    4753             : {
    4754           0 :         struct dcerpc_samr_QueryGroupInfo_state *state = tevent_req_data(
    4755             :                 req, struct dcerpc_samr_QueryGroupInfo_state);
    4756           0 :         NTSTATUS status;
    4757             : 
    4758           0 :         if (tevent_req_is_nterror(req, &status)) {
    4759           0 :                 tevent_req_received(req);
    4760           0 :                 return status;
    4761             :         }
    4762             : 
    4763             :         /* Steal possible out parameters to the callers context */
    4764           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4765             : 
    4766             :         /* Return result */
    4767           0 :         *result = state->orig.out.result;
    4768             : 
    4769           0 :         tevent_req_received(req);
    4770           0 :         return NT_STATUS_OK;
    4771             : }
    4772             : 
    4773          10 : NTSTATUS dcerpc_samr_QueryGroupInfo(struct dcerpc_binding_handle *h,
    4774             :                                     TALLOC_CTX *mem_ctx,
    4775             :                                     struct policy_handle *_group_handle /* [in] [ref] */,
    4776             :                                     enum samr_GroupInfoEnum _level /* [in]  */,
    4777             :                                     union samr_GroupInfo **_info /* [out] [ref,switch_is(level)] */,
    4778             :                                     NTSTATUS *result)
    4779             : {
    4780           0 :         struct samr_QueryGroupInfo r;
    4781           0 :         NTSTATUS status;
    4782             : 
    4783             :         /* In parameters */
    4784          10 :         r.in.group_handle = _group_handle;
    4785          10 :         r.in.level = _level;
    4786             : 
    4787             :         /* Out parameters */
    4788          10 :         r.out.info = _info;
    4789             : 
    4790             :         /* Result */
    4791          10 :         NDR_ZERO_STRUCT(r.out.result);
    4792             : 
    4793          10 :         status = dcerpc_samr_QueryGroupInfo_r(h, mem_ctx, &r);
    4794          10 :         if (!NT_STATUS_IS_OK(status)) {
    4795           0 :                 return status;
    4796             :         }
    4797             : 
    4798             :         /* Return variables */
    4799          10 :         *_info = *r.out.info;
    4800             : 
    4801             :         /* Return result */
    4802          10 :         *result = r.out.result;
    4803             : 
    4804          10 :         return NT_STATUS_OK;
    4805             : }
    4806             : 
    4807             : struct dcerpc_samr_SetGroupInfo_r_state {
    4808             :         TALLOC_CTX *out_mem_ctx;
    4809             : };
    4810             : 
    4811             : static void dcerpc_samr_SetGroupInfo_r_done(struct tevent_req *subreq);
    4812             : 
    4813           0 : struct tevent_req *dcerpc_samr_SetGroupInfo_r_send(TALLOC_CTX *mem_ctx,
    4814             :         struct tevent_context *ev,
    4815             :         struct dcerpc_binding_handle *h,
    4816             :         struct samr_SetGroupInfo *r)
    4817             : {
    4818           0 :         struct tevent_req *req;
    4819           0 :         struct dcerpc_samr_SetGroupInfo_r_state *state;
    4820           0 :         struct tevent_req *subreq;
    4821             : 
    4822           0 :         req = tevent_req_create(mem_ctx, &state,
    4823             :                                 struct dcerpc_samr_SetGroupInfo_r_state);
    4824           0 :         if (req == NULL) {
    4825           0 :                 return NULL;
    4826             :         }
    4827             : 
    4828           0 :         state->out_mem_ctx = NULL;
    4829             : 
    4830           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4831             :                         NULL, &ndr_table_samr,
    4832             :                         NDR_SAMR_SETGROUPINFO, state, r);
    4833           0 :         if (tevent_req_nomem(subreq, req)) {
    4834           0 :                 return tevent_req_post(req, ev);
    4835             :         }
    4836           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetGroupInfo_r_done, req);
    4837             : 
    4838           0 :         return req;
    4839             : }
    4840             : 
    4841           0 : static void dcerpc_samr_SetGroupInfo_r_done(struct tevent_req *subreq)
    4842             : {
    4843           0 :         struct tevent_req *req =
    4844           0 :                 tevent_req_callback_data(subreq,
    4845             :                 struct tevent_req);
    4846           0 :         NTSTATUS status;
    4847             : 
    4848           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4849           0 :         TALLOC_FREE(subreq);
    4850           0 :         if (tevent_req_nterror(req, status)) {
    4851           0 :                 return;
    4852             :         }
    4853             : 
    4854           0 :         tevent_req_done(req);
    4855             : }
    4856             : 
    4857           0 : NTSTATUS dcerpc_samr_SetGroupInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4858             : {
    4859           0 :         struct dcerpc_samr_SetGroupInfo_r_state *state =
    4860           0 :                 tevent_req_data(req,
    4861             :                 struct dcerpc_samr_SetGroupInfo_r_state);
    4862           0 :         NTSTATUS status;
    4863             : 
    4864           0 :         if (tevent_req_is_nterror(req, &status)) {
    4865           0 :                 tevent_req_received(req);
    4866           0 :                 return status;
    4867             :         }
    4868             : 
    4869           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4870             : 
    4871           0 :         tevent_req_received(req);
    4872           0 :         return NT_STATUS_OK;
    4873             : }
    4874             : 
    4875          21 : NTSTATUS dcerpc_samr_SetGroupInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_SetGroupInfo *r)
    4876             : {
    4877           0 :         NTSTATUS status;
    4878             : 
    4879          21 :         status = dcerpc_binding_handle_call(h,
    4880             :                         NULL, &ndr_table_samr,
    4881             :                         NDR_SAMR_SETGROUPINFO, mem_ctx, r);
    4882             : 
    4883          21 :         return status;
    4884             : }
    4885             : 
    4886             : struct dcerpc_samr_SetGroupInfo_state {
    4887             :         struct samr_SetGroupInfo orig;
    4888             :         struct samr_SetGroupInfo tmp;
    4889             :         TALLOC_CTX *out_mem_ctx;
    4890             : };
    4891             : 
    4892             : static void dcerpc_samr_SetGroupInfo_done(struct tevent_req *subreq);
    4893             : 
    4894           0 : struct tevent_req *dcerpc_samr_SetGroupInfo_send(TALLOC_CTX *mem_ctx,
    4895             :                                                  struct tevent_context *ev,
    4896             :                                                  struct dcerpc_binding_handle *h,
    4897             :                                                  struct policy_handle *_group_handle /* [in] [ref] */,
    4898             :                                                  enum samr_GroupInfoEnum _level /* [in]  */,
    4899             :                                                  union samr_GroupInfo *_info /* [in] [ref,switch_is(level)] */)
    4900             : {
    4901           0 :         struct tevent_req *req;
    4902           0 :         struct dcerpc_samr_SetGroupInfo_state *state;
    4903           0 :         struct tevent_req *subreq;
    4904             : 
    4905           0 :         req = tevent_req_create(mem_ctx, &state,
    4906             :                                 struct dcerpc_samr_SetGroupInfo_state);
    4907           0 :         if (req == NULL) {
    4908           0 :                 return NULL;
    4909             :         }
    4910           0 :         state->out_mem_ctx = NULL;
    4911             : 
    4912             :         /* In parameters */
    4913           0 :         state->orig.in.group_handle = _group_handle;
    4914           0 :         state->orig.in.level = _level;
    4915           0 :         state->orig.in.info = _info;
    4916             : 
    4917             :         /* Out parameters */
    4918             : 
    4919             :         /* Result */
    4920           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4921             : 
    4922             :         /* make a temporary copy, that we pass to the dispatch function */
    4923           0 :         state->tmp = state->orig;
    4924             : 
    4925           0 :         subreq = dcerpc_samr_SetGroupInfo_r_send(state, ev, h, &state->tmp);
    4926           0 :         if (tevent_req_nomem(subreq, req)) {
    4927           0 :                 return tevent_req_post(req, ev);
    4928             :         }
    4929           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetGroupInfo_done, req);
    4930           0 :         return req;
    4931             : }
    4932             : 
    4933           0 : static void dcerpc_samr_SetGroupInfo_done(struct tevent_req *subreq)
    4934             : {
    4935           0 :         struct tevent_req *req = tevent_req_callback_data(
    4936             :                 subreq, struct tevent_req);
    4937           0 :         struct dcerpc_samr_SetGroupInfo_state *state = tevent_req_data(
    4938             :                 req, struct dcerpc_samr_SetGroupInfo_state);
    4939           0 :         NTSTATUS status;
    4940           0 :         TALLOC_CTX *mem_ctx;
    4941             : 
    4942           0 :         if (state->out_mem_ctx) {
    4943           0 :                 mem_ctx = state->out_mem_ctx;
    4944             :         } else {
    4945           0 :                 mem_ctx = state;
    4946             :         }
    4947             : 
    4948           0 :         status = dcerpc_samr_SetGroupInfo_r_recv(subreq, mem_ctx);
    4949           0 :         TALLOC_FREE(subreq);
    4950           0 :         if (tevent_req_nterror(req, status)) {
    4951           0 :                 return;
    4952             :         }
    4953             : 
    4954             :         /* Copy out parameters */
    4955             : 
    4956             :         /* Copy result */
    4957           0 :         state->orig.out.result = state->tmp.out.result;
    4958             : 
    4959             :         /* Reset temporary structure */
    4960           0 :         NDR_ZERO_STRUCT(state->tmp);
    4961             : 
    4962           0 :         tevent_req_done(req);
    4963             : }
    4964             : 
    4965           0 : NTSTATUS dcerpc_samr_SetGroupInfo_recv(struct tevent_req *req,
    4966             :                                        TALLOC_CTX *mem_ctx,
    4967             :                                        NTSTATUS *result)
    4968             : {
    4969           0 :         struct dcerpc_samr_SetGroupInfo_state *state = tevent_req_data(
    4970             :                 req, struct dcerpc_samr_SetGroupInfo_state);
    4971           0 :         NTSTATUS status;
    4972             : 
    4973           0 :         if (tevent_req_is_nterror(req, &status)) {
    4974           0 :                 tevent_req_received(req);
    4975           0 :                 return status;
    4976             :         }
    4977             : 
    4978             :         /* Steal possible out parameters to the callers context */
    4979           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4980             : 
    4981             :         /* Return result */
    4982           0 :         *result = state->orig.out.result;
    4983             : 
    4984           0 :         tevent_req_received(req);
    4985           0 :         return NT_STATUS_OK;
    4986             : }
    4987             : 
    4988           1 : NTSTATUS dcerpc_samr_SetGroupInfo(struct dcerpc_binding_handle *h,
    4989             :                                   TALLOC_CTX *mem_ctx,
    4990             :                                   struct policy_handle *_group_handle /* [in] [ref] */,
    4991             :                                   enum samr_GroupInfoEnum _level /* [in]  */,
    4992             :                                   union samr_GroupInfo *_info /* [in] [ref,switch_is(level)] */,
    4993             :                                   NTSTATUS *result)
    4994             : {
    4995           0 :         struct samr_SetGroupInfo r;
    4996           0 :         NTSTATUS status;
    4997             : 
    4998             :         /* In parameters */
    4999           1 :         r.in.group_handle = _group_handle;
    5000           1 :         r.in.level = _level;
    5001           1 :         r.in.info = _info;
    5002             : 
    5003             :         /* Out parameters */
    5004             : 
    5005             :         /* Result */
    5006           1 :         NDR_ZERO_STRUCT(r.out.result);
    5007             : 
    5008           1 :         status = dcerpc_samr_SetGroupInfo_r(h, mem_ctx, &r);
    5009           1 :         if (!NT_STATUS_IS_OK(status)) {
    5010           0 :                 return status;
    5011             :         }
    5012             : 
    5013             :         /* Return variables */
    5014             : 
    5015             :         /* Return result */
    5016           1 :         *result = r.out.result;
    5017             : 
    5018           1 :         return NT_STATUS_OK;
    5019             : }
    5020             : 
    5021             : struct dcerpc_samr_AddGroupMember_r_state {
    5022             :         TALLOC_CTX *out_mem_ctx;
    5023             : };
    5024             : 
    5025             : static void dcerpc_samr_AddGroupMember_r_done(struct tevent_req *subreq);
    5026             : 
    5027           0 : struct tevent_req *dcerpc_samr_AddGroupMember_r_send(TALLOC_CTX *mem_ctx,
    5028             :         struct tevent_context *ev,
    5029             :         struct dcerpc_binding_handle *h,
    5030             :         struct samr_AddGroupMember *r)
    5031             : {
    5032           0 :         struct tevent_req *req;
    5033           0 :         struct dcerpc_samr_AddGroupMember_r_state *state;
    5034           0 :         struct tevent_req *subreq;
    5035             : 
    5036           0 :         req = tevent_req_create(mem_ctx, &state,
    5037             :                                 struct dcerpc_samr_AddGroupMember_r_state);
    5038           0 :         if (req == NULL) {
    5039           0 :                 return NULL;
    5040             :         }
    5041             : 
    5042           0 :         state->out_mem_ctx = NULL;
    5043             : 
    5044           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5045             :                         NULL, &ndr_table_samr,
    5046             :                         NDR_SAMR_ADDGROUPMEMBER, state, r);
    5047           0 :         if (tevent_req_nomem(subreq, req)) {
    5048           0 :                 return tevent_req_post(req, ev);
    5049             :         }
    5050           0 :         tevent_req_set_callback(subreq, dcerpc_samr_AddGroupMember_r_done, req);
    5051             : 
    5052           0 :         return req;
    5053             : }
    5054             : 
    5055           0 : static void dcerpc_samr_AddGroupMember_r_done(struct tevent_req *subreq)
    5056             : {
    5057           0 :         struct tevent_req *req =
    5058           0 :                 tevent_req_callback_data(subreq,
    5059             :                 struct tevent_req);
    5060           0 :         NTSTATUS status;
    5061             : 
    5062           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5063           0 :         TALLOC_FREE(subreq);
    5064           0 :         if (tevent_req_nterror(req, status)) {
    5065           0 :                 return;
    5066             :         }
    5067             : 
    5068           0 :         tevent_req_done(req);
    5069             : }
    5070             : 
    5071           0 : NTSTATUS dcerpc_samr_AddGroupMember_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5072             : {
    5073           0 :         struct dcerpc_samr_AddGroupMember_r_state *state =
    5074           0 :                 tevent_req_data(req,
    5075             :                 struct dcerpc_samr_AddGroupMember_r_state);
    5076           0 :         NTSTATUS status;
    5077             : 
    5078           0 :         if (tevent_req_is_nterror(req, &status)) {
    5079           0 :                 tevent_req_received(req);
    5080           0 :                 return status;
    5081             :         }
    5082             : 
    5083           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5084             : 
    5085           0 :         tevent_req_received(req);
    5086           0 :         return NT_STATUS_OK;
    5087             : }
    5088             : 
    5089          87 : NTSTATUS dcerpc_samr_AddGroupMember_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_AddGroupMember *r)
    5090             : {
    5091           0 :         NTSTATUS status;
    5092             : 
    5093          87 :         status = dcerpc_binding_handle_call(h,
    5094             :                         NULL, &ndr_table_samr,
    5095             :                         NDR_SAMR_ADDGROUPMEMBER, mem_ctx, r);
    5096             : 
    5097          87 :         return status;
    5098             : }
    5099             : 
    5100             : struct dcerpc_samr_AddGroupMember_state {
    5101             :         struct samr_AddGroupMember orig;
    5102             :         struct samr_AddGroupMember tmp;
    5103             :         TALLOC_CTX *out_mem_ctx;
    5104             : };
    5105             : 
    5106             : static void dcerpc_samr_AddGroupMember_done(struct tevent_req *subreq);
    5107             : 
    5108           0 : struct tevent_req *dcerpc_samr_AddGroupMember_send(TALLOC_CTX *mem_ctx,
    5109             :                                                    struct tevent_context *ev,
    5110             :                                                    struct dcerpc_binding_handle *h,
    5111             :                                                    struct policy_handle *_group_handle /* [in] [ref] */,
    5112             :                                                    uint32_t _rid /* [in]  */,
    5113             :                                                    uint32_t _flags /* [in]  */)
    5114             : {
    5115           0 :         struct tevent_req *req;
    5116           0 :         struct dcerpc_samr_AddGroupMember_state *state;
    5117           0 :         struct tevent_req *subreq;
    5118             : 
    5119           0 :         req = tevent_req_create(mem_ctx, &state,
    5120             :                                 struct dcerpc_samr_AddGroupMember_state);
    5121           0 :         if (req == NULL) {
    5122           0 :                 return NULL;
    5123             :         }
    5124           0 :         state->out_mem_ctx = NULL;
    5125             : 
    5126             :         /* In parameters */
    5127           0 :         state->orig.in.group_handle = _group_handle;
    5128           0 :         state->orig.in.rid = _rid;
    5129           0 :         state->orig.in.flags = _flags;
    5130             : 
    5131             :         /* Out parameters */
    5132             : 
    5133             :         /* Result */
    5134           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5135             : 
    5136             :         /* make a temporary copy, that we pass to the dispatch function */
    5137           0 :         state->tmp = state->orig;
    5138             : 
    5139           0 :         subreq = dcerpc_samr_AddGroupMember_r_send(state, ev, h, &state->tmp);
    5140           0 :         if (tevent_req_nomem(subreq, req)) {
    5141           0 :                 return tevent_req_post(req, ev);
    5142             :         }
    5143           0 :         tevent_req_set_callback(subreq, dcerpc_samr_AddGroupMember_done, req);
    5144           0 :         return req;
    5145             : }
    5146             : 
    5147           0 : static void dcerpc_samr_AddGroupMember_done(struct tevent_req *subreq)
    5148             : {
    5149           0 :         struct tevent_req *req = tevent_req_callback_data(
    5150             :                 subreq, struct tevent_req);
    5151           0 :         struct dcerpc_samr_AddGroupMember_state *state = tevent_req_data(
    5152             :                 req, struct dcerpc_samr_AddGroupMember_state);
    5153           0 :         NTSTATUS status;
    5154           0 :         TALLOC_CTX *mem_ctx;
    5155             : 
    5156           0 :         if (state->out_mem_ctx) {
    5157           0 :                 mem_ctx = state->out_mem_ctx;
    5158             :         } else {
    5159           0 :                 mem_ctx = state;
    5160             :         }
    5161             : 
    5162           0 :         status = dcerpc_samr_AddGroupMember_r_recv(subreq, mem_ctx);
    5163           0 :         TALLOC_FREE(subreq);
    5164           0 :         if (tevent_req_nterror(req, status)) {
    5165           0 :                 return;
    5166             :         }
    5167             : 
    5168             :         /* Copy out parameters */
    5169             : 
    5170             :         /* Copy result */
    5171           0 :         state->orig.out.result = state->tmp.out.result;
    5172             : 
    5173             :         /* Reset temporary structure */
    5174           0 :         NDR_ZERO_STRUCT(state->tmp);
    5175             : 
    5176           0 :         tevent_req_done(req);
    5177             : }
    5178             : 
    5179           0 : NTSTATUS dcerpc_samr_AddGroupMember_recv(struct tevent_req *req,
    5180             :                                          TALLOC_CTX *mem_ctx,
    5181             :                                          NTSTATUS *result)
    5182             : {
    5183           0 :         struct dcerpc_samr_AddGroupMember_state *state = tevent_req_data(
    5184             :                 req, struct dcerpc_samr_AddGroupMember_state);
    5185           0 :         NTSTATUS status;
    5186             : 
    5187           0 :         if (tevent_req_is_nterror(req, &status)) {
    5188           0 :                 tevent_req_received(req);
    5189           0 :                 return status;
    5190             :         }
    5191             : 
    5192             :         /* Steal possible out parameters to the callers context */
    5193           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5194             : 
    5195             :         /* Return result */
    5196           0 :         *result = state->orig.out.result;
    5197             : 
    5198           0 :         tevent_req_received(req);
    5199           0 :         return NT_STATUS_OK;
    5200             : }
    5201             : 
    5202          72 : NTSTATUS dcerpc_samr_AddGroupMember(struct dcerpc_binding_handle *h,
    5203             :                                     TALLOC_CTX *mem_ctx,
    5204             :                                     struct policy_handle *_group_handle /* [in] [ref] */,
    5205             :                                     uint32_t _rid /* [in]  */,
    5206             :                                     uint32_t _flags /* [in]  */,
    5207             :                                     NTSTATUS *result)
    5208             : {
    5209           0 :         struct samr_AddGroupMember r;
    5210           0 :         NTSTATUS status;
    5211             : 
    5212             :         /* In parameters */
    5213          72 :         r.in.group_handle = _group_handle;
    5214          72 :         r.in.rid = _rid;
    5215          72 :         r.in.flags = _flags;
    5216             : 
    5217             :         /* Out parameters */
    5218             : 
    5219             :         /* Result */
    5220          72 :         NDR_ZERO_STRUCT(r.out.result);
    5221             : 
    5222          72 :         status = dcerpc_samr_AddGroupMember_r(h, mem_ctx, &r);
    5223          72 :         if (!NT_STATUS_IS_OK(status)) {
    5224           0 :                 return status;
    5225             :         }
    5226             : 
    5227             :         /* Return variables */
    5228             : 
    5229             :         /* Return result */
    5230          72 :         *result = r.out.result;
    5231             : 
    5232          72 :         return NT_STATUS_OK;
    5233             : }
    5234             : 
    5235             : struct dcerpc_samr_DeleteDomainGroup_r_state {
    5236             :         TALLOC_CTX *out_mem_ctx;
    5237             : };
    5238             : 
    5239             : static void dcerpc_samr_DeleteDomainGroup_r_done(struct tevent_req *subreq);
    5240             : 
    5241           0 : struct tevent_req *dcerpc_samr_DeleteDomainGroup_r_send(TALLOC_CTX *mem_ctx,
    5242             :         struct tevent_context *ev,
    5243             :         struct dcerpc_binding_handle *h,
    5244             :         struct samr_DeleteDomainGroup *r)
    5245             : {
    5246           0 :         struct tevent_req *req;
    5247           0 :         struct dcerpc_samr_DeleteDomainGroup_r_state *state;
    5248           0 :         struct tevent_req *subreq;
    5249             : 
    5250           0 :         req = tevent_req_create(mem_ctx, &state,
    5251             :                                 struct dcerpc_samr_DeleteDomainGroup_r_state);
    5252           0 :         if (req == NULL) {
    5253           0 :                 return NULL;
    5254             :         }
    5255             : 
    5256           0 :         state->out_mem_ctx = talloc_new(state);
    5257           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5258           0 :                 return tevent_req_post(req, ev);
    5259             :         }
    5260             : 
    5261           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5262             :                         NULL, &ndr_table_samr,
    5263           0 :                         NDR_SAMR_DELETEDOMAINGROUP, state->out_mem_ctx, r);
    5264           0 :         if (tevent_req_nomem(subreq, req)) {
    5265           0 :                 return tevent_req_post(req, ev);
    5266             :         }
    5267           0 :         tevent_req_set_callback(subreq, dcerpc_samr_DeleteDomainGroup_r_done, req);
    5268             : 
    5269           0 :         return req;
    5270             : }
    5271             : 
    5272           0 : static void dcerpc_samr_DeleteDomainGroup_r_done(struct tevent_req *subreq)
    5273             : {
    5274           0 :         struct tevent_req *req =
    5275           0 :                 tevent_req_callback_data(subreq,
    5276             :                 struct tevent_req);
    5277           0 :         NTSTATUS status;
    5278             : 
    5279           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5280           0 :         TALLOC_FREE(subreq);
    5281           0 :         if (tevent_req_nterror(req, status)) {
    5282           0 :                 return;
    5283             :         }
    5284             : 
    5285           0 :         tevent_req_done(req);
    5286             : }
    5287             : 
    5288           0 : NTSTATUS dcerpc_samr_DeleteDomainGroup_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5289             : {
    5290           0 :         struct dcerpc_samr_DeleteDomainGroup_r_state *state =
    5291           0 :                 tevent_req_data(req,
    5292             :                 struct dcerpc_samr_DeleteDomainGroup_r_state);
    5293           0 :         NTSTATUS status;
    5294             : 
    5295           0 :         if (tevent_req_is_nterror(req, &status)) {
    5296           0 :                 tevent_req_received(req);
    5297           0 :                 return status;
    5298             :         }
    5299             : 
    5300           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5301             : 
    5302           0 :         tevent_req_received(req);
    5303           0 :         return NT_STATUS_OK;
    5304             : }
    5305             : 
    5306         530 : NTSTATUS dcerpc_samr_DeleteDomainGroup_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_DeleteDomainGroup *r)
    5307             : {
    5308           0 :         NTSTATUS status;
    5309             : 
    5310         530 :         status = dcerpc_binding_handle_call(h,
    5311             :                         NULL, &ndr_table_samr,
    5312             :                         NDR_SAMR_DELETEDOMAINGROUP, mem_ctx, r);
    5313             : 
    5314         530 :         return status;
    5315             : }
    5316             : 
    5317             : struct dcerpc_samr_DeleteDomainGroup_state {
    5318             :         struct samr_DeleteDomainGroup orig;
    5319             :         struct samr_DeleteDomainGroup tmp;
    5320             :         TALLOC_CTX *out_mem_ctx;
    5321             : };
    5322             : 
    5323             : static void dcerpc_samr_DeleteDomainGroup_done(struct tevent_req *subreq);
    5324             : 
    5325           0 : struct tevent_req *dcerpc_samr_DeleteDomainGroup_send(TALLOC_CTX *mem_ctx,
    5326             :                                                       struct tevent_context *ev,
    5327             :                                                       struct dcerpc_binding_handle *h,
    5328             :                                                       struct policy_handle *_group_handle /* [in,out] [ref] */)
    5329             : {
    5330           0 :         struct tevent_req *req;
    5331           0 :         struct dcerpc_samr_DeleteDomainGroup_state *state;
    5332           0 :         struct tevent_req *subreq;
    5333             : 
    5334           0 :         req = tevent_req_create(mem_ctx, &state,
    5335             :                                 struct dcerpc_samr_DeleteDomainGroup_state);
    5336           0 :         if (req == NULL) {
    5337           0 :                 return NULL;
    5338             :         }
    5339           0 :         state->out_mem_ctx = NULL;
    5340             : 
    5341             :         /* In parameters */
    5342           0 :         state->orig.in.group_handle = _group_handle;
    5343             : 
    5344             :         /* Out parameters */
    5345           0 :         state->orig.out.group_handle = _group_handle;
    5346             : 
    5347             :         /* Result */
    5348           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5349             : 
    5350           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5351             :                              "dcerpc_samr_DeleteDomainGroup_out_memory");
    5352           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5353           0 :                 return tevent_req_post(req, ev);
    5354             :         }
    5355             : 
    5356             :         /* make a temporary copy, that we pass to the dispatch function */
    5357           0 :         state->tmp = state->orig;
    5358             : 
    5359           0 :         subreq = dcerpc_samr_DeleteDomainGroup_r_send(state, ev, h, &state->tmp);
    5360           0 :         if (tevent_req_nomem(subreq, req)) {
    5361           0 :                 return tevent_req_post(req, ev);
    5362             :         }
    5363           0 :         tevent_req_set_callback(subreq, dcerpc_samr_DeleteDomainGroup_done, req);
    5364           0 :         return req;
    5365             : }
    5366             : 
    5367           0 : static void dcerpc_samr_DeleteDomainGroup_done(struct tevent_req *subreq)
    5368             : {
    5369           0 :         struct tevent_req *req = tevent_req_callback_data(
    5370             :                 subreq, struct tevent_req);
    5371           0 :         struct dcerpc_samr_DeleteDomainGroup_state *state = tevent_req_data(
    5372             :                 req, struct dcerpc_samr_DeleteDomainGroup_state);
    5373           0 :         NTSTATUS status;
    5374           0 :         TALLOC_CTX *mem_ctx;
    5375             : 
    5376           0 :         if (state->out_mem_ctx) {
    5377           0 :                 mem_ctx = state->out_mem_ctx;
    5378             :         } else {
    5379           0 :                 mem_ctx = state;
    5380             :         }
    5381             : 
    5382           0 :         status = dcerpc_samr_DeleteDomainGroup_r_recv(subreq, mem_ctx);
    5383           0 :         TALLOC_FREE(subreq);
    5384           0 :         if (tevent_req_nterror(req, status)) {
    5385           0 :                 return;
    5386             :         }
    5387             : 
    5388             :         /* Copy out parameters */
    5389           0 :         *state->orig.out.group_handle = *state->tmp.out.group_handle;
    5390             : 
    5391             :         /* Copy result */
    5392           0 :         state->orig.out.result = state->tmp.out.result;
    5393             : 
    5394             :         /* Reset temporary structure */
    5395           0 :         NDR_ZERO_STRUCT(state->tmp);
    5396             : 
    5397           0 :         tevent_req_done(req);
    5398             : }
    5399             : 
    5400           0 : NTSTATUS dcerpc_samr_DeleteDomainGroup_recv(struct tevent_req *req,
    5401             :                                             TALLOC_CTX *mem_ctx,
    5402             :                                             NTSTATUS *result)
    5403             : {
    5404           0 :         struct dcerpc_samr_DeleteDomainGroup_state *state = tevent_req_data(
    5405             :                 req, struct dcerpc_samr_DeleteDomainGroup_state);
    5406           0 :         NTSTATUS status;
    5407             : 
    5408           0 :         if (tevent_req_is_nterror(req, &status)) {
    5409           0 :                 tevent_req_received(req);
    5410           0 :                 return status;
    5411             :         }
    5412             : 
    5413             :         /* Steal possible out parameters to the callers context */
    5414           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5415             : 
    5416             :         /* Return result */
    5417           0 :         *result = state->orig.out.result;
    5418             : 
    5419           0 :         tevent_req_received(req);
    5420           0 :         return NT_STATUS_OK;
    5421             : }
    5422             : 
    5423          71 : NTSTATUS dcerpc_samr_DeleteDomainGroup(struct dcerpc_binding_handle *h,
    5424             :                                        TALLOC_CTX *mem_ctx,
    5425             :                                        struct policy_handle *_group_handle /* [in,out] [ref] */,
    5426             :                                        NTSTATUS *result)
    5427             : {
    5428           0 :         struct samr_DeleteDomainGroup r;
    5429           0 :         NTSTATUS status;
    5430             : 
    5431             :         /* In parameters */
    5432          71 :         r.in.group_handle = _group_handle;
    5433             : 
    5434             :         /* Out parameters */
    5435          71 :         r.out.group_handle = _group_handle;
    5436             : 
    5437             :         /* Result */
    5438          71 :         NDR_ZERO_STRUCT(r.out.result);
    5439             : 
    5440          71 :         status = dcerpc_samr_DeleteDomainGroup_r(h, mem_ctx, &r);
    5441          71 :         if (!NT_STATUS_IS_OK(status)) {
    5442           0 :                 return status;
    5443             :         }
    5444             : 
    5445             :         /* Return variables */
    5446          71 :         *_group_handle = *r.out.group_handle;
    5447             : 
    5448             :         /* Return result */
    5449          71 :         *result = r.out.result;
    5450             : 
    5451          71 :         return NT_STATUS_OK;
    5452             : }
    5453             : 
    5454             : struct dcerpc_samr_DeleteGroupMember_r_state {
    5455             :         TALLOC_CTX *out_mem_ctx;
    5456             : };
    5457             : 
    5458             : static void dcerpc_samr_DeleteGroupMember_r_done(struct tevent_req *subreq);
    5459             : 
    5460           0 : struct tevent_req *dcerpc_samr_DeleteGroupMember_r_send(TALLOC_CTX *mem_ctx,
    5461             :         struct tevent_context *ev,
    5462             :         struct dcerpc_binding_handle *h,
    5463             :         struct samr_DeleteGroupMember *r)
    5464             : {
    5465           0 :         struct tevent_req *req;
    5466           0 :         struct dcerpc_samr_DeleteGroupMember_r_state *state;
    5467           0 :         struct tevent_req *subreq;
    5468             : 
    5469           0 :         req = tevent_req_create(mem_ctx, &state,
    5470             :                                 struct dcerpc_samr_DeleteGroupMember_r_state);
    5471           0 :         if (req == NULL) {
    5472           0 :                 return NULL;
    5473             :         }
    5474             : 
    5475           0 :         state->out_mem_ctx = NULL;
    5476             : 
    5477           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5478             :                         NULL, &ndr_table_samr,
    5479             :                         NDR_SAMR_DELETEGROUPMEMBER, state, r);
    5480           0 :         if (tevent_req_nomem(subreq, req)) {
    5481           0 :                 return tevent_req_post(req, ev);
    5482             :         }
    5483           0 :         tevent_req_set_callback(subreq, dcerpc_samr_DeleteGroupMember_r_done, req);
    5484             : 
    5485           0 :         return req;
    5486             : }
    5487             : 
    5488           0 : static void dcerpc_samr_DeleteGroupMember_r_done(struct tevent_req *subreq)
    5489             : {
    5490           0 :         struct tevent_req *req =
    5491           0 :                 tevent_req_callback_data(subreq,
    5492             :                 struct tevent_req);
    5493           0 :         NTSTATUS status;
    5494             : 
    5495           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5496           0 :         TALLOC_FREE(subreq);
    5497           0 :         if (tevent_req_nterror(req, status)) {
    5498           0 :                 return;
    5499             :         }
    5500             : 
    5501           0 :         tevent_req_done(req);
    5502             : }
    5503             : 
    5504           0 : NTSTATUS dcerpc_samr_DeleteGroupMember_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5505             : {
    5506           0 :         struct dcerpc_samr_DeleteGroupMember_r_state *state =
    5507           0 :                 tevent_req_data(req,
    5508             :                 struct dcerpc_samr_DeleteGroupMember_r_state);
    5509           0 :         NTSTATUS status;
    5510             : 
    5511           0 :         if (tevent_req_is_nterror(req, &status)) {
    5512           0 :                 tevent_req_received(req);
    5513           0 :                 return status;
    5514             :         }
    5515             : 
    5516           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5517             : 
    5518           0 :         tevent_req_received(req);
    5519           0 :         return NT_STATUS_OK;
    5520             : }
    5521             : 
    5522          81 : NTSTATUS dcerpc_samr_DeleteGroupMember_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_DeleteGroupMember *r)
    5523             : {
    5524           0 :         NTSTATUS status;
    5525             : 
    5526          81 :         status = dcerpc_binding_handle_call(h,
    5527             :                         NULL, &ndr_table_samr,
    5528             :                         NDR_SAMR_DELETEGROUPMEMBER, mem_ctx, r);
    5529             : 
    5530          81 :         return status;
    5531             : }
    5532             : 
    5533             : struct dcerpc_samr_DeleteGroupMember_state {
    5534             :         struct samr_DeleteGroupMember orig;
    5535             :         struct samr_DeleteGroupMember tmp;
    5536             :         TALLOC_CTX *out_mem_ctx;
    5537             : };
    5538             : 
    5539             : static void dcerpc_samr_DeleteGroupMember_done(struct tevent_req *subreq);
    5540             : 
    5541           0 : struct tevent_req *dcerpc_samr_DeleteGroupMember_send(TALLOC_CTX *mem_ctx,
    5542             :                                                       struct tevent_context *ev,
    5543             :                                                       struct dcerpc_binding_handle *h,
    5544             :                                                       struct policy_handle *_group_handle /* [in] [ref] */,
    5545             :                                                       uint32_t _rid /* [in]  */)
    5546             : {
    5547           0 :         struct tevent_req *req;
    5548           0 :         struct dcerpc_samr_DeleteGroupMember_state *state;
    5549           0 :         struct tevent_req *subreq;
    5550             : 
    5551           0 :         req = tevent_req_create(mem_ctx, &state,
    5552             :                                 struct dcerpc_samr_DeleteGroupMember_state);
    5553           0 :         if (req == NULL) {
    5554           0 :                 return NULL;
    5555             :         }
    5556           0 :         state->out_mem_ctx = NULL;
    5557             : 
    5558             :         /* In parameters */
    5559           0 :         state->orig.in.group_handle = _group_handle;
    5560           0 :         state->orig.in.rid = _rid;
    5561             : 
    5562             :         /* Out parameters */
    5563             : 
    5564             :         /* Result */
    5565           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5566             : 
    5567             :         /* make a temporary copy, that we pass to the dispatch function */
    5568           0 :         state->tmp = state->orig;
    5569             : 
    5570           0 :         subreq = dcerpc_samr_DeleteGroupMember_r_send(state, ev, h, &state->tmp);
    5571           0 :         if (tevent_req_nomem(subreq, req)) {
    5572           0 :                 return tevent_req_post(req, ev);
    5573             :         }
    5574           0 :         tevent_req_set_callback(subreq, dcerpc_samr_DeleteGroupMember_done, req);
    5575           0 :         return req;
    5576             : }
    5577             : 
    5578           0 : static void dcerpc_samr_DeleteGroupMember_done(struct tevent_req *subreq)
    5579             : {
    5580           0 :         struct tevent_req *req = tevent_req_callback_data(
    5581             :                 subreq, struct tevent_req);
    5582           0 :         struct dcerpc_samr_DeleteGroupMember_state *state = tevent_req_data(
    5583             :                 req, struct dcerpc_samr_DeleteGroupMember_state);
    5584           0 :         NTSTATUS status;
    5585           0 :         TALLOC_CTX *mem_ctx;
    5586             : 
    5587           0 :         if (state->out_mem_ctx) {
    5588           0 :                 mem_ctx = state->out_mem_ctx;
    5589             :         } else {
    5590           0 :                 mem_ctx = state;
    5591             :         }
    5592             : 
    5593           0 :         status = dcerpc_samr_DeleteGroupMember_r_recv(subreq, mem_ctx);
    5594           0 :         TALLOC_FREE(subreq);
    5595           0 :         if (tevent_req_nterror(req, status)) {
    5596           0 :                 return;
    5597             :         }
    5598             : 
    5599             :         /* Copy out parameters */
    5600             : 
    5601             :         /* Copy result */
    5602           0 :         state->orig.out.result = state->tmp.out.result;
    5603             : 
    5604             :         /* Reset temporary structure */
    5605           0 :         NDR_ZERO_STRUCT(state->tmp);
    5606             : 
    5607           0 :         tevent_req_done(req);
    5608             : }
    5609             : 
    5610           0 : NTSTATUS dcerpc_samr_DeleteGroupMember_recv(struct tevent_req *req,
    5611             :                                             TALLOC_CTX *mem_ctx,
    5612             :                                             NTSTATUS *result)
    5613             : {
    5614           0 :         struct dcerpc_samr_DeleteGroupMember_state *state = tevent_req_data(
    5615             :                 req, struct dcerpc_samr_DeleteGroupMember_state);
    5616           0 :         NTSTATUS status;
    5617             : 
    5618           0 :         if (tevent_req_is_nterror(req, &status)) {
    5619           0 :                 tevent_req_received(req);
    5620           0 :                 return status;
    5621             :         }
    5622             : 
    5623             :         /* Steal possible out parameters to the callers context */
    5624           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5625             : 
    5626             :         /* Return result */
    5627           0 :         *result = state->orig.out.result;
    5628             : 
    5629           0 :         tevent_req_received(req);
    5630           0 :         return NT_STATUS_OK;
    5631             : }
    5632             : 
    5633          71 : NTSTATUS dcerpc_samr_DeleteGroupMember(struct dcerpc_binding_handle *h,
    5634             :                                        TALLOC_CTX *mem_ctx,
    5635             :                                        struct policy_handle *_group_handle /* [in] [ref] */,
    5636             :                                        uint32_t _rid /* [in]  */,
    5637             :                                        NTSTATUS *result)
    5638             : {
    5639           0 :         struct samr_DeleteGroupMember r;
    5640           0 :         NTSTATUS status;
    5641             : 
    5642             :         /* In parameters */
    5643          71 :         r.in.group_handle = _group_handle;
    5644          71 :         r.in.rid = _rid;
    5645             : 
    5646             :         /* Out parameters */
    5647             : 
    5648             :         /* Result */
    5649          71 :         NDR_ZERO_STRUCT(r.out.result);
    5650             : 
    5651          71 :         status = dcerpc_samr_DeleteGroupMember_r(h, mem_ctx, &r);
    5652          71 :         if (!NT_STATUS_IS_OK(status)) {
    5653           0 :                 return status;
    5654             :         }
    5655             : 
    5656             :         /* Return variables */
    5657             : 
    5658             :         /* Return result */
    5659          71 :         *result = r.out.result;
    5660             : 
    5661          71 :         return NT_STATUS_OK;
    5662             : }
    5663             : 
    5664             : struct dcerpc_samr_QueryGroupMember_r_state {
    5665             :         TALLOC_CTX *out_mem_ctx;
    5666             : };
    5667             : 
    5668             : static void dcerpc_samr_QueryGroupMember_r_done(struct tevent_req *subreq);
    5669             : 
    5670           0 : struct tevent_req *dcerpc_samr_QueryGroupMember_r_send(TALLOC_CTX *mem_ctx,
    5671             :         struct tevent_context *ev,
    5672             :         struct dcerpc_binding_handle *h,
    5673             :         struct samr_QueryGroupMember *r)
    5674             : {
    5675           0 :         struct tevent_req *req;
    5676           0 :         struct dcerpc_samr_QueryGroupMember_r_state *state;
    5677           0 :         struct tevent_req *subreq;
    5678             : 
    5679           0 :         req = tevent_req_create(mem_ctx, &state,
    5680             :                                 struct dcerpc_samr_QueryGroupMember_r_state);
    5681           0 :         if (req == NULL) {
    5682           0 :                 return NULL;
    5683             :         }
    5684             : 
    5685           0 :         state->out_mem_ctx = talloc_new(state);
    5686           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5687           0 :                 return tevent_req_post(req, ev);
    5688             :         }
    5689             : 
    5690           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5691             :                         NULL, &ndr_table_samr,
    5692           0 :                         NDR_SAMR_QUERYGROUPMEMBER, state->out_mem_ctx, r);
    5693           0 :         if (tevent_req_nomem(subreq, req)) {
    5694           0 :                 return tevent_req_post(req, ev);
    5695             :         }
    5696           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryGroupMember_r_done, req);
    5697             : 
    5698           0 :         return req;
    5699             : }
    5700             : 
    5701           0 : static void dcerpc_samr_QueryGroupMember_r_done(struct tevent_req *subreq)
    5702             : {
    5703           0 :         struct tevent_req *req =
    5704           0 :                 tevent_req_callback_data(subreq,
    5705             :                 struct tevent_req);
    5706           0 :         NTSTATUS status;
    5707             : 
    5708           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5709           0 :         TALLOC_FREE(subreq);
    5710           0 :         if (tevent_req_nterror(req, status)) {
    5711           0 :                 return;
    5712             :         }
    5713             : 
    5714           0 :         tevent_req_done(req);
    5715             : }
    5716             : 
    5717           0 : NTSTATUS dcerpc_samr_QueryGroupMember_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5718             : {
    5719           0 :         struct dcerpc_samr_QueryGroupMember_r_state *state =
    5720           0 :                 tevent_req_data(req,
    5721             :                 struct dcerpc_samr_QueryGroupMember_r_state);
    5722           0 :         NTSTATUS status;
    5723             : 
    5724           0 :         if (tevent_req_is_nterror(req, &status)) {
    5725           0 :                 tevent_req_received(req);
    5726           0 :                 return status;
    5727             :         }
    5728             : 
    5729           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5730             : 
    5731           0 :         tevent_req_received(req);
    5732           0 :         return NT_STATUS_OK;
    5733             : }
    5734             : 
    5735         478 : NTSTATUS dcerpc_samr_QueryGroupMember_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_QueryGroupMember *r)
    5736             : {
    5737           0 :         NTSTATUS status;
    5738             : 
    5739         478 :         status = dcerpc_binding_handle_call(h,
    5740             :                         NULL, &ndr_table_samr,
    5741             :                         NDR_SAMR_QUERYGROUPMEMBER, mem_ctx, r);
    5742             : 
    5743         478 :         return status;
    5744             : }
    5745             : 
    5746             : struct dcerpc_samr_QueryGroupMember_state {
    5747             :         struct samr_QueryGroupMember orig;
    5748             :         struct samr_QueryGroupMember tmp;
    5749             :         TALLOC_CTX *out_mem_ctx;
    5750             : };
    5751             : 
    5752             : static void dcerpc_samr_QueryGroupMember_done(struct tevent_req *subreq);
    5753             : 
    5754           0 : struct tevent_req *dcerpc_samr_QueryGroupMember_send(TALLOC_CTX *mem_ctx,
    5755             :                                                      struct tevent_context *ev,
    5756             :                                                      struct dcerpc_binding_handle *h,
    5757             :                                                      struct policy_handle *_group_handle /* [in] [ref] */,
    5758             :                                                      struct samr_RidAttrArray **_rids /* [out] [ref] */)
    5759             : {
    5760           0 :         struct tevent_req *req;
    5761           0 :         struct dcerpc_samr_QueryGroupMember_state *state;
    5762           0 :         struct tevent_req *subreq;
    5763             : 
    5764           0 :         req = tevent_req_create(mem_ctx, &state,
    5765             :                                 struct dcerpc_samr_QueryGroupMember_state);
    5766           0 :         if (req == NULL) {
    5767           0 :                 return NULL;
    5768             :         }
    5769           0 :         state->out_mem_ctx = NULL;
    5770             : 
    5771             :         /* In parameters */
    5772           0 :         state->orig.in.group_handle = _group_handle;
    5773             : 
    5774             :         /* Out parameters */
    5775           0 :         state->orig.out.rids = _rids;
    5776             : 
    5777             :         /* Result */
    5778           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5779             : 
    5780           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5781             :                              "dcerpc_samr_QueryGroupMember_out_memory");
    5782           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5783           0 :                 return tevent_req_post(req, ev);
    5784             :         }
    5785             : 
    5786             :         /* make a temporary copy, that we pass to the dispatch function */
    5787           0 :         state->tmp = state->orig;
    5788             : 
    5789           0 :         subreq = dcerpc_samr_QueryGroupMember_r_send(state, ev, h, &state->tmp);
    5790           0 :         if (tevent_req_nomem(subreq, req)) {
    5791           0 :                 return tevent_req_post(req, ev);
    5792             :         }
    5793           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryGroupMember_done, req);
    5794           0 :         return req;
    5795             : }
    5796             : 
    5797           0 : static void dcerpc_samr_QueryGroupMember_done(struct tevent_req *subreq)
    5798             : {
    5799           0 :         struct tevent_req *req = tevent_req_callback_data(
    5800             :                 subreq, struct tevent_req);
    5801           0 :         struct dcerpc_samr_QueryGroupMember_state *state = tevent_req_data(
    5802             :                 req, struct dcerpc_samr_QueryGroupMember_state);
    5803           0 :         NTSTATUS status;
    5804           0 :         TALLOC_CTX *mem_ctx;
    5805             : 
    5806           0 :         if (state->out_mem_ctx) {
    5807           0 :                 mem_ctx = state->out_mem_ctx;
    5808             :         } else {
    5809           0 :                 mem_ctx = state;
    5810             :         }
    5811             : 
    5812           0 :         status = dcerpc_samr_QueryGroupMember_r_recv(subreq, mem_ctx);
    5813           0 :         TALLOC_FREE(subreq);
    5814           0 :         if (tevent_req_nterror(req, status)) {
    5815           0 :                 return;
    5816             :         }
    5817             : 
    5818             :         /* Copy out parameters */
    5819           0 :         *state->orig.out.rids = *state->tmp.out.rids;
    5820             : 
    5821             :         /* Copy result */
    5822           0 :         state->orig.out.result = state->tmp.out.result;
    5823             : 
    5824             :         /* Reset temporary structure */
    5825           0 :         NDR_ZERO_STRUCT(state->tmp);
    5826             : 
    5827           0 :         tevent_req_done(req);
    5828             : }
    5829             : 
    5830           0 : NTSTATUS dcerpc_samr_QueryGroupMember_recv(struct tevent_req *req,
    5831             :                                            TALLOC_CTX *mem_ctx,
    5832             :                                            NTSTATUS *result)
    5833             : {
    5834           0 :         struct dcerpc_samr_QueryGroupMember_state *state = tevent_req_data(
    5835             :                 req, struct dcerpc_samr_QueryGroupMember_state);
    5836           0 :         NTSTATUS status;
    5837             : 
    5838           0 :         if (tevent_req_is_nterror(req, &status)) {
    5839           0 :                 tevent_req_received(req);
    5840           0 :                 return status;
    5841             :         }
    5842             : 
    5843             :         /* Steal possible out parameters to the callers context */
    5844           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5845             : 
    5846             :         /* Return result */
    5847           0 :         *result = state->orig.out.result;
    5848             : 
    5849           0 :         tevent_req_received(req);
    5850           0 :         return NT_STATUS_OK;
    5851             : }
    5852             : 
    5853          78 : NTSTATUS dcerpc_samr_QueryGroupMember(struct dcerpc_binding_handle *h,
    5854             :                                       TALLOC_CTX *mem_ctx,
    5855             :                                       struct policy_handle *_group_handle /* [in] [ref] */,
    5856             :                                       struct samr_RidAttrArray **_rids /* [out] [ref] */,
    5857             :                                       NTSTATUS *result)
    5858             : {
    5859           0 :         struct samr_QueryGroupMember r;
    5860           0 :         NTSTATUS status;
    5861             : 
    5862             :         /* In parameters */
    5863          78 :         r.in.group_handle = _group_handle;
    5864             : 
    5865             :         /* Out parameters */
    5866          78 :         r.out.rids = _rids;
    5867             : 
    5868             :         /* Result */
    5869          78 :         NDR_ZERO_STRUCT(r.out.result);
    5870             : 
    5871          78 :         status = dcerpc_samr_QueryGroupMember_r(h, mem_ctx, &r);
    5872          78 :         if (!NT_STATUS_IS_OK(status)) {
    5873           0 :                 return status;
    5874             :         }
    5875             : 
    5876             :         /* Return variables */
    5877          78 :         *_rids = *r.out.rids;
    5878             : 
    5879             :         /* Return result */
    5880          78 :         *result = r.out.result;
    5881             : 
    5882          78 :         return NT_STATUS_OK;
    5883             : }
    5884             : 
    5885             : struct dcerpc_samr_SetMemberAttributesOfGroup_r_state {
    5886             :         TALLOC_CTX *out_mem_ctx;
    5887             : };
    5888             : 
    5889             : static void dcerpc_samr_SetMemberAttributesOfGroup_r_done(struct tevent_req *subreq);
    5890             : 
    5891           0 : struct tevent_req *dcerpc_samr_SetMemberAttributesOfGroup_r_send(TALLOC_CTX *mem_ctx,
    5892             :         struct tevent_context *ev,
    5893             :         struct dcerpc_binding_handle *h,
    5894             :         struct samr_SetMemberAttributesOfGroup *r)
    5895             : {
    5896           0 :         struct tevent_req *req;
    5897           0 :         struct dcerpc_samr_SetMemberAttributesOfGroup_r_state *state;
    5898           0 :         struct tevent_req *subreq;
    5899             : 
    5900           0 :         req = tevent_req_create(mem_ctx, &state,
    5901             :                                 struct dcerpc_samr_SetMemberAttributesOfGroup_r_state);
    5902           0 :         if (req == NULL) {
    5903           0 :                 return NULL;
    5904             :         }
    5905             : 
    5906           0 :         state->out_mem_ctx = NULL;
    5907             : 
    5908           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5909             :                         NULL, &ndr_table_samr,
    5910             :                         NDR_SAMR_SETMEMBERATTRIBUTESOFGROUP, state, r);
    5911           0 :         if (tevent_req_nomem(subreq, req)) {
    5912           0 :                 return tevent_req_post(req, ev);
    5913             :         }
    5914           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetMemberAttributesOfGroup_r_done, req);
    5915             : 
    5916           0 :         return req;
    5917             : }
    5918             : 
    5919           0 : static void dcerpc_samr_SetMemberAttributesOfGroup_r_done(struct tevent_req *subreq)
    5920             : {
    5921           0 :         struct tevent_req *req =
    5922           0 :                 tevent_req_callback_data(subreq,
    5923             :                 struct tevent_req);
    5924           0 :         NTSTATUS status;
    5925             : 
    5926           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5927           0 :         TALLOC_FREE(subreq);
    5928           0 :         if (tevent_req_nterror(req, status)) {
    5929           0 :                 return;
    5930             :         }
    5931             : 
    5932           0 :         tevent_req_done(req);
    5933             : }
    5934             : 
    5935           0 : NTSTATUS dcerpc_samr_SetMemberAttributesOfGroup_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5936             : {
    5937           0 :         struct dcerpc_samr_SetMemberAttributesOfGroup_r_state *state =
    5938           0 :                 tevent_req_data(req,
    5939             :                 struct dcerpc_samr_SetMemberAttributesOfGroup_r_state);
    5940           0 :         NTSTATUS status;
    5941             : 
    5942           0 :         if (tevent_req_is_nterror(req, &status)) {
    5943           0 :                 tevent_req_received(req);
    5944           0 :                 return status;
    5945             :         }
    5946             : 
    5947           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5948             : 
    5949           0 :         tevent_req_received(req);
    5950           0 :         return NT_STATUS_OK;
    5951             : }
    5952             : 
    5953           0 : NTSTATUS dcerpc_samr_SetMemberAttributesOfGroup_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_SetMemberAttributesOfGroup *r)
    5954             : {
    5955           0 :         NTSTATUS status;
    5956             : 
    5957           0 :         status = dcerpc_binding_handle_call(h,
    5958             :                         NULL, &ndr_table_samr,
    5959             :                         NDR_SAMR_SETMEMBERATTRIBUTESOFGROUP, mem_ctx, r);
    5960             : 
    5961           0 :         return status;
    5962             : }
    5963             : 
    5964             : struct dcerpc_samr_SetMemberAttributesOfGroup_state {
    5965             :         struct samr_SetMemberAttributesOfGroup orig;
    5966             :         struct samr_SetMemberAttributesOfGroup tmp;
    5967             :         TALLOC_CTX *out_mem_ctx;
    5968             : };
    5969             : 
    5970             : static void dcerpc_samr_SetMemberAttributesOfGroup_done(struct tevent_req *subreq);
    5971             : 
    5972           0 : struct tevent_req *dcerpc_samr_SetMemberAttributesOfGroup_send(TALLOC_CTX *mem_ctx,
    5973             :                                                                struct tevent_context *ev,
    5974             :                                                                struct dcerpc_binding_handle *h,
    5975             :                                                                struct policy_handle *_group_handle /* [in] [ref] */,
    5976             :                                                                uint32_t _unknown1 /* [in]  */,
    5977             :                                                                uint32_t _unknown2 /* [in]  */)
    5978             : {
    5979           0 :         struct tevent_req *req;
    5980           0 :         struct dcerpc_samr_SetMemberAttributesOfGroup_state *state;
    5981           0 :         struct tevent_req *subreq;
    5982             : 
    5983           0 :         req = tevent_req_create(mem_ctx, &state,
    5984             :                                 struct dcerpc_samr_SetMemberAttributesOfGroup_state);
    5985           0 :         if (req == NULL) {
    5986           0 :                 return NULL;
    5987             :         }
    5988           0 :         state->out_mem_ctx = NULL;
    5989             : 
    5990             :         /* In parameters */
    5991           0 :         state->orig.in.group_handle = _group_handle;
    5992           0 :         state->orig.in.unknown1 = _unknown1;
    5993           0 :         state->orig.in.unknown2 = _unknown2;
    5994             : 
    5995             :         /* Out parameters */
    5996             : 
    5997             :         /* Result */
    5998           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5999             : 
    6000             :         /* make a temporary copy, that we pass to the dispatch function */
    6001           0 :         state->tmp = state->orig;
    6002             : 
    6003           0 :         subreq = dcerpc_samr_SetMemberAttributesOfGroup_r_send(state, ev, h, &state->tmp);
    6004           0 :         if (tevent_req_nomem(subreq, req)) {
    6005           0 :                 return tevent_req_post(req, ev);
    6006             :         }
    6007           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetMemberAttributesOfGroup_done, req);
    6008           0 :         return req;
    6009             : }
    6010             : 
    6011           0 : static void dcerpc_samr_SetMemberAttributesOfGroup_done(struct tevent_req *subreq)
    6012             : {
    6013           0 :         struct tevent_req *req = tevent_req_callback_data(
    6014             :                 subreq, struct tevent_req);
    6015           0 :         struct dcerpc_samr_SetMemberAttributesOfGroup_state *state = tevent_req_data(
    6016             :                 req, struct dcerpc_samr_SetMemberAttributesOfGroup_state);
    6017           0 :         NTSTATUS status;
    6018           0 :         TALLOC_CTX *mem_ctx;
    6019             : 
    6020           0 :         if (state->out_mem_ctx) {
    6021           0 :                 mem_ctx = state->out_mem_ctx;
    6022             :         } else {
    6023           0 :                 mem_ctx = state;
    6024             :         }
    6025             : 
    6026           0 :         status = dcerpc_samr_SetMemberAttributesOfGroup_r_recv(subreq, mem_ctx);
    6027           0 :         TALLOC_FREE(subreq);
    6028           0 :         if (tevent_req_nterror(req, status)) {
    6029           0 :                 return;
    6030             :         }
    6031             : 
    6032             :         /* Copy out parameters */
    6033             : 
    6034             :         /* Copy result */
    6035           0 :         state->orig.out.result = state->tmp.out.result;
    6036             : 
    6037             :         /* Reset temporary structure */
    6038           0 :         NDR_ZERO_STRUCT(state->tmp);
    6039             : 
    6040           0 :         tevent_req_done(req);
    6041             : }
    6042             : 
    6043           0 : NTSTATUS dcerpc_samr_SetMemberAttributesOfGroup_recv(struct tevent_req *req,
    6044             :                                                      TALLOC_CTX *mem_ctx,
    6045             :                                                      NTSTATUS *result)
    6046             : {
    6047           0 :         struct dcerpc_samr_SetMemberAttributesOfGroup_state *state = tevent_req_data(
    6048             :                 req, struct dcerpc_samr_SetMemberAttributesOfGroup_state);
    6049           0 :         NTSTATUS status;
    6050             : 
    6051           0 :         if (tevent_req_is_nterror(req, &status)) {
    6052           0 :                 tevent_req_received(req);
    6053           0 :                 return status;
    6054             :         }
    6055             : 
    6056             :         /* Steal possible out parameters to the callers context */
    6057           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6058             : 
    6059             :         /* Return result */
    6060           0 :         *result = state->orig.out.result;
    6061             : 
    6062           0 :         tevent_req_received(req);
    6063           0 :         return NT_STATUS_OK;
    6064             : }
    6065             : 
    6066           0 : NTSTATUS dcerpc_samr_SetMemberAttributesOfGroup(struct dcerpc_binding_handle *h,
    6067             :                                                 TALLOC_CTX *mem_ctx,
    6068             :                                                 struct policy_handle *_group_handle /* [in] [ref] */,
    6069             :                                                 uint32_t _unknown1 /* [in]  */,
    6070             :                                                 uint32_t _unknown2 /* [in]  */,
    6071             :                                                 NTSTATUS *result)
    6072             : {
    6073           0 :         struct samr_SetMemberAttributesOfGroup r;
    6074           0 :         NTSTATUS status;
    6075             : 
    6076             :         /* In parameters */
    6077           0 :         r.in.group_handle = _group_handle;
    6078           0 :         r.in.unknown1 = _unknown1;
    6079           0 :         r.in.unknown2 = _unknown2;
    6080             : 
    6081             :         /* Out parameters */
    6082             : 
    6083             :         /* Result */
    6084           0 :         NDR_ZERO_STRUCT(r.out.result);
    6085             : 
    6086           0 :         status = dcerpc_samr_SetMemberAttributesOfGroup_r(h, mem_ctx, &r);
    6087           0 :         if (!NT_STATUS_IS_OK(status)) {
    6088           0 :                 return status;
    6089             :         }
    6090             : 
    6091             :         /* Return variables */
    6092             : 
    6093             :         /* Return result */
    6094           0 :         *result = r.out.result;
    6095             : 
    6096           0 :         return NT_STATUS_OK;
    6097             : }
    6098             : 
    6099             : struct dcerpc_samr_OpenAlias_r_state {
    6100             :         TALLOC_CTX *out_mem_ctx;
    6101             : };
    6102             : 
    6103             : static void dcerpc_samr_OpenAlias_r_done(struct tevent_req *subreq);
    6104             : 
    6105           0 : struct tevent_req *dcerpc_samr_OpenAlias_r_send(TALLOC_CTX *mem_ctx,
    6106             :         struct tevent_context *ev,
    6107             :         struct dcerpc_binding_handle *h,
    6108             :         struct samr_OpenAlias *r)
    6109             : {
    6110           0 :         struct tevent_req *req;
    6111           0 :         struct dcerpc_samr_OpenAlias_r_state *state;
    6112           0 :         struct tevent_req *subreq;
    6113             : 
    6114           0 :         req = tevent_req_create(mem_ctx, &state,
    6115             :                                 struct dcerpc_samr_OpenAlias_r_state);
    6116           0 :         if (req == NULL) {
    6117           0 :                 return NULL;
    6118             :         }
    6119             : 
    6120           0 :         state->out_mem_ctx = talloc_new(state);
    6121           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6122           0 :                 return tevent_req_post(req, ev);
    6123             :         }
    6124             : 
    6125           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6126             :                         NULL, &ndr_table_samr,
    6127           0 :                         NDR_SAMR_OPENALIAS, state->out_mem_ctx, r);
    6128           0 :         if (tevent_req_nomem(subreq, req)) {
    6129           0 :                 return tevent_req_post(req, ev);
    6130             :         }
    6131           0 :         tevent_req_set_callback(subreq, dcerpc_samr_OpenAlias_r_done, req);
    6132             : 
    6133           0 :         return req;
    6134             : }
    6135             : 
    6136           0 : static void dcerpc_samr_OpenAlias_r_done(struct tevent_req *subreq)
    6137             : {
    6138           0 :         struct tevent_req *req =
    6139           0 :                 tevent_req_callback_data(subreq,
    6140             :                 struct tevent_req);
    6141           0 :         NTSTATUS status;
    6142             : 
    6143           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6144           0 :         TALLOC_FREE(subreq);
    6145           0 :         if (tevent_req_nterror(req, status)) {
    6146           0 :                 return;
    6147             :         }
    6148             : 
    6149           0 :         tevent_req_done(req);
    6150             : }
    6151             : 
    6152           0 : NTSTATUS dcerpc_samr_OpenAlias_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6153             : {
    6154           0 :         struct dcerpc_samr_OpenAlias_r_state *state =
    6155           0 :                 tevent_req_data(req,
    6156             :                 struct dcerpc_samr_OpenAlias_r_state);
    6157           0 :         NTSTATUS status;
    6158             : 
    6159           0 :         if (tevent_req_is_nterror(req, &status)) {
    6160           0 :                 tevent_req_received(req);
    6161           0 :                 return status;
    6162             :         }
    6163             : 
    6164           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6165             : 
    6166           0 :         tevent_req_received(req);
    6167           0 :         return NT_STATUS_OK;
    6168             : }
    6169             : 
    6170        1311 : NTSTATUS dcerpc_samr_OpenAlias_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_OpenAlias *r)
    6171             : {
    6172           0 :         NTSTATUS status;
    6173             : 
    6174        1311 :         status = dcerpc_binding_handle_call(h,
    6175             :                         NULL, &ndr_table_samr,
    6176             :                         NDR_SAMR_OPENALIAS, mem_ctx, r);
    6177             : 
    6178        1311 :         return status;
    6179             : }
    6180             : 
    6181             : struct dcerpc_samr_OpenAlias_state {
    6182             :         struct samr_OpenAlias orig;
    6183             :         struct samr_OpenAlias tmp;
    6184             :         TALLOC_CTX *out_mem_ctx;
    6185             : };
    6186             : 
    6187             : static void dcerpc_samr_OpenAlias_done(struct tevent_req *subreq);
    6188             : 
    6189           0 : struct tevent_req *dcerpc_samr_OpenAlias_send(TALLOC_CTX *mem_ctx,
    6190             :                                               struct tevent_context *ev,
    6191             :                                               struct dcerpc_binding_handle *h,
    6192             :                                               struct policy_handle *_domain_handle /* [in] [ref] */,
    6193             :                                               uint32_t _access_mask /* [in]  */,
    6194             :                                               uint32_t _rid /* [in]  */,
    6195             :                                               struct policy_handle *_alias_handle /* [out] [ref] */)
    6196             : {
    6197           0 :         struct tevent_req *req;
    6198           0 :         struct dcerpc_samr_OpenAlias_state *state;
    6199           0 :         struct tevent_req *subreq;
    6200             : 
    6201           0 :         req = tevent_req_create(mem_ctx, &state,
    6202             :                                 struct dcerpc_samr_OpenAlias_state);
    6203           0 :         if (req == NULL) {
    6204           0 :                 return NULL;
    6205             :         }
    6206           0 :         state->out_mem_ctx = NULL;
    6207             : 
    6208             :         /* In parameters */
    6209           0 :         state->orig.in.domain_handle = _domain_handle;
    6210           0 :         state->orig.in.access_mask = _access_mask;
    6211           0 :         state->orig.in.rid = _rid;
    6212             : 
    6213             :         /* Out parameters */
    6214           0 :         state->orig.out.alias_handle = _alias_handle;
    6215             : 
    6216             :         /* Result */
    6217           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6218             : 
    6219           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6220             :                              "dcerpc_samr_OpenAlias_out_memory");
    6221           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6222           0 :                 return tevent_req_post(req, ev);
    6223             :         }
    6224             : 
    6225             :         /* make a temporary copy, that we pass to the dispatch function */
    6226           0 :         state->tmp = state->orig;
    6227             : 
    6228           0 :         subreq = dcerpc_samr_OpenAlias_r_send(state, ev, h, &state->tmp);
    6229           0 :         if (tevent_req_nomem(subreq, req)) {
    6230           0 :                 return tevent_req_post(req, ev);
    6231             :         }
    6232           0 :         tevent_req_set_callback(subreq, dcerpc_samr_OpenAlias_done, req);
    6233           0 :         return req;
    6234             : }
    6235             : 
    6236           0 : static void dcerpc_samr_OpenAlias_done(struct tevent_req *subreq)
    6237             : {
    6238           0 :         struct tevent_req *req = tevent_req_callback_data(
    6239             :                 subreq, struct tevent_req);
    6240           0 :         struct dcerpc_samr_OpenAlias_state *state = tevent_req_data(
    6241             :                 req, struct dcerpc_samr_OpenAlias_state);
    6242           0 :         NTSTATUS status;
    6243           0 :         TALLOC_CTX *mem_ctx;
    6244             : 
    6245           0 :         if (state->out_mem_ctx) {
    6246           0 :                 mem_ctx = state->out_mem_ctx;
    6247             :         } else {
    6248           0 :                 mem_ctx = state;
    6249             :         }
    6250             : 
    6251           0 :         status = dcerpc_samr_OpenAlias_r_recv(subreq, mem_ctx);
    6252           0 :         TALLOC_FREE(subreq);
    6253           0 :         if (tevent_req_nterror(req, status)) {
    6254           0 :                 return;
    6255             :         }
    6256             : 
    6257             :         /* Copy out parameters */
    6258           0 :         *state->orig.out.alias_handle = *state->tmp.out.alias_handle;
    6259             : 
    6260             :         /* Copy result */
    6261           0 :         state->orig.out.result = state->tmp.out.result;
    6262             : 
    6263             :         /* Reset temporary structure */
    6264           0 :         NDR_ZERO_STRUCT(state->tmp);
    6265             : 
    6266           0 :         tevent_req_done(req);
    6267             : }
    6268             : 
    6269           0 : NTSTATUS dcerpc_samr_OpenAlias_recv(struct tevent_req *req,
    6270             :                                     TALLOC_CTX *mem_ctx,
    6271             :                                     NTSTATUS *result)
    6272             : {
    6273           0 :         struct dcerpc_samr_OpenAlias_state *state = tevent_req_data(
    6274             :                 req, struct dcerpc_samr_OpenAlias_state);
    6275           0 :         NTSTATUS status;
    6276             : 
    6277           0 :         if (tevent_req_is_nterror(req, &status)) {
    6278           0 :                 tevent_req_received(req);
    6279           0 :                 return status;
    6280             :         }
    6281             : 
    6282             :         /* Steal possible out parameters to the callers context */
    6283           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6284             : 
    6285             :         /* Return result */
    6286           0 :         *result = state->orig.out.result;
    6287             : 
    6288           0 :         tevent_req_received(req);
    6289           0 :         return NT_STATUS_OK;
    6290             : }
    6291             : 
    6292        1224 : NTSTATUS dcerpc_samr_OpenAlias(struct dcerpc_binding_handle *h,
    6293             :                                TALLOC_CTX *mem_ctx,
    6294             :                                struct policy_handle *_domain_handle /* [in] [ref] */,
    6295             :                                uint32_t _access_mask /* [in]  */,
    6296             :                                uint32_t _rid /* [in]  */,
    6297             :                                struct policy_handle *_alias_handle /* [out] [ref] */,
    6298             :                                NTSTATUS *result)
    6299             : {
    6300           0 :         struct samr_OpenAlias r;
    6301           0 :         NTSTATUS status;
    6302             : 
    6303             :         /* In parameters */
    6304        1224 :         r.in.domain_handle = _domain_handle;
    6305        1224 :         r.in.access_mask = _access_mask;
    6306        1224 :         r.in.rid = _rid;
    6307             : 
    6308             :         /* Out parameters */
    6309        1224 :         r.out.alias_handle = _alias_handle;
    6310             : 
    6311             :         /* Result */
    6312        1224 :         NDR_ZERO_STRUCT(r.out.result);
    6313             : 
    6314        1224 :         status = dcerpc_samr_OpenAlias_r(h, mem_ctx, &r);
    6315        1224 :         if (!NT_STATUS_IS_OK(status)) {
    6316           0 :                 return status;
    6317             :         }
    6318             : 
    6319             :         /* Return variables */
    6320        1224 :         *_alias_handle = *r.out.alias_handle;
    6321             : 
    6322             :         /* Return result */
    6323        1224 :         *result = r.out.result;
    6324             : 
    6325        1224 :         return NT_STATUS_OK;
    6326             : }
    6327             : 
    6328             : struct dcerpc_samr_QueryAliasInfo_r_state {
    6329             :         TALLOC_CTX *out_mem_ctx;
    6330             : };
    6331             : 
    6332             : static void dcerpc_samr_QueryAliasInfo_r_done(struct tevent_req *subreq);
    6333             : 
    6334           0 : struct tevent_req *dcerpc_samr_QueryAliasInfo_r_send(TALLOC_CTX *mem_ctx,
    6335             :         struct tevent_context *ev,
    6336             :         struct dcerpc_binding_handle *h,
    6337             :         struct samr_QueryAliasInfo *r)
    6338             : {
    6339           0 :         struct tevent_req *req;
    6340           0 :         struct dcerpc_samr_QueryAliasInfo_r_state *state;
    6341           0 :         struct tevent_req *subreq;
    6342             : 
    6343           0 :         req = tevent_req_create(mem_ctx, &state,
    6344             :                                 struct dcerpc_samr_QueryAliasInfo_r_state);
    6345           0 :         if (req == NULL) {
    6346           0 :                 return NULL;
    6347             :         }
    6348             : 
    6349           0 :         state->out_mem_ctx = talloc_new(state);
    6350           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6351           0 :                 return tevent_req_post(req, ev);
    6352             :         }
    6353             : 
    6354           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6355             :                         NULL, &ndr_table_samr,
    6356           0 :                         NDR_SAMR_QUERYALIASINFO, state->out_mem_ctx, r);
    6357           0 :         if (tevent_req_nomem(subreq, req)) {
    6358           0 :                 return tevent_req_post(req, ev);
    6359             :         }
    6360           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryAliasInfo_r_done, req);
    6361             : 
    6362           0 :         return req;
    6363             : }
    6364             : 
    6365           0 : static void dcerpc_samr_QueryAliasInfo_r_done(struct tevent_req *subreq)
    6366             : {
    6367           0 :         struct tevent_req *req =
    6368           0 :                 tevent_req_callback_data(subreq,
    6369             :                 struct tevent_req);
    6370           0 :         NTSTATUS status;
    6371             : 
    6372           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6373           0 :         TALLOC_FREE(subreq);
    6374           0 :         if (tevent_req_nterror(req, status)) {
    6375           0 :                 return;
    6376             :         }
    6377             : 
    6378           0 :         tevent_req_done(req);
    6379             : }
    6380             : 
    6381           0 : NTSTATUS dcerpc_samr_QueryAliasInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6382             : {
    6383           0 :         struct dcerpc_samr_QueryAliasInfo_r_state *state =
    6384           0 :                 tevent_req_data(req,
    6385             :                 struct dcerpc_samr_QueryAliasInfo_r_state);
    6386           0 :         NTSTATUS status;
    6387             : 
    6388           0 :         if (tevent_req_is_nterror(req, &status)) {
    6389           0 :                 tevent_req_received(req);
    6390           0 :                 return status;
    6391             :         }
    6392             : 
    6393           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6394             : 
    6395           0 :         tevent_req_received(req);
    6396           0 :         return NT_STATUS_OK;
    6397             : }
    6398             : 
    6399         286 : NTSTATUS dcerpc_samr_QueryAliasInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_QueryAliasInfo *r)
    6400             : {
    6401           0 :         NTSTATUS status;
    6402             : 
    6403         286 :         status = dcerpc_binding_handle_call(h,
    6404             :                         NULL, &ndr_table_samr,
    6405             :                         NDR_SAMR_QUERYALIASINFO, mem_ctx, r);
    6406             : 
    6407         286 :         return status;
    6408             : }
    6409             : 
    6410             : struct dcerpc_samr_QueryAliasInfo_state {
    6411             :         struct samr_QueryAliasInfo orig;
    6412             :         struct samr_QueryAliasInfo tmp;
    6413             :         TALLOC_CTX *out_mem_ctx;
    6414             : };
    6415             : 
    6416             : static void dcerpc_samr_QueryAliasInfo_done(struct tevent_req *subreq);
    6417             : 
    6418           0 : struct tevent_req *dcerpc_samr_QueryAliasInfo_send(TALLOC_CTX *mem_ctx,
    6419             :                                                    struct tevent_context *ev,
    6420             :                                                    struct dcerpc_binding_handle *h,
    6421             :                                                    struct policy_handle *_alias_handle /* [in] [ref] */,
    6422             :                                                    enum samr_AliasInfoEnum _level /* [in]  */,
    6423             :                                                    union samr_AliasInfo **_info /* [out] [ref,switch_is(level)] */)
    6424             : {
    6425           0 :         struct tevent_req *req;
    6426           0 :         struct dcerpc_samr_QueryAliasInfo_state *state;
    6427           0 :         struct tevent_req *subreq;
    6428             : 
    6429           0 :         req = tevent_req_create(mem_ctx, &state,
    6430             :                                 struct dcerpc_samr_QueryAliasInfo_state);
    6431           0 :         if (req == NULL) {
    6432           0 :                 return NULL;
    6433             :         }
    6434           0 :         state->out_mem_ctx = NULL;
    6435             : 
    6436             :         /* In parameters */
    6437           0 :         state->orig.in.alias_handle = _alias_handle;
    6438           0 :         state->orig.in.level = _level;
    6439             : 
    6440             :         /* Out parameters */
    6441           0 :         state->orig.out.info = _info;
    6442             : 
    6443             :         /* Result */
    6444           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6445             : 
    6446           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6447             :                              "dcerpc_samr_QueryAliasInfo_out_memory");
    6448           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6449           0 :                 return tevent_req_post(req, ev);
    6450             :         }
    6451             : 
    6452             :         /* make a temporary copy, that we pass to the dispatch function */
    6453           0 :         state->tmp = state->orig;
    6454             : 
    6455           0 :         subreq = dcerpc_samr_QueryAliasInfo_r_send(state, ev, h, &state->tmp);
    6456           0 :         if (tevent_req_nomem(subreq, req)) {
    6457           0 :                 return tevent_req_post(req, ev);
    6458             :         }
    6459           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryAliasInfo_done, req);
    6460           0 :         return req;
    6461             : }
    6462             : 
    6463           0 : static void dcerpc_samr_QueryAliasInfo_done(struct tevent_req *subreq)
    6464             : {
    6465           0 :         struct tevent_req *req = tevent_req_callback_data(
    6466             :                 subreq, struct tevent_req);
    6467           0 :         struct dcerpc_samr_QueryAliasInfo_state *state = tevent_req_data(
    6468             :                 req, struct dcerpc_samr_QueryAliasInfo_state);
    6469           0 :         NTSTATUS status;
    6470           0 :         TALLOC_CTX *mem_ctx;
    6471             : 
    6472           0 :         if (state->out_mem_ctx) {
    6473           0 :                 mem_ctx = state->out_mem_ctx;
    6474             :         } else {
    6475           0 :                 mem_ctx = state;
    6476             :         }
    6477             : 
    6478           0 :         status = dcerpc_samr_QueryAliasInfo_r_recv(subreq, mem_ctx);
    6479           0 :         TALLOC_FREE(subreq);
    6480           0 :         if (tevent_req_nterror(req, status)) {
    6481           0 :                 return;
    6482             :         }
    6483             : 
    6484             :         /* Copy out parameters */
    6485           0 :         *state->orig.out.info = *state->tmp.out.info;
    6486             : 
    6487             :         /* Copy result */
    6488           0 :         state->orig.out.result = state->tmp.out.result;
    6489             : 
    6490             :         /* Reset temporary structure */
    6491           0 :         NDR_ZERO_STRUCT(state->tmp);
    6492             : 
    6493           0 :         tevent_req_done(req);
    6494             : }
    6495             : 
    6496           0 : NTSTATUS dcerpc_samr_QueryAliasInfo_recv(struct tevent_req *req,
    6497             :                                          TALLOC_CTX *mem_ctx,
    6498             :                                          NTSTATUS *result)
    6499             : {
    6500           0 :         struct dcerpc_samr_QueryAliasInfo_state *state = tevent_req_data(
    6501             :                 req, struct dcerpc_samr_QueryAliasInfo_state);
    6502           0 :         NTSTATUS status;
    6503             : 
    6504           0 :         if (tevent_req_is_nterror(req, &status)) {
    6505           0 :                 tevent_req_received(req);
    6506           0 :                 return status;
    6507             :         }
    6508             : 
    6509             :         /* Steal possible out parameters to the callers context */
    6510           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6511             : 
    6512             :         /* Return result */
    6513           0 :         *result = state->orig.out.result;
    6514             : 
    6515           0 :         tevent_req_received(req);
    6516           0 :         return NT_STATUS_OK;
    6517             : }
    6518             : 
    6519           0 : NTSTATUS dcerpc_samr_QueryAliasInfo(struct dcerpc_binding_handle *h,
    6520             :                                     TALLOC_CTX *mem_ctx,
    6521             :                                     struct policy_handle *_alias_handle /* [in] [ref] */,
    6522             :                                     enum samr_AliasInfoEnum _level /* [in]  */,
    6523             :                                     union samr_AliasInfo **_info /* [out] [ref,switch_is(level)] */,
    6524             :                                     NTSTATUS *result)
    6525             : {
    6526           0 :         struct samr_QueryAliasInfo r;
    6527           0 :         NTSTATUS status;
    6528             : 
    6529             :         /* In parameters */
    6530           0 :         r.in.alias_handle = _alias_handle;
    6531           0 :         r.in.level = _level;
    6532             : 
    6533             :         /* Out parameters */
    6534           0 :         r.out.info = _info;
    6535             : 
    6536             :         /* Result */
    6537           0 :         NDR_ZERO_STRUCT(r.out.result);
    6538             : 
    6539           0 :         status = dcerpc_samr_QueryAliasInfo_r(h, mem_ctx, &r);
    6540           0 :         if (!NT_STATUS_IS_OK(status)) {
    6541           0 :                 return status;
    6542             :         }
    6543             : 
    6544             :         /* Return variables */
    6545           0 :         *_info = *r.out.info;
    6546             : 
    6547             :         /* Return result */
    6548           0 :         *result = r.out.result;
    6549             : 
    6550           0 :         return NT_STATUS_OK;
    6551             : }
    6552             : 
    6553             : struct dcerpc_samr_SetAliasInfo_r_state {
    6554             :         TALLOC_CTX *out_mem_ctx;
    6555             : };
    6556             : 
    6557             : static void dcerpc_samr_SetAliasInfo_r_done(struct tevent_req *subreq);
    6558             : 
    6559           0 : struct tevent_req *dcerpc_samr_SetAliasInfo_r_send(TALLOC_CTX *mem_ctx,
    6560             :         struct tevent_context *ev,
    6561             :         struct dcerpc_binding_handle *h,
    6562             :         struct samr_SetAliasInfo *r)
    6563             : {
    6564           0 :         struct tevent_req *req;
    6565           0 :         struct dcerpc_samr_SetAliasInfo_r_state *state;
    6566           0 :         struct tevent_req *subreq;
    6567             : 
    6568           0 :         req = tevent_req_create(mem_ctx, &state,
    6569             :                                 struct dcerpc_samr_SetAliasInfo_r_state);
    6570           0 :         if (req == NULL) {
    6571           0 :                 return NULL;
    6572             :         }
    6573             : 
    6574           0 :         state->out_mem_ctx = NULL;
    6575             : 
    6576           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6577             :                         NULL, &ndr_table_samr,
    6578             :                         NDR_SAMR_SETALIASINFO, state, r);
    6579           0 :         if (tevent_req_nomem(subreq, req)) {
    6580           0 :                 return tevent_req_post(req, ev);
    6581             :         }
    6582           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetAliasInfo_r_done, req);
    6583             : 
    6584           0 :         return req;
    6585             : }
    6586             : 
    6587           0 : static void dcerpc_samr_SetAliasInfo_r_done(struct tevent_req *subreq)
    6588             : {
    6589           0 :         struct tevent_req *req =
    6590           0 :                 tevent_req_callback_data(subreq,
    6591             :                 struct tevent_req);
    6592           0 :         NTSTATUS status;
    6593             : 
    6594           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6595           0 :         TALLOC_FREE(subreq);
    6596           0 :         if (tevent_req_nterror(req, status)) {
    6597           0 :                 return;
    6598             :         }
    6599             : 
    6600           0 :         tevent_req_done(req);
    6601             : }
    6602             : 
    6603           0 : NTSTATUS dcerpc_samr_SetAliasInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6604             : {
    6605           0 :         struct dcerpc_samr_SetAliasInfo_r_state *state =
    6606           0 :                 tevent_req_data(req,
    6607             :                 struct dcerpc_samr_SetAliasInfo_r_state);
    6608           0 :         NTSTATUS status;
    6609             : 
    6610           0 :         if (tevent_req_is_nterror(req, &status)) {
    6611           0 :                 tevent_req_received(req);
    6612           0 :                 return status;
    6613             :         }
    6614             : 
    6615           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6616             : 
    6617           0 :         tevent_req_received(req);
    6618           0 :         return NT_STATUS_OK;
    6619             : }
    6620             : 
    6621          10 : NTSTATUS dcerpc_samr_SetAliasInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_SetAliasInfo *r)
    6622             : {
    6623           0 :         NTSTATUS status;
    6624             : 
    6625          10 :         status = dcerpc_binding_handle_call(h,
    6626             :                         NULL, &ndr_table_samr,
    6627             :                         NDR_SAMR_SETALIASINFO, mem_ctx, r);
    6628             : 
    6629          10 :         return status;
    6630             : }
    6631             : 
    6632             : struct dcerpc_samr_SetAliasInfo_state {
    6633             :         struct samr_SetAliasInfo orig;
    6634             :         struct samr_SetAliasInfo tmp;
    6635             :         TALLOC_CTX *out_mem_ctx;
    6636             : };
    6637             : 
    6638             : static void dcerpc_samr_SetAliasInfo_done(struct tevent_req *subreq);
    6639             : 
    6640           0 : struct tevent_req *dcerpc_samr_SetAliasInfo_send(TALLOC_CTX *mem_ctx,
    6641             :                                                  struct tevent_context *ev,
    6642             :                                                  struct dcerpc_binding_handle *h,
    6643             :                                                  struct policy_handle *_alias_handle /* [in] [ref] */,
    6644             :                                                  enum samr_AliasInfoEnum _level /* [in]  */,
    6645             :                                                  union samr_AliasInfo *_info /* [in] [ref,switch_is(level)] */)
    6646             : {
    6647           0 :         struct tevent_req *req;
    6648           0 :         struct dcerpc_samr_SetAliasInfo_state *state;
    6649           0 :         struct tevent_req *subreq;
    6650             : 
    6651           0 :         req = tevent_req_create(mem_ctx, &state,
    6652             :                                 struct dcerpc_samr_SetAliasInfo_state);
    6653           0 :         if (req == NULL) {
    6654           0 :                 return NULL;
    6655             :         }
    6656           0 :         state->out_mem_ctx = NULL;
    6657             : 
    6658             :         /* In parameters */
    6659           0 :         state->orig.in.alias_handle = _alias_handle;
    6660           0 :         state->orig.in.level = _level;
    6661           0 :         state->orig.in.info = _info;
    6662             : 
    6663             :         /* Out parameters */
    6664             : 
    6665             :         /* Result */
    6666           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6667             : 
    6668             :         /* make a temporary copy, that we pass to the dispatch function */
    6669           0 :         state->tmp = state->orig;
    6670             : 
    6671           0 :         subreq = dcerpc_samr_SetAliasInfo_r_send(state, ev, h, &state->tmp);
    6672           0 :         if (tevent_req_nomem(subreq, req)) {
    6673           0 :                 return tevent_req_post(req, ev);
    6674             :         }
    6675           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetAliasInfo_done, req);
    6676           0 :         return req;
    6677             : }
    6678             : 
    6679           0 : static void dcerpc_samr_SetAliasInfo_done(struct tevent_req *subreq)
    6680             : {
    6681           0 :         struct tevent_req *req = tevent_req_callback_data(
    6682             :                 subreq, struct tevent_req);
    6683           0 :         struct dcerpc_samr_SetAliasInfo_state *state = tevent_req_data(
    6684             :                 req, struct dcerpc_samr_SetAliasInfo_state);
    6685           0 :         NTSTATUS status;
    6686           0 :         TALLOC_CTX *mem_ctx;
    6687             : 
    6688           0 :         if (state->out_mem_ctx) {
    6689           0 :                 mem_ctx = state->out_mem_ctx;
    6690             :         } else {
    6691           0 :                 mem_ctx = state;
    6692             :         }
    6693             : 
    6694           0 :         status = dcerpc_samr_SetAliasInfo_r_recv(subreq, mem_ctx);
    6695           0 :         TALLOC_FREE(subreq);
    6696           0 :         if (tevent_req_nterror(req, status)) {
    6697           0 :                 return;
    6698             :         }
    6699             : 
    6700             :         /* Copy out parameters */
    6701             : 
    6702             :         /* Copy result */
    6703           0 :         state->orig.out.result = state->tmp.out.result;
    6704             : 
    6705             :         /* Reset temporary structure */
    6706           0 :         NDR_ZERO_STRUCT(state->tmp);
    6707             : 
    6708           0 :         tevent_req_done(req);
    6709             : }
    6710             : 
    6711           0 : NTSTATUS dcerpc_samr_SetAliasInfo_recv(struct tevent_req *req,
    6712             :                                        TALLOC_CTX *mem_ctx,
    6713             :                                        NTSTATUS *result)
    6714             : {
    6715           0 :         struct dcerpc_samr_SetAliasInfo_state *state = tevent_req_data(
    6716             :                 req, struct dcerpc_samr_SetAliasInfo_state);
    6717           0 :         NTSTATUS status;
    6718             : 
    6719           0 :         if (tevent_req_is_nterror(req, &status)) {
    6720           0 :                 tevent_req_received(req);
    6721           0 :                 return status;
    6722             :         }
    6723             : 
    6724             :         /* Steal possible out parameters to the callers context */
    6725           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6726             : 
    6727             :         /* Return result */
    6728           0 :         *result = state->orig.out.result;
    6729             : 
    6730           0 :         tevent_req_received(req);
    6731           0 :         return NT_STATUS_OK;
    6732             : }
    6733             : 
    6734           0 : NTSTATUS dcerpc_samr_SetAliasInfo(struct dcerpc_binding_handle *h,
    6735             :                                   TALLOC_CTX *mem_ctx,
    6736             :                                   struct policy_handle *_alias_handle /* [in] [ref] */,
    6737             :                                   enum samr_AliasInfoEnum _level /* [in]  */,
    6738             :                                   union samr_AliasInfo *_info /* [in] [ref,switch_is(level)] */,
    6739             :                                   NTSTATUS *result)
    6740             : {
    6741           0 :         struct samr_SetAliasInfo r;
    6742           0 :         NTSTATUS status;
    6743             : 
    6744             :         /* In parameters */
    6745           0 :         r.in.alias_handle = _alias_handle;
    6746           0 :         r.in.level = _level;
    6747           0 :         r.in.info = _info;
    6748             : 
    6749             :         /* Out parameters */
    6750             : 
    6751             :         /* Result */
    6752           0 :         NDR_ZERO_STRUCT(r.out.result);
    6753             : 
    6754           0 :         status = dcerpc_samr_SetAliasInfo_r(h, mem_ctx, &r);
    6755           0 :         if (!NT_STATUS_IS_OK(status)) {
    6756           0 :                 return status;
    6757             :         }
    6758             : 
    6759             :         /* Return variables */
    6760             : 
    6761             :         /* Return result */
    6762           0 :         *result = r.out.result;
    6763             : 
    6764           0 :         return NT_STATUS_OK;
    6765             : }
    6766             : 
    6767             : struct dcerpc_samr_DeleteDomAlias_r_state {
    6768             :         TALLOC_CTX *out_mem_ctx;
    6769             : };
    6770             : 
    6771             : static void dcerpc_samr_DeleteDomAlias_r_done(struct tevent_req *subreq);
    6772             : 
    6773           0 : struct tevent_req *dcerpc_samr_DeleteDomAlias_r_send(TALLOC_CTX *mem_ctx,
    6774             :         struct tevent_context *ev,
    6775             :         struct dcerpc_binding_handle *h,
    6776             :         struct samr_DeleteDomAlias *r)
    6777             : {
    6778           0 :         struct tevent_req *req;
    6779           0 :         struct dcerpc_samr_DeleteDomAlias_r_state *state;
    6780           0 :         struct tevent_req *subreq;
    6781             : 
    6782           0 :         req = tevent_req_create(mem_ctx, &state,
    6783             :                                 struct dcerpc_samr_DeleteDomAlias_r_state);
    6784           0 :         if (req == NULL) {
    6785           0 :                 return NULL;
    6786             :         }
    6787             : 
    6788           0 :         state->out_mem_ctx = talloc_new(state);
    6789           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6790           0 :                 return tevent_req_post(req, ev);
    6791             :         }
    6792             : 
    6793           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6794             :                         NULL, &ndr_table_samr,
    6795           0 :                         NDR_SAMR_DELETEDOMALIAS, state->out_mem_ctx, r);
    6796           0 :         if (tevent_req_nomem(subreq, req)) {
    6797           0 :                 return tevent_req_post(req, ev);
    6798             :         }
    6799           0 :         tevent_req_set_callback(subreq, dcerpc_samr_DeleteDomAlias_r_done, req);
    6800             : 
    6801           0 :         return req;
    6802             : }
    6803             : 
    6804           0 : static void dcerpc_samr_DeleteDomAlias_r_done(struct tevent_req *subreq)
    6805             : {
    6806           0 :         struct tevent_req *req =
    6807           0 :                 tevent_req_callback_data(subreq,
    6808             :                 struct tevent_req);
    6809           0 :         NTSTATUS status;
    6810             : 
    6811           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6812           0 :         TALLOC_FREE(subreq);
    6813           0 :         if (tevent_req_nterror(req, status)) {
    6814           0 :                 return;
    6815             :         }
    6816             : 
    6817           0 :         tevent_req_done(req);
    6818             : }
    6819             : 
    6820           0 : NTSTATUS dcerpc_samr_DeleteDomAlias_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6821             : {
    6822           0 :         struct dcerpc_samr_DeleteDomAlias_r_state *state =
    6823           0 :                 tevent_req_data(req,
    6824             :                 struct dcerpc_samr_DeleteDomAlias_r_state);
    6825           0 :         NTSTATUS status;
    6826             : 
    6827           0 :         if (tevent_req_is_nterror(req, &status)) {
    6828           0 :                 tevent_req_received(req);
    6829           0 :                 return status;
    6830             :         }
    6831             : 
    6832           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6833             : 
    6834           0 :         tevent_req_received(req);
    6835           0 :         return NT_STATUS_OK;
    6836             : }
    6837             : 
    6838         455 : NTSTATUS dcerpc_samr_DeleteDomAlias_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_DeleteDomAlias *r)
    6839             : {
    6840           0 :         NTSTATUS status;
    6841             : 
    6842         455 :         status = dcerpc_binding_handle_call(h,
    6843             :                         NULL, &ndr_table_samr,
    6844             :                         NDR_SAMR_DELETEDOMALIAS, mem_ctx, r);
    6845             : 
    6846         455 :         return status;
    6847             : }
    6848             : 
    6849             : struct dcerpc_samr_DeleteDomAlias_state {
    6850             :         struct samr_DeleteDomAlias orig;
    6851             :         struct samr_DeleteDomAlias tmp;
    6852             :         TALLOC_CTX *out_mem_ctx;
    6853             : };
    6854             : 
    6855             : static void dcerpc_samr_DeleteDomAlias_done(struct tevent_req *subreq);
    6856             : 
    6857           0 : struct tevent_req *dcerpc_samr_DeleteDomAlias_send(TALLOC_CTX *mem_ctx,
    6858             :                                                    struct tevent_context *ev,
    6859             :                                                    struct dcerpc_binding_handle *h,
    6860             :                                                    struct policy_handle *_alias_handle /* [in,out] [ref] */)
    6861             : {
    6862           0 :         struct tevent_req *req;
    6863           0 :         struct dcerpc_samr_DeleteDomAlias_state *state;
    6864           0 :         struct tevent_req *subreq;
    6865             : 
    6866           0 :         req = tevent_req_create(mem_ctx, &state,
    6867             :                                 struct dcerpc_samr_DeleteDomAlias_state);
    6868           0 :         if (req == NULL) {
    6869           0 :                 return NULL;
    6870             :         }
    6871           0 :         state->out_mem_ctx = NULL;
    6872             : 
    6873             :         /* In parameters */
    6874           0 :         state->orig.in.alias_handle = _alias_handle;
    6875             : 
    6876             :         /* Out parameters */
    6877           0 :         state->orig.out.alias_handle = _alias_handle;
    6878             : 
    6879             :         /* Result */
    6880           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6881             : 
    6882           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6883             :                              "dcerpc_samr_DeleteDomAlias_out_memory");
    6884           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6885           0 :                 return tevent_req_post(req, ev);
    6886             :         }
    6887             : 
    6888             :         /* make a temporary copy, that we pass to the dispatch function */
    6889           0 :         state->tmp = state->orig;
    6890             : 
    6891           0 :         subreq = dcerpc_samr_DeleteDomAlias_r_send(state, ev, h, &state->tmp);
    6892           0 :         if (tevent_req_nomem(subreq, req)) {
    6893           0 :                 return tevent_req_post(req, ev);
    6894             :         }
    6895           0 :         tevent_req_set_callback(subreq, dcerpc_samr_DeleteDomAlias_done, req);
    6896           0 :         return req;
    6897             : }
    6898             : 
    6899           0 : static void dcerpc_samr_DeleteDomAlias_done(struct tevent_req *subreq)
    6900             : {
    6901           0 :         struct tevent_req *req = tevent_req_callback_data(
    6902             :                 subreq, struct tevent_req);
    6903           0 :         struct dcerpc_samr_DeleteDomAlias_state *state = tevent_req_data(
    6904             :                 req, struct dcerpc_samr_DeleteDomAlias_state);
    6905           0 :         NTSTATUS status;
    6906           0 :         TALLOC_CTX *mem_ctx;
    6907             : 
    6908           0 :         if (state->out_mem_ctx) {
    6909           0 :                 mem_ctx = state->out_mem_ctx;
    6910             :         } else {
    6911           0 :                 mem_ctx = state;
    6912             :         }
    6913             : 
    6914           0 :         status = dcerpc_samr_DeleteDomAlias_r_recv(subreq, mem_ctx);
    6915           0 :         TALLOC_FREE(subreq);
    6916           0 :         if (tevent_req_nterror(req, status)) {
    6917           0 :                 return;
    6918             :         }
    6919             : 
    6920             :         /* Copy out parameters */
    6921           0 :         *state->orig.out.alias_handle = *state->tmp.out.alias_handle;
    6922             : 
    6923             :         /* Copy result */
    6924           0 :         state->orig.out.result = state->tmp.out.result;
    6925             : 
    6926             :         /* Reset temporary structure */
    6927           0 :         NDR_ZERO_STRUCT(state->tmp);
    6928             : 
    6929           0 :         tevent_req_done(req);
    6930             : }
    6931             : 
    6932           0 : NTSTATUS dcerpc_samr_DeleteDomAlias_recv(struct tevent_req *req,
    6933             :                                          TALLOC_CTX *mem_ctx,
    6934             :                                          NTSTATUS *result)
    6935             : {
    6936           0 :         struct dcerpc_samr_DeleteDomAlias_state *state = tevent_req_data(
    6937             :                 req, struct dcerpc_samr_DeleteDomAlias_state);
    6938           0 :         NTSTATUS status;
    6939             : 
    6940           0 :         if (tevent_req_is_nterror(req, &status)) {
    6941           0 :                 tevent_req_received(req);
    6942           0 :                 return status;
    6943             :         }
    6944             : 
    6945             :         /* Steal possible out parameters to the callers context */
    6946           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6947             : 
    6948             :         /* Return result */
    6949           0 :         *result = state->orig.out.result;
    6950             : 
    6951           0 :         tevent_req_received(req);
    6952           0 :         return NT_STATUS_OK;
    6953             : }
    6954             : 
    6955           0 : NTSTATUS dcerpc_samr_DeleteDomAlias(struct dcerpc_binding_handle *h,
    6956             :                                     TALLOC_CTX *mem_ctx,
    6957             :                                     struct policy_handle *_alias_handle /* [in,out] [ref] */,
    6958             :                                     NTSTATUS *result)
    6959             : {
    6960           0 :         struct samr_DeleteDomAlias r;
    6961           0 :         NTSTATUS status;
    6962             : 
    6963             :         /* In parameters */
    6964           0 :         r.in.alias_handle = _alias_handle;
    6965             : 
    6966             :         /* Out parameters */
    6967           0 :         r.out.alias_handle = _alias_handle;
    6968             : 
    6969             :         /* Result */
    6970           0 :         NDR_ZERO_STRUCT(r.out.result);
    6971             : 
    6972           0 :         status = dcerpc_samr_DeleteDomAlias_r(h, mem_ctx, &r);
    6973           0 :         if (!NT_STATUS_IS_OK(status)) {
    6974           0 :                 return status;
    6975             :         }
    6976             : 
    6977             :         /* Return variables */
    6978           0 :         *_alias_handle = *r.out.alias_handle;
    6979             : 
    6980             :         /* Return result */
    6981           0 :         *result = r.out.result;
    6982             : 
    6983           0 :         return NT_STATUS_OK;
    6984             : }
    6985             : 
    6986             : struct dcerpc_samr_AddAliasMember_r_state {
    6987             :         TALLOC_CTX *out_mem_ctx;
    6988             : };
    6989             : 
    6990             : static void dcerpc_samr_AddAliasMember_r_done(struct tevent_req *subreq);
    6991             : 
    6992           0 : struct tevent_req *dcerpc_samr_AddAliasMember_r_send(TALLOC_CTX *mem_ctx,
    6993             :         struct tevent_context *ev,
    6994             :         struct dcerpc_binding_handle *h,
    6995             :         struct samr_AddAliasMember *r)
    6996             : {
    6997           0 :         struct tevent_req *req;
    6998           0 :         struct dcerpc_samr_AddAliasMember_r_state *state;
    6999           0 :         struct tevent_req *subreq;
    7000             : 
    7001           0 :         req = tevent_req_create(mem_ctx, &state,
    7002             :                                 struct dcerpc_samr_AddAliasMember_r_state);
    7003           0 :         if (req == NULL) {
    7004           0 :                 return NULL;
    7005             :         }
    7006             : 
    7007           0 :         state->out_mem_ctx = NULL;
    7008             : 
    7009           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7010             :                         NULL, &ndr_table_samr,
    7011             :                         NDR_SAMR_ADDALIASMEMBER, state, r);
    7012           0 :         if (tevent_req_nomem(subreq, req)) {
    7013           0 :                 return tevent_req_post(req, ev);
    7014             :         }
    7015           0 :         tevent_req_set_callback(subreq, dcerpc_samr_AddAliasMember_r_done, req);
    7016             : 
    7017           0 :         return req;
    7018             : }
    7019             : 
    7020           0 : static void dcerpc_samr_AddAliasMember_r_done(struct tevent_req *subreq)
    7021             : {
    7022           0 :         struct tevent_req *req =
    7023           0 :                 tevent_req_callback_data(subreq,
    7024             :                 struct tevent_req);
    7025           0 :         NTSTATUS status;
    7026             : 
    7027           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7028           0 :         TALLOC_FREE(subreq);
    7029           0 :         if (tevent_req_nterror(req, status)) {
    7030           0 :                 return;
    7031             :         }
    7032             : 
    7033           0 :         tevent_req_done(req);
    7034             : }
    7035             : 
    7036           0 : NTSTATUS dcerpc_samr_AddAliasMember_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7037             : {
    7038           0 :         struct dcerpc_samr_AddAliasMember_r_state *state =
    7039           0 :                 tevent_req_data(req,
    7040             :                 struct dcerpc_samr_AddAliasMember_r_state);
    7041           0 :         NTSTATUS status;
    7042             : 
    7043           0 :         if (tevent_req_is_nterror(req, &status)) {
    7044           0 :                 tevent_req_received(req);
    7045           0 :                 return status;
    7046             :         }
    7047             : 
    7048           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7049             : 
    7050           0 :         tevent_req_received(req);
    7051           0 :         return NT_STATUS_OK;
    7052             : }
    7053             : 
    7054           5 : NTSTATUS dcerpc_samr_AddAliasMember_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_AddAliasMember *r)
    7055             : {
    7056           0 :         NTSTATUS status;
    7057             : 
    7058           5 :         status = dcerpc_binding_handle_call(h,
    7059             :                         NULL, &ndr_table_samr,
    7060             :                         NDR_SAMR_ADDALIASMEMBER, mem_ctx, r);
    7061             : 
    7062           5 :         return status;
    7063             : }
    7064             : 
    7065             : struct dcerpc_samr_AddAliasMember_state {
    7066             :         struct samr_AddAliasMember orig;
    7067             :         struct samr_AddAliasMember tmp;
    7068             :         TALLOC_CTX *out_mem_ctx;
    7069             : };
    7070             : 
    7071             : static void dcerpc_samr_AddAliasMember_done(struct tevent_req *subreq);
    7072             : 
    7073           0 : struct tevent_req *dcerpc_samr_AddAliasMember_send(TALLOC_CTX *mem_ctx,
    7074             :                                                    struct tevent_context *ev,
    7075             :                                                    struct dcerpc_binding_handle *h,
    7076             :                                                    struct policy_handle *_alias_handle /* [in] [ref] */,
    7077             :                                                    struct dom_sid2 *_sid /* [in] [ref] */)
    7078             : {
    7079           0 :         struct tevent_req *req;
    7080           0 :         struct dcerpc_samr_AddAliasMember_state *state;
    7081           0 :         struct tevent_req *subreq;
    7082             : 
    7083           0 :         req = tevent_req_create(mem_ctx, &state,
    7084             :                                 struct dcerpc_samr_AddAliasMember_state);
    7085           0 :         if (req == NULL) {
    7086           0 :                 return NULL;
    7087             :         }
    7088           0 :         state->out_mem_ctx = NULL;
    7089             : 
    7090             :         /* In parameters */
    7091           0 :         state->orig.in.alias_handle = _alias_handle;
    7092           0 :         state->orig.in.sid = _sid;
    7093             : 
    7094             :         /* Out parameters */
    7095             : 
    7096             :         /* Result */
    7097           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7098             : 
    7099             :         /* make a temporary copy, that we pass to the dispatch function */
    7100           0 :         state->tmp = state->orig;
    7101             : 
    7102           0 :         subreq = dcerpc_samr_AddAliasMember_r_send(state, ev, h, &state->tmp);
    7103           0 :         if (tevent_req_nomem(subreq, req)) {
    7104           0 :                 return tevent_req_post(req, ev);
    7105             :         }
    7106           0 :         tevent_req_set_callback(subreq, dcerpc_samr_AddAliasMember_done, req);
    7107           0 :         return req;
    7108             : }
    7109             : 
    7110           0 : static void dcerpc_samr_AddAliasMember_done(struct tevent_req *subreq)
    7111             : {
    7112           0 :         struct tevent_req *req = tevent_req_callback_data(
    7113             :                 subreq, struct tevent_req);
    7114           0 :         struct dcerpc_samr_AddAliasMember_state *state = tevent_req_data(
    7115             :                 req, struct dcerpc_samr_AddAliasMember_state);
    7116           0 :         NTSTATUS status;
    7117           0 :         TALLOC_CTX *mem_ctx;
    7118             : 
    7119           0 :         if (state->out_mem_ctx) {
    7120           0 :                 mem_ctx = state->out_mem_ctx;
    7121             :         } else {
    7122           0 :                 mem_ctx = state;
    7123             :         }
    7124             : 
    7125           0 :         status = dcerpc_samr_AddAliasMember_r_recv(subreq, mem_ctx);
    7126           0 :         TALLOC_FREE(subreq);
    7127           0 :         if (tevent_req_nterror(req, status)) {
    7128           0 :                 return;
    7129             :         }
    7130             : 
    7131             :         /* Copy out parameters */
    7132             : 
    7133             :         /* Copy result */
    7134           0 :         state->orig.out.result = state->tmp.out.result;
    7135             : 
    7136             :         /* Reset temporary structure */
    7137           0 :         NDR_ZERO_STRUCT(state->tmp);
    7138             : 
    7139           0 :         tevent_req_done(req);
    7140             : }
    7141             : 
    7142           0 : NTSTATUS dcerpc_samr_AddAliasMember_recv(struct tevent_req *req,
    7143             :                                          TALLOC_CTX *mem_ctx,
    7144             :                                          NTSTATUS *result)
    7145             : {
    7146           0 :         struct dcerpc_samr_AddAliasMember_state *state = tevent_req_data(
    7147             :                 req, struct dcerpc_samr_AddAliasMember_state);
    7148           0 :         NTSTATUS status;
    7149             : 
    7150           0 :         if (tevent_req_is_nterror(req, &status)) {
    7151           0 :                 tevent_req_received(req);
    7152           0 :                 return status;
    7153             :         }
    7154             : 
    7155             :         /* Steal possible out parameters to the callers context */
    7156           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7157             : 
    7158             :         /* Return result */
    7159           0 :         *result = state->orig.out.result;
    7160             : 
    7161           0 :         tevent_req_received(req);
    7162           0 :         return NT_STATUS_OK;
    7163             : }
    7164             : 
    7165           0 : NTSTATUS dcerpc_samr_AddAliasMember(struct dcerpc_binding_handle *h,
    7166             :                                     TALLOC_CTX *mem_ctx,
    7167             :                                     struct policy_handle *_alias_handle /* [in] [ref] */,
    7168             :                                     struct dom_sid2 *_sid /* [in] [ref] */,
    7169             :                                     NTSTATUS *result)
    7170             : {
    7171           0 :         struct samr_AddAliasMember r;
    7172           0 :         NTSTATUS status;
    7173             : 
    7174             :         /* In parameters */
    7175           0 :         r.in.alias_handle = _alias_handle;
    7176           0 :         r.in.sid = _sid;
    7177             : 
    7178             :         /* Out parameters */
    7179             : 
    7180             :         /* Result */
    7181           0 :         NDR_ZERO_STRUCT(r.out.result);
    7182             : 
    7183           0 :         status = dcerpc_samr_AddAliasMember_r(h, mem_ctx, &r);
    7184           0 :         if (!NT_STATUS_IS_OK(status)) {
    7185           0 :                 return status;
    7186             :         }
    7187             : 
    7188             :         /* Return variables */
    7189             : 
    7190             :         /* Return result */
    7191           0 :         *result = r.out.result;
    7192             : 
    7193           0 :         return NT_STATUS_OK;
    7194             : }
    7195             : 
    7196             : struct dcerpc_samr_DeleteAliasMember_r_state {
    7197             :         TALLOC_CTX *out_mem_ctx;
    7198             : };
    7199             : 
    7200             : static void dcerpc_samr_DeleteAliasMember_r_done(struct tevent_req *subreq);
    7201             : 
    7202           0 : struct tevent_req *dcerpc_samr_DeleteAliasMember_r_send(TALLOC_CTX *mem_ctx,
    7203             :         struct tevent_context *ev,
    7204             :         struct dcerpc_binding_handle *h,
    7205             :         struct samr_DeleteAliasMember *r)
    7206             : {
    7207           0 :         struct tevent_req *req;
    7208           0 :         struct dcerpc_samr_DeleteAliasMember_r_state *state;
    7209           0 :         struct tevent_req *subreq;
    7210             : 
    7211           0 :         req = tevent_req_create(mem_ctx, &state,
    7212             :                                 struct dcerpc_samr_DeleteAliasMember_r_state);
    7213           0 :         if (req == NULL) {
    7214           0 :                 return NULL;
    7215             :         }
    7216             : 
    7217           0 :         state->out_mem_ctx = NULL;
    7218             : 
    7219           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7220             :                         NULL, &ndr_table_samr,
    7221             :                         NDR_SAMR_DELETEALIASMEMBER, state, r);
    7222           0 :         if (tevent_req_nomem(subreq, req)) {
    7223           0 :                 return tevent_req_post(req, ev);
    7224             :         }
    7225           0 :         tevent_req_set_callback(subreq, dcerpc_samr_DeleteAliasMember_r_done, req);
    7226             : 
    7227           0 :         return req;
    7228             : }
    7229             : 
    7230           0 : static void dcerpc_samr_DeleteAliasMember_r_done(struct tevent_req *subreq)
    7231             : {
    7232           0 :         struct tevent_req *req =
    7233           0 :                 tevent_req_callback_data(subreq,
    7234             :                 struct tevent_req);
    7235           0 :         NTSTATUS status;
    7236             : 
    7237           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7238           0 :         TALLOC_FREE(subreq);
    7239           0 :         if (tevent_req_nterror(req, status)) {
    7240           0 :                 return;
    7241             :         }
    7242             : 
    7243           0 :         tevent_req_done(req);
    7244             : }
    7245             : 
    7246           0 : NTSTATUS dcerpc_samr_DeleteAliasMember_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7247             : {
    7248           0 :         struct dcerpc_samr_DeleteAliasMember_r_state *state =
    7249           0 :                 tevent_req_data(req,
    7250             :                 struct dcerpc_samr_DeleteAliasMember_r_state);
    7251           0 :         NTSTATUS status;
    7252             : 
    7253           0 :         if (tevent_req_is_nterror(req, &status)) {
    7254           0 :                 tevent_req_received(req);
    7255           0 :                 return status;
    7256             :         }
    7257             : 
    7258           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7259             : 
    7260           0 :         tevent_req_received(req);
    7261           0 :         return NT_STATUS_OK;
    7262             : }
    7263             : 
    7264           5 : NTSTATUS dcerpc_samr_DeleteAliasMember_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_DeleteAliasMember *r)
    7265             : {
    7266           0 :         NTSTATUS status;
    7267             : 
    7268           5 :         status = dcerpc_binding_handle_call(h,
    7269             :                         NULL, &ndr_table_samr,
    7270             :                         NDR_SAMR_DELETEALIASMEMBER, mem_ctx, r);
    7271             : 
    7272           5 :         return status;
    7273             : }
    7274             : 
    7275             : struct dcerpc_samr_DeleteAliasMember_state {
    7276             :         struct samr_DeleteAliasMember orig;
    7277             :         struct samr_DeleteAliasMember tmp;
    7278             :         TALLOC_CTX *out_mem_ctx;
    7279             : };
    7280             : 
    7281             : static void dcerpc_samr_DeleteAliasMember_done(struct tevent_req *subreq);
    7282             : 
    7283           0 : struct tevent_req *dcerpc_samr_DeleteAliasMember_send(TALLOC_CTX *mem_ctx,
    7284             :                                                       struct tevent_context *ev,
    7285             :                                                       struct dcerpc_binding_handle *h,
    7286             :                                                       struct policy_handle *_alias_handle /* [in] [ref] */,
    7287             :                                                       struct dom_sid2 *_sid /* [in] [ref] */)
    7288             : {
    7289           0 :         struct tevent_req *req;
    7290           0 :         struct dcerpc_samr_DeleteAliasMember_state *state;
    7291           0 :         struct tevent_req *subreq;
    7292             : 
    7293           0 :         req = tevent_req_create(mem_ctx, &state,
    7294             :                                 struct dcerpc_samr_DeleteAliasMember_state);
    7295           0 :         if (req == NULL) {
    7296           0 :                 return NULL;
    7297             :         }
    7298           0 :         state->out_mem_ctx = NULL;
    7299             : 
    7300             :         /* In parameters */
    7301           0 :         state->orig.in.alias_handle = _alias_handle;
    7302           0 :         state->orig.in.sid = _sid;
    7303             : 
    7304             :         /* Out parameters */
    7305             : 
    7306             :         /* Result */
    7307           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7308             : 
    7309             :         /* make a temporary copy, that we pass to the dispatch function */
    7310           0 :         state->tmp = state->orig;
    7311             : 
    7312           0 :         subreq = dcerpc_samr_DeleteAliasMember_r_send(state, ev, h, &state->tmp);
    7313           0 :         if (tevent_req_nomem(subreq, req)) {
    7314           0 :                 return tevent_req_post(req, ev);
    7315             :         }
    7316           0 :         tevent_req_set_callback(subreq, dcerpc_samr_DeleteAliasMember_done, req);
    7317           0 :         return req;
    7318             : }
    7319             : 
    7320           0 : static void dcerpc_samr_DeleteAliasMember_done(struct tevent_req *subreq)
    7321             : {
    7322           0 :         struct tevent_req *req = tevent_req_callback_data(
    7323             :                 subreq, struct tevent_req);
    7324           0 :         struct dcerpc_samr_DeleteAliasMember_state *state = tevent_req_data(
    7325             :                 req, struct dcerpc_samr_DeleteAliasMember_state);
    7326           0 :         NTSTATUS status;
    7327           0 :         TALLOC_CTX *mem_ctx;
    7328             : 
    7329           0 :         if (state->out_mem_ctx) {
    7330           0 :                 mem_ctx = state->out_mem_ctx;
    7331             :         } else {
    7332           0 :                 mem_ctx = state;
    7333             :         }
    7334             : 
    7335           0 :         status = dcerpc_samr_DeleteAliasMember_r_recv(subreq, mem_ctx);
    7336           0 :         TALLOC_FREE(subreq);
    7337           0 :         if (tevent_req_nterror(req, status)) {
    7338           0 :                 return;
    7339             :         }
    7340             : 
    7341             :         /* Copy out parameters */
    7342             : 
    7343             :         /* Copy result */
    7344           0 :         state->orig.out.result = state->tmp.out.result;
    7345             : 
    7346             :         /* Reset temporary structure */
    7347           0 :         NDR_ZERO_STRUCT(state->tmp);
    7348             : 
    7349           0 :         tevent_req_done(req);
    7350             : }
    7351             : 
    7352           0 : NTSTATUS dcerpc_samr_DeleteAliasMember_recv(struct tevent_req *req,
    7353             :                                             TALLOC_CTX *mem_ctx,
    7354             :                                             NTSTATUS *result)
    7355             : {
    7356           0 :         struct dcerpc_samr_DeleteAliasMember_state *state = tevent_req_data(
    7357             :                 req, struct dcerpc_samr_DeleteAliasMember_state);
    7358           0 :         NTSTATUS status;
    7359             : 
    7360           0 :         if (tevent_req_is_nterror(req, &status)) {
    7361           0 :                 tevent_req_received(req);
    7362           0 :                 return status;
    7363             :         }
    7364             : 
    7365             :         /* Steal possible out parameters to the callers context */
    7366           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7367             : 
    7368             :         /* Return result */
    7369           0 :         *result = state->orig.out.result;
    7370             : 
    7371           0 :         tevent_req_received(req);
    7372           0 :         return NT_STATUS_OK;
    7373             : }
    7374             : 
    7375           0 : NTSTATUS dcerpc_samr_DeleteAliasMember(struct dcerpc_binding_handle *h,
    7376             :                                        TALLOC_CTX *mem_ctx,
    7377             :                                        struct policy_handle *_alias_handle /* [in] [ref] */,
    7378             :                                        struct dom_sid2 *_sid /* [in] [ref] */,
    7379             :                                        NTSTATUS *result)
    7380             : {
    7381           0 :         struct samr_DeleteAliasMember r;
    7382           0 :         NTSTATUS status;
    7383             : 
    7384             :         /* In parameters */
    7385           0 :         r.in.alias_handle = _alias_handle;
    7386           0 :         r.in.sid = _sid;
    7387             : 
    7388             :         /* Out parameters */
    7389             : 
    7390             :         /* Result */
    7391           0 :         NDR_ZERO_STRUCT(r.out.result);
    7392             : 
    7393           0 :         status = dcerpc_samr_DeleteAliasMember_r(h, mem_ctx, &r);
    7394           0 :         if (!NT_STATUS_IS_OK(status)) {
    7395           0 :                 return status;
    7396             :         }
    7397             : 
    7398             :         /* Return variables */
    7399             : 
    7400             :         /* Return result */
    7401           0 :         *result = r.out.result;
    7402             : 
    7403           0 :         return NT_STATUS_OK;
    7404             : }
    7405             : 
    7406             : struct dcerpc_samr_GetMembersInAlias_r_state {
    7407             :         TALLOC_CTX *out_mem_ctx;
    7408             : };
    7409             : 
    7410             : static void dcerpc_samr_GetMembersInAlias_r_done(struct tevent_req *subreq);
    7411             : 
    7412           0 : struct tevent_req *dcerpc_samr_GetMembersInAlias_r_send(TALLOC_CTX *mem_ctx,
    7413             :         struct tevent_context *ev,
    7414             :         struct dcerpc_binding_handle *h,
    7415             :         struct samr_GetMembersInAlias *r)
    7416             : {
    7417           0 :         struct tevent_req *req;
    7418           0 :         struct dcerpc_samr_GetMembersInAlias_r_state *state;
    7419           0 :         struct tevent_req *subreq;
    7420             : 
    7421           0 :         req = tevent_req_create(mem_ctx, &state,
    7422             :                                 struct dcerpc_samr_GetMembersInAlias_r_state);
    7423           0 :         if (req == NULL) {
    7424           0 :                 return NULL;
    7425             :         }
    7426             : 
    7427           0 :         state->out_mem_ctx = talloc_new(state);
    7428           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7429           0 :                 return tevent_req_post(req, ev);
    7430             :         }
    7431             : 
    7432           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7433             :                         NULL, &ndr_table_samr,
    7434           0 :                         NDR_SAMR_GETMEMBERSINALIAS, state->out_mem_ctx, r);
    7435           0 :         if (tevent_req_nomem(subreq, req)) {
    7436           0 :                 return tevent_req_post(req, ev);
    7437             :         }
    7438           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetMembersInAlias_r_done, req);
    7439             : 
    7440           0 :         return req;
    7441             : }
    7442             : 
    7443           0 : static void dcerpc_samr_GetMembersInAlias_r_done(struct tevent_req *subreq)
    7444             : {
    7445           0 :         struct tevent_req *req =
    7446           0 :                 tevent_req_callback_data(subreq,
    7447             :                 struct tevent_req);
    7448           0 :         NTSTATUS status;
    7449             : 
    7450           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7451           0 :         TALLOC_FREE(subreq);
    7452           0 :         if (tevent_req_nterror(req, status)) {
    7453           0 :                 return;
    7454             :         }
    7455             : 
    7456           0 :         tevent_req_done(req);
    7457             : }
    7458             : 
    7459           0 : NTSTATUS dcerpc_samr_GetMembersInAlias_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7460             : {
    7461           0 :         struct dcerpc_samr_GetMembersInAlias_r_state *state =
    7462           0 :                 tevent_req_data(req,
    7463             :                 struct dcerpc_samr_GetMembersInAlias_r_state);
    7464           0 :         NTSTATUS status;
    7465             : 
    7466           0 :         if (tevent_req_is_nterror(req, &status)) {
    7467           0 :                 tevent_req_received(req);
    7468           0 :                 return status;
    7469             :         }
    7470             : 
    7471           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7472             : 
    7473           0 :         tevent_req_received(req);
    7474           0 :         return NT_STATUS_OK;
    7475             : }
    7476             : 
    7477        1311 : NTSTATUS dcerpc_samr_GetMembersInAlias_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_GetMembersInAlias *r)
    7478             : {
    7479           0 :         NTSTATUS status;
    7480             : 
    7481        1311 :         status = dcerpc_binding_handle_call(h,
    7482             :                         NULL, &ndr_table_samr,
    7483             :                         NDR_SAMR_GETMEMBERSINALIAS, mem_ctx, r);
    7484             : 
    7485        1311 :         return status;
    7486             : }
    7487             : 
    7488             : struct dcerpc_samr_GetMembersInAlias_state {
    7489             :         struct samr_GetMembersInAlias orig;
    7490             :         struct samr_GetMembersInAlias tmp;
    7491             :         TALLOC_CTX *out_mem_ctx;
    7492             : };
    7493             : 
    7494             : static void dcerpc_samr_GetMembersInAlias_done(struct tevent_req *subreq);
    7495             : 
    7496           0 : struct tevent_req *dcerpc_samr_GetMembersInAlias_send(TALLOC_CTX *mem_ctx,
    7497             :                                                       struct tevent_context *ev,
    7498             :                                                       struct dcerpc_binding_handle *h,
    7499             :                                                       struct policy_handle *_alias_handle /* [in] [ref] */,
    7500             :                                                       struct lsa_SidArray *_sids /* [out] [ref] */)
    7501             : {
    7502           0 :         struct tevent_req *req;
    7503           0 :         struct dcerpc_samr_GetMembersInAlias_state *state;
    7504           0 :         struct tevent_req *subreq;
    7505             : 
    7506           0 :         req = tevent_req_create(mem_ctx, &state,
    7507             :                                 struct dcerpc_samr_GetMembersInAlias_state);
    7508           0 :         if (req == NULL) {
    7509           0 :                 return NULL;
    7510             :         }
    7511           0 :         state->out_mem_ctx = NULL;
    7512             : 
    7513             :         /* In parameters */
    7514           0 :         state->orig.in.alias_handle = _alias_handle;
    7515             : 
    7516             :         /* Out parameters */
    7517           0 :         state->orig.out.sids = _sids;
    7518             : 
    7519             :         /* Result */
    7520           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7521             : 
    7522           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    7523             :                              "dcerpc_samr_GetMembersInAlias_out_memory");
    7524           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7525           0 :                 return tevent_req_post(req, ev);
    7526             :         }
    7527             : 
    7528             :         /* make a temporary copy, that we pass to the dispatch function */
    7529           0 :         state->tmp = state->orig;
    7530             : 
    7531           0 :         subreq = dcerpc_samr_GetMembersInAlias_r_send(state, ev, h, &state->tmp);
    7532           0 :         if (tevent_req_nomem(subreq, req)) {
    7533           0 :                 return tevent_req_post(req, ev);
    7534             :         }
    7535           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetMembersInAlias_done, req);
    7536           0 :         return req;
    7537             : }
    7538             : 
    7539           0 : static void dcerpc_samr_GetMembersInAlias_done(struct tevent_req *subreq)
    7540             : {
    7541           0 :         struct tevent_req *req = tevent_req_callback_data(
    7542             :                 subreq, struct tevent_req);
    7543           0 :         struct dcerpc_samr_GetMembersInAlias_state *state = tevent_req_data(
    7544             :                 req, struct dcerpc_samr_GetMembersInAlias_state);
    7545           0 :         NTSTATUS status;
    7546           0 :         TALLOC_CTX *mem_ctx;
    7547             : 
    7548           0 :         if (state->out_mem_ctx) {
    7549           0 :                 mem_ctx = state->out_mem_ctx;
    7550             :         } else {
    7551           0 :                 mem_ctx = state;
    7552             :         }
    7553             : 
    7554           0 :         status = dcerpc_samr_GetMembersInAlias_r_recv(subreq, mem_ctx);
    7555           0 :         TALLOC_FREE(subreq);
    7556           0 :         if (tevent_req_nterror(req, status)) {
    7557           0 :                 return;
    7558             :         }
    7559             : 
    7560             :         /* Copy out parameters */
    7561           0 :         *state->orig.out.sids = *state->tmp.out.sids;
    7562             : 
    7563             :         /* Copy result */
    7564           0 :         state->orig.out.result = state->tmp.out.result;
    7565             : 
    7566             :         /* Reset temporary structure */
    7567           0 :         NDR_ZERO_STRUCT(state->tmp);
    7568             : 
    7569           0 :         tevent_req_done(req);
    7570             : }
    7571             : 
    7572           0 : NTSTATUS dcerpc_samr_GetMembersInAlias_recv(struct tevent_req *req,
    7573             :                                             TALLOC_CTX *mem_ctx,
    7574             :                                             NTSTATUS *result)
    7575             : {
    7576           0 :         struct dcerpc_samr_GetMembersInAlias_state *state = tevent_req_data(
    7577             :                 req, struct dcerpc_samr_GetMembersInAlias_state);
    7578           0 :         NTSTATUS status;
    7579             : 
    7580           0 :         if (tevent_req_is_nterror(req, &status)) {
    7581           0 :                 tevent_req_received(req);
    7582           0 :                 return status;
    7583             :         }
    7584             : 
    7585             :         /* Steal possible out parameters to the callers context */
    7586           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7587             : 
    7588             :         /* Return result */
    7589           0 :         *result = state->orig.out.result;
    7590             : 
    7591           0 :         tevent_req_received(req);
    7592           0 :         return NT_STATUS_OK;
    7593             : }
    7594             : 
    7595        1224 : NTSTATUS dcerpc_samr_GetMembersInAlias(struct dcerpc_binding_handle *h,
    7596             :                                        TALLOC_CTX *mem_ctx,
    7597             :                                        struct policy_handle *_alias_handle /* [in] [ref] */,
    7598             :                                        struct lsa_SidArray *_sids /* [out] [ref] */,
    7599             :                                        NTSTATUS *result)
    7600             : {
    7601           0 :         struct samr_GetMembersInAlias r;
    7602           0 :         NTSTATUS status;
    7603             : 
    7604             :         /* In parameters */
    7605        1224 :         r.in.alias_handle = _alias_handle;
    7606             : 
    7607             :         /* Out parameters */
    7608        1224 :         r.out.sids = _sids;
    7609             : 
    7610             :         /* Result */
    7611        1224 :         NDR_ZERO_STRUCT(r.out.result);
    7612             : 
    7613        1224 :         status = dcerpc_samr_GetMembersInAlias_r(h, mem_ctx, &r);
    7614        1224 :         if (!NT_STATUS_IS_OK(status)) {
    7615           0 :                 return status;
    7616             :         }
    7617             : 
    7618             :         /* Return variables */
    7619        1224 :         *_sids = *r.out.sids;
    7620             : 
    7621             :         /* Return result */
    7622        1224 :         *result = r.out.result;
    7623             : 
    7624        1224 :         return NT_STATUS_OK;
    7625             : }
    7626             : 
    7627             : struct dcerpc_samr_OpenUser_r_state {
    7628             :         TALLOC_CTX *out_mem_ctx;
    7629             : };
    7630             : 
    7631             : static void dcerpc_samr_OpenUser_r_done(struct tevent_req *subreq);
    7632             : 
    7633          57 : struct tevent_req *dcerpc_samr_OpenUser_r_send(TALLOC_CTX *mem_ctx,
    7634             :         struct tevent_context *ev,
    7635             :         struct dcerpc_binding_handle *h,
    7636             :         struct samr_OpenUser *r)
    7637             : {
    7638           0 :         struct tevent_req *req;
    7639           0 :         struct dcerpc_samr_OpenUser_r_state *state;
    7640           0 :         struct tevent_req *subreq;
    7641             : 
    7642          57 :         req = tevent_req_create(mem_ctx, &state,
    7643             :                                 struct dcerpc_samr_OpenUser_r_state);
    7644          57 :         if (req == NULL) {
    7645           0 :                 return NULL;
    7646             :         }
    7647             : 
    7648          57 :         state->out_mem_ctx = talloc_new(state);
    7649          57 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7650           0 :                 return tevent_req_post(req, ev);
    7651             :         }
    7652             : 
    7653          57 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7654             :                         NULL, &ndr_table_samr,
    7655          57 :                         NDR_SAMR_OPENUSER, state->out_mem_ctx, r);
    7656          57 :         if (tevent_req_nomem(subreq, req)) {
    7657           0 :                 return tevent_req_post(req, ev);
    7658             :         }
    7659          57 :         tevent_req_set_callback(subreq, dcerpc_samr_OpenUser_r_done, req);
    7660             : 
    7661          57 :         return req;
    7662             : }
    7663             : 
    7664          57 : static void dcerpc_samr_OpenUser_r_done(struct tevent_req *subreq)
    7665             : {
    7666           0 :         struct tevent_req *req =
    7667          57 :                 tevent_req_callback_data(subreq,
    7668             :                 struct tevent_req);
    7669           0 :         NTSTATUS status;
    7670             : 
    7671          57 :         status = dcerpc_binding_handle_call_recv(subreq);
    7672          57 :         TALLOC_FREE(subreq);
    7673          57 :         if (tevent_req_nterror(req, status)) {
    7674           0 :                 return;
    7675             :         }
    7676             : 
    7677          57 :         tevent_req_done(req);
    7678             : }
    7679             : 
    7680          57 : NTSTATUS dcerpc_samr_OpenUser_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7681             : {
    7682           0 :         struct dcerpc_samr_OpenUser_r_state *state =
    7683          57 :                 tevent_req_data(req,
    7684             :                 struct dcerpc_samr_OpenUser_r_state);
    7685           0 :         NTSTATUS status;
    7686             : 
    7687          57 :         if (tevent_req_is_nterror(req, &status)) {
    7688           0 :                 tevent_req_received(req);
    7689           0 :                 return status;
    7690             :         }
    7691             : 
    7692          57 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7693             : 
    7694          57 :         tevent_req_received(req);
    7695          57 :         return NT_STATUS_OK;
    7696             : }
    7697             : 
    7698        2329 : NTSTATUS dcerpc_samr_OpenUser_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_OpenUser *r)
    7699             : {
    7700           0 :         NTSTATUS status;
    7701             : 
    7702        2329 :         status = dcerpc_binding_handle_call(h,
    7703             :                         NULL, &ndr_table_samr,
    7704             :                         NDR_SAMR_OPENUSER, mem_ctx, r);
    7705             : 
    7706        2329 :         return status;
    7707             : }
    7708             : 
    7709             : struct dcerpc_samr_OpenUser_state {
    7710             :         struct samr_OpenUser orig;
    7711             :         struct samr_OpenUser tmp;
    7712             :         TALLOC_CTX *out_mem_ctx;
    7713             : };
    7714             : 
    7715             : static void dcerpc_samr_OpenUser_done(struct tevent_req *subreq);
    7716             : 
    7717           0 : struct tevent_req *dcerpc_samr_OpenUser_send(TALLOC_CTX *mem_ctx,
    7718             :                                              struct tevent_context *ev,
    7719             :                                              struct dcerpc_binding_handle *h,
    7720             :                                              struct policy_handle *_domain_handle /* [in] [ref] */,
    7721             :                                              uint32_t _access_mask /* [in]  */,
    7722             :                                              uint32_t _rid /* [in]  */,
    7723             :                                              struct policy_handle *_user_handle /* [out] [ref] */)
    7724             : {
    7725           0 :         struct tevent_req *req;
    7726           0 :         struct dcerpc_samr_OpenUser_state *state;
    7727           0 :         struct tevent_req *subreq;
    7728             : 
    7729           0 :         req = tevent_req_create(mem_ctx, &state,
    7730             :                                 struct dcerpc_samr_OpenUser_state);
    7731           0 :         if (req == NULL) {
    7732           0 :                 return NULL;
    7733             :         }
    7734           0 :         state->out_mem_ctx = NULL;
    7735             : 
    7736             :         /* In parameters */
    7737           0 :         state->orig.in.domain_handle = _domain_handle;
    7738           0 :         state->orig.in.access_mask = _access_mask;
    7739           0 :         state->orig.in.rid = _rid;
    7740             : 
    7741             :         /* Out parameters */
    7742           0 :         state->orig.out.user_handle = _user_handle;
    7743             : 
    7744             :         /* Result */
    7745           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7746             : 
    7747           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    7748             :                              "dcerpc_samr_OpenUser_out_memory");
    7749           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7750           0 :                 return tevent_req_post(req, ev);
    7751             :         }
    7752             : 
    7753             :         /* make a temporary copy, that we pass to the dispatch function */
    7754           0 :         state->tmp = state->orig;
    7755             : 
    7756           0 :         subreq = dcerpc_samr_OpenUser_r_send(state, ev, h, &state->tmp);
    7757           0 :         if (tevent_req_nomem(subreq, req)) {
    7758           0 :                 return tevent_req_post(req, ev);
    7759             :         }
    7760           0 :         tevent_req_set_callback(subreq, dcerpc_samr_OpenUser_done, req);
    7761           0 :         return req;
    7762             : }
    7763             : 
    7764           0 : static void dcerpc_samr_OpenUser_done(struct tevent_req *subreq)
    7765             : {
    7766           0 :         struct tevent_req *req = tevent_req_callback_data(
    7767             :                 subreq, struct tevent_req);
    7768           0 :         struct dcerpc_samr_OpenUser_state *state = tevent_req_data(
    7769             :                 req, struct dcerpc_samr_OpenUser_state);
    7770           0 :         NTSTATUS status;
    7771           0 :         TALLOC_CTX *mem_ctx;
    7772             : 
    7773           0 :         if (state->out_mem_ctx) {
    7774           0 :                 mem_ctx = state->out_mem_ctx;
    7775             :         } else {
    7776           0 :                 mem_ctx = state;
    7777             :         }
    7778             : 
    7779           0 :         status = dcerpc_samr_OpenUser_r_recv(subreq, mem_ctx);
    7780           0 :         TALLOC_FREE(subreq);
    7781           0 :         if (tevent_req_nterror(req, status)) {
    7782           0 :                 return;
    7783             :         }
    7784             : 
    7785             :         /* Copy out parameters */
    7786           0 :         *state->orig.out.user_handle = *state->tmp.out.user_handle;
    7787             : 
    7788             :         /* Copy result */
    7789           0 :         state->orig.out.result = state->tmp.out.result;
    7790             : 
    7791             :         /* Reset temporary structure */
    7792           0 :         NDR_ZERO_STRUCT(state->tmp);
    7793             : 
    7794           0 :         tevent_req_done(req);
    7795             : }
    7796             : 
    7797           0 : NTSTATUS dcerpc_samr_OpenUser_recv(struct tevent_req *req,
    7798             :                                    TALLOC_CTX *mem_ctx,
    7799             :                                    NTSTATUS *result)
    7800             : {
    7801           0 :         struct dcerpc_samr_OpenUser_state *state = tevent_req_data(
    7802             :                 req, struct dcerpc_samr_OpenUser_state);
    7803           0 :         NTSTATUS status;
    7804             : 
    7805           0 :         if (tevent_req_is_nterror(req, &status)) {
    7806           0 :                 tevent_req_received(req);
    7807           0 :                 return status;
    7808             :         }
    7809             : 
    7810             :         /* Steal possible out parameters to the callers context */
    7811           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7812             : 
    7813             :         /* Return result */
    7814           0 :         *result = state->orig.out.result;
    7815             : 
    7816           0 :         tevent_req_received(req);
    7817           0 :         return NT_STATUS_OK;
    7818             : }
    7819             : 
    7820         311 : NTSTATUS dcerpc_samr_OpenUser(struct dcerpc_binding_handle *h,
    7821             :                               TALLOC_CTX *mem_ctx,
    7822             :                               struct policy_handle *_domain_handle /* [in] [ref] */,
    7823             :                               uint32_t _access_mask /* [in]  */,
    7824             :                               uint32_t _rid /* [in]  */,
    7825             :                               struct policy_handle *_user_handle /* [out] [ref] */,
    7826             :                               NTSTATUS *result)
    7827             : {
    7828           0 :         struct samr_OpenUser r;
    7829           0 :         NTSTATUS status;
    7830             : 
    7831             :         /* In parameters */
    7832         311 :         r.in.domain_handle = _domain_handle;
    7833         311 :         r.in.access_mask = _access_mask;
    7834         311 :         r.in.rid = _rid;
    7835             : 
    7836             :         /* Out parameters */
    7837         311 :         r.out.user_handle = _user_handle;
    7838             : 
    7839             :         /* Result */
    7840         311 :         NDR_ZERO_STRUCT(r.out.result);
    7841             : 
    7842         311 :         status = dcerpc_samr_OpenUser_r(h, mem_ctx, &r);
    7843         311 :         if (!NT_STATUS_IS_OK(status)) {
    7844           0 :                 return status;
    7845             :         }
    7846             : 
    7847             :         /* Return variables */
    7848         311 :         *_user_handle = *r.out.user_handle;
    7849             : 
    7850             :         /* Return result */
    7851         311 :         *result = r.out.result;
    7852             : 
    7853         311 :         return NT_STATUS_OK;
    7854             : }
    7855             : 
    7856             : struct dcerpc_samr_DeleteUser_r_state {
    7857             :         TALLOC_CTX *out_mem_ctx;
    7858             : };
    7859             : 
    7860             : static void dcerpc_samr_DeleteUser_r_done(struct tevent_req *subreq);
    7861             : 
    7862           2 : struct tevent_req *dcerpc_samr_DeleteUser_r_send(TALLOC_CTX *mem_ctx,
    7863             :         struct tevent_context *ev,
    7864             :         struct dcerpc_binding_handle *h,
    7865             :         struct samr_DeleteUser *r)
    7866             : {
    7867           0 :         struct tevent_req *req;
    7868           0 :         struct dcerpc_samr_DeleteUser_r_state *state;
    7869           0 :         struct tevent_req *subreq;
    7870             : 
    7871           2 :         req = tevent_req_create(mem_ctx, &state,
    7872             :                                 struct dcerpc_samr_DeleteUser_r_state);
    7873           2 :         if (req == NULL) {
    7874           0 :                 return NULL;
    7875             :         }
    7876             : 
    7877           2 :         state->out_mem_ctx = talloc_new(state);
    7878           2 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7879           0 :                 return tevent_req_post(req, ev);
    7880             :         }
    7881             : 
    7882           2 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7883             :                         NULL, &ndr_table_samr,
    7884           2 :                         NDR_SAMR_DELETEUSER, state->out_mem_ctx, r);
    7885           2 :         if (tevent_req_nomem(subreq, req)) {
    7886           0 :                 return tevent_req_post(req, ev);
    7887             :         }
    7888           2 :         tevent_req_set_callback(subreq, dcerpc_samr_DeleteUser_r_done, req);
    7889             : 
    7890           2 :         return req;
    7891             : }
    7892             : 
    7893           2 : static void dcerpc_samr_DeleteUser_r_done(struct tevent_req *subreq)
    7894             : {
    7895           0 :         struct tevent_req *req =
    7896           2 :                 tevent_req_callback_data(subreq,
    7897             :                 struct tevent_req);
    7898           0 :         NTSTATUS status;
    7899             : 
    7900           2 :         status = dcerpc_binding_handle_call_recv(subreq);
    7901           2 :         TALLOC_FREE(subreq);
    7902           2 :         if (tevent_req_nterror(req, status)) {
    7903           0 :                 return;
    7904             :         }
    7905             : 
    7906           2 :         tevent_req_done(req);
    7907             : }
    7908             : 
    7909           2 : NTSTATUS dcerpc_samr_DeleteUser_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7910             : {
    7911           0 :         struct dcerpc_samr_DeleteUser_r_state *state =
    7912           2 :                 tevent_req_data(req,
    7913             :                 struct dcerpc_samr_DeleteUser_r_state);
    7914           0 :         NTSTATUS status;
    7915             : 
    7916           2 :         if (tevent_req_is_nterror(req, &status)) {
    7917           0 :                 tevent_req_received(req);
    7918           0 :                 return status;
    7919             :         }
    7920             : 
    7921           2 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7922             : 
    7923           2 :         tevent_req_received(req);
    7924           2 :         return NT_STATUS_OK;
    7925             : }
    7926             : 
    7927        1109 : NTSTATUS dcerpc_samr_DeleteUser_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_DeleteUser *r)
    7928             : {
    7929          72 :         NTSTATUS status;
    7930             : 
    7931        1109 :         status = dcerpc_binding_handle_call(h,
    7932             :                         NULL, &ndr_table_samr,
    7933             :                         NDR_SAMR_DELETEUSER, mem_ctx, r);
    7934             : 
    7935        1109 :         return status;
    7936             : }
    7937             : 
    7938             : struct dcerpc_samr_DeleteUser_state {
    7939             :         struct samr_DeleteUser orig;
    7940             :         struct samr_DeleteUser tmp;
    7941             :         TALLOC_CTX *out_mem_ctx;
    7942             : };
    7943             : 
    7944             : static void dcerpc_samr_DeleteUser_done(struct tevent_req *subreq);
    7945             : 
    7946           0 : struct tevent_req *dcerpc_samr_DeleteUser_send(TALLOC_CTX *mem_ctx,
    7947             :                                                struct tevent_context *ev,
    7948             :                                                struct dcerpc_binding_handle *h,
    7949             :                                                struct policy_handle *_user_handle /* [in,out] [ref] */)
    7950             : {
    7951           0 :         struct tevent_req *req;
    7952           0 :         struct dcerpc_samr_DeleteUser_state *state;
    7953           0 :         struct tevent_req *subreq;
    7954             : 
    7955           0 :         req = tevent_req_create(mem_ctx, &state,
    7956             :                                 struct dcerpc_samr_DeleteUser_state);
    7957           0 :         if (req == NULL) {
    7958           0 :                 return NULL;
    7959             :         }
    7960           0 :         state->out_mem_ctx = NULL;
    7961             : 
    7962             :         /* In parameters */
    7963           0 :         state->orig.in.user_handle = _user_handle;
    7964             : 
    7965             :         /* Out parameters */
    7966           0 :         state->orig.out.user_handle = _user_handle;
    7967             : 
    7968             :         /* Result */
    7969           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7970             : 
    7971           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    7972             :                              "dcerpc_samr_DeleteUser_out_memory");
    7973           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7974           0 :                 return tevent_req_post(req, ev);
    7975             :         }
    7976             : 
    7977             :         /* make a temporary copy, that we pass to the dispatch function */
    7978           0 :         state->tmp = state->orig;
    7979             : 
    7980           0 :         subreq = dcerpc_samr_DeleteUser_r_send(state, ev, h, &state->tmp);
    7981           0 :         if (tevent_req_nomem(subreq, req)) {
    7982           0 :                 return tevent_req_post(req, ev);
    7983             :         }
    7984           0 :         tevent_req_set_callback(subreq, dcerpc_samr_DeleteUser_done, req);
    7985           0 :         return req;
    7986             : }
    7987             : 
    7988           0 : static void dcerpc_samr_DeleteUser_done(struct tevent_req *subreq)
    7989             : {
    7990           0 :         struct tevent_req *req = tevent_req_callback_data(
    7991             :                 subreq, struct tevent_req);
    7992           0 :         struct dcerpc_samr_DeleteUser_state *state = tevent_req_data(
    7993             :                 req, struct dcerpc_samr_DeleteUser_state);
    7994           0 :         NTSTATUS status;
    7995           0 :         TALLOC_CTX *mem_ctx;
    7996             : 
    7997           0 :         if (state->out_mem_ctx) {
    7998           0 :                 mem_ctx = state->out_mem_ctx;
    7999             :         } else {
    8000           0 :                 mem_ctx = state;
    8001             :         }
    8002             : 
    8003           0 :         status = dcerpc_samr_DeleteUser_r_recv(subreq, mem_ctx);
    8004           0 :         TALLOC_FREE(subreq);
    8005           0 :         if (tevent_req_nterror(req, status)) {
    8006           0 :                 return;
    8007             :         }
    8008             : 
    8009             :         /* Copy out parameters */
    8010           0 :         *state->orig.out.user_handle = *state->tmp.out.user_handle;
    8011             : 
    8012             :         /* Copy result */
    8013           0 :         state->orig.out.result = state->tmp.out.result;
    8014             : 
    8015             :         /* Reset temporary structure */
    8016           0 :         NDR_ZERO_STRUCT(state->tmp);
    8017             : 
    8018           0 :         tevent_req_done(req);
    8019             : }
    8020             : 
    8021           0 : NTSTATUS dcerpc_samr_DeleteUser_recv(struct tevent_req *req,
    8022             :                                      TALLOC_CTX *mem_ctx,
    8023             :                                      NTSTATUS *result)
    8024             : {
    8025           0 :         struct dcerpc_samr_DeleteUser_state *state = tevent_req_data(
    8026             :                 req, struct dcerpc_samr_DeleteUser_state);
    8027           0 :         NTSTATUS status;
    8028             : 
    8029           0 :         if (tevent_req_is_nterror(req, &status)) {
    8030           0 :                 tevent_req_received(req);
    8031           0 :                 return status;
    8032             :         }
    8033             : 
    8034             :         /* Steal possible out parameters to the callers context */
    8035           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8036             : 
    8037             :         /* Return result */
    8038           0 :         *result = state->orig.out.result;
    8039             : 
    8040           0 :         tevent_req_received(req);
    8041           0 :         return NT_STATUS_OK;
    8042             : }
    8043             : 
    8044           6 : NTSTATUS dcerpc_samr_DeleteUser(struct dcerpc_binding_handle *h,
    8045             :                                 TALLOC_CTX *mem_ctx,
    8046             :                                 struct policy_handle *_user_handle /* [in,out] [ref] */,
    8047             :                                 NTSTATUS *result)
    8048             : {
    8049           0 :         struct samr_DeleteUser r;
    8050           0 :         NTSTATUS status;
    8051             : 
    8052             :         /* In parameters */
    8053           6 :         r.in.user_handle = _user_handle;
    8054             : 
    8055             :         /* Out parameters */
    8056           6 :         r.out.user_handle = _user_handle;
    8057             : 
    8058             :         /* Result */
    8059           6 :         NDR_ZERO_STRUCT(r.out.result);
    8060             : 
    8061           6 :         status = dcerpc_samr_DeleteUser_r(h, mem_ctx, &r);
    8062           6 :         if (!NT_STATUS_IS_OK(status)) {
    8063           0 :                 return status;
    8064             :         }
    8065             : 
    8066             :         /* Return variables */
    8067           6 :         *_user_handle = *r.out.user_handle;
    8068             : 
    8069             :         /* Return result */
    8070           6 :         *result = r.out.result;
    8071             : 
    8072           6 :         return NT_STATUS_OK;
    8073             : }
    8074             : 
    8075             : struct dcerpc_samr_QueryUserInfo_r_state {
    8076             :         TALLOC_CTX *out_mem_ctx;
    8077             : };
    8078             : 
    8079             : static void dcerpc_samr_QueryUserInfo_r_done(struct tevent_req *subreq);
    8080             : 
    8081          55 : struct tevent_req *dcerpc_samr_QueryUserInfo_r_send(TALLOC_CTX *mem_ctx,
    8082             :         struct tevent_context *ev,
    8083             :         struct dcerpc_binding_handle *h,
    8084             :         struct samr_QueryUserInfo *r)
    8085             : {
    8086           0 :         struct tevent_req *req;
    8087           0 :         struct dcerpc_samr_QueryUserInfo_r_state *state;
    8088           0 :         struct tevent_req *subreq;
    8089             : 
    8090          55 :         req = tevent_req_create(mem_ctx, &state,
    8091             :                                 struct dcerpc_samr_QueryUserInfo_r_state);
    8092          55 :         if (req == NULL) {
    8093           0 :                 return NULL;
    8094             :         }
    8095             : 
    8096          55 :         state->out_mem_ctx = talloc_new(state);
    8097          55 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8098           0 :                 return tevent_req_post(req, ev);
    8099             :         }
    8100             : 
    8101          55 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8102             :                         NULL, &ndr_table_samr,
    8103          55 :                         NDR_SAMR_QUERYUSERINFO, state->out_mem_ctx, r);
    8104          55 :         if (tevent_req_nomem(subreq, req)) {
    8105           0 :                 return tevent_req_post(req, ev);
    8106             :         }
    8107          55 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryUserInfo_r_done, req);
    8108             : 
    8109          55 :         return req;
    8110             : }
    8111             : 
    8112          55 : static void dcerpc_samr_QueryUserInfo_r_done(struct tevent_req *subreq)
    8113             : {
    8114           0 :         struct tevent_req *req =
    8115          55 :                 tevent_req_callback_data(subreq,
    8116             :                 struct tevent_req);
    8117           0 :         NTSTATUS status;
    8118             : 
    8119          55 :         status = dcerpc_binding_handle_call_recv(subreq);
    8120          55 :         TALLOC_FREE(subreq);
    8121          55 :         if (tevent_req_nterror(req, status)) {
    8122           0 :                 return;
    8123             :         }
    8124             : 
    8125          55 :         tevent_req_done(req);
    8126             : }
    8127             : 
    8128          55 : NTSTATUS dcerpc_samr_QueryUserInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8129             : {
    8130           0 :         struct dcerpc_samr_QueryUserInfo_r_state *state =
    8131          55 :                 tevent_req_data(req,
    8132             :                 struct dcerpc_samr_QueryUserInfo_r_state);
    8133           0 :         NTSTATUS status;
    8134             : 
    8135          55 :         if (tevent_req_is_nterror(req, &status)) {
    8136           0 :                 tevent_req_received(req);
    8137           0 :                 return status;
    8138             :         }
    8139             : 
    8140          55 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8141             : 
    8142          55 :         tevent_req_received(req);
    8143          55 :         return NT_STATUS_OK;
    8144             : }
    8145             : 
    8146       12054 : NTSTATUS dcerpc_samr_QueryUserInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_QueryUserInfo *r)
    8147             : {
    8148          72 :         NTSTATUS status;
    8149             : 
    8150       12054 :         status = dcerpc_binding_handle_call(h,
    8151             :                         NULL, &ndr_table_samr,
    8152             :                         NDR_SAMR_QUERYUSERINFO, mem_ctx, r);
    8153             : 
    8154       12054 :         return status;
    8155             : }
    8156             : 
    8157             : struct dcerpc_samr_QueryUserInfo_state {
    8158             :         struct samr_QueryUserInfo orig;
    8159             :         struct samr_QueryUserInfo tmp;
    8160             :         TALLOC_CTX *out_mem_ctx;
    8161             : };
    8162             : 
    8163             : static void dcerpc_samr_QueryUserInfo_done(struct tevent_req *subreq);
    8164             : 
    8165           0 : struct tevent_req *dcerpc_samr_QueryUserInfo_send(TALLOC_CTX *mem_ctx,
    8166             :                                                   struct tevent_context *ev,
    8167             :                                                   struct dcerpc_binding_handle *h,
    8168             :                                                   struct policy_handle *_user_handle /* [in] [ref] */,
    8169             :                                                   enum samr_UserInfoLevel _level /* [in]  */,
    8170             :                                                   union samr_UserInfo **_info /* [out] [ref,switch_is(level)] */)
    8171             : {
    8172           0 :         struct tevent_req *req;
    8173           0 :         struct dcerpc_samr_QueryUserInfo_state *state;
    8174           0 :         struct tevent_req *subreq;
    8175             : 
    8176           0 :         req = tevent_req_create(mem_ctx, &state,
    8177             :                                 struct dcerpc_samr_QueryUserInfo_state);
    8178           0 :         if (req == NULL) {
    8179           0 :                 return NULL;
    8180             :         }
    8181           0 :         state->out_mem_ctx = NULL;
    8182             : 
    8183             :         /* In parameters */
    8184           0 :         state->orig.in.user_handle = _user_handle;
    8185           0 :         state->orig.in.level = _level;
    8186             : 
    8187             :         /* Out parameters */
    8188           0 :         state->orig.out.info = _info;
    8189             : 
    8190             :         /* Result */
    8191           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8192             : 
    8193           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    8194             :                              "dcerpc_samr_QueryUserInfo_out_memory");
    8195           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8196           0 :                 return tevent_req_post(req, ev);
    8197             :         }
    8198             : 
    8199             :         /* make a temporary copy, that we pass to the dispatch function */
    8200           0 :         state->tmp = state->orig;
    8201             : 
    8202           0 :         subreq = dcerpc_samr_QueryUserInfo_r_send(state, ev, h, &state->tmp);
    8203           0 :         if (tevent_req_nomem(subreq, req)) {
    8204           0 :                 return tevent_req_post(req, ev);
    8205             :         }
    8206           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryUserInfo_done, req);
    8207           0 :         return req;
    8208             : }
    8209             : 
    8210           0 : static void dcerpc_samr_QueryUserInfo_done(struct tevent_req *subreq)
    8211             : {
    8212           0 :         struct tevent_req *req = tevent_req_callback_data(
    8213             :                 subreq, struct tevent_req);
    8214           0 :         struct dcerpc_samr_QueryUserInfo_state *state = tevent_req_data(
    8215             :                 req, struct dcerpc_samr_QueryUserInfo_state);
    8216           0 :         NTSTATUS status;
    8217           0 :         TALLOC_CTX *mem_ctx;
    8218             : 
    8219           0 :         if (state->out_mem_ctx) {
    8220           0 :                 mem_ctx = state->out_mem_ctx;
    8221             :         } else {
    8222           0 :                 mem_ctx = state;
    8223             :         }
    8224             : 
    8225           0 :         status = dcerpc_samr_QueryUserInfo_r_recv(subreq, mem_ctx);
    8226           0 :         TALLOC_FREE(subreq);
    8227           0 :         if (tevent_req_nterror(req, status)) {
    8228           0 :                 return;
    8229             :         }
    8230             : 
    8231             :         /* Copy out parameters */
    8232           0 :         *state->orig.out.info = *state->tmp.out.info;
    8233             : 
    8234             :         /* Copy result */
    8235           0 :         state->orig.out.result = state->tmp.out.result;
    8236             : 
    8237             :         /* Reset temporary structure */
    8238           0 :         NDR_ZERO_STRUCT(state->tmp);
    8239             : 
    8240           0 :         tevent_req_done(req);
    8241             : }
    8242             : 
    8243           0 : NTSTATUS dcerpc_samr_QueryUserInfo_recv(struct tevent_req *req,
    8244             :                                         TALLOC_CTX *mem_ctx,
    8245             :                                         NTSTATUS *result)
    8246             : {
    8247           0 :         struct dcerpc_samr_QueryUserInfo_state *state = tevent_req_data(
    8248             :                 req, struct dcerpc_samr_QueryUserInfo_state);
    8249           0 :         NTSTATUS status;
    8250             : 
    8251           0 :         if (tevent_req_is_nterror(req, &status)) {
    8252           0 :                 tevent_req_received(req);
    8253           0 :                 return status;
    8254             :         }
    8255             : 
    8256             :         /* Steal possible out parameters to the callers context */
    8257           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8258             : 
    8259             :         /* Return result */
    8260           0 :         *result = state->orig.out.result;
    8261             : 
    8262           0 :         tevent_req_received(req);
    8263           0 :         return NT_STATUS_OK;
    8264             : }
    8265             : 
    8266         214 : NTSTATUS dcerpc_samr_QueryUserInfo(struct dcerpc_binding_handle *h,
    8267             :                                    TALLOC_CTX *mem_ctx,
    8268             :                                    struct policy_handle *_user_handle /* [in] [ref] */,
    8269             :                                    enum samr_UserInfoLevel _level /* [in]  */,
    8270             :                                    union samr_UserInfo **_info /* [out] [ref,switch_is(level)] */,
    8271             :                                    NTSTATUS *result)
    8272             : {
    8273           0 :         struct samr_QueryUserInfo r;
    8274           0 :         NTSTATUS status;
    8275             : 
    8276             :         /* In parameters */
    8277         214 :         r.in.user_handle = _user_handle;
    8278         214 :         r.in.level = _level;
    8279             : 
    8280             :         /* Out parameters */
    8281         214 :         r.out.info = _info;
    8282             : 
    8283             :         /* Result */
    8284         214 :         NDR_ZERO_STRUCT(r.out.result);
    8285             : 
    8286         214 :         status = dcerpc_samr_QueryUserInfo_r(h, mem_ctx, &r);
    8287         214 :         if (!NT_STATUS_IS_OK(status)) {
    8288           0 :                 return status;
    8289             :         }
    8290             : 
    8291             :         /* Return variables */
    8292         214 :         *_info = *r.out.info;
    8293             : 
    8294             :         /* Return result */
    8295         214 :         *result = r.out.result;
    8296             : 
    8297         214 :         return NT_STATUS_OK;
    8298             : }
    8299             : 
    8300             : struct dcerpc_samr_SetUserInfo_r_state {
    8301             :         TALLOC_CTX *out_mem_ctx;
    8302             : };
    8303             : 
    8304             : static void dcerpc_samr_SetUserInfo_r_done(struct tevent_req *subreq);
    8305             : 
    8306          59 : struct tevent_req *dcerpc_samr_SetUserInfo_r_send(TALLOC_CTX *mem_ctx,
    8307             :         struct tevent_context *ev,
    8308             :         struct dcerpc_binding_handle *h,
    8309             :         struct samr_SetUserInfo *r)
    8310             : {
    8311           0 :         struct tevent_req *req;
    8312           0 :         struct dcerpc_samr_SetUserInfo_r_state *state;
    8313           0 :         struct tevent_req *subreq;
    8314             : 
    8315          59 :         req = tevent_req_create(mem_ctx, &state,
    8316             :                                 struct dcerpc_samr_SetUserInfo_r_state);
    8317          59 :         if (req == NULL) {
    8318           0 :                 return NULL;
    8319             :         }
    8320             : 
    8321          59 :         state->out_mem_ctx = NULL;
    8322             : 
    8323          59 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8324             :                         NULL, &ndr_table_samr,
    8325             :                         NDR_SAMR_SETUSERINFO, state, r);
    8326          59 :         if (tevent_req_nomem(subreq, req)) {
    8327           0 :                 return tevent_req_post(req, ev);
    8328             :         }
    8329          59 :         tevent_req_set_callback(subreq, dcerpc_samr_SetUserInfo_r_done, req);
    8330             : 
    8331          59 :         return req;
    8332             : }
    8333             : 
    8334          59 : static void dcerpc_samr_SetUserInfo_r_done(struct tevent_req *subreq)
    8335             : {
    8336           0 :         struct tevent_req *req =
    8337          59 :                 tevent_req_callback_data(subreq,
    8338             :                 struct tevent_req);
    8339           0 :         NTSTATUS status;
    8340             : 
    8341          59 :         status = dcerpc_binding_handle_call_recv(subreq);
    8342          59 :         TALLOC_FREE(subreq);
    8343          59 :         if (tevent_req_nterror(req, status)) {
    8344           0 :                 return;
    8345             :         }
    8346             : 
    8347          59 :         tevent_req_done(req);
    8348             : }
    8349             : 
    8350          59 : NTSTATUS dcerpc_samr_SetUserInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8351             : {
    8352           0 :         struct dcerpc_samr_SetUserInfo_r_state *state =
    8353          59 :                 tevent_req_data(req,
    8354             :                 struct dcerpc_samr_SetUserInfo_r_state);
    8355           0 :         NTSTATUS status;
    8356             : 
    8357          59 :         if (tevent_req_is_nterror(req, &status)) {
    8358           0 :                 tevent_req_received(req);
    8359           0 :                 return status;
    8360             :         }
    8361             : 
    8362          59 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8363             : 
    8364          59 :         tevent_req_received(req);
    8365          59 :         return NT_STATUS_OK;
    8366             : }
    8367             : 
    8368        3031 : NTSTATUS dcerpc_samr_SetUserInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_SetUserInfo *r)
    8369             : {
    8370          72 :         NTSTATUS status;
    8371             : 
    8372        3031 :         status = dcerpc_binding_handle_call(h,
    8373             :                         NULL, &ndr_table_samr,
    8374             :                         NDR_SAMR_SETUSERINFO, mem_ctx, r);
    8375             : 
    8376        3031 :         return status;
    8377             : }
    8378             : 
    8379             : struct dcerpc_samr_SetUserInfo_state {
    8380             :         struct samr_SetUserInfo orig;
    8381             :         struct samr_SetUserInfo tmp;
    8382             :         TALLOC_CTX *out_mem_ctx;
    8383             : };
    8384             : 
    8385             : static void dcerpc_samr_SetUserInfo_done(struct tevent_req *subreq);
    8386             : 
    8387           0 : struct tevent_req *dcerpc_samr_SetUserInfo_send(TALLOC_CTX *mem_ctx,
    8388             :                                                 struct tevent_context *ev,
    8389             :                                                 struct dcerpc_binding_handle *h,
    8390             :                                                 struct policy_handle *_user_handle /* [in] [ref] */,
    8391             :                                                 enum samr_UserInfoLevel _level /* [in]  */,
    8392             :                                                 union samr_UserInfo *_info /* [in] [ref,switch_is(level)] */)
    8393             : {
    8394           0 :         struct tevent_req *req;
    8395           0 :         struct dcerpc_samr_SetUserInfo_state *state;
    8396           0 :         struct tevent_req *subreq;
    8397             : 
    8398           0 :         req = tevent_req_create(mem_ctx, &state,
    8399             :                                 struct dcerpc_samr_SetUserInfo_state);
    8400           0 :         if (req == NULL) {
    8401           0 :                 return NULL;
    8402             :         }
    8403           0 :         state->out_mem_ctx = NULL;
    8404             : 
    8405             :         /* In parameters */
    8406           0 :         state->orig.in.user_handle = _user_handle;
    8407           0 :         state->orig.in.level = _level;
    8408           0 :         state->orig.in.info = _info;
    8409             : 
    8410             :         /* Out parameters */
    8411             : 
    8412             :         /* Result */
    8413           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8414             : 
    8415             :         /* make a temporary copy, that we pass to the dispatch function */
    8416           0 :         state->tmp = state->orig;
    8417             : 
    8418           0 :         subreq = dcerpc_samr_SetUserInfo_r_send(state, ev, h, &state->tmp);
    8419           0 :         if (tevent_req_nomem(subreq, req)) {
    8420           0 :                 return tevent_req_post(req, ev);
    8421             :         }
    8422           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetUserInfo_done, req);
    8423           0 :         return req;
    8424             : }
    8425             : 
    8426           0 : static void dcerpc_samr_SetUserInfo_done(struct tevent_req *subreq)
    8427             : {
    8428           0 :         struct tevent_req *req = tevent_req_callback_data(
    8429             :                 subreq, struct tevent_req);
    8430           0 :         struct dcerpc_samr_SetUserInfo_state *state = tevent_req_data(
    8431             :                 req, struct dcerpc_samr_SetUserInfo_state);
    8432           0 :         NTSTATUS status;
    8433           0 :         TALLOC_CTX *mem_ctx;
    8434             : 
    8435           0 :         if (state->out_mem_ctx) {
    8436           0 :                 mem_ctx = state->out_mem_ctx;
    8437             :         } else {
    8438           0 :                 mem_ctx = state;
    8439             :         }
    8440             : 
    8441           0 :         status = dcerpc_samr_SetUserInfo_r_recv(subreq, mem_ctx);
    8442           0 :         TALLOC_FREE(subreq);
    8443           0 :         if (tevent_req_nterror(req, status)) {
    8444           0 :                 return;
    8445             :         }
    8446             : 
    8447             :         /* Copy out parameters */
    8448             : 
    8449             :         /* Copy result */
    8450           0 :         state->orig.out.result = state->tmp.out.result;
    8451             : 
    8452             :         /* Reset temporary structure */
    8453           0 :         NDR_ZERO_STRUCT(state->tmp);
    8454             : 
    8455           0 :         tevent_req_done(req);
    8456             : }
    8457             : 
    8458           0 : NTSTATUS dcerpc_samr_SetUserInfo_recv(struct tevent_req *req,
    8459             :                                       TALLOC_CTX *mem_ctx,
    8460             :                                       NTSTATUS *result)
    8461             : {
    8462           0 :         struct dcerpc_samr_SetUserInfo_state *state = tevent_req_data(
    8463             :                 req, struct dcerpc_samr_SetUserInfo_state);
    8464           0 :         NTSTATUS status;
    8465             : 
    8466           0 :         if (tevent_req_is_nterror(req, &status)) {
    8467           0 :                 tevent_req_received(req);
    8468           0 :                 return status;
    8469             :         }
    8470             : 
    8471             :         /* Steal possible out parameters to the callers context */
    8472           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8473             : 
    8474             :         /* Return result */
    8475           0 :         *result = state->orig.out.result;
    8476             : 
    8477           0 :         tevent_req_received(req);
    8478           0 :         return NT_STATUS_OK;
    8479             : }
    8480             : 
    8481           4 : NTSTATUS dcerpc_samr_SetUserInfo(struct dcerpc_binding_handle *h,
    8482             :                                  TALLOC_CTX *mem_ctx,
    8483             :                                  struct policy_handle *_user_handle /* [in] [ref] */,
    8484             :                                  enum samr_UserInfoLevel _level /* [in]  */,
    8485             :                                  union samr_UserInfo *_info /* [in] [ref,switch_is(level)] */,
    8486             :                                  NTSTATUS *result)
    8487             : {
    8488           0 :         struct samr_SetUserInfo r;
    8489           0 :         NTSTATUS status;
    8490             : 
    8491             :         /* In parameters */
    8492           4 :         r.in.user_handle = _user_handle;
    8493           4 :         r.in.level = _level;
    8494           4 :         r.in.info = _info;
    8495             : 
    8496             :         /* Out parameters */
    8497             : 
    8498             :         /* Result */
    8499           4 :         NDR_ZERO_STRUCT(r.out.result);
    8500             : 
    8501           4 :         status = dcerpc_samr_SetUserInfo_r(h, mem_ctx, &r);
    8502           4 :         if (!NT_STATUS_IS_OK(status)) {
    8503           0 :                 return status;
    8504             :         }
    8505             : 
    8506             :         /* Return variables */
    8507             : 
    8508             :         /* Return result */
    8509           4 :         *result = r.out.result;
    8510             : 
    8511           4 :         return NT_STATUS_OK;
    8512             : }
    8513             : 
    8514             : struct dcerpc_samr_ChangePasswordUser_r_state {
    8515             :         TALLOC_CTX *out_mem_ctx;
    8516             : };
    8517             : 
    8518             : static void dcerpc_samr_ChangePasswordUser_r_done(struct tevent_req *subreq);
    8519             : 
    8520           0 : struct tevent_req *dcerpc_samr_ChangePasswordUser_r_send(TALLOC_CTX *mem_ctx,
    8521             :         struct tevent_context *ev,
    8522             :         struct dcerpc_binding_handle *h,
    8523             :         struct samr_ChangePasswordUser *r)
    8524             : {
    8525           0 :         struct tevent_req *req;
    8526           0 :         struct dcerpc_samr_ChangePasswordUser_r_state *state;
    8527           0 :         struct tevent_req *subreq;
    8528             : 
    8529           0 :         req = tevent_req_create(mem_ctx, &state,
    8530             :                                 struct dcerpc_samr_ChangePasswordUser_r_state);
    8531           0 :         if (req == NULL) {
    8532           0 :                 return NULL;
    8533             :         }
    8534             : 
    8535           0 :         state->out_mem_ctx = NULL;
    8536             : 
    8537           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8538             :                         NULL, &ndr_table_samr,
    8539             :                         NDR_SAMR_CHANGEPASSWORDUSER, state, r);
    8540           0 :         if (tevent_req_nomem(subreq, req)) {
    8541           0 :                 return tevent_req_post(req, ev);
    8542             :         }
    8543           0 :         tevent_req_set_callback(subreq, dcerpc_samr_ChangePasswordUser_r_done, req);
    8544             : 
    8545           0 :         return req;
    8546             : }
    8547             : 
    8548           0 : static void dcerpc_samr_ChangePasswordUser_r_done(struct tevent_req *subreq)
    8549             : {
    8550           0 :         struct tevent_req *req =
    8551           0 :                 tevent_req_callback_data(subreq,
    8552             :                 struct tevent_req);
    8553           0 :         NTSTATUS status;
    8554             : 
    8555           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    8556           0 :         TALLOC_FREE(subreq);
    8557           0 :         if (tevent_req_nterror(req, status)) {
    8558           0 :                 return;
    8559             :         }
    8560             : 
    8561           0 :         tevent_req_done(req);
    8562             : }
    8563             : 
    8564           0 : NTSTATUS dcerpc_samr_ChangePasswordUser_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8565             : {
    8566           0 :         struct dcerpc_samr_ChangePasswordUser_r_state *state =
    8567           0 :                 tevent_req_data(req,
    8568             :                 struct dcerpc_samr_ChangePasswordUser_r_state);
    8569           0 :         NTSTATUS status;
    8570             : 
    8571           0 :         if (tevent_req_is_nterror(req, &status)) {
    8572           0 :                 tevent_req_received(req);
    8573           0 :                 return status;
    8574             :         }
    8575             : 
    8576           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8577             : 
    8578           0 :         tevent_req_received(req);
    8579           0 :         return NT_STATUS_OK;
    8580             : }
    8581             : 
    8582          28 : NTSTATUS dcerpc_samr_ChangePasswordUser_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_ChangePasswordUser *r)
    8583             : {
    8584           0 :         NTSTATUS status;
    8585             : 
    8586          28 :         status = dcerpc_binding_handle_call(h,
    8587             :                         NULL, &ndr_table_samr,
    8588             :                         NDR_SAMR_CHANGEPASSWORDUSER, mem_ctx, r);
    8589             : 
    8590          28 :         return status;
    8591             : }
    8592             : 
    8593             : struct dcerpc_samr_ChangePasswordUser_state {
    8594             :         struct samr_ChangePasswordUser orig;
    8595             :         struct samr_ChangePasswordUser tmp;
    8596             :         TALLOC_CTX *out_mem_ctx;
    8597             : };
    8598             : 
    8599             : static void dcerpc_samr_ChangePasswordUser_done(struct tevent_req *subreq);
    8600             : 
    8601           0 : struct tevent_req *dcerpc_samr_ChangePasswordUser_send(TALLOC_CTX *mem_ctx,
    8602             :                                                        struct tevent_context *ev,
    8603             :                                                        struct dcerpc_binding_handle *h,
    8604             :                                                        struct policy_handle *_user_handle /* [in] [ref] */,
    8605             :                                                        uint8_t _lm_present /* [in]  */,
    8606             :                                                        struct samr_Password *_old_lm_crypted /* [in] [unique] */,
    8607             :                                                        struct samr_Password *_new_lm_crypted /* [in] [unique] */,
    8608             :                                                        uint8_t _nt_present /* [in]  */,
    8609             :                                                        struct samr_Password *_old_nt_crypted /* [in] [unique] */,
    8610             :                                                        struct samr_Password *_new_nt_crypted /* [in] [unique] */,
    8611             :                                                        uint8_t _cross1_present /* [in]  */,
    8612             :                                                        struct samr_Password *_nt_cross /* [in] [unique] */,
    8613             :                                                        uint8_t _cross2_present /* [in]  */,
    8614             :                                                        struct samr_Password *_lm_cross /* [in] [unique] */)
    8615             : {
    8616           0 :         struct tevent_req *req;
    8617           0 :         struct dcerpc_samr_ChangePasswordUser_state *state;
    8618           0 :         struct tevent_req *subreq;
    8619             : 
    8620           0 :         req = tevent_req_create(mem_ctx, &state,
    8621             :                                 struct dcerpc_samr_ChangePasswordUser_state);
    8622           0 :         if (req == NULL) {
    8623           0 :                 return NULL;
    8624             :         }
    8625           0 :         state->out_mem_ctx = NULL;
    8626             : 
    8627             :         /* In parameters */
    8628           0 :         state->orig.in.user_handle = _user_handle;
    8629           0 :         state->orig.in.lm_present = _lm_present;
    8630           0 :         state->orig.in.old_lm_crypted = _old_lm_crypted;
    8631           0 :         state->orig.in.new_lm_crypted = _new_lm_crypted;
    8632           0 :         state->orig.in.nt_present = _nt_present;
    8633           0 :         state->orig.in.old_nt_crypted = _old_nt_crypted;
    8634           0 :         state->orig.in.new_nt_crypted = _new_nt_crypted;
    8635           0 :         state->orig.in.cross1_present = _cross1_present;
    8636           0 :         state->orig.in.nt_cross = _nt_cross;
    8637           0 :         state->orig.in.cross2_present = _cross2_present;
    8638           0 :         state->orig.in.lm_cross = _lm_cross;
    8639             : 
    8640             :         /* Out parameters */
    8641             : 
    8642             :         /* Result */
    8643           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8644             : 
    8645             :         /* make a temporary copy, that we pass to the dispatch function */
    8646           0 :         state->tmp = state->orig;
    8647             : 
    8648           0 :         subreq = dcerpc_samr_ChangePasswordUser_r_send(state, ev, h, &state->tmp);
    8649           0 :         if (tevent_req_nomem(subreq, req)) {
    8650           0 :                 return tevent_req_post(req, ev);
    8651             :         }
    8652           0 :         tevent_req_set_callback(subreq, dcerpc_samr_ChangePasswordUser_done, req);
    8653           0 :         return req;
    8654             : }
    8655             : 
    8656           0 : static void dcerpc_samr_ChangePasswordUser_done(struct tevent_req *subreq)
    8657             : {
    8658           0 :         struct tevent_req *req = tevent_req_callback_data(
    8659             :                 subreq, struct tevent_req);
    8660           0 :         struct dcerpc_samr_ChangePasswordUser_state *state = tevent_req_data(
    8661             :                 req, struct dcerpc_samr_ChangePasswordUser_state);
    8662           0 :         NTSTATUS status;
    8663           0 :         TALLOC_CTX *mem_ctx;
    8664             : 
    8665           0 :         if (state->out_mem_ctx) {
    8666           0 :                 mem_ctx = state->out_mem_ctx;
    8667             :         } else {
    8668           0 :                 mem_ctx = state;
    8669             :         }
    8670             : 
    8671           0 :         status = dcerpc_samr_ChangePasswordUser_r_recv(subreq, mem_ctx);
    8672           0 :         TALLOC_FREE(subreq);
    8673           0 :         if (tevent_req_nterror(req, status)) {
    8674           0 :                 return;
    8675             :         }
    8676             : 
    8677             :         /* Copy out parameters */
    8678             : 
    8679             :         /* Copy result */
    8680           0 :         state->orig.out.result = state->tmp.out.result;
    8681             : 
    8682             :         /* Reset temporary structure */
    8683           0 :         NDR_ZERO_STRUCT(state->tmp);
    8684             : 
    8685           0 :         tevent_req_done(req);
    8686             : }
    8687             : 
    8688           0 : NTSTATUS dcerpc_samr_ChangePasswordUser_recv(struct tevent_req *req,
    8689             :                                              TALLOC_CTX *mem_ctx,
    8690             :                                              NTSTATUS *result)
    8691             : {
    8692           0 :         struct dcerpc_samr_ChangePasswordUser_state *state = tevent_req_data(
    8693             :                 req, struct dcerpc_samr_ChangePasswordUser_state);
    8694           0 :         NTSTATUS status;
    8695             : 
    8696           0 :         if (tevent_req_is_nterror(req, &status)) {
    8697           0 :                 tevent_req_received(req);
    8698           0 :                 return status;
    8699             :         }
    8700             : 
    8701             :         /* Steal possible out parameters to the callers context */
    8702           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8703             : 
    8704             :         /* Return result */
    8705           0 :         *result = state->orig.out.result;
    8706             : 
    8707           0 :         tevent_req_received(req);
    8708           0 :         return NT_STATUS_OK;
    8709             : }
    8710             : 
    8711           0 : NTSTATUS dcerpc_samr_ChangePasswordUser(struct dcerpc_binding_handle *h,
    8712             :                                         TALLOC_CTX *mem_ctx,
    8713             :                                         struct policy_handle *_user_handle /* [in] [ref] */,
    8714             :                                         uint8_t _lm_present /* [in]  */,
    8715             :                                         struct samr_Password *_old_lm_crypted /* [in] [unique] */,
    8716             :                                         struct samr_Password *_new_lm_crypted /* [in] [unique] */,
    8717             :                                         uint8_t _nt_present /* [in]  */,
    8718             :                                         struct samr_Password *_old_nt_crypted /* [in] [unique] */,
    8719             :                                         struct samr_Password *_new_nt_crypted /* [in] [unique] */,
    8720             :                                         uint8_t _cross1_present /* [in]  */,
    8721             :                                         struct samr_Password *_nt_cross /* [in] [unique] */,
    8722             :                                         uint8_t _cross2_present /* [in]  */,
    8723             :                                         struct samr_Password *_lm_cross /* [in] [unique] */,
    8724             :                                         NTSTATUS *result)
    8725             : {
    8726           0 :         struct samr_ChangePasswordUser r;
    8727           0 :         NTSTATUS status;
    8728             : 
    8729             :         /* In parameters */
    8730           0 :         r.in.user_handle = _user_handle;
    8731           0 :         r.in.lm_present = _lm_present;
    8732           0 :         r.in.old_lm_crypted = _old_lm_crypted;
    8733           0 :         r.in.new_lm_crypted = _new_lm_crypted;
    8734           0 :         r.in.nt_present = _nt_present;
    8735           0 :         r.in.old_nt_crypted = _old_nt_crypted;
    8736           0 :         r.in.new_nt_crypted = _new_nt_crypted;
    8737           0 :         r.in.cross1_present = _cross1_present;
    8738           0 :         r.in.nt_cross = _nt_cross;
    8739           0 :         r.in.cross2_present = _cross2_present;
    8740           0 :         r.in.lm_cross = _lm_cross;
    8741             : 
    8742             :         /* Out parameters */
    8743             : 
    8744             :         /* Result */
    8745           0 :         NDR_ZERO_STRUCT(r.out.result);
    8746             : 
    8747           0 :         status = dcerpc_samr_ChangePasswordUser_r(h, mem_ctx, &r);
    8748           0 :         if (!NT_STATUS_IS_OK(status)) {
    8749           0 :                 return status;
    8750             :         }
    8751             : 
    8752             :         /* Return variables */
    8753             : 
    8754             :         /* Return result */
    8755           0 :         *result = r.out.result;
    8756             : 
    8757           0 :         return NT_STATUS_OK;
    8758             : }
    8759             : 
    8760             : struct dcerpc_samr_GetGroupsForUser_r_state {
    8761             :         TALLOC_CTX *out_mem_ctx;
    8762             : };
    8763             : 
    8764             : static void dcerpc_samr_GetGroupsForUser_r_done(struct tevent_req *subreq);
    8765             : 
    8766           0 : struct tevent_req *dcerpc_samr_GetGroupsForUser_r_send(TALLOC_CTX *mem_ctx,
    8767             :         struct tevent_context *ev,
    8768             :         struct dcerpc_binding_handle *h,
    8769             :         struct samr_GetGroupsForUser *r)
    8770             : {
    8771           0 :         struct tevent_req *req;
    8772           0 :         struct dcerpc_samr_GetGroupsForUser_r_state *state;
    8773           0 :         struct tevent_req *subreq;
    8774             : 
    8775           0 :         req = tevent_req_create(mem_ctx, &state,
    8776             :                                 struct dcerpc_samr_GetGroupsForUser_r_state);
    8777           0 :         if (req == NULL) {
    8778           0 :                 return NULL;
    8779             :         }
    8780             : 
    8781           0 :         state->out_mem_ctx = talloc_new(state);
    8782           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8783           0 :                 return tevent_req_post(req, ev);
    8784             :         }
    8785             : 
    8786           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8787             :                         NULL, &ndr_table_samr,
    8788           0 :                         NDR_SAMR_GETGROUPSFORUSER, state->out_mem_ctx, r);
    8789           0 :         if (tevent_req_nomem(subreq, req)) {
    8790           0 :                 return tevent_req_post(req, ev);
    8791             :         }
    8792           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetGroupsForUser_r_done, req);
    8793             : 
    8794           0 :         return req;
    8795             : }
    8796             : 
    8797           0 : static void dcerpc_samr_GetGroupsForUser_r_done(struct tevent_req *subreq)
    8798             : {
    8799           0 :         struct tevent_req *req =
    8800           0 :                 tevent_req_callback_data(subreq,
    8801             :                 struct tevent_req);
    8802           0 :         NTSTATUS status;
    8803             : 
    8804           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    8805           0 :         TALLOC_FREE(subreq);
    8806           0 :         if (tevent_req_nterror(req, status)) {
    8807           0 :                 return;
    8808             :         }
    8809             : 
    8810           0 :         tevent_req_done(req);
    8811             : }
    8812             : 
    8813           0 : NTSTATUS dcerpc_samr_GetGroupsForUser_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8814             : {
    8815           0 :         struct dcerpc_samr_GetGroupsForUser_r_state *state =
    8816           0 :                 tevent_req_data(req,
    8817             :                 struct dcerpc_samr_GetGroupsForUser_r_state);
    8818           0 :         NTSTATUS status;
    8819             : 
    8820           0 :         if (tevent_req_is_nterror(req, &status)) {
    8821           0 :                 tevent_req_received(req);
    8822           0 :                 return status;
    8823             :         }
    8824             : 
    8825           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8826             : 
    8827           0 :         tevent_req_received(req);
    8828           0 :         return NT_STATUS_OK;
    8829             : }
    8830             : 
    8831         488 : NTSTATUS dcerpc_samr_GetGroupsForUser_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_GetGroupsForUser *r)
    8832             : {
    8833           0 :         NTSTATUS status;
    8834             : 
    8835         488 :         status = dcerpc_binding_handle_call(h,
    8836             :                         NULL, &ndr_table_samr,
    8837             :                         NDR_SAMR_GETGROUPSFORUSER, mem_ctx, r);
    8838             : 
    8839         488 :         return status;
    8840             : }
    8841             : 
    8842             : struct dcerpc_samr_GetGroupsForUser_state {
    8843             :         struct samr_GetGroupsForUser orig;
    8844             :         struct samr_GetGroupsForUser tmp;
    8845             :         TALLOC_CTX *out_mem_ctx;
    8846             : };
    8847             : 
    8848             : static void dcerpc_samr_GetGroupsForUser_done(struct tevent_req *subreq);
    8849             : 
    8850           0 : struct tevent_req *dcerpc_samr_GetGroupsForUser_send(TALLOC_CTX *mem_ctx,
    8851             :                                                      struct tevent_context *ev,
    8852             :                                                      struct dcerpc_binding_handle *h,
    8853             :                                                      struct policy_handle *_user_handle /* [in] [ref] */,
    8854             :                                                      struct samr_RidWithAttributeArray **_rids /* [out] [ref] */)
    8855             : {
    8856           0 :         struct tevent_req *req;
    8857           0 :         struct dcerpc_samr_GetGroupsForUser_state *state;
    8858           0 :         struct tevent_req *subreq;
    8859             : 
    8860           0 :         req = tevent_req_create(mem_ctx, &state,
    8861             :                                 struct dcerpc_samr_GetGroupsForUser_state);
    8862           0 :         if (req == NULL) {
    8863           0 :                 return NULL;
    8864             :         }
    8865           0 :         state->out_mem_ctx = NULL;
    8866             : 
    8867             :         /* In parameters */
    8868           0 :         state->orig.in.user_handle = _user_handle;
    8869             : 
    8870             :         /* Out parameters */
    8871           0 :         state->orig.out.rids = _rids;
    8872             : 
    8873             :         /* Result */
    8874           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8875             : 
    8876           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    8877             :                              "dcerpc_samr_GetGroupsForUser_out_memory");
    8878           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8879           0 :                 return tevent_req_post(req, ev);
    8880             :         }
    8881             : 
    8882             :         /* make a temporary copy, that we pass to the dispatch function */
    8883           0 :         state->tmp = state->orig;
    8884             : 
    8885           0 :         subreq = dcerpc_samr_GetGroupsForUser_r_send(state, ev, h, &state->tmp);
    8886           0 :         if (tevent_req_nomem(subreq, req)) {
    8887           0 :                 return tevent_req_post(req, ev);
    8888             :         }
    8889           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetGroupsForUser_done, req);
    8890           0 :         return req;
    8891             : }
    8892             : 
    8893           0 : static void dcerpc_samr_GetGroupsForUser_done(struct tevent_req *subreq)
    8894             : {
    8895           0 :         struct tevent_req *req = tevent_req_callback_data(
    8896             :                 subreq, struct tevent_req);
    8897           0 :         struct dcerpc_samr_GetGroupsForUser_state *state = tevent_req_data(
    8898             :                 req, struct dcerpc_samr_GetGroupsForUser_state);
    8899           0 :         NTSTATUS status;
    8900           0 :         TALLOC_CTX *mem_ctx;
    8901             : 
    8902           0 :         if (state->out_mem_ctx) {
    8903           0 :                 mem_ctx = state->out_mem_ctx;
    8904             :         } else {
    8905           0 :                 mem_ctx = state;
    8906             :         }
    8907             : 
    8908           0 :         status = dcerpc_samr_GetGroupsForUser_r_recv(subreq, mem_ctx);
    8909           0 :         TALLOC_FREE(subreq);
    8910           0 :         if (tevent_req_nterror(req, status)) {
    8911           0 :                 return;
    8912             :         }
    8913             : 
    8914             :         /* Copy out parameters */
    8915           0 :         *state->orig.out.rids = *state->tmp.out.rids;
    8916             : 
    8917             :         /* Copy result */
    8918           0 :         state->orig.out.result = state->tmp.out.result;
    8919             : 
    8920             :         /* Reset temporary structure */
    8921           0 :         NDR_ZERO_STRUCT(state->tmp);
    8922             : 
    8923           0 :         tevent_req_done(req);
    8924             : }
    8925             : 
    8926           0 : NTSTATUS dcerpc_samr_GetGroupsForUser_recv(struct tevent_req *req,
    8927             :                                            TALLOC_CTX *mem_ctx,
    8928             :                                            NTSTATUS *result)
    8929             : {
    8930           0 :         struct dcerpc_samr_GetGroupsForUser_state *state = tevent_req_data(
    8931             :                 req, struct dcerpc_samr_GetGroupsForUser_state);
    8932           0 :         NTSTATUS status;
    8933             : 
    8934           0 :         if (tevent_req_is_nterror(req, &status)) {
    8935           0 :                 tevent_req_received(req);
    8936           0 :                 return status;
    8937             :         }
    8938             : 
    8939             :         /* Steal possible out parameters to the callers context */
    8940           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8941             : 
    8942             :         /* Return result */
    8943           0 :         *result = state->orig.out.result;
    8944             : 
    8945           0 :         tevent_req_received(req);
    8946           0 :         return NT_STATUS_OK;
    8947             : }
    8948             : 
    8949          87 : NTSTATUS dcerpc_samr_GetGroupsForUser(struct dcerpc_binding_handle *h,
    8950             :                                       TALLOC_CTX *mem_ctx,
    8951             :                                       struct policy_handle *_user_handle /* [in] [ref] */,
    8952             :                                       struct samr_RidWithAttributeArray **_rids /* [out] [ref] */,
    8953             :                                       NTSTATUS *result)
    8954             : {
    8955           0 :         struct samr_GetGroupsForUser r;
    8956           0 :         NTSTATUS status;
    8957             : 
    8958             :         /* In parameters */
    8959          87 :         r.in.user_handle = _user_handle;
    8960             : 
    8961             :         /* Out parameters */
    8962          87 :         r.out.rids = _rids;
    8963             : 
    8964             :         /* Result */
    8965          87 :         NDR_ZERO_STRUCT(r.out.result);
    8966             : 
    8967          87 :         status = dcerpc_samr_GetGroupsForUser_r(h, mem_ctx, &r);
    8968          87 :         if (!NT_STATUS_IS_OK(status)) {
    8969           0 :                 return status;
    8970             :         }
    8971             : 
    8972             :         /* Return variables */
    8973          87 :         *_rids = *r.out.rids;
    8974             : 
    8975             :         /* Return result */
    8976          87 :         *result = r.out.result;
    8977             : 
    8978          87 :         return NT_STATUS_OK;
    8979             : }
    8980             : 
    8981             : struct dcerpc_samr_QueryDisplayInfo_r_state {
    8982             :         TALLOC_CTX *out_mem_ctx;
    8983             : };
    8984             : 
    8985             : static void dcerpc_samr_QueryDisplayInfo_r_done(struct tevent_req *subreq);
    8986             : 
    8987           0 : struct tevent_req *dcerpc_samr_QueryDisplayInfo_r_send(TALLOC_CTX *mem_ctx,
    8988             :         struct tevent_context *ev,
    8989             :         struct dcerpc_binding_handle *h,
    8990             :         struct samr_QueryDisplayInfo *r)
    8991             : {
    8992           0 :         struct tevent_req *req;
    8993           0 :         struct dcerpc_samr_QueryDisplayInfo_r_state *state;
    8994           0 :         struct tevent_req *subreq;
    8995             : 
    8996           0 :         req = tevent_req_create(mem_ctx, &state,
    8997             :                                 struct dcerpc_samr_QueryDisplayInfo_r_state);
    8998           0 :         if (req == NULL) {
    8999           0 :                 return NULL;
    9000             :         }
    9001             : 
    9002           0 :         state->out_mem_ctx = talloc_new(state);
    9003           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9004           0 :                 return tevent_req_post(req, ev);
    9005             :         }
    9006             : 
    9007           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9008             :                         NULL, &ndr_table_samr,
    9009           0 :                         NDR_SAMR_QUERYDISPLAYINFO, state->out_mem_ctx, r);
    9010           0 :         if (tevent_req_nomem(subreq, req)) {
    9011           0 :                 return tevent_req_post(req, ev);
    9012             :         }
    9013           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryDisplayInfo_r_done, req);
    9014             : 
    9015           0 :         return req;
    9016             : }
    9017             : 
    9018           0 : static void dcerpc_samr_QueryDisplayInfo_r_done(struct tevent_req *subreq)
    9019             : {
    9020           0 :         struct tevent_req *req =
    9021           0 :                 tevent_req_callback_data(subreq,
    9022             :                 struct tevent_req);
    9023           0 :         NTSTATUS status;
    9024             : 
    9025           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9026           0 :         TALLOC_FREE(subreq);
    9027           0 :         if (tevent_req_nterror(req, status)) {
    9028           0 :                 return;
    9029             :         }
    9030             : 
    9031           0 :         tevent_req_done(req);
    9032             : }
    9033             : 
    9034           0 : NTSTATUS dcerpc_samr_QueryDisplayInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9035             : {
    9036           0 :         struct dcerpc_samr_QueryDisplayInfo_r_state *state =
    9037           0 :                 tevent_req_data(req,
    9038             :                 struct dcerpc_samr_QueryDisplayInfo_r_state);
    9039           0 :         NTSTATUS status;
    9040             : 
    9041           0 :         if (tevent_req_is_nterror(req, &status)) {
    9042           0 :                 tevent_req_received(req);
    9043           0 :                 return status;
    9044             :         }
    9045             : 
    9046           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9047             : 
    9048           0 :         tevent_req_received(req);
    9049           0 :         return NT_STATUS_OK;
    9050             : }
    9051             : 
    9052         391 : NTSTATUS dcerpc_samr_QueryDisplayInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_QueryDisplayInfo *r)
    9053             : {
    9054           0 :         NTSTATUS status;
    9055             : 
    9056         391 :         status = dcerpc_binding_handle_call(h,
    9057             :                         NULL, &ndr_table_samr,
    9058             :                         NDR_SAMR_QUERYDISPLAYINFO, mem_ctx, r);
    9059             : 
    9060         391 :         return status;
    9061             : }
    9062             : 
    9063             : struct dcerpc_samr_QueryDisplayInfo_state {
    9064             :         struct samr_QueryDisplayInfo orig;
    9065             :         struct samr_QueryDisplayInfo tmp;
    9066             :         TALLOC_CTX *out_mem_ctx;
    9067             : };
    9068             : 
    9069             : static void dcerpc_samr_QueryDisplayInfo_done(struct tevent_req *subreq);
    9070             : 
    9071           0 : struct tevent_req *dcerpc_samr_QueryDisplayInfo_send(TALLOC_CTX *mem_ctx,
    9072             :                                                      struct tevent_context *ev,
    9073             :                                                      struct dcerpc_binding_handle *h,
    9074             :                                                      struct policy_handle *_domain_handle /* [in] [ref] */,
    9075             :                                                      uint16_t _level /* [in]  */,
    9076             :                                                      uint32_t _start_idx /* [in]  */,
    9077             :                                                      uint32_t _max_entries /* [in]  */,
    9078             :                                                      uint32_t _buf_size /* [in]  */,
    9079             :                                                      uint32_t *_total_size /* [out] [ref] */,
    9080             :                                                      uint32_t *_returned_size /* [out] [ref] */,
    9081             :                                                      union samr_DispInfo *_info /* [out] [ref,switch_is(level)] */)
    9082             : {
    9083           0 :         struct tevent_req *req;
    9084           0 :         struct dcerpc_samr_QueryDisplayInfo_state *state;
    9085           0 :         struct tevent_req *subreq;
    9086             : 
    9087           0 :         req = tevent_req_create(mem_ctx, &state,
    9088             :                                 struct dcerpc_samr_QueryDisplayInfo_state);
    9089           0 :         if (req == NULL) {
    9090           0 :                 return NULL;
    9091             :         }
    9092           0 :         state->out_mem_ctx = NULL;
    9093             : 
    9094             :         /* In parameters */
    9095           0 :         state->orig.in.domain_handle = _domain_handle;
    9096           0 :         state->orig.in.level = _level;
    9097           0 :         state->orig.in.start_idx = _start_idx;
    9098           0 :         state->orig.in.max_entries = _max_entries;
    9099           0 :         state->orig.in.buf_size = _buf_size;
    9100             : 
    9101             :         /* Out parameters */
    9102           0 :         state->orig.out.total_size = _total_size;
    9103           0 :         state->orig.out.returned_size = _returned_size;
    9104           0 :         state->orig.out.info = _info;
    9105             : 
    9106             :         /* Result */
    9107           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9108             : 
    9109           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9110             :                              "dcerpc_samr_QueryDisplayInfo_out_memory");
    9111           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9112           0 :                 return tevent_req_post(req, ev);
    9113             :         }
    9114             : 
    9115             :         /* make a temporary copy, that we pass to the dispatch function */
    9116           0 :         state->tmp = state->orig;
    9117             : 
    9118           0 :         subreq = dcerpc_samr_QueryDisplayInfo_r_send(state, ev, h, &state->tmp);
    9119           0 :         if (tevent_req_nomem(subreq, req)) {
    9120           0 :                 return tevent_req_post(req, ev);
    9121             :         }
    9122           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryDisplayInfo_done, req);
    9123           0 :         return req;
    9124             : }
    9125             : 
    9126           0 : static void dcerpc_samr_QueryDisplayInfo_done(struct tevent_req *subreq)
    9127             : {
    9128           0 :         struct tevent_req *req = tevent_req_callback_data(
    9129             :                 subreq, struct tevent_req);
    9130           0 :         struct dcerpc_samr_QueryDisplayInfo_state *state = tevent_req_data(
    9131             :                 req, struct dcerpc_samr_QueryDisplayInfo_state);
    9132           0 :         NTSTATUS status;
    9133           0 :         TALLOC_CTX *mem_ctx;
    9134             : 
    9135           0 :         if (state->out_mem_ctx) {
    9136           0 :                 mem_ctx = state->out_mem_ctx;
    9137             :         } else {
    9138           0 :                 mem_ctx = state;
    9139             :         }
    9140             : 
    9141           0 :         status = dcerpc_samr_QueryDisplayInfo_r_recv(subreq, mem_ctx);
    9142           0 :         TALLOC_FREE(subreq);
    9143           0 :         if (tevent_req_nterror(req, status)) {
    9144           0 :                 return;
    9145             :         }
    9146             : 
    9147             :         /* Copy out parameters */
    9148           0 :         *state->orig.out.total_size = *state->tmp.out.total_size;
    9149           0 :         *state->orig.out.returned_size = *state->tmp.out.returned_size;
    9150           0 :         *state->orig.out.info = *state->tmp.out.info;
    9151             : 
    9152             :         /* Copy result */
    9153           0 :         state->orig.out.result = state->tmp.out.result;
    9154             : 
    9155             :         /* Reset temporary structure */
    9156           0 :         NDR_ZERO_STRUCT(state->tmp);
    9157             : 
    9158           0 :         tevent_req_done(req);
    9159             : }
    9160             : 
    9161           0 : NTSTATUS dcerpc_samr_QueryDisplayInfo_recv(struct tevent_req *req,
    9162             :                                            TALLOC_CTX *mem_ctx,
    9163             :                                            NTSTATUS *result)
    9164             : {
    9165           0 :         struct dcerpc_samr_QueryDisplayInfo_state *state = tevent_req_data(
    9166             :                 req, struct dcerpc_samr_QueryDisplayInfo_state);
    9167           0 :         NTSTATUS status;
    9168             : 
    9169           0 :         if (tevent_req_is_nterror(req, &status)) {
    9170           0 :                 tevent_req_received(req);
    9171           0 :                 return status;
    9172             :         }
    9173             : 
    9174             :         /* Steal possible out parameters to the callers context */
    9175           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9176             : 
    9177             :         /* Return result */
    9178           0 :         *result = state->orig.out.result;
    9179             : 
    9180           0 :         tevent_req_received(req);
    9181           0 :         return NT_STATUS_OK;
    9182             : }
    9183             : 
    9184           0 : NTSTATUS dcerpc_samr_QueryDisplayInfo(struct dcerpc_binding_handle *h,
    9185             :                                       TALLOC_CTX *mem_ctx,
    9186             :                                       struct policy_handle *_domain_handle /* [in] [ref] */,
    9187             :                                       uint16_t _level /* [in]  */,
    9188             :                                       uint32_t _start_idx /* [in]  */,
    9189             :                                       uint32_t _max_entries /* [in]  */,
    9190             :                                       uint32_t _buf_size /* [in]  */,
    9191             :                                       uint32_t *_total_size /* [out] [ref] */,
    9192             :                                       uint32_t *_returned_size /* [out] [ref] */,
    9193             :                                       union samr_DispInfo *_info /* [out] [ref,switch_is(level)] */,
    9194             :                                       NTSTATUS *result)
    9195             : {
    9196           0 :         struct samr_QueryDisplayInfo r;
    9197           0 :         NTSTATUS status;
    9198             : 
    9199             :         /* In parameters */
    9200           0 :         r.in.domain_handle = _domain_handle;
    9201           0 :         r.in.level = _level;
    9202           0 :         r.in.start_idx = _start_idx;
    9203           0 :         r.in.max_entries = _max_entries;
    9204           0 :         r.in.buf_size = _buf_size;
    9205             : 
    9206             :         /* Out parameters */
    9207           0 :         r.out.total_size = _total_size;
    9208           0 :         r.out.returned_size = _returned_size;
    9209           0 :         r.out.info = _info;
    9210             : 
    9211             :         /* Result */
    9212           0 :         NDR_ZERO_STRUCT(r.out.result);
    9213             : 
    9214           0 :         status = dcerpc_samr_QueryDisplayInfo_r(h, mem_ctx, &r);
    9215           0 :         if (!NT_STATUS_IS_OK(status)) {
    9216           0 :                 return status;
    9217             :         }
    9218             : 
    9219             :         /* Return variables */
    9220           0 :         *_total_size = *r.out.total_size;
    9221           0 :         *_returned_size = *r.out.returned_size;
    9222           0 :         *_info = *r.out.info;
    9223             : 
    9224             :         /* Return result */
    9225           0 :         *result = r.out.result;
    9226             : 
    9227           0 :         return NT_STATUS_OK;
    9228             : }
    9229             : 
    9230             : struct dcerpc_samr_GetDisplayEnumerationIndex_r_state {
    9231             :         TALLOC_CTX *out_mem_ctx;
    9232             : };
    9233             : 
    9234             : static void dcerpc_samr_GetDisplayEnumerationIndex_r_done(struct tevent_req *subreq);
    9235             : 
    9236           0 : struct tevent_req *dcerpc_samr_GetDisplayEnumerationIndex_r_send(TALLOC_CTX *mem_ctx,
    9237             :         struct tevent_context *ev,
    9238             :         struct dcerpc_binding_handle *h,
    9239             :         struct samr_GetDisplayEnumerationIndex *r)
    9240             : {
    9241           0 :         struct tevent_req *req;
    9242           0 :         struct dcerpc_samr_GetDisplayEnumerationIndex_r_state *state;
    9243           0 :         struct tevent_req *subreq;
    9244             : 
    9245           0 :         req = tevent_req_create(mem_ctx, &state,
    9246             :                                 struct dcerpc_samr_GetDisplayEnumerationIndex_r_state);
    9247           0 :         if (req == NULL) {
    9248           0 :                 return NULL;
    9249             :         }
    9250             : 
    9251           0 :         state->out_mem_ctx = talloc_new(state);
    9252           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9253           0 :                 return tevent_req_post(req, ev);
    9254             :         }
    9255             : 
    9256           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9257             :                         NULL, &ndr_table_samr,
    9258           0 :                         NDR_SAMR_GETDISPLAYENUMERATIONINDEX, state->out_mem_ctx, r);
    9259           0 :         if (tevent_req_nomem(subreq, req)) {
    9260           0 :                 return tevent_req_post(req, ev);
    9261             :         }
    9262           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetDisplayEnumerationIndex_r_done, req);
    9263             : 
    9264           0 :         return req;
    9265             : }
    9266             : 
    9267           0 : static void dcerpc_samr_GetDisplayEnumerationIndex_r_done(struct tevent_req *subreq)
    9268             : {
    9269           0 :         struct tevent_req *req =
    9270           0 :                 tevent_req_callback_data(subreq,
    9271             :                 struct tevent_req);
    9272           0 :         NTSTATUS status;
    9273             : 
    9274           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9275           0 :         TALLOC_FREE(subreq);
    9276           0 :         if (tevent_req_nterror(req, status)) {
    9277           0 :                 return;
    9278             :         }
    9279             : 
    9280           0 :         tevent_req_done(req);
    9281             : }
    9282             : 
    9283           0 : NTSTATUS dcerpc_samr_GetDisplayEnumerationIndex_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9284             : {
    9285           0 :         struct dcerpc_samr_GetDisplayEnumerationIndex_r_state *state =
    9286           0 :                 tevent_req_data(req,
    9287             :                 struct dcerpc_samr_GetDisplayEnumerationIndex_r_state);
    9288           0 :         NTSTATUS status;
    9289             : 
    9290           0 :         if (tevent_req_is_nterror(req, &status)) {
    9291           0 :                 tevent_req_received(req);
    9292           0 :                 return status;
    9293             :         }
    9294             : 
    9295           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9296             : 
    9297           0 :         tevent_req_received(req);
    9298           0 :         return NT_STATUS_OK;
    9299             : }
    9300             : 
    9301          40 : NTSTATUS dcerpc_samr_GetDisplayEnumerationIndex_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_GetDisplayEnumerationIndex *r)
    9302             : {
    9303           0 :         NTSTATUS status;
    9304             : 
    9305          40 :         status = dcerpc_binding_handle_call(h,
    9306             :                         NULL, &ndr_table_samr,
    9307             :                         NDR_SAMR_GETDISPLAYENUMERATIONINDEX, mem_ctx, r);
    9308             : 
    9309          40 :         return status;
    9310             : }
    9311             : 
    9312             : struct dcerpc_samr_GetDisplayEnumerationIndex_state {
    9313             :         struct samr_GetDisplayEnumerationIndex orig;
    9314             :         struct samr_GetDisplayEnumerationIndex tmp;
    9315             :         TALLOC_CTX *out_mem_ctx;
    9316             : };
    9317             : 
    9318             : static void dcerpc_samr_GetDisplayEnumerationIndex_done(struct tevent_req *subreq);
    9319             : 
    9320           0 : struct tevent_req *dcerpc_samr_GetDisplayEnumerationIndex_send(TALLOC_CTX *mem_ctx,
    9321             :                                                                struct tevent_context *ev,
    9322             :                                                                struct dcerpc_binding_handle *h,
    9323             :                                                                struct policy_handle *_domain_handle /* [in] [ref] */,
    9324             :                                                                uint16_t _level /* [in]  */,
    9325             :                                                                struct lsa_String *_name /* [in] [ref] */,
    9326             :                                                                uint32_t *_idx /* [out] [ref] */)
    9327             : {
    9328           0 :         struct tevent_req *req;
    9329           0 :         struct dcerpc_samr_GetDisplayEnumerationIndex_state *state;
    9330           0 :         struct tevent_req *subreq;
    9331             : 
    9332           0 :         req = tevent_req_create(mem_ctx, &state,
    9333             :                                 struct dcerpc_samr_GetDisplayEnumerationIndex_state);
    9334           0 :         if (req == NULL) {
    9335           0 :                 return NULL;
    9336             :         }
    9337           0 :         state->out_mem_ctx = NULL;
    9338             : 
    9339             :         /* In parameters */
    9340           0 :         state->orig.in.domain_handle = _domain_handle;
    9341           0 :         state->orig.in.level = _level;
    9342           0 :         state->orig.in.name = _name;
    9343             : 
    9344             :         /* Out parameters */
    9345           0 :         state->orig.out.idx = _idx;
    9346             : 
    9347             :         /* Result */
    9348           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9349             : 
    9350           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9351             :                              "dcerpc_samr_GetDisplayEnumerationIndex_out_memory");
    9352           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9353           0 :                 return tevent_req_post(req, ev);
    9354             :         }
    9355             : 
    9356             :         /* make a temporary copy, that we pass to the dispatch function */
    9357           0 :         state->tmp = state->orig;
    9358             : 
    9359           0 :         subreq = dcerpc_samr_GetDisplayEnumerationIndex_r_send(state, ev, h, &state->tmp);
    9360           0 :         if (tevent_req_nomem(subreq, req)) {
    9361           0 :                 return tevent_req_post(req, ev);
    9362             :         }
    9363           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetDisplayEnumerationIndex_done, req);
    9364           0 :         return req;
    9365             : }
    9366             : 
    9367           0 : static void dcerpc_samr_GetDisplayEnumerationIndex_done(struct tevent_req *subreq)
    9368             : {
    9369           0 :         struct tevent_req *req = tevent_req_callback_data(
    9370             :                 subreq, struct tevent_req);
    9371           0 :         struct dcerpc_samr_GetDisplayEnumerationIndex_state *state = tevent_req_data(
    9372             :                 req, struct dcerpc_samr_GetDisplayEnumerationIndex_state);
    9373           0 :         NTSTATUS status;
    9374           0 :         TALLOC_CTX *mem_ctx;
    9375             : 
    9376           0 :         if (state->out_mem_ctx) {
    9377           0 :                 mem_ctx = state->out_mem_ctx;
    9378             :         } else {
    9379           0 :                 mem_ctx = state;
    9380             :         }
    9381             : 
    9382           0 :         status = dcerpc_samr_GetDisplayEnumerationIndex_r_recv(subreq, mem_ctx);
    9383           0 :         TALLOC_FREE(subreq);
    9384           0 :         if (tevent_req_nterror(req, status)) {
    9385           0 :                 return;
    9386             :         }
    9387             : 
    9388             :         /* Copy out parameters */
    9389           0 :         *state->orig.out.idx = *state->tmp.out.idx;
    9390             : 
    9391             :         /* Copy result */
    9392           0 :         state->orig.out.result = state->tmp.out.result;
    9393             : 
    9394             :         /* Reset temporary structure */
    9395           0 :         NDR_ZERO_STRUCT(state->tmp);
    9396             : 
    9397           0 :         tevent_req_done(req);
    9398             : }
    9399             : 
    9400           0 : NTSTATUS dcerpc_samr_GetDisplayEnumerationIndex_recv(struct tevent_req *req,
    9401             :                                                      TALLOC_CTX *mem_ctx,
    9402             :                                                      NTSTATUS *result)
    9403             : {
    9404           0 :         struct dcerpc_samr_GetDisplayEnumerationIndex_state *state = tevent_req_data(
    9405             :                 req, struct dcerpc_samr_GetDisplayEnumerationIndex_state);
    9406           0 :         NTSTATUS status;
    9407             : 
    9408           0 :         if (tevent_req_is_nterror(req, &status)) {
    9409           0 :                 tevent_req_received(req);
    9410           0 :                 return status;
    9411             :         }
    9412             : 
    9413             :         /* Steal possible out parameters to the callers context */
    9414           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9415             : 
    9416             :         /* Return result */
    9417           0 :         *result = state->orig.out.result;
    9418             : 
    9419           0 :         tevent_req_received(req);
    9420           0 :         return NT_STATUS_OK;
    9421             : }
    9422             : 
    9423           0 : NTSTATUS dcerpc_samr_GetDisplayEnumerationIndex(struct dcerpc_binding_handle *h,
    9424             :                                                 TALLOC_CTX *mem_ctx,
    9425             :                                                 struct policy_handle *_domain_handle /* [in] [ref] */,
    9426             :                                                 uint16_t _level /* [in]  */,
    9427             :                                                 struct lsa_String *_name /* [in] [ref] */,
    9428             :                                                 uint32_t *_idx /* [out] [ref] */,
    9429             :                                                 NTSTATUS *result)
    9430             : {
    9431           0 :         struct samr_GetDisplayEnumerationIndex r;
    9432           0 :         NTSTATUS status;
    9433             : 
    9434             :         /* In parameters */
    9435           0 :         r.in.domain_handle = _domain_handle;
    9436           0 :         r.in.level = _level;
    9437           0 :         r.in.name = _name;
    9438             : 
    9439             :         /* Out parameters */
    9440           0 :         r.out.idx = _idx;
    9441             : 
    9442             :         /* Result */
    9443           0 :         NDR_ZERO_STRUCT(r.out.result);
    9444             : 
    9445           0 :         status = dcerpc_samr_GetDisplayEnumerationIndex_r(h, mem_ctx, &r);
    9446           0 :         if (!NT_STATUS_IS_OK(status)) {
    9447           0 :                 return status;
    9448             :         }
    9449             : 
    9450             :         /* Return variables */
    9451           0 :         *_idx = *r.out.idx;
    9452             : 
    9453             :         /* Return result */
    9454           0 :         *result = r.out.result;
    9455             : 
    9456           0 :         return NT_STATUS_OK;
    9457             : }
    9458             : 
    9459             : struct dcerpc_samr_TestPrivateFunctionsDomain_r_state {
    9460             :         TALLOC_CTX *out_mem_ctx;
    9461             : };
    9462             : 
    9463             : static void dcerpc_samr_TestPrivateFunctionsDomain_r_done(struct tevent_req *subreq);
    9464             : 
    9465           0 : struct tevent_req *dcerpc_samr_TestPrivateFunctionsDomain_r_send(TALLOC_CTX *mem_ctx,
    9466             :         struct tevent_context *ev,
    9467             :         struct dcerpc_binding_handle *h,
    9468             :         struct samr_TestPrivateFunctionsDomain *r)
    9469             : {
    9470           0 :         struct tevent_req *req;
    9471           0 :         struct dcerpc_samr_TestPrivateFunctionsDomain_r_state *state;
    9472           0 :         struct tevent_req *subreq;
    9473             : 
    9474           0 :         req = tevent_req_create(mem_ctx, &state,
    9475             :                                 struct dcerpc_samr_TestPrivateFunctionsDomain_r_state);
    9476           0 :         if (req == NULL) {
    9477           0 :                 return NULL;
    9478             :         }
    9479             : 
    9480           0 :         state->out_mem_ctx = NULL;
    9481             : 
    9482           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9483             :                         NULL, &ndr_table_samr,
    9484             :                         NDR_SAMR_TESTPRIVATEFUNCTIONSDOMAIN, state, r);
    9485           0 :         if (tevent_req_nomem(subreq, req)) {
    9486           0 :                 return tevent_req_post(req, ev);
    9487             :         }
    9488           0 :         tevent_req_set_callback(subreq, dcerpc_samr_TestPrivateFunctionsDomain_r_done, req);
    9489             : 
    9490           0 :         return req;
    9491             : }
    9492             : 
    9493           0 : static void dcerpc_samr_TestPrivateFunctionsDomain_r_done(struct tevent_req *subreq)
    9494             : {
    9495           0 :         struct tevent_req *req =
    9496           0 :                 tevent_req_callback_data(subreq,
    9497             :                 struct tevent_req);
    9498           0 :         NTSTATUS status;
    9499             : 
    9500           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9501           0 :         TALLOC_FREE(subreq);
    9502           0 :         if (tevent_req_nterror(req, status)) {
    9503           0 :                 return;
    9504             :         }
    9505             : 
    9506           0 :         tevent_req_done(req);
    9507             : }
    9508             : 
    9509           0 : NTSTATUS dcerpc_samr_TestPrivateFunctionsDomain_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9510             : {
    9511           0 :         struct dcerpc_samr_TestPrivateFunctionsDomain_r_state *state =
    9512           0 :                 tevent_req_data(req,
    9513             :                 struct dcerpc_samr_TestPrivateFunctionsDomain_r_state);
    9514           0 :         NTSTATUS status;
    9515             : 
    9516           0 :         if (tevent_req_is_nterror(req, &status)) {
    9517           0 :                 tevent_req_received(req);
    9518           0 :                 return status;
    9519             :         }
    9520             : 
    9521           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9522             : 
    9523           0 :         tevent_req_received(req);
    9524           0 :         return NT_STATUS_OK;
    9525             : }
    9526             : 
    9527          10 : NTSTATUS dcerpc_samr_TestPrivateFunctionsDomain_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_TestPrivateFunctionsDomain *r)
    9528             : {
    9529           0 :         NTSTATUS status;
    9530             : 
    9531          10 :         status = dcerpc_binding_handle_call(h,
    9532             :                         NULL, &ndr_table_samr,
    9533             :                         NDR_SAMR_TESTPRIVATEFUNCTIONSDOMAIN, mem_ctx, r);
    9534             : 
    9535          10 :         return status;
    9536             : }
    9537             : 
    9538             : struct dcerpc_samr_TestPrivateFunctionsDomain_state {
    9539             :         struct samr_TestPrivateFunctionsDomain orig;
    9540             :         struct samr_TestPrivateFunctionsDomain tmp;
    9541             :         TALLOC_CTX *out_mem_ctx;
    9542             : };
    9543             : 
    9544             : static void dcerpc_samr_TestPrivateFunctionsDomain_done(struct tevent_req *subreq);
    9545             : 
    9546           0 : struct tevent_req *dcerpc_samr_TestPrivateFunctionsDomain_send(TALLOC_CTX *mem_ctx,
    9547             :                                                                struct tevent_context *ev,
    9548             :                                                                struct dcerpc_binding_handle *h,
    9549             :                                                                struct policy_handle *_domain_handle /* [in] [ref] */)
    9550             : {
    9551           0 :         struct tevent_req *req;
    9552           0 :         struct dcerpc_samr_TestPrivateFunctionsDomain_state *state;
    9553           0 :         struct tevent_req *subreq;
    9554             : 
    9555           0 :         req = tevent_req_create(mem_ctx, &state,
    9556             :                                 struct dcerpc_samr_TestPrivateFunctionsDomain_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.domain_handle = _domain_handle;
    9564             : 
    9565             :         /* Out parameters */
    9566             : 
    9567             :         /* Result */
    9568           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9569             : 
    9570             :         /* make a temporary copy, that we pass to the dispatch function */
    9571           0 :         state->tmp = state->orig;
    9572             : 
    9573           0 :         subreq = dcerpc_samr_TestPrivateFunctionsDomain_r_send(state, ev, h, &state->tmp);
    9574           0 :         if (tevent_req_nomem(subreq, req)) {
    9575           0 :                 return tevent_req_post(req, ev);
    9576             :         }
    9577           0 :         tevent_req_set_callback(subreq, dcerpc_samr_TestPrivateFunctionsDomain_done, req);
    9578           0 :         return req;
    9579             : }
    9580             : 
    9581           0 : static void dcerpc_samr_TestPrivateFunctionsDomain_done(struct tevent_req *subreq)
    9582             : {
    9583           0 :         struct tevent_req *req = tevent_req_callback_data(
    9584             :                 subreq, struct tevent_req);
    9585           0 :         struct dcerpc_samr_TestPrivateFunctionsDomain_state *state = tevent_req_data(
    9586             :                 req, struct dcerpc_samr_TestPrivateFunctionsDomain_state);
    9587           0 :         NTSTATUS status;
    9588           0 :         TALLOC_CTX *mem_ctx;
    9589             : 
    9590           0 :         if (state->out_mem_ctx) {
    9591           0 :                 mem_ctx = state->out_mem_ctx;
    9592             :         } else {
    9593           0 :                 mem_ctx = state;
    9594             :         }
    9595             : 
    9596           0 :         status = dcerpc_samr_TestPrivateFunctionsDomain_r_recv(subreq, mem_ctx);
    9597           0 :         TALLOC_FREE(subreq);
    9598           0 :         if (tevent_req_nterror(req, status)) {
    9599           0 :                 return;
    9600             :         }
    9601             : 
    9602             :         /* Copy out parameters */
    9603             : 
    9604             :         /* Copy result */
    9605           0 :         state->orig.out.result = state->tmp.out.result;
    9606             : 
    9607             :         /* Reset temporary structure */
    9608           0 :         NDR_ZERO_STRUCT(state->tmp);
    9609             : 
    9610           0 :         tevent_req_done(req);
    9611             : }
    9612             : 
    9613           0 : NTSTATUS dcerpc_samr_TestPrivateFunctionsDomain_recv(struct tevent_req *req,
    9614             :                                                      TALLOC_CTX *mem_ctx,
    9615             :                                                      NTSTATUS *result)
    9616             : {
    9617           0 :         struct dcerpc_samr_TestPrivateFunctionsDomain_state *state = tevent_req_data(
    9618             :                 req, struct dcerpc_samr_TestPrivateFunctionsDomain_state);
    9619           0 :         NTSTATUS status;
    9620             : 
    9621           0 :         if (tevent_req_is_nterror(req, &status)) {
    9622           0 :                 tevent_req_received(req);
    9623           0 :                 return status;
    9624             :         }
    9625             : 
    9626             :         /* Steal possible out parameters to the callers context */
    9627           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9628             : 
    9629             :         /* Return result */
    9630           0 :         *result = state->orig.out.result;
    9631             : 
    9632           0 :         tevent_req_received(req);
    9633           0 :         return NT_STATUS_OK;
    9634             : }
    9635             : 
    9636           0 : NTSTATUS dcerpc_samr_TestPrivateFunctionsDomain(struct dcerpc_binding_handle *h,
    9637             :                                                 TALLOC_CTX *mem_ctx,
    9638             :                                                 struct policy_handle *_domain_handle /* [in] [ref] */,
    9639             :                                                 NTSTATUS *result)
    9640             : {
    9641           0 :         struct samr_TestPrivateFunctionsDomain r;
    9642           0 :         NTSTATUS status;
    9643             : 
    9644             :         /* In parameters */
    9645           0 :         r.in.domain_handle = _domain_handle;
    9646             : 
    9647             :         /* Out parameters */
    9648             : 
    9649             :         /* Result */
    9650           0 :         NDR_ZERO_STRUCT(r.out.result);
    9651             : 
    9652           0 :         status = dcerpc_samr_TestPrivateFunctionsDomain_r(h, mem_ctx, &r);
    9653           0 :         if (!NT_STATUS_IS_OK(status)) {
    9654           0 :                 return status;
    9655             :         }
    9656             : 
    9657             :         /* Return variables */
    9658             : 
    9659             :         /* Return result */
    9660           0 :         *result = r.out.result;
    9661             : 
    9662           0 :         return NT_STATUS_OK;
    9663             : }
    9664             : 
    9665             : struct dcerpc_samr_TestPrivateFunctionsUser_r_state {
    9666             :         TALLOC_CTX *out_mem_ctx;
    9667             : };
    9668             : 
    9669             : static void dcerpc_samr_TestPrivateFunctionsUser_r_done(struct tevent_req *subreq);
    9670             : 
    9671           0 : struct tevent_req *dcerpc_samr_TestPrivateFunctionsUser_r_send(TALLOC_CTX *mem_ctx,
    9672             :         struct tevent_context *ev,
    9673             :         struct dcerpc_binding_handle *h,
    9674             :         struct samr_TestPrivateFunctionsUser *r)
    9675             : {
    9676           0 :         struct tevent_req *req;
    9677           0 :         struct dcerpc_samr_TestPrivateFunctionsUser_r_state *state;
    9678           0 :         struct tevent_req *subreq;
    9679             : 
    9680           0 :         req = tevent_req_create(mem_ctx, &state,
    9681             :                                 struct dcerpc_samr_TestPrivateFunctionsUser_r_state);
    9682           0 :         if (req == NULL) {
    9683           0 :                 return NULL;
    9684             :         }
    9685             : 
    9686           0 :         state->out_mem_ctx = NULL;
    9687             : 
    9688           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9689             :                         NULL, &ndr_table_samr,
    9690             :                         NDR_SAMR_TESTPRIVATEFUNCTIONSUSER, state, r);
    9691           0 :         if (tevent_req_nomem(subreq, req)) {
    9692           0 :                 return tevent_req_post(req, ev);
    9693             :         }
    9694           0 :         tevent_req_set_callback(subreq, dcerpc_samr_TestPrivateFunctionsUser_r_done, req);
    9695             : 
    9696           0 :         return req;
    9697             : }
    9698             : 
    9699           0 : static void dcerpc_samr_TestPrivateFunctionsUser_r_done(struct tevent_req *subreq)
    9700             : {
    9701           0 :         struct tevent_req *req =
    9702           0 :                 tevent_req_callback_data(subreq,
    9703             :                 struct tevent_req);
    9704           0 :         NTSTATUS status;
    9705             : 
    9706           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9707           0 :         TALLOC_FREE(subreq);
    9708           0 :         if (tevent_req_nterror(req, status)) {
    9709           0 :                 return;
    9710             :         }
    9711             : 
    9712           0 :         tevent_req_done(req);
    9713             : }
    9714             : 
    9715           0 : NTSTATUS dcerpc_samr_TestPrivateFunctionsUser_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9716             : {
    9717           0 :         struct dcerpc_samr_TestPrivateFunctionsUser_r_state *state =
    9718           0 :                 tevent_req_data(req,
    9719             :                 struct dcerpc_samr_TestPrivateFunctionsUser_r_state);
    9720           0 :         NTSTATUS status;
    9721             : 
    9722           0 :         if (tevent_req_is_nterror(req, &status)) {
    9723           0 :                 tevent_req_received(req);
    9724           0 :                 return status;
    9725             :         }
    9726             : 
    9727           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9728             : 
    9729           0 :         tevent_req_received(req);
    9730           0 :         return NT_STATUS_OK;
    9731             : }
    9732             : 
    9733          14 : NTSTATUS dcerpc_samr_TestPrivateFunctionsUser_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_TestPrivateFunctionsUser *r)
    9734             : {
    9735           0 :         NTSTATUS status;
    9736             : 
    9737          14 :         status = dcerpc_binding_handle_call(h,
    9738             :                         NULL, &ndr_table_samr,
    9739             :                         NDR_SAMR_TESTPRIVATEFUNCTIONSUSER, mem_ctx, r);
    9740             : 
    9741          14 :         return status;
    9742             : }
    9743             : 
    9744             : struct dcerpc_samr_TestPrivateFunctionsUser_state {
    9745             :         struct samr_TestPrivateFunctionsUser orig;
    9746             :         struct samr_TestPrivateFunctionsUser tmp;
    9747             :         TALLOC_CTX *out_mem_ctx;
    9748             : };
    9749             : 
    9750             : static void dcerpc_samr_TestPrivateFunctionsUser_done(struct tevent_req *subreq);
    9751             : 
    9752           0 : struct tevent_req *dcerpc_samr_TestPrivateFunctionsUser_send(TALLOC_CTX *mem_ctx,
    9753             :                                                              struct tevent_context *ev,
    9754             :                                                              struct dcerpc_binding_handle *h,
    9755             :                                                              struct policy_handle *_user_handle /* [in] [ref] */)
    9756             : {
    9757           0 :         struct tevent_req *req;
    9758           0 :         struct dcerpc_samr_TestPrivateFunctionsUser_state *state;
    9759           0 :         struct tevent_req *subreq;
    9760             : 
    9761           0 :         req = tevent_req_create(mem_ctx, &state,
    9762             :                                 struct dcerpc_samr_TestPrivateFunctionsUser_state);
    9763           0 :         if (req == NULL) {
    9764           0 :                 return NULL;
    9765             :         }
    9766           0 :         state->out_mem_ctx = NULL;
    9767             : 
    9768             :         /* In parameters */
    9769           0 :         state->orig.in.user_handle = _user_handle;
    9770             : 
    9771             :         /* Out parameters */
    9772             : 
    9773             :         /* Result */
    9774           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9775             : 
    9776             :         /* make a temporary copy, that we pass to the dispatch function */
    9777           0 :         state->tmp = state->orig;
    9778             : 
    9779           0 :         subreq = dcerpc_samr_TestPrivateFunctionsUser_r_send(state, ev, h, &state->tmp);
    9780           0 :         if (tevent_req_nomem(subreq, req)) {
    9781           0 :                 return tevent_req_post(req, ev);
    9782             :         }
    9783           0 :         tevent_req_set_callback(subreq, dcerpc_samr_TestPrivateFunctionsUser_done, req);
    9784           0 :         return req;
    9785             : }
    9786             : 
    9787           0 : static void dcerpc_samr_TestPrivateFunctionsUser_done(struct tevent_req *subreq)
    9788             : {
    9789           0 :         struct tevent_req *req = tevent_req_callback_data(
    9790             :                 subreq, struct tevent_req);
    9791           0 :         struct dcerpc_samr_TestPrivateFunctionsUser_state *state = tevent_req_data(
    9792             :                 req, struct dcerpc_samr_TestPrivateFunctionsUser_state);
    9793           0 :         NTSTATUS status;
    9794           0 :         TALLOC_CTX *mem_ctx;
    9795             : 
    9796           0 :         if (state->out_mem_ctx) {
    9797           0 :                 mem_ctx = state->out_mem_ctx;
    9798             :         } else {
    9799           0 :                 mem_ctx = state;
    9800             :         }
    9801             : 
    9802           0 :         status = dcerpc_samr_TestPrivateFunctionsUser_r_recv(subreq, mem_ctx);
    9803           0 :         TALLOC_FREE(subreq);
    9804           0 :         if (tevent_req_nterror(req, status)) {
    9805           0 :                 return;
    9806             :         }
    9807             : 
    9808             :         /* Copy out parameters */
    9809             : 
    9810             :         /* Copy result */
    9811           0 :         state->orig.out.result = state->tmp.out.result;
    9812             : 
    9813             :         /* Reset temporary structure */
    9814           0 :         NDR_ZERO_STRUCT(state->tmp);
    9815             : 
    9816           0 :         tevent_req_done(req);
    9817             : }
    9818             : 
    9819           0 : NTSTATUS dcerpc_samr_TestPrivateFunctionsUser_recv(struct tevent_req *req,
    9820             :                                                    TALLOC_CTX *mem_ctx,
    9821             :                                                    NTSTATUS *result)
    9822             : {
    9823           0 :         struct dcerpc_samr_TestPrivateFunctionsUser_state *state = tevent_req_data(
    9824             :                 req, struct dcerpc_samr_TestPrivateFunctionsUser_state);
    9825           0 :         NTSTATUS status;
    9826             : 
    9827           0 :         if (tevent_req_is_nterror(req, &status)) {
    9828           0 :                 tevent_req_received(req);
    9829           0 :                 return status;
    9830             :         }
    9831             : 
    9832             :         /* Steal possible out parameters to the callers context */
    9833           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9834             : 
    9835             :         /* Return result */
    9836           0 :         *result = state->orig.out.result;
    9837             : 
    9838           0 :         tevent_req_received(req);
    9839           0 :         return NT_STATUS_OK;
    9840             : }
    9841             : 
    9842           0 : NTSTATUS dcerpc_samr_TestPrivateFunctionsUser(struct dcerpc_binding_handle *h,
    9843             :                                               TALLOC_CTX *mem_ctx,
    9844             :                                               struct policy_handle *_user_handle /* [in] [ref] */,
    9845             :                                               NTSTATUS *result)
    9846             : {
    9847           0 :         struct samr_TestPrivateFunctionsUser r;
    9848           0 :         NTSTATUS status;
    9849             : 
    9850             :         /* In parameters */
    9851           0 :         r.in.user_handle = _user_handle;
    9852             : 
    9853             :         /* Out parameters */
    9854             : 
    9855             :         /* Result */
    9856           0 :         NDR_ZERO_STRUCT(r.out.result);
    9857             : 
    9858           0 :         status = dcerpc_samr_TestPrivateFunctionsUser_r(h, mem_ctx, &r);
    9859           0 :         if (!NT_STATUS_IS_OK(status)) {
    9860           0 :                 return status;
    9861             :         }
    9862             : 
    9863             :         /* Return variables */
    9864             : 
    9865             :         /* Return result */
    9866           0 :         *result = r.out.result;
    9867             : 
    9868           0 :         return NT_STATUS_OK;
    9869             : }
    9870             : 
    9871             : struct dcerpc_samr_GetUserPwInfo_r_state {
    9872             :         TALLOC_CTX *out_mem_ctx;
    9873             : };
    9874             : 
    9875             : static void dcerpc_samr_GetUserPwInfo_r_done(struct tevent_req *subreq);
    9876             : 
    9877           0 : struct tevent_req *dcerpc_samr_GetUserPwInfo_r_send(TALLOC_CTX *mem_ctx,
    9878             :         struct tevent_context *ev,
    9879             :         struct dcerpc_binding_handle *h,
    9880             :         struct samr_GetUserPwInfo *r)
    9881             : {
    9882           0 :         struct tevent_req *req;
    9883           0 :         struct dcerpc_samr_GetUserPwInfo_r_state *state;
    9884           0 :         struct tevent_req *subreq;
    9885             : 
    9886           0 :         req = tevent_req_create(mem_ctx, &state,
    9887             :                                 struct dcerpc_samr_GetUserPwInfo_r_state);
    9888           0 :         if (req == NULL) {
    9889           0 :                 return NULL;
    9890             :         }
    9891             : 
    9892           0 :         state->out_mem_ctx = talloc_new(state);
    9893           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9894           0 :                 return tevent_req_post(req, ev);
    9895             :         }
    9896             : 
    9897           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9898             :                         NULL, &ndr_table_samr,
    9899           0 :                         NDR_SAMR_GETUSERPWINFO, state->out_mem_ctx, r);
    9900           0 :         if (tevent_req_nomem(subreq, req)) {
    9901           0 :                 return tevent_req_post(req, ev);
    9902             :         }
    9903           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetUserPwInfo_r_done, req);
    9904             : 
    9905           0 :         return req;
    9906             : }
    9907             : 
    9908           0 : static void dcerpc_samr_GetUserPwInfo_r_done(struct tevent_req *subreq)
    9909             : {
    9910           0 :         struct tevent_req *req =
    9911           0 :                 tevent_req_callback_data(subreq,
    9912             :                 struct tevent_req);
    9913           0 :         NTSTATUS status;
    9914             : 
    9915           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9916           0 :         TALLOC_FREE(subreq);
    9917           0 :         if (tevent_req_nterror(req, status)) {
    9918           0 :                 return;
    9919             :         }
    9920             : 
    9921           0 :         tevent_req_done(req);
    9922             : }
    9923             : 
    9924           0 : NTSTATUS dcerpc_samr_GetUserPwInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9925             : {
    9926           0 :         struct dcerpc_samr_GetUserPwInfo_r_state *state =
    9927           0 :                 tevent_req_data(req,
    9928             :                 struct dcerpc_samr_GetUserPwInfo_r_state);
    9929           0 :         NTSTATUS status;
    9930             : 
    9931           0 :         if (tevent_req_is_nterror(req, &status)) {
    9932           0 :                 tevent_req_received(req);
    9933           0 :                 return status;
    9934             :         }
    9935             : 
    9936           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9937             : 
    9938           0 :         tevent_req_received(req);
    9939           0 :         return NT_STATUS_OK;
    9940             : }
    9941             : 
    9942        1583 : NTSTATUS dcerpc_samr_GetUserPwInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_GetUserPwInfo *r)
    9943             : {
    9944          72 :         NTSTATUS status;
    9945             : 
    9946        1583 :         status = dcerpc_binding_handle_call(h,
    9947             :                         NULL, &ndr_table_samr,
    9948             :                         NDR_SAMR_GETUSERPWINFO, mem_ctx, r);
    9949             : 
    9950        1583 :         return status;
    9951             : }
    9952             : 
    9953             : struct dcerpc_samr_GetUserPwInfo_state {
    9954             :         struct samr_GetUserPwInfo orig;
    9955             :         struct samr_GetUserPwInfo tmp;
    9956             :         TALLOC_CTX *out_mem_ctx;
    9957             : };
    9958             : 
    9959             : static void dcerpc_samr_GetUserPwInfo_done(struct tevent_req *subreq);
    9960             : 
    9961           0 : struct tevent_req *dcerpc_samr_GetUserPwInfo_send(TALLOC_CTX *mem_ctx,
    9962             :                                                   struct tevent_context *ev,
    9963             :                                                   struct dcerpc_binding_handle *h,
    9964             :                                                   struct policy_handle *_user_handle /* [in] [ref] */,
    9965             :                                                   struct samr_PwInfo *_info /* [out] [ref] */)
    9966             : {
    9967           0 :         struct tevent_req *req;
    9968           0 :         struct dcerpc_samr_GetUserPwInfo_state *state;
    9969           0 :         struct tevent_req *subreq;
    9970             : 
    9971           0 :         req = tevent_req_create(mem_ctx, &state,
    9972             :                                 struct dcerpc_samr_GetUserPwInfo_state);
    9973           0 :         if (req == NULL) {
    9974           0 :                 return NULL;
    9975             :         }
    9976           0 :         state->out_mem_ctx = NULL;
    9977             : 
    9978             :         /* In parameters */
    9979           0 :         state->orig.in.user_handle = _user_handle;
    9980             : 
    9981             :         /* Out parameters */
    9982           0 :         state->orig.out.info = _info;
    9983             : 
    9984             :         /* Result */
    9985           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9986             : 
    9987           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9988             :                              "dcerpc_samr_GetUserPwInfo_out_memory");
    9989           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9990           0 :                 return tevent_req_post(req, ev);
    9991             :         }
    9992             : 
    9993             :         /* make a temporary copy, that we pass to the dispatch function */
    9994           0 :         state->tmp = state->orig;
    9995             : 
    9996           0 :         subreq = dcerpc_samr_GetUserPwInfo_r_send(state, ev, h, &state->tmp);
    9997           0 :         if (tevent_req_nomem(subreq, req)) {
    9998           0 :                 return tevent_req_post(req, ev);
    9999             :         }
   10000           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetUserPwInfo_done, req);
   10001           0 :         return req;
   10002             : }
   10003             : 
   10004           0 : static void dcerpc_samr_GetUserPwInfo_done(struct tevent_req *subreq)
   10005             : {
   10006           0 :         struct tevent_req *req = tevent_req_callback_data(
   10007             :                 subreq, struct tevent_req);
   10008           0 :         struct dcerpc_samr_GetUserPwInfo_state *state = tevent_req_data(
   10009             :                 req, struct dcerpc_samr_GetUserPwInfo_state);
   10010           0 :         NTSTATUS status;
   10011           0 :         TALLOC_CTX *mem_ctx;
   10012             : 
   10013           0 :         if (state->out_mem_ctx) {
   10014           0 :                 mem_ctx = state->out_mem_ctx;
   10015             :         } else {
   10016           0 :                 mem_ctx = state;
   10017             :         }
   10018             : 
   10019           0 :         status = dcerpc_samr_GetUserPwInfo_r_recv(subreq, mem_ctx);
   10020           0 :         TALLOC_FREE(subreq);
   10021           0 :         if (tevent_req_nterror(req, status)) {
   10022           0 :                 return;
   10023             :         }
   10024             : 
   10025             :         /* Copy out parameters */
   10026           0 :         *state->orig.out.info = *state->tmp.out.info;
   10027             : 
   10028             :         /* Copy result */
   10029           0 :         state->orig.out.result = state->tmp.out.result;
   10030             : 
   10031             :         /* Reset temporary structure */
   10032           0 :         NDR_ZERO_STRUCT(state->tmp);
   10033             : 
   10034           0 :         tevent_req_done(req);
   10035             : }
   10036             : 
   10037           0 : NTSTATUS dcerpc_samr_GetUserPwInfo_recv(struct tevent_req *req,
   10038             :                                         TALLOC_CTX *mem_ctx,
   10039             :                                         NTSTATUS *result)
   10040             : {
   10041           0 :         struct dcerpc_samr_GetUserPwInfo_state *state = tevent_req_data(
   10042             :                 req, struct dcerpc_samr_GetUserPwInfo_state);
   10043           0 :         NTSTATUS status;
   10044             : 
   10045           0 :         if (tevent_req_is_nterror(req, &status)) {
   10046           0 :                 tevent_req_received(req);
   10047           0 :                 return status;
   10048             :         }
   10049             : 
   10050             :         /* Steal possible out parameters to the callers context */
   10051           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10052             : 
   10053             :         /* Return result */
   10054           0 :         *result = state->orig.out.result;
   10055             : 
   10056           0 :         tevent_req_received(req);
   10057           0 :         return NT_STATUS_OK;
   10058             : }
   10059             : 
   10060           6 : NTSTATUS dcerpc_samr_GetUserPwInfo(struct dcerpc_binding_handle *h,
   10061             :                                    TALLOC_CTX *mem_ctx,
   10062             :                                    struct policy_handle *_user_handle /* [in] [ref] */,
   10063             :                                    struct samr_PwInfo *_info /* [out] [ref] */,
   10064             :                                    NTSTATUS *result)
   10065             : {
   10066           0 :         struct samr_GetUserPwInfo r;
   10067           0 :         NTSTATUS status;
   10068             : 
   10069             :         /* In parameters */
   10070           6 :         r.in.user_handle = _user_handle;
   10071             : 
   10072             :         /* Out parameters */
   10073           6 :         r.out.info = _info;
   10074             : 
   10075             :         /* Result */
   10076           6 :         NDR_ZERO_STRUCT(r.out.result);
   10077             : 
   10078           6 :         status = dcerpc_samr_GetUserPwInfo_r(h, mem_ctx, &r);
   10079           6 :         if (!NT_STATUS_IS_OK(status)) {
   10080           0 :                 return status;
   10081             :         }
   10082             : 
   10083             :         /* Return variables */
   10084           6 :         *_info = *r.out.info;
   10085             : 
   10086             :         /* Return result */
   10087           6 :         *result = r.out.result;
   10088             : 
   10089           6 :         return NT_STATUS_OK;
   10090             : }
   10091             : 
   10092             : struct dcerpc_samr_RemoveMemberFromForeignDomain_r_state {
   10093             :         TALLOC_CTX *out_mem_ctx;
   10094             : };
   10095             : 
   10096             : static void dcerpc_samr_RemoveMemberFromForeignDomain_r_done(struct tevent_req *subreq);
   10097             : 
   10098           0 : struct tevent_req *dcerpc_samr_RemoveMemberFromForeignDomain_r_send(TALLOC_CTX *mem_ctx,
   10099             :         struct tevent_context *ev,
   10100             :         struct dcerpc_binding_handle *h,
   10101             :         struct samr_RemoveMemberFromForeignDomain *r)
   10102             : {
   10103           0 :         struct tevent_req *req;
   10104           0 :         struct dcerpc_samr_RemoveMemberFromForeignDomain_r_state *state;
   10105           0 :         struct tevent_req *subreq;
   10106             : 
   10107           0 :         req = tevent_req_create(mem_ctx, &state,
   10108             :                                 struct dcerpc_samr_RemoveMemberFromForeignDomain_r_state);
   10109           0 :         if (req == NULL) {
   10110           0 :                 return NULL;
   10111             :         }
   10112             : 
   10113           0 :         state->out_mem_ctx = NULL;
   10114             : 
   10115           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   10116             :                         NULL, &ndr_table_samr,
   10117             :                         NDR_SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN, state, r);
   10118           0 :         if (tevent_req_nomem(subreq, req)) {
   10119           0 :                 return tevent_req_post(req, ev);
   10120             :         }
   10121           0 :         tevent_req_set_callback(subreq, dcerpc_samr_RemoveMemberFromForeignDomain_r_done, req);
   10122             : 
   10123           0 :         return req;
   10124             : }
   10125             : 
   10126           0 : static void dcerpc_samr_RemoveMemberFromForeignDomain_r_done(struct tevent_req *subreq)
   10127             : {
   10128           0 :         struct tevent_req *req =
   10129           0 :                 tevent_req_callback_data(subreq,
   10130             :                 struct tevent_req);
   10131           0 :         NTSTATUS status;
   10132             : 
   10133           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   10134           0 :         TALLOC_FREE(subreq);
   10135           0 :         if (tevent_req_nterror(req, status)) {
   10136           0 :                 return;
   10137             :         }
   10138             : 
   10139           0 :         tevent_req_done(req);
   10140             : }
   10141             : 
   10142           0 : NTSTATUS dcerpc_samr_RemoveMemberFromForeignDomain_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   10143             : {
   10144           0 :         struct dcerpc_samr_RemoveMemberFromForeignDomain_r_state *state =
   10145           0 :                 tevent_req_data(req,
   10146             :                 struct dcerpc_samr_RemoveMemberFromForeignDomain_r_state);
   10147           0 :         NTSTATUS status;
   10148             : 
   10149           0 :         if (tevent_req_is_nterror(req, &status)) {
   10150           0 :                 tevent_req_received(req);
   10151           0 :                 return status;
   10152             :         }
   10153             : 
   10154           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10155             : 
   10156           0 :         tevent_req_received(req);
   10157           0 :         return NT_STATUS_OK;
   10158             : }
   10159             : 
   10160          16 : NTSTATUS dcerpc_samr_RemoveMemberFromForeignDomain_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_RemoveMemberFromForeignDomain *r)
   10161             : {
   10162           0 :         NTSTATUS status;
   10163             : 
   10164          16 :         status = dcerpc_binding_handle_call(h,
   10165             :                         NULL, &ndr_table_samr,
   10166             :                         NDR_SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN, mem_ctx, r);
   10167             : 
   10168          16 :         return status;
   10169             : }
   10170             : 
   10171             : struct dcerpc_samr_RemoveMemberFromForeignDomain_state {
   10172             :         struct samr_RemoveMemberFromForeignDomain orig;
   10173             :         struct samr_RemoveMemberFromForeignDomain tmp;
   10174             :         TALLOC_CTX *out_mem_ctx;
   10175             : };
   10176             : 
   10177             : static void dcerpc_samr_RemoveMemberFromForeignDomain_done(struct tevent_req *subreq);
   10178             : 
   10179           0 : struct tevent_req *dcerpc_samr_RemoveMemberFromForeignDomain_send(TALLOC_CTX *mem_ctx,
   10180             :                                                                   struct tevent_context *ev,
   10181             :                                                                   struct dcerpc_binding_handle *h,
   10182             :                                                                   struct policy_handle *_domain_handle /* [in] [ref] */,
   10183             :                                                                   struct dom_sid2 *_sid /* [in] [ref] */)
   10184             : {
   10185           0 :         struct tevent_req *req;
   10186           0 :         struct dcerpc_samr_RemoveMemberFromForeignDomain_state *state;
   10187           0 :         struct tevent_req *subreq;
   10188             : 
   10189           0 :         req = tevent_req_create(mem_ctx, &state,
   10190             :                                 struct dcerpc_samr_RemoveMemberFromForeignDomain_state);
   10191           0 :         if (req == NULL) {
   10192           0 :                 return NULL;
   10193             :         }
   10194           0 :         state->out_mem_ctx = NULL;
   10195             : 
   10196             :         /* In parameters */
   10197           0 :         state->orig.in.domain_handle = _domain_handle;
   10198           0 :         state->orig.in.sid = _sid;
   10199             : 
   10200             :         /* Out parameters */
   10201             : 
   10202             :         /* Result */
   10203           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   10204             : 
   10205             :         /* make a temporary copy, that we pass to the dispatch function */
   10206           0 :         state->tmp = state->orig;
   10207             : 
   10208           0 :         subreq = dcerpc_samr_RemoveMemberFromForeignDomain_r_send(state, ev, h, &state->tmp);
   10209           0 :         if (tevent_req_nomem(subreq, req)) {
   10210           0 :                 return tevent_req_post(req, ev);
   10211             :         }
   10212           0 :         tevent_req_set_callback(subreq, dcerpc_samr_RemoveMemberFromForeignDomain_done, req);
   10213           0 :         return req;
   10214             : }
   10215             : 
   10216           0 : static void dcerpc_samr_RemoveMemberFromForeignDomain_done(struct tevent_req *subreq)
   10217             : {
   10218           0 :         struct tevent_req *req = tevent_req_callback_data(
   10219             :                 subreq, struct tevent_req);
   10220           0 :         struct dcerpc_samr_RemoveMemberFromForeignDomain_state *state = tevent_req_data(
   10221             :                 req, struct dcerpc_samr_RemoveMemberFromForeignDomain_state);
   10222           0 :         NTSTATUS status;
   10223           0 :         TALLOC_CTX *mem_ctx;
   10224             : 
   10225           0 :         if (state->out_mem_ctx) {
   10226           0 :                 mem_ctx = state->out_mem_ctx;
   10227             :         } else {
   10228           0 :                 mem_ctx = state;
   10229             :         }
   10230             : 
   10231           0 :         status = dcerpc_samr_RemoveMemberFromForeignDomain_r_recv(subreq, mem_ctx);
   10232           0 :         TALLOC_FREE(subreq);
   10233           0 :         if (tevent_req_nterror(req, status)) {
   10234           0 :                 return;
   10235             :         }
   10236             : 
   10237             :         /* Copy out parameters */
   10238             : 
   10239             :         /* Copy result */
   10240           0 :         state->orig.out.result = state->tmp.out.result;
   10241             : 
   10242             :         /* Reset temporary structure */
   10243           0 :         NDR_ZERO_STRUCT(state->tmp);
   10244             : 
   10245           0 :         tevent_req_done(req);
   10246             : }
   10247             : 
   10248           0 : NTSTATUS dcerpc_samr_RemoveMemberFromForeignDomain_recv(struct tevent_req *req,
   10249             :                                                         TALLOC_CTX *mem_ctx,
   10250             :                                                         NTSTATUS *result)
   10251             : {
   10252           0 :         struct dcerpc_samr_RemoveMemberFromForeignDomain_state *state = tevent_req_data(
   10253             :                 req, struct dcerpc_samr_RemoveMemberFromForeignDomain_state);
   10254           0 :         NTSTATUS status;
   10255             : 
   10256           0 :         if (tevent_req_is_nterror(req, &status)) {
   10257           0 :                 tevent_req_received(req);
   10258           0 :                 return status;
   10259             :         }
   10260             : 
   10261             :         /* Steal possible out parameters to the callers context */
   10262           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10263             : 
   10264             :         /* Return result */
   10265           0 :         *result = state->orig.out.result;
   10266             : 
   10267           0 :         tevent_req_received(req);
   10268           0 :         return NT_STATUS_OK;
   10269             : }
   10270             : 
   10271           6 : NTSTATUS dcerpc_samr_RemoveMemberFromForeignDomain(struct dcerpc_binding_handle *h,
   10272             :                                                    TALLOC_CTX *mem_ctx,
   10273             :                                                    struct policy_handle *_domain_handle /* [in] [ref] */,
   10274             :                                                    struct dom_sid2 *_sid /* [in] [ref] */,
   10275             :                                                    NTSTATUS *result)
   10276             : {
   10277           0 :         struct samr_RemoveMemberFromForeignDomain r;
   10278           0 :         NTSTATUS status;
   10279             : 
   10280             :         /* In parameters */
   10281           6 :         r.in.domain_handle = _domain_handle;
   10282           6 :         r.in.sid = _sid;
   10283             : 
   10284             :         /* Out parameters */
   10285             : 
   10286             :         /* Result */
   10287           6 :         NDR_ZERO_STRUCT(r.out.result);
   10288             : 
   10289           6 :         status = dcerpc_samr_RemoveMemberFromForeignDomain_r(h, mem_ctx, &r);
   10290           6 :         if (!NT_STATUS_IS_OK(status)) {
   10291           0 :                 return status;
   10292             :         }
   10293             : 
   10294             :         /* Return variables */
   10295             : 
   10296             :         /* Return result */
   10297           6 :         *result = r.out.result;
   10298             : 
   10299           6 :         return NT_STATUS_OK;
   10300             : }
   10301             : 
   10302             : struct dcerpc_samr_QueryDomainInfo2_r_state {
   10303             :         TALLOC_CTX *out_mem_ctx;
   10304             : };
   10305             : 
   10306             : static void dcerpc_samr_QueryDomainInfo2_r_done(struct tevent_req *subreq);
   10307             : 
   10308           0 : struct tevent_req *dcerpc_samr_QueryDomainInfo2_r_send(TALLOC_CTX *mem_ctx,
   10309             :         struct tevent_context *ev,
   10310             :         struct dcerpc_binding_handle *h,
   10311             :         struct samr_QueryDomainInfo2 *r)
   10312             : {
   10313           0 :         struct tevent_req *req;
   10314           0 :         struct dcerpc_samr_QueryDomainInfo2_r_state *state;
   10315           0 :         struct tevent_req *subreq;
   10316             : 
   10317           0 :         req = tevent_req_create(mem_ctx, &state,
   10318             :                                 struct dcerpc_samr_QueryDomainInfo2_r_state);
   10319           0 :         if (req == NULL) {
   10320           0 :                 return NULL;
   10321             :         }
   10322             : 
   10323           0 :         state->out_mem_ctx = talloc_new(state);
   10324           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10325           0 :                 return tevent_req_post(req, ev);
   10326             :         }
   10327             : 
   10328           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   10329             :                         NULL, &ndr_table_samr,
   10330           0 :                         NDR_SAMR_QUERYDOMAININFO2, state->out_mem_ctx, r);
   10331           0 :         if (tevent_req_nomem(subreq, req)) {
   10332           0 :                 return tevent_req_post(req, ev);
   10333             :         }
   10334           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryDomainInfo2_r_done, req);
   10335             : 
   10336           0 :         return req;
   10337             : }
   10338             : 
   10339           0 : static void dcerpc_samr_QueryDomainInfo2_r_done(struct tevent_req *subreq)
   10340             : {
   10341           0 :         struct tevent_req *req =
   10342           0 :                 tevent_req_callback_data(subreq,
   10343             :                 struct tevent_req);
   10344           0 :         NTSTATUS status;
   10345             : 
   10346           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   10347           0 :         TALLOC_FREE(subreq);
   10348           0 :         if (tevent_req_nterror(req, status)) {
   10349           0 :                 return;
   10350             :         }
   10351             : 
   10352           0 :         tevent_req_done(req);
   10353             : }
   10354             : 
   10355           0 : NTSTATUS dcerpc_samr_QueryDomainInfo2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   10356             : {
   10357           0 :         struct dcerpc_samr_QueryDomainInfo2_r_state *state =
   10358           0 :                 tevent_req_data(req,
   10359             :                 struct dcerpc_samr_QueryDomainInfo2_r_state);
   10360           0 :         NTSTATUS status;
   10361             : 
   10362           0 :         if (tevent_req_is_nterror(req, &status)) {
   10363           0 :                 tevent_req_received(req);
   10364           0 :                 return status;
   10365             :         }
   10366             : 
   10367           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10368             : 
   10369           0 :         tevent_req_received(req);
   10370           0 :         return NT_STATUS_OK;
   10371             : }
   10372             : 
   10373         175 : NTSTATUS dcerpc_samr_QueryDomainInfo2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_QueryDomainInfo2 *r)
   10374             : {
   10375           0 :         NTSTATUS status;
   10376             : 
   10377         175 :         status = dcerpc_binding_handle_call(h,
   10378             :                         NULL, &ndr_table_samr,
   10379             :                         NDR_SAMR_QUERYDOMAININFO2, mem_ctx, r);
   10380             : 
   10381         175 :         return status;
   10382             : }
   10383             : 
   10384             : struct dcerpc_samr_QueryDomainInfo2_state {
   10385             :         struct samr_QueryDomainInfo2 orig;
   10386             :         struct samr_QueryDomainInfo2 tmp;
   10387             :         TALLOC_CTX *out_mem_ctx;
   10388             : };
   10389             : 
   10390             : static void dcerpc_samr_QueryDomainInfo2_done(struct tevent_req *subreq);
   10391             : 
   10392           0 : struct tevent_req *dcerpc_samr_QueryDomainInfo2_send(TALLOC_CTX *mem_ctx,
   10393             :                                                      struct tevent_context *ev,
   10394             :                                                      struct dcerpc_binding_handle *h,
   10395             :                                                      struct policy_handle *_domain_handle /* [in] [ref] */,
   10396             :                                                      enum samr_DomainInfoClass _level /* [in]  */,
   10397             :                                                      union samr_DomainInfo **_info /* [out] [ref,switch_is(level)] */)
   10398             : {
   10399           0 :         struct tevent_req *req;
   10400           0 :         struct dcerpc_samr_QueryDomainInfo2_state *state;
   10401           0 :         struct tevent_req *subreq;
   10402             : 
   10403           0 :         req = tevent_req_create(mem_ctx, &state,
   10404             :                                 struct dcerpc_samr_QueryDomainInfo2_state);
   10405           0 :         if (req == NULL) {
   10406           0 :                 return NULL;
   10407             :         }
   10408           0 :         state->out_mem_ctx = NULL;
   10409             : 
   10410             :         /* In parameters */
   10411           0 :         state->orig.in.domain_handle = _domain_handle;
   10412           0 :         state->orig.in.level = _level;
   10413             : 
   10414             :         /* Out parameters */
   10415           0 :         state->orig.out.info = _info;
   10416             : 
   10417             :         /* Result */
   10418           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   10419             : 
   10420           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   10421             :                              "dcerpc_samr_QueryDomainInfo2_out_memory");
   10422           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10423           0 :                 return tevent_req_post(req, ev);
   10424             :         }
   10425             : 
   10426             :         /* make a temporary copy, that we pass to the dispatch function */
   10427           0 :         state->tmp = state->orig;
   10428             : 
   10429           0 :         subreq = dcerpc_samr_QueryDomainInfo2_r_send(state, ev, h, &state->tmp);
   10430           0 :         if (tevent_req_nomem(subreq, req)) {
   10431           0 :                 return tevent_req_post(req, ev);
   10432             :         }
   10433           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryDomainInfo2_done, req);
   10434           0 :         return req;
   10435             : }
   10436             : 
   10437           0 : static void dcerpc_samr_QueryDomainInfo2_done(struct tevent_req *subreq)
   10438             : {
   10439           0 :         struct tevent_req *req = tevent_req_callback_data(
   10440             :                 subreq, struct tevent_req);
   10441           0 :         struct dcerpc_samr_QueryDomainInfo2_state *state = tevent_req_data(
   10442             :                 req, struct dcerpc_samr_QueryDomainInfo2_state);
   10443           0 :         NTSTATUS status;
   10444           0 :         TALLOC_CTX *mem_ctx;
   10445             : 
   10446           0 :         if (state->out_mem_ctx) {
   10447           0 :                 mem_ctx = state->out_mem_ctx;
   10448             :         } else {
   10449           0 :                 mem_ctx = state;
   10450             :         }
   10451             : 
   10452           0 :         status = dcerpc_samr_QueryDomainInfo2_r_recv(subreq, mem_ctx);
   10453           0 :         TALLOC_FREE(subreq);
   10454           0 :         if (tevent_req_nterror(req, status)) {
   10455           0 :                 return;
   10456             :         }
   10457             : 
   10458             :         /* Copy out parameters */
   10459           0 :         *state->orig.out.info = *state->tmp.out.info;
   10460             : 
   10461             :         /* Copy result */
   10462           0 :         state->orig.out.result = state->tmp.out.result;
   10463             : 
   10464             :         /* Reset temporary structure */
   10465           0 :         NDR_ZERO_STRUCT(state->tmp);
   10466             : 
   10467           0 :         tevent_req_done(req);
   10468             : }
   10469             : 
   10470           0 : NTSTATUS dcerpc_samr_QueryDomainInfo2_recv(struct tevent_req *req,
   10471             :                                            TALLOC_CTX *mem_ctx,
   10472             :                                            NTSTATUS *result)
   10473             : {
   10474           0 :         struct dcerpc_samr_QueryDomainInfo2_state *state = tevent_req_data(
   10475             :                 req, struct dcerpc_samr_QueryDomainInfo2_state);
   10476           0 :         NTSTATUS status;
   10477             : 
   10478           0 :         if (tevent_req_is_nterror(req, &status)) {
   10479           0 :                 tevent_req_received(req);
   10480           0 :                 return status;
   10481             :         }
   10482             : 
   10483             :         /* Steal possible out parameters to the callers context */
   10484           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10485             : 
   10486             :         /* Return result */
   10487           0 :         *result = state->orig.out.result;
   10488             : 
   10489           0 :         tevent_req_received(req);
   10490           0 :         return NT_STATUS_OK;
   10491             : }
   10492             : 
   10493           1 : NTSTATUS dcerpc_samr_QueryDomainInfo2(struct dcerpc_binding_handle *h,
   10494             :                                       TALLOC_CTX *mem_ctx,
   10495             :                                       struct policy_handle *_domain_handle /* [in] [ref] */,
   10496             :                                       enum samr_DomainInfoClass _level /* [in]  */,
   10497             :                                       union samr_DomainInfo **_info /* [out] [ref,switch_is(level)] */,
   10498             :                                       NTSTATUS *result)
   10499             : {
   10500           0 :         struct samr_QueryDomainInfo2 r;
   10501           0 :         NTSTATUS status;
   10502             : 
   10503             :         /* In parameters */
   10504           1 :         r.in.domain_handle = _domain_handle;
   10505           1 :         r.in.level = _level;
   10506             : 
   10507             :         /* Out parameters */
   10508           1 :         r.out.info = _info;
   10509             : 
   10510             :         /* Result */
   10511           1 :         NDR_ZERO_STRUCT(r.out.result);
   10512             : 
   10513           1 :         status = dcerpc_samr_QueryDomainInfo2_r(h, mem_ctx, &r);
   10514           1 :         if (!NT_STATUS_IS_OK(status)) {
   10515           0 :                 return status;
   10516             :         }
   10517             : 
   10518             :         /* Return variables */
   10519           1 :         *_info = *r.out.info;
   10520             : 
   10521             :         /* Return result */
   10522           1 :         *result = r.out.result;
   10523             : 
   10524           1 :         return NT_STATUS_OK;
   10525             : }
   10526             : 
   10527             : struct dcerpc_samr_QueryUserInfo2_r_state {
   10528             :         TALLOC_CTX *out_mem_ctx;
   10529             : };
   10530             : 
   10531             : static void dcerpc_samr_QueryUserInfo2_r_done(struct tevent_req *subreq);
   10532             : 
   10533           0 : struct tevent_req *dcerpc_samr_QueryUserInfo2_r_send(TALLOC_CTX *mem_ctx,
   10534             :         struct tevent_context *ev,
   10535             :         struct dcerpc_binding_handle *h,
   10536             :         struct samr_QueryUserInfo2 *r)
   10537             : {
   10538           0 :         struct tevent_req *req;
   10539           0 :         struct dcerpc_samr_QueryUserInfo2_r_state *state;
   10540           0 :         struct tevent_req *subreq;
   10541             : 
   10542           0 :         req = tevent_req_create(mem_ctx, &state,
   10543             :                                 struct dcerpc_samr_QueryUserInfo2_r_state);
   10544           0 :         if (req == NULL) {
   10545           0 :                 return NULL;
   10546             :         }
   10547             : 
   10548           0 :         state->out_mem_ctx = talloc_new(state);
   10549           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10550           0 :                 return tevent_req_post(req, ev);
   10551             :         }
   10552             : 
   10553           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   10554             :                         NULL, &ndr_table_samr,
   10555           0 :                         NDR_SAMR_QUERYUSERINFO2, state->out_mem_ctx, r);
   10556           0 :         if (tevent_req_nomem(subreq, req)) {
   10557           0 :                 return tevent_req_post(req, ev);
   10558             :         }
   10559           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryUserInfo2_r_done, req);
   10560             : 
   10561           0 :         return req;
   10562             : }
   10563             : 
   10564           0 : static void dcerpc_samr_QueryUserInfo2_r_done(struct tevent_req *subreq)
   10565             : {
   10566           0 :         struct tevent_req *req =
   10567           0 :                 tevent_req_callback_data(subreq,
   10568             :                 struct tevent_req);
   10569           0 :         NTSTATUS status;
   10570             : 
   10571           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   10572           0 :         TALLOC_FREE(subreq);
   10573           0 :         if (tevent_req_nterror(req, status)) {
   10574           0 :                 return;
   10575             :         }
   10576             : 
   10577           0 :         tevent_req_done(req);
   10578             : }
   10579             : 
   10580           0 : NTSTATUS dcerpc_samr_QueryUserInfo2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   10581             : {
   10582           0 :         struct dcerpc_samr_QueryUserInfo2_r_state *state =
   10583           0 :                 tevent_req_data(req,
   10584             :                 struct dcerpc_samr_QueryUserInfo2_r_state);
   10585           0 :         NTSTATUS status;
   10586             : 
   10587           0 :         if (tevent_req_is_nterror(req, &status)) {
   10588           0 :                 tevent_req_received(req);
   10589           0 :                 return status;
   10590             :         }
   10591             : 
   10592           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10593             : 
   10594           0 :         tevent_req_received(req);
   10595           0 :         return NT_STATUS_OK;
   10596             : }
   10597             : 
   10598        1128 : NTSTATUS dcerpc_samr_QueryUserInfo2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_QueryUserInfo2 *r)
   10599             : {
   10600           0 :         NTSTATUS status;
   10601             : 
   10602        1128 :         status = dcerpc_binding_handle_call(h,
   10603             :                         NULL, &ndr_table_samr,
   10604             :                         NDR_SAMR_QUERYUSERINFO2, mem_ctx, r);
   10605             : 
   10606        1128 :         return status;
   10607             : }
   10608             : 
   10609             : struct dcerpc_samr_QueryUserInfo2_state {
   10610             :         struct samr_QueryUserInfo2 orig;
   10611             :         struct samr_QueryUserInfo2 tmp;
   10612             :         TALLOC_CTX *out_mem_ctx;
   10613             : };
   10614             : 
   10615             : static void dcerpc_samr_QueryUserInfo2_done(struct tevent_req *subreq);
   10616             : 
   10617           0 : struct tevent_req *dcerpc_samr_QueryUserInfo2_send(TALLOC_CTX *mem_ctx,
   10618             :                                                    struct tevent_context *ev,
   10619             :                                                    struct dcerpc_binding_handle *h,
   10620             :                                                    struct policy_handle *_user_handle /* [in] [ref] */,
   10621             :                                                    enum samr_UserInfoLevel _level /* [in]  */,
   10622             :                                                    union samr_UserInfo **_info /* [out] [ref,switch_is(level)] */)
   10623             : {
   10624           0 :         struct tevent_req *req;
   10625           0 :         struct dcerpc_samr_QueryUserInfo2_state *state;
   10626           0 :         struct tevent_req *subreq;
   10627             : 
   10628           0 :         req = tevent_req_create(mem_ctx, &state,
   10629             :                                 struct dcerpc_samr_QueryUserInfo2_state);
   10630           0 :         if (req == NULL) {
   10631           0 :                 return NULL;
   10632             :         }
   10633           0 :         state->out_mem_ctx = NULL;
   10634             : 
   10635             :         /* In parameters */
   10636           0 :         state->orig.in.user_handle = _user_handle;
   10637           0 :         state->orig.in.level = _level;
   10638             : 
   10639             :         /* Out parameters */
   10640           0 :         state->orig.out.info = _info;
   10641             : 
   10642             :         /* Result */
   10643           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   10644             : 
   10645           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   10646             :                              "dcerpc_samr_QueryUserInfo2_out_memory");
   10647           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10648           0 :                 return tevent_req_post(req, ev);
   10649             :         }
   10650             : 
   10651             :         /* make a temporary copy, that we pass to the dispatch function */
   10652           0 :         state->tmp = state->orig;
   10653             : 
   10654           0 :         subreq = dcerpc_samr_QueryUserInfo2_r_send(state, ev, h, &state->tmp);
   10655           0 :         if (tevent_req_nomem(subreq, req)) {
   10656           0 :                 return tevent_req_post(req, ev);
   10657             :         }
   10658           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryUserInfo2_done, req);
   10659           0 :         return req;
   10660             : }
   10661             : 
   10662           0 : static void dcerpc_samr_QueryUserInfo2_done(struct tevent_req *subreq)
   10663             : {
   10664           0 :         struct tevent_req *req = tevent_req_callback_data(
   10665             :                 subreq, struct tevent_req);
   10666           0 :         struct dcerpc_samr_QueryUserInfo2_state *state = tevent_req_data(
   10667             :                 req, struct dcerpc_samr_QueryUserInfo2_state);
   10668           0 :         NTSTATUS status;
   10669           0 :         TALLOC_CTX *mem_ctx;
   10670             : 
   10671           0 :         if (state->out_mem_ctx) {
   10672           0 :                 mem_ctx = state->out_mem_ctx;
   10673             :         } else {
   10674           0 :                 mem_ctx = state;
   10675             :         }
   10676             : 
   10677           0 :         status = dcerpc_samr_QueryUserInfo2_r_recv(subreq, mem_ctx);
   10678           0 :         TALLOC_FREE(subreq);
   10679           0 :         if (tevent_req_nterror(req, status)) {
   10680           0 :                 return;
   10681             :         }
   10682             : 
   10683             :         /* Copy out parameters */
   10684           0 :         *state->orig.out.info = *state->tmp.out.info;
   10685             : 
   10686             :         /* Copy result */
   10687           0 :         state->orig.out.result = state->tmp.out.result;
   10688             : 
   10689             :         /* Reset temporary structure */
   10690           0 :         NDR_ZERO_STRUCT(state->tmp);
   10691             : 
   10692           0 :         tevent_req_done(req);
   10693             : }
   10694             : 
   10695           0 : NTSTATUS dcerpc_samr_QueryUserInfo2_recv(struct tevent_req *req,
   10696             :                                          TALLOC_CTX *mem_ctx,
   10697             :                                          NTSTATUS *result)
   10698             : {
   10699           0 :         struct dcerpc_samr_QueryUserInfo2_state *state = tevent_req_data(
   10700             :                 req, struct dcerpc_samr_QueryUserInfo2_state);
   10701           0 :         NTSTATUS status;
   10702             : 
   10703           0 :         if (tevent_req_is_nterror(req, &status)) {
   10704           0 :                 tevent_req_received(req);
   10705           0 :                 return status;
   10706             :         }
   10707             : 
   10708             :         /* Steal possible out parameters to the callers context */
   10709           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10710             : 
   10711             :         /* Return result */
   10712           0 :         *result = state->orig.out.result;
   10713             : 
   10714           0 :         tevent_req_received(req);
   10715           0 :         return NT_STATUS_OK;
   10716             : }
   10717             : 
   10718         138 : NTSTATUS dcerpc_samr_QueryUserInfo2(struct dcerpc_binding_handle *h,
   10719             :                                     TALLOC_CTX *mem_ctx,
   10720             :                                     struct policy_handle *_user_handle /* [in] [ref] */,
   10721             :                                     enum samr_UserInfoLevel _level /* [in]  */,
   10722             :                                     union samr_UserInfo **_info /* [out] [ref,switch_is(level)] */,
   10723             :                                     NTSTATUS *result)
   10724             : {
   10725           0 :         struct samr_QueryUserInfo2 r;
   10726           0 :         NTSTATUS status;
   10727             : 
   10728             :         /* In parameters */
   10729         138 :         r.in.user_handle = _user_handle;
   10730         138 :         r.in.level = _level;
   10731             : 
   10732             :         /* Out parameters */
   10733         138 :         r.out.info = _info;
   10734             : 
   10735             :         /* Result */
   10736         138 :         NDR_ZERO_STRUCT(r.out.result);
   10737             : 
   10738         138 :         status = dcerpc_samr_QueryUserInfo2_r(h, mem_ctx, &r);
   10739         138 :         if (!NT_STATUS_IS_OK(status)) {
   10740           0 :                 return status;
   10741             :         }
   10742             : 
   10743             :         /* Return variables */
   10744         138 :         *_info = *r.out.info;
   10745             : 
   10746             :         /* Return result */
   10747         138 :         *result = r.out.result;
   10748             : 
   10749         138 :         return NT_STATUS_OK;
   10750             : }
   10751             : 
   10752             : struct dcerpc_samr_QueryDisplayInfo2_r_state {
   10753             :         TALLOC_CTX *out_mem_ctx;
   10754             : };
   10755             : 
   10756             : static void dcerpc_samr_QueryDisplayInfo2_r_done(struct tevent_req *subreq);
   10757             : 
   10758           0 : struct tevent_req *dcerpc_samr_QueryDisplayInfo2_r_send(TALLOC_CTX *mem_ctx,
   10759             :         struct tevent_context *ev,
   10760             :         struct dcerpc_binding_handle *h,
   10761             :         struct samr_QueryDisplayInfo2 *r)
   10762             : {
   10763           0 :         struct tevent_req *req;
   10764           0 :         struct dcerpc_samr_QueryDisplayInfo2_r_state *state;
   10765           0 :         struct tevent_req *subreq;
   10766             : 
   10767           0 :         req = tevent_req_create(mem_ctx, &state,
   10768             :                                 struct dcerpc_samr_QueryDisplayInfo2_r_state);
   10769           0 :         if (req == NULL) {
   10770           0 :                 return NULL;
   10771             :         }
   10772             : 
   10773           0 :         state->out_mem_ctx = talloc_new(state);
   10774           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10775           0 :                 return tevent_req_post(req, ev);
   10776             :         }
   10777             : 
   10778           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   10779             :                         NULL, &ndr_table_samr,
   10780           0 :                         NDR_SAMR_QUERYDISPLAYINFO2, state->out_mem_ctx, r);
   10781           0 :         if (tevent_req_nomem(subreq, req)) {
   10782           0 :                 return tevent_req_post(req, ev);
   10783             :         }
   10784           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryDisplayInfo2_r_done, req);
   10785             : 
   10786           0 :         return req;
   10787             : }
   10788             : 
   10789           0 : static void dcerpc_samr_QueryDisplayInfo2_r_done(struct tevent_req *subreq)
   10790             : {
   10791           0 :         struct tevent_req *req =
   10792           0 :                 tevent_req_callback_data(subreq,
   10793             :                 struct tevent_req);
   10794           0 :         NTSTATUS status;
   10795             : 
   10796           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   10797           0 :         TALLOC_FREE(subreq);
   10798           0 :         if (tevent_req_nterror(req, status)) {
   10799           0 :                 return;
   10800             :         }
   10801             : 
   10802           0 :         tevent_req_done(req);
   10803             : }
   10804             : 
   10805           0 : NTSTATUS dcerpc_samr_QueryDisplayInfo2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   10806             : {
   10807           0 :         struct dcerpc_samr_QueryDisplayInfo2_r_state *state =
   10808           0 :                 tevent_req_data(req,
   10809             :                 struct dcerpc_samr_QueryDisplayInfo2_r_state);
   10810           0 :         NTSTATUS status;
   10811             : 
   10812           0 :         if (tevent_req_is_nterror(req, &status)) {
   10813           0 :                 tevent_req_received(req);
   10814           0 :                 return status;
   10815             :         }
   10816             : 
   10817           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10818             : 
   10819           0 :         tevent_req_received(req);
   10820           0 :         return NT_STATUS_OK;
   10821             : }
   10822             : 
   10823          54 : NTSTATUS dcerpc_samr_QueryDisplayInfo2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_QueryDisplayInfo2 *r)
   10824             : {
   10825           0 :         NTSTATUS status;
   10826             : 
   10827          54 :         status = dcerpc_binding_handle_call(h,
   10828             :                         NULL, &ndr_table_samr,
   10829             :                         NDR_SAMR_QUERYDISPLAYINFO2, mem_ctx, r);
   10830             : 
   10831          54 :         return status;
   10832             : }
   10833             : 
   10834             : struct dcerpc_samr_QueryDisplayInfo2_state {
   10835             :         struct samr_QueryDisplayInfo2 orig;
   10836             :         struct samr_QueryDisplayInfo2 tmp;
   10837             :         TALLOC_CTX *out_mem_ctx;
   10838             : };
   10839             : 
   10840             : static void dcerpc_samr_QueryDisplayInfo2_done(struct tevent_req *subreq);
   10841             : 
   10842           0 : struct tevent_req *dcerpc_samr_QueryDisplayInfo2_send(TALLOC_CTX *mem_ctx,
   10843             :                                                       struct tevent_context *ev,
   10844             :                                                       struct dcerpc_binding_handle *h,
   10845             :                                                       struct policy_handle *_domain_handle /* [in] [ref] */,
   10846             :                                                       uint16_t _level /* [in]  */,
   10847             :                                                       uint32_t _start_idx /* [in]  */,
   10848             :                                                       uint32_t _max_entries /* [in]  */,
   10849             :                                                       uint32_t _buf_size /* [in]  */,
   10850             :                                                       uint32_t *_total_size /* [out] [ref] */,
   10851             :                                                       uint32_t *_returned_size /* [out] [ref] */,
   10852             :                                                       union samr_DispInfo *_info /* [out] [ref,switch_is(level)] */)
   10853             : {
   10854           0 :         struct tevent_req *req;
   10855           0 :         struct dcerpc_samr_QueryDisplayInfo2_state *state;
   10856           0 :         struct tevent_req *subreq;
   10857             : 
   10858           0 :         req = tevent_req_create(mem_ctx, &state,
   10859             :                                 struct dcerpc_samr_QueryDisplayInfo2_state);
   10860           0 :         if (req == NULL) {
   10861           0 :                 return NULL;
   10862             :         }
   10863           0 :         state->out_mem_ctx = NULL;
   10864             : 
   10865             :         /* In parameters */
   10866           0 :         state->orig.in.domain_handle = _domain_handle;
   10867           0 :         state->orig.in.level = _level;
   10868           0 :         state->orig.in.start_idx = _start_idx;
   10869           0 :         state->orig.in.max_entries = _max_entries;
   10870           0 :         state->orig.in.buf_size = _buf_size;
   10871             : 
   10872             :         /* Out parameters */
   10873           0 :         state->orig.out.total_size = _total_size;
   10874           0 :         state->orig.out.returned_size = _returned_size;
   10875           0 :         state->orig.out.info = _info;
   10876             : 
   10877             :         /* Result */
   10878           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   10879             : 
   10880           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   10881             :                              "dcerpc_samr_QueryDisplayInfo2_out_memory");
   10882           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10883           0 :                 return tevent_req_post(req, ev);
   10884             :         }
   10885             : 
   10886             :         /* make a temporary copy, that we pass to the dispatch function */
   10887           0 :         state->tmp = state->orig;
   10888             : 
   10889           0 :         subreq = dcerpc_samr_QueryDisplayInfo2_r_send(state, ev, h, &state->tmp);
   10890           0 :         if (tevent_req_nomem(subreq, req)) {
   10891           0 :                 return tevent_req_post(req, ev);
   10892             :         }
   10893           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryDisplayInfo2_done, req);
   10894           0 :         return req;
   10895             : }
   10896             : 
   10897           0 : static void dcerpc_samr_QueryDisplayInfo2_done(struct tevent_req *subreq)
   10898             : {
   10899           0 :         struct tevent_req *req = tevent_req_callback_data(
   10900             :                 subreq, struct tevent_req);
   10901           0 :         struct dcerpc_samr_QueryDisplayInfo2_state *state = tevent_req_data(
   10902             :                 req, struct dcerpc_samr_QueryDisplayInfo2_state);
   10903           0 :         NTSTATUS status;
   10904           0 :         TALLOC_CTX *mem_ctx;
   10905             : 
   10906           0 :         if (state->out_mem_ctx) {
   10907           0 :                 mem_ctx = state->out_mem_ctx;
   10908             :         } else {
   10909           0 :                 mem_ctx = state;
   10910             :         }
   10911             : 
   10912           0 :         status = dcerpc_samr_QueryDisplayInfo2_r_recv(subreq, mem_ctx);
   10913           0 :         TALLOC_FREE(subreq);
   10914           0 :         if (tevent_req_nterror(req, status)) {
   10915           0 :                 return;
   10916             :         }
   10917             : 
   10918             :         /* Copy out parameters */
   10919           0 :         *state->orig.out.total_size = *state->tmp.out.total_size;
   10920           0 :         *state->orig.out.returned_size = *state->tmp.out.returned_size;
   10921           0 :         *state->orig.out.info = *state->tmp.out.info;
   10922             : 
   10923             :         /* Copy result */
   10924           0 :         state->orig.out.result = state->tmp.out.result;
   10925             : 
   10926             :         /* Reset temporary structure */
   10927           0 :         NDR_ZERO_STRUCT(state->tmp);
   10928             : 
   10929           0 :         tevent_req_done(req);
   10930             : }
   10931             : 
   10932           0 : NTSTATUS dcerpc_samr_QueryDisplayInfo2_recv(struct tevent_req *req,
   10933             :                                             TALLOC_CTX *mem_ctx,
   10934             :                                             NTSTATUS *result)
   10935             : {
   10936           0 :         struct dcerpc_samr_QueryDisplayInfo2_state *state = tevent_req_data(
   10937             :                 req, struct dcerpc_samr_QueryDisplayInfo2_state);
   10938           0 :         NTSTATUS status;
   10939             : 
   10940           0 :         if (tevent_req_is_nterror(req, &status)) {
   10941           0 :                 tevent_req_received(req);
   10942           0 :                 return status;
   10943             :         }
   10944             : 
   10945             :         /* Steal possible out parameters to the callers context */
   10946           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10947             : 
   10948             :         /* Return result */
   10949           0 :         *result = state->orig.out.result;
   10950             : 
   10951           0 :         tevent_req_received(req);
   10952           0 :         return NT_STATUS_OK;
   10953             : }
   10954             : 
   10955           4 : NTSTATUS dcerpc_samr_QueryDisplayInfo2(struct dcerpc_binding_handle *h,
   10956             :                                        TALLOC_CTX *mem_ctx,
   10957             :                                        struct policy_handle *_domain_handle /* [in] [ref] */,
   10958             :                                        uint16_t _level /* [in]  */,
   10959             :                                        uint32_t _start_idx /* [in]  */,
   10960             :                                        uint32_t _max_entries /* [in]  */,
   10961             :                                        uint32_t _buf_size /* [in]  */,
   10962             :                                        uint32_t *_total_size /* [out] [ref] */,
   10963             :                                        uint32_t *_returned_size /* [out] [ref] */,
   10964             :                                        union samr_DispInfo *_info /* [out] [ref,switch_is(level)] */,
   10965             :                                        NTSTATUS *result)
   10966             : {
   10967           0 :         struct samr_QueryDisplayInfo2 r;
   10968           0 :         NTSTATUS status;
   10969             : 
   10970             :         /* In parameters */
   10971           4 :         r.in.domain_handle = _domain_handle;
   10972           4 :         r.in.level = _level;
   10973           4 :         r.in.start_idx = _start_idx;
   10974           4 :         r.in.max_entries = _max_entries;
   10975           4 :         r.in.buf_size = _buf_size;
   10976             : 
   10977             :         /* Out parameters */
   10978           4 :         r.out.total_size = _total_size;
   10979           4 :         r.out.returned_size = _returned_size;
   10980           4 :         r.out.info = _info;
   10981             : 
   10982             :         /* Result */
   10983           4 :         NDR_ZERO_STRUCT(r.out.result);
   10984             : 
   10985           4 :         status = dcerpc_samr_QueryDisplayInfo2_r(h, mem_ctx, &r);
   10986           4 :         if (!NT_STATUS_IS_OK(status)) {
   10987           0 :                 return status;
   10988             :         }
   10989             : 
   10990             :         /* Return variables */
   10991           4 :         *_total_size = *r.out.total_size;
   10992           4 :         *_returned_size = *r.out.returned_size;
   10993           4 :         *_info = *r.out.info;
   10994             : 
   10995             :         /* Return result */
   10996           4 :         *result = r.out.result;
   10997             : 
   10998           4 :         return NT_STATUS_OK;
   10999             : }
   11000             : 
   11001             : struct dcerpc_samr_GetDisplayEnumerationIndex2_r_state {
   11002             :         TALLOC_CTX *out_mem_ctx;
   11003             : };
   11004             : 
   11005             : static void dcerpc_samr_GetDisplayEnumerationIndex2_r_done(struct tevent_req *subreq);
   11006             : 
   11007           0 : struct tevent_req *dcerpc_samr_GetDisplayEnumerationIndex2_r_send(TALLOC_CTX *mem_ctx,
   11008             :         struct tevent_context *ev,
   11009             :         struct dcerpc_binding_handle *h,
   11010             :         struct samr_GetDisplayEnumerationIndex2 *r)
   11011             : {
   11012           0 :         struct tevent_req *req;
   11013           0 :         struct dcerpc_samr_GetDisplayEnumerationIndex2_r_state *state;
   11014           0 :         struct tevent_req *subreq;
   11015             : 
   11016           0 :         req = tevent_req_create(mem_ctx, &state,
   11017             :                                 struct dcerpc_samr_GetDisplayEnumerationIndex2_r_state);
   11018           0 :         if (req == NULL) {
   11019           0 :                 return NULL;
   11020             :         }
   11021             : 
   11022           0 :         state->out_mem_ctx = talloc_new(state);
   11023           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   11024           0 :                 return tevent_req_post(req, ev);
   11025             :         }
   11026             : 
   11027           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   11028             :                         NULL, &ndr_table_samr,
   11029           0 :                         NDR_SAMR_GETDISPLAYENUMERATIONINDEX2, state->out_mem_ctx, r);
   11030           0 :         if (tevent_req_nomem(subreq, req)) {
   11031           0 :                 return tevent_req_post(req, ev);
   11032             :         }
   11033           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetDisplayEnumerationIndex2_r_done, req);
   11034             : 
   11035           0 :         return req;
   11036             : }
   11037             : 
   11038           0 : static void dcerpc_samr_GetDisplayEnumerationIndex2_r_done(struct tevent_req *subreq)
   11039             : {
   11040           0 :         struct tevent_req *req =
   11041           0 :                 tevent_req_callback_data(subreq,
   11042             :                 struct tevent_req);
   11043           0 :         NTSTATUS status;
   11044             : 
   11045           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   11046           0 :         TALLOC_FREE(subreq);
   11047           0 :         if (tevent_req_nterror(req, status)) {
   11048           0 :                 return;
   11049             :         }
   11050             : 
   11051           0 :         tevent_req_done(req);
   11052             : }
   11053             : 
   11054           0 : NTSTATUS dcerpc_samr_GetDisplayEnumerationIndex2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   11055             : {
   11056           0 :         struct dcerpc_samr_GetDisplayEnumerationIndex2_r_state *state =
   11057           0 :                 tevent_req_data(req,
   11058             :                 struct dcerpc_samr_GetDisplayEnumerationIndex2_r_state);
   11059           0 :         NTSTATUS status;
   11060             : 
   11061           0 :         if (tevent_req_is_nterror(req, &status)) {
   11062           0 :                 tevent_req_received(req);
   11063           0 :                 return status;
   11064             :         }
   11065             : 
   11066           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11067             : 
   11068           0 :         tevent_req_received(req);
   11069           0 :         return NT_STATUS_OK;
   11070             : }
   11071             : 
   11072          40 : NTSTATUS dcerpc_samr_GetDisplayEnumerationIndex2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_GetDisplayEnumerationIndex2 *r)
   11073             : {
   11074           0 :         NTSTATUS status;
   11075             : 
   11076          40 :         status = dcerpc_binding_handle_call(h,
   11077             :                         NULL, &ndr_table_samr,
   11078             :                         NDR_SAMR_GETDISPLAYENUMERATIONINDEX2, mem_ctx, r);
   11079             : 
   11080          40 :         return status;
   11081             : }
   11082             : 
   11083             : struct dcerpc_samr_GetDisplayEnumerationIndex2_state {
   11084             :         struct samr_GetDisplayEnumerationIndex2 orig;
   11085             :         struct samr_GetDisplayEnumerationIndex2 tmp;
   11086             :         TALLOC_CTX *out_mem_ctx;
   11087             : };
   11088             : 
   11089             : static void dcerpc_samr_GetDisplayEnumerationIndex2_done(struct tevent_req *subreq);
   11090             : 
   11091           0 : struct tevent_req *dcerpc_samr_GetDisplayEnumerationIndex2_send(TALLOC_CTX *mem_ctx,
   11092             :                                                                 struct tevent_context *ev,
   11093             :                                                                 struct dcerpc_binding_handle *h,
   11094             :                                                                 struct policy_handle *_domain_handle /* [in] [ref] */,
   11095             :                                                                 uint16_t _level /* [in]  */,
   11096             :                                                                 struct lsa_String *_name /* [in] [ref] */,
   11097             :                                                                 uint32_t *_idx /* [out] [ref] */)
   11098             : {
   11099           0 :         struct tevent_req *req;
   11100           0 :         struct dcerpc_samr_GetDisplayEnumerationIndex2_state *state;
   11101           0 :         struct tevent_req *subreq;
   11102             : 
   11103           0 :         req = tevent_req_create(mem_ctx, &state,
   11104             :                                 struct dcerpc_samr_GetDisplayEnumerationIndex2_state);
   11105           0 :         if (req == NULL) {
   11106           0 :                 return NULL;
   11107             :         }
   11108           0 :         state->out_mem_ctx = NULL;
   11109             : 
   11110             :         /* In parameters */
   11111           0 :         state->orig.in.domain_handle = _domain_handle;
   11112           0 :         state->orig.in.level = _level;
   11113           0 :         state->orig.in.name = _name;
   11114             : 
   11115             :         /* Out parameters */
   11116           0 :         state->orig.out.idx = _idx;
   11117             : 
   11118             :         /* Result */
   11119           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   11120             : 
   11121           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   11122             :                              "dcerpc_samr_GetDisplayEnumerationIndex2_out_memory");
   11123           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   11124           0 :                 return tevent_req_post(req, ev);
   11125             :         }
   11126             : 
   11127             :         /* make a temporary copy, that we pass to the dispatch function */
   11128           0 :         state->tmp = state->orig;
   11129             : 
   11130           0 :         subreq = dcerpc_samr_GetDisplayEnumerationIndex2_r_send(state, ev, h, &state->tmp);
   11131           0 :         if (tevent_req_nomem(subreq, req)) {
   11132           0 :                 return tevent_req_post(req, ev);
   11133             :         }
   11134           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetDisplayEnumerationIndex2_done, req);
   11135           0 :         return req;
   11136             : }
   11137             : 
   11138           0 : static void dcerpc_samr_GetDisplayEnumerationIndex2_done(struct tevent_req *subreq)
   11139             : {
   11140           0 :         struct tevent_req *req = tevent_req_callback_data(
   11141             :                 subreq, struct tevent_req);
   11142           0 :         struct dcerpc_samr_GetDisplayEnumerationIndex2_state *state = tevent_req_data(
   11143             :                 req, struct dcerpc_samr_GetDisplayEnumerationIndex2_state);
   11144           0 :         NTSTATUS status;
   11145           0 :         TALLOC_CTX *mem_ctx;
   11146             : 
   11147           0 :         if (state->out_mem_ctx) {
   11148           0 :                 mem_ctx = state->out_mem_ctx;
   11149             :         } else {
   11150           0 :                 mem_ctx = state;
   11151             :         }
   11152             : 
   11153           0 :         status = dcerpc_samr_GetDisplayEnumerationIndex2_r_recv(subreq, mem_ctx);
   11154           0 :         TALLOC_FREE(subreq);
   11155           0 :         if (tevent_req_nterror(req, status)) {
   11156           0 :                 return;
   11157             :         }
   11158             : 
   11159             :         /* Copy out parameters */
   11160           0 :         *state->orig.out.idx = *state->tmp.out.idx;
   11161             : 
   11162             :         /* Copy result */
   11163           0 :         state->orig.out.result = state->tmp.out.result;
   11164             : 
   11165             :         /* Reset temporary structure */
   11166           0 :         NDR_ZERO_STRUCT(state->tmp);
   11167             : 
   11168           0 :         tevent_req_done(req);
   11169             : }
   11170             : 
   11171           0 : NTSTATUS dcerpc_samr_GetDisplayEnumerationIndex2_recv(struct tevent_req *req,
   11172             :                                                       TALLOC_CTX *mem_ctx,
   11173             :                                                       NTSTATUS *result)
   11174             : {
   11175           0 :         struct dcerpc_samr_GetDisplayEnumerationIndex2_state *state = tevent_req_data(
   11176             :                 req, struct dcerpc_samr_GetDisplayEnumerationIndex2_state);
   11177           0 :         NTSTATUS status;
   11178             : 
   11179           0 :         if (tevent_req_is_nterror(req, &status)) {
   11180           0 :                 tevent_req_received(req);
   11181           0 :                 return status;
   11182             :         }
   11183             : 
   11184             :         /* Steal possible out parameters to the callers context */
   11185           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11186             : 
   11187             :         /* Return result */
   11188           0 :         *result = state->orig.out.result;
   11189             : 
   11190           0 :         tevent_req_received(req);
   11191           0 :         return NT_STATUS_OK;
   11192             : }
   11193             : 
   11194           0 : NTSTATUS dcerpc_samr_GetDisplayEnumerationIndex2(struct dcerpc_binding_handle *h,
   11195             :                                                  TALLOC_CTX *mem_ctx,
   11196             :                                                  struct policy_handle *_domain_handle /* [in] [ref] */,
   11197             :                                                  uint16_t _level /* [in]  */,
   11198             :                                                  struct lsa_String *_name /* [in] [ref] */,
   11199             :                                                  uint32_t *_idx /* [out] [ref] */,
   11200             :                                                  NTSTATUS *result)
   11201             : {
   11202           0 :         struct samr_GetDisplayEnumerationIndex2 r;
   11203           0 :         NTSTATUS status;
   11204             : 
   11205             :         /* In parameters */
   11206           0 :         r.in.domain_handle = _domain_handle;
   11207           0 :         r.in.level = _level;
   11208           0 :         r.in.name = _name;
   11209             : 
   11210             :         /* Out parameters */
   11211           0 :         r.out.idx = _idx;
   11212             : 
   11213             :         /* Result */
   11214           0 :         NDR_ZERO_STRUCT(r.out.result);
   11215             : 
   11216           0 :         status = dcerpc_samr_GetDisplayEnumerationIndex2_r(h, mem_ctx, &r);
   11217           0 :         if (!NT_STATUS_IS_OK(status)) {
   11218           0 :                 return status;
   11219             :         }
   11220             : 
   11221             :         /* Return variables */
   11222           0 :         *_idx = *r.out.idx;
   11223             : 
   11224             :         /* Return result */
   11225           0 :         *result = r.out.result;
   11226             : 
   11227           0 :         return NT_STATUS_OK;
   11228             : }
   11229             : 
   11230             : struct dcerpc_samr_CreateUser2_r_state {
   11231             :         TALLOC_CTX *out_mem_ctx;
   11232             : };
   11233             : 
   11234             : static void dcerpc_samr_CreateUser2_r_done(struct tevent_req *subreq);
   11235             : 
   11236           0 : struct tevent_req *dcerpc_samr_CreateUser2_r_send(TALLOC_CTX *mem_ctx,
   11237             :         struct tevent_context *ev,
   11238             :         struct dcerpc_binding_handle *h,
   11239             :         struct samr_CreateUser2 *r)
   11240             : {
   11241           0 :         struct tevent_req *req;
   11242           0 :         struct dcerpc_samr_CreateUser2_r_state *state;
   11243           0 :         struct tevent_req *subreq;
   11244             : 
   11245           0 :         req = tevent_req_create(mem_ctx, &state,
   11246             :                                 struct dcerpc_samr_CreateUser2_r_state);
   11247           0 :         if (req == NULL) {
   11248           0 :                 return NULL;
   11249             :         }
   11250             : 
   11251           0 :         state->out_mem_ctx = talloc_new(state);
   11252           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   11253           0 :                 return tevent_req_post(req, ev);
   11254             :         }
   11255             : 
   11256           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   11257             :                         NULL, &ndr_table_samr,
   11258           0 :                         NDR_SAMR_CREATEUSER2, state->out_mem_ctx, r);
   11259           0 :         if (tevent_req_nomem(subreq, req)) {
   11260           0 :                 return tevent_req_post(req, ev);
   11261             :         }
   11262           0 :         tevent_req_set_callback(subreq, dcerpc_samr_CreateUser2_r_done, req);
   11263             : 
   11264           0 :         return req;
   11265             : }
   11266             : 
   11267           0 : static void dcerpc_samr_CreateUser2_r_done(struct tevent_req *subreq)
   11268             : {
   11269           0 :         struct tevent_req *req =
   11270           0 :                 tevent_req_callback_data(subreq,
   11271             :                 struct tevent_req);
   11272           0 :         NTSTATUS status;
   11273             : 
   11274           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   11275           0 :         TALLOC_FREE(subreq);
   11276           0 :         if (tevent_req_nterror(req, status)) {
   11277           0 :                 return;
   11278             :         }
   11279             : 
   11280           0 :         tevent_req_done(req);
   11281             : }
   11282             : 
   11283           0 : NTSTATUS dcerpc_samr_CreateUser2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   11284             : {
   11285           0 :         struct dcerpc_samr_CreateUser2_r_state *state =
   11286           0 :                 tevent_req_data(req,
   11287             :                 struct dcerpc_samr_CreateUser2_r_state);
   11288           0 :         NTSTATUS status;
   11289             : 
   11290           0 :         if (tevent_req_is_nterror(req, &status)) {
   11291           0 :                 tevent_req_received(req);
   11292           0 :                 return status;
   11293             :         }
   11294             : 
   11295           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11296             : 
   11297           0 :         tevent_req_received(req);
   11298           0 :         return NT_STATUS_OK;
   11299             : }
   11300             : 
   11301         913 : NTSTATUS dcerpc_samr_CreateUser2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_CreateUser2 *r)
   11302             : {
   11303          72 :         NTSTATUS status;
   11304             : 
   11305         913 :         status = dcerpc_binding_handle_call(h,
   11306             :                         NULL, &ndr_table_samr,
   11307             :                         NDR_SAMR_CREATEUSER2, mem_ctx, r);
   11308             : 
   11309         913 :         return status;
   11310             : }
   11311             : 
   11312             : struct dcerpc_samr_CreateUser2_state {
   11313             :         struct samr_CreateUser2 orig;
   11314             :         struct samr_CreateUser2 tmp;
   11315             :         TALLOC_CTX *out_mem_ctx;
   11316             : };
   11317             : 
   11318             : static void dcerpc_samr_CreateUser2_done(struct tevent_req *subreq);
   11319             : 
   11320           0 : struct tevent_req *dcerpc_samr_CreateUser2_send(TALLOC_CTX *mem_ctx,
   11321             :                                                 struct tevent_context *ev,
   11322             :                                                 struct dcerpc_binding_handle *h,
   11323             :                                                 struct policy_handle *_domain_handle /* [in] [ref] */,
   11324             :                                                 struct lsa_String *_account_name /* [in] [ref] */,
   11325             :                                                 uint32_t _acct_flags /* [in]  */,
   11326             :                                                 uint32_t _access_mask /* [in]  */,
   11327             :                                                 struct policy_handle *_user_handle /* [out] [ref] */,
   11328             :                                                 uint32_t *_access_granted /* [out] [ref] */,
   11329             :                                                 uint32_t *_rid /* [out] [ref] */)
   11330             : {
   11331           0 :         struct tevent_req *req;
   11332           0 :         struct dcerpc_samr_CreateUser2_state *state;
   11333           0 :         struct tevent_req *subreq;
   11334             : 
   11335           0 :         req = tevent_req_create(mem_ctx, &state,
   11336             :                                 struct dcerpc_samr_CreateUser2_state);
   11337           0 :         if (req == NULL) {
   11338           0 :                 return NULL;
   11339             :         }
   11340           0 :         state->out_mem_ctx = NULL;
   11341             : 
   11342             :         /* In parameters */
   11343           0 :         state->orig.in.domain_handle = _domain_handle;
   11344           0 :         state->orig.in.account_name = _account_name;
   11345           0 :         state->orig.in.acct_flags = _acct_flags;
   11346           0 :         state->orig.in.access_mask = _access_mask;
   11347             : 
   11348             :         /* Out parameters */
   11349           0 :         state->orig.out.user_handle = _user_handle;
   11350           0 :         state->orig.out.access_granted = _access_granted;
   11351           0 :         state->orig.out.rid = _rid;
   11352             : 
   11353             :         /* Result */
   11354           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   11355             : 
   11356           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   11357             :                              "dcerpc_samr_CreateUser2_out_memory");
   11358           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   11359           0 :                 return tevent_req_post(req, ev);
   11360             :         }
   11361             : 
   11362             :         /* make a temporary copy, that we pass to the dispatch function */
   11363           0 :         state->tmp = state->orig;
   11364             : 
   11365           0 :         subreq = dcerpc_samr_CreateUser2_r_send(state, ev, h, &state->tmp);
   11366           0 :         if (tevent_req_nomem(subreq, req)) {
   11367           0 :                 return tevent_req_post(req, ev);
   11368             :         }
   11369           0 :         tevent_req_set_callback(subreq, dcerpc_samr_CreateUser2_done, req);
   11370           0 :         return req;
   11371             : }
   11372             : 
   11373           0 : static void dcerpc_samr_CreateUser2_done(struct tevent_req *subreq)
   11374             : {
   11375           0 :         struct tevent_req *req = tevent_req_callback_data(
   11376             :                 subreq, struct tevent_req);
   11377           0 :         struct dcerpc_samr_CreateUser2_state *state = tevent_req_data(
   11378             :                 req, struct dcerpc_samr_CreateUser2_state);
   11379           0 :         NTSTATUS status;
   11380           0 :         TALLOC_CTX *mem_ctx;
   11381             : 
   11382           0 :         if (state->out_mem_ctx) {
   11383           0 :                 mem_ctx = state->out_mem_ctx;
   11384             :         } else {
   11385           0 :                 mem_ctx = state;
   11386             :         }
   11387             : 
   11388           0 :         status = dcerpc_samr_CreateUser2_r_recv(subreq, mem_ctx);
   11389           0 :         TALLOC_FREE(subreq);
   11390           0 :         if (tevent_req_nterror(req, status)) {
   11391           0 :                 return;
   11392             :         }
   11393             : 
   11394             :         /* Copy out parameters */
   11395           0 :         *state->orig.out.user_handle = *state->tmp.out.user_handle;
   11396           0 :         *state->orig.out.access_granted = *state->tmp.out.access_granted;
   11397           0 :         *state->orig.out.rid = *state->tmp.out.rid;
   11398             : 
   11399             :         /* Copy result */
   11400           0 :         state->orig.out.result = state->tmp.out.result;
   11401             : 
   11402             :         /* Reset temporary structure */
   11403           0 :         NDR_ZERO_STRUCT(state->tmp);
   11404             : 
   11405           0 :         tevent_req_done(req);
   11406             : }
   11407             : 
   11408           0 : NTSTATUS dcerpc_samr_CreateUser2_recv(struct tevent_req *req,
   11409             :                                       TALLOC_CTX *mem_ctx,
   11410             :                                       NTSTATUS *result)
   11411             : {
   11412           0 :         struct dcerpc_samr_CreateUser2_state *state = tevent_req_data(
   11413             :                 req, struct dcerpc_samr_CreateUser2_state);
   11414           0 :         NTSTATUS status;
   11415             : 
   11416           0 :         if (tevent_req_is_nterror(req, &status)) {
   11417           0 :                 tevent_req_received(req);
   11418           0 :                 return status;
   11419             :         }
   11420             : 
   11421             :         /* Steal possible out parameters to the callers context */
   11422           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11423             : 
   11424             :         /* Return result */
   11425           0 :         *result = state->orig.out.result;
   11426             : 
   11427           0 :         tevent_req_received(req);
   11428           0 :         return NT_STATUS_OK;
   11429             : }
   11430             : 
   11431          13 : NTSTATUS dcerpc_samr_CreateUser2(struct dcerpc_binding_handle *h,
   11432             :                                  TALLOC_CTX *mem_ctx,
   11433             :                                  struct policy_handle *_domain_handle /* [in] [ref] */,
   11434             :                                  struct lsa_String *_account_name /* [in] [ref] */,
   11435             :                                  uint32_t _acct_flags /* [in]  */,
   11436             :                                  uint32_t _access_mask /* [in]  */,
   11437             :                                  struct policy_handle *_user_handle /* [out] [ref] */,
   11438             :                                  uint32_t *_access_granted /* [out] [ref] */,
   11439             :                                  uint32_t *_rid /* [out] [ref] */,
   11440             :                                  NTSTATUS *result)
   11441             : {
   11442           0 :         struct samr_CreateUser2 r;
   11443           0 :         NTSTATUS status;
   11444             : 
   11445             :         /* In parameters */
   11446          13 :         r.in.domain_handle = _domain_handle;
   11447          13 :         r.in.account_name = _account_name;
   11448          13 :         r.in.acct_flags = _acct_flags;
   11449          13 :         r.in.access_mask = _access_mask;
   11450             : 
   11451             :         /* Out parameters */
   11452          13 :         r.out.user_handle = _user_handle;
   11453          13 :         r.out.access_granted = _access_granted;
   11454          13 :         r.out.rid = _rid;
   11455             : 
   11456             :         /* Result */
   11457          13 :         NDR_ZERO_STRUCT(r.out.result);
   11458             : 
   11459          13 :         status = dcerpc_samr_CreateUser2_r(h, mem_ctx, &r);
   11460          13 :         if (!NT_STATUS_IS_OK(status)) {
   11461           0 :                 return status;
   11462             :         }
   11463             : 
   11464             :         /* Return variables */
   11465          13 :         *_user_handle = *r.out.user_handle;
   11466          13 :         *_access_granted = *r.out.access_granted;
   11467          13 :         *_rid = *r.out.rid;
   11468             : 
   11469             :         /* Return result */
   11470          13 :         *result = r.out.result;
   11471             : 
   11472          13 :         return NT_STATUS_OK;
   11473             : }
   11474             : 
   11475             : struct dcerpc_samr_QueryDisplayInfo3_r_state {
   11476             :         TALLOC_CTX *out_mem_ctx;
   11477             : };
   11478             : 
   11479             : static void dcerpc_samr_QueryDisplayInfo3_r_done(struct tevent_req *subreq);
   11480             : 
   11481           0 : struct tevent_req *dcerpc_samr_QueryDisplayInfo3_r_send(TALLOC_CTX *mem_ctx,
   11482             :         struct tevent_context *ev,
   11483             :         struct dcerpc_binding_handle *h,
   11484             :         struct samr_QueryDisplayInfo3 *r)
   11485             : {
   11486           0 :         struct tevent_req *req;
   11487           0 :         struct dcerpc_samr_QueryDisplayInfo3_r_state *state;
   11488           0 :         struct tevent_req *subreq;
   11489             : 
   11490           0 :         req = tevent_req_create(mem_ctx, &state,
   11491             :                                 struct dcerpc_samr_QueryDisplayInfo3_r_state);
   11492           0 :         if (req == NULL) {
   11493           0 :                 return NULL;
   11494             :         }
   11495             : 
   11496           0 :         state->out_mem_ctx = talloc_new(state);
   11497           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   11498           0 :                 return tevent_req_post(req, ev);
   11499             :         }
   11500             : 
   11501           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   11502             :                         NULL, &ndr_table_samr,
   11503           0 :                         NDR_SAMR_QUERYDISPLAYINFO3, state->out_mem_ctx, r);
   11504           0 :         if (tevent_req_nomem(subreq, req)) {
   11505           0 :                 return tevent_req_post(req, ev);
   11506             :         }
   11507           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryDisplayInfo3_r_done, req);
   11508             : 
   11509           0 :         return req;
   11510             : }
   11511             : 
   11512           0 : static void dcerpc_samr_QueryDisplayInfo3_r_done(struct tevent_req *subreq)
   11513             : {
   11514           0 :         struct tevent_req *req =
   11515           0 :                 tevent_req_callback_data(subreq,
   11516             :                 struct tevent_req);
   11517           0 :         NTSTATUS status;
   11518             : 
   11519           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   11520           0 :         TALLOC_FREE(subreq);
   11521           0 :         if (tevent_req_nterror(req, status)) {
   11522           0 :                 return;
   11523             :         }
   11524             : 
   11525           0 :         tevent_req_done(req);
   11526             : }
   11527             : 
   11528           0 : NTSTATUS dcerpc_samr_QueryDisplayInfo3_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   11529             : {
   11530           0 :         struct dcerpc_samr_QueryDisplayInfo3_r_state *state =
   11531           0 :                 tevent_req_data(req,
   11532             :                 struct dcerpc_samr_QueryDisplayInfo3_r_state);
   11533           0 :         NTSTATUS status;
   11534             : 
   11535           0 :         if (tevent_req_is_nterror(req, &status)) {
   11536           0 :                 tevent_req_received(req);
   11537           0 :                 return status;
   11538             :         }
   11539             : 
   11540           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11541             : 
   11542           0 :         tevent_req_received(req);
   11543           0 :         return NT_STATUS_OK;
   11544             : }
   11545             : 
   11546          50 : NTSTATUS dcerpc_samr_QueryDisplayInfo3_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_QueryDisplayInfo3 *r)
   11547             : {
   11548           0 :         NTSTATUS status;
   11549             : 
   11550          50 :         status = dcerpc_binding_handle_call(h,
   11551             :                         NULL, &ndr_table_samr,
   11552             :                         NDR_SAMR_QUERYDISPLAYINFO3, mem_ctx, r);
   11553             : 
   11554          50 :         return status;
   11555             : }
   11556             : 
   11557             : struct dcerpc_samr_QueryDisplayInfo3_state {
   11558             :         struct samr_QueryDisplayInfo3 orig;
   11559             :         struct samr_QueryDisplayInfo3 tmp;
   11560             :         TALLOC_CTX *out_mem_ctx;
   11561             : };
   11562             : 
   11563             : static void dcerpc_samr_QueryDisplayInfo3_done(struct tevent_req *subreq);
   11564             : 
   11565           0 : struct tevent_req *dcerpc_samr_QueryDisplayInfo3_send(TALLOC_CTX *mem_ctx,
   11566             :                                                       struct tevent_context *ev,
   11567             :                                                       struct dcerpc_binding_handle *h,
   11568             :                                                       struct policy_handle *_domain_handle /* [in] [ref] */,
   11569             :                                                       uint16_t _level /* [in]  */,
   11570             :                                                       uint32_t _start_idx /* [in]  */,
   11571             :                                                       uint32_t _max_entries /* [in]  */,
   11572             :                                                       uint32_t _buf_size /* [in]  */,
   11573             :                                                       uint32_t *_total_size /* [out] [ref] */,
   11574             :                                                       uint32_t *_returned_size /* [out] [ref] */,
   11575             :                                                       union samr_DispInfo *_info /* [out] [ref,switch_is(level)] */)
   11576             : {
   11577           0 :         struct tevent_req *req;
   11578           0 :         struct dcerpc_samr_QueryDisplayInfo3_state *state;
   11579           0 :         struct tevent_req *subreq;
   11580             : 
   11581           0 :         req = tevent_req_create(mem_ctx, &state,
   11582             :                                 struct dcerpc_samr_QueryDisplayInfo3_state);
   11583           0 :         if (req == NULL) {
   11584           0 :                 return NULL;
   11585             :         }
   11586           0 :         state->out_mem_ctx = NULL;
   11587             : 
   11588             :         /* In parameters */
   11589           0 :         state->orig.in.domain_handle = _domain_handle;
   11590           0 :         state->orig.in.level = _level;
   11591           0 :         state->orig.in.start_idx = _start_idx;
   11592           0 :         state->orig.in.max_entries = _max_entries;
   11593           0 :         state->orig.in.buf_size = _buf_size;
   11594             : 
   11595             :         /* Out parameters */
   11596           0 :         state->orig.out.total_size = _total_size;
   11597           0 :         state->orig.out.returned_size = _returned_size;
   11598           0 :         state->orig.out.info = _info;
   11599             : 
   11600             :         /* Result */
   11601           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   11602             : 
   11603           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   11604             :                              "dcerpc_samr_QueryDisplayInfo3_out_memory");
   11605           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   11606           0 :                 return tevent_req_post(req, ev);
   11607             :         }
   11608             : 
   11609             :         /* make a temporary copy, that we pass to the dispatch function */
   11610           0 :         state->tmp = state->orig;
   11611             : 
   11612           0 :         subreq = dcerpc_samr_QueryDisplayInfo3_r_send(state, ev, h, &state->tmp);
   11613           0 :         if (tevent_req_nomem(subreq, req)) {
   11614           0 :                 return tevent_req_post(req, ev);
   11615             :         }
   11616           0 :         tevent_req_set_callback(subreq, dcerpc_samr_QueryDisplayInfo3_done, req);
   11617           0 :         return req;
   11618             : }
   11619             : 
   11620           0 : static void dcerpc_samr_QueryDisplayInfo3_done(struct tevent_req *subreq)
   11621             : {
   11622           0 :         struct tevent_req *req = tevent_req_callback_data(
   11623             :                 subreq, struct tevent_req);
   11624           0 :         struct dcerpc_samr_QueryDisplayInfo3_state *state = tevent_req_data(
   11625             :                 req, struct dcerpc_samr_QueryDisplayInfo3_state);
   11626           0 :         NTSTATUS status;
   11627           0 :         TALLOC_CTX *mem_ctx;
   11628             : 
   11629           0 :         if (state->out_mem_ctx) {
   11630           0 :                 mem_ctx = state->out_mem_ctx;
   11631             :         } else {
   11632           0 :                 mem_ctx = state;
   11633             :         }
   11634             : 
   11635           0 :         status = dcerpc_samr_QueryDisplayInfo3_r_recv(subreq, mem_ctx);
   11636           0 :         TALLOC_FREE(subreq);
   11637           0 :         if (tevent_req_nterror(req, status)) {
   11638           0 :                 return;
   11639             :         }
   11640             : 
   11641             :         /* Copy out parameters */
   11642           0 :         *state->orig.out.total_size = *state->tmp.out.total_size;
   11643           0 :         *state->orig.out.returned_size = *state->tmp.out.returned_size;
   11644           0 :         *state->orig.out.info = *state->tmp.out.info;
   11645             : 
   11646             :         /* Copy result */
   11647           0 :         state->orig.out.result = state->tmp.out.result;
   11648             : 
   11649             :         /* Reset temporary structure */
   11650           0 :         NDR_ZERO_STRUCT(state->tmp);
   11651             : 
   11652           0 :         tevent_req_done(req);
   11653             : }
   11654             : 
   11655           0 : NTSTATUS dcerpc_samr_QueryDisplayInfo3_recv(struct tevent_req *req,
   11656             :                                             TALLOC_CTX *mem_ctx,
   11657             :                                             NTSTATUS *result)
   11658             : {
   11659           0 :         struct dcerpc_samr_QueryDisplayInfo3_state *state = tevent_req_data(
   11660             :                 req, struct dcerpc_samr_QueryDisplayInfo3_state);
   11661           0 :         NTSTATUS status;
   11662             : 
   11663           0 :         if (tevent_req_is_nterror(req, &status)) {
   11664           0 :                 tevent_req_received(req);
   11665           0 :                 return status;
   11666             :         }
   11667             : 
   11668             :         /* Steal possible out parameters to the callers context */
   11669           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11670             : 
   11671             :         /* Return result */
   11672           0 :         *result = state->orig.out.result;
   11673             : 
   11674           0 :         tevent_req_received(req);
   11675           0 :         return NT_STATUS_OK;
   11676             : }
   11677             : 
   11678           0 : NTSTATUS dcerpc_samr_QueryDisplayInfo3(struct dcerpc_binding_handle *h,
   11679             :                                        TALLOC_CTX *mem_ctx,
   11680             :                                        struct policy_handle *_domain_handle /* [in] [ref] */,
   11681             :                                        uint16_t _level /* [in]  */,
   11682             :                                        uint32_t _start_idx /* [in]  */,
   11683             :                                        uint32_t _max_entries /* [in]  */,
   11684             :                                        uint32_t _buf_size /* [in]  */,
   11685             :                                        uint32_t *_total_size /* [out] [ref] */,
   11686             :                                        uint32_t *_returned_size /* [out] [ref] */,
   11687             :                                        union samr_DispInfo *_info /* [out] [ref,switch_is(level)] */,
   11688             :                                        NTSTATUS *result)
   11689             : {
   11690           0 :         struct samr_QueryDisplayInfo3 r;
   11691           0 :         NTSTATUS status;
   11692             : 
   11693             :         /* In parameters */
   11694           0 :         r.in.domain_handle = _domain_handle;
   11695           0 :         r.in.level = _level;
   11696           0 :         r.in.start_idx = _start_idx;
   11697           0 :         r.in.max_entries = _max_entries;
   11698           0 :         r.in.buf_size = _buf_size;
   11699             : 
   11700             :         /* Out parameters */
   11701           0 :         r.out.total_size = _total_size;
   11702           0 :         r.out.returned_size = _returned_size;
   11703           0 :         r.out.info = _info;
   11704             : 
   11705             :         /* Result */
   11706           0 :         NDR_ZERO_STRUCT(r.out.result);
   11707             : 
   11708           0 :         status = dcerpc_samr_QueryDisplayInfo3_r(h, mem_ctx, &r);
   11709           0 :         if (!NT_STATUS_IS_OK(status)) {
   11710           0 :                 return status;
   11711             :         }
   11712             : 
   11713             :         /* Return variables */
   11714           0 :         *_total_size = *r.out.total_size;
   11715           0 :         *_returned_size = *r.out.returned_size;
   11716           0 :         *_info = *r.out.info;
   11717             : 
   11718             :         /* Return result */
   11719           0 :         *result = r.out.result;
   11720             : 
   11721           0 :         return NT_STATUS_OK;
   11722             : }
   11723             : 
   11724             : struct dcerpc_samr_AddMultipleMembersToAlias_r_state {
   11725             :         TALLOC_CTX *out_mem_ctx;
   11726             : };
   11727             : 
   11728             : static void dcerpc_samr_AddMultipleMembersToAlias_r_done(struct tevent_req *subreq);
   11729             : 
   11730           0 : struct tevent_req *dcerpc_samr_AddMultipleMembersToAlias_r_send(TALLOC_CTX *mem_ctx,
   11731             :         struct tevent_context *ev,
   11732             :         struct dcerpc_binding_handle *h,
   11733             :         struct samr_AddMultipleMembersToAlias *r)
   11734             : {
   11735           0 :         struct tevent_req *req;
   11736           0 :         struct dcerpc_samr_AddMultipleMembersToAlias_r_state *state;
   11737           0 :         struct tevent_req *subreq;
   11738             : 
   11739           0 :         req = tevent_req_create(mem_ctx, &state,
   11740             :                                 struct dcerpc_samr_AddMultipleMembersToAlias_r_state);
   11741           0 :         if (req == NULL) {
   11742           0 :                 return NULL;
   11743             :         }
   11744             : 
   11745           0 :         state->out_mem_ctx = NULL;
   11746             : 
   11747           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   11748             :                         NULL, &ndr_table_samr,
   11749             :                         NDR_SAMR_ADDMULTIPLEMEMBERSTOALIAS, state, r);
   11750           0 :         if (tevent_req_nomem(subreq, req)) {
   11751           0 :                 return tevent_req_post(req, ev);
   11752             :         }
   11753           0 :         tevent_req_set_callback(subreq, dcerpc_samr_AddMultipleMembersToAlias_r_done, req);
   11754             : 
   11755           0 :         return req;
   11756             : }
   11757             : 
   11758           0 : static void dcerpc_samr_AddMultipleMembersToAlias_r_done(struct tevent_req *subreq)
   11759             : {
   11760           0 :         struct tevent_req *req =
   11761           0 :                 tevent_req_callback_data(subreq,
   11762             :                 struct tevent_req);
   11763           0 :         NTSTATUS status;
   11764             : 
   11765           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   11766           0 :         TALLOC_FREE(subreq);
   11767           0 :         if (tevent_req_nterror(req, status)) {
   11768           0 :                 return;
   11769             :         }
   11770             : 
   11771           0 :         tevent_req_done(req);
   11772             : }
   11773             : 
   11774           0 : NTSTATUS dcerpc_samr_AddMultipleMembersToAlias_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   11775             : {
   11776           0 :         struct dcerpc_samr_AddMultipleMembersToAlias_r_state *state =
   11777           0 :                 tevent_req_data(req,
   11778             :                 struct dcerpc_samr_AddMultipleMembersToAlias_r_state);
   11779           0 :         NTSTATUS status;
   11780             : 
   11781           0 :         if (tevent_req_is_nterror(req, &status)) {
   11782           0 :                 tevent_req_received(req);
   11783           0 :                 return status;
   11784             :         }
   11785             : 
   11786           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11787             : 
   11788           0 :         tevent_req_received(req);
   11789           0 :         return NT_STATUS_OK;
   11790             : }
   11791             : 
   11792           0 : NTSTATUS dcerpc_samr_AddMultipleMembersToAlias_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_AddMultipleMembersToAlias *r)
   11793             : {
   11794           0 :         NTSTATUS status;
   11795             : 
   11796           0 :         status = dcerpc_binding_handle_call(h,
   11797             :                         NULL, &ndr_table_samr,
   11798             :                         NDR_SAMR_ADDMULTIPLEMEMBERSTOALIAS, mem_ctx, r);
   11799             : 
   11800           0 :         return status;
   11801             : }
   11802             : 
   11803             : struct dcerpc_samr_AddMultipleMembersToAlias_state {
   11804             :         struct samr_AddMultipleMembersToAlias orig;
   11805             :         struct samr_AddMultipleMembersToAlias tmp;
   11806             :         TALLOC_CTX *out_mem_ctx;
   11807             : };
   11808             : 
   11809             : static void dcerpc_samr_AddMultipleMembersToAlias_done(struct tevent_req *subreq);
   11810             : 
   11811           0 : struct tevent_req *dcerpc_samr_AddMultipleMembersToAlias_send(TALLOC_CTX *mem_ctx,
   11812             :                                                               struct tevent_context *ev,
   11813             :                                                               struct dcerpc_binding_handle *h,
   11814             :                                                               struct policy_handle *_alias_handle /* [in] [ref] */,
   11815             :                                                               struct lsa_SidArray *_sids /* [in] [ref] */)
   11816             : {
   11817           0 :         struct tevent_req *req;
   11818           0 :         struct dcerpc_samr_AddMultipleMembersToAlias_state *state;
   11819           0 :         struct tevent_req *subreq;
   11820             : 
   11821           0 :         req = tevent_req_create(mem_ctx, &state,
   11822             :                                 struct dcerpc_samr_AddMultipleMembersToAlias_state);
   11823           0 :         if (req == NULL) {
   11824           0 :                 return NULL;
   11825             :         }
   11826           0 :         state->out_mem_ctx = NULL;
   11827             : 
   11828             :         /* In parameters */
   11829           0 :         state->orig.in.alias_handle = _alias_handle;
   11830           0 :         state->orig.in.sids = _sids;
   11831             : 
   11832             :         /* Out parameters */
   11833             : 
   11834             :         /* Result */
   11835           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   11836             : 
   11837             :         /* make a temporary copy, that we pass to the dispatch function */
   11838           0 :         state->tmp = state->orig;
   11839             : 
   11840           0 :         subreq = dcerpc_samr_AddMultipleMembersToAlias_r_send(state, ev, h, &state->tmp);
   11841           0 :         if (tevent_req_nomem(subreq, req)) {
   11842           0 :                 return tevent_req_post(req, ev);
   11843             :         }
   11844           0 :         tevent_req_set_callback(subreq, dcerpc_samr_AddMultipleMembersToAlias_done, req);
   11845           0 :         return req;
   11846             : }
   11847             : 
   11848           0 : static void dcerpc_samr_AddMultipleMembersToAlias_done(struct tevent_req *subreq)
   11849             : {
   11850           0 :         struct tevent_req *req = tevent_req_callback_data(
   11851             :                 subreq, struct tevent_req);
   11852           0 :         struct dcerpc_samr_AddMultipleMembersToAlias_state *state = tevent_req_data(
   11853             :                 req, struct dcerpc_samr_AddMultipleMembersToAlias_state);
   11854           0 :         NTSTATUS status;
   11855           0 :         TALLOC_CTX *mem_ctx;
   11856             : 
   11857           0 :         if (state->out_mem_ctx) {
   11858           0 :                 mem_ctx = state->out_mem_ctx;
   11859             :         } else {
   11860           0 :                 mem_ctx = state;
   11861             :         }
   11862             : 
   11863           0 :         status = dcerpc_samr_AddMultipleMembersToAlias_r_recv(subreq, mem_ctx);
   11864           0 :         TALLOC_FREE(subreq);
   11865           0 :         if (tevent_req_nterror(req, status)) {
   11866           0 :                 return;
   11867             :         }
   11868             : 
   11869             :         /* Copy out parameters */
   11870             : 
   11871             :         /* Copy result */
   11872           0 :         state->orig.out.result = state->tmp.out.result;
   11873             : 
   11874             :         /* Reset temporary structure */
   11875           0 :         NDR_ZERO_STRUCT(state->tmp);
   11876             : 
   11877           0 :         tevent_req_done(req);
   11878             : }
   11879             : 
   11880           0 : NTSTATUS dcerpc_samr_AddMultipleMembersToAlias_recv(struct tevent_req *req,
   11881             :                                                     TALLOC_CTX *mem_ctx,
   11882             :                                                     NTSTATUS *result)
   11883             : {
   11884           0 :         struct dcerpc_samr_AddMultipleMembersToAlias_state *state = tevent_req_data(
   11885             :                 req, struct dcerpc_samr_AddMultipleMembersToAlias_state);
   11886           0 :         NTSTATUS status;
   11887             : 
   11888           0 :         if (tevent_req_is_nterror(req, &status)) {
   11889           0 :                 tevent_req_received(req);
   11890           0 :                 return status;
   11891             :         }
   11892             : 
   11893             :         /* Steal possible out parameters to the callers context */
   11894           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11895             : 
   11896             :         /* Return result */
   11897           0 :         *result = state->orig.out.result;
   11898             : 
   11899           0 :         tevent_req_received(req);
   11900           0 :         return NT_STATUS_OK;
   11901             : }
   11902             : 
   11903           0 : NTSTATUS dcerpc_samr_AddMultipleMembersToAlias(struct dcerpc_binding_handle *h,
   11904             :                                                TALLOC_CTX *mem_ctx,
   11905             :                                                struct policy_handle *_alias_handle /* [in] [ref] */,
   11906             :                                                struct lsa_SidArray *_sids /* [in] [ref] */,
   11907             :                                                NTSTATUS *result)
   11908             : {
   11909           0 :         struct samr_AddMultipleMembersToAlias r;
   11910           0 :         NTSTATUS status;
   11911             : 
   11912             :         /* In parameters */
   11913           0 :         r.in.alias_handle = _alias_handle;
   11914           0 :         r.in.sids = _sids;
   11915             : 
   11916             :         /* Out parameters */
   11917             : 
   11918             :         /* Result */
   11919           0 :         NDR_ZERO_STRUCT(r.out.result);
   11920             : 
   11921           0 :         status = dcerpc_samr_AddMultipleMembersToAlias_r(h, mem_ctx, &r);
   11922           0 :         if (!NT_STATUS_IS_OK(status)) {
   11923           0 :                 return status;
   11924             :         }
   11925             : 
   11926             :         /* Return variables */
   11927             : 
   11928             :         /* Return result */
   11929           0 :         *result = r.out.result;
   11930             : 
   11931           0 :         return NT_STATUS_OK;
   11932             : }
   11933             : 
   11934             : struct dcerpc_samr_RemoveMultipleMembersFromAlias_r_state {
   11935             :         TALLOC_CTX *out_mem_ctx;
   11936             : };
   11937             : 
   11938             : static void dcerpc_samr_RemoveMultipleMembersFromAlias_r_done(struct tevent_req *subreq);
   11939             : 
   11940           0 : struct tevent_req *dcerpc_samr_RemoveMultipleMembersFromAlias_r_send(TALLOC_CTX *mem_ctx,
   11941             :         struct tevent_context *ev,
   11942             :         struct dcerpc_binding_handle *h,
   11943             :         struct samr_RemoveMultipleMembersFromAlias *r)
   11944             : {
   11945           0 :         struct tevent_req *req;
   11946           0 :         struct dcerpc_samr_RemoveMultipleMembersFromAlias_r_state *state;
   11947           0 :         struct tevent_req *subreq;
   11948             : 
   11949           0 :         req = tevent_req_create(mem_ctx, &state,
   11950             :                                 struct dcerpc_samr_RemoveMultipleMembersFromAlias_r_state);
   11951           0 :         if (req == NULL) {
   11952           0 :                 return NULL;
   11953             :         }
   11954             : 
   11955           0 :         state->out_mem_ctx = NULL;
   11956             : 
   11957           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   11958             :                         NULL, &ndr_table_samr,
   11959             :                         NDR_SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS, state, r);
   11960           0 :         if (tevent_req_nomem(subreq, req)) {
   11961           0 :                 return tevent_req_post(req, ev);
   11962             :         }
   11963           0 :         tevent_req_set_callback(subreq, dcerpc_samr_RemoveMultipleMembersFromAlias_r_done, req);
   11964             : 
   11965           0 :         return req;
   11966             : }
   11967             : 
   11968           0 : static void dcerpc_samr_RemoveMultipleMembersFromAlias_r_done(struct tevent_req *subreq)
   11969             : {
   11970           0 :         struct tevent_req *req =
   11971           0 :                 tevent_req_callback_data(subreq,
   11972             :                 struct tevent_req);
   11973           0 :         NTSTATUS status;
   11974             : 
   11975           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   11976           0 :         TALLOC_FREE(subreq);
   11977           0 :         if (tevent_req_nterror(req, status)) {
   11978           0 :                 return;
   11979             :         }
   11980             : 
   11981           0 :         tevent_req_done(req);
   11982             : }
   11983             : 
   11984           0 : NTSTATUS dcerpc_samr_RemoveMultipleMembersFromAlias_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   11985             : {
   11986           0 :         struct dcerpc_samr_RemoveMultipleMembersFromAlias_r_state *state =
   11987           0 :                 tevent_req_data(req,
   11988             :                 struct dcerpc_samr_RemoveMultipleMembersFromAlias_r_state);
   11989           0 :         NTSTATUS status;
   11990             : 
   11991           0 :         if (tevent_req_is_nterror(req, &status)) {
   11992           0 :                 tevent_req_received(req);
   11993           0 :                 return status;
   11994             :         }
   11995             : 
   11996           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11997             : 
   11998           0 :         tevent_req_received(req);
   11999           0 :         return NT_STATUS_OK;
   12000             : }
   12001             : 
   12002           0 : NTSTATUS dcerpc_samr_RemoveMultipleMembersFromAlias_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_RemoveMultipleMembersFromAlias *r)
   12003             : {
   12004           0 :         NTSTATUS status;
   12005             : 
   12006           0 :         status = dcerpc_binding_handle_call(h,
   12007             :                         NULL, &ndr_table_samr,
   12008             :                         NDR_SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS, mem_ctx, r);
   12009             : 
   12010           0 :         return status;
   12011             : }
   12012             : 
   12013             : struct dcerpc_samr_RemoveMultipleMembersFromAlias_state {
   12014             :         struct samr_RemoveMultipleMembersFromAlias orig;
   12015             :         struct samr_RemoveMultipleMembersFromAlias tmp;
   12016             :         TALLOC_CTX *out_mem_ctx;
   12017             : };
   12018             : 
   12019             : static void dcerpc_samr_RemoveMultipleMembersFromAlias_done(struct tevent_req *subreq);
   12020             : 
   12021           0 : struct tevent_req *dcerpc_samr_RemoveMultipleMembersFromAlias_send(TALLOC_CTX *mem_ctx,
   12022             :                                                                    struct tevent_context *ev,
   12023             :                                                                    struct dcerpc_binding_handle *h,
   12024             :                                                                    struct policy_handle *_alias_handle /* [in] [ref] */,
   12025             :                                                                    struct lsa_SidArray *_sids /* [in] [ref] */)
   12026             : {
   12027           0 :         struct tevent_req *req;
   12028           0 :         struct dcerpc_samr_RemoveMultipleMembersFromAlias_state *state;
   12029           0 :         struct tevent_req *subreq;
   12030             : 
   12031           0 :         req = tevent_req_create(mem_ctx, &state,
   12032             :                                 struct dcerpc_samr_RemoveMultipleMembersFromAlias_state);
   12033           0 :         if (req == NULL) {
   12034           0 :                 return NULL;
   12035             :         }
   12036           0 :         state->out_mem_ctx = NULL;
   12037             : 
   12038             :         /* In parameters */
   12039           0 :         state->orig.in.alias_handle = _alias_handle;
   12040           0 :         state->orig.in.sids = _sids;
   12041             : 
   12042             :         /* Out parameters */
   12043             : 
   12044             :         /* Result */
   12045           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   12046             : 
   12047             :         /* make a temporary copy, that we pass to the dispatch function */
   12048           0 :         state->tmp = state->orig;
   12049             : 
   12050           0 :         subreq = dcerpc_samr_RemoveMultipleMembersFromAlias_r_send(state, ev, h, &state->tmp);
   12051           0 :         if (tevent_req_nomem(subreq, req)) {
   12052           0 :                 return tevent_req_post(req, ev);
   12053             :         }
   12054           0 :         tevent_req_set_callback(subreq, dcerpc_samr_RemoveMultipleMembersFromAlias_done, req);
   12055           0 :         return req;
   12056             : }
   12057             : 
   12058           0 : static void dcerpc_samr_RemoveMultipleMembersFromAlias_done(struct tevent_req *subreq)
   12059             : {
   12060           0 :         struct tevent_req *req = tevent_req_callback_data(
   12061             :                 subreq, struct tevent_req);
   12062           0 :         struct dcerpc_samr_RemoveMultipleMembersFromAlias_state *state = tevent_req_data(
   12063             :                 req, struct dcerpc_samr_RemoveMultipleMembersFromAlias_state);
   12064           0 :         NTSTATUS status;
   12065           0 :         TALLOC_CTX *mem_ctx;
   12066             : 
   12067           0 :         if (state->out_mem_ctx) {
   12068           0 :                 mem_ctx = state->out_mem_ctx;
   12069             :         } else {
   12070           0 :                 mem_ctx = state;
   12071             :         }
   12072             : 
   12073           0 :         status = dcerpc_samr_RemoveMultipleMembersFromAlias_r_recv(subreq, mem_ctx);
   12074           0 :         TALLOC_FREE(subreq);
   12075           0 :         if (tevent_req_nterror(req, status)) {
   12076           0 :                 return;
   12077             :         }
   12078             : 
   12079             :         /* Copy out parameters */
   12080             : 
   12081             :         /* Copy result */
   12082           0 :         state->orig.out.result = state->tmp.out.result;
   12083             : 
   12084             :         /* Reset temporary structure */
   12085           0 :         NDR_ZERO_STRUCT(state->tmp);
   12086             : 
   12087           0 :         tevent_req_done(req);
   12088             : }
   12089             : 
   12090           0 : NTSTATUS dcerpc_samr_RemoveMultipleMembersFromAlias_recv(struct tevent_req *req,
   12091             :                                                          TALLOC_CTX *mem_ctx,
   12092             :                                                          NTSTATUS *result)
   12093             : {
   12094           0 :         struct dcerpc_samr_RemoveMultipleMembersFromAlias_state *state = tevent_req_data(
   12095             :                 req, struct dcerpc_samr_RemoveMultipleMembersFromAlias_state);
   12096           0 :         NTSTATUS status;
   12097             : 
   12098           0 :         if (tevent_req_is_nterror(req, &status)) {
   12099           0 :                 tevent_req_received(req);
   12100           0 :                 return status;
   12101             :         }
   12102             : 
   12103             :         /* Steal possible out parameters to the callers context */
   12104           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12105             : 
   12106             :         /* Return result */
   12107           0 :         *result = state->orig.out.result;
   12108             : 
   12109           0 :         tevent_req_received(req);
   12110           0 :         return NT_STATUS_OK;
   12111             : }
   12112             : 
   12113           0 : NTSTATUS dcerpc_samr_RemoveMultipleMembersFromAlias(struct dcerpc_binding_handle *h,
   12114             :                                                     TALLOC_CTX *mem_ctx,
   12115             :                                                     struct policy_handle *_alias_handle /* [in] [ref] */,
   12116             :                                                     struct lsa_SidArray *_sids /* [in] [ref] */,
   12117             :                                                     NTSTATUS *result)
   12118             : {
   12119           0 :         struct samr_RemoveMultipleMembersFromAlias r;
   12120           0 :         NTSTATUS status;
   12121             : 
   12122             :         /* In parameters */
   12123           0 :         r.in.alias_handle = _alias_handle;
   12124           0 :         r.in.sids = _sids;
   12125             : 
   12126             :         /* Out parameters */
   12127             : 
   12128             :         /* Result */
   12129           0 :         NDR_ZERO_STRUCT(r.out.result);
   12130             : 
   12131           0 :         status = dcerpc_samr_RemoveMultipleMembersFromAlias_r(h, mem_ctx, &r);
   12132           0 :         if (!NT_STATUS_IS_OK(status)) {
   12133           0 :                 return status;
   12134             :         }
   12135             : 
   12136             :         /* Return variables */
   12137             : 
   12138             :         /* Return result */
   12139           0 :         *result = r.out.result;
   12140             : 
   12141           0 :         return NT_STATUS_OK;
   12142             : }
   12143             : 
   12144             : struct dcerpc_samr_OemChangePasswordUser2_r_state {
   12145             :         TALLOC_CTX *out_mem_ctx;
   12146             : };
   12147             : 
   12148             : static void dcerpc_samr_OemChangePasswordUser2_r_done(struct tevent_req *subreq);
   12149             : 
   12150           0 : struct tevent_req *dcerpc_samr_OemChangePasswordUser2_r_send(TALLOC_CTX *mem_ctx,
   12151             :         struct tevent_context *ev,
   12152             :         struct dcerpc_binding_handle *h,
   12153             :         struct samr_OemChangePasswordUser2 *r)
   12154             : {
   12155           0 :         struct tevent_req *req;
   12156           0 :         struct dcerpc_samr_OemChangePasswordUser2_r_state *state;
   12157           0 :         struct tevent_req *subreq;
   12158             : 
   12159           0 :         req = tevent_req_create(mem_ctx, &state,
   12160             :                                 struct dcerpc_samr_OemChangePasswordUser2_r_state);
   12161           0 :         if (req == NULL) {
   12162           0 :                 return NULL;
   12163             :         }
   12164             : 
   12165           0 :         state->out_mem_ctx = NULL;
   12166             : 
   12167           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   12168             :                         NULL, &ndr_table_samr,
   12169             :                         NDR_SAMR_OEMCHANGEPASSWORDUSER2, state, r);
   12170           0 :         if (tevent_req_nomem(subreq, req)) {
   12171           0 :                 return tevent_req_post(req, ev);
   12172             :         }
   12173           0 :         tevent_req_set_callback(subreq, dcerpc_samr_OemChangePasswordUser2_r_done, req);
   12174             : 
   12175           0 :         return req;
   12176             : }
   12177             : 
   12178           0 : static void dcerpc_samr_OemChangePasswordUser2_r_done(struct tevent_req *subreq)
   12179             : {
   12180           0 :         struct tevent_req *req =
   12181           0 :                 tevent_req_callback_data(subreq,
   12182             :                 struct tevent_req);
   12183           0 :         NTSTATUS status;
   12184             : 
   12185           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   12186           0 :         TALLOC_FREE(subreq);
   12187           0 :         if (tevent_req_nterror(req, status)) {
   12188           0 :                 return;
   12189             :         }
   12190             : 
   12191           0 :         tevent_req_done(req);
   12192             : }
   12193             : 
   12194           0 : NTSTATUS dcerpc_samr_OemChangePasswordUser2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   12195             : {
   12196           0 :         struct dcerpc_samr_OemChangePasswordUser2_r_state *state =
   12197           0 :                 tevent_req_data(req,
   12198             :                 struct dcerpc_samr_OemChangePasswordUser2_r_state);
   12199           0 :         NTSTATUS status;
   12200             : 
   12201           0 :         if (tevent_req_is_nterror(req, &status)) {
   12202           0 :                 tevent_req_received(req);
   12203           0 :                 return status;
   12204             :         }
   12205             : 
   12206           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12207             : 
   12208           0 :         tevent_req_received(req);
   12209           0 :         return NT_STATUS_OK;
   12210             : }
   12211             : 
   12212          56 : NTSTATUS dcerpc_samr_OemChangePasswordUser2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_OemChangePasswordUser2 *r)
   12213             : {
   12214           0 :         NTSTATUS status;
   12215             : 
   12216          56 :         status = dcerpc_binding_handle_call(h,
   12217             :                         NULL, &ndr_table_samr,
   12218             :                         NDR_SAMR_OEMCHANGEPASSWORDUSER2, mem_ctx, r);
   12219             : 
   12220          56 :         return status;
   12221             : }
   12222             : 
   12223             : struct dcerpc_samr_OemChangePasswordUser2_state {
   12224             :         struct samr_OemChangePasswordUser2 orig;
   12225             :         struct samr_OemChangePasswordUser2 tmp;
   12226             :         TALLOC_CTX *out_mem_ctx;
   12227             : };
   12228             : 
   12229             : static void dcerpc_samr_OemChangePasswordUser2_done(struct tevent_req *subreq);
   12230             : 
   12231           0 : struct tevent_req *dcerpc_samr_OemChangePasswordUser2_send(TALLOC_CTX *mem_ctx,
   12232             :                                                            struct tevent_context *ev,
   12233             :                                                            struct dcerpc_binding_handle *h,
   12234             :                                                            struct lsa_AsciiString *_server /* [in] [unique] */,
   12235             :                                                            struct lsa_AsciiString *_account /* [in] [ref] */,
   12236             :                                                            struct samr_CryptPassword *_password /* [in] [unique] */,
   12237             :                                                            struct samr_Password *_hash /* [in] [unique] */)
   12238             : {
   12239           0 :         struct tevent_req *req;
   12240           0 :         struct dcerpc_samr_OemChangePasswordUser2_state *state;
   12241           0 :         struct tevent_req *subreq;
   12242             : 
   12243           0 :         req = tevent_req_create(mem_ctx, &state,
   12244             :                                 struct dcerpc_samr_OemChangePasswordUser2_state);
   12245           0 :         if (req == NULL) {
   12246           0 :                 return NULL;
   12247             :         }
   12248           0 :         state->out_mem_ctx = NULL;
   12249             : 
   12250             :         /* In parameters */
   12251           0 :         state->orig.in.server = _server;
   12252           0 :         state->orig.in.account = _account;
   12253           0 :         state->orig.in.password = _password;
   12254           0 :         state->orig.in.hash = _hash;
   12255             : 
   12256             :         /* Out parameters */
   12257             : 
   12258             :         /* Result */
   12259           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   12260             : 
   12261             :         /* make a temporary copy, that we pass to the dispatch function */
   12262           0 :         state->tmp = state->orig;
   12263             : 
   12264           0 :         subreq = dcerpc_samr_OemChangePasswordUser2_r_send(state, ev, h, &state->tmp);
   12265           0 :         if (tevent_req_nomem(subreq, req)) {
   12266           0 :                 return tevent_req_post(req, ev);
   12267             :         }
   12268           0 :         tevent_req_set_callback(subreq, dcerpc_samr_OemChangePasswordUser2_done, req);
   12269           0 :         return req;
   12270             : }
   12271             : 
   12272           0 : static void dcerpc_samr_OemChangePasswordUser2_done(struct tevent_req *subreq)
   12273             : {
   12274           0 :         struct tevent_req *req = tevent_req_callback_data(
   12275             :                 subreq, struct tevent_req);
   12276           0 :         struct dcerpc_samr_OemChangePasswordUser2_state *state = tevent_req_data(
   12277             :                 req, struct dcerpc_samr_OemChangePasswordUser2_state);
   12278           0 :         NTSTATUS status;
   12279           0 :         TALLOC_CTX *mem_ctx;
   12280             : 
   12281           0 :         if (state->out_mem_ctx) {
   12282           0 :                 mem_ctx = state->out_mem_ctx;
   12283             :         } else {
   12284           0 :                 mem_ctx = state;
   12285             :         }
   12286             : 
   12287           0 :         status = dcerpc_samr_OemChangePasswordUser2_r_recv(subreq, mem_ctx);
   12288           0 :         TALLOC_FREE(subreq);
   12289           0 :         if (tevent_req_nterror(req, status)) {
   12290           0 :                 return;
   12291             :         }
   12292             : 
   12293             :         /* Copy out parameters */
   12294             : 
   12295             :         /* Copy result */
   12296           0 :         state->orig.out.result = state->tmp.out.result;
   12297             : 
   12298             :         /* Reset temporary structure */
   12299           0 :         NDR_ZERO_STRUCT(state->tmp);
   12300             : 
   12301           0 :         tevent_req_done(req);
   12302             : }
   12303             : 
   12304           0 : NTSTATUS dcerpc_samr_OemChangePasswordUser2_recv(struct tevent_req *req,
   12305             :                                                  TALLOC_CTX *mem_ctx,
   12306             :                                                  NTSTATUS *result)
   12307             : {
   12308           0 :         struct dcerpc_samr_OemChangePasswordUser2_state *state = tevent_req_data(
   12309             :                 req, struct dcerpc_samr_OemChangePasswordUser2_state);
   12310           0 :         NTSTATUS status;
   12311             : 
   12312           0 :         if (tevent_req_is_nterror(req, &status)) {
   12313           0 :                 tevent_req_received(req);
   12314           0 :                 return status;
   12315             :         }
   12316             : 
   12317             :         /* Steal possible out parameters to the callers context */
   12318           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12319             : 
   12320             :         /* Return result */
   12321           0 :         *result = state->orig.out.result;
   12322             : 
   12323           0 :         tevent_req_received(req);
   12324           0 :         return NT_STATUS_OK;
   12325             : }
   12326             : 
   12327           4 : NTSTATUS dcerpc_samr_OemChangePasswordUser2(struct dcerpc_binding_handle *h,
   12328             :                                             TALLOC_CTX *mem_ctx,
   12329             :                                             struct lsa_AsciiString *_server /* [in] [unique] */,
   12330             :                                             struct lsa_AsciiString *_account /* [in] [ref] */,
   12331             :                                             struct samr_CryptPassword *_password /* [in] [unique] */,
   12332             :                                             struct samr_Password *_hash /* [in] [unique] */,
   12333             :                                             NTSTATUS *result)
   12334             : {
   12335           0 :         struct samr_OemChangePasswordUser2 r;
   12336           0 :         NTSTATUS status;
   12337             : 
   12338             :         /* In parameters */
   12339           4 :         r.in.server = _server;
   12340           4 :         r.in.account = _account;
   12341           4 :         r.in.password = _password;
   12342           4 :         r.in.hash = _hash;
   12343             : 
   12344             :         /* Out parameters */
   12345             : 
   12346             :         /* Result */
   12347           4 :         NDR_ZERO_STRUCT(r.out.result);
   12348             : 
   12349           4 :         status = dcerpc_samr_OemChangePasswordUser2_r(h, mem_ctx, &r);
   12350           4 :         if (!NT_STATUS_IS_OK(status)) {
   12351           0 :                 return status;
   12352             :         }
   12353             : 
   12354             :         /* Return variables */
   12355             : 
   12356             :         /* Return result */
   12357           4 :         *result = r.out.result;
   12358             : 
   12359           4 :         return NT_STATUS_OK;
   12360             : }
   12361             : 
   12362             : struct dcerpc_samr_ChangePasswordUser2_r_state {
   12363             :         TALLOC_CTX *out_mem_ctx;
   12364             : };
   12365             : 
   12366             : static void dcerpc_samr_ChangePasswordUser2_r_done(struct tevent_req *subreq);
   12367             : 
   12368           0 : struct tevent_req *dcerpc_samr_ChangePasswordUser2_r_send(TALLOC_CTX *mem_ctx,
   12369             :         struct tevent_context *ev,
   12370             :         struct dcerpc_binding_handle *h,
   12371             :         struct samr_ChangePasswordUser2 *r)
   12372             : {
   12373           0 :         struct tevent_req *req;
   12374           0 :         struct dcerpc_samr_ChangePasswordUser2_r_state *state;
   12375           0 :         struct tevent_req *subreq;
   12376             : 
   12377           0 :         req = tevent_req_create(mem_ctx, &state,
   12378             :                                 struct dcerpc_samr_ChangePasswordUser2_r_state);
   12379           0 :         if (req == NULL) {
   12380           0 :                 return NULL;
   12381             :         }
   12382             : 
   12383           0 :         state->out_mem_ctx = NULL;
   12384             : 
   12385           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   12386             :                         NULL, &ndr_table_samr,
   12387             :                         NDR_SAMR_CHANGEPASSWORDUSER2, state, r);
   12388           0 :         if (tevent_req_nomem(subreq, req)) {
   12389           0 :                 return tevent_req_post(req, ev);
   12390             :         }
   12391           0 :         tevent_req_set_callback(subreq, dcerpc_samr_ChangePasswordUser2_r_done, req);
   12392             : 
   12393           0 :         return req;
   12394             : }
   12395             : 
   12396           0 : static void dcerpc_samr_ChangePasswordUser2_r_done(struct tevent_req *subreq)
   12397             : {
   12398           0 :         struct tevent_req *req =
   12399           0 :                 tevent_req_callback_data(subreq,
   12400             :                 struct tevent_req);
   12401           0 :         NTSTATUS status;
   12402             : 
   12403           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   12404           0 :         TALLOC_FREE(subreq);
   12405           0 :         if (tevent_req_nterror(req, status)) {
   12406           0 :                 return;
   12407             :         }
   12408             : 
   12409           0 :         tevent_req_done(req);
   12410             : }
   12411             : 
   12412           0 : NTSTATUS dcerpc_samr_ChangePasswordUser2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   12413             : {
   12414           0 :         struct dcerpc_samr_ChangePasswordUser2_r_state *state =
   12415           0 :                 tevent_req_data(req,
   12416             :                 struct dcerpc_samr_ChangePasswordUser2_r_state);
   12417           0 :         NTSTATUS status;
   12418             : 
   12419           0 :         if (tevent_req_is_nterror(req, &status)) {
   12420           0 :                 tevent_req_received(req);
   12421           0 :                 return status;
   12422             :         }
   12423             : 
   12424           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12425             : 
   12426           0 :         tevent_req_received(req);
   12427           0 :         return NT_STATUS_OK;
   12428             : }
   12429             : 
   12430         183 : NTSTATUS dcerpc_samr_ChangePasswordUser2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_ChangePasswordUser2 *r)
   12431             : {
   12432           0 :         NTSTATUS status;
   12433             : 
   12434         183 :         status = dcerpc_binding_handle_call(h,
   12435             :                         NULL, &ndr_table_samr,
   12436             :                         NDR_SAMR_CHANGEPASSWORDUSER2, mem_ctx, r);
   12437             : 
   12438         183 :         return status;
   12439             : }
   12440             : 
   12441             : struct dcerpc_samr_ChangePasswordUser2_state {
   12442             :         struct samr_ChangePasswordUser2 orig;
   12443             :         struct samr_ChangePasswordUser2 tmp;
   12444             :         TALLOC_CTX *out_mem_ctx;
   12445             : };
   12446             : 
   12447             : static void dcerpc_samr_ChangePasswordUser2_done(struct tevent_req *subreq);
   12448             : 
   12449           0 : struct tevent_req *dcerpc_samr_ChangePasswordUser2_send(TALLOC_CTX *mem_ctx,
   12450             :                                                         struct tevent_context *ev,
   12451             :                                                         struct dcerpc_binding_handle *h,
   12452             :                                                         struct lsa_String *_server /* [in] [unique] */,
   12453             :                                                         struct lsa_String *_account /* [in] [ref] */,
   12454             :                                                         struct samr_CryptPassword *_nt_password /* [in] [unique] */,
   12455             :                                                         struct samr_Password *_nt_verifier /* [in] [unique] */,
   12456             :                                                         uint8_t _lm_change /* [in]  */,
   12457             :                                                         struct samr_CryptPassword *_lm_password /* [in] [unique] */,
   12458             :                                                         struct samr_Password *_lm_verifier /* [in] [unique] */)
   12459             : {
   12460           0 :         struct tevent_req *req;
   12461           0 :         struct dcerpc_samr_ChangePasswordUser2_state *state;
   12462           0 :         struct tevent_req *subreq;
   12463             : 
   12464           0 :         req = tevent_req_create(mem_ctx, &state,
   12465             :                                 struct dcerpc_samr_ChangePasswordUser2_state);
   12466           0 :         if (req == NULL) {
   12467           0 :                 return NULL;
   12468             :         }
   12469           0 :         state->out_mem_ctx = NULL;
   12470             : 
   12471             :         /* In parameters */
   12472           0 :         state->orig.in.server = _server;
   12473           0 :         state->orig.in.account = _account;
   12474           0 :         state->orig.in.nt_password = _nt_password;
   12475           0 :         state->orig.in.nt_verifier = _nt_verifier;
   12476           0 :         state->orig.in.lm_change = _lm_change;
   12477           0 :         state->orig.in.lm_password = _lm_password;
   12478           0 :         state->orig.in.lm_verifier = _lm_verifier;
   12479             : 
   12480             :         /* Out parameters */
   12481             : 
   12482             :         /* Result */
   12483           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   12484             : 
   12485             :         /* make a temporary copy, that we pass to the dispatch function */
   12486           0 :         state->tmp = state->orig;
   12487             : 
   12488           0 :         subreq = dcerpc_samr_ChangePasswordUser2_r_send(state, ev, h, &state->tmp);
   12489           0 :         if (tevent_req_nomem(subreq, req)) {
   12490           0 :                 return tevent_req_post(req, ev);
   12491             :         }
   12492           0 :         tevent_req_set_callback(subreq, dcerpc_samr_ChangePasswordUser2_done, req);
   12493           0 :         return req;
   12494             : }
   12495             : 
   12496           0 : static void dcerpc_samr_ChangePasswordUser2_done(struct tevent_req *subreq)
   12497             : {
   12498           0 :         struct tevent_req *req = tevent_req_callback_data(
   12499             :                 subreq, struct tevent_req);
   12500           0 :         struct dcerpc_samr_ChangePasswordUser2_state *state = tevent_req_data(
   12501             :                 req, struct dcerpc_samr_ChangePasswordUser2_state);
   12502           0 :         NTSTATUS status;
   12503           0 :         TALLOC_CTX *mem_ctx;
   12504             : 
   12505           0 :         if (state->out_mem_ctx) {
   12506           0 :                 mem_ctx = state->out_mem_ctx;
   12507             :         } else {
   12508           0 :                 mem_ctx = state;
   12509             :         }
   12510             : 
   12511           0 :         status = dcerpc_samr_ChangePasswordUser2_r_recv(subreq, mem_ctx);
   12512           0 :         TALLOC_FREE(subreq);
   12513           0 :         if (tevent_req_nterror(req, status)) {
   12514           0 :                 return;
   12515             :         }
   12516             : 
   12517             :         /* Copy out parameters */
   12518             : 
   12519             :         /* Copy result */
   12520           0 :         state->orig.out.result = state->tmp.out.result;
   12521             : 
   12522             :         /* Reset temporary structure */
   12523           0 :         NDR_ZERO_STRUCT(state->tmp);
   12524             : 
   12525           0 :         tevent_req_done(req);
   12526             : }
   12527             : 
   12528           0 : NTSTATUS dcerpc_samr_ChangePasswordUser2_recv(struct tevent_req *req,
   12529             :                                               TALLOC_CTX *mem_ctx,
   12530             :                                               NTSTATUS *result)
   12531             : {
   12532           0 :         struct dcerpc_samr_ChangePasswordUser2_state *state = tevent_req_data(
   12533             :                 req, struct dcerpc_samr_ChangePasswordUser2_state);
   12534           0 :         NTSTATUS status;
   12535             : 
   12536           0 :         if (tevent_req_is_nterror(req, &status)) {
   12537           0 :                 tevent_req_received(req);
   12538           0 :                 return status;
   12539             :         }
   12540             : 
   12541             :         /* Steal possible out parameters to the callers context */
   12542           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12543             : 
   12544             :         /* Return result */
   12545           0 :         *result = state->orig.out.result;
   12546             : 
   12547           0 :         tevent_req_received(req);
   12548           0 :         return NT_STATUS_OK;
   12549             : }
   12550             : 
   12551           0 : NTSTATUS dcerpc_samr_ChangePasswordUser2(struct dcerpc_binding_handle *h,
   12552             :                                          TALLOC_CTX *mem_ctx,
   12553             :                                          struct lsa_String *_server /* [in] [unique] */,
   12554             :                                          struct lsa_String *_account /* [in] [ref] */,
   12555             :                                          struct samr_CryptPassword *_nt_password /* [in] [unique] */,
   12556             :                                          struct samr_Password *_nt_verifier /* [in] [unique] */,
   12557             :                                          uint8_t _lm_change /* [in]  */,
   12558             :                                          struct samr_CryptPassword *_lm_password /* [in] [unique] */,
   12559             :                                          struct samr_Password *_lm_verifier /* [in] [unique] */,
   12560             :                                          NTSTATUS *result)
   12561             : {
   12562           0 :         struct samr_ChangePasswordUser2 r;
   12563           0 :         NTSTATUS status;
   12564             : 
   12565             :         /* In parameters */
   12566           0 :         r.in.server = _server;
   12567           0 :         r.in.account = _account;
   12568           0 :         r.in.nt_password = _nt_password;
   12569           0 :         r.in.nt_verifier = _nt_verifier;
   12570           0 :         r.in.lm_change = _lm_change;
   12571           0 :         r.in.lm_password = _lm_password;
   12572           0 :         r.in.lm_verifier = _lm_verifier;
   12573             : 
   12574             :         /* Out parameters */
   12575             : 
   12576             :         /* Result */
   12577           0 :         NDR_ZERO_STRUCT(r.out.result);
   12578             : 
   12579           0 :         status = dcerpc_samr_ChangePasswordUser2_r(h, mem_ctx, &r);
   12580           0 :         if (!NT_STATUS_IS_OK(status)) {
   12581           0 :                 return status;
   12582             :         }
   12583             : 
   12584             :         /* Return variables */
   12585             : 
   12586             :         /* Return result */
   12587           0 :         *result = r.out.result;
   12588             : 
   12589           0 :         return NT_STATUS_OK;
   12590             : }
   12591             : 
   12592             : struct dcerpc_samr_GetDomPwInfo_r_state {
   12593             :         TALLOC_CTX *out_mem_ctx;
   12594             : };
   12595             : 
   12596             : static void dcerpc_samr_GetDomPwInfo_r_done(struct tevent_req *subreq);
   12597             : 
   12598           0 : struct tevent_req *dcerpc_samr_GetDomPwInfo_r_send(TALLOC_CTX *mem_ctx,
   12599             :         struct tevent_context *ev,
   12600             :         struct dcerpc_binding_handle *h,
   12601             :         struct samr_GetDomPwInfo *r)
   12602             : {
   12603           0 :         struct tevent_req *req;
   12604           0 :         struct dcerpc_samr_GetDomPwInfo_r_state *state;
   12605           0 :         struct tevent_req *subreq;
   12606             : 
   12607           0 :         req = tevent_req_create(mem_ctx, &state,
   12608             :                                 struct dcerpc_samr_GetDomPwInfo_r_state);
   12609           0 :         if (req == NULL) {
   12610           0 :                 return NULL;
   12611             :         }
   12612             : 
   12613           0 :         state->out_mem_ctx = talloc_new(state);
   12614           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   12615           0 :                 return tevent_req_post(req, ev);
   12616             :         }
   12617             : 
   12618           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   12619             :                         NULL, &ndr_table_samr,
   12620           0 :                         NDR_SAMR_GETDOMPWINFO, state->out_mem_ctx, r);
   12621           0 :         if (tevent_req_nomem(subreq, req)) {
   12622           0 :                 return tevent_req_post(req, ev);
   12623             :         }
   12624           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetDomPwInfo_r_done, req);
   12625             : 
   12626           0 :         return req;
   12627             : }
   12628             : 
   12629           0 : static void dcerpc_samr_GetDomPwInfo_r_done(struct tevent_req *subreq)
   12630             : {
   12631           0 :         struct tevent_req *req =
   12632           0 :                 tevent_req_callback_data(subreq,
   12633             :                 struct tevent_req);
   12634           0 :         NTSTATUS status;
   12635             : 
   12636           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   12637           0 :         TALLOC_FREE(subreq);
   12638           0 :         if (tevent_req_nterror(req, status)) {
   12639           0 :                 return;
   12640             :         }
   12641             : 
   12642           0 :         tevent_req_done(req);
   12643             : }
   12644             : 
   12645           0 : NTSTATUS dcerpc_samr_GetDomPwInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   12646             : {
   12647           0 :         struct dcerpc_samr_GetDomPwInfo_r_state *state =
   12648           0 :                 tevent_req_data(req,
   12649             :                 struct dcerpc_samr_GetDomPwInfo_r_state);
   12650           0 :         NTSTATUS status;
   12651             : 
   12652           0 :         if (tevent_req_is_nterror(req, &status)) {
   12653           0 :                 tevent_req_received(req);
   12654           0 :                 return status;
   12655             :         }
   12656             : 
   12657           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12658             : 
   12659           0 :         tevent_req_received(req);
   12660           0 :         return NT_STATUS_OK;
   12661             : }
   12662             : 
   12663        3276 : NTSTATUS dcerpc_samr_GetDomPwInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_GetDomPwInfo *r)
   12664             : {
   12665         480 :         NTSTATUS status;
   12666             : 
   12667        3276 :         status = dcerpc_binding_handle_call(h,
   12668             :                         NULL, &ndr_table_samr,
   12669             :                         NDR_SAMR_GETDOMPWINFO, mem_ctx, r);
   12670             : 
   12671        3276 :         return status;
   12672             : }
   12673             : 
   12674             : struct dcerpc_samr_GetDomPwInfo_state {
   12675             :         struct samr_GetDomPwInfo orig;
   12676             :         struct samr_GetDomPwInfo tmp;
   12677             :         TALLOC_CTX *out_mem_ctx;
   12678             : };
   12679             : 
   12680             : static void dcerpc_samr_GetDomPwInfo_done(struct tevent_req *subreq);
   12681             : 
   12682           0 : struct tevent_req *dcerpc_samr_GetDomPwInfo_send(TALLOC_CTX *mem_ctx,
   12683             :                                                  struct tevent_context *ev,
   12684             :                                                  struct dcerpc_binding_handle *h,
   12685             :                                                  struct lsa_String *_domain_name /* [in] [unique] */,
   12686             :                                                  struct samr_PwInfo *_info /* [out] [ref] */)
   12687             : {
   12688           0 :         struct tevent_req *req;
   12689           0 :         struct dcerpc_samr_GetDomPwInfo_state *state;
   12690           0 :         struct tevent_req *subreq;
   12691             : 
   12692           0 :         req = tevent_req_create(mem_ctx, &state,
   12693             :                                 struct dcerpc_samr_GetDomPwInfo_state);
   12694           0 :         if (req == NULL) {
   12695           0 :                 return NULL;
   12696             :         }
   12697           0 :         state->out_mem_ctx = NULL;
   12698             : 
   12699             :         /* In parameters */
   12700           0 :         state->orig.in.domain_name = _domain_name;
   12701             : 
   12702             :         /* Out parameters */
   12703           0 :         state->orig.out.info = _info;
   12704             : 
   12705             :         /* Result */
   12706           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   12707             : 
   12708           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   12709             :                              "dcerpc_samr_GetDomPwInfo_out_memory");
   12710           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   12711           0 :                 return tevent_req_post(req, ev);
   12712             :         }
   12713             : 
   12714             :         /* make a temporary copy, that we pass to the dispatch function */
   12715           0 :         state->tmp = state->orig;
   12716             : 
   12717           0 :         subreq = dcerpc_samr_GetDomPwInfo_r_send(state, ev, h, &state->tmp);
   12718           0 :         if (tevent_req_nomem(subreq, req)) {
   12719           0 :                 return tevent_req_post(req, ev);
   12720             :         }
   12721           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetDomPwInfo_done, req);
   12722           0 :         return req;
   12723             : }
   12724             : 
   12725           0 : static void dcerpc_samr_GetDomPwInfo_done(struct tevent_req *subreq)
   12726             : {
   12727           0 :         struct tevent_req *req = tevent_req_callback_data(
   12728             :                 subreq, struct tevent_req);
   12729           0 :         struct dcerpc_samr_GetDomPwInfo_state *state = tevent_req_data(
   12730             :                 req, struct dcerpc_samr_GetDomPwInfo_state);
   12731           0 :         NTSTATUS status;
   12732           0 :         TALLOC_CTX *mem_ctx;
   12733             : 
   12734           0 :         if (state->out_mem_ctx) {
   12735           0 :                 mem_ctx = state->out_mem_ctx;
   12736             :         } else {
   12737           0 :                 mem_ctx = state;
   12738             :         }
   12739             : 
   12740           0 :         status = dcerpc_samr_GetDomPwInfo_r_recv(subreq, mem_ctx);
   12741           0 :         TALLOC_FREE(subreq);
   12742           0 :         if (tevent_req_nterror(req, status)) {
   12743           0 :                 return;
   12744             :         }
   12745             : 
   12746             :         /* Copy out parameters */
   12747           0 :         *state->orig.out.info = *state->tmp.out.info;
   12748             : 
   12749             :         /* Copy result */
   12750           0 :         state->orig.out.result = state->tmp.out.result;
   12751             : 
   12752             :         /* Reset temporary structure */
   12753           0 :         NDR_ZERO_STRUCT(state->tmp);
   12754             : 
   12755           0 :         tevent_req_done(req);
   12756             : }
   12757             : 
   12758           0 : NTSTATUS dcerpc_samr_GetDomPwInfo_recv(struct tevent_req *req,
   12759             :                                        TALLOC_CTX *mem_ctx,
   12760             :                                        NTSTATUS *result)
   12761             : {
   12762           0 :         struct dcerpc_samr_GetDomPwInfo_state *state = tevent_req_data(
   12763             :                 req, struct dcerpc_samr_GetDomPwInfo_state);
   12764           0 :         NTSTATUS status;
   12765             : 
   12766           0 :         if (tevent_req_is_nterror(req, &status)) {
   12767           0 :                 tevent_req_received(req);
   12768           0 :                 return status;
   12769             :         }
   12770             : 
   12771             :         /* Steal possible out parameters to the callers context */
   12772           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12773             : 
   12774             :         /* Return result */
   12775           0 :         *result = state->orig.out.result;
   12776             : 
   12777           0 :         tevent_req_received(req);
   12778           0 :         return NT_STATUS_OK;
   12779             : }
   12780             : 
   12781           0 : NTSTATUS dcerpc_samr_GetDomPwInfo(struct dcerpc_binding_handle *h,
   12782             :                                   TALLOC_CTX *mem_ctx,
   12783             :                                   struct lsa_String *_domain_name /* [in] [unique] */,
   12784             :                                   struct samr_PwInfo *_info /* [out] [ref] */,
   12785             :                                   NTSTATUS *result)
   12786             : {
   12787           0 :         struct samr_GetDomPwInfo r;
   12788           0 :         NTSTATUS status;
   12789             : 
   12790             :         /* In parameters */
   12791           0 :         r.in.domain_name = _domain_name;
   12792             : 
   12793             :         /* Out parameters */
   12794           0 :         r.out.info = _info;
   12795             : 
   12796             :         /* Result */
   12797           0 :         NDR_ZERO_STRUCT(r.out.result);
   12798             : 
   12799           0 :         status = dcerpc_samr_GetDomPwInfo_r(h, mem_ctx, &r);
   12800           0 :         if (!NT_STATUS_IS_OK(status)) {
   12801           0 :                 return status;
   12802             :         }
   12803             : 
   12804             :         /* Return variables */
   12805           0 :         *_info = *r.out.info;
   12806             : 
   12807             :         /* Return result */
   12808           0 :         *result = r.out.result;
   12809             : 
   12810           0 :         return NT_STATUS_OK;
   12811             : }
   12812             : 
   12813             : struct dcerpc_samr_Connect2_r_state {
   12814             :         TALLOC_CTX *out_mem_ctx;
   12815             : };
   12816             : 
   12817             : static void dcerpc_samr_Connect2_r_done(struct tevent_req *subreq);
   12818             : 
   12819           0 : struct tevent_req *dcerpc_samr_Connect2_r_send(TALLOC_CTX *mem_ctx,
   12820             :         struct tevent_context *ev,
   12821             :         struct dcerpc_binding_handle *h,
   12822             :         struct samr_Connect2 *r)
   12823             : {
   12824           0 :         struct tevent_req *req;
   12825           0 :         struct dcerpc_samr_Connect2_r_state *state;
   12826           0 :         struct tevent_req *subreq;
   12827             : 
   12828           0 :         req = tevent_req_create(mem_ctx, &state,
   12829             :                                 struct dcerpc_samr_Connect2_r_state);
   12830           0 :         if (req == NULL) {
   12831           0 :                 return NULL;
   12832             :         }
   12833             : 
   12834           0 :         state->out_mem_ctx = talloc_new(state);
   12835           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   12836           0 :                 return tevent_req_post(req, ev);
   12837             :         }
   12838             : 
   12839           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   12840             :                         NULL, &ndr_table_samr,
   12841           0 :                         NDR_SAMR_CONNECT2, state->out_mem_ctx, r);
   12842           0 :         if (tevent_req_nomem(subreq, req)) {
   12843           0 :                 return tevent_req_post(req, ev);
   12844             :         }
   12845           0 :         tevent_req_set_callback(subreq, dcerpc_samr_Connect2_r_done, req);
   12846             : 
   12847           0 :         return req;
   12848             : }
   12849             : 
   12850           0 : static void dcerpc_samr_Connect2_r_done(struct tevent_req *subreq)
   12851             : {
   12852           0 :         struct tevent_req *req =
   12853           0 :                 tevent_req_callback_data(subreq,
   12854             :                 struct tevent_req);
   12855           0 :         NTSTATUS status;
   12856             : 
   12857           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   12858           0 :         TALLOC_FREE(subreq);
   12859           0 :         if (tevent_req_nterror(req, status)) {
   12860           0 :                 return;
   12861             :         }
   12862             : 
   12863           0 :         tevent_req_done(req);
   12864             : }
   12865             : 
   12866           0 : NTSTATUS dcerpc_samr_Connect2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   12867             : {
   12868           0 :         struct dcerpc_samr_Connect2_r_state *state =
   12869           0 :                 tevent_req_data(req,
   12870             :                 struct dcerpc_samr_Connect2_r_state);
   12871           0 :         NTSTATUS status;
   12872             : 
   12873           0 :         if (tevent_req_is_nterror(req, &status)) {
   12874           0 :                 tevent_req_received(req);
   12875           0 :                 return status;
   12876             :         }
   12877             : 
   12878           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12879             : 
   12880           0 :         tevent_req_received(req);
   12881           0 :         return NT_STATUS_OK;
   12882             : }
   12883             : 
   12884         874 : NTSTATUS dcerpc_samr_Connect2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_Connect2 *r)
   12885             : {
   12886           0 :         NTSTATUS status;
   12887             : 
   12888         874 :         status = dcerpc_binding_handle_call(h,
   12889             :                         NULL, &ndr_table_samr,
   12890             :                         NDR_SAMR_CONNECT2, mem_ctx, r);
   12891             : 
   12892         874 :         return status;
   12893             : }
   12894             : 
   12895             : struct dcerpc_samr_Connect2_state {
   12896             :         struct samr_Connect2 orig;
   12897             :         struct samr_Connect2 tmp;
   12898             :         TALLOC_CTX *out_mem_ctx;
   12899             : };
   12900             : 
   12901             : static void dcerpc_samr_Connect2_done(struct tevent_req *subreq);
   12902             : 
   12903           0 : struct tevent_req *dcerpc_samr_Connect2_send(TALLOC_CTX *mem_ctx,
   12904             :                                              struct tevent_context *ev,
   12905             :                                              struct dcerpc_binding_handle *h,
   12906             :                                              const char *_system_name /* [in] [charset(UTF16),unique] */,
   12907             :                                              uint32_t _access_mask /* [in]  */,
   12908             :                                              struct policy_handle *_connect_handle /* [out] [ref] */)
   12909             : {
   12910           0 :         struct tevent_req *req;
   12911           0 :         struct dcerpc_samr_Connect2_state *state;
   12912           0 :         struct tevent_req *subreq;
   12913             : 
   12914           0 :         req = tevent_req_create(mem_ctx, &state,
   12915             :                                 struct dcerpc_samr_Connect2_state);
   12916           0 :         if (req == NULL) {
   12917           0 :                 return NULL;
   12918             :         }
   12919           0 :         state->out_mem_ctx = NULL;
   12920             : 
   12921             :         /* In parameters */
   12922           0 :         state->orig.in.system_name = _system_name;
   12923           0 :         state->orig.in.access_mask = _access_mask;
   12924             : 
   12925             :         /* Out parameters */
   12926           0 :         state->orig.out.connect_handle = _connect_handle;
   12927             : 
   12928             :         /* Result */
   12929           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   12930             : 
   12931           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   12932             :                              "dcerpc_samr_Connect2_out_memory");
   12933           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   12934           0 :                 return tevent_req_post(req, ev);
   12935             :         }
   12936             : 
   12937             :         /* make a temporary copy, that we pass to the dispatch function */
   12938           0 :         state->tmp = state->orig;
   12939             : 
   12940           0 :         subreq = dcerpc_samr_Connect2_r_send(state, ev, h, &state->tmp);
   12941           0 :         if (tevent_req_nomem(subreq, req)) {
   12942           0 :                 return tevent_req_post(req, ev);
   12943             :         }
   12944           0 :         tevent_req_set_callback(subreq, dcerpc_samr_Connect2_done, req);
   12945           0 :         return req;
   12946             : }
   12947             : 
   12948           0 : static void dcerpc_samr_Connect2_done(struct tevent_req *subreq)
   12949             : {
   12950           0 :         struct tevent_req *req = tevent_req_callback_data(
   12951             :                 subreq, struct tevent_req);
   12952           0 :         struct dcerpc_samr_Connect2_state *state = tevent_req_data(
   12953             :                 req, struct dcerpc_samr_Connect2_state);
   12954           0 :         NTSTATUS status;
   12955           0 :         TALLOC_CTX *mem_ctx;
   12956             : 
   12957           0 :         if (state->out_mem_ctx) {
   12958           0 :                 mem_ctx = state->out_mem_ctx;
   12959             :         } else {
   12960           0 :                 mem_ctx = state;
   12961             :         }
   12962             : 
   12963           0 :         status = dcerpc_samr_Connect2_r_recv(subreq, mem_ctx);
   12964           0 :         TALLOC_FREE(subreq);
   12965           0 :         if (tevent_req_nterror(req, status)) {
   12966           0 :                 return;
   12967             :         }
   12968             : 
   12969             :         /* Copy out parameters */
   12970           0 :         *state->orig.out.connect_handle = *state->tmp.out.connect_handle;
   12971             : 
   12972             :         /* Copy result */
   12973           0 :         state->orig.out.result = state->tmp.out.result;
   12974             : 
   12975             :         /* Reset temporary structure */
   12976           0 :         NDR_ZERO_STRUCT(state->tmp);
   12977             : 
   12978           0 :         tevent_req_done(req);
   12979             : }
   12980             : 
   12981           0 : NTSTATUS dcerpc_samr_Connect2_recv(struct tevent_req *req,
   12982             :                                    TALLOC_CTX *mem_ctx,
   12983             :                                    NTSTATUS *result)
   12984             : {
   12985           0 :         struct dcerpc_samr_Connect2_state *state = tevent_req_data(
   12986             :                 req, struct dcerpc_samr_Connect2_state);
   12987           0 :         NTSTATUS status;
   12988             : 
   12989           0 :         if (tevent_req_is_nterror(req, &status)) {
   12990           0 :                 tevent_req_received(req);
   12991           0 :                 return status;
   12992             :         }
   12993             : 
   12994             :         /* Steal possible out parameters to the callers context */
   12995           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12996             : 
   12997             :         /* Return result */
   12998           0 :         *result = state->orig.out.result;
   12999             : 
   13000           0 :         tevent_req_received(req);
   13001           0 :         return NT_STATUS_OK;
   13002             : }
   13003             : 
   13004         245 : NTSTATUS dcerpc_samr_Connect2(struct dcerpc_binding_handle *h,
   13005             :                               TALLOC_CTX *mem_ctx,
   13006             :                               const char *_system_name /* [in] [charset(UTF16),unique] */,
   13007             :                               uint32_t _access_mask /* [in]  */,
   13008             :                               struct policy_handle *_connect_handle /* [out] [ref] */,
   13009             :                               NTSTATUS *result)
   13010             : {
   13011           0 :         struct samr_Connect2 r;
   13012           0 :         NTSTATUS status;
   13013             : 
   13014             :         /* In parameters */
   13015         245 :         r.in.system_name = _system_name;
   13016         245 :         r.in.access_mask = _access_mask;
   13017             : 
   13018             :         /* Out parameters */
   13019         245 :         r.out.connect_handle = _connect_handle;
   13020             : 
   13021             :         /* Result */
   13022         245 :         NDR_ZERO_STRUCT(r.out.result);
   13023             : 
   13024         245 :         status = dcerpc_samr_Connect2_r(h, mem_ctx, &r);
   13025         245 :         if (!NT_STATUS_IS_OK(status)) {
   13026           0 :                 return status;
   13027             :         }
   13028             : 
   13029             :         /* Return variables */
   13030         245 :         *_connect_handle = *r.out.connect_handle;
   13031             : 
   13032             :         /* Return result */
   13033         245 :         *result = r.out.result;
   13034             : 
   13035         245 :         return NT_STATUS_OK;
   13036             : }
   13037             : 
   13038             : struct dcerpc_samr_SetUserInfo2_r_state {
   13039             :         TALLOC_CTX *out_mem_ctx;
   13040             : };
   13041             : 
   13042             : static void dcerpc_samr_SetUserInfo2_r_done(struct tevent_req *subreq);
   13043             : 
   13044           0 : struct tevent_req *dcerpc_samr_SetUserInfo2_r_send(TALLOC_CTX *mem_ctx,
   13045             :         struct tevent_context *ev,
   13046             :         struct dcerpc_binding_handle *h,
   13047             :         struct samr_SetUserInfo2 *r)
   13048             : {
   13049           0 :         struct tevent_req *req;
   13050           0 :         struct dcerpc_samr_SetUserInfo2_r_state *state;
   13051           0 :         struct tevent_req *subreq;
   13052             : 
   13053           0 :         req = tevent_req_create(mem_ctx, &state,
   13054             :                                 struct dcerpc_samr_SetUserInfo2_r_state);
   13055           0 :         if (req == NULL) {
   13056           0 :                 return NULL;
   13057             :         }
   13058             : 
   13059           0 :         state->out_mem_ctx = NULL;
   13060             : 
   13061           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   13062             :                         NULL, &ndr_table_samr,
   13063             :                         NDR_SAMR_SETUSERINFO2, state, r);
   13064           0 :         if (tevent_req_nomem(subreq, req)) {
   13065           0 :                 return tevent_req_post(req, ev);
   13066             :         }
   13067           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetUserInfo2_r_done, req);
   13068             : 
   13069           0 :         return req;
   13070             : }
   13071             : 
   13072           0 : static void dcerpc_samr_SetUserInfo2_r_done(struct tevent_req *subreq)
   13073             : {
   13074           0 :         struct tevent_req *req =
   13075           0 :                 tevent_req_callback_data(subreq,
   13076             :                 struct tevent_req);
   13077           0 :         NTSTATUS status;
   13078             : 
   13079           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   13080           0 :         TALLOC_FREE(subreq);
   13081           0 :         if (tevent_req_nterror(req, status)) {
   13082           0 :                 return;
   13083             :         }
   13084             : 
   13085           0 :         tevent_req_done(req);
   13086             : }
   13087             : 
   13088           0 : NTSTATUS dcerpc_samr_SetUserInfo2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   13089             : {
   13090           0 :         struct dcerpc_samr_SetUserInfo2_r_state *state =
   13091           0 :                 tevent_req_data(req,
   13092             :                 struct dcerpc_samr_SetUserInfo2_r_state);
   13093           0 :         NTSTATUS status;
   13094             : 
   13095           0 :         if (tevent_req_is_nterror(req, &status)) {
   13096           0 :                 tevent_req_received(req);
   13097           0 :                 return status;
   13098             :         }
   13099             : 
   13100           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   13101             : 
   13102           0 :         tevent_req_received(req);
   13103           0 :         return NT_STATUS_OK;
   13104             : }
   13105             : 
   13106        1912 : NTSTATUS dcerpc_samr_SetUserInfo2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_SetUserInfo2 *r)
   13107             : {
   13108          72 :         NTSTATUS status;
   13109             : 
   13110        1912 :         status = dcerpc_binding_handle_call(h,
   13111             :                         NULL, &ndr_table_samr,
   13112             :                         NDR_SAMR_SETUSERINFO2, mem_ctx, r);
   13113             : 
   13114        1912 :         return status;
   13115             : }
   13116             : 
   13117             : struct dcerpc_samr_SetUserInfo2_state {
   13118             :         struct samr_SetUserInfo2 orig;
   13119             :         struct samr_SetUserInfo2 tmp;
   13120             :         TALLOC_CTX *out_mem_ctx;
   13121             : };
   13122             : 
   13123             : static void dcerpc_samr_SetUserInfo2_done(struct tevent_req *subreq);
   13124             : 
   13125           0 : struct tevent_req *dcerpc_samr_SetUserInfo2_send(TALLOC_CTX *mem_ctx,
   13126             :                                                  struct tevent_context *ev,
   13127             :                                                  struct dcerpc_binding_handle *h,
   13128             :                                                  struct policy_handle *_user_handle /* [in] [ref] */,
   13129             :                                                  enum samr_UserInfoLevel _level /* [in]  */,
   13130             :                                                  union samr_UserInfo *_info /* [in] [ref,switch_is(level)] */)
   13131             : {
   13132           0 :         struct tevent_req *req;
   13133           0 :         struct dcerpc_samr_SetUserInfo2_state *state;
   13134           0 :         struct tevent_req *subreq;
   13135             : 
   13136           0 :         req = tevent_req_create(mem_ctx, &state,
   13137             :                                 struct dcerpc_samr_SetUserInfo2_state);
   13138           0 :         if (req == NULL) {
   13139           0 :                 return NULL;
   13140             :         }
   13141           0 :         state->out_mem_ctx = NULL;
   13142             : 
   13143             :         /* In parameters */
   13144           0 :         state->orig.in.user_handle = _user_handle;
   13145           0 :         state->orig.in.level = _level;
   13146           0 :         state->orig.in.info = _info;
   13147             : 
   13148             :         /* Out parameters */
   13149             : 
   13150             :         /* Result */
   13151           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   13152             : 
   13153             :         /* make a temporary copy, that we pass to the dispatch function */
   13154           0 :         state->tmp = state->orig;
   13155             : 
   13156           0 :         subreq = dcerpc_samr_SetUserInfo2_r_send(state, ev, h, &state->tmp);
   13157           0 :         if (tevent_req_nomem(subreq, req)) {
   13158           0 :                 return tevent_req_post(req, ev);
   13159             :         }
   13160           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetUserInfo2_done, req);
   13161           0 :         return req;
   13162             : }
   13163             : 
   13164           0 : static void dcerpc_samr_SetUserInfo2_done(struct tevent_req *subreq)
   13165             : {
   13166           0 :         struct tevent_req *req = tevent_req_callback_data(
   13167             :                 subreq, struct tevent_req);
   13168           0 :         struct dcerpc_samr_SetUserInfo2_state *state = tevent_req_data(
   13169             :                 req, struct dcerpc_samr_SetUserInfo2_state);
   13170           0 :         NTSTATUS status;
   13171           0 :         TALLOC_CTX *mem_ctx;
   13172             : 
   13173           0 :         if (state->out_mem_ctx) {
   13174           0 :                 mem_ctx = state->out_mem_ctx;
   13175             :         } else {
   13176           0 :                 mem_ctx = state;
   13177             :         }
   13178             : 
   13179           0 :         status = dcerpc_samr_SetUserInfo2_r_recv(subreq, mem_ctx);
   13180           0 :         TALLOC_FREE(subreq);
   13181           0 :         if (tevent_req_nterror(req, status)) {
   13182           0 :                 return;
   13183             :         }
   13184             : 
   13185             :         /* Copy out parameters */
   13186             : 
   13187             :         /* Copy result */
   13188           0 :         state->orig.out.result = state->tmp.out.result;
   13189             : 
   13190             :         /* Reset temporary structure */
   13191           0 :         NDR_ZERO_STRUCT(state->tmp);
   13192             : 
   13193           0 :         tevent_req_done(req);
   13194             : }
   13195             : 
   13196           0 : NTSTATUS dcerpc_samr_SetUserInfo2_recv(struct tevent_req *req,
   13197             :                                        TALLOC_CTX *mem_ctx,
   13198             :                                        NTSTATUS *result)
   13199             : {
   13200           0 :         struct dcerpc_samr_SetUserInfo2_state *state = tevent_req_data(
   13201             :                 req, struct dcerpc_samr_SetUserInfo2_state);
   13202           0 :         NTSTATUS status;
   13203             : 
   13204           0 :         if (tevent_req_is_nterror(req, &status)) {
   13205           0 :                 tevent_req_received(req);
   13206           0 :                 return status;
   13207             :         }
   13208             : 
   13209             :         /* Steal possible out parameters to the callers context */
   13210           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   13211             : 
   13212             :         /* Return result */
   13213           0 :         *result = state->orig.out.result;
   13214             : 
   13215           0 :         tevent_req_received(req);
   13216           0 :         return NT_STATUS_OK;
   13217             : }
   13218             : 
   13219          32 : NTSTATUS dcerpc_samr_SetUserInfo2(struct dcerpc_binding_handle *h,
   13220             :                                   TALLOC_CTX *mem_ctx,
   13221             :                                   struct policy_handle *_user_handle /* [in] [ref] */,
   13222             :                                   enum samr_UserInfoLevel _level /* [in]  */,
   13223             :                                   union samr_UserInfo *_info /* [in] [ref,switch_is(level)] */,
   13224             :                                   NTSTATUS *result)
   13225             : {
   13226           0 :         struct samr_SetUserInfo2 r;
   13227           0 :         NTSTATUS status;
   13228             : 
   13229             :         /* In parameters */
   13230          32 :         r.in.user_handle = _user_handle;
   13231          32 :         r.in.level = _level;
   13232          32 :         r.in.info = _info;
   13233             : 
   13234             :         /* Out parameters */
   13235             : 
   13236             :         /* Result */
   13237          32 :         NDR_ZERO_STRUCT(r.out.result);
   13238             : 
   13239          32 :         status = dcerpc_samr_SetUserInfo2_r(h, mem_ctx, &r);
   13240          32 :         if (!NT_STATUS_IS_OK(status)) {
   13241           0 :                 return status;
   13242             :         }
   13243             : 
   13244             :         /* Return variables */
   13245             : 
   13246             :         /* Return result */
   13247          32 :         *result = r.out.result;
   13248             : 
   13249          32 :         return NT_STATUS_OK;
   13250             : }
   13251             : 
   13252             : struct dcerpc_samr_SetBootKeyInformation_r_state {
   13253             :         TALLOC_CTX *out_mem_ctx;
   13254             : };
   13255             : 
   13256             : static void dcerpc_samr_SetBootKeyInformation_r_done(struct tevent_req *subreq);
   13257             : 
   13258           0 : struct tevent_req *dcerpc_samr_SetBootKeyInformation_r_send(TALLOC_CTX *mem_ctx,
   13259             :         struct tevent_context *ev,
   13260             :         struct dcerpc_binding_handle *h,
   13261             :         struct samr_SetBootKeyInformation *r)
   13262             : {
   13263           0 :         struct tevent_req *req;
   13264           0 :         struct dcerpc_samr_SetBootKeyInformation_r_state *state;
   13265           0 :         struct tevent_req *subreq;
   13266             : 
   13267           0 :         req = tevent_req_create(mem_ctx, &state,
   13268             :                                 struct dcerpc_samr_SetBootKeyInformation_r_state);
   13269           0 :         if (req == NULL) {
   13270           0 :                 return NULL;
   13271             :         }
   13272             : 
   13273           0 :         state->out_mem_ctx = NULL;
   13274             : 
   13275           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   13276             :                         NULL, &ndr_table_samr,
   13277             :                         NDR_SAMR_SETBOOTKEYINFORMATION, state, r);
   13278           0 :         if (tevent_req_nomem(subreq, req)) {
   13279           0 :                 return tevent_req_post(req, ev);
   13280             :         }
   13281           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetBootKeyInformation_r_done, req);
   13282             : 
   13283           0 :         return req;
   13284             : }
   13285             : 
   13286           0 : static void dcerpc_samr_SetBootKeyInformation_r_done(struct tevent_req *subreq)
   13287             : {
   13288           0 :         struct tevent_req *req =
   13289           0 :                 tevent_req_callback_data(subreq,
   13290             :                 struct tevent_req);
   13291           0 :         NTSTATUS status;
   13292             : 
   13293           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   13294           0 :         TALLOC_FREE(subreq);
   13295           0 :         if (tevent_req_nterror(req, status)) {
   13296           0 :                 return;
   13297             :         }
   13298             : 
   13299           0 :         tevent_req_done(req);
   13300             : }
   13301             : 
   13302           0 : NTSTATUS dcerpc_samr_SetBootKeyInformation_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   13303             : {
   13304           0 :         struct dcerpc_samr_SetBootKeyInformation_r_state *state =
   13305           0 :                 tevent_req_data(req,
   13306             :                 struct dcerpc_samr_SetBootKeyInformation_r_state);
   13307           0 :         NTSTATUS status;
   13308             : 
   13309           0 :         if (tevent_req_is_nterror(req, &status)) {
   13310           0 :                 tevent_req_received(req);
   13311           0 :                 return status;
   13312             :         }
   13313             : 
   13314           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   13315             : 
   13316           0 :         tevent_req_received(req);
   13317           0 :         return NT_STATUS_OK;
   13318             : }
   13319             : 
   13320           0 : NTSTATUS dcerpc_samr_SetBootKeyInformation_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_SetBootKeyInformation *r)
   13321             : {
   13322           0 :         NTSTATUS status;
   13323             : 
   13324           0 :         status = dcerpc_binding_handle_call(h,
   13325             :                         NULL, &ndr_table_samr,
   13326             :                         NDR_SAMR_SETBOOTKEYINFORMATION, mem_ctx, r);
   13327             : 
   13328           0 :         return status;
   13329             : }
   13330             : 
   13331             : struct dcerpc_samr_SetBootKeyInformation_state {
   13332             :         struct samr_SetBootKeyInformation orig;
   13333             :         struct samr_SetBootKeyInformation tmp;
   13334             :         TALLOC_CTX *out_mem_ctx;
   13335             : };
   13336             : 
   13337             : static void dcerpc_samr_SetBootKeyInformation_done(struct tevent_req *subreq);
   13338             : 
   13339           0 : struct tevent_req *dcerpc_samr_SetBootKeyInformation_send(TALLOC_CTX *mem_ctx,
   13340             :                                                           struct tevent_context *ev,
   13341             :                                                           struct dcerpc_binding_handle *h,
   13342             :                                                           struct policy_handle *_connect_handle /* [in] [ref] */,
   13343             :                                                           uint32_t _unknown1 /* [in]  */,
   13344             :                                                           uint32_t _unknown2 /* [in]  */,
   13345             :                                                           uint32_t _unknown3 /* [in]  */)
   13346             : {
   13347           0 :         struct tevent_req *req;
   13348           0 :         struct dcerpc_samr_SetBootKeyInformation_state *state;
   13349           0 :         struct tevent_req *subreq;
   13350             : 
   13351           0 :         req = tevent_req_create(mem_ctx, &state,
   13352             :                                 struct dcerpc_samr_SetBootKeyInformation_state);
   13353           0 :         if (req == NULL) {
   13354           0 :                 return NULL;
   13355             :         }
   13356           0 :         state->out_mem_ctx = NULL;
   13357             : 
   13358             :         /* In parameters */
   13359           0 :         state->orig.in.connect_handle = _connect_handle;
   13360           0 :         state->orig.in.unknown1 = _unknown1;
   13361           0 :         state->orig.in.unknown2 = _unknown2;
   13362           0 :         state->orig.in.unknown3 = _unknown3;
   13363             : 
   13364             :         /* Out parameters */
   13365             : 
   13366             :         /* Result */
   13367           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   13368             : 
   13369             :         /* make a temporary copy, that we pass to the dispatch function */
   13370           0 :         state->tmp = state->orig;
   13371             : 
   13372           0 :         subreq = dcerpc_samr_SetBootKeyInformation_r_send(state, ev, h, &state->tmp);
   13373           0 :         if (tevent_req_nomem(subreq, req)) {
   13374           0 :                 return tevent_req_post(req, ev);
   13375             :         }
   13376           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetBootKeyInformation_done, req);
   13377           0 :         return req;
   13378             : }
   13379             : 
   13380           0 : static void dcerpc_samr_SetBootKeyInformation_done(struct tevent_req *subreq)
   13381             : {
   13382           0 :         struct tevent_req *req = tevent_req_callback_data(
   13383             :                 subreq, struct tevent_req);
   13384           0 :         struct dcerpc_samr_SetBootKeyInformation_state *state = tevent_req_data(
   13385             :                 req, struct dcerpc_samr_SetBootKeyInformation_state);
   13386           0 :         NTSTATUS status;
   13387           0 :         TALLOC_CTX *mem_ctx;
   13388             : 
   13389           0 :         if (state->out_mem_ctx) {
   13390           0 :                 mem_ctx = state->out_mem_ctx;
   13391             :         } else {
   13392           0 :                 mem_ctx = state;
   13393             :         }
   13394             : 
   13395           0 :         status = dcerpc_samr_SetBootKeyInformation_r_recv(subreq, mem_ctx);
   13396           0 :         TALLOC_FREE(subreq);
   13397           0 :         if (tevent_req_nterror(req, status)) {
   13398           0 :                 return;
   13399             :         }
   13400             : 
   13401             :         /* Copy out parameters */
   13402             : 
   13403             :         /* Copy result */
   13404           0 :         state->orig.out.result = state->tmp.out.result;
   13405             : 
   13406             :         /* Reset temporary structure */
   13407           0 :         NDR_ZERO_STRUCT(state->tmp);
   13408             : 
   13409           0 :         tevent_req_done(req);
   13410             : }
   13411             : 
   13412           0 : NTSTATUS dcerpc_samr_SetBootKeyInformation_recv(struct tevent_req *req,
   13413             :                                                 TALLOC_CTX *mem_ctx,
   13414             :                                                 NTSTATUS *result)
   13415             : {
   13416           0 :         struct dcerpc_samr_SetBootKeyInformation_state *state = tevent_req_data(
   13417             :                 req, struct dcerpc_samr_SetBootKeyInformation_state);
   13418           0 :         NTSTATUS status;
   13419             : 
   13420           0 :         if (tevent_req_is_nterror(req, &status)) {
   13421           0 :                 tevent_req_received(req);
   13422           0 :                 return status;
   13423             :         }
   13424             : 
   13425             :         /* Steal possible out parameters to the callers context */
   13426           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   13427             : 
   13428             :         /* Return result */
   13429           0 :         *result = state->orig.out.result;
   13430             : 
   13431           0 :         tevent_req_received(req);
   13432           0 :         return NT_STATUS_OK;
   13433             : }
   13434             : 
   13435           0 : NTSTATUS dcerpc_samr_SetBootKeyInformation(struct dcerpc_binding_handle *h,
   13436             :                                            TALLOC_CTX *mem_ctx,
   13437             :                                            struct policy_handle *_connect_handle /* [in] [ref] */,
   13438             :                                            uint32_t _unknown1 /* [in]  */,
   13439             :                                            uint32_t _unknown2 /* [in]  */,
   13440             :                                            uint32_t _unknown3 /* [in]  */,
   13441             :                                            NTSTATUS *result)
   13442             : {
   13443           0 :         struct samr_SetBootKeyInformation r;
   13444           0 :         NTSTATUS status;
   13445             : 
   13446             :         /* In parameters */
   13447           0 :         r.in.connect_handle = _connect_handle;
   13448           0 :         r.in.unknown1 = _unknown1;
   13449           0 :         r.in.unknown2 = _unknown2;
   13450           0 :         r.in.unknown3 = _unknown3;
   13451             : 
   13452             :         /* Out parameters */
   13453             : 
   13454             :         /* Result */
   13455           0 :         NDR_ZERO_STRUCT(r.out.result);
   13456             : 
   13457           0 :         status = dcerpc_samr_SetBootKeyInformation_r(h, mem_ctx, &r);
   13458           0 :         if (!NT_STATUS_IS_OK(status)) {
   13459           0 :                 return status;
   13460             :         }
   13461             : 
   13462             :         /* Return variables */
   13463             : 
   13464             :         /* Return result */
   13465           0 :         *result = r.out.result;
   13466             : 
   13467           0 :         return NT_STATUS_OK;
   13468             : }
   13469             : 
   13470             : struct dcerpc_samr_GetBootKeyInformation_r_state {
   13471             :         TALLOC_CTX *out_mem_ctx;
   13472             : };
   13473             : 
   13474             : static void dcerpc_samr_GetBootKeyInformation_r_done(struct tevent_req *subreq);
   13475             : 
   13476           0 : struct tevent_req *dcerpc_samr_GetBootKeyInformation_r_send(TALLOC_CTX *mem_ctx,
   13477             :         struct tevent_context *ev,
   13478             :         struct dcerpc_binding_handle *h,
   13479             :         struct samr_GetBootKeyInformation *r)
   13480             : {
   13481           0 :         struct tevent_req *req;
   13482           0 :         struct dcerpc_samr_GetBootKeyInformation_r_state *state;
   13483           0 :         struct tevent_req *subreq;
   13484             : 
   13485           0 :         req = tevent_req_create(mem_ctx, &state,
   13486             :                                 struct dcerpc_samr_GetBootKeyInformation_r_state);
   13487           0 :         if (req == NULL) {
   13488           0 :                 return NULL;
   13489             :         }
   13490             : 
   13491           0 :         state->out_mem_ctx = talloc_new(state);
   13492           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   13493           0 :                 return tevent_req_post(req, ev);
   13494             :         }
   13495             : 
   13496           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   13497             :                         NULL, &ndr_table_samr,
   13498           0 :                         NDR_SAMR_GETBOOTKEYINFORMATION, state->out_mem_ctx, r);
   13499           0 :         if (tevent_req_nomem(subreq, req)) {
   13500           0 :                 return tevent_req_post(req, ev);
   13501             :         }
   13502           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetBootKeyInformation_r_done, req);
   13503             : 
   13504           0 :         return req;
   13505             : }
   13506             : 
   13507           0 : static void dcerpc_samr_GetBootKeyInformation_r_done(struct tevent_req *subreq)
   13508             : {
   13509           0 :         struct tevent_req *req =
   13510           0 :                 tevent_req_callback_data(subreq,
   13511             :                 struct tevent_req);
   13512           0 :         NTSTATUS status;
   13513             : 
   13514           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   13515           0 :         TALLOC_FREE(subreq);
   13516           0 :         if (tevent_req_nterror(req, status)) {
   13517           0 :                 return;
   13518             :         }
   13519             : 
   13520           0 :         tevent_req_done(req);
   13521             : }
   13522             : 
   13523           0 : NTSTATUS dcerpc_samr_GetBootKeyInformation_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   13524             : {
   13525           0 :         struct dcerpc_samr_GetBootKeyInformation_r_state *state =
   13526           0 :                 tevent_req_data(req,
   13527             :                 struct dcerpc_samr_GetBootKeyInformation_r_state);
   13528           0 :         NTSTATUS status;
   13529             : 
   13530           0 :         if (tevent_req_is_nterror(req, &status)) {
   13531           0 :                 tevent_req_received(req);
   13532           0 :                 return status;
   13533             :         }
   13534             : 
   13535           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   13536             : 
   13537           0 :         tevent_req_received(req);
   13538           0 :         return NT_STATUS_OK;
   13539             : }
   13540             : 
   13541          10 : NTSTATUS dcerpc_samr_GetBootKeyInformation_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_GetBootKeyInformation *r)
   13542             : {
   13543           0 :         NTSTATUS status;
   13544             : 
   13545          10 :         status = dcerpc_binding_handle_call(h,
   13546             :                         NULL, &ndr_table_samr,
   13547             :                         NDR_SAMR_GETBOOTKEYINFORMATION, mem_ctx, r);
   13548             : 
   13549          10 :         return status;
   13550             : }
   13551             : 
   13552             : struct dcerpc_samr_GetBootKeyInformation_state {
   13553             :         struct samr_GetBootKeyInformation orig;
   13554             :         struct samr_GetBootKeyInformation tmp;
   13555             :         TALLOC_CTX *out_mem_ctx;
   13556             : };
   13557             : 
   13558             : static void dcerpc_samr_GetBootKeyInformation_done(struct tevent_req *subreq);
   13559             : 
   13560           0 : struct tevent_req *dcerpc_samr_GetBootKeyInformation_send(TALLOC_CTX *mem_ctx,
   13561             :                                                           struct tevent_context *ev,
   13562             :                                                           struct dcerpc_binding_handle *h,
   13563             :                                                           struct policy_handle *_domain_handle /* [in] [ref] */,
   13564             :                                                           uint32_t *_unknown /* [out] [ref] */)
   13565             : {
   13566           0 :         struct tevent_req *req;
   13567           0 :         struct dcerpc_samr_GetBootKeyInformation_state *state;
   13568           0 :         struct tevent_req *subreq;
   13569             : 
   13570           0 :         req = tevent_req_create(mem_ctx, &state,
   13571             :                                 struct dcerpc_samr_GetBootKeyInformation_state);
   13572           0 :         if (req == NULL) {
   13573           0 :                 return NULL;
   13574             :         }
   13575           0 :         state->out_mem_ctx = NULL;
   13576             : 
   13577             :         /* In parameters */
   13578           0 :         state->orig.in.domain_handle = _domain_handle;
   13579             : 
   13580             :         /* Out parameters */
   13581           0 :         state->orig.out.unknown = _unknown;
   13582             : 
   13583             :         /* Result */
   13584           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   13585             : 
   13586           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   13587             :                              "dcerpc_samr_GetBootKeyInformation_out_memory");
   13588           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   13589           0 :                 return tevent_req_post(req, ev);
   13590             :         }
   13591             : 
   13592             :         /* make a temporary copy, that we pass to the dispatch function */
   13593           0 :         state->tmp = state->orig;
   13594             : 
   13595           0 :         subreq = dcerpc_samr_GetBootKeyInformation_r_send(state, ev, h, &state->tmp);
   13596           0 :         if (tevent_req_nomem(subreq, req)) {
   13597           0 :                 return tevent_req_post(req, ev);
   13598             :         }
   13599           0 :         tevent_req_set_callback(subreq, dcerpc_samr_GetBootKeyInformation_done, req);
   13600           0 :         return req;
   13601             : }
   13602             : 
   13603           0 : static void dcerpc_samr_GetBootKeyInformation_done(struct tevent_req *subreq)
   13604             : {
   13605           0 :         struct tevent_req *req = tevent_req_callback_data(
   13606             :                 subreq, struct tevent_req);
   13607           0 :         struct dcerpc_samr_GetBootKeyInformation_state *state = tevent_req_data(
   13608             :                 req, struct dcerpc_samr_GetBootKeyInformation_state);
   13609           0 :         NTSTATUS status;
   13610           0 :         TALLOC_CTX *mem_ctx;
   13611             : 
   13612           0 :         if (state->out_mem_ctx) {
   13613           0 :                 mem_ctx = state->out_mem_ctx;
   13614             :         } else {
   13615           0 :                 mem_ctx = state;
   13616             :         }
   13617             : 
   13618           0 :         status = dcerpc_samr_GetBootKeyInformation_r_recv(subreq, mem_ctx);
   13619           0 :         TALLOC_FREE(subreq);
   13620           0 :         if (tevent_req_nterror(req, status)) {
   13621           0 :                 return;
   13622             :         }
   13623             : 
   13624             :         /* Copy out parameters */
   13625           0 :         *state->orig.out.unknown = *state->tmp.out.unknown;
   13626             : 
   13627             :         /* Copy result */
   13628           0 :         state->orig.out.result = state->tmp.out.result;
   13629             : 
   13630             :         /* Reset temporary structure */
   13631           0 :         NDR_ZERO_STRUCT(state->tmp);
   13632             : 
   13633           0 :         tevent_req_done(req);
   13634             : }
   13635             : 
   13636           0 : NTSTATUS dcerpc_samr_GetBootKeyInformation_recv(struct tevent_req *req,
   13637             :                                                 TALLOC_CTX *mem_ctx,
   13638             :                                                 NTSTATUS *result)
   13639             : {
   13640           0 :         struct dcerpc_samr_GetBootKeyInformation_state *state = tevent_req_data(
   13641             :                 req, struct dcerpc_samr_GetBootKeyInformation_state);
   13642           0 :         NTSTATUS status;
   13643             : 
   13644           0 :         if (tevent_req_is_nterror(req, &status)) {
   13645           0 :                 tevent_req_received(req);
   13646           0 :                 return status;
   13647             :         }
   13648             : 
   13649             :         /* Steal possible out parameters to the callers context */
   13650           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   13651             : 
   13652             :         /* Return result */
   13653           0 :         *result = state->orig.out.result;
   13654             : 
   13655           0 :         tevent_req_received(req);
   13656           0 :         return NT_STATUS_OK;
   13657             : }
   13658             : 
   13659           0 : NTSTATUS dcerpc_samr_GetBootKeyInformation(struct dcerpc_binding_handle *h,
   13660             :                                            TALLOC_CTX *mem_ctx,
   13661             :                                            struct policy_handle *_domain_handle /* [in] [ref] */,
   13662             :                                            uint32_t *_unknown /* [out] [ref] */,
   13663             :                                            NTSTATUS *result)
   13664             : {
   13665           0 :         struct samr_GetBootKeyInformation r;
   13666           0 :         NTSTATUS status;
   13667             : 
   13668             :         /* In parameters */
   13669           0 :         r.in.domain_handle = _domain_handle;
   13670             : 
   13671             :         /* Out parameters */
   13672           0 :         r.out.unknown = _unknown;
   13673             : 
   13674             :         /* Result */
   13675           0 :         NDR_ZERO_STRUCT(r.out.result);
   13676             : 
   13677           0 :         status = dcerpc_samr_GetBootKeyInformation_r(h, mem_ctx, &r);
   13678           0 :         if (!NT_STATUS_IS_OK(status)) {
   13679           0 :                 return status;
   13680             :         }
   13681             : 
   13682             :         /* Return variables */
   13683           0 :         *_unknown = *r.out.unknown;
   13684             : 
   13685             :         /* Return result */
   13686           0 :         *result = r.out.result;
   13687             : 
   13688           0 :         return NT_STATUS_OK;
   13689             : }
   13690             : 
   13691             : struct dcerpc_samr_Connect3_r_state {
   13692             :         TALLOC_CTX *out_mem_ctx;
   13693             : };
   13694             : 
   13695             : static void dcerpc_samr_Connect3_r_done(struct tevent_req *subreq);
   13696             : 
   13697           0 : struct tevent_req *dcerpc_samr_Connect3_r_send(TALLOC_CTX *mem_ctx,
   13698             :         struct tevent_context *ev,
   13699             :         struct dcerpc_binding_handle *h,
   13700             :         struct samr_Connect3 *r)
   13701             : {
   13702           0 :         struct tevent_req *req;
   13703           0 :         struct dcerpc_samr_Connect3_r_state *state;
   13704           0 :         struct tevent_req *subreq;
   13705             : 
   13706           0 :         req = tevent_req_create(mem_ctx, &state,
   13707             :                                 struct dcerpc_samr_Connect3_r_state);
   13708           0 :         if (req == NULL) {
   13709           0 :                 return NULL;
   13710             :         }
   13711             : 
   13712           0 :         state->out_mem_ctx = talloc_new(state);
   13713           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   13714           0 :                 return tevent_req_post(req, ev);
   13715             :         }
   13716             : 
   13717           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   13718             :                         NULL, &ndr_table_samr,
   13719           0 :                         NDR_SAMR_CONNECT3, state->out_mem_ctx, r);
   13720           0 :         if (tevent_req_nomem(subreq, req)) {
   13721           0 :                 return tevent_req_post(req, ev);
   13722             :         }
   13723           0 :         tevent_req_set_callback(subreq, dcerpc_samr_Connect3_r_done, req);
   13724             : 
   13725           0 :         return req;
   13726             : }
   13727             : 
   13728           0 : static void dcerpc_samr_Connect3_r_done(struct tevent_req *subreq)
   13729             : {
   13730           0 :         struct tevent_req *req =
   13731           0 :                 tevent_req_callback_data(subreq,
   13732             :                 struct tevent_req);
   13733           0 :         NTSTATUS status;
   13734             : 
   13735           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   13736           0 :         TALLOC_FREE(subreq);
   13737           0 :         if (tevent_req_nterror(req, status)) {
   13738           0 :                 return;
   13739             :         }
   13740             : 
   13741           0 :         tevent_req_done(req);
   13742             : }
   13743             : 
   13744           0 : NTSTATUS dcerpc_samr_Connect3_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   13745             : {
   13746           0 :         struct dcerpc_samr_Connect3_r_state *state =
   13747           0 :                 tevent_req_data(req,
   13748             :                 struct dcerpc_samr_Connect3_r_state);
   13749           0 :         NTSTATUS status;
   13750             : 
   13751           0 :         if (tevent_req_is_nterror(req, &status)) {
   13752           0 :                 tevent_req_received(req);
   13753           0 :                 return status;
   13754             :         }
   13755             : 
   13756           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   13757             : 
   13758           0 :         tevent_req_received(req);
   13759           0 :         return NT_STATUS_OK;
   13760             : }
   13761             : 
   13762         126 : NTSTATUS dcerpc_samr_Connect3_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_Connect3 *r)
   13763             : {
   13764           0 :         NTSTATUS status;
   13765             : 
   13766         126 :         status = dcerpc_binding_handle_call(h,
   13767             :                         NULL, &ndr_table_samr,
   13768             :                         NDR_SAMR_CONNECT3, mem_ctx, r);
   13769             : 
   13770         126 :         return status;
   13771             : }
   13772             : 
   13773             : struct dcerpc_samr_Connect3_state {
   13774             :         struct samr_Connect3 orig;
   13775             :         struct samr_Connect3 tmp;
   13776             :         TALLOC_CTX *out_mem_ctx;
   13777             : };
   13778             : 
   13779             : static void dcerpc_samr_Connect3_done(struct tevent_req *subreq);
   13780             : 
   13781           0 : struct tevent_req *dcerpc_samr_Connect3_send(TALLOC_CTX *mem_ctx,
   13782             :                                              struct tevent_context *ev,
   13783             :                                              struct dcerpc_binding_handle *h,
   13784             :                                              const char *_system_name /* [in] [charset(UTF16),unique] */,
   13785             :                                              uint32_t _unknown /* [in]  */,
   13786             :                                              uint32_t _access_mask /* [in]  */,
   13787             :                                              struct policy_handle *_connect_handle /* [out] [ref] */)
   13788             : {
   13789           0 :         struct tevent_req *req;
   13790           0 :         struct dcerpc_samr_Connect3_state *state;
   13791           0 :         struct tevent_req *subreq;
   13792             : 
   13793           0 :         req = tevent_req_create(mem_ctx, &state,
   13794             :                                 struct dcerpc_samr_Connect3_state);
   13795           0 :         if (req == NULL) {
   13796           0 :                 return NULL;
   13797             :         }
   13798           0 :         state->out_mem_ctx = NULL;
   13799             : 
   13800             :         /* In parameters */
   13801           0 :         state->orig.in.system_name = _system_name;
   13802           0 :         state->orig.in.unknown = _unknown;
   13803           0 :         state->orig.in.access_mask = _access_mask;
   13804             : 
   13805             :         /* Out parameters */
   13806           0 :         state->orig.out.connect_handle = _connect_handle;
   13807             : 
   13808             :         /* Result */
   13809           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   13810             : 
   13811           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   13812             :                              "dcerpc_samr_Connect3_out_memory");
   13813           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   13814           0 :                 return tevent_req_post(req, ev);
   13815             :         }
   13816             : 
   13817             :         /* make a temporary copy, that we pass to the dispatch function */
   13818           0 :         state->tmp = state->orig;
   13819             : 
   13820           0 :         subreq = dcerpc_samr_Connect3_r_send(state, ev, h, &state->tmp);
   13821           0 :         if (tevent_req_nomem(subreq, req)) {
   13822           0 :                 return tevent_req_post(req, ev);
   13823             :         }
   13824           0 :         tevent_req_set_callback(subreq, dcerpc_samr_Connect3_done, req);
   13825           0 :         return req;
   13826             : }
   13827             : 
   13828           0 : static void dcerpc_samr_Connect3_done(struct tevent_req *subreq)
   13829             : {
   13830           0 :         struct tevent_req *req = tevent_req_callback_data(
   13831             :                 subreq, struct tevent_req);
   13832           0 :         struct dcerpc_samr_Connect3_state *state = tevent_req_data(
   13833             :                 req, struct dcerpc_samr_Connect3_state);
   13834           0 :         NTSTATUS status;
   13835           0 :         TALLOC_CTX *mem_ctx;
   13836             : 
   13837           0 :         if (state->out_mem_ctx) {
   13838           0 :                 mem_ctx = state->out_mem_ctx;
   13839             :         } else {
   13840           0 :                 mem_ctx = state;
   13841             :         }
   13842             : 
   13843           0 :         status = dcerpc_samr_Connect3_r_recv(subreq, mem_ctx);
   13844           0 :         TALLOC_FREE(subreq);
   13845           0 :         if (tevent_req_nterror(req, status)) {
   13846           0 :                 return;
   13847             :         }
   13848             : 
   13849             :         /* Copy out parameters */
   13850           0 :         *state->orig.out.connect_handle = *state->tmp.out.connect_handle;
   13851             : 
   13852             :         /* Copy result */
   13853           0 :         state->orig.out.result = state->tmp.out.result;
   13854             : 
   13855             :         /* Reset temporary structure */
   13856           0 :         NDR_ZERO_STRUCT(state->tmp);
   13857             : 
   13858           0 :         tevent_req_done(req);
   13859             : }
   13860             : 
   13861           0 : NTSTATUS dcerpc_samr_Connect3_recv(struct tevent_req *req,
   13862             :                                    TALLOC_CTX *mem_ctx,
   13863             :                                    NTSTATUS *result)
   13864             : {
   13865           0 :         struct dcerpc_samr_Connect3_state *state = tevent_req_data(
   13866             :                 req, struct dcerpc_samr_Connect3_state);
   13867           0 :         NTSTATUS status;
   13868             : 
   13869           0 :         if (tevent_req_is_nterror(req, &status)) {
   13870           0 :                 tevent_req_received(req);
   13871           0 :                 return status;
   13872             :         }
   13873             : 
   13874             :         /* Steal possible out parameters to the callers context */
   13875           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   13876             : 
   13877             :         /* Return result */
   13878           0 :         *result = state->orig.out.result;
   13879             : 
   13880           0 :         tevent_req_received(req);
   13881           0 :         return NT_STATUS_OK;
   13882             : }
   13883             : 
   13884           0 : NTSTATUS dcerpc_samr_Connect3(struct dcerpc_binding_handle *h,
   13885             :                               TALLOC_CTX *mem_ctx,
   13886             :                               const char *_system_name /* [in] [charset(UTF16),unique] */,
   13887             :                               uint32_t _unknown /* [in]  */,
   13888             :                               uint32_t _access_mask /* [in]  */,
   13889             :                               struct policy_handle *_connect_handle /* [out] [ref] */,
   13890             :                               NTSTATUS *result)
   13891             : {
   13892           0 :         struct samr_Connect3 r;
   13893           0 :         NTSTATUS status;
   13894             : 
   13895             :         /* In parameters */
   13896           0 :         r.in.system_name = _system_name;
   13897           0 :         r.in.unknown = _unknown;
   13898           0 :         r.in.access_mask = _access_mask;
   13899             : 
   13900             :         /* Out parameters */
   13901           0 :         r.out.connect_handle = _connect_handle;
   13902             : 
   13903             :         /* Result */
   13904           0 :         NDR_ZERO_STRUCT(r.out.result);
   13905             : 
   13906           0 :         status = dcerpc_samr_Connect3_r(h, mem_ctx, &r);
   13907           0 :         if (!NT_STATUS_IS_OK(status)) {
   13908           0 :                 return status;
   13909             :         }
   13910             : 
   13911             :         /* Return variables */
   13912           0 :         *_connect_handle = *r.out.connect_handle;
   13913             : 
   13914             :         /* Return result */
   13915           0 :         *result = r.out.result;
   13916             : 
   13917           0 :         return NT_STATUS_OK;
   13918             : }
   13919             : 
   13920             : struct dcerpc_samr_Connect4_r_state {
   13921             :         TALLOC_CTX *out_mem_ctx;
   13922             : };
   13923             : 
   13924             : static void dcerpc_samr_Connect4_r_done(struct tevent_req *subreq);
   13925             : 
   13926           0 : struct tevent_req *dcerpc_samr_Connect4_r_send(TALLOC_CTX *mem_ctx,
   13927             :         struct tevent_context *ev,
   13928             :         struct dcerpc_binding_handle *h,
   13929             :         struct samr_Connect4 *r)
   13930             : {
   13931           0 :         struct tevent_req *req;
   13932           0 :         struct dcerpc_samr_Connect4_r_state *state;
   13933           0 :         struct tevent_req *subreq;
   13934             : 
   13935           0 :         req = tevent_req_create(mem_ctx, &state,
   13936             :                                 struct dcerpc_samr_Connect4_r_state);
   13937           0 :         if (req == NULL) {
   13938           0 :                 return NULL;
   13939             :         }
   13940             : 
   13941           0 :         state->out_mem_ctx = talloc_new(state);
   13942           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   13943           0 :                 return tevent_req_post(req, ev);
   13944             :         }
   13945             : 
   13946           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   13947             :                         NULL, &ndr_table_samr,
   13948           0 :                         NDR_SAMR_CONNECT4, state->out_mem_ctx, r);
   13949           0 :         if (tevent_req_nomem(subreq, req)) {
   13950           0 :                 return tevent_req_post(req, ev);
   13951             :         }
   13952           0 :         tevent_req_set_callback(subreq, dcerpc_samr_Connect4_r_done, req);
   13953             : 
   13954           0 :         return req;
   13955             : }
   13956             : 
   13957           0 : static void dcerpc_samr_Connect4_r_done(struct tevent_req *subreq)
   13958             : {
   13959           0 :         struct tevent_req *req =
   13960           0 :                 tevent_req_callback_data(subreq,
   13961             :                 struct tevent_req);
   13962           0 :         NTSTATUS status;
   13963             : 
   13964           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   13965           0 :         TALLOC_FREE(subreq);
   13966           0 :         if (tevent_req_nterror(req, status)) {
   13967           0 :                 return;
   13968             :         }
   13969             : 
   13970           0 :         tevent_req_done(req);
   13971             : }
   13972             : 
   13973           0 : NTSTATUS dcerpc_samr_Connect4_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   13974             : {
   13975           0 :         struct dcerpc_samr_Connect4_r_state *state =
   13976           0 :                 tevent_req_data(req,
   13977             :                 struct dcerpc_samr_Connect4_r_state);
   13978           0 :         NTSTATUS status;
   13979             : 
   13980           0 :         if (tevent_req_is_nterror(req, &status)) {
   13981           0 :                 tevent_req_received(req);
   13982           0 :                 return status;
   13983             :         }
   13984             : 
   13985           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   13986             : 
   13987           0 :         tevent_req_received(req);
   13988           0 :         return NT_STATUS_OK;
   13989             : }
   13990             : 
   13991         126 : NTSTATUS dcerpc_samr_Connect4_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_Connect4 *r)
   13992             : {
   13993           0 :         NTSTATUS status;
   13994             : 
   13995         126 :         status = dcerpc_binding_handle_call(h,
   13996             :                         NULL, &ndr_table_samr,
   13997             :                         NDR_SAMR_CONNECT4, mem_ctx, r);
   13998             : 
   13999         126 :         return status;
   14000             : }
   14001             : 
   14002             : struct dcerpc_samr_Connect4_state {
   14003             :         struct samr_Connect4 orig;
   14004             :         struct samr_Connect4 tmp;
   14005             :         TALLOC_CTX *out_mem_ctx;
   14006             : };
   14007             : 
   14008             : static void dcerpc_samr_Connect4_done(struct tevent_req *subreq);
   14009             : 
   14010           0 : struct tevent_req *dcerpc_samr_Connect4_send(TALLOC_CTX *mem_ctx,
   14011             :                                              struct tevent_context *ev,
   14012             :                                              struct dcerpc_binding_handle *h,
   14013             :                                              const char *_system_name /* [in] [charset(UTF16),unique] */,
   14014             :                                              enum samr_ConnectVersion _client_version /* [in]  */,
   14015             :                                              uint32_t _access_mask /* [in]  */,
   14016             :                                              struct policy_handle *_connect_handle /* [out] [ref] */)
   14017             : {
   14018           0 :         struct tevent_req *req;
   14019           0 :         struct dcerpc_samr_Connect4_state *state;
   14020           0 :         struct tevent_req *subreq;
   14021             : 
   14022           0 :         req = tevent_req_create(mem_ctx, &state,
   14023             :                                 struct dcerpc_samr_Connect4_state);
   14024           0 :         if (req == NULL) {
   14025           0 :                 return NULL;
   14026             :         }
   14027           0 :         state->out_mem_ctx = NULL;
   14028             : 
   14029             :         /* In parameters */
   14030           0 :         state->orig.in.system_name = _system_name;
   14031           0 :         state->orig.in.client_version = _client_version;
   14032           0 :         state->orig.in.access_mask = _access_mask;
   14033             : 
   14034             :         /* Out parameters */
   14035           0 :         state->orig.out.connect_handle = _connect_handle;
   14036             : 
   14037             :         /* Result */
   14038           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   14039             : 
   14040           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   14041             :                              "dcerpc_samr_Connect4_out_memory");
   14042           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   14043           0 :                 return tevent_req_post(req, ev);
   14044             :         }
   14045             : 
   14046             :         /* make a temporary copy, that we pass to the dispatch function */
   14047           0 :         state->tmp = state->orig;
   14048             : 
   14049           0 :         subreq = dcerpc_samr_Connect4_r_send(state, ev, h, &state->tmp);
   14050           0 :         if (tevent_req_nomem(subreq, req)) {
   14051           0 :                 return tevent_req_post(req, ev);
   14052             :         }
   14053           0 :         tevent_req_set_callback(subreq, dcerpc_samr_Connect4_done, req);
   14054           0 :         return req;
   14055             : }
   14056             : 
   14057           0 : static void dcerpc_samr_Connect4_done(struct tevent_req *subreq)
   14058             : {
   14059           0 :         struct tevent_req *req = tevent_req_callback_data(
   14060             :                 subreq, struct tevent_req);
   14061           0 :         struct dcerpc_samr_Connect4_state *state = tevent_req_data(
   14062             :                 req, struct dcerpc_samr_Connect4_state);
   14063           0 :         NTSTATUS status;
   14064           0 :         TALLOC_CTX *mem_ctx;
   14065             : 
   14066           0 :         if (state->out_mem_ctx) {
   14067           0 :                 mem_ctx = state->out_mem_ctx;
   14068             :         } else {
   14069           0 :                 mem_ctx = state;
   14070             :         }
   14071             : 
   14072           0 :         status = dcerpc_samr_Connect4_r_recv(subreq, mem_ctx);
   14073           0 :         TALLOC_FREE(subreq);
   14074           0 :         if (tevent_req_nterror(req, status)) {
   14075           0 :                 return;
   14076             :         }
   14077             : 
   14078             :         /* Copy out parameters */
   14079           0 :         *state->orig.out.connect_handle = *state->tmp.out.connect_handle;
   14080             : 
   14081             :         /* Copy result */
   14082           0 :         state->orig.out.result = state->tmp.out.result;
   14083             : 
   14084             :         /* Reset temporary structure */
   14085           0 :         NDR_ZERO_STRUCT(state->tmp);
   14086             : 
   14087           0 :         tevent_req_done(req);
   14088             : }
   14089             : 
   14090           0 : NTSTATUS dcerpc_samr_Connect4_recv(struct tevent_req *req,
   14091             :                                    TALLOC_CTX *mem_ctx,
   14092             :                                    NTSTATUS *result)
   14093             : {
   14094           0 :         struct dcerpc_samr_Connect4_state *state = tevent_req_data(
   14095             :                 req, struct dcerpc_samr_Connect4_state);
   14096           0 :         NTSTATUS status;
   14097             : 
   14098           0 :         if (tevent_req_is_nterror(req, &status)) {
   14099           0 :                 tevent_req_received(req);
   14100           0 :                 return status;
   14101             :         }
   14102             : 
   14103             :         /* Steal possible out parameters to the callers context */
   14104           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   14105             : 
   14106             :         /* Return result */
   14107           0 :         *result = state->orig.out.result;
   14108             : 
   14109           0 :         tevent_req_received(req);
   14110           0 :         return NT_STATUS_OK;
   14111             : }
   14112             : 
   14113           0 : NTSTATUS dcerpc_samr_Connect4(struct dcerpc_binding_handle *h,
   14114             :                               TALLOC_CTX *mem_ctx,
   14115             :                               const char *_system_name /* [in] [charset(UTF16),unique] */,
   14116             :                               enum samr_ConnectVersion _client_version /* [in]  */,
   14117             :                               uint32_t _access_mask /* [in]  */,
   14118             :                               struct policy_handle *_connect_handle /* [out] [ref] */,
   14119             :                               NTSTATUS *result)
   14120             : {
   14121           0 :         struct samr_Connect4 r;
   14122           0 :         NTSTATUS status;
   14123             : 
   14124             :         /* In parameters */
   14125           0 :         r.in.system_name = _system_name;
   14126           0 :         r.in.client_version = _client_version;
   14127           0 :         r.in.access_mask = _access_mask;
   14128             : 
   14129             :         /* Out parameters */
   14130           0 :         r.out.connect_handle = _connect_handle;
   14131             : 
   14132             :         /* Result */
   14133           0 :         NDR_ZERO_STRUCT(r.out.result);
   14134             : 
   14135           0 :         status = dcerpc_samr_Connect4_r(h, mem_ctx, &r);
   14136           0 :         if (!NT_STATUS_IS_OK(status)) {
   14137           0 :                 return status;
   14138             :         }
   14139             : 
   14140             :         /* Return variables */
   14141           0 :         *_connect_handle = *r.out.connect_handle;
   14142             : 
   14143             :         /* Return result */
   14144           0 :         *result = r.out.result;
   14145             : 
   14146           0 :         return NT_STATUS_OK;
   14147             : }
   14148             : 
   14149             : struct dcerpc_samr_ChangePasswordUser3_r_state {
   14150             :         TALLOC_CTX *out_mem_ctx;
   14151             : };
   14152             : 
   14153             : static void dcerpc_samr_ChangePasswordUser3_r_done(struct tevent_req *subreq);
   14154             : 
   14155           0 : struct tevent_req *dcerpc_samr_ChangePasswordUser3_r_send(TALLOC_CTX *mem_ctx,
   14156             :         struct tevent_context *ev,
   14157             :         struct dcerpc_binding_handle *h,
   14158             :         struct samr_ChangePasswordUser3 *r)
   14159             : {
   14160           0 :         struct tevent_req *req;
   14161           0 :         struct dcerpc_samr_ChangePasswordUser3_r_state *state;
   14162           0 :         struct tevent_req *subreq;
   14163             : 
   14164           0 :         req = tevent_req_create(mem_ctx, &state,
   14165             :                                 struct dcerpc_samr_ChangePasswordUser3_r_state);
   14166           0 :         if (req == NULL) {
   14167           0 :                 return NULL;
   14168             :         }
   14169             : 
   14170           0 :         state->out_mem_ctx = talloc_new(state);
   14171           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   14172           0 :                 return tevent_req_post(req, ev);
   14173             :         }
   14174             : 
   14175           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   14176             :                         NULL, &ndr_table_samr,
   14177           0 :                         NDR_SAMR_CHANGEPASSWORDUSER3, state->out_mem_ctx, r);
   14178           0 :         if (tevent_req_nomem(subreq, req)) {
   14179           0 :                 return tevent_req_post(req, ev);
   14180             :         }
   14181           0 :         tevent_req_set_callback(subreq, dcerpc_samr_ChangePasswordUser3_r_done, req);
   14182             : 
   14183           0 :         return req;
   14184             : }
   14185             : 
   14186           0 : static void dcerpc_samr_ChangePasswordUser3_r_done(struct tevent_req *subreq)
   14187             : {
   14188           0 :         struct tevent_req *req =
   14189           0 :                 tevent_req_callback_data(subreq,
   14190             :                 struct tevent_req);
   14191           0 :         NTSTATUS status;
   14192             : 
   14193           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   14194           0 :         TALLOC_FREE(subreq);
   14195           0 :         if (tevent_req_nterror(req, status)) {
   14196           0 :                 return;
   14197             :         }
   14198             : 
   14199           0 :         tevent_req_done(req);
   14200             : }
   14201             : 
   14202           0 : NTSTATUS dcerpc_samr_ChangePasswordUser3_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   14203             : {
   14204           0 :         struct dcerpc_samr_ChangePasswordUser3_r_state *state =
   14205           0 :                 tevent_req_data(req,
   14206             :                 struct dcerpc_samr_ChangePasswordUser3_r_state);
   14207           0 :         NTSTATUS status;
   14208             : 
   14209           0 :         if (tevent_req_is_nterror(req, &status)) {
   14210           0 :                 tevent_req_received(req);
   14211           0 :                 return status;
   14212             :         }
   14213             : 
   14214           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   14215             : 
   14216           0 :         tevent_req_received(req);
   14217           0 :         return NT_STATUS_OK;
   14218             : }
   14219             : 
   14220        1436 : NTSTATUS dcerpc_samr_ChangePasswordUser3_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_ChangePasswordUser3 *r)
   14221             : {
   14222           0 :         NTSTATUS status;
   14223             : 
   14224        1436 :         status = dcerpc_binding_handle_call(h,
   14225             :                         NULL, &ndr_table_samr,
   14226             :                         NDR_SAMR_CHANGEPASSWORDUSER3, mem_ctx, r);
   14227             : 
   14228        1436 :         return status;
   14229             : }
   14230             : 
   14231             : struct dcerpc_samr_ChangePasswordUser3_state {
   14232             :         struct samr_ChangePasswordUser3 orig;
   14233             :         struct samr_ChangePasswordUser3 tmp;
   14234             :         TALLOC_CTX *out_mem_ctx;
   14235             : };
   14236             : 
   14237             : static void dcerpc_samr_ChangePasswordUser3_done(struct tevent_req *subreq);
   14238             : 
   14239           0 : struct tevent_req *dcerpc_samr_ChangePasswordUser3_send(TALLOC_CTX *mem_ctx,
   14240             :                                                         struct tevent_context *ev,
   14241             :                                                         struct dcerpc_binding_handle *h,
   14242             :                                                         struct lsa_String *_server /* [in] [unique] */,
   14243             :                                                         struct lsa_String *_account /* [in] [ref] */,
   14244             :                                                         struct samr_CryptPassword *_nt_password /* [in] [unique] */,
   14245             :                                                         struct samr_Password *_nt_verifier /* [in] [unique] */,
   14246             :                                                         uint8_t _lm_change /* [in]  */,
   14247             :                                                         struct samr_CryptPassword *_lm_password /* [in] [unique] */,
   14248             :                                                         struct samr_Password *_lm_verifier /* [in] [unique] */,
   14249             :                                                         struct samr_CryptPassword *_password3 /* [in] [unique] */,
   14250             :                                                         struct samr_DomInfo1 **_dominfo /* [out] [ref] */,
   14251             :                                                         struct userPwdChangeFailureInformation **_reject /* [out] [ref] */)
   14252             : {
   14253           0 :         struct tevent_req *req;
   14254           0 :         struct dcerpc_samr_ChangePasswordUser3_state *state;
   14255           0 :         struct tevent_req *subreq;
   14256             : 
   14257           0 :         req = tevent_req_create(mem_ctx, &state,
   14258             :                                 struct dcerpc_samr_ChangePasswordUser3_state);
   14259           0 :         if (req == NULL) {
   14260           0 :                 return NULL;
   14261             :         }
   14262           0 :         state->out_mem_ctx = NULL;
   14263             : 
   14264             :         /* In parameters */
   14265           0 :         state->orig.in.server = _server;
   14266           0 :         state->orig.in.account = _account;
   14267           0 :         state->orig.in.nt_password = _nt_password;
   14268           0 :         state->orig.in.nt_verifier = _nt_verifier;
   14269           0 :         state->orig.in.lm_change = _lm_change;
   14270           0 :         state->orig.in.lm_password = _lm_password;
   14271           0 :         state->orig.in.lm_verifier = _lm_verifier;
   14272           0 :         state->orig.in.password3 = _password3;
   14273             : 
   14274             :         /* Out parameters */
   14275           0 :         state->orig.out.dominfo = _dominfo;
   14276           0 :         state->orig.out.reject = _reject;
   14277             : 
   14278             :         /* Result */
   14279           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   14280             : 
   14281           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   14282             :                              "dcerpc_samr_ChangePasswordUser3_out_memory");
   14283           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   14284           0 :                 return tevent_req_post(req, ev);
   14285             :         }
   14286             : 
   14287             :         /* make a temporary copy, that we pass to the dispatch function */
   14288           0 :         state->tmp = state->orig;
   14289             : 
   14290           0 :         subreq = dcerpc_samr_ChangePasswordUser3_r_send(state, ev, h, &state->tmp);
   14291           0 :         if (tevent_req_nomem(subreq, req)) {
   14292           0 :                 return tevent_req_post(req, ev);
   14293             :         }
   14294           0 :         tevent_req_set_callback(subreq, dcerpc_samr_ChangePasswordUser3_done, req);
   14295           0 :         return req;
   14296             : }
   14297             : 
   14298           0 : static void dcerpc_samr_ChangePasswordUser3_done(struct tevent_req *subreq)
   14299             : {
   14300           0 :         struct tevent_req *req = tevent_req_callback_data(
   14301             :                 subreq, struct tevent_req);
   14302           0 :         struct dcerpc_samr_ChangePasswordUser3_state *state = tevent_req_data(
   14303             :                 req, struct dcerpc_samr_ChangePasswordUser3_state);
   14304           0 :         NTSTATUS status;
   14305           0 :         TALLOC_CTX *mem_ctx;
   14306             : 
   14307           0 :         if (state->out_mem_ctx) {
   14308           0 :                 mem_ctx = state->out_mem_ctx;
   14309             :         } else {
   14310           0 :                 mem_ctx = state;
   14311             :         }
   14312             : 
   14313           0 :         status = dcerpc_samr_ChangePasswordUser3_r_recv(subreq, mem_ctx);
   14314           0 :         TALLOC_FREE(subreq);
   14315           0 :         if (tevent_req_nterror(req, status)) {
   14316           0 :                 return;
   14317             :         }
   14318             : 
   14319             :         /* Copy out parameters */
   14320           0 :         *state->orig.out.dominfo = *state->tmp.out.dominfo;
   14321           0 :         *state->orig.out.reject = *state->tmp.out.reject;
   14322             : 
   14323             :         /* Copy result */
   14324           0 :         state->orig.out.result = state->tmp.out.result;
   14325             : 
   14326             :         /* Reset temporary structure */
   14327           0 :         NDR_ZERO_STRUCT(state->tmp);
   14328             : 
   14329           0 :         tevent_req_done(req);
   14330             : }
   14331             : 
   14332           0 : NTSTATUS dcerpc_samr_ChangePasswordUser3_recv(struct tevent_req *req,
   14333             :                                               TALLOC_CTX *mem_ctx,
   14334             :                                               NTSTATUS *result)
   14335             : {
   14336           0 :         struct dcerpc_samr_ChangePasswordUser3_state *state = tevent_req_data(
   14337             :                 req, struct dcerpc_samr_ChangePasswordUser3_state);
   14338           0 :         NTSTATUS status;
   14339             : 
   14340           0 :         if (tevent_req_is_nterror(req, &status)) {
   14341           0 :                 tevent_req_received(req);
   14342           0 :                 return status;
   14343             :         }
   14344             : 
   14345             :         /* Steal possible out parameters to the callers context */
   14346           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   14347             : 
   14348             :         /* Return result */
   14349           0 :         *result = state->orig.out.result;
   14350             : 
   14351           0 :         tevent_req_received(req);
   14352           0 :         return NT_STATUS_OK;
   14353             : }
   14354             : 
   14355           0 : NTSTATUS dcerpc_samr_ChangePasswordUser3(struct dcerpc_binding_handle *h,
   14356             :                                          TALLOC_CTX *mem_ctx,
   14357             :                                          struct lsa_String *_server /* [in] [unique] */,
   14358             :                                          struct lsa_String *_account /* [in] [ref] */,
   14359             :                                          struct samr_CryptPassword *_nt_password /* [in] [unique] */,
   14360             :                                          struct samr_Password *_nt_verifier /* [in] [unique] */,
   14361             :                                          uint8_t _lm_change /* [in]  */,
   14362             :                                          struct samr_CryptPassword *_lm_password /* [in] [unique] */,
   14363             :                                          struct samr_Password *_lm_verifier /* [in] [unique] */,
   14364             :                                          struct samr_CryptPassword *_password3 /* [in] [unique] */,
   14365             :                                          struct samr_DomInfo1 **_dominfo /* [out] [ref] */,
   14366             :                                          struct userPwdChangeFailureInformation **_reject /* [out] [ref] */,
   14367             :                                          NTSTATUS *result)
   14368             : {
   14369           0 :         struct samr_ChangePasswordUser3 r;
   14370           0 :         NTSTATUS status;
   14371             : 
   14372             :         /* In parameters */
   14373           0 :         r.in.server = _server;
   14374           0 :         r.in.account = _account;
   14375           0 :         r.in.nt_password = _nt_password;
   14376           0 :         r.in.nt_verifier = _nt_verifier;
   14377           0 :         r.in.lm_change = _lm_change;
   14378           0 :         r.in.lm_password = _lm_password;
   14379           0 :         r.in.lm_verifier = _lm_verifier;
   14380           0 :         r.in.password3 = _password3;
   14381             : 
   14382             :         /* Out parameters */
   14383           0 :         r.out.dominfo = _dominfo;
   14384           0 :         r.out.reject = _reject;
   14385             : 
   14386             :         /* Result */
   14387           0 :         NDR_ZERO_STRUCT(r.out.result);
   14388             : 
   14389           0 :         status = dcerpc_samr_ChangePasswordUser3_r(h, mem_ctx, &r);
   14390           0 :         if (!NT_STATUS_IS_OK(status)) {
   14391           0 :                 return status;
   14392             :         }
   14393             : 
   14394             :         /* Return variables */
   14395           0 :         *_dominfo = *r.out.dominfo;
   14396           0 :         *_reject = *r.out.reject;
   14397             : 
   14398             :         /* Return result */
   14399           0 :         *result = r.out.result;
   14400             : 
   14401           0 :         return NT_STATUS_OK;
   14402             : }
   14403             : 
   14404             : struct dcerpc_samr_Connect5_r_state {
   14405             :         TALLOC_CTX *out_mem_ctx;
   14406             : };
   14407             : 
   14408             : static void dcerpc_samr_Connect5_r_done(struct tevent_req *subreq);
   14409             : 
   14410           0 : struct tevent_req *dcerpc_samr_Connect5_r_send(TALLOC_CTX *mem_ctx,
   14411             :         struct tevent_context *ev,
   14412             :         struct dcerpc_binding_handle *h,
   14413             :         struct samr_Connect5 *r)
   14414             : {
   14415           0 :         struct tevent_req *req;
   14416           0 :         struct dcerpc_samr_Connect5_r_state *state;
   14417           0 :         struct tevent_req *subreq;
   14418             : 
   14419           0 :         req = tevent_req_create(mem_ctx, &state,
   14420             :                                 struct dcerpc_samr_Connect5_r_state);
   14421           0 :         if (req == NULL) {
   14422           0 :                 return NULL;
   14423             :         }
   14424             : 
   14425           0 :         state->out_mem_ctx = talloc_new(state);
   14426           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   14427           0 :                 return tevent_req_post(req, ev);
   14428             :         }
   14429             : 
   14430           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   14431             :                         NULL, &ndr_table_samr,
   14432           0 :                         NDR_SAMR_CONNECT5, state->out_mem_ctx, r);
   14433           0 :         if (tevent_req_nomem(subreq, req)) {
   14434           0 :                 return tevent_req_post(req, ev);
   14435             :         }
   14436           0 :         tevent_req_set_callback(subreq, dcerpc_samr_Connect5_r_done, req);
   14437             : 
   14438           0 :         return req;
   14439             : }
   14440             : 
   14441           0 : static void dcerpc_samr_Connect5_r_done(struct tevent_req *subreq)
   14442             : {
   14443           0 :         struct tevent_req *req =
   14444           0 :                 tevent_req_callback_data(subreq,
   14445             :                 struct tevent_req);
   14446           0 :         NTSTATUS status;
   14447             : 
   14448           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   14449           0 :         TALLOC_FREE(subreq);
   14450           0 :         if (tevent_req_nterror(req, status)) {
   14451           0 :                 return;
   14452             :         }
   14453             : 
   14454           0 :         tevent_req_done(req);
   14455             : }
   14456             : 
   14457           0 : NTSTATUS dcerpc_samr_Connect5_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   14458             : {
   14459           0 :         struct dcerpc_samr_Connect5_r_state *state =
   14460           0 :                 tevent_req_data(req,
   14461             :                 struct dcerpc_samr_Connect5_r_state);
   14462           0 :         NTSTATUS status;
   14463             : 
   14464           0 :         if (tevent_req_is_nterror(req, &status)) {
   14465           0 :                 tevent_req_received(req);
   14466           0 :                 return status;
   14467             :         }
   14468             : 
   14469           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   14470             : 
   14471           0 :         tevent_req_received(req);
   14472           0 :         return NT_STATUS_OK;
   14473             : }
   14474             : 
   14475         224 : NTSTATUS dcerpc_samr_Connect5_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_Connect5 *r)
   14476             : {
   14477           0 :         NTSTATUS status;
   14478             : 
   14479         224 :         status = dcerpc_binding_handle_call(h,
   14480             :                         NULL, &ndr_table_samr,
   14481             :                         NDR_SAMR_CONNECT5, mem_ctx, r);
   14482             : 
   14483         224 :         return status;
   14484             : }
   14485             : 
   14486             : struct dcerpc_samr_Connect5_state {
   14487             :         struct samr_Connect5 orig;
   14488             :         struct samr_Connect5 tmp;
   14489             :         TALLOC_CTX *out_mem_ctx;
   14490             : };
   14491             : 
   14492             : static void dcerpc_samr_Connect5_done(struct tevent_req *subreq);
   14493             : 
   14494           0 : struct tevent_req *dcerpc_samr_Connect5_send(TALLOC_CTX *mem_ctx,
   14495             :                                              struct tevent_context *ev,
   14496             :                                              struct dcerpc_binding_handle *h,
   14497             :                                              const char *_system_name /* [in] [charset(UTF16),unique] */,
   14498             :                                              uint32_t _access_mask /* [in]  */,
   14499             :                                              uint32_t _level_in /* [in]  */,
   14500             :                                              union samr_ConnectInfo *_info_in /* [in] [ref,switch_is(level_in)] */,
   14501             :                                              uint32_t *_level_out /* [out] [ref] */,
   14502             :                                              union samr_ConnectInfo *_info_out /* [out] [ref,switch_is(*level_out)] */,
   14503             :                                              struct policy_handle *_connect_handle /* [out] [ref] */)
   14504             : {
   14505           0 :         struct tevent_req *req;
   14506           0 :         struct dcerpc_samr_Connect5_state *state;
   14507           0 :         struct tevent_req *subreq;
   14508             : 
   14509           0 :         req = tevent_req_create(mem_ctx, &state,
   14510             :                                 struct dcerpc_samr_Connect5_state);
   14511           0 :         if (req == NULL) {
   14512           0 :                 return NULL;
   14513             :         }
   14514           0 :         state->out_mem_ctx = NULL;
   14515             : 
   14516             :         /* In parameters */
   14517           0 :         state->orig.in.system_name = _system_name;
   14518           0 :         state->orig.in.access_mask = _access_mask;
   14519           0 :         state->orig.in.level_in = _level_in;
   14520           0 :         state->orig.in.info_in = _info_in;
   14521             : 
   14522             :         /* Out parameters */
   14523           0 :         state->orig.out.level_out = _level_out;
   14524           0 :         state->orig.out.info_out = _info_out;
   14525           0 :         state->orig.out.connect_handle = _connect_handle;
   14526             : 
   14527             :         /* Result */
   14528           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   14529             : 
   14530           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   14531             :                              "dcerpc_samr_Connect5_out_memory");
   14532           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   14533           0 :                 return tevent_req_post(req, ev);
   14534             :         }
   14535             : 
   14536             :         /* make a temporary copy, that we pass to the dispatch function */
   14537           0 :         state->tmp = state->orig;
   14538             : 
   14539           0 :         subreq = dcerpc_samr_Connect5_r_send(state, ev, h, &state->tmp);
   14540           0 :         if (tevent_req_nomem(subreq, req)) {
   14541           0 :                 return tevent_req_post(req, ev);
   14542             :         }
   14543           0 :         tevent_req_set_callback(subreq, dcerpc_samr_Connect5_done, req);
   14544           0 :         return req;
   14545             : }
   14546             : 
   14547           0 : static void dcerpc_samr_Connect5_done(struct tevent_req *subreq)
   14548             : {
   14549           0 :         struct tevent_req *req = tevent_req_callback_data(
   14550             :                 subreq, struct tevent_req);
   14551           0 :         struct dcerpc_samr_Connect5_state *state = tevent_req_data(
   14552             :                 req, struct dcerpc_samr_Connect5_state);
   14553           0 :         NTSTATUS status;
   14554           0 :         TALLOC_CTX *mem_ctx;
   14555             : 
   14556           0 :         if (state->out_mem_ctx) {
   14557           0 :                 mem_ctx = state->out_mem_ctx;
   14558             :         } else {
   14559           0 :                 mem_ctx = state;
   14560             :         }
   14561             : 
   14562           0 :         status = dcerpc_samr_Connect5_r_recv(subreq, mem_ctx);
   14563           0 :         TALLOC_FREE(subreq);
   14564           0 :         if (tevent_req_nterror(req, status)) {
   14565           0 :                 return;
   14566             :         }
   14567             : 
   14568             :         /* Copy out parameters */
   14569           0 :         *state->orig.out.level_out = *state->tmp.out.level_out;
   14570           0 :         *state->orig.out.info_out = *state->tmp.out.info_out;
   14571           0 :         *state->orig.out.connect_handle = *state->tmp.out.connect_handle;
   14572             : 
   14573             :         /* Copy result */
   14574           0 :         state->orig.out.result = state->tmp.out.result;
   14575             : 
   14576             :         /* Reset temporary structure */
   14577           0 :         NDR_ZERO_STRUCT(state->tmp);
   14578             : 
   14579           0 :         tevent_req_done(req);
   14580             : }
   14581             : 
   14582           0 : NTSTATUS dcerpc_samr_Connect5_recv(struct tevent_req *req,
   14583             :                                    TALLOC_CTX *mem_ctx,
   14584             :                                    NTSTATUS *result)
   14585             : {
   14586           0 :         struct dcerpc_samr_Connect5_state *state = tevent_req_data(
   14587             :                 req, struct dcerpc_samr_Connect5_state);
   14588           0 :         NTSTATUS status;
   14589             : 
   14590           0 :         if (tevent_req_is_nterror(req, &status)) {
   14591           0 :                 tevent_req_received(req);
   14592           0 :                 return status;
   14593             :         }
   14594             : 
   14595             :         /* Steal possible out parameters to the callers context */
   14596           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   14597             : 
   14598             :         /* Return result */
   14599           0 :         *result = state->orig.out.result;
   14600             : 
   14601           0 :         tevent_req_received(req);
   14602           0 :         return NT_STATUS_OK;
   14603             : }
   14604             : 
   14605          82 : NTSTATUS dcerpc_samr_Connect5(struct dcerpc_binding_handle *h,
   14606             :                               TALLOC_CTX *mem_ctx,
   14607             :                               const char *_system_name /* [in] [charset(UTF16),unique] */,
   14608             :                               uint32_t _access_mask /* [in]  */,
   14609             :                               uint32_t _level_in /* [in]  */,
   14610             :                               union samr_ConnectInfo *_info_in /* [in] [ref,switch_is(level_in)] */,
   14611             :                               uint32_t *_level_out /* [out] [ref] */,
   14612             :                               union samr_ConnectInfo *_info_out /* [out] [ref,switch_is(*level_out)] */,
   14613             :                               struct policy_handle *_connect_handle /* [out] [ref] */,
   14614             :                               NTSTATUS *result)
   14615             : {
   14616           0 :         struct samr_Connect5 r;
   14617           0 :         NTSTATUS status;
   14618             : 
   14619             :         /* In parameters */
   14620          82 :         r.in.system_name = _system_name;
   14621          82 :         r.in.access_mask = _access_mask;
   14622          82 :         r.in.level_in = _level_in;
   14623          82 :         r.in.info_in = _info_in;
   14624             : 
   14625             :         /* Out parameters */
   14626          82 :         r.out.level_out = _level_out;
   14627          82 :         r.out.info_out = _info_out;
   14628          82 :         r.out.connect_handle = _connect_handle;
   14629             : 
   14630             :         /* Result */
   14631          82 :         NDR_ZERO_STRUCT(r.out.result);
   14632             : 
   14633          82 :         status = dcerpc_samr_Connect5_r(h, mem_ctx, &r);
   14634          82 :         if (!NT_STATUS_IS_OK(status)) {
   14635           0 :                 return status;
   14636             :         }
   14637             : 
   14638             :         /* Return variables */
   14639          82 :         *_level_out = *r.out.level_out;
   14640          82 :         *_info_out = *r.out.info_out;
   14641          82 :         *_connect_handle = *r.out.connect_handle;
   14642             : 
   14643             :         /* Return result */
   14644          82 :         *result = r.out.result;
   14645             : 
   14646          82 :         return NT_STATUS_OK;
   14647             : }
   14648             : 
   14649             : struct dcerpc_samr_RidToSid_r_state {
   14650             :         TALLOC_CTX *out_mem_ctx;
   14651             : };
   14652             : 
   14653             : static void dcerpc_samr_RidToSid_r_done(struct tevent_req *subreq);
   14654             : 
   14655           0 : struct tevent_req *dcerpc_samr_RidToSid_r_send(TALLOC_CTX *mem_ctx,
   14656             :         struct tevent_context *ev,
   14657             :         struct dcerpc_binding_handle *h,
   14658             :         struct samr_RidToSid *r)
   14659             : {
   14660           0 :         struct tevent_req *req;
   14661           0 :         struct dcerpc_samr_RidToSid_r_state *state;
   14662           0 :         struct tevent_req *subreq;
   14663             : 
   14664           0 :         req = tevent_req_create(mem_ctx, &state,
   14665             :                                 struct dcerpc_samr_RidToSid_r_state);
   14666           0 :         if (req == NULL) {
   14667           0 :                 return NULL;
   14668             :         }
   14669             : 
   14670           0 :         state->out_mem_ctx = talloc_new(state);
   14671           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   14672           0 :                 return tevent_req_post(req, ev);
   14673             :         }
   14674             : 
   14675           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   14676             :                         NULL, &ndr_table_samr,
   14677           0 :                         NDR_SAMR_RIDTOSID, state->out_mem_ctx, r);
   14678           0 :         if (tevent_req_nomem(subreq, req)) {
   14679           0 :                 return tevent_req_post(req, ev);
   14680             :         }
   14681           0 :         tevent_req_set_callback(subreq, dcerpc_samr_RidToSid_r_done, req);
   14682             : 
   14683           0 :         return req;
   14684             : }
   14685             : 
   14686           0 : static void dcerpc_samr_RidToSid_r_done(struct tevent_req *subreq)
   14687             : {
   14688           0 :         struct tevent_req *req =
   14689           0 :                 tevent_req_callback_data(subreq,
   14690             :                 struct tevent_req);
   14691           0 :         NTSTATUS status;
   14692             : 
   14693           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   14694           0 :         TALLOC_FREE(subreq);
   14695           0 :         if (tevent_req_nterror(req, status)) {
   14696           0 :                 return;
   14697             :         }
   14698             : 
   14699           0 :         tevent_req_done(req);
   14700             : }
   14701             : 
   14702           0 : NTSTATUS dcerpc_samr_RidToSid_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   14703             : {
   14704           0 :         struct dcerpc_samr_RidToSid_r_state *state =
   14705           0 :                 tevent_req_data(req,
   14706             :                 struct dcerpc_samr_RidToSid_r_state);
   14707           0 :         NTSTATUS status;
   14708             : 
   14709           0 :         if (tevent_req_is_nterror(req, &status)) {
   14710           0 :                 tevent_req_received(req);
   14711           0 :                 return status;
   14712             :         }
   14713             : 
   14714           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   14715             : 
   14716           0 :         tevent_req_received(req);
   14717           0 :         return NT_STATUS_OK;
   14718             : }
   14719             : 
   14720          40 : NTSTATUS dcerpc_samr_RidToSid_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_RidToSid *r)
   14721             : {
   14722           0 :         NTSTATUS status;
   14723             : 
   14724          40 :         status = dcerpc_binding_handle_call(h,
   14725             :                         NULL, &ndr_table_samr,
   14726             :                         NDR_SAMR_RIDTOSID, mem_ctx, r);
   14727             : 
   14728          40 :         return status;
   14729             : }
   14730             : 
   14731             : struct dcerpc_samr_RidToSid_state {
   14732             :         struct samr_RidToSid orig;
   14733             :         struct samr_RidToSid tmp;
   14734             :         TALLOC_CTX *out_mem_ctx;
   14735             : };
   14736             : 
   14737             : static void dcerpc_samr_RidToSid_done(struct tevent_req *subreq);
   14738             : 
   14739           0 : struct tevent_req *dcerpc_samr_RidToSid_send(TALLOC_CTX *mem_ctx,
   14740             :                                              struct tevent_context *ev,
   14741             :                                              struct dcerpc_binding_handle *h,
   14742             :                                              struct policy_handle *_domain_handle /* [in] [ref] */,
   14743             :                                              uint32_t _rid /* [in]  */,
   14744             :                                              struct dom_sid2 **_sid /* [out] [ref] */)
   14745             : {
   14746           0 :         struct tevent_req *req;
   14747           0 :         struct dcerpc_samr_RidToSid_state *state;
   14748           0 :         struct tevent_req *subreq;
   14749             : 
   14750           0 :         req = tevent_req_create(mem_ctx, &state,
   14751             :                                 struct dcerpc_samr_RidToSid_state);
   14752           0 :         if (req == NULL) {
   14753           0 :                 return NULL;
   14754             :         }
   14755           0 :         state->out_mem_ctx = NULL;
   14756             : 
   14757             :         /* In parameters */
   14758           0 :         state->orig.in.domain_handle = _domain_handle;
   14759           0 :         state->orig.in.rid = _rid;
   14760             : 
   14761             :         /* Out parameters */
   14762           0 :         state->orig.out.sid = _sid;
   14763             : 
   14764             :         /* Result */
   14765           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   14766             : 
   14767           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   14768             :                              "dcerpc_samr_RidToSid_out_memory");
   14769           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   14770           0 :                 return tevent_req_post(req, ev);
   14771             :         }
   14772             : 
   14773             :         /* make a temporary copy, that we pass to the dispatch function */
   14774           0 :         state->tmp = state->orig;
   14775             : 
   14776           0 :         subreq = dcerpc_samr_RidToSid_r_send(state, ev, h, &state->tmp);
   14777           0 :         if (tevent_req_nomem(subreq, req)) {
   14778           0 :                 return tevent_req_post(req, ev);
   14779             :         }
   14780           0 :         tevent_req_set_callback(subreq, dcerpc_samr_RidToSid_done, req);
   14781           0 :         return req;
   14782             : }
   14783             : 
   14784           0 : static void dcerpc_samr_RidToSid_done(struct tevent_req *subreq)
   14785             : {
   14786           0 :         struct tevent_req *req = tevent_req_callback_data(
   14787             :                 subreq, struct tevent_req);
   14788           0 :         struct dcerpc_samr_RidToSid_state *state = tevent_req_data(
   14789             :                 req, struct dcerpc_samr_RidToSid_state);
   14790           0 :         NTSTATUS status;
   14791           0 :         TALLOC_CTX *mem_ctx;
   14792             : 
   14793           0 :         if (state->out_mem_ctx) {
   14794           0 :                 mem_ctx = state->out_mem_ctx;
   14795             :         } else {
   14796           0 :                 mem_ctx = state;
   14797             :         }
   14798             : 
   14799           0 :         status = dcerpc_samr_RidToSid_r_recv(subreq, mem_ctx);
   14800           0 :         TALLOC_FREE(subreq);
   14801           0 :         if (tevent_req_nterror(req, status)) {
   14802           0 :                 return;
   14803             :         }
   14804             : 
   14805             :         /* Copy out parameters */
   14806           0 :         *state->orig.out.sid = *state->tmp.out.sid;
   14807             : 
   14808             :         /* Copy result */
   14809           0 :         state->orig.out.result = state->tmp.out.result;
   14810             : 
   14811             :         /* Reset temporary structure */
   14812           0 :         NDR_ZERO_STRUCT(state->tmp);
   14813             : 
   14814           0 :         tevent_req_done(req);
   14815             : }
   14816             : 
   14817           0 : NTSTATUS dcerpc_samr_RidToSid_recv(struct tevent_req *req,
   14818             :                                    TALLOC_CTX *mem_ctx,
   14819             :                                    NTSTATUS *result)
   14820             : {
   14821           0 :         struct dcerpc_samr_RidToSid_state *state = tevent_req_data(
   14822             :                 req, struct dcerpc_samr_RidToSid_state);
   14823           0 :         NTSTATUS status;
   14824             : 
   14825           0 :         if (tevent_req_is_nterror(req, &status)) {
   14826           0 :                 tevent_req_received(req);
   14827           0 :                 return status;
   14828             :         }
   14829             : 
   14830             :         /* Steal possible out parameters to the callers context */
   14831           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   14832             : 
   14833             :         /* Return result */
   14834           0 :         *result = state->orig.out.result;
   14835             : 
   14836           0 :         tevent_req_received(req);
   14837           0 :         return NT_STATUS_OK;
   14838             : }
   14839             : 
   14840           0 : NTSTATUS dcerpc_samr_RidToSid(struct dcerpc_binding_handle *h,
   14841             :                               TALLOC_CTX *mem_ctx,
   14842             :                               struct policy_handle *_domain_handle /* [in] [ref] */,
   14843             :                               uint32_t _rid /* [in]  */,
   14844             :                               struct dom_sid2 **_sid /* [out] [ref] */,
   14845             :                               NTSTATUS *result)
   14846             : {
   14847           0 :         struct samr_RidToSid r;
   14848           0 :         NTSTATUS status;
   14849             : 
   14850             :         /* In parameters */
   14851           0 :         r.in.domain_handle = _domain_handle;
   14852           0 :         r.in.rid = _rid;
   14853             : 
   14854             :         /* Out parameters */
   14855           0 :         r.out.sid = _sid;
   14856             : 
   14857             :         /* Result */
   14858           0 :         NDR_ZERO_STRUCT(r.out.result);
   14859             : 
   14860           0 :         status = dcerpc_samr_RidToSid_r(h, mem_ctx, &r);
   14861           0 :         if (!NT_STATUS_IS_OK(status)) {
   14862           0 :                 return status;
   14863             :         }
   14864             : 
   14865             :         /* Return variables */
   14866           0 :         *_sid = *r.out.sid;
   14867             : 
   14868             :         /* Return result */
   14869           0 :         *result = r.out.result;
   14870             : 
   14871           0 :         return NT_STATUS_OK;
   14872             : }
   14873             : 
   14874             : struct dcerpc_samr_SetDsrmPassword_r_state {
   14875             :         TALLOC_CTX *out_mem_ctx;
   14876             : };
   14877             : 
   14878             : static void dcerpc_samr_SetDsrmPassword_r_done(struct tevent_req *subreq);
   14879             : 
   14880           0 : struct tevent_req *dcerpc_samr_SetDsrmPassword_r_send(TALLOC_CTX *mem_ctx,
   14881             :         struct tevent_context *ev,
   14882             :         struct dcerpc_binding_handle *h,
   14883             :         struct samr_SetDsrmPassword *r)
   14884             : {
   14885           0 :         struct tevent_req *req;
   14886           0 :         struct dcerpc_samr_SetDsrmPassword_r_state *state;
   14887           0 :         struct tevent_req *subreq;
   14888             : 
   14889           0 :         req = tevent_req_create(mem_ctx, &state,
   14890             :                                 struct dcerpc_samr_SetDsrmPassword_r_state);
   14891           0 :         if (req == NULL) {
   14892           0 :                 return NULL;
   14893             :         }
   14894             : 
   14895           0 :         state->out_mem_ctx = NULL;
   14896             : 
   14897           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   14898             :                         NULL, &ndr_table_samr,
   14899             :                         NDR_SAMR_SETDSRMPASSWORD, state, r);
   14900           0 :         if (tevent_req_nomem(subreq, req)) {
   14901           0 :                 return tevent_req_post(req, ev);
   14902             :         }
   14903           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetDsrmPassword_r_done, req);
   14904             : 
   14905           0 :         return req;
   14906             : }
   14907             : 
   14908           0 : static void dcerpc_samr_SetDsrmPassword_r_done(struct tevent_req *subreq)
   14909             : {
   14910           0 :         struct tevent_req *req =
   14911           0 :                 tevent_req_callback_data(subreq,
   14912             :                 struct tevent_req);
   14913           0 :         NTSTATUS status;
   14914             : 
   14915           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   14916           0 :         TALLOC_FREE(subreq);
   14917           0 :         if (tevent_req_nterror(req, status)) {
   14918           0 :                 return;
   14919             :         }
   14920             : 
   14921           0 :         tevent_req_done(req);
   14922             : }
   14923             : 
   14924           0 : NTSTATUS dcerpc_samr_SetDsrmPassword_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   14925             : {
   14926           0 :         struct dcerpc_samr_SetDsrmPassword_r_state *state =
   14927           0 :                 tevent_req_data(req,
   14928             :                 struct dcerpc_samr_SetDsrmPassword_r_state);
   14929           0 :         NTSTATUS status;
   14930             : 
   14931           0 :         if (tevent_req_is_nterror(req, &status)) {
   14932           0 :                 tevent_req_received(req);
   14933           0 :                 return status;
   14934             :         }
   14935             : 
   14936           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   14937             : 
   14938           0 :         tevent_req_received(req);
   14939           0 :         return NT_STATUS_OK;
   14940             : }
   14941             : 
   14942           0 : NTSTATUS dcerpc_samr_SetDsrmPassword_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_SetDsrmPassword *r)
   14943             : {
   14944           0 :         NTSTATUS status;
   14945             : 
   14946           0 :         status = dcerpc_binding_handle_call(h,
   14947             :                         NULL, &ndr_table_samr,
   14948             :                         NDR_SAMR_SETDSRMPASSWORD, mem_ctx, r);
   14949             : 
   14950           0 :         return status;
   14951             : }
   14952             : 
   14953             : struct dcerpc_samr_SetDsrmPassword_state {
   14954             :         struct samr_SetDsrmPassword orig;
   14955             :         struct samr_SetDsrmPassword tmp;
   14956             :         TALLOC_CTX *out_mem_ctx;
   14957             : };
   14958             : 
   14959             : static void dcerpc_samr_SetDsrmPassword_done(struct tevent_req *subreq);
   14960             : 
   14961           0 : struct tevent_req *dcerpc_samr_SetDsrmPassword_send(TALLOC_CTX *mem_ctx,
   14962             :                                                     struct tevent_context *ev,
   14963             :                                                     struct dcerpc_binding_handle *h,
   14964             :                                                     struct lsa_String *_name /* [in] [unique] */,
   14965             :                                                     uint32_t _unknown /* [in]  */,
   14966             :                                                     struct samr_Password *_hash /* [in] [unique] */)
   14967             : {
   14968           0 :         struct tevent_req *req;
   14969           0 :         struct dcerpc_samr_SetDsrmPassword_state *state;
   14970           0 :         struct tevent_req *subreq;
   14971             : 
   14972           0 :         req = tevent_req_create(mem_ctx, &state,
   14973             :                                 struct dcerpc_samr_SetDsrmPassword_state);
   14974           0 :         if (req == NULL) {
   14975           0 :                 return NULL;
   14976             :         }
   14977           0 :         state->out_mem_ctx = NULL;
   14978             : 
   14979             :         /* In parameters */
   14980           0 :         state->orig.in.name = _name;
   14981           0 :         state->orig.in.unknown = _unknown;
   14982           0 :         state->orig.in.hash = _hash;
   14983             : 
   14984             :         /* Out parameters */
   14985             : 
   14986             :         /* Result */
   14987           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   14988             : 
   14989             :         /* make a temporary copy, that we pass to the dispatch function */
   14990           0 :         state->tmp = state->orig;
   14991             : 
   14992           0 :         subreq = dcerpc_samr_SetDsrmPassword_r_send(state, ev, h, &state->tmp);
   14993           0 :         if (tevent_req_nomem(subreq, req)) {
   14994           0 :                 return tevent_req_post(req, ev);
   14995             :         }
   14996           0 :         tevent_req_set_callback(subreq, dcerpc_samr_SetDsrmPassword_done, req);
   14997           0 :         return req;
   14998             : }
   14999             : 
   15000           0 : static void dcerpc_samr_SetDsrmPassword_done(struct tevent_req *subreq)
   15001             : {
   15002           0 :         struct tevent_req *req = tevent_req_callback_data(
   15003             :                 subreq, struct tevent_req);
   15004           0 :         struct dcerpc_samr_SetDsrmPassword_state *state = tevent_req_data(
   15005             :                 req, struct dcerpc_samr_SetDsrmPassword_state);
   15006           0 :         NTSTATUS status;
   15007           0 :         TALLOC_CTX *mem_ctx;
   15008             : 
   15009           0 :         if (state->out_mem_ctx) {
   15010           0 :                 mem_ctx = state->out_mem_ctx;
   15011             :         } else {
   15012           0 :                 mem_ctx = state;
   15013             :         }
   15014             : 
   15015           0 :         status = dcerpc_samr_SetDsrmPassword_r_recv(subreq, mem_ctx);
   15016           0 :         TALLOC_FREE(subreq);
   15017           0 :         if (tevent_req_nterror(req, status)) {
   15018           0 :                 return;
   15019             :         }
   15020             : 
   15021             :         /* Copy out parameters */
   15022             : 
   15023             :         /* Copy result */
   15024           0 :         state->orig.out.result = state->tmp.out.result;
   15025             : 
   15026             :         /* Reset temporary structure */
   15027           0 :         NDR_ZERO_STRUCT(state->tmp);
   15028             : 
   15029           0 :         tevent_req_done(req);
   15030             : }
   15031             : 
   15032           0 : NTSTATUS dcerpc_samr_SetDsrmPassword_recv(struct tevent_req *req,
   15033             :                                           TALLOC_CTX *mem_ctx,
   15034             :                                           NTSTATUS *result)
   15035             : {
   15036           0 :         struct dcerpc_samr_SetDsrmPassword_state *state = tevent_req_data(
   15037             :                 req, struct dcerpc_samr_SetDsrmPassword_state);
   15038           0 :         NTSTATUS status;
   15039             : 
   15040           0 :         if (tevent_req_is_nterror(req, &status)) {
   15041           0 :                 tevent_req_received(req);
   15042           0 :                 return status;
   15043             :         }
   15044             : 
   15045             :         /* Steal possible out parameters to the callers context */
   15046           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   15047             : 
   15048             :         /* Return result */
   15049           0 :         *result = state->orig.out.result;
   15050             : 
   15051           0 :         tevent_req_received(req);
   15052           0 :         return NT_STATUS_OK;
   15053             : }
   15054             : 
   15055           0 : NTSTATUS dcerpc_samr_SetDsrmPassword(struct dcerpc_binding_handle *h,
   15056             :                                      TALLOC_CTX *mem_ctx,
   15057             :                                      struct lsa_String *_name /* [in] [unique] */,
   15058             :                                      uint32_t _unknown /* [in]  */,
   15059             :                                      struct samr_Password *_hash /* [in] [unique] */,
   15060             :                                      NTSTATUS *result)
   15061             : {
   15062           0 :         struct samr_SetDsrmPassword r;
   15063           0 :         NTSTATUS status;
   15064             : 
   15065             :         /* In parameters */
   15066           0 :         r.in.name = _name;
   15067           0 :         r.in.unknown = _unknown;
   15068           0 :         r.in.hash = _hash;
   15069             : 
   15070             :         /* Out parameters */
   15071             : 
   15072             :         /* Result */
   15073           0 :         NDR_ZERO_STRUCT(r.out.result);
   15074             : 
   15075           0 :         status = dcerpc_samr_SetDsrmPassword_r(h, mem_ctx, &r);
   15076           0 :         if (!NT_STATUS_IS_OK(status)) {
   15077           0 :                 return status;
   15078             :         }
   15079             : 
   15080             :         /* Return variables */
   15081             : 
   15082             :         /* Return result */
   15083           0 :         *result = r.out.result;
   15084             : 
   15085           0 :         return NT_STATUS_OK;
   15086             : }
   15087             : 
   15088             : struct dcerpc_samr_ValidatePassword_r_state {
   15089             :         TALLOC_CTX *out_mem_ctx;
   15090             : };
   15091             : 
   15092             : static void dcerpc_samr_ValidatePassword_r_done(struct tevent_req *subreq);
   15093             : 
   15094           0 : struct tevent_req *dcerpc_samr_ValidatePassword_r_send(TALLOC_CTX *mem_ctx,
   15095             :         struct tevent_context *ev,
   15096             :         struct dcerpc_binding_handle *h,
   15097             :         struct samr_ValidatePassword *r)
   15098             : {
   15099           0 :         struct tevent_req *req;
   15100           0 :         struct dcerpc_samr_ValidatePassword_r_state *state;
   15101           0 :         struct tevent_req *subreq;
   15102             : 
   15103           0 :         req = tevent_req_create(mem_ctx, &state,
   15104             :                                 struct dcerpc_samr_ValidatePassword_r_state);
   15105           0 :         if (req == NULL) {
   15106           0 :                 return NULL;
   15107             :         }
   15108             : 
   15109           0 :         state->out_mem_ctx = talloc_new(state);
   15110           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   15111           0 :                 return tevent_req_post(req, ev);
   15112             :         }
   15113             : 
   15114           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   15115             :                         NULL, &ndr_table_samr,
   15116           0 :                         NDR_SAMR_VALIDATEPASSWORD, state->out_mem_ctx, r);
   15117           0 :         if (tevent_req_nomem(subreq, req)) {
   15118           0 :                 return tevent_req_post(req, ev);
   15119             :         }
   15120           0 :         tevent_req_set_callback(subreq, dcerpc_samr_ValidatePassword_r_done, req);
   15121             : 
   15122           0 :         return req;
   15123             : }
   15124             : 
   15125           0 : static void dcerpc_samr_ValidatePassword_r_done(struct tevent_req *subreq)
   15126             : {
   15127           0 :         struct tevent_req *req =
   15128           0 :                 tevent_req_callback_data(subreq,
   15129             :                 struct tevent_req);
   15130           0 :         NTSTATUS status;
   15131             : 
   15132           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   15133           0 :         TALLOC_FREE(subreq);
   15134           0 :         if (tevent_req_nterror(req, status)) {
   15135           0 :                 return;
   15136             :         }
   15137             : 
   15138           0 :         tevent_req_done(req);
   15139             : }
   15140             : 
   15141           0 : NTSTATUS dcerpc_samr_ValidatePassword_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   15142             : {
   15143           0 :         struct dcerpc_samr_ValidatePassword_r_state *state =
   15144           0 :                 tevent_req_data(req,
   15145             :                 struct dcerpc_samr_ValidatePassword_r_state);
   15146           0 :         NTSTATUS status;
   15147             : 
   15148           0 :         if (tevent_req_is_nterror(req, &status)) {
   15149           0 :                 tevent_req_received(req);
   15150           0 :                 return status;
   15151             :         }
   15152             : 
   15153           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   15154             : 
   15155           0 :         tevent_req_received(req);
   15156           0 :         return NT_STATUS_OK;
   15157             : }
   15158             : 
   15159          11 : NTSTATUS dcerpc_samr_ValidatePassword_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_ValidatePassword *r)
   15160             : {
   15161           0 :         NTSTATUS status;
   15162             : 
   15163          11 :         status = dcerpc_binding_handle_call(h,
   15164             :                         NULL, &ndr_table_samr,
   15165             :                         NDR_SAMR_VALIDATEPASSWORD, mem_ctx, r);
   15166             : 
   15167          11 :         return status;
   15168             : }
   15169             : 
   15170             : struct dcerpc_samr_ValidatePassword_state {
   15171             :         struct samr_ValidatePassword orig;
   15172             :         struct samr_ValidatePassword tmp;
   15173             :         TALLOC_CTX *out_mem_ctx;
   15174             : };
   15175             : 
   15176             : static void dcerpc_samr_ValidatePassword_done(struct tevent_req *subreq);
   15177             : 
   15178           0 : struct tevent_req *dcerpc_samr_ValidatePassword_send(TALLOC_CTX *mem_ctx,
   15179             :                                                      struct tevent_context *ev,
   15180             :                                                      struct dcerpc_binding_handle *h,
   15181             :                                                      enum samr_ValidatePasswordLevel _level /* [in]  */,
   15182             :                                                      union samr_ValidatePasswordReq *_req /* [in] [ref,switch_is(level)] */,
   15183             :                                                      union samr_ValidatePasswordRep **_rep /* [out] [ref,switch_is(level)] */)
   15184             : {
   15185           0 :         struct tevent_req *req;
   15186           0 :         struct dcerpc_samr_ValidatePassword_state *state;
   15187           0 :         struct tevent_req *subreq;
   15188             : 
   15189           0 :         req = tevent_req_create(mem_ctx, &state,
   15190             :                                 struct dcerpc_samr_ValidatePassword_state);
   15191           0 :         if (req == NULL) {
   15192           0 :                 return NULL;
   15193             :         }
   15194           0 :         state->out_mem_ctx = NULL;
   15195             : 
   15196             :         /* In parameters */
   15197           0 :         state->orig.in.level = _level;
   15198           0 :         state->orig.in.req = _req;
   15199             : 
   15200             :         /* Out parameters */
   15201           0 :         state->orig.out.rep = _rep;
   15202             : 
   15203             :         /* Result */
   15204           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   15205             : 
   15206           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   15207             :                              "dcerpc_samr_ValidatePassword_out_memory");
   15208           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   15209           0 :                 return tevent_req_post(req, ev);
   15210             :         }
   15211             : 
   15212             :         /* make a temporary copy, that we pass to the dispatch function */
   15213           0 :         state->tmp = state->orig;
   15214             : 
   15215           0 :         subreq = dcerpc_samr_ValidatePassword_r_send(state, ev, h, &state->tmp);
   15216           0 :         if (tevent_req_nomem(subreq, req)) {
   15217           0 :                 return tevent_req_post(req, ev);
   15218             :         }
   15219           0 :         tevent_req_set_callback(subreq, dcerpc_samr_ValidatePassword_done, req);
   15220           0 :         return req;
   15221             : }
   15222             : 
   15223           0 : static void dcerpc_samr_ValidatePassword_done(struct tevent_req *subreq)
   15224             : {
   15225           0 :         struct tevent_req *req = tevent_req_callback_data(
   15226             :                 subreq, struct tevent_req);
   15227           0 :         struct dcerpc_samr_ValidatePassword_state *state = tevent_req_data(
   15228             :                 req, struct dcerpc_samr_ValidatePassword_state);
   15229           0 :         NTSTATUS status;
   15230           0 :         TALLOC_CTX *mem_ctx;
   15231             : 
   15232           0 :         if (state->out_mem_ctx) {
   15233           0 :                 mem_ctx = state->out_mem_ctx;
   15234             :         } else {
   15235           0 :                 mem_ctx = state;
   15236             :         }
   15237             : 
   15238           0 :         status = dcerpc_samr_ValidatePassword_r_recv(subreq, mem_ctx);
   15239           0 :         TALLOC_FREE(subreq);
   15240           0 :         if (tevent_req_nterror(req, status)) {
   15241           0 :                 return;
   15242             :         }
   15243             : 
   15244             :         /* Copy out parameters */
   15245           0 :         *state->orig.out.rep = *state->tmp.out.rep;
   15246             : 
   15247             :         /* Copy result */
   15248           0 :         state->orig.out.result = state->tmp.out.result;
   15249             : 
   15250             :         /* Reset temporary structure */
   15251           0 :         NDR_ZERO_STRUCT(state->tmp);
   15252             : 
   15253           0 :         tevent_req_done(req);
   15254             : }
   15255             : 
   15256           0 : NTSTATUS dcerpc_samr_ValidatePassword_recv(struct tevent_req *req,
   15257             :                                            TALLOC_CTX *mem_ctx,
   15258             :                                            NTSTATUS *result)
   15259             : {
   15260           0 :         struct dcerpc_samr_ValidatePassword_state *state = tevent_req_data(
   15261             :                 req, struct dcerpc_samr_ValidatePassword_state);
   15262           0 :         NTSTATUS status;
   15263             : 
   15264           0 :         if (tevent_req_is_nterror(req, &status)) {
   15265           0 :                 tevent_req_received(req);
   15266           0 :                 return status;
   15267             :         }
   15268             : 
   15269             :         /* Steal possible out parameters to the callers context */
   15270           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   15271             : 
   15272             :         /* Return result */
   15273           0 :         *result = state->orig.out.result;
   15274             : 
   15275           0 :         tevent_req_received(req);
   15276           0 :         return NT_STATUS_OK;
   15277             : }
   15278             : 
   15279           0 : NTSTATUS dcerpc_samr_ValidatePassword(struct dcerpc_binding_handle *h,
   15280             :                                       TALLOC_CTX *mem_ctx,
   15281             :                                       enum samr_ValidatePasswordLevel _level /* [in]  */,
   15282             :                                       union samr_ValidatePasswordReq *_req /* [in] [ref,switch_is(level)] */,
   15283             :                                       union samr_ValidatePasswordRep **_rep /* [out] [ref,switch_is(level)] */,
   15284             :                                       NTSTATUS *result)
   15285             : {
   15286           0 :         struct samr_ValidatePassword r;
   15287           0 :         NTSTATUS status;
   15288             : 
   15289             :         /* In parameters */
   15290           0 :         r.in.level = _level;
   15291           0 :         r.in.req = _req;
   15292             : 
   15293             :         /* Out parameters */
   15294           0 :         r.out.rep = _rep;
   15295             : 
   15296             :         /* Result */
   15297           0 :         NDR_ZERO_STRUCT(r.out.result);
   15298             : 
   15299           0 :         status = dcerpc_samr_ValidatePassword_r(h, mem_ctx, &r);
   15300           0 :         if (!NT_STATUS_IS_OK(status)) {
   15301           0 :                 return status;
   15302             :         }
   15303             : 
   15304             :         /* Return variables */
   15305           0 :         *_rep = *r.out.rep;
   15306             : 
   15307             :         /* Return result */
   15308           0 :         *result = r.out.result;
   15309             : 
   15310           0 :         return NT_STATUS_OK;
   15311             : }
   15312             : 
   15313             : struct dcerpc_samr_ChangePasswordUser4_r_state {
   15314             :         TALLOC_CTX *out_mem_ctx;
   15315             : };
   15316             : 
   15317             : static void dcerpc_samr_ChangePasswordUser4_r_done(struct tevent_req *subreq);
   15318             : 
   15319           0 : struct tevent_req *dcerpc_samr_ChangePasswordUser4_r_send(TALLOC_CTX *mem_ctx,
   15320             :         struct tevent_context *ev,
   15321             :         struct dcerpc_binding_handle *h,
   15322             :         struct samr_ChangePasswordUser4 *r)
   15323             : {
   15324           0 :         struct tevent_req *req;
   15325           0 :         struct dcerpc_samr_ChangePasswordUser4_r_state *state;
   15326           0 :         struct tevent_req *subreq;
   15327             : 
   15328           0 :         req = tevent_req_create(mem_ctx, &state,
   15329             :                                 struct dcerpc_samr_ChangePasswordUser4_r_state);
   15330           0 :         if (req == NULL) {
   15331           0 :                 return NULL;
   15332             :         }
   15333             : 
   15334           0 :         state->out_mem_ctx = NULL;
   15335             : 
   15336           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   15337             :                         NULL, &ndr_table_samr,
   15338             :                         NDR_SAMR_CHANGEPASSWORDUSER4, state, r);
   15339           0 :         if (tevent_req_nomem(subreq, req)) {
   15340           0 :                 return tevent_req_post(req, ev);
   15341             :         }
   15342           0 :         tevent_req_set_callback(subreq, dcerpc_samr_ChangePasswordUser4_r_done, req);
   15343             : 
   15344           0 :         return req;
   15345             : }
   15346             : 
   15347           0 : static void dcerpc_samr_ChangePasswordUser4_r_done(struct tevent_req *subreq)
   15348             : {
   15349           0 :         struct tevent_req *req =
   15350           0 :                 tevent_req_callback_data(subreq,
   15351             :                 struct tevent_req);
   15352           0 :         NTSTATUS status;
   15353             : 
   15354           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   15355           0 :         TALLOC_FREE(subreq);
   15356           0 :         if (tevent_req_nterror(req, status)) {
   15357           0 :                 return;
   15358             :         }
   15359             : 
   15360           0 :         tevent_req_done(req);
   15361             : }
   15362             : 
   15363           0 : NTSTATUS dcerpc_samr_ChangePasswordUser4_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   15364             : {
   15365           0 :         struct dcerpc_samr_ChangePasswordUser4_r_state *state =
   15366           0 :                 tevent_req_data(req,
   15367             :                 struct dcerpc_samr_ChangePasswordUser4_r_state);
   15368           0 :         NTSTATUS status;
   15369             : 
   15370           0 :         if (tevent_req_is_nterror(req, &status)) {
   15371           0 :                 tevent_req_received(req);
   15372           0 :                 return status;
   15373             :         }
   15374             : 
   15375           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   15376             : 
   15377           0 :         tevent_req_received(req);
   15378           0 :         return NT_STATUS_OK;
   15379             : }
   15380             : 
   15381          90 : NTSTATUS dcerpc_samr_ChangePasswordUser4_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samr_ChangePasswordUser4 *r)
   15382             : {
   15383           0 :         NTSTATUS status;
   15384             : 
   15385          90 :         status = dcerpc_binding_handle_call(h,
   15386             :                         NULL, &ndr_table_samr,
   15387             :                         NDR_SAMR_CHANGEPASSWORDUSER4, mem_ctx, r);
   15388             : 
   15389          90 :         return status;
   15390             : }
   15391             : 
   15392             : struct dcerpc_samr_ChangePasswordUser4_state {
   15393             :         struct samr_ChangePasswordUser4 orig;
   15394             :         struct samr_ChangePasswordUser4 tmp;
   15395             :         TALLOC_CTX *out_mem_ctx;
   15396             : };
   15397             : 
   15398             : static void dcerpc_samr_ChangePasswordUser4_done(struct tevent_req *subreq);
   15399             : 
   15400           0 : struct tevent_req *dcerpc_samr_ChangePasswordUser4_send(TALLOC_CTX *mem_ctx,
   15401             :                                                         struct tevent_context *ev,
   15402             :                                                         struct dcerpc_binding_handle *h,
   15403             :                                                         struct lsa_String *_server /* [in] [unique] */,
   15404             :                                                         struct lsa_String *_account /* [in] [ref] */,
   15405             :                                                         struct samr_EncryptedPasswordAES *_password /* [in] [ref] */)
   15406             : {
   15407           0 :         struct tevent_req *req;
   15408           0 :         struct dcerpc_samr_ChangePasswordUser4_state *state;
   15409           0 :         struct tevent_req *subreq;
   15410             : 
   15411           0 :         req = tevent_req_create(mem_ctx, &state,
   15412             :                                 struct dcerpc_samr_ChangePasswordUser4_state);
   15413           0 :         if (req == NULL) {
   15414           0 :                 return NULL;
   15415             :         }
   15416           0 :         state->out_mem_ctx = NULL;
   15417             : 
   15418             :         /* In parameters */
   15419           0 :         state->orig.in.server = _server;
   15420           0 :         state->orig.in.account = _account;
   15421           0 :         state->orig.in.password = _password;
   15422             : 
   15423             :         /* Out parameters */
   15424             : 
   15425             :         /* Result */
   15426           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   15427             : 
   15428             :         /* make a temporary copy, that we pass to the dispatch function */
   15429           0 :         state->tmp = state->orig;
   15430             : 
   15431           0 :         subreq = dcerpc_samr_ChangePasswordUser4_r_send(state, ev, h, &state->tmp);
   15432           0 :         if (tevent_req_nomem(subreq, req)) {
   15433           0 :                 return tevent_req_post(req, ev);
   15434             :         }
   15435           0 :         tevent_req_set_callback(subreq, dcerpc_samr_ChangePasswordUser4_done, req);
   15436           0 :         return req;
   15437             : }
   15438             : 
   15439           0 : static void dcerpc_samr_ChangePasswordUser4_done(struct tevent_req *subreq)
   15440             : {
   15441           0 :         struct tevent_req *req = tevent_req_callback_data(
   15442             :                 subreq, struct tevent_req);
   15443           0 :         struct dcerpc_samr_ChangePasswordUser4_state *state = tevent_req_data(
   15444             :                 req, struct dcerpc_samr_ChangePasswordUser4_state);
   15445           0 :         NTSTATUS status;
   15446           0 :         TALLOC_CTX *mem_ctx;
   15447             : 
   15448           0 :         if (state->out_mem_ctx) {
   15449           0 :                 mem_ctx = state->out_mem_ctx;
   15450             :         } else {
   15451           0 :                 mem_ctx = state;
   15452             :         }
   15453             : 
   15454           0 :         status = dcerpc_samr_ChangePasswordUser4_r_recv(subreq, mem_ctx);
   15455           0 :         TALLOC_FREE(subreq);
   15456           0 :         if (tevent_req_nterror(req, status)) {
   15457           0 :                 return;
   15458             :         }
   15459             : 
   15460             :         /* Copy out parameters */
   15461             : 
   15462             :         /* Copy result */
   15463           0 :         state->orig.out.result = state->tmp.out.result;
   15464             : 
   15465             :         /* Reset temporary structure */
   15466           0 :         NDR_ZERO_STRUCT(state->tmp);
   15467             : 
   15468           0 :         tevent_req_done(req);
   15469             : }
   15470             : 
   15471           0 : NTSTATUS dcerpc_samr_ChangePasswordUser4_recv(struct tevent_req *req,
   15472             :                                               TALLOC_CTX *mem_ctx,
   15473             :                                               NTSTATUS *result)
   15474             : {
   15475           0 :         struct dcerpc_samr_ChangePasswordUser4_state *state = tevent_req_data(
   15476             :                 req, struct dcerpc_samr_ChangePasswordUser4_state);
   15477           0 :         NTSTATUS status;
   15478             : 
   15479           0 :         if (tevent_req_is_nterror(req, &status)) {
   15480           0 :                 tevent_req_received(req);
   15481           0 :                 return status;
   15482             :         }
   15483             : 
   15484             :         /* Steal possible out parameters to the callers context */
   15485           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   15486             : 
   15487             :         /* Return result */
   15488           0 :         *result = state->orig.out.result;
   15489             : 
   15490           0 :         tevent_req_received(req);
   15491           0 :         return NT_STATUS_OK;
   15492             : }
   15493             : 
   15494           6 : NTSTATUS dcerpc_samr_ChangePasswordUser4(struct dcerpc_binding_handle *h,
   15495             :                                          TALLOC_CTX *mem_ctx,
   15496             :                                          struct lsa_String *_server /* [in] [unique] */,
   15497             :                                          struct lsa_String *_account /* [in] [ref] */,
   15498             :                                          struct samr_EncryptedPasswordAES *_password /* [in] [ref] */,
   15499             :                                          NTSTATUS *result)
   15500             : {
   15501           0 :         struct samr_ChangePasswordUser4 r;
   15502           0 :         NTSTATUS status;
   15503             : 
   15504             :         /* In parameters */
   15505           6 :         r.in.server = _server;
   15506           6 :         r.in.account = _account;
   15507           6 :         r.in.password = _password;
   15508             : 
   15509             :         /* Out parameters */
   15510             : 
   15511             :         /* Result */
   15512           6 :         NDR_ZERO_STRUCT(r.out.result);
   15513             : 
   15514           6 :         status = dcerpc_samr_ChangePasswordUser4_r(h, mem_ctx, &r);
   15515           6 :         if (!NT_STATUS_IS_OK(status)) {
   15516           0 :                 return status;
   15517             :         }
   15518             : 
   15519             :         /* Return variables */
   15520             : 
   15521             :         /* Return result */
   15522           6 :         *result = r.out.result;
   15523             : 
   15524           6 :         return NT_STATUS_OK;
   15525             : }
   15526             : 

Generated by: LCOV version 1.14