Line data Source code
1 : /* client functions auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include <tevent.h>
5 : #include "lib/util/tevent_ntstatus.h"
6 : #include "bin/default/librpc/gen_ndr/ndr_lsa.h"
7 : #include "bin/default/librpc/gen_ndr/ndr_lsa_c.h"
8 :
9 : /* lsarpc - client functions generated by pidl */
10 :
11 : struct dcerpc_lsa_Close_r_state {
12 : TALLOC_CTX *out_mem_ctx;
13 : };
14 :
15 : static void dcerpc_lsa_Close_r_done(struct tevent_req *subreq);
16 :
17 1 : struct tevent_req *dcerpc_lsa_Close_r_send(TALLOC_CTX *mem_ctx,
18 : struct tevent_context *ev,
19 : struct dcerpc_binding_handle *h,
20 : struct lsa_Close *r)
21 : {
22 0 : struct tevent_req *req;
23 0 : struct dcerpc_lsa_Close_r_state *state;
24 0 : struct tevent_req *subreq;
25 :
26 1 : req = tevent_req_create(mem_ctx, &state,
27 : struct dcerpc_lsa_Close_r_state);
28 1 : if (req == NULL) {
29 0 : return NULL;
30 : }
31 :
32 1 : state->out_mem_ctx = talloc_new(state);
33 1 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
34 0 : return tevent_req_post(req, ev);
35 : }
36 :
37 1 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
38 : NULL, &ndr_table_lsarpc,
39 1 : NDR_LSA_CLOSE, state->out_mem_ctx, r);
40 1 : if (tevent_req_nomem(subreq, req)) {
41 0 : return tevent_req_post(req, ev);
42 : }
43 1 : tevent_req_set_callback(subreq, dcerpc_lsa_Close_r_done, req);
44 :
45 1 : return req;
46 : }
47 :
48 1 : static void dcerpc_lsa_Close_r_done(struct tevent_req *subreq)
49 : {
50 0 : struct tevent_req *req =
51 1 : tevent_req_callback_data(subreq,
52 : struct tevent_req);
53 0 : NTSTATUS status;
54 :
55 1 : status = dcerpc_binding_handle_call_recv(subreq);
56 1 : TALLOC_FREE(subreq);
57 1 : if (tevent_req_nterror(req, status)) {
58 0 : return;
59 : }
60 :
61 1 : tevent_req_done(req);
62 : }
63 :
64 1 : NTSTATUS dcerpc_lsa_Close_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
65 : {
66 0 : struct dcerpc_lsa_Close_r_state *state =
67 1 : tevent_req_data(req,
68 : struct dcerpc_lsa_Close_r_state);
69 0 : NTSTATUS status;
70 :
71 1 : if (tevent_req_is_nterror(req, &status)) {
72 0 : tevent_req_received(req);
73 0 : return status;
74 : }
75 :
76 1 : talloc_steal(mem_ctx, state->out_mem_ctx);
77 :
78 1 : tevent_req_received(req);
79 1 : return NT_STATUS_OK;
80 : }
81 :
82 1951 : NTSTATUS dcerpc_lsa_Close_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_Close *r)
83 : {
84 36 : NTSTATUS status;
85 :
86 1951 : status = dcerpc_binding_handle_call(h,
87 : NULL, &ndr_table_lsarpc,
88 : NDR_LSA_CLOSE, mem_ctx, r);
89 :
90 1951 : return status;
91 : }
92 :
93 : struct dcerpc_lsa_Close_state {
94 : struct lsa_Close orig;
95 : struct lsa_Close tmp;
96 : TALLOC_CTX *out_mem_ctx;
97 : };
98 :
99 : static void dcerpc_lsa_Close_done(struct tevent_req *subreq);
100 :
101 0 : struct tevent_req *dcerpc_lsa_Close_send(TALLOC_CTX *mem_ctx,
102 : struct tevent_context *ev,
103 : struct dcerpc_binding_handle *h,
104 : struct policy_handle *_handle /* [in,out] [ref] */)
105 : {
106 0 : struct tevent_req *req;
107 0 : struct dcerpc_lsa_Close_state *state;
108 0 : struct tevent_req *subreq;
109 :
110 0 : req = tevent_req_create(mem_ctx, &state,
111 : struct dcerpc_lsa_Close_state);
112 0 : if (req == NULL) {
113 0 : return NULL;
114 : }
115 0 : state->out_mem_ctx = NULL;
116 :
117 : /* In parameters */
118 0 : state->orig.in.handle = _handle;
119 :
120 : /* Out parameters */
121 0 : state->orig.out.handle = _handle;
122 :
123 : /* Result */
124 0 : NDR_ZERO_STRUCT(state->orig.out.result);
125 :
126 0 : state->out_mem_ctx = talloc_named_const(state, 0,
127 : "dcerpc_lsa_Close_out_memory");
128 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
129 0 : return tevent_req_post(req, ev);
130 : }
131 :
132 : /* make a temporary copy, that we pass to the dispatch function */
133 0 : state->tmp = state->orig;
134 :
135 0 : subreq = dcerpc_lsa_Close_r_send(state, ev, h, &state->tmp);
136 0 : if (tevent_req_nomem(subreq, req)) {
137 0 : return tevent_req_post(req, ev);
138 : }
139 0 : tevent_req_set_callback(subreq, dcerpc_lsa_Close_done, req);
140 0 : return req;
141 : }
142 :
143 0 : static void dcerpc_lsa_Close_done(struct tevent_req *subreq)
144 : {
145 0 : struct tevent_req *req = tevent_req_callback_data(
146 : subreq, struct tevent_req);
147 0 : struct dcerpc_lsa_Close_state *state = tevent_req_data(
148 : req, struct dcerpc_lsa_Close_state);
149 0 : NTSTATUS status;
150 0 : TALLOC_CTX *mem_ctx;
151 :
152 0 : if (state->out_mem_ctx) {
153 0 : mem_ctx = state->out_mem_ctx;
154 : } else {
155 0 : mem_ctx = state;
156 : }
157 :
158 0 : status = dcerpc_lsa_Close_r_recv(subreq, mem_ctx);
159 0 : TALLOC_FREE(subreq);
160 0 : if (tevent_req_nterror(req, status)) {
161 0 : return;
162 : }
163 :
164 : /* Copy out parameters */
165 0 : *state->orig.out.handle = *state->tmp.out.handle;
166 :
167 : /* Copy result */
168 0 : state->orig.out.result = state->tmp.out.result;
169 :
170 : /* Reset temporary structure */
171 0 : NDR_ZERO_STRUCT(state->tmp);
172 :
173 0 : tevent_req_done(req);
174 : }
175 :
176 0 : NTSTATUS dcerpc_lsa_Close_recv(struct tevent_req *req,
177 : TALLOC_CTX *mem_ctx,
178 : NTSTATUS *result)
179 : {
180 0 : struct dcerpc_lsa_Close_state *state = tevent_req_data(
181 : req, struct dcerpc_lsa_Close_state);
182 0 : NTSTATUS status;
183 :
184 0 : if (tevent_req_is_nterror(req, &status)) {
185 0 : tevent_req_received(req);
186 0 : return status;
187 : }
188 :
189 : /* Steal possible out parameters to the callers context */
190 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
191 :
192 : /* Return result */
193 0 : *result = state->orig.out.result;
194 :
195 0 : tevent_req_received(req);
196 0 : return NT_STATUS_OK;
197 : }
198 :
199 1202 : NTSTATUS dcerpc_lsa_Close(struct dcerpc_binding_handle *h,
200 : TALLOC_CTX *mem_ctx,
201 : struct policy_handle *_handle /* [in,out] [ref] */,
202 : NTSTATUS *result)
203 : {
204 0 : struct lsa_Close r;
205 0 : NTSTATUS status;
206 :
207 : /* In parameters */
208 1202 : r.in.handle = _handle;
209 :
210 : /* Out parameters */
211 1202 : r.out.handle = _handle;
212 :
213 : /* Result */
214 1202 : NDR_ZERO_STRUCT(r.out.result);
215 :
216 1202 : status = dcerpc_lsa_Close_r(h, mem_ctx, &r);
217 1202 : if (!NT_STATUS_IS_OK(status)) {
218 0 : return status;
219 : }
220 :
221 : /* Return variables */
222 1202 : *_handle = *r.out.handle;
223 :
224 : /* Return result */
225 1202 : *result = r.out.result;
226 :
227 1202 : return NT_STATUS_OK;
228 : }
229 :
230 : struct dcerpc_lsa_Delete_r_state {
231 : TALLOC_CTX *out_mem_ctx;
232 : };
233 :
234 : static void dcerpc_lsa_Delete_r_done(struct tevent_req *subreq);
235 :
236 0 : struct tevent_req *dcerpc_lsa_Delete_r_send(TALLOC_CTX *mem_ctx,
237 : struct tevent_context *ev,
238 : struct dcerpc_binding_handle *h,
239 : struct lsa_Delete *r)
240 : {
241 0 : struct tevent_req *req;
242 0 : struct dcerpc_lsa_Delete_r_state *state;
243 0 : struct tevent_req *subreq;
244 :
245 0 : req = tevent_req_create(mem_ctx, &state,
246 : struct dcerpc_lsa_Delete_r_state);
247 0 : if (req == NULL) {
248 0 : return NULL;
249 : }
250 :
251 0 : state->out_mem_ctx = NULL;
252 :
253 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
254 : NULL, &ndr_table_lsarpc,
255 : NDR_LSA_DELETE, state, r);
256 0 : if (tevent_req_nomem(subreq, req)) {
257 0 : return tevent_req_post(req, ev);
258 : }
259 0 : tevent_req_set_callback(subreq, dcerpc_lsa_Delete_r_done, req);
260 :
261 0 : return req;
262 : }
263 :
264 0 : static void dcerpc_lsa_Delete_r_done(struct tevent_req *subreq)
265 : {
266 0 : struct tevent_req *req =
267 0 : tevent_req_callback_data(subreq,
268 : struct tevent_req);
269 0 : NTSTATUS status;
270 :
271 0 : status = dcerpc_binding_handle_call_recv(subreq);
272 0 : TALLOC_FREE(subreq);
273 0 : if (tevent_req_nterror(req, status)) {
274 0 : return;
275 : }
276 :
277 0 : tevent_req_done(req);
278 : }
279 :
280 0 : NTSTATUS dcerpc_lsa_Delete_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
281 : {
282 0 : struct dcerpc_lsa_Delete_r_state *state =
283 0 : tevent_req_data(req,
284 : struct dcerpc_lsa_Delete_r_state);
285 0 : NTSTATUS status;
286 :
287 0 : if (tevent_req_is_nterror(req, &status)) {
288 0 : tevent_req_received(req);
289 0 : return status;
290 : }
291 :
292 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
293 :
294 0 : tevent_req_received(req);
295 0 : return NT_STATUS_OK;
296 : }
297 :
298 41 : NTSTATUS dcerpc_lsa_Delete_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_Delete *r)
299 : {
300 0 : NTSTATUS status;
301 :
302 41 : status = dcerpc_binding_handle_call(h,
303 : NULL, &ndr_table_lsarpc,
304 : NDR_LSA_DELETE, mem_ctx, r);
305 :
306 41 : return status;
307 : }
308 :
309 : struct dcerpc_lsa_Delete_state {
310 : struct lsa_Delete orig;
311 : struct lsa_Delete tmp;
312 : TALLOC_CTX *out_mem_ctx;
313 : };
314 :
315 : static void dcerpc_lsa_Delete_done(struct tevent_req *subreq);
316 :
317 0 : struct tevent_req *dcerpc_lsa_Delete_send(TALLOC_CTX *mem_ctx,
318 : struct tevent_context *ev,
319 : struct dcerpc_binding_handle *h,
320 : struct policy_handle *_handle /* [in] [ref] */)
321 : {
322 0 : struct tevent_req *req;
323 0 : struct dcerpc_lsa_Delete_state *state;
324 0 : struct tevent_req *subreq;
325 :
326 0 : req = tevent_req_create(mem_ctx, &state,
327 : struct dcerpc_lsa_Delete_state);
328 0 : if (req == NULL) {
329 0 : return NULL;
330 : }
331 0 : state->out_mem_ctx = NULL;
332 :
333 : /* In parameters */
334 0 : state->orig.in.handle = _handle;
335 :
336 : /* Out parameters */
337 :
338 : /* Result */
339 0 : NDR_ZERO_STRUCT(state->orig.out.result);
340 :
341 : /* make a temporary copy, that we pass to the dispatch function */
342 0 : state->tmp = state->orig;
343 :
344 0 : subreq = dcerpc_lsa_Delete_r_send(state, ev, h, &state->tmp);
345 0 : if (tevent_req_nomem(subreq, req)) {
346 0 : return tevent_req_post(req, ev);
347 : }
348 0 : tevent_req_set_callback(subreq, dcerpc_lsa_Delete_done, req);
349 0 : return req;
350 : }
351 :
352 0 : static void dcerpc_lsa_Delete_done(struct tevent_req *subreq)
353 : {
354 0 : struct tevent_req *req = tevent_req_callback_data(
355 : subreq, struct tevent_req);
356 0 : struct dcerpc_lsa_Delete_state *state = tevent_req_data(
357 : req, struct dcerpc_lsa_Delete_state);
358 0 : NTSTATUS status;
359 0 : TALLOC_CTX *mem_ctx;
360 :
361 0 : if (state->out_mem_ctx) {
362 0 : mem_ctx = state->out_mem_ctx;
363 : } else {
364 0 : mem_ctx = state;
365 : }
366 :
367 0 : status = dcerpc_lsa_Delete_r_recv(subreq, mem_ctx);
368 0 : TALLOC_FREE(subreq);
369 0 : if (tevent_req_nterror(req, status)) {
370 0 : return;
371 : }
372 :
373 : /* Copy out parameters */
374 :
375 : /* Copy result */
376 0 : state->orig.out.result = state->tmp.out.result;
377 :
378 : /* Reset temporary structure */
379 0 : NDR_ZERO_STRUCT(state->tmp);
380 :
381 0 : tevent_req_done(req);
382 : }
383 :
384 0 : NTSTATUS dcerpc_lsa_Delete_recv(struct tevent_req *req,
385 : TALLOC_CTX *mem_ctx,
386 : NTSTATUS *result)
387 : {
388 0 : struct dcerpc_lsa_Delete_state *state = tevent_req_data(
389 : req, struct dcerpc_lsa_Delete_state);
390 0 : NTSTATUS status;
391 :
392 0 : if (tevent_req_is_nterror(req, &status)) {
393 0 : tevent_req_received(req);
394 0 : return status;
395 : }
396 :
397 : /* Steal possible out parameters to the callers context */
398 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
399 :
400 : /* Return result */
401 0 : *result = state->orig.out.result;
402 :
403 0 : tevent_req_received(req);
404 0 : return NT_STATUS_OK;
405 : }
406 :
407 0 : NTSTATUS dcerpc_lsa_Delete(struct dcerpc_binding_handle *h,
408 : TALLOC_CTX *mem_ctx,
409 : struct policy_handle *_handle /* [in] [ref] */,
410 : NTSTATUS *result)
411 : {
412 0 : struct lsa_Delete r;
413 0 : NTSTATUS status;
414 :
415 : /* In parameters */
416 0 : r.in.handle = _handle;
417 :
418 : /* Out parameters */
419 :
420 : /* Result */
421 0 : NDR_ZERO_STRUCT(r.out.result);
422 :
423 0 : status = dcerpc_lsa_Delete_r(h, mem_ctx, &r);
424 0 : if (!NT_STATUS_IS_OK(status)) {
425 0 : return status;
426 : }
427 :
428 : /* Return variables */
429 :
430 : /* Return result */
431 0 : *result = r.out.result;
432 :
433 0 : return NT_STATUS_OK;
434 : }
435 :
436 : struct dcerpc_lsa_EnumPrivs_r_state {
437 : TALLOC_CTX *out_mem_ctx;
438 : };
439 :
440 : static void dcerpc_lsa_EnumPrivs_r_done(struct tevent_req *subreq);
441 :
442 0 : struct tevent_req *dcerpc_lsa_EnumPrivs_r_send(TALLOC_CTX *mem_ctx,
443 : struct tevent_context *ev,
444 : struct dcerpc_binding_handle *h,
445 : struct lsa_EnumPrivs *r)
446 : {
447 0 : struct tevent_req *req;
448 0 : struct dcerpc_lsa_EnumPrivs_r_state *state;
449 0 : struct tevent_req *subreq;
450 :
451 0 : req = tevent_req_create(mem_ctx, &state,
452 : struct dcerpc_lsa_EnumPrivs_r_state);
453 0 : if (req == NULL) {
454 0 : return NULL;
455 : }
456 :
457 0 : state->out_mem_ctx = talloc_new(state);
458 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
459 0 : return tevent_req_post(req, ev);
460 : }
461 :
462 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
463 : NULL, &ndr_table_lsarpc,
464 0 : NDR_LSA_ENUMPRIVS, state->out_mem_ctx, r);
465 0 : if (tevent_req_nomem(subreq, req)) {
466 0 : return tevent_req_post(req, ev);
467 : }
468 0 : tevent_req_set_callback(subreq, dcerpc_lsa_EnumPrivs_r_done, req);
469 :
470 0 : return req;
471 : }
472 :
473 0 : static void dcerpc_lsa_EnumPrivs_r_done(struct tevent_req *subreq)
474 : {
475 0 : struct tevent_req *req =
476 0 : tevent_req_callback_data(subreq,
477 : struct tevent_req);
478 0 : NTSTATUS status;
479 :
480 0 : status = dcerpc_binding_handle_call_recv(subreq);
481 0 : TALLOC_FREE(subreq);
482 0 : if (tevent_req_nterror(req, status)) {
483 0 : return;
484 : }
485 :
486 0 : tevent_req_done(req);
487 : }
488 :
489 0 : NTSTATUS dcerpc_lsa_EnumPrivs_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
490 : {
491 0 : struct dcerpc_lsa_EnumPrivs_r_state *state =
492 0 : tevent_req_data(req,
493 : struct dcerpc_lsa_EnumPrivs_r_state);
494 0 : NTSTATUS status;
495 :
496 0 : if (tevent_req_is_nterror(req, &status)) {
497 0 : tevent_req_received(req);
498 0 : return status;
499 : }
500 :
501 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
502 :
503 0 : tevent_req_received(req);
504 0 : return NT_STATUS_OK;
505 : }
506 :
507 5 : NTSTATUS dcerpc_lsa_EnumPrivs_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_EnumPrivs *r)
508 : {
509 0 : NTSTATUS status;
510 :
511 5 : status = dcerpc_binding_handle_call(h,
512 : NULL, &ndr_table_lsarpc,
513 : NDR_LSA_ENUMPRIVS, mem_ctx, r);
514 :
515 5 : return status;
516 : }
517 :
518 : struct dcerpc_lsa_EnumPrivs_state {
519 : struct lsa_EnumPrivs orig;
520 : struct lsa_EnumPrivs tmp;
521 : TALLOC_CTX *out_mem_ctx;
522 : };
523 :
524 : static void dcerpc_lsa_EnumPrivs_done(struct tevent_req *subreq);
525 :
526 0 : struct tevent_req *dcerpc_lsa_EnumPrivs_send(TALLOC_CTX *mem_ctx,
527 : struct tevent_context *ev,
528 : struct dcerpc_binding_handle *h,
529 : struct policy_handle *_handle /* [in] [ref] */,
530 : uint32_t *_resume_handle /* [in,out] [ref] */,
531 : struct lsa_PrivArray *_privs /* [out] [ref] */,
532 : uint32_t _max_count /* [in] */)
533 : {
534 0 : struct tevent_req *req;
535 0 : struct dcerpc_lsa_EnumPrivs_state *state;
536 0 : struct tevent_req *subreq;
537 :
538 0 : req = tevent_req_create(mem_ctx, &state,
539 : struct dcerpc_lsa_EnumPrivs_state);
540 0 : if (req == NULL) {
541 0 : return NULL;
542 : }
543 0 : state->out_mem_ctx = NULL;
544 :
545 : /* In parameters */
546 0 : state->orig.in.handle = _handle;
547 0 : state->orig.in.resume_handle = _resume_handle;
548 0 : state->orig.in.max_count = _max_count;
549 :
550 : /* Out parameters */
551 0 : state->orig.out.resume_handle = _resume_handle;
552 0 : state->orig.out.privs = _privs;
553 :
554 : /* Result */
555 0 : NDR_ZERO_STRUCT(state->orig.out.result);
556 :
557 0 : state->out_mem_ctx = talloc_named_const(state, 0,
558 : "dcerpc_lsa_EnumPrivs_out_memory");
559 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
560 0 : return tevent_req_post(req, ev);
561 : }
562 :
563 : /* make a temporary copy, that we pass to the dispatch function */
564 0 : state->tmp = state->orig;
565 :
566 0 : subreq = dcerpc_lsa_EnumPrivs_r_send(state, ev, h, &state->tmp);
567 0 : if (tevent_req_nomem(subreq, req)) {
568 0 : return tevent_req_post(req, ev);
569 : }
570 0 : tevent_req_set_callback(subreq, dcerpc_lsa_EnumPrivs_done, req);
571 0 : return req;
572 : }
573 :
574 0 : static void dcerpc_lsa_EnumPrivs_done(struct tevent_req *subreq)
575 : {
576 0 : struct tevent_req *req = tevent_req_callback_data(
577 : subreq, struct tevent_req);
578 0 : struct dcerpc_lsa_EnumPrivs_state *state = tevent_req_data(
579 : req, struct dcerpc_lsa_EnumPrivs_state);
580 0 : NTSTATUS status;
581 0 : TALLOC_CTX *mem_ctx;
582 :
583 0 : if (state->out_mem_ctx) {
584 0 : mem_ctx = state->out_mem_ctx;
585 : } else {
586 0 : mem_ctx = state;
587 : }
588 :
589 0 : status = dcerpc_lsa_EnumPrivs_r_recv(subreq, mem_ctx);
590 0 : TALLOC_FREE(subreq);
591 0 : if (tevent_req_nterror(req, status)) {
592 0 : return;
593 : }
594 :
595 : /* Copy out parameters */
596 0 : *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
597 0 : *state->orig.out.privs = *state->tmp.out.privs;
598 :
599 : /* Copy result */
600 0 : state->orig.out.result = state->tmp.out.result;
601 :
602 : /* Reset temporary structure */
603 0 : NDR_ZERO_STRUCT(state->tmp);
604 :
605 0 : tevent_req_done(req);
606 : }
607 :
608 0 : NTSTATUS dcerpc_lsa_EnumPrivs_recv(struct tevent_req *req,
609 : TALLOC_CTX *mem_ctx,
610 : NTSTATUS *result)
611 : {
612 0 : struct dcerpc_lsa_EnumPrivs_state *state = tevent_req_data(
613 : req, struct dcerpc_lsa_EnumPrivs_state);
614 0 : NTSTATUS status;
615 :
616 0 : if (tevent_req_is_nterror(req, &status)) {
617 0 : tevent_req_received(req);
618 0 : return status;
619 : }
620 :
621 : /* Steal possible out parameters to the callers context */
622 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
623 :
624 : /* Return result */
625 0 : *result = state->orig.out.result;
626 :
627 0 : tevent_req_received(req);
628 0 : return NT_STATUS_OK;
629 : }
630 :
631 0 : NTSTATUS dcerpc_lsa_EnumPrivs(struct dcerpc_binding_handle *h,
632 : TALLOC_CTX *mem_ctx,
633 : struct policy_handle *_handle /* [in] [ref] */,
634 : uint32_t *_resume_handle /* [in,out] [ref] */,
635 : struct lsa_PrivArray *_privs /* [out] [ref] */,
636 : uint32_t _max_count /* [in] */,
637 : NTSTATUS *result)
638 : {
639 0 : struct lsa_EnumPrivs r;
640 0 : NTSTATUS status;
641 :
642 : /* In parameters */
643 0 : r.in.handle = _handle;
644 0 : r.in.resume_handle = _resume_handle;
645 0 : r.in.max_count = _max_count;
646 :
647 : /* Out parameters */
648 0 : r.out.resume_handle = _resume_handle;
649 0 : r.out.privs = _privs;
650 :
651 : /* Result */
652 0 : NDR_ZERO_STRUCT(r.out.result);
653 :
654 0 : status = dcerpc_lsa_EnumPrivs_r(h, mem_ctx, &r);
655 0 : if (!NT_STATUS_IS_OK(status)) {
656 0 : return status;
657 : }
658 :
659 : /* Return variables */
660 0 : *_resume_handle = *r.out.resume_handle;
661 0 : *_privs = *r.out.privs;
662 :
663 : /* Return result */
664 0 : *result = r.out.result;
665 :
666 0 : return NT_STATUS_OK;
667 : }
668 :
669 : struct dcerpc_lsa_QuerySecurity_r_state {
670 : TALLOC_CTX *out_mem_ctx;
671 : };
672 :
673 : static void dcerpc_lsa_QuerySecurity_r_done(struct tevent_req *subreq);
674 :
675 0 : struct tevent_req *dcerpc_lsa_QuerySecurity_r_send(TALLOC_CTX *mem_ctx,
676 : struct tevent_context *ev,
677 : struct dcerpc_binding_handle *h,
678 : struct lsa_QuerySecurity *r)
679 : {
680 0 : struct tevent_req *req;
681 0 : struct dcerpc_lsa_QuerySecurity_r_state *state;
682 0 : struct tevent_req *subreq;
683 :
684 0 : req = tevent_req_create(mem_ctx, &state,
685 : struct dcerpc_lsa_QuerySecurity_r_state);
686 0 : if (req == NULL) {
687 0 : return NULL;
688 : }
689 :
690 0 : state->out_mem_ctx = talloc_new(state);
691 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
692 0 : return tevent_req_post(req, ev);
693 : }
694 :
695 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
696 : NULL, &ndr_table_lsarpc,
697 0 : NDR_LSA_QUERYSECURITY, state->out_mem_ctx, r);
698 0 : if (tevent_req_nomem(subreq, req)) {
699 0 : return tevent_req_post(req, ev);
700 : }
701 0 : tevent_req_set_callback(subreq, dcerpc_lsa_QuerySecurity_r_done, req);
702 :
703 0 : return req;
704 : }
705 :
706 0 : static void dcerpc_lsa_QuerySecurity_r_done(struct tevent_req *subreq)
707 : {
708 0 : struct tevent_req *req =
709 0 : tevent_req_callback_data(subreq,
710 : struct tevent_req);
711 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_lsa_QuerySecurity_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
723 : {
724 0 : struct dcerpc_lsa_QuerySecurity_r_state *state =
725 0 : tevent_req_data(req,
726 : struct dcerpc_lsa_QuerySecurity_r_state);
727 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 60 : NTSTATUS dcerpc_lsa_QuerySecurity_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_QuerySecurity *r)
741 : {
742 12 : NTSTATUS status;
743 :
744 60 : status = dcerpc_binding_handle_call(h,
745 : NULL, &ndr_table_lsarpc,
746 : NDR_LSA_QUERYSECURITY, mem_ctx, r);
747 :
748 60 : return status;
749 : }
750 :
751 : struct dcerpc_lsa_QuerySecurity_state {
752 : struct lsa_QuerySecurity orig;
753 : struct lsa_QuerySecurity tmp;
754 : TALLOC_CTX *out_mem_ctx;
755 : };
756 :
757 : static void dcerpc_lsa_QuerySecurity_done(struct tevent_req *subreq);
758 :
759 0 : struct tevent_req *dcerpc_lsa_QuerySecurity_send(TALLOC_CTX *mem_ctx,
760 : struct tevent_context *ev,
761 : struct dcerpc_binding_handle *h,
762 : struct policy_handle *_handle /* [in] [ref] */,
763 : uint32_t _sec_info /* [in] */,
764 : struct sec_desc_buf **_sdbuf /* [out] [ref] */)
765 : {
766 0 : struct tevent_req *req;
767 0 : struct dcerpc_lsa_QuerySecurity_state *state;
768 0 : struct tevent_req *subreq;
769 :
770 0 : req = tevent_req_create(mem_ctx, &state,
771 : struct dcerpc_lsa_QuerySecurity_state);
772 0 : if (req == NULL) {
773 0 : return NULL;
774 : }
775 0 : state->out_mem_ctx = NULL;
776 :
777 : /* In parameters */
778 0 : state->orig.in.handle = _handle;
779 0 : state->orig.in.sec_info = _sec_info;
780 :
781 : /* Out parameters */
782 0 : state->orig.out.sdbuf = _sdbuf;
783 :
784 : /* Result */
785 0 : NDR_ZERO_STRUCT(state->orig.out.result);
786 :
787 0 : state->out_mem_ctx = talloc_named_const(state, 0,
788 : "dcerpc_lsa_QuerySecurity_out_memory");
789 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
790 0 : return tevent_req_post(req, ev);
791 : }
792 :
793 : /* make a temporary copy, that we pass to the dispatch function */
794 0 : state->tmp = state->orig;
795 :
796 0 : subreq = dcerpc_lsa_QuerySecurity_r_send(state, ev, h, &state->tmp);
797 0 : if (tevent_req_nomem(subreq, req)) {
798 0 : return tevent_req_post(req, ev);
799 : }
800 0 : tevent_req_set_callback(subreq, dcerpc_lsa_QuerySecurity_done, req);
801 0 : return req;
802 : }
803 :
804 0 : static void dcerpc_lsa_QuerySecurity_done(struct tevent_req *subreq)
805 : {
806 0 : struct tevent_req *req = tevent_req_callback_data(
807 : subreq, struct tevent_req);
808 0 : struct dcerpc_lsa_QuerySecurity_state *state = tevent_req_data(
809 : req, struct dcerpc_lsa_QuerySecurity_state);
810 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_lsa_QuerySecurity_r_recv(subreq, mem_ctx);
820 0 : TALLOC_FREE(subreq);
821 0 : if (tevent_req_nterror(req, status)) {
822 0 : return;
823 : }
824 :
825 : /* Copy out parameters */
826 0 : *state->orig.out.sdbuf = *state->tmp.out.sdbuf;
827 :
828 : /* Copy result */
829 0 : state->orig.out.result = state->tmp.out.result;
830 :
831 : /* Reset temporary structure */
832 0 : NDR_ZERO_STRUCT(state->tmp);
833 :
834 0 : tevent_req_done(req);
835 : }
836 :
837 0 : NTSTATUS dcerpc_lsa_QuerySecurity_recv(struct tevent_req *req,
838 : TALLOC_CTX *mem_ctx,
839 : NTSTATUS *result)
840 : {
841 0 : struct dcerpc_lsa_QuerySecurity_state *state = tevent_req_data(
842 : req, struct dcerpc_lsa_QuerySecurity_state);
843 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 0 : NTSTATUS dcerpc_lsa_QuerySecurity(struct dcerpc_binding_handle *h,
861 : TALLOC_CTX *mem_ctx,
862 : struct policy_handle *_handle /* [in] [ref] */,
863 : uint32_t _sec_info /* [in] */,
864 : struct sec_desc_buf **_sdbuf /* [out] [ref] */,
865 : NTSTATUS *result)
866 : {
867 0 : struct lsa_QuerySecurity r;
868 0 : NTSTATUS status;
869 :
870 : /* In parameters */
871 0 : r.in.handle = _handle;
872 0 : r.in.sec_info = _sec_info;
873 :
874 : /* Out parameters */
875 0 : r.out.sdbuf = _sdbuf;
876 :
877 : /* Result */
878 0 : NDR_ZERO_STRUCT(r.out.result);
879 :
880 0 : status = dcerpc_lsa_QuerySecurity_r(h, mem_ctx, &r);
881 0 : if (!NT_STATUS_IS_OK(status)) {
882 0 : return status;
883 : }
884 :
885 : /* Return variables */
886 0 : *_sdbuf = *r.out.sdbuf;
887 :
888 : /* Return result */
889 0 : *result = r.out.result;
890 :
891 0 : return NT_STATUS_OK;
892 : }
893 :
894 : struct dcerpc_lsa_SetSecObj_r_state {
895 : TALLOC_CTX *out_mem_ctx;
896 : };
897 :
898 : static void dcerpc_lsa_SetSecObj_r_done(struct tevent_req *subreq);
899 :
900 0 : struct tevent_req *dcerpc_lsa_SetSecObj_r_send(TALLOC_CTX *mem_ctx,
901 : struct tevent_context *ev,
902 : struct dcerpc_binding_handle *h,
903 : struct lsa_SetSecObj *r)
904 : {
905 0 : struct tevent_req *req;
906 0 : struct dcerpc_lsa_SetSecObj_r_state *state;
907 0 : struct tevent_req *subreq;
908 :
909 0 : req = tevent_req_create(mem_ctx, &state,
910 : struct dcerpc_lsa_SetSecObj_r_state);
911 0 : if (req == NULL) {
912 0 : return NULL;
913 : }
914 :
915 0 : state->out_mem_ctx = NULL;
916 :
917 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
918 : NULL, &ndr_table_lsarpc,
919 : NDR_LSA_SETSECOBJ, state, r);
920 0 : if (tevent_req_nomem(subreq, req)) {
921 0 : return tevent_req_post(req, ev);
922 : }
923 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetSecObj_r_done, req);
924 :
925 0 : return req;
926 : }
927 :
928 0 : static void dcerpc_lsa_SetSecObj_r_done(struct tevent_req *subreq)
929 : {
930 0 : struct tevent_req *req =
931 0 : tevent_req_callback_data(subreq,
932 : struct tevent_req);
933 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_lsa_SetSecObj_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
945 : {
946 0 : struct dcerpc_lsa_SetSecObj_r_state *state =
947 0 : tevent_req_data(req,
948 : struct dcerpc_lsa_SetSecObj_r_state);
949 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_lsa_SetSecObj_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_SetSecObj *r)
963 : {
964 0 : NTSTATUS status;
965 :
966 0 : status = dcerpc_binding_handle_call(h,
967 : NULL, &ndr_table_lsarpc,
968 : NDR_LSA_SETSECOBJ, mem_ctx, r);
969 :
970 0 : return status;
971 : }
972 :
973 : struct dcerpc_lsa_SetSecObj_state {
974 : struct lsa_SetSecObj orig;
975 : struct lsa_SetSecObj tmp;
976 : TALLOC_CTX *out_mem_ctx;
977 : };
978 :
979 : static void dcerpc_lsa_SetSecObj_done(struct tevent_req *subreq);
980 :
981 0 : struct tevent_req *dcerpc_lsa_SetSecObj_send(TALLOC_CTX *mem_ctx,
982 : struct tevent_context *ev,
983 : struct dcerpc_binding_handle *h,
984 : struct policy_handle *_handle /* [in] [ref] */,
985 : uint32_t _sec_info /* [in] */,
986 : struct sec_desc_buf *_sdbuf /* [in] [ref] */)
987 : {
988 0 : struct tevent_req *req;
989 0 : struct dcerpc_lsa_SetSecObj_state *state;
990 0 : struct tevent_req *subreq;
991 :
992 0 : req = tevent_req_create(mem_ctx, &state,
993 : struct dcerpc_lsa_SetSecObj_state);
994 0 : if (req == NULL) {
995 0 : return NULL;
996 : }
997 0 : state->out_mem_ctx = NULL;
998 :
999 : /* In parameters */
1000 0 : state->orig.in.handle = _handle;
1001 0 : state->orig.in.sec_info = _sec_info;
1002 0 : state->orig.in.sdbuf = _sdbuf;
1003 :
1004 : /* Out parameters */
1005 :
1006 : /* Result */
1007 0 : NDR_ZERO_STRUCT(state->orig.out.result);
1008 :
1009 : /* make a temporary copy, that we pass to the dispatch function */
1010 0 : state->tmp = state->orig;
1011 :
1012 0 : subreq = dcerpc_lsa_SetSecObj_r_send(state, ev, h, &state->tmp);
1013 0 : if (tevent_req_nomem(subreq, req)) {
1014 0 : return tevent_req_post(req, ev);
1015 : }
1016 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetSecObj_done, req);
1017 0 : return req;
1018 : }
1019 :
1020 0 : static void dcerpc_lsa_SetSecObj_done(struct tevent_req *subreq)
1021 : {
1022 0 : struct tevent_req *req = tevent_req_callback_data(
1023 : subreq, struct tevent_req);
1024 0 : struct dcerpc_lsa_SetSecObj_state *state = tevent_req_data(
1025 : req, struct dcerpc_lsa_SetSecObj_state);
1026 0 : NTSTATUS status;
1027 0 : TALLOC_CTX *mem_ctx;
1028 :
1029 0 : if (state->out_mem_ctx) {
1030 0 : mem_ctx = state->out_mem_ctx;
1031 : } else {
1032 0 : mem_ctx = state;
1033 : }
1034 :
1035 0 : status = dcerpc_lsa_SetSecObj_r_recv(subreq, mem_ctx);
1036 0 : TALLOC_FREE(subreq);
1037 0 : if (tevent_req_nterror(req, status)) {
1038 0 : return;
1039 : }
1040 :
1041 : /* Copy out parameters */
1042 :
1043 : /* Copy result */
1044 0 : state->orig.out.result = state->tmp.out.result;
1045 :
1046 : /* Reset temporary structure */
1047 0 : NDR_ZERO_STRUCT(state->tmp);
1048 :
1049 0 : tevent_req_done(req);
1050 : }
1051 :
1052 0 : NTSTATUS dcerpc_lsa_SetSecObj_recv(struct tevent_req *req,
1053 : TALLOC_CTX *mem_ctx,
1054 : NTSTATUS *result)
1055 : {
1056 0 : struct dcerpc_lsa_SetSecObj_state *state = tevent_req_data(
1057 : req, struct dcerpc_lsa_SetSecObj_state);
1058 0 : NTSTATUS status;
1059 :
1060 0 : if (tevent_req_is_nterror(req, &status)) {
1061 0 : tevent_req_received(req);
1062 0 : return status;
1063 : }
1064 :
1065 : /* Steal possible out parameters to the callers context */
1066 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1067 :
1068 : /* Return result */
1069 0 : *result = state->orig.out.result;
1070 :
1071 0 : tevent_req_received(req);
1072 0 : return NT_STATUS_OK;
1073 : }
1074 :
1075 0 : NTSTATUS dcerpc_lsa_SetSecObj(struct dcerpc_binding_handle *h,
1076 : TALLOC_CTX *mem_ctx,
1077 : struct policy_handle *_handle /* [in] [ref] */,
1078 : uint32_t _sec_info /* [in] */,
1079 : struct sec_desc_buf *_sdbuf /* [in] [ref] */,
1080 : NTSTATUS *result)
1081 : {
1082 0 : struct lsa_SetSecObj r;
1083 0 : NTSTATUS status;
1084 :
1085 : /* In parameters */
1086 0 : r.in.handle = _handle;
1087 0 : r.in.sec_info = _sec_info;
1088 0 : r.in.sdbuf = _sdbuf;
1089 :
1090 : /* Out parameters */
1091 :
1092 : /* Result */
1093 0 : NDR_ZERO_STRUCT(r.out.result);
1094 :
1095 0 : status = dcerpc_lsa_SetSecObj_r(h, mem_ctx, &r);
1096 0 : if (!NT_STATUS_IS_OK(status)) {
1097 0 : return status;
1098 : }
1099 :
1100 : /* Return variables */
1101 :
1102 : /* Return result */
1103 0 : *result = r.out.result;
1104 :
1105 0 : return NT_STATUS_OK;
1106 : }
1107 :
1108 : struct dcerpc_lsa_OpenPolicy_r_state {
1109 : TALLOC_CTX *out_mem_ctx;
1110 : };
1111 :
1112 : static void dcerpc_lsa_OpenPolicy_r_done(struct tevent_req *subreq);
1113 :
1114 0 : struct tevent_req *dcerpc_lsa_OpenPolicy_r_send(TALLOC_CTX *mem_ctx,
1115 : struct tevent_context *ev,
1116 : struct dcerpc_binding_handle *h,
1117 : struct lsa_OpenPolicy *r)
1118 : {
1119 0 : struct tevent_req *req;
1120 0 : struct dcerpc_lsa_OpenPolicy_r_state *state;
1121 0 : struct tevent_req *subreq;
1122 :
1123 0 : req = tevent_req_create(mem_ctx, &state,
1124 : struct dcerpc_lsa_OpenPolicy_r_state);
1125 0 : if (req == NULL) {
1126 0 : return NULL;
1127 : }
1128 :
1129 0 : state->out_mem_ctx = talloc_new(state);
1130 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
1131 0 : return tevent_req_post(req, ev);
1132 : }
1133 :
1134 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
1135 : NULL, &ndr_table_lsarpc,
1136 0 : NDR_LSA_OPENPOLICY, state->out_mem_ctx, r);
1137 0 : if (tevent_req_nomem(subreq, req)) {
1138 0 : return tevent_req_post(req, ev);
1139 : }
1140 0 : tevent_req_set_callback(subreq, dcerpc_lsa_OpenPolicy_r_done, req);
1141 :
1142 0 : return req;
1143 : }
1144 :
1145 0 : static void dcerpc_lsa_OpenPolicy_r_done(struct tevent_req *subreq)
1146 : {
1147 0 : struct tevent_req *req =
1148 0 : tevent_req_callback_data(subreq,
1149 : struct tevent_req);
1150 0 : NTSTATUS status;
1151 :
1152 0 : status = dcerpc_binding_handle_call_recv(subreq);
1153 0 : TALLOC_FREE(subreq);
1154 0 : if (tevent_req_nterror(req, status)) {
1155 0 : return;
1156 : }
1157 :
1158 0 : tevent_req_done(req);
1159 : }
1160 :
1161 0 : NTSTATUS dcerpc_lsa_OpenPolicy_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1162 : {
1163 0 : struct dcerpc_lsa_OpenPolicy_r_state *state =
1164 0 : tevent_req_data(req,
1165 : struct dcerpc_lsa_OpenPolicy_r_state);
1166 0 : NTSTATUS status;
1167 :
1168 0 : if (tevent_req_is_nterror(req, &status)) {
1169 0 : tevent_req_received(req);
1170 0 : return status;
1171 : }
1172 :
1173 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1174 :
1175 0 : tevent_req_received(req);
1176 0 : return NT_STATUS_OK;
1177 : }
1178 :
1179 8606 : NTSTATUS dcerpc_lsa_OpenPolicy_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_OpenPolicy *r)
1180 : {
1181 9 : NTSTATUS status;
1182 :
1183 8606 : status = dcerpc_binding_handle_call(h,
1184 : NULL, &ndr_table_lsarpc,
1185 : NDR_LSA_OPENPOLICY, mem_ctx, r);
1186 :
1187 8606 : return status;
1188 : }
1189 :
1190 : struct dcerpc_lsa_OpenPolicy_state {
1191 : struct lsa_OpenPolicy orig;
1192 : struct lsa_OpenPolicy tmp;
1193 : TALLOC_CTX *out_mem_ctx;
1194 : };
1195 :
1196 : static void dcerpc_lsa_OpenPolicy_done(struct tevent_req *subreq);
1197 :
1198 0 : struct tevent_req *dcerpc_lsa_OpenPolicy_send(TALLOC_CTX *mem_ctx,
1199 : struct tevent_context *ev,
1200 : struct dcerpc_binding_handle *h,
1201 : uint16_t *_system_name /* [in] [unique] */,
1202 : struct lsa_ObjectAttribute *_attr /* [in] [ref] */,
1203 : uint32_t _access_mask /* [in] */,
1204 : struct policy_handle *_handle /* [out] [ref] */)
1205 : {
1206 0 : struct tevent_req *req;
1207 0 : struct dcerpc_lsa_OpenPolicy_state *state;
1208 0 : struct tevent_req *subreq;
1209 :
1210 0 : req = tevent_req_create(mem_ctx, &state,
1211 : struct dcerpc_lsa_OpenPolicy_state);
1212 0 : if (req == NULL) {
1213 0 : return NULL;
1214 : }
1215 0 : state->out_mem_ctx = NULL;
1216 :
1217 : /* In parameters */
1218 0 : state->orig.in.system_name = _system_name;
1219 0 : state->orig.in.attr = _attr;
1220 0 : state->orig.in.access_mask = _access_mask;
1221 :
1222 : /* Out parameters */
1223 0 : state->orig.out.handle = _handle;
1224 :
1225 : /* Result */
1226 0 : NDR_ZERO_STRUCT(state->orig.out.result);
1227 :
1228 0 : state->out_mem_ctx = talloc_named_const(state, 0,
1229 : "dcerpc_lsa_OpenPolicy_out_memory");
1230 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
1231 0 : return tevent_req_post(req, ev);
1232 : }
1233 :
1234 : /* make a temporary copy, that we pass to the dispatch function */
1235 0 : state->tmp = state->orig;
1236 :
1237 0 : subreq = dcerpc_lsa_OpenPolicy_r_send(state, ev, h, &state->tmp);
1238 0 : if (tevent_req_nomem(subreq, req)) {
1239 0 : return tevent_req_post(req, ev);
1240 : }
1241 0 : tevent_req_set_callback(subreq, dcerpc_lsa_OpenPolicy_done, req);
1242 0 : return req;
1243 : }
1244 :
1245 0 : static void dcerpc_lsa_OpenPolicy_done(struct tevent_req *subreq)
1246 : {
1247 0 : struct tevent_req *req = tevent_req_callback_data(
1248 : subreq, struct tevent_req);
1249 0 : struct dcerpc_lsa_OpenPolicy_state *state = tevent_req_data(
1250 : req, struct dcerpc_lsa_OpenPolicy_state);
1251 0 : NTSTATUS status;
1252 0 : TALLOC_CTX *mem_ctx;
1253 :
1254 0 : if (state->out_mem_ctx) {
1255 0 : mem_ctx = state->out_mem_ctx;
1256 : } else {
1257 0 : mem_ctx = state;
1258 : }
1259 :
1260 0 : status = dcerpc_lsa_OpenPolicy_r_recv(subreq, mem_ctx);
1261 0 : TALLOC_FREE(subreq);
1262 0 : if (tevent_req_nterror(req, status)) {
1263 0 : return;
1264 : }
1265 :
1266 : /* Copy out parameters */
1267 0 : *state->orig.out.handle = *state->tmp.out.handle;
1268 :
1269 : /* Copy result */
1270 0 : state->orig.out.result = state->tmp.out.result;
1271 :
1272 : /* Reset temporary structure */
1273 0 : NDR_ZERO_STRUCT(state->tmp);
1274 :
1275 0 : tevent_req_done(req);
1276 : }
1277 :
1278 0 : NTSTATUS dcerpc_lsa_OpenPolicy_recv(struct tevent_req *req,
1279 : TALLOC_CTX *mem_ctx,
1280 : NTSTATUS *result)
1281 : {
1282 0 : struct dcerpc_lsa_OpenPolicy_state *state = tevent_req_data(
1283 : req, struct dcerpc_lsa_OpenPolicy_state);
1284 0 : NTSTATUS status;
1285 :
1286 0 : if (tevent_req_is_nterror(req, &status)) {
1287 0 : tevent_req_received(req);
1288 0 : return status;
1289 : }
1290 :
1291 : /* Steal possible out parameters to the callers context */
1292 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1293 :
1294 : /* Return result */
1295 0 : *result = state->orig.out.result;
1296 :
1297 0 : tevent_req_received(req);
1298 0 : return NT_STATUS_OK;
1299 : }
1300 :
1301 8500 : NTSTATUS dcerpc_lsa_OpenPolicy(struct dcerpc_binding_handle *h,
1302 : TALLOC_CTX *mem_ctx,
1303 : uint16_t *_system_name /* [in] [unique] */,
1304 : struct lsa_ObjectAttribute *_attr /* [in] [ref] */,
1305 : uint32_t _access_mask /* [in] */,
1306 : struct policy_handle *_handle /* [out] [ref] */,
1307 : NTSTATUS *result)
1308 : {
1309 0 : struct lsa_OpenPolicy r;
1310 0 : NTSTATUS status;
1311 :
1312 : /* In parameters */
1313 8500 : r.in.system_name = _system_name;
1314 8500 : r.in.attr = _attr;
1315 8500 : r.in.access_mask = _access_mask;
1316 :
1317 : /* Out parameters */
1318 8500 : r.out.handle = _handle;
1319 :
1320 : /* Result */
1321 8500 : NDR_ZERO_STRUCT(r.out.result);
1322 :
1323 8500 : status = dcerpc_lsa_OpenPolicy_r(h, mem_ctx, &r);
1324 8500 : if (!NT_STATUS_IS_OK(status)) {
1325 0 : return status;
1326 : }
1327 :
1328 : /* Return variables */
1329 8500 : *_handle = *r.out.handle;
1330 :
1331 : /* Return result */
1332 8500 : *result = r.out.result;
1333 :
1334 8500 : return NT_STATUS_OK;
1335 : }
1336 :
1337 : struct dcerpc_lsa_QueryInfoPolicy_r_state {
1338 : TALLOC_CTX *out_mem_ctx;
1339 : };
1340 :
1341 : static void dcerpc_lsa_QueryInfoPolicy_r_done(struct tevent_req *subreq);
1342 :
1343 569 : struct tevent_req *dcerpc_lsa_QueryInfoPolicy_r_send(TALLOC_CTX *mem_ctx,
1344 : struct tevent_context *ev,
1345 : struct dcerpc_binding_handle *h,
1346 : struct lsa_QueryInfoPolicy *r)
1347 : {
1348 72 : struct tevent_req *req;
1349 72 : struct dcerpc_lsa_QueryInfoPolicy_r_state *state;
1350 72 : struct tevent_req *subreq;
1351 :
1352 569 : req = tevent_req_create(mem_ctx, &state,
1353 : struct dcerpc_lsa_QueryInfoPolicy_r_state);
1354 569 : if (req == NULL) {
1355 0 : return NULL;
1356 : }
1357 :
1358 569 : state->out_mem_ctx = talloc_new(state);
1359 569 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
1360 0 : return tevent_req_post(req, ev);
1361 : }
1362 :
1363 641 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
1364 : NULL, &ndr_table_lsarpc,
1365 569 : NDR_LSA_QUERYINFOPOLICY, state->out_mem_ctx, r);
1366 569 : if (tevent_req_nomem(subreq, req)) {
1367 0 : return tevent_req_post(req, ev);
1368 : }
1369 569 : tevent_req_set_callback(subreq, dcerpc_lsa_QueryInfoPolicy_r_done, req);
1370 :
1371 569 : return req;
1372 : }
1373 :
1374 569 : static void dcerpc_lsa_QueryInfoPolicy_r_done(struct tevent_req *subreq)
1375 : {
1376 72 : struct tevent_req *req =
1377 569 : tevent_req_callback_data(subreq,
1378 : struct tevent_req);
1379 72 : NTSTATUS status;
1380 :
1381 569 : status = dcerpc_binding_handle_call_recv(subreq);
1382 569 : TALLOC_FREE(subreq);
1383 569 : if (tevent_req_nterror(req, status)) {
1384 0 : return;
1385 : }
1386 :
1387 569 : tevent_req_done(req);
1388 : }
1389 :
1390 569 : NTSTATUS dcerpc_lsa_QueryInfoPolicy_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1391 : {
1392 72 : struct dcerpc_lsa_QueryInfoPolicy_r_state *state =
1393 569 : tevent_req_data(req,
1394 : struct dcerpc_lsa_QueryInfoPolicy_r_state);
1395 72 : NTSTATUS status;
1396 :
1397 569 : if (tevent_req_is_nterror(req, &status)) {
1398 0 : tevent_req_received(req);
1399 0 : return status;
1400 : }
1401 :
1402 569 : talloc_steal(mem_ctx, state->out_mem_ctx);
1403 :
1404 569 : tevent_req_received(req);
1405 569 : return NT_STATUS_OK;
1406 : }
1407 :
1408 1118 : NTSTATUS dcerpc_lsa_QueryInfoPolicy_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_QueryInfoPolicy *r)
1409 : {
1410 0 : NTSTATUS status;
1411 :
1412 1118 : status = dcerpc_binding_handle_call(h,
1413 : NULL, &ndr_table_lsarpc,
1414 : NDR_LSA_QUERYINFOPOLICY, mem_ctx, r);
1415 :
1416 1118 : return status;
1417 : }
1418 :
1419 : struct dcerpc_lsa_QueryInfoPolicy_state {
1420 : struct lsa_QueryInfoPolicy orig;
1421 : struct lsa_QueryInfoPolicy tmp;
1422 : TALLOC_CTX *out_mem_ctx;
1423 : };
1424 :
1425 : static void dcerpc_lsa_QueryInfoPolicy_done(struct tevent_req *subreq);
1426 :
1427 0 : struct tevent_req *dcerpc_lsa_QueryInfoPolicy_send(TALLOC_CTX *mem_ctx,
1428 : struct tevent_context *ev,
1429 : struct dcerpc_binding_handle *h,
1430 : struct policy_handle *_handle /* [in] [ref] */,
1431 : enum lsa_PolicyInfo _level /* [in] */,
1432 : union lsa_PolicyInformation **_info /* [out] [ref,switch_is(level)] */)
1433 : {
1434 0 : struct tevent_req *req;
1435 0 : struct dcerpc_lsa_QueryInfoPolicy_state *state;
1436 0 : struct tevent_req *subreq;
1437 :
1438 0 : req = tevent_req_create(mem_ctx, &state,
1439 : struct dcerpc_lsa_QueryInfoPolicy_state);
1440 0 : if (req == NULL) {
1441 0 : return NULL;
1442 : }
1443 0 : state->out_mem_ctx = NULL;
1444 :
1445 : /* In parameters */
1446 0 : state->orig.in.handle = _handle;
1447 0 : state->orig.in.level = _level;
1448 :
1449 : /* Out parameters */
1450 0 : state->orig.out.info = _info;
1451 :
1452 : /* Result */
1453 0 : NDR_ZERO_STRUCT(state->orig.out.result);
1454 :
1455 0 : state->out_mem_ctx = talloc_named_const(state, 0,
1456 : "dcerpc_lsa_QueryInfoPolicy_out_memory");
1457 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
1458 0 : return tevent_req_post(req, ev);
1459 : }
1460 :
1461 : /* make a temporary copy, that we pass to the dispatch function */
1462 0 : state->tmp = state->orig;
1463 :
1464 0 : subreq = dcerpc_lsa_QueryInfoPolicy_r_send(state, ev, h, &state->tmp);
1465 0 : if (tevent_req_nomem(subreq, req)) {
1466 0 : return tevent_req_post(req, ev);
1467 : }
1468 0 : tevent_req_set_callback(subreq, dcerpc_lsa_QueryInfoPolicy_done, req);
1469 0 : return req;
1470 : }
1471 :
1472 0 : static void dcerpc_lsa_QueryInfoPolicy_done(struct tevent_req *subreq)
1473 : {
1474 0 : struct tevent_req *req = tevent_req_callback_data(
1475 : subreq, struct tevent_req);
1476 0 : struct dcerpc_lsa_QueryInfoPolicy_state *state = tevent_req_data(
1477 : req, struct dcerpc_lsa_QueryInfoPolicy_state);
1478 0 : NTSTATUS status;
1479 0 : TALLOC_CTX *mem_ctx;
1480 :
1481 0 : if (state->out_mem_ctx) {
1482 0 : mem_ctx = state->out_mem_ctx;
1483 : } else {
1484 0 : mem_ctx = state;
1485 : }
1486 :
1487 0 : status = dcerpc_lsa_QueryInfoPolicy_r_recv(subreq, mem_ctx);
1488 0 : TALLOC_FREE(subreq);
1489 0 : if (tevent_req_nterror(req, status)) {
1490 0 : return;
1491 : }
1492 :
1493 : /* Copy out parameters */
1494 0 : *state->orig.out.info = *state->tmp.out.info;
1495 :
1496 : /* Copy result */
1497 0 : state->orig.out.result = state->tmp.out.result;
1498 :
1499 : /* Reset temporary structure */
1500 0 : NDR_ZERO_STRUCT(state->tmp);
1501 :
1502 0 : tevent_req_done(req);
1503 : }
1504 :
1505 0 : NTSTATUS dcerpc_lsa_QueryInfoPolicy_recv(struct tevent_req *req,
1506 : TALLOC_CTX *mem_ctx,
1507 : NTSTATUS *result)
1508 : {
1509 0 : struct dcerpc_lsa_QueryInfoPolicy_state *state = tevent_req_data(
1510 : req, struct dcerpc_lsa_QueryInfoPolicy_state);
1511 0 : NTSTATUS status;
1512 :
1513 0 : if (tevent_req_is_nterror(req, &status)) {
1514 0 : tevent_req_received(req);
1515 0 : return status;
1516 : }
1517 :
1518 : /* Steal possible out parameters to the callers context */
1519 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1520 :
1521 : /* Return result */
1522 0 : *result = state->orig.out.result;
1523 :
1524 0 : tevent_req_received(req);
1525 0 : return NT_STATUS_OK;
1526 : }
1527 :
1528 894 : NTSTATUS dcerpc_lsa_QueryInfoPolicy(struct dcerpc_binding_handle *h,
1529 : TALLOC_CTX *mem_ctx,
1530 : struct policy_handle *_handle /* [in] [ref] */,
1531 : enum lsa_PolicyInfo _level /* [in] */,
1532 : union lsa_PolicyInformation **_info /* [out] [ref,switch_is(level)] */,
1533 : NTSTATUS *result)
1534 : {
1535 0 : struct lsa_QueryInfoPolicy r;
1536 0 : NTSTATUS status;
1537 :
1538 : /* In parameters */
1539 894 : r.in.handle = _handle;
1540 894 : r.in.level = _level;
1541 :
1542 : /* Out parameters */
1543 894 : r.out.info = _info;
1544 :
1545 : /* Result */
1546 894 : NDR_ZERO_STRUCT(r.out.result);
1547 :
1548 894 : status = dcerpc_lsa_QueryInfoPolicy_r(h, mem_ctx, &r);
1549 894 : if (!NT_STATUS_IS_OK(status)) {
1550 0 : return status;
1551 : }
1552 :
1553 : /* Return variables */
1554 894 : *_info = *r.out.info;
1555 :
1556 : /* Return result */
1557 894 : *result = r.out.result;
1558 :
1559 894 : return NT_STATUS_OK;
1560 : }
1561 :
1562 : struct dcerpc_lsa_SetInfoPolicy_r_state {
1563 : TALLOC_CTX *out_mem_ctx;
1564 : };
1565 :
1566 : static void dcerpc_lsa_SetInfoPolicy_r_done(struct tevent_req *subreq);
1567 :
1568 0 : struct tevent_req *dcerpc_lsa_SetInfoPolicy_r_send(TALLOC_CTX *mem_ctx,
1569 : struct tevent_context *ev,
1570 : struct dcerpc_binding_handle *h,
1571 : struct lsa_SetInfoPolicy *r)
1572 : {
1573 0 : struct tevent_req *req;
1574 0 : struct dcerpc_lsa_SetInfoPolicy_r_state *state;
1575 0 : struct tevent_req *subreq;
1576 :
1577 0 : req = tevent_req_create(mem_ctx, &state,
1578 : struct dcerpc_lsa_SetInfoPolicy_r_state);
1579 0 : if (req == NULL) {
1580 0 : return NULL;
1581 : }
1582 :
1583 0 : state->out_mem_ctx = NULL;
1584 :
1585 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
1586 : NULL, &ndr_table_lsarpc,
1587 : NDR_LSA_SETINFOPOLICY, state, r);
1588 0 : if (tevent_req_nomem(subreq, req)) {
1589 0 : return tevent_req_post(req, ev);
1590 : }
1591 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetInfoPolicy_r_done, req);
1592 :
1593 0 : return req;
1594 : }
1595 :
1596 0 : static void dcerpc_lsa_SetInfoPolicy_r_done(struct tevent_req *subreq)
1597 : {
1598 0 : struct tevent_req *req =
1599 0 : tevent_req_callback_data(subreq,
1600 : struct tevent_req);
1601 0 : NTSTATUS status;
1602 :
1603 0 : status = dcerpc_binding_handle_call_recv(subreq);
1604 0 : TALLOC_FREE(subreq);
1605 0 : if (tevent_req_nterror(req, status)) {
1606 0 : return;
1607 : }
1608 :
1609 0 : tevent_req_done(req);
1610 : }
1611 :
1612 0 : NTSTATUS dcerpc_lsa_SetInfoPolicy_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1613 : {
1614 0 : struct dcerpc_lsa_SetInfoPolicy_r_state *state =
1615 0 : tevent_req_data(req,
1616 : struct dcerpc_lsa_SetInfoPolicy_r_state);
1617 0 : NTSTATUS status;
1618 :
1619 0 : if (tevent_req_is_nterror(req, &status)) {
1620 0 : tevent_req_received(req);
1621 0 : return status;
1622 : }
1623 :
1624 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1625 :
1626 0 : tevent_req_received(req);
1627 0 : return NT_STATUS_OK;
1628 : }
1629 :
1630 0 : NTSTATUS dcerpc_lsa_SetInfoPolicy_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_SetInfoPolicy *r)
1631 : {
1632 0 : NTSTATUS status;
1633 :
1634 0 : status = dcerpc_binding_handle_call(h,
1635 : NULL, &ndr_table_lsarpc,
1636 : NDR_LSA_SETINFOPOLICY, mem_ctx, r);
1637 :
1638 0 : return status;
1639 : }
1640 :
1641 : struct dcerpc_lsa_SetInfoPolicy_state {
1642 : struct lsa_SetInfoPolicy orig;
1643 : struct lsa_SetInfoPolicy tmp;
1644 : TALLOC_CTX *out_mem_ctx;
1645 : };
1646 :
1647 : static void dcerpc_lsa_SetInfoPolicy_done(struct tevent_req *subreq);
1648 :
1649 0 : struct tevent_req *dcerpc_lsa_SetInfoPolicy_send(TALLOC_CTX *mem_ctx,
1650 : struct tevent_context *ev,
1651 : struct dcerpc_binding_handle *h,
1652 : struct policy_handle *_handle /* [in] [ref] */,
1653 : enum lsa_PolicyInfo _level /* [in] */,
1654 : union lsa_PolicyInformation *_info /* [in] [ref,switch_is(level)] */)
1655 : {
1656 0 : struct tevent_req *req;
1657 0 : struct dcerpc_lsa_SetInfoPolicy_state *state;
1658 0 : struct tevent_req *subreq;
1659 :
1660 0 : req = tevent_req_create(mem_ctx, &state,
1661 : struct dcerpc_lsa_SetInfoPolicy_state);
1662 0 : if (req == NULL) {
1663 0 : return NULL;
1664 : }
1665 0 : state->out_mem_ctx = NULL;
1666 :
1667 : /* In parameters */
1668 0 : state->orig.in.handle = _handle;
1669 0 : state->orig.in.level = _level;
1670 0 : state->orig.in.info = _info;
1671 :
1672 : /* Out parameters */
1673 :
1674 : /* Result */
1675 0 : NDR_ZERO_STRUCT(state->orig.out.result);
1676 :
1677 : /* make a temporary copy, that we pass to the dispatch function */
1678 0 : state->tmp = state->orig;
1679 :
1680 0 : subreq = dcerpc_lsa_SetInfoPolicy_r_send(state, ev, h, &state->tmp);
1681 0 : if (tevent_req_nomem(subreq, req)) {
1682 0 : return tevent_req_post(req, ev);
1683 : }
1684 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetInfoPolicy_done, req);
1685 0 : return req;
1686 : }
1687 :
1688 0 : static void dcerpc_lsa_SetInfoPolicy_done(struct tevent_req *subreq)
1689 : {
1690 0 : struct tevent_req *req = tevent_req_callback_data(
1691 : subreq, struct tevent_req);
1692 0 : struct dcerpc_lsa_SetInfoPolicy_state *state = tevent_req_data(
1693 : req, struct dcerpc_lsa_SetInfoPolicy_state);
1694 0 : NTSTATUS status;
1695 0 : TALLOC_CTX *mem_ctx;
1696 :
1697 0 : if (state->out_mem_ctx) {
1698 0 : mem_ctx = state->out_mem_ctx;
1699 : } else {
1700 0 : mem_ctx = state;
1701 : }
1702 :
1703 0 : status = dcerpc_lsa_SetInfoPolicy_r_recv(subreq, mem_ctx);
1704 0 : TALLOC_FREE(subreq);
1705 0 : if (tevent_req_nterror(req, status)) {
1706 0 : return;
1707 : }
1708 :
1709 : /* Copy out parameters */
1710 :
1711 : /* Copy result */
1712 0 : state->orig.out.result = state->tmp.out.result;
1713 :
1714 : /* Reset temporary structure */
1715 0 : NDR_ZERO_STRUCT(state->tmp);
1716 :
1717 0 : tevent_req_done(req);
1718 : }
1719 :
1720 0 : NTSTATUS dcerpc_lsa_SetInfoPolicy_recv(struct tevent_req *req,
1721 : TALLOC_CTX *mem_ctx,
1722 : NTSTATUS *result)
1723 : {
1724 0 : struct dcerpc_lsa_SetInfoPolicy_state *state = tevent_req_data(
1725 : req, struct dcerpc_lsa_SetInfoPolicy_state);
1726 0 : NTSTATUS status;
1727 :
1728 0 : if (tevent_req_is_nterror(req, &status)) {
1729 0 : tevent_req_received(req);
1730 0 : return status;
1731 : }
1732 :
1733 : /* Steal possible out parameters to the callers context */
1734 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1735 :
1736 : /* Return result */
1737 0 : *result = state->orig.out.result;
1738 :
1739 0 : tevent_req_received(req);
1740 0 : return NT_STATUS_OK;
1741 : }
1742 :
1743 0 : NTSTATUS dcerpc_lsa_SetInfoPolicy(struct dcerpc_binding_handle *h,
1744 : TALLOC_CTX *mem_ctx,
1745 : struct policy_handle *_handle /* [in] [ref] */,
1746 : enum lsa_PolicyInfo _level /* [in] */,
1747 : union lsa_PolicyInformation *_info /* [in] [ref,switch_is(level)] */,
1748 : NTSTATUS *result)
1749 : {
1750 0 : struct lsa_SetInfoPolicy r;
1751 0 : NTSTATUS status;
1752 :
1753 : /* In parameters */
1754 0 : r.in.handle = _handle;
1755 0 : r.in.level = _level;
1756 0 : r.in.info = _info;
1757 :
1758 : /* Out parameters */
1759 :
1760 : /* Result */
1761 0 : NDR_ZERO_STRUCT(r.out.result);
1762 :
1763 0 : status = dcerpc_lsa_SetInfoPolicy_r(h, mem_ctx, &r);
1764 0 : if (!NT_STATUS_IS_OK(status)) {
1765 0 : return status;
1766 : }
1767 :
1768 : /* Return variables */
1769 :
1770 : /* Return result */
1771 0 : *result = r.out.result;
1772 :
1773 0 : return NT_STATUS_OK;
1774 : }
1775 :
1776 : struct dcerpc_lsa_CreateAccount_r_state {
1777 : TALLOC_CTX *out_mem_ctx;
1778 : };
1779 :
1780 : static void dcerpc_lsa_CreateAccount_r_done(struct tevent_req *subreq);
1781 :
1782 0 : struct tevent_req *dcerpc_lsa_CreateAccount_r_send(TALLOC_CTX *mem_ctx,
1783 : struct tevent_context *ev,
1784 : struct dcerpc_binding_handle *h,
1785 : struct lsa_CreateAccount *r)
1786 : {
1787 0 : struct tevent_req *req;
1788 0 : struct dcerpc_lsa_CreateAccount_r_state *state;
1789 0 : struct tevent_req *subreq;
1790 :
1791 0 : req = tevent_req_create(mem_ctx, &state,
1792 : struct dcerpc_lsa_CreateAccount_r_state);
1793 0 : if (req == NULL) {
1794 0 : return NULL;
1795 : }
1796 :
1797 0 : state->out_mem_ctx = talloc_new(state);
1798 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
1799 0 : return tevent_req_post(req, ev);
1800 : }
1801 :
1802 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
1803 : NULL, &ndr_table_lsarpc,
1804 0 : NDR_LSA_CREATEACCOUNT, state->out_mem_ctx, r);
1805 0 : if (tevent_req_nomem(subreq, req)) {
1806 0 : return tevent_req_post(req, ev);
1807 : }
1808 0 : tevent_req_set_callback(subreq, dcerpc_lsa_CreateAccount_r_done, req);
1809 :
1810 0 : return req;
1811 : }
1812 :
1813 0 : static void dcerpc_lsa_CreateAccount_r_done(struct tevent_req *subreq)
1814 : {
1815 0 : struct tevent_req *req =
1816 0 : tevent_req_callback_data(subreq,
1817 : struct tevent_req);
1818 0 : NTSTATUS status;
1819 :
1820 0 : status = dcerpc_binding_handle_call_recv(subreq);
1821 0 : TALLOC_FREE(subreq);
1822 0 : if (tevent_req_nterror(req, status)) {
1823 0 : return;
1824 : }
1825 :
1826 0 : tevent_req_done(req);
1827 : }
1828 :
1829 0 : NTSTATUS dcerpc_lsa_CreateAccount_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1830 : {
1831 0 : struct dcerpc_lsa_CreateAccount_r_state *state =
1832 0 : tevent_req_data(req,
1833 : struct dcerpc_lsa_CreateAccount_r_state);
1834 0 : NTSTATUS status;
1835 :
1836 0 : if (tevent_req_is_nterror(req, &status)) {
1837 0 : tevent_req_received(req);
1838 0 : return status;
1839 : }
1840 :
1841 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1842 :
1843 0 : tevent_req_received(req);
1844 0 : return NT_STATUS_OK;
1845 : }
1846 :
1847 5 : NTSTATUS dcerpc_lsa_CreateAccount_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_CreateAccount *r)
1848 : {
1849 0 : NTSTATUS status;
1850 :
1851 5 : status = dcerpc_binding_handle_call(h,
1852 : NULL, &ndr_table_lsarpc,
1853 : NDR_LSA_CREATEACCOUNT, mem_ctx, r);
1854 :
1855 5 : return status;
1856 : }
1857 :
1858 : struct dcerpc_lsa_CreateAccount_state {
1859 : struct lsa_CreateAccount orig;
1860 : struct lsa_CreateAccount tmp;
1861 : TALLOC_CTX *out_mem_ctx;
1862 : };
1863 :
1864 : static void dcerpc_lsa_CreateAccount_done(struct tevent_req *subreq);
1865 :
1866 0 : struct tevent_req *dcerpc_lsa_CreateAccount_send(TALLOC_CTX *mem_ctx,
1867 : struct tevent_context *ev,
1868 : struct dcerpc_binding_handle *h,
1869 : struct policy_handle *_handle /* [in] [ref] */,
1870 : struct dom_sid2 *_sid /* [in] [ref] */,
1871 : uint32_t _access_mask /* [in] */,
1872 : struct policy_handle *_acct_handle /* [out] [ref] */)
1873 : {
1874 0 : struct tevent_req *req;
1875 0 : struct dcerpc_lsa_CreateAccount_state *state;
1876 0 : struct tevent_req *subreq;
1877 :
1878 0 : req = tevent_req_create(mem_ctx, &state,
1879 : struct dcerpc_lsa_CreateAccount_state);
1880 0 : if (req == NULL) {
1881 0 : return NULL;
1882 : }
1883 0 : state->out_mem_ctx = NULL;
1884 :
1885 : /* In parameters */
1886 0 : state->orig.in.handle = _handle;
1887 0 : state->orig.in.sid = _sid;
1888 0 : state->orig.in.access_mask = _access_mask;
1889 :
1890 : /* Out parameters */
1891 0 : state->orig.out.acct_handle = _acct_handle;
1892 :
1893 : /* Result */
1894 0 : NDR_ZERO_STRUCT(state->orig.out.result);
1895 :
1896 0 : state->out_mem_ctx = talloc_named_const(state, 0,
1897 : "dcerpc_lsa_CreateAccount_out_memory");
1898 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
1899 0 : return tevent_req_post(req, ev);
1900 : }
1901 :
1902 : /* make a temporary copy, that we pass to the dispatch function */
1903 0 : state->tmp = state->orig;
1904 :
1905 0 : subreq = dcerpc_lsa_CreateAccount_r_send(state, ev, h, &state->tmp);
1906 0 : if (tevent_req_nomem(subreq, req)) {
1907 0 : return tevent_req_post(req, ev);
1908 : }
1909 0 : tevent_req_set_callback(subreq, dcerpc_lsa_CreateAccount_done, req);
1910 0 : return req;
1911 : }
1912 :
1913 0 : static void dcerpc_lsa_CreateAccount_done(struct tevent_req *subreq)
1914 : {
1915 0 : struct tevent_req *req = tevent_req_callback_data(
1916 : subreq, struct tevent_req);
1917 0 : struct dcerpc_lsa_CreateAccount_state *state = tevent_req_data(
1918 : req, struct dcerpc_lsa_CreateAccount_state);
1919 0 : NTSTATUS status;
1920 0 : TALLOC_CTX *mem_ctx;
1921 :
1922 0 : if (state->out_mem_ctx) {
1923 0 : mem_ctx = state->out_mem_ctx;
1924 : } else {
1925 0 : mem_ctx = state;
1926 : }
1927 :
1928 0 : status = dcerpc_lsa_CreateAccount_r_recv(subreq, mem_ctx);
1929 0 : TALLOC_FREE(subreq);
1930 0 : if (tevent_req_nterror(req, status)) {
1931 0 : return;
1932 : }
1933 :
1934 : /* Copy out parameters */
1935 0 : *state->orig.out.acct_handle = *state->tmp.out.acct_handle;
1936 :
1937 : /* Copy result */
1938 0 : state->orig.out.result = state->tmp.out.result;
1939 :
1940 : /* Reset temporary structure */
1941 0 : NDR_ZERO_STRUCT(state->tmp);
1942 :
1943 0 : tevent_req_done(req);
1944 : }
1945 :
1946 0 : NTSTATUS dcerpc_lsa_CreateAccount_recv(struct tevent_req *req,
1947 : TALLOC_CTX *mem_ctx,
1948 : NTSTATUS *result)
1949 : {
1950 0 : struct dcerpc_lsa_CreateAccount_state *state = tevent_req_data(
1951 : req, struct dcerpc_lsa_CreateAccount_state);
1952 0 : NTSTATUS status;
1953 :
1954 0 : if (tevent_req_is_nterror(req, &status)) {
1955 0 : tevent_req_received(req);
1956 0 : return status;
1957 : }
1958 :
1959 : /* Steal possible out parameters to the callers context */
1960 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1961 :
1962 : /* Return result */
1963 0 : *result = state->orig.out.result;
1964 :
1965 0 : tevent_req_received(req);
1966 0 : return NT_STATUS_OK;
1967 : }
1968 :
1969 0 : NTSTATUS dcerpc_lsa_CreateAccount(struct dcerpc_binding_handle *h,
1970 : TALLOC_CTX *mem_ctx,
1971 : struct policy_handle *_handle /* [in] [ref] */,
1972 : struct dom_sid2 *_sid /* [in] [ref] */,
1973 : uint32_t _access_mask /* [in] */,
1974 : struct policy_handle *_acct_handle /* [out] [ref] */,
1975 : NTSTATUS *result)
1976 : {
1977 0 : struct lsa_CreateAccount r;
1978 0 : NTSTATUS status;
1979 :
1980 : /* In parameters */
1981 0 : r.in.handle = _handle;
1982 0 : r.in.sid = _sid;
1983 0 : r.in.access_mask = _access_mask;
1984 :
1985 : /* Out parameters */
1986 0 : r.out.acct_handle = _acct_handle;
1987 :
1988 : /* Result */
1989 0 : NDR_ZERO_STRUCT(r.out.result);
1990 :
1991 0 : status = dcerpc_lsa_CreateAccount_r(h, mem_ctx, &r);
1992 0 : if (!NT_STATUS_IS_OK(status)) {
1993 0 : return status;
1994 : }
1995 :
1996 : /* Return variables */
1997 0 : *_acct_handle = *r.out.acct_handle;
1998 :
1999 : /* Return result */
2000 0 : *result = r.out.result;
2001 :
2002 0 : return NT_STATUS_OK;
2003 : }
2004 :
2005 : struct dcerpc_lsa_EnumAccounts_r_state {
2006 : TALLOC_CTX *out_mem_ctx;
2007 : };
2008 :
2009 : static void dcerpc_lsa_EnumAccounts_r_done(struct tevent_req *subreq);
2010 :
2011 0 : struct tevent_req *dcerpc_lsa_EnumAccounts_r_send(TALLOC_CTX *mem_ctx,
2012 : struct tevent_context *ev,
2013 : struct dcerpc_binding_handle *h,
2014 : struct lsa_EnumAccounts *r)
2015 : {
2016 0 : struct tevent_req *req;
2017 0 : struct dcerpc_lsa_EnumAccounts_r_state *state;
2018 0 : struct tevent_req *subreq;
2019 :
2020 0 : req = tevent_req_create(mem_ctx, &state,
2021 : struct dcerpc_lsa_EnumAccounts_r_state);
2022 0 : if (req == NULL) {
2023 0 : return NULL;
2024 : }
2025 :
2026 0 : state->out_mem_ctx = talloc_new(state);
2027 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2028 0 : return tevent_req_post(req, ev);
2029 : }
2030 :
2031 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
2032 : NULL, &ndr_table_lsarpc,
2033 0 : NDR_LSA_ENUMACCOUNTS, state->out_mem_ctx, r);
2034 0 : if (tevent_req_nomem(subreq, req)) {
2035 0 : return tevent_req_post(req, ev);
2036 : }
2037 0 : tevent_req_set_callback(subreq, dcerpc_lsa_EnumAccounts_r_done, req);
2038 :
2039 0 : return req;
2040 : }
2041 :
2042 0 : static void dcerpc_lsa_EnumAccounts_r_done(struct tevent_req *subreq)
2043 : {
2044 0 : struct tevent_req *req =
2045 0 : tevent_req_callback_data(subreq,
2046 : struct tevent_req);
2047 0 : NTSTATUS status;
2048 :
2049 0 : status = dcerpc_binding_handle_call_recv(subreq);
2050 0 : TALLOC_FREE(subreq);
2051 0 : if (tevent_req_nterror(req, status)) {
2052 0 : return;
2053 : }
2054 :
2055 0 : tevent_req_done(req);
2056 : }
2057 :
2058 0 : NTSTATUS dcerpc_lsa_EnumAccounts_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2059 : {
2060 0 : struct dcerpc_lsa_EnumAccounts_r_state *state =
2061 0 : tevent_req_data(req,
2062 : struct dcerpc_lsa_EnumAccounts_r_state);
2063 0 : NTSTATUS status;
2064 :
2065 0 : if (tevent_req_is_nterror(req, &status)) {
2066 0 : tevent_req_received(req);
2067 0 : return status;
2068 : }
2069 :
2070 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2071 :
2072 0 : tevent_req_received(req);
2073 0 : return NT_STATUS_OK;
2074 : }
2075 :
2076 28 : NTSTATUS dcerpc_lsa_EnumAccounts_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_EnumAccounts *r)
2077 : {
2078 0 : NTSTATUS status;
2079 :
2080 28 : status = dcerpc_binding_handle_call(h,
2081 : NULL, &ndr_table_lsarpc,
2082 : NDR_LSA_ENUMACCOUNTS, mem_ctx, r);
2083 :
2084 28 : return status;
2085 : }
2086 :
2087 : struct dcerpc_lsa_EnumAccounts_state {
2088 : struct lsa_EnumAccounts orig;
2089 : struct lsa_EnumAccounts tmp;
2090 : TALLOC_CTX *out_mem_ctx;
2091 : };
2092 :
2093 : static void dcerpc_lsa_EnumAccounts_done(struct tevent_req *subreq);
2094 :
2095 0 : struct tevent_req *dcerpc_lsa_EnumAccounts_send(TALLOC_CTX *mem_ctx,
2096 : struct tevent_context *ev,
2097 : struct dcerpc_binding_handle *h,
2098 : struct policy_handle *_handle /* [in] [ref] */,
2099 : uint32_t *_resume_handle /* [in,out] [ref] */,
2100 : struct lsa_SidArray *_sids /* [out] [ref] */,
2101 : uint32_t _num_entries /* [in] [range(0,8192)] */)
2102 : {
2103 0 : struct tevent_req *req;
2104 0 : struct dcerpc_lsa_EnumAccounts_state *state;
2105 0 : struct tevent_req *subreq;
2106 :
2107 0 : req = tevent_req_create(mem_ctx, &state,
2108 : struct dcerpc_lsa_EnumAccounts_state);
2109 0 : if (req == NULL) {
2110 0 : return NULL;
2111 : }
2112 0 : state->out_mem_ctx = NULL;
2113 :
2114 : /* In parameters */
2115 0 : state->orig.in.handle = _handle;
2116 0 : state->orig.in.resume_handle = _resume_handle;
2117 0 : state->orig.in.num_entries = _num_entries;
2118 :
2119 : /* Out parameters */
2120 0 : state->orig.out.resume_handle = _resume_handle;
2121 0 : state->orig.out.sids = _sids;
2122 :
2123 : /* Result */
2124 0 : NDR_ZERO_STRUCT(state->orig.out.result);
2125 :
2126 0 : state->out_mem_ctx = talloc_named_const(state, 0,
2127 : "dcerpc_lsa_EnumAccounts_out_memory");
2128 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2129 0 : return tevent_req_post(req, ev);
2130 : }
2131 :
2132 : /* make a temporary copy, that we pass to the dispatch function */
2133 0 : state->tmp = state->orig;
2134 :
2135 0 : subreq = dcerpc_lsa_EnumAccounts_r_send(state, ev, h, &state->tmp);
2136 0 : if (tevent_req_nomem(subreq, req)) {
2137 0 : return tevent_req_post(req, ev);
2138 : }
2139 0 : tevent_req_set_callback(subreq, dcerpc_lsa_EnumAccounts_done, req);
2140 0 : return req;
2141 : }
2142 :
2143 0 : static void dcerpc_lsa_EnumAccounts_done(struct tevent_req *subreq)
2144 : {
2145 0 : struct tevent_req *req = tevent_req_callback_data(
2146 : subreq, struct tevent_req);
2147 0 : struct dcerpc_lsa_EnumAccounts_state *state = tevent_req_data(
2148 : req, struct dcerpc_lsa_EnumAccounts_state);
2149 0 : NTSTATUS status;
2150 0 : TALLOC_CTX *mem_ctx;
2151 :
2152 0 : if (state->out_mem_ctx) {
2153 0 : mem_ctx = state->out_mem_ctx;
2154 : } else {
2155 0 : mem_ctx = state;
2156 : }
2157 :
2158 0 : status = dcerpc_lsa_EnumAccounts_r_recv(subreq, mem_ctx);
2159 0 : TALLOC_FREE(subreq);
2160 0 : if (tevent_req_nterror(req, status)) {
2161 0 : return;
2162 : }
2163 :
2164 : /* Copy out parameters */
2165 0 : *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
2166 0 : *state->orig.out.sids = *state->tmp.out.sids;
2167 :
2168 : /* Copy result */
2169 0 : state->orig.out.result = state->tmp.out.result;
2170 :
2171 : /* Reset temporary structure */
2172 0 : NDR_ZERO_STRUCT(state->tmp);
2173 :
2174 0 : tevent_req_done(req);
2175 : }
2176 :
2177 0 : NTSTATUS dcerpc_lsa_EnumAccounts_recv(struct tevent_req *req,
2178 : TALLOC_CTX *mem_ctx,
2179 : NTSTATUS *result)
2180 : {
2181 0 : struct dcerpc_lsa_EnumAccounts_state *state = tevent_req_data(
2182 : req, struct dcerpc_lsa_EnumAccounts_state);
2183 0 : NTSTATUS status;
2184 :
2185 0 : if (tevent_req_is_nterror(req, &status)) {
2186 0 : tevent_req_received(req);
2187 0 : return status;
2188 : }
2189 :
2190 : /* Steal possible out parameters to the callers context */
2191 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2192 :
2193 : /* Return result */
2194 0 : *result = state->orig.out.result;
2195 :
2196 0 : tevent_req_received(req);
2197 0 : return NT_STATUS_OK;
2198 : }
2199 :
2200 0 : NTSTATUS dcerpc_lsa_EnumAccounts(struct dcerpc_binding_handle *h,
2201 : TALLOC_CTX *mem_ctx,
2202 : struct policy_handle *_handle /* [in] [ref] */,
2203 : uint32_t *_resume_handle /* [in,out] [ref] */,
2204 : struct lsa_SidArray *_sids /* [out] [ref] */,
2205 : uint32_t _num_entries /* [in] [range(0,8192)] */,
2206 : NTSTATUS *result)
2207 : {
2208 0 : struct lsa_EnumAccounts r;
2209 0 : NTSTATUS status;
2210 :
2211 : /* In parameters */
2212 0 : r.in.handle = _handle;
2213 0 : r.in.resume_handle = _resume_handle;
2214 0 : r.in.num_entries = _num_entries;
2215 :
2216 : /* Out parameters */
2217 0 : r.out.resume_handle = _resume_handle;
2218 0 : r.out.sids = _sids;
2219 :
2220 : /* Result */
2221 0 : NDR_ZERO_STRUCT(r.out.result);
2222 :
2223 0 : status = dcerpc_lsa_EnumAccounts_r(h, mem_ctx, &r);
2224 0 : if (!NT_STATUS_IS_OK(status)) {
2225 0 : return status;
2226 : }
2227 :
2228 : /* Return variables */
2229 0 : *_resume_handle = *r.out.resume_handle;
2230 0 : *_sids = *r.out.sids;
2231 :
2232 : /* Return result */
2233 0 : *result = r.out.result;
2234 :
2235 0 : return NT_STATUS_OK;
2236 : }
2237 :
2238 : struct dcerpc_lsa_CreateTrustedDomain_r_state {
2239 : TALLOC_CTX *out_mem_ctx;
2240 : };
2241 :
2242 : static void dcerpc_lsa_CreateTrustedDomain_r_done(struct tevent_req *subreq);
2243 :
2244 0 : struct tevent_req *dcerpc_lsa_CreateTrustedDomain_r_send(TALLOC_CTX *mem_ctx,
2245 : struct tevent_context *ev,
2246 : struct dcerpc_binding_handle *h,
2247 : struct lsa_CreateTrustedDomain *r)
2248 : {
2249 0 : struct tevent_req *req;
2250 0 : struct dcerpc_lsa_CreateTrustedDomain_r_state *state;
2251 0 : struct tevent_req *subreq;
2252 :
2253 0 : req = tevent_req_create(mem_ctx, &state,
2254 : struct dcerpc_lsa_CreateTrustedDomain_r_state);
2255 0 : if (req == NULL) {
2256 0 : return NULL;
2257 : }
2258 :
2259 0 : state->out_mem_ctx = talloc_new(state);
2260 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2261 0 : return tevent_req_post(req, ev);
2262 : }
2263 :
2264 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
2265 : NULL, &ndr_table_lsarpc,
2266 0 : NDR_LSA_CREATETRUSTEDDOMAIN, state->out_mem_ctx, r);
2267 0 : if (tevent_req_nomem(subreq, req)) {
2268 0 : return tevent_req_post(req, ev);
2269 : }
2270 0 : tevent_req_set_callback(subreq, dcerpc_lsa_CreateTrustedDomain_r_done, req);
2271 :
2272 0 : return req;
2273 : }
2274 :
2275 0 : static void dcerpc_lsa_CreateTrustedDomain_r_done(struct tevent_req *subreq)
2276 : {
2277 0 : struct tevent_req *req =
2278 0 : tevent_req_callback_data(subreq,
2279 : struct tevent_req);
2280 0 : NTSTATUS status;
2281 :
2282 0 : status = dcerpc_binding_handle_call_recv(subreq);
2283 0 : TALLOC_FREE(subreq);
2284 0 : if (tevent_req_nterror(req, status)) {
2285 0 : return;
2286 : }
2287 :
2288 0 : tevent_req_done(req);
2289 : }
2290 :
2291 0 : NTSTATUS dcerpc_lsa_CreateTrustedDomain_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2292 : {
2293 0 : struct dcerpc_lsa_CreateTrustedDomain_r_state *state =
2294 0 : tevent_req_data(req,
2295 : struct dcerpc_lsa_CreateTrustedDomain_r_state);
2296 0 : NTSTATUS status;
2297 :
2298 0 : if (tevent_req_is_nterror(req, &status)) {
2299 0 : tevent_req_received(req);
2300 0 : return status;
2301 : }
2302 :
2303 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2304 :
2305 0 : tevent_req_received(req);
2306 0 : return NT_STATUS_OK;
2307 : }
2308 :
2309 36 : NTSTATUS dcerpc_lsa_CreateTrustedDomain_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_CreateTrustedDomain *r)
2310 : {
2311 0 : NTSTATUS status;
2312 :
2313 36 : status = dcerpc_binding_handle_call(h,
2314 : NULL, &ndr_table_lsarpc,
2315 : NDR_LSA_CREATETRUSTEDDOMAIN, mem_ctx, r);
2316 :
2317 36 : return status;
2318 : }
2319 :
2320 : struct dcerpc_lsa_CreateTrustedDomain_state {
2321 : struct lsa_CreateTrustedDomain orig;
2322 : struct lsa_CreateTrustedDomain tmp;
2323 : TALLOC_CTX *out_mem_ctx;
2324 : };
2325 :
2326 : static void dcerpc_lsa_CreateTrustedDomain_done(struct tevent_req *subreq);
2327 :
2328 0 : struct tevent_req *dcerpc_lsa_CreateTrustedDomain_send(TALLOC_CTX *mem_ctx,
2329 : struct tevent_context *ev,
2330 : struct dcerpc_binding_handle *h,
2331 : struct policy_handle *_policy_handle /* [in] [ref] */,
2332 : struct lsa_DomainInfo *_info /* [in] [ref] */,
2333 : uint32_t _access_mask /* [in] */,
2334 : struct policy_handle *_trustdom_handle /* [out] [ref] */)
2335 : {
2336 0 : struct tevent_req *req;
2337 0 : struct dcerpc_lsa_CreateTrustedDomain_state *state;
2338 0 : struct tevent_req *subreq;
2339 :
2340 0 : req = tevent_req_create(mem_ctx, &state,
2341 : struct dcerpc_lsa_CreateTrustedDomain_state);
2342 0 : if (req == NULL) {
2343 0 : return NULL;
2344 : }
2345 0 : state->out_mem_ctx = NULL;
2346 :
2347 : /* In parameters */
2348 0 : state->orig.in.policy_handle = _policy_handle;
2349 0 : state->orig.in.info = _info;
2350 0 : state->orig.in.access_mask = _access_mask;
2351 :
2352 : /* Out parameters */
2353 0 : state->orig.out.trustdom_handle = _trustdom_handle;
2354 :
2355 : /* Result */
2356 0 : NDR_ZERO_STRUCT(state->orig.out.result);
2357 :
2358 0 : state->out_mem_ctx = talloc_named_const(state, 0,
2359 : "dcerpc_lsa_CreateTrustedDomain_out_memory");
2360 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2361 0 : return tevent_req_post(req, ev);
2362 : }
2363 :
2364 : /* make a temporary copy, that we pass to the dispatch function */
2365 0 : state->tmp = state->orig;
2366 :
2367 0 : subreq = dcerpc_lsa_CreateTrustedDomain_r_send(state, ev, h, &state->tmp);
2368 0 : if (tevent_req_nomem(subreq, req)) {
2369 0 : return tevent_req_post(req, ev);
2370 : }
2371 0 : tevent_req_set_callback(subreq, dcerpc_lsa_CreateTrustedDomain_done, req);
2372 0 : return req;
2373 : }
2374 :
2375 0 : static void dcerpc_lsa_CreateTrustedDomain_done(struct tevent_req *subreq)
2376 : {
2377 0 : struct tevent_req *req = tevent_req_callback_data(
2378 : subreq, struct tevent_req);
2379 0 : struct dcerpc_lsa_CreateTrustedDomain_state *state = tevent_req_data(
2380 : req, struct dcerpc_lsa_CreateTrustedDomain_state);
2381 0 : NTSTATUS status;
2382 0 : TALLOC_CTX *mem_ctx;
2383 :
2384 0 : if (state->out_mem_ctx) {
2385 0 : mem_ctx = state->out_mem_ctx;
2386 : } else {
2387 0 : mem_ctx = state;
2388 : }
2389 :
2390 0 : status = dcerpc_lsa_CreateTrustedDomain_r_recv(subreq, mem_ctx);
2391 0 : TALLOC_FREE(subreq);
2392 0 : if (tevent_req_nterror(req, status)) {
2393 0 : return;
2394 : }
2395 :
2396 : /* Copy out parameters */
2397 0 : *state->orig.out.trustdom_handle = *state->tmp.out.trustdom_handle;
2398 :
2399 : /* Copy result */
2400 0 : state->orig.out.result = state->tmp.out.result;
2401 :
2402 : /* Reset temporary structure */
2403 0 : NDR_ZERO_STRUCT(state->tmp);
2404 :
2405 0 : tevent_req_done(req);
2406 : }
2407 :
2408 0 : NTSTATUS dcerpc_lsa_CreateTrustedDomain_recv(struct tevent_req *req,
2409 : TALLOC_CTX *mem_ctx,
2410 : NTSTATUS *result)
2411 : {
2412 0 : struct dcerpc_lsa_CreateTrustedDomain_state *state = tevent_req_data(
2413 : req, struct dcerpc_lsa_CreateTrustedDomain_state);
2414 0 : NTSTATUS status;
2415 :
2416 0 : if (tevent_req_is_nterror(req, &status)) {
2417 0 : tevent_req_received(req);
2418 0 : return status;
2419 : }
2420 :
2421 : /* Steal possible out parameters to the callers context */
2422 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2423 :
2424 : /* Return result */
2425 0 : *result = state->orig.out.result;
2426 :
2427 0 : tevent_req_received(req);
2428 0 : return NT_STATUS_OK;
2429 : }
2430 :
2431 0 : NTSTATUS dcerpc_lsa_CreateTrustedDomain(struct dcerpc_binding_handle *h,
2432 : TALLOC_CTX *mem_ctx,
2433 : struct policy_handle *_policy_handle /* [in] [ref] */,
2434 : struct lsa_DomainInfo *_info /* [in] [ref] */,
2435 : uint32_t _access_mask /* [in] */,
2436 : struct policy_handle *_trustdom_handle /* [out] [ref] */,
2437 : NTSTATUS *result)
2438 : {
2439 0 : struct lsa_CreateTrustedDomain r;
2440 0 : NTSTATUS status;
2441 :
2442 : /* In parameters */
2443 0 : r.in.policy_handle = _policy_handle;
2444 0 : r.in.info = _info;
2445 0 : r.in.access_mask = _access_mask;
2446 :
2447 : /* Out parameters */
2448 0 : r.out.trustdom_handle = _trustdom_handle;
2449 :
2450 : /* Result */
2451 0 : NDR_ZERO_STRUCT(r.out.result);
2452 :
2453 0 : status = dcerpc_lsa_CreateTrustedDomain_r(h, mem_ctx, &r);
2454 0 : if (!NT_STATUS_IS_OK(status)) {
2455 0 : return status;
2456 : }
2457 :
2458 : /* Return variables */
2459 0 : *_trustdom_handle = *r.out.trustdom_handle;
2460 :
2461 : /* Return result */
2462 0 : *result = r.out.result;
2463 :
2464 0 : return NT_STATUS_OK;
2465 : }
2466 :
2467 : struct dcerpc_lsa_EnumTrustDom_r_state {
2468 : TALLOC_CTX *out_mem_ctx;
2469 : };
2470 :
2471 : static void dcerpc_lsa_EnumTrustDom_r_done(struct tevent_req *subreq);
2472 :
2473 0 : struct tevent_req *dcerpc_lsa_EnumTrustDom_r_send(TALLOC_CTX *mem_ctx,
2474 : struct tevent_context *ev,
2475 : struct dcerpc_binding_handle *h,
2476 : struct lsa_EnumTrustDom *r)
2477 : {
2478 0 : struct tevent_req *req;
2479 0 : struct dcerpc_lsa_EnumTrustDom_r_state *state;
2480 0 : struct tevent_req *subreq;
2481 :
2482 0 : req = tevent_req_create(mem_ctx, &state,
2483 : struct dcerpc_lsa_EnumTrustDom_r_state);
2484 0 : if (req == NULL) {
2485 0 : return NULL;
2486 : }
2487 :
2488 0 : state->out_mem_ctx = talloc_new(state);
2489 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2490 0 : return tevent_req_post(req, ev);
2491 : }
2492 :
2493 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
2494 : NULL, &ndr_table_lsarpc,
2495 0 : NDR_LSA_ENUMTRUSTDOM, state->out_mem_ctx, r);
2496 0 : if (tevent_req_nomem(subreq, req)) {
2497 0 : return tevent_req_post(req, ev);
2498 : }
2499 0 : tevent_req_set_callback(subreq, dcerpc_lsa_EnumTrustDom_r_done, req);
2500 :
2501 0 : return req;
2502 : }
2503 :
2504 0 : static void dcerpc_lsa_EnumTrustDom_r_done(struct tevent_req *subreq)
2505 : {
2506 0 : struct tevent_req *req =
2507 0 : tevent_req_callback_data(subreq,
2508 : struct tevent_req);
2509 0 : NTSTATUS status;
2510 :
2511 0 : status = dcerpc_binding_handle_call_recv(subreq);
2512 0 : TALLOC_FREE(subreq);
2513 0 : if (tevent_req_nterror(req, status)) {
2514 0 : return;
2515 : }
2516 :
2517 0 : tevent_req_done(req);
2518 : }
2519 :
2520 0 : NTSTATUS dcerpc_lsa_EnumTrustDom_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2521 : {
2522 0 : struct dcerpc_lsa_EnumTrustDom_r_state *state =
2523 0 : tevent_req_data(req,
2524 : struct dcerpc_lsa_EnumTrustDom_r_state);
2525 0 : NTSTATUS status;
2526 :
2527 0 : if (tevent_req_is_nterror(req, &status)) {
2528 0 : tevent_req_received(req);
2529 0 : return status;
2530 : }
2531 :
2532 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2533 :
2534 0 : tevent_req_received(req);
2535 0 : return NT_STATUS_OK;
2536 : }
2537 :
2538 78 : NTSTATUS dcerpc_lsa_EnumTrustDom_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_EnumTrustDom *r)
2539 : {
2540 3 : NTSTATUS status;
2541 :
2542 78 : status = dcerpc_binding_handle_call(h,
2543 : NULL, &ndr_table_lsarpc,
2544 : NDR_LSA_ENUMTRUSTDOM, mem_ctx, r);
2545 :
2546 78 : return status;
2547 : }
2548 :
2549 : struct dcerpc_lsa_EnumTrustDom_state {
2550 : struct lsa_EnumTrustDom orig;
2551 : struct lsa_EnumTrustDom tmp;
2552 : TALLOC_CTX *out_mem_ctx;
2553 : };
2554 :
2555 : static void dcerpc_lsa_EnumTrustDom_done(struct tevent_req *subreq);
2556 :
2557 0 : struct tevent_req *dcerpc_lsa_EnumTrustDom_send(TALLOC_CTX *mem_ctx,
2558 : struct tevent_context *ev,
2559 : struct dcerpc_binding_handle *h,
2560 : struct policy_handle *_handle /* [in] [ref] */,
2561 : uint32_t *_resume_handle /* [in,out] [ref] */,
2562 : struct lsa_DomainList *_domains /* [out] [ref] */,
2563 : uint32_t _max_size /* [in] */)
2564 : {
2565 0 : struct tevent_req *req;
2566 0 : struct dcerpc_lsa_EnumTrustDom_state *state;
2567 0 : struct tevent_req *subreq;
2568 :
2569 0 : req = tevent_req_create(mem_ctx, &state,
2570 : struct dcerpc_lsa_EnumTrustDom_state);
2571 0 : if (req == NULL) {
2572 0 : return NULL;
2573 : }
2574 0 : state->out_mem_ctx = NULL;
2575 :
2576 : /* In parameters */
2577 0 : state->orig.in.handle = _handle;
2578 0 : state->orig.in.resume_handle = _resume_handle;
2579 0 : state->orig.in.max_size = _max_size;
2580 :
2581 : /* Out parameters */
2582 0 : state->orig.out.resume_handle = _resume_handle;
2583 0 : state->orig.out.domains = _domains;
2584 :
2585 : /* Result */
2586 0 : NDR_ZERO_STRUCT(state->orig.out.result);
2587 :
2588 0 : state->out_mem_ctx = talloc_named_const(state, 0,
2589 : "dcerpc_lsa_EnumTrustDom_out_memory");
2590 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2591 0 : return tevent_req_post(req, ev);
2592 : }
2593 :
2594 : /* make a temporary copy, that we pass to the dispatch function */
2595 0 : state->tmp = state->orig;
2596 :
2597 0 : subreq = dcerpc_lsa_EnumTrustDom_r_send(state, ev, h, &state->tmp);
2598 0 : if (tevent_req_nomem(subreq, req)) {
2599 0 : return tevent_req_post(req, ev);
2600 : }
2601 0 : tevent_req_set_callback(subreq, dcerpc_lsa_EnumTrustDom_done, req);
2602 0 : return req;
2603 : }
2604 :
2605 0 : static void dcerpc_lsa_EnumTrustDom_done(struct tevent_req *subreq)
2606 : {
2607 0 : struct tevent_req *req = tevent_req_callback_data(
2608 : subreq, struct tevent_req);
2609 0 : struct dcerpc_lsa_EnumTrustDom_state *state = tevent_req_data(
2610 : req, struct dcerpc_lsa_EnumTrustDom_state);
2611 0 : NTSTATUS status;
2612 0 : TALLOC_CTX *mem_ctx;
2613 :
2614 0 : if (state->out_mem_ctx) {
2615 0 : mem_ctx = state->out_mem_ctx;
2616 : } else {
2617 0 : mem_ctx = state;
2618 : }
2619 :
2620 0 : status = dcerpc_lsa_EnumTrustDom_r_recv(subreq, mem_ctx);
2621 0 : TALLOC_FREE(subreq);
2622 0 : if (tevent_req_nterror(req, status)) {
2623 0 : return;
2624 : }
2625 :
2626 : /* Copy out parameters */
2627 0 : *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
2628 0 : *state->orig.out.domains = *state->tmp.out.domains;
2629 :
2630 : /* Copy result */
2631 0 : state->orig.out.result = state->tmp.out.result;
2632 :
2633 : /* Reset temporary structure */
2634 0 : NDR_ZERO_STRUCT(state->tmp);
2635 :
2636 0 : tevent_req_done(req);
2637 : }
2638 :
2639 0 : NTSTATUS dcerpc_lsa_EnumTrustDom_recv(struct tevent_req *req,
2640 : TALLOC_CTX *mem_ctx,
2641 : NTSTATUS *result)
2642 : {
2643 0 : struct dcerpc_lsa_EnumTrustDom_state *state = tevent_req_data(
2644 : req, struct dcerpc_lsa_EnumTrustDom_state);
2645 0 : NTSTATUS status;
2646 :
2647 0 : if (tevent_req_is_nterror(req, &status)) {
2648 0 : tevent_req_received(req);
2649 0 : return status;
2650 : }
2651 :
2652 : /* Steal possible out parameters to the callers context */
2653 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2654 :
2655 : /* Return result */
2656 0 : *result = state->orig.out.result;
2657 :
2658 0 : tevent_req_received(req);
2659 0 : return NT_STATUS_OK;
2660 : }
2661 :
2662 0 : NTSTATUS dcerpc_lsa_EnumTrustDom(struct dcerpc_binding_handle *h,
2663 : TALLOC_CTX *mem_ctx,
2664 : struct policy_handle *_handle /* [in] [ref] */,
2665 : uint32_t *_resume_handle /* [in,out] [ref] */,
2666 : struct lsa_DomainList *_domains /* [out] [ref] */,
2667 : uint32_t _max_size /* [in] */,
2668 : NTSTATUS *result)
2669 : {
2670 0 : struct lsa_EnumTrustDom r;
2671 0 : NTSTATUS status;
2672 :
2673 : /* In parameters */
2674 0 : r.in.handle = _handle;
2675 0 : r.in.resume_handle = _resume_handle;
2676 0 : r.in.max_size = _max_size;
2677 :
2678 : /* Out parameters */
2679 0 : r.out.resume_handle = _resume_handle;
2680 0 : r.out.domains = _domains;
2681 :
2682 : /* Result */
2683 0 : NDR_ZERO_STRUCT(r.out.result);
2684 :
2685 0 : status = dcerpc_lsa_EnumTrustDom_r(h, mem_ctx, &r);
2686 0 : if (!NT_STATUS_IS_OK(status)) {
2687 0 : return status;
2688 : }
2689 :
2690 : /* Return variables */
2691 0 : *_resume_handle = *r.out.resume_handle;
2692 0 : *_domains = *r.out.domains;
2693 :
2694 : /* Return result */
2695 0 : *result = r.out.result;
2696 :
2697 0 : return NT_STATUS_OK;
2698 : }
2699 :
2700 : struct dcerpc_lsa_LookupNames_r_state {
2701 : TALLOC_CTX *out_mem_ctx;
2702 : };
2703 :
2704 : static void dcerpc_lsa_LookupNames_r_done(struct tevent_req *subreq);
2705 :
2706 13 : struct tevent_req *dcerpc_lsa_LookupNames_r_send(TALLOC_CTX *mem_ctx,
2707 : struct tevent_context *ev,
2708 : struct dcerpc_binding_handle *h,
2709 : struct lsa_LookupNames *r)
2710 : {
2711 0 : struct tevent_req *req;
2712 0 : struct dcerpc_lsa_LookupNames_r_state *state;
2713 0 : struct tevent_req *subreq;
2714 :
2715 13 : req = tevent_req_create(mem_ctx, &state,
2716 : struct dcerpc_lsa_LookupNames_r_state);
2717 13 : if (req == NULL) {
2718 0 : return NULL;
2719 : }
2720 :
2721 13 : state->out_mem_ctx = talloc_new(state);
2722 13 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2723 0 : return tevent_req_post(req, ev);
2724 : }
2725 :
2726 13 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
2727 : NULL, &ndr_table_lsarpc,
2728 13 : NDR_LSA_LOOKUPNAMES, state->out_mem_ctx, r);
2729 13 : if (tevent_req_nomem(subreq, req)) {
2730 0 : return tevent_req_post(req, ev);
2731 : }
2732 13 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupNames_r_done, req);
2733 :
2734 13 : return req;
2735 : }
2736 :
2737 13 : static void dcerpc_lsa_LookupNames_r_done(struct tevent_req *subreq)
2738 : {
2739 0 : struct tevent_req *req =
2740 13 : tevent_req_callback_data(subreq,
2741 : struct tevent_req);
2742 0 : NTSTATUS status;
2743 :
2744 13 : status = dcerpc_binding_handle_call_recv(subreq);
2745 13 : TALLOC_FREE(subreq);
2746 13 : if (tevent_req_nterror(req, status)) {
2747 0 : return;
2748 : }
2749 :
2750 13 : tevent_req_done(req);
2751 : }
2752 :
2753 13 : NTSTATUS dcerpc_lsa_LookupNames_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2754 : {
2755 0 : struct dcerpc_lsa_LookupNames_r_state *state =
2756 13 : tevent_req_data(req,
2757 : struct dcerpc_lsa_LookupNames_r_state);
2758 0 : NTSTATUS status;
2759 :
2760 13 : if (tevent_req_is_nterror(req, &status)) {
2761 0 : tevent_req_received(req);
2762 0 : return status;
2763 : }
2764 :
2765 13 : talloc_steal(mem_ctx, state->out_mem_ctx);
2766 :
2767 13 : tevent_req_received(req);
2768 13 : return NT_STATUS_OK;
2769 : }
2770 :
2771 1866 : NTSTATUS dcerpc_lsa_LookupNames_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_LookupNames *r)
2772 : {
2773 0 : NTSTATUS status;
2774 :
2775 1866 : status = dcerpc_binding_handle_call(h,
2776 : NULL, &ndr_table_lsarpc,
2777 : NDR_LSA_LOOKUPNAMES, mem_ctx, r);
2778 :
2779 1866 : return status;
2780 : }
2781 :
2782 : struct dcerpc_lsa_LookupNames_state {
2783 : struct lsa_LookupNames orig;
2784 : struct lsa_LookupNames tmp;
2785 : TALLOC_CTX *out_mem_ctx;
2786 : };
2787 :
2788 : static void dcerpc_lsa_LookupNames_done(struct tevent_req *subreq);
2789 :
2790 0 : struct tevent_req *dcerpc_lsa_LookupNames_send(TALLOC_CTX *mem_ctx,
2791 : struct tevent_context *ev,
2792 : struct dcerpc_binding_handle *h,
2793 : struct policy_handle *_handle /* [in] [ref] */,
2794 : uint32_t _num_names /* [in] [range(0,1000)] */,
2795 : struct lsa_String *_names /* [in] [size_is(num_names)] */,
2796 : struct lsa_RefDomainList **_domains /* [out] [ref] */,
2797 : struct lsa_TransSidArray *_sids /* [in,out] [ref] */,
2798 : enum lsa_LookupNamesLevel _level /* [in] */,
2799 : uint32_t *_count /* [in,out] [ref] */)
2800 : {
2801 0 : struct tevent_req *req;
2802 0 : struct dcerpc_lsa_LookupNames_state *state;
2803 0 : struct tevent_req *subreq;
2804 :
2805 0 : req = tevent_req_create(mem_ctx, &state,
2806 : struct dcerpc_lsa_LookupNames_state);
2807 0 : if (req == NULL) {
2808 0 : return NULL;
2809 : }
2810 0 : state->out_mem_ctx = NULL;
2811 :
2812 : /* In parameters */
2813 0 : state->orig.in.handle = _handle;
2814 0 : state->orig.in.num_names = _num_names;
2815 0 : state->orig.in.names = _names;
2816 0 : state->orig.in.sids = _sids;
2817 0 : state->orig.in.level = _level;
2818 0 : state->orig.in.count = _count;
2819 :
2820 : /* Out parameters */
2821 0 : state->orig.out.domains = _domains;
2822 0 : state->orig.out.sids = _sids;
2823 0 : state->orig.out.count = _count;
2824 :
2825 : /* Result */
2826 0 : NDR_ZERO_STRUCT(state->orig.out.result);
2827 :
2828 0 : state->out_mem_ctx = talloc_named_const(state, 0,
2829 : "dcerpc_lsa_LookupNames_out_memory");
2830 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2831 0 : return tevent_req_post(req, ev);
2832 : }
2833 :
2834 : /* make a temporary copy, that we pass to the dispatch function */
2835 0 : state->tmp = state->orig;
2836 :
2837 0 : subreq = dcerpc_lsa_LookupNames_r_send(state, ev, h, &state->tmp);
2838 0 : if (tevent_req_nomem(subreq, req)) {
2839 0 : return tevent_req_post(req, ev);
2840 : }
2841 0 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupNames_done, req);
2842 0 : return req;
2843 : }
2844 :
2845 0 : static void dcerpc_lsa_LookupNames_done(struct tevent_req *subreq)
2846 : {
2847 0 : struct tevent_req *req = tevent_req_callback_data(
2848 : subreq, struct tevent_req);
2849 0 : struct dcerpc_lsa_LookupNames_state *state = tevent_req_data(
2850 : req, struct dcerpc_lsa_LookupNames_state);
2851 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_lsa_LookupNames_r_recv(subreq, mem_ctx);
2861 0 : TALLOC_FREE(subreq);
2862 0 : if (tevent_req_nterror(req, status)) {
2863 0 : return;
2864 : }
2865 :
2866 : /* Copy out parameters */
2867 0 : *state->orig.out.domains = *state->tmp.out.domains;
2868 0 : *state->orig.out.sids = *state->tmp.out.sids;
2869 0 : *state->orig.out.count = *state->tmp.out.count;
2870 :
2871 : /* Copy result */
2872 0 : state->orig.out.result = state->tmp.out.result;
2873 :
2874 : /* Reset temporary structure */
2875 0 : NDR_ZERO_STRUCT(state->tmp);
2876 :
2877 0 : tevent_req_done(req);
2878 : }
2879 :
2880 0 : NTSTATUS dcerpc_lsa_LookupNames_recv(struct tevent_req *req,
2881 : TALLOC_CTX *mem_ctx,
2882 : NTSTATUS *result)
2883 : {
2884 0 : struct dcerpc_lsa_LookupNames_state *state = tevent_req_data(
2885 : req, struct dcerpc_lsa_LookupNames_state);
2886 0 : NTSTATUS status;
2887 :
2888 0 : if (tevent_req_is_nterror(req, &status)) {
2889 0 : tevent_req_received(req);
2890 0 : return status;
2891 : }
2892 :
2893 : /* Steal possible out parameters to the callers context */
2894 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2895 :
2896 : /* Return result */
2897 0 : *result = state->orig.out.result;
2898 :
2899 0 : tevent_req_received(req);
2900 0 : return NT_STATUS_OK;
2901 : }
2902 :
2903 1664 : NTSTATUS dcerpc_lsa_LookupNames(struct dcerpc_binding_handle *h,
2904 : TALLOC_CTX *mem_ctx,
2905 : struct policy_handle *_handle /* [in] [ref] */,
2906 : uint32_t _num_names /* [in] [range(0,1000)] */,
2907 : struct lsa_String *_names /* [in] [size_is(num_names)] */,
2908 : struct lsa_RefDomainList **_domains /* [out] [ref] */,
2909 : struct lsa_TransSidArray *_sids /* [in,out] [ref] */,
2910 : enum lsa_LookupNamesLevel _level /* [in] */,
2911 : uint32_t *_count /* [in,out] [ref] */,
2912 : NTSTATUS *result)
2913 : {
2914 0 : struct lsa_LookupNames r;
2915 0 : NTSTATUS status;
2916 :
2917 : /* In parameters */
2918 1664 : r.in.handle = _handle;
2919 1664 : r.in.num_names = _num_names;
2920 1664 : r.in.names = _names;
2921 1664 : r.in.sids = _sids;
2922 1664 : r.in.level = _level;
2923 1664 : r.in.count = _count;
2924 :
2925 : /* Out parameters */
2926 1664 : r.out.domains = _domains;
2927 1664 : r.out.sids = _sids;
2928 1664 : r.out.count = _count;
2929 :
2930 : /* Result */
2931 1664 : NDR_ZERO_STRUCT(r.out.result);
2932 :
2933 1664 : status = dcerpc_lsa_LookupNames_r(h, mem_ctx, &r);
2934 1664 : if (!NT_STATUS_IS_OK(status)) {
2935 0 : return status;
2936 : }
2937 :
2938 : /* Return variables */
2939 1664 : *_domains = *r.out.domains;
2940 1664 : *_sids = *r.out.sids;
2941 1664 : *_count = *r.out.count;
2942 :
2943 : /* Return result */
2944 1664 : *result = r.out.result;
2945 :
2946 1664 : return NT_STATUS_OK;
2947 : }
2948 :
2949 : struct dcerpc_lsa_LookupSids_r_state {
2950 : TALLOC_CTX *out_mem_ctx;
2951 : };
2952 :
2953 : static void dcerpc_lsa_LookupSids_r_done(struct tevent_req *subreq);
2954 :
2955 700 : struct tevent_req *dcerpc_lsa_LookupSids_r_send(TALLOC_CTX *mem_ctx,
2956 : struct tevent_context *ev,
2957 : struct dcerpc_binding_handle *h,
2958 : struct lsa_LookupSids *r)
2959 : {
2960 0 : struct tevent_req *req;
2961 0 : struct dcerpc_lsa_LookupSids_r_state *state;
2962 0 : struct tevent_req *subreq;
2963 :
2964 700 : req = tevent_req_create(mem_ctx, &state,
2965 : struct dcerpc_lsa_LookupSids_r_state);
2966 700 : if (req == NULL) {
2967 0 : return NULL;
2968 : }
2969 :
2970 700 : state->out_mem_ctx = talloc_new(state);
2971 700 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2972 0 : return tevent_req_post(req, ev);
2973 : }
2974 :
2975 700 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
2976 : NULL, &ndr_table_lsarpc,
2977 700 : NDR_LSA_LOOKUPSIDS, state->out_mem_ctx, r);
2978 700 : if (tevent_req_nomem(subreq, req)) {
2979 0 : return tevent_req_post(req, ev);
2980 : }
2981 700 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupSids_r_done, req);
2982 :
2983 700 : return req;
2984 : }
2985 :
2986 700 : static void dcerpc_lsa_LookupSids_r_done(struct tevent_req *subreq)
2987 : {
2988 0 : struct tevent_req *req =
2989 700 : tevent_req_callback_data(subreq,
2990 : struct tevent_req);
2991 0 : NTSTATUS status;
2992 :
2993 700 : status = dcerpc_binding_handle_call_recv(subreq);
2994 700 : TALLOC_FREE(subreq);
2995 700 : if (tevent_req_nterror(req, status)) {
2996 0 : return;
2997 : }
2998 :
2999 700 : tevent_req_done(req);
3000 : }
3001 :
3002 700 : NTSTATUS dcerpc_lsa_LookupSids_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3003 : {
3004 0 : struct dcerpc_lsa_LookupSids_r_state *state =
3005 700 : tevent_req_data(req,
3006 : struct dcerpc_lsa_LookupSids_r_state);
3007 0 : NTSTATUS status;
3008 :
3009 700 : if (tevent_req_is_nterror(req, &status)) {
3010 0 : tevent_req_received(req);
3011 0 : return status;
3012 : }
3013 :
3014 700 : talloc_steal(mem_ctx, state->out_mem_ctx);
3015 :
3016 700 : tevent_req_received(req);
3017 700 : return NT_STATUS_OK;
3018 : }
3019 :
3020 7249 : NTSTATUS dcerpc_lsa_LookupSids_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_LookupSids *r)
3021 : {
3022 0 : NTSTATUS status;
3023 :
3024 7249 : status = dcerpc_binding_handle_call(h,
3025 : NULL, &ndr_table_lsarpc,
3026 : NDR_LSA_LOOKUPSIDS, mem_ctx, r);
3027 :
3028 7249 : return status;
3029 : }
3030 :
3031 : struct dcerpc_lsa_LookupSids_state {
3032 : struct lsa_LookupSids orig;
3033 : struct lsa_LookupSids tmp;
3034 : TALLOC_CTX *out_mem_ctx;
3035 : };
3036 :
3037 : static void dcerpc_lsa_LookupSids_done(struct tevent_req *subreq);
3038 :
3039 0 : struct tevent_req *dcerpc_lsa_LookupSids_send(TALLOC_CTX *mem_ctx,
3040 : struct tevent_context *ev,
3041 : struct dcerpc_binding_handle *h,
3042 : struct policy_handle *_handle /* [in] [ref] */,
3043 : struct lsa_SidArray *_sids /* [in] [ref] */,
3044 : struct lsa_RefDomainList **_domains /* [out] [ref] */,
3045 : struct lsa_TransNameArray *_names /* [in,out] [ref] */,
3046 : enum lsa_LookupNamesLevel _level /* [in] */,
3047 : uint32_t *_count /* [in,out] [ref] */)
3048 : {
3049 0 : struct tevent_req *req;
3050 0 : struct dcerpc_lsa_LookupSids_state *state;
3051 0 : struct tevent_req *subreq;
3052 :
3053 0 : req = tevent_req_create(mem_ctx, &state,
3054 : struct dcerpc_lsa_LookupSids_state);
3055 0 : if (req == NULL) {
3056 0 : return NULL;
3057 : }
3058 0 : state->out_mem_ctx = NULL;
3059 :
3060 : /* In parameters */
3061 0 : state->orig.in.handle = _handle;
3062 0 : state->orig.in.sids = _sids;
3063 0 : state->orig.in.names = _names;
3064 0 : state->orig.in.level = _level;
3065 0 : state->orig.in.count = _count;
3066 :
3067 : /* Out parameters */
3068 0 : state->orig.out.domains = _domains;
3069 0 : state->orig.out.names = _names;
3070 0 : state->orig.out.count = _count;
3071 :
3072 : /* Result */
3073 0 : NDR_ZERO_STRUCT(state->orig.out.result);
3074 :
3075 0 : state->out_mem_ctx = talloc_named_const(state, 0,
3076 : "dcerpc_lsa_LookupSids_out_memory");
3077 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
3078 0 : return tevent_req_post(req, ev);
3079 : }
3080 :
3081 : /* make a temporary copy, that we pass to the dispatch function */
3082 0 : state->tmp = state->orig;
3083 :
3084 0 : subreq = dcerpc_lsa_LookupSids_r_send(state, ev, h, &state->tmp);
3085 0 : if (tevent_req_nomem(subreq, req)) {
3086 0 : return tevent_req_post(req, ev);
3087 : }
3088 0 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupSids_done, req);
3089 0 : return req;
3090 : }
3091 :
3092 0 : static void dcerpc_lsa_LookupSids_done(struct tevent_req *subreq)
3093 : {
3094 0 : struct tevent_req *req = tevent_req_callback_data(
3095 : subreq, struct tevent_req);
3096 0 : struct dcerpc_lsa_LookupSids_state *state = tevent_req_data(
3097 : req, struct dcerpc_lsa_LookupSids_state);
3098 0 : NTSTATUS status;
3099 0 : TALLOC_CTX *mem_ctx;
3100 :
3101 0 : if (state->out_mem_ctx) {
3102 0 : mem_ctx = state->out_mem_ctx;
3103 : } else {
3104 0 : mem_ctx = state;
3105 : }
3106 :
3107 0 : status = dcerpc_lsa_LookupSids_r_recv(subreq, mem_ctx);
3108 0 : TALLOC_FREE(subreq);
3109 0 : if (tevent_req_nterror(req, status)) {
3110 0 : return;
3111 : }
3112 :
3113 : /* Copy out parameters */
3114 0 : *state->orig.out.domains = *state->tmp.out.domains;
3115 0 : *state->orig.out.names = *state->tmp.out.names;
3116 0 : *state->orig.out.count = *state->tmp.out.count;
3117 :
3118 : /* Copy result */
3119 0 : state->orig.out.result = state->tmp.out.result;
3120 :
3121 : /* Reset temporary structure */
3122 0 : NDR_ZERO_STRUCT(state->tmp);
3123 :
3124 0 : tevent_req_done(req);
3125 : }
3126 :
3127 0 : NTSTATUS dcerpc_lsa_LookupSids_recv(struct tevent_req *req,
3128 : TALLOC_CTX *mem_ctx,
3129 : NTSTATUS *result)
3130 : {
3131 0 : struct dcerpc_lsa_LookupSids_state *state = tevent_req_data(
3132 : req, struct dcerpc_lsa_LookupSids_state);
3133 0 : NTSTATUS status;
3134 :
3135 0 : if (tevent_req_is_nterror(req, &status)) {
3136 0 : tevent_req_received(req);
3137 0 : return status;
3138 : }
3139 :
3140 : /* Steal possible out parameters to the callers context */
3141 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3142 :
3143 : /* Return result */
3144 0 : *result = state->orig.out.result;
3145 :
3146 0 : tevent_req_received(req);
3147 0 : return NT_STATUS_OK;
3148 : }
3149 :
3150 7074 : NTSTATUS dcerpc_lsa_LookupSids(struct dcerpc_binding_handle *h,
3151 : TALLOC_CTX *mem_ctx,
3152 : struct policy_handle *_handle /* [in] [ref] */,
3153 : struct lsa_SidArray *_sids /* [in] [ref] */,
3154 : struct lsa_RefDomainList **_domains /* [out] [ref] */,
3155 : struct lsa_TransNameArray *_names /* [in,out] [ref] */,
3156 : enum lsa_LookupNamesLevel _level /* [in] */,
3157 : uint32_t *_count /* [in,out] [ref] */,
3158 : NTSTATUS *result)
3159 : {
3160 0 : struct lsa_LookupSids r;
3161 0 : NTSTATUS status;
3162 :
3163 : /* In parameters */
3164 7074 : r.in.handle = _handle;
3165 7074 : r.in.sids = _sids;
3166 7074 : r.in.names = _names;
3167 7074 : r.in.level = _level;
3168 7074 : r.in.count = _count;
3169 :
3170 : /* Out parameters */
3171 7074 : r.out.domains = _domains;
3172 7074 : r.out.names = _names;
3173 7074 : r.out.count = _count;
3174 :
3175 : /* Result */
3176 7074 : NDR_ZERO_STRUCT(r.out.result);
3177 :
3178 7074 : status = dcerpc_lsa_LookupSids_r(h, mem_ctx, &r);
3179 7074 : if (!NT_STATUS_IS_OK(status)) {
3180 0 : return status;
3181 : }
3182 :
3183 : /* Return variables */
3184 7074 : *_domains = *r.out.domains;
3185 7074 : *_names = *r.out.names;
3186 7074 : *_count = *r.out.count;
3187 :
3188 : /* Return result */
3189 7074 : *result = r.out.result;
3190 :
3191 7074 : return NT_STATUS_OK;
3192 : }
3193 :
3194 : struct dcerpc_lsa_CreateSecret_r_state {
3195 : TALLOC_CTX *out_mem_ctx;
3196 : };
3197 :
3198 : static void dcerpc_lsa_CreateSecret_r_done(struct tevent_req *subreq);
3199 :
3200 0 : struct tevent_req *dcerpc_lsa_CreateSecret_r_send(TALLOC_CTX *mem_ctx,
3201 : struct tevent_context *ev,
3202 : struct dcerpc_binding_handle *h,
3203 : struct lsa_CreateSecret *r)
3204 : {
3205 0 : struct tevent_req *req;
3206 0 : struct dcerpc_lsa_CreateSecret_r_state *state;
3207 0 : struct tevent_req *subreq;
3208 :
3209 0 : req = tevent_req_create(mem_ctx, &state,
3210 : struct dcerpc_lsa_CreateSecret_r_state);
3211 0 : if (req == NULL) {
3212 0 : return NULL;
3213 : }
3214 :
3215 0 : state->out_mem_ctx = talloc_new(state);
3216 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
3217 0 : return tevent_req_post(req, ev);
3218 : }
3219 :
3220 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
3221 : NULL, &ndr_table_lsarpc,
3222 0 : NDR_LSA_CREATESECRET, state->out_mem_ctx, r);
3223 0 : if (tevent_req_nomem(subreq, req)) {
3224 0 : return tevent_req_post(req, ev);
3225 : }
3226 0 : tevent_req_set_callback(subreq, dcerpc_lsa_CreateSecret_r_done, req);
3227 :
3228 0 : return req;
3229 : }
3230 :
3231 0 : static void dcerpc_lsa_CreateSecret_r_done(struct tevent_req *subreq)
3232 : {
3233 0 : struct tevent_req *req =
3234 0 : tevent_req_callback_data(subreq,
3235 : struct tevent_req);
3236 0 : NTSTATUS status;
3237 :
3238 0 : status = dcerpc_binding_handle_call_recv(subreq);
3239 0 : TALLOC_FREE(subreq);
3240 0 : if (tevent_req_nterror(req, status)) {
3241 0 : return;
3242 : }
3243 :
3244 0 : tevent_req_done(req);
3245 : }
3246 :
3247 0 : NTSTATUS dcerpc_lsa_CreateSecret_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3248 : {
3249 0 : struct dcerpc_lsa_CreateSecret_r_state *state =
3250 0 : tevent_req_data(req,
3251 : struct dcerpc_lsa_CreateSecret_r_state);
3252 0 : NTSTATUS status;
3253 :
3254 0 : if (tevent_req_is_nterror(req, &status)) {
3255 0 : tevent_req_received(req);
3256 0 : return status;
3257 : }
3258 :
3259 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3260 :
3261 0 : tevent_req_received(req);
3262 0 : return NT_STATUS_OK;
3263 : }
3264 :
3265 2308 : NTSTATUS dcerpc_lsa_CreateSecret_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_CreateSecret *r)
3266 : {
3267 0 : NTSTATUS status;
3268 :
3269 2308 : status = dcerpc_binding_handle_call(h,
3270 : NULL, &ndr_table_lsarpc,
3271 : NDR_LSA_CREATESECRET, mem_ctx, r);
3272 :
3273 2308 : return status;
3274 : }
3275 :
3276 : struct dcerpc_lsa_CreateSecret_state {
3277 : struct lsa_CreateSecret orig;
3278 : struct lsa_CreateSecret tmp;
3279 : TALLOC_CTX *out_mem_ctx;
3280 : };
3281 :
3282 : static void dcerpc_lsa_CreateSecret_done(struct tevent_req *subreq);
3283 :
3284 0 : struct tevent_req *dcerpc_lsa_CreateSecret_send(TALLOC_CTX *mem_ctx,
3285 : struct tevent_context *ev,
3286 : struct dcerpc_binding_handle *h,
3287 : struct policy_handle *_handle /* [in] [ref] */,
3288 : struct lsa_String _name /* [in] */,
3289 : uint32_t _access_mask /* [in] */,
3290 : struct policy_handle *_sec_handle /* [out] [ref] */)
3291 : {
3292 0 : struct tevent_req *req;
3293 0 : struct dcerpc_lsa_CreateSecret_state *state;
3294 0 : struct tevent_req *subreq;
3295 :
3296 0 : req = tevent_req_create(mem_ctx, &state,
3297 : struct dcerpc_lsa_CreateSecret_state);
3298 0 : if (req == NULL) {
3299 0 : return NULL;
3300 : }
3301 0 : state->out_mem_ctx = NULL;
3302 :
3303 : /* In parameters */
3304 0 : state->orig.in.handle = _handle;
3305 0 : state->orig.in.name = _name;
3306 0 : state->orig.in.access_mask = _access_mask;
3307 :
3308 : /* Out parameters */
3309 0 : state->orig.out.sec_handle = _sec_handle;
3310 :
3311 : /* Result */
3312 0 : NDR_ZERO_STRUCT(state->orig.out.result);
3313 :
3314 0 : state->out_mem_ctx = talloc_named_const(state, 0,
3315 : "dcerpc_lsa_CreateSecret_out_memory");
3316 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
3317 0 : return tevent_req_post(req, ev);
3318 : }
3319 :
3320 : /* make a temporary copy, that we pass to the dispatch function */
3321 0 : state->tmp = state->orig;
3322 :
3323 0 : subreq = dcerpc_lsa_CreateSecret_r_send(state, ev, h, &state->tmp);
3324 0 : if (tevent_req_nomem(subreq, req)) {
3325 0 : return tevent_req_post(req, ev);
3326 : }
3327 0 : tevent_req_set_callback(subreq, dcerpc_lsa_CreateSecret_done, req);
3328 0 : return req;
3329 : }
3330 :
3331 0 : static void dcerpc_lsa_CreateSecret_done(struct tevent_req *subreq)
3332 : {
3333 0 : struct tevent_req *req = tevent_req_callback_data(
3334 : subreq, struct tevent_req);
3335 0 : struct dcerpc_lsa_CreateSecret_state *state = tevent_req_data(
3336 : req, struct dcerpc_lsa_CreateSecret_state);
3337 0 : NTSTATUS status;
3338 0 : TALLOC_CTX *mem_ctx;
3339 :
3340 0 : if (state->out_mem_ctx) {
3341 0 : mem_ctx = state->out_mem_ctx;
3342 : } else {
3343 0 : mem_ctx = state;
3344 : }
3345 :
3346 0 : status = dcerpc_lsa_CreateSecret_r_recv(subreq, mem_ctx);
3347 0 : TALLOC_FREE(subreq);
3348 0 : if (tevent_req_nterror(req, status)) {
3349 0 : return;
3350 : }
3351 :
3352 : /* Copy out parameters */
3353 0 : *state->orig.out.sec_handle = *state->tmp.out.sec_handle;
3354 :
3355 : /* Copy result */
3356 0 : state->orig.out.result = state->tmp.out.result;
3357 :
3358 : /* Reset temporary structure */
3359 0 : NDR_ZERO_STRUCT(state->tmp);
3360 :
3361 0 : tevent_req_done(req);
3362 : }
3363 :
3364 0 : NTSTATUS dcerpc_lsa_CreateSecret_recv(struct tevent_req *req,
3365 : TALLOC_CTX *mem_ctx,
3366 : NTSTATUS *result)
3367 : {
3368 0 : struct dcerpc_lsa_CreateSecret_state *state = tevent_req_data(
3369 : req, struct dcerpc_lsa_CreateSecret_state);
3370 0 : NTSTATUS status;
3371 :
3372 0 : if (tevent_req_is_nterror(req, &status)) {
3373 0 : tevent_req_received(req);
3374 0 : return status;
3375 : }
3376 :
3377 : /* Steal possible out parameters to the callers context */
3378 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3379 :
3380 : /* Return result */
3381 0 : *result = state->orig.out.result;
3382 :
3383 0 : tevent_req_received(req);
3384 0 : return NT_STATUS_OK;
3385 : }
3386 :
3387 0 : NTSTATUS dcerpc_lsa_CreateSecret(struct dcerpc_binding_handle *h,
3388 : TALLOC_CTX *mem_ctx,
3389 : struct policy_handle *_handle /* [in] [ref] */,
3390 : struct lsa_String _name /* [in] */,
3391 : uint32_t _access_mask /* [in] */,
3392 : struct policy_handle *_sec_handle /* [out] [ref] */,
3393 : NTSTATUS *result)
3394 : {
3395 0 : struct lsa_CreateSecret r;
3396 0 : NTSTATUS status;
3397 :
3398 : /* In parameters */
3399 0 : r.in.handle = _handle;
3400 0 : r.in.name = _name;
3401 0 : r.in.access_mask = _access_mask;
3402 :
3403 : /* Out parameters */
3404 0 : r.out.sec_handle = _sec_handle;
3405 :
3406 : /* Result */
3407 0 : NDR_ZERO_STRUCT(r.out.result);
3408 :
3409 0 : status = dcerpc_lsa_CreateSecret_r(h, mem_ctx, &r);
3410 0 : if (!NT_STATUS_IS_OK(status)) {
3411 0 : return status;
3412 : }
3413 :
3414 : /* Return variables */
3415 0 : *_sec_handle = *r.out.sec_handle;
3416 :
3417 : /* Return result */
3418 0 : *result = r.out.result;
3419 :
3420 0 : return NT_STATUS_OK;
3421 : }
3422 :
3423 : struct dcerpc_lsa_OpenAccount_r_state {
3424 : TALLOC_CTX *out_mem_ctx;
3425 : };
3426 :
3427 : static void dcerpc_lsa_OpenAccount_r_done(struct tevent_req *subreq);
3428 :
3429 0 : struct tevent_req *dcerpc_lsa_OpenAccount_r_send(TALLOC_CTX *mem_ctx,
3430 : struct tevent_context *ev,
3431 : struct dcerpc_binding_handle *h,
3432 : struct lsa_OpenAccount *r)
3433 : {
3434 0 : struct tevent_req *req;
3435 0 : struct dcerpc_lsa_OpenAccount_r_state *state;
3436 0 : struct tevent_req *subreq;
3437 :
3438 0 : req = tevent_req_create(mem_ctx, &state,
3439 : struct dcerpc_lsa_OpenAccount_r_state);
3440 0 : if (req == NULL) {
3441 0 : return NULL;
3442 : }
3443 :
3444 0 : state->out_mem_ctx = talloc_new(state);
3445 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
3446 0 : return tevent_req_post(req, ev);
3447 : }
3448 :
3449 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
3450 : NULL, &ndr_table_lsarpc,
3451 0 : NDR_LSA_OPENACCOUNT, state->out_mem_ctx, r);
3452 0 : if (tevent_req_nomem(subreq, req)) {
3453 0 : return tevent_req_post(req, ev);
3454 : }
3455 0 : tevent_req_set_callback(subreq, dcerpc_lsa_OpenAccount_r_done, req);
3456 :
3457 0 : return req;
3458 : }
3459 :
3460 0 : static void dcerpc_lsa_OpenAccount_r_done(struct tevent_req *subreq)
3461 : {
3462 0 : struct tevent_req *req =
3463 0 : tevent_req_callback_data(subreq,
3464 : struct tevent_req);
3465 0 : NTSTATUS status;
3466 :
3467 0 : status = dcerpc_binding_handle_call_recv(subreq);
3468 0 : TALLOC_FREE(subreq);
3469 0 : if (tevent_req_nterror(req, status)) {
3470 0 : return;
3471 : }
3472 :
3473 0 : tevent_req_done(req);
3474 : }
3475 :
3476 0 : NTSTATUS dcerpc_lsa_OpenAccount_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3477 : {
3478 0 : struct dcerpc_lsa_OpenAccount_r_state *state =
3479 0 : tevent_req_data(req,
3480 : struct dcerpc_lsa_OpenAccount_r_state);
3481 0 : NTSTATUS status;
3482 :
3483 0 : if (tevent_req_is_nterror(req, &status)) {
3484 0 : tevent_req_received(req);
3485 0 : return status;
3486 : }
3487 :
3488 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3489 :
3490 0 : tevent_req_received(req);
3491 0 : return NT_STATUS_OK;
3492 : }
3493 :
3494 42 : NTSTATUS dcerpc_lsa_OpenAccount_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_OpenAccount *r)
3495 : {
3496 0 : NTSTATUS status;
3497 :
3498 42 : status = dcerpc_binding_handle_call(h,
3499 : NULL, &ndr_table_lsarpc,
3500 : NDR_LSA_OPENACCOUNT, mem_ctx, r);
3501 :
3502 42 : return status;
3503 : }
3504 :
3505 : struct dcerpc_lsa_OpenAccount_state {
3506 : struct lsa_OpenAccount orig;
3507 : struct lsa_OpenAccount tmp;
3508 : TALLOC_CTX *out_mem_ctx;
3509 : };
3510 :
3511 : static void dcerpc_lsa_OpenAccount_done(struct tevent_req *subreq);
3512 :
3513 0 : struct tevent_req *dcerpc_lsa_OpenAccount_send(TALLOC_CTX *mem_ctx,
3514 : struct tevent_context *ev,
3515 : struct dcerpc_binding_handle *h,
3516 : struct policy_handle *_handle /* [in] [ref] */,
3517 : struct dom_sid2 *_sid /* [in] [ref] */,
3518 : uint32_t _access_mask /* [in] */,
3519 : struct policy_handle *_acct_handle /* [out] [ref] */)
3520 : {
3521 0 : struct tevent_req *req;
3522 0 : struct dcerpc_lsa_OpenAccount_state *state;
3523 0 : struct tevent_req *subreq;
3524 :
3525 0 : req = tevent_req_create(mem_ctx, &state,
3526 : struct dcerpc_lsa_OpenAccount_state);
3527 0 : if (req == NULL) {
3528 0 : return NULL;
3529 : }
3530 0 : state->out_mem_ctx = NULL;
3531 :
3532 : /* In parameters */
3533 0 : state->orig.in.handle = _handle;
3534 0 : state->orig.in.sid = _sid;
3535 0 : state->orig.in.access_mask = _access_mask;
3536 :
3537 : /* Out parameters */
3538 0 : state->orig.out.acct_handle = _acct_handle;
3539 :
3540 : /* Result */
3541 0 : NDR_ZERO_STRUCT(state->orig.out.result);
3542 :
3543 0 : state->out_mem_ctx = talloc_named_const(state, 0,
3544 : "dcerpc_lsa_OpenAccount_out_memory");
3545 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
3546 0 : return tevent_req_post(req, ev);
3547 : }
3548 :
3549 : /* make a temporary copy, that we pass to the dispatch function */
3550 0 : state->tmp = state->orig;
3551 :
3552 0 : subreq = dcerpc_lsa_OpenAccount_r_send(state, ev, h, &state->tmp);
3553 0 : if (tevent_req_nomem(subreq, req)) {
3554 0 : return tevent_req_post(req, ev);
3555 : }
3556 0 : tevent_req_set_callback(subreq, dcerpc_lsa_OpenAccount_done, req);
3557 0 : return req;
3558 : }
3559 :
3560 0 : static void dcerpc_lsa_OpenAccount_done(struct tevent_req *subreq)
3561 : {
3562 0 : struct tevent_req *req = tevent_req_callback_data(
3563 : subreq, struct tevent_req);
3564 0 : struct dcerpc_lsa_OpenAccount_state *state = tevent_req_data(
3565 : req, struct dcerpc_lsa_OpenAccount_state);
3566 0 : NTSTATUS status;
3567 0 : TALLOC_CTX *mem_ctx;
3568 :
3569 0 : if (state->out_mem_ctx) {
3570 0 : mem_ctx = state->out_mem_ctx;
3571 : } else {
3572 0 : mem_ctx = state;
3573 : }
3574 :
3575 0 : status = dcerpc_lsa_OpenAccount_r_recv(subreq, mem_ctx);
3576 0 : TALLOC_FREE(subreq);
3577 0 : if (tevent_req_nterror(req, status)) {
3578 0 : return;
3579 : }
3580 :
3581 : /* Copy out parameters */
3582 0 : *state->orig.out.acct_handle = *state->tmp.out.acct_handle;
3583 :
3584 : /* Copy result */
3585 0 : state->orig.out.result = state->tmp.out.result;
3586 :
3587 : /* Reset temporary structure */
3588 0 : NDR_ZERO_STRUCT(state->tmp);
3589 :
3590 0 : tevent_req_done(req);
3591 : }
3592 :
3593 0 : NTSTATUS dcerpc_lsa_OpenAccount_recv(struct tevent_req *req,
3594 : TALLOC_CTX *mem_ctx,
3595 : NTSTATUS *result)
3596 : {
3597 0 : struct dcerpc_lsa_OpenAccount_state *state = tevent_req_data(
3598 : req, struct dcerpc_lsa_OpenAccount_state);
3599 0 : NTSTATUS status;
3600 :
3601 0 : if (tevent_req_is_nterror(req, &status)) {
3602 0 : tevent_req_received(req);
3603 0 : return status;
3604 : }
3605 :
3606 : /* Steal possible out parameters to the callers context */
3607 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3608 :
3609 : /* Return result */
3610 0 : *result = state->orig.out.result;
3611 :
3612 0 : tevent_req_received(req);
3613 0 : return NT_STATUS_OK;
3614 : }
3615 :
3616 0 : NTSTATUS dcerpc_lsa_OpenAccount(struct dcerpc_binding_handle *h,
3617 : TALLOC_CTX *mem_ctx,
3618 : struct policy_handle *_handle /* [in] [ref] */,
3619 : struct dom_sid2 *_sid /* [in] [ref] */,
3620 : uint32_t _access_mask /* [in] */,
3621 : struct policy_handle *_acct_handle /* [out] [ref] */,
3622 : NTSTATUS *result)
3623 : {
3624 0 : struct lsa_OpenAccount r;
3625 0 : NTSTATUS status;
3626 :
3627 : /* In parameters */
3628 0 : r.in.handle = _handle;
3629 0 : r.in.sid = _sid;
3630 0 : r.in.access_mask = _access_mask;
3631 :
3632 : /* Out parameters */
3633 0 : r.out.acct_handle = _acct_handle;
3634 :
3635 : /* Result */
3636 0 : NDR_ZERO_STRUCT(r.out.result);
3637 :
3638 0 : status = dcerpc_lsa_OpenAccount_r(h, mem_ctx, &r);
3639 0 : if (!NT_STATUS_IS_OK(status)) {
3640 0 : return status;
3641 : }
3642 :
3643 : /* Return variables */
3644 0 : *_acct_handle = *r.out.acct_handle;
3645 :
3646 : /* Return result */
3647 0 : *result = r.out.result;
3648 :
3649 0 : return NT_STATUS_OK;
3650 : }
3651 :
3652 : struct dcerpc_lsa_EnumPrivsAccount_r_state {
3653 : TALLOC_CTX *out_mem_ctx;
3654 : };
3655 :
3656 : static void dcerpc_lsa_EnumPrivsAccount_r_done(struct tevent_req *subreq);
3657 :
3658 0 : struct tevent_req *dcerpc_lsa_EnumPrivsAccount_r_send(TALLOC_CTX *mem_ctx,
3659 : struct tevent_context *ev,
3660 : struct dcerpc_binding_handle *h,
3661 : struct lsa_EnumPrivsAccount *r)
3662 : {
3663 0 : struct tevent_req *req;
3664 0 : struct dcerpc_lsa_EnumPrivsAccount_r_state *state;
3665 0 : struct tevent_req *subreq;
3666 :
3667 0 : req = tevent_req_create(mem_ctx, &state,
3668 : struct dcerpc_lsa_EnumPrivsAccount_r_state);
3669 0 : if (req == NULL) {
3670 0 : return NULL;
3671 : }
3672 :
3673 0 : state->out_mem_ctx = talloc_new(state);
3674 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
3675 0 : return tevent_req_post(req, ev);
3676 : }
3677 :
3678 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
3679 : NULL, &ndr_table_lsarpc,
3680 0 : NDR_LSA_ENUMPRIVSACCOUNT, state->out_mem_ctx, r);
3681 0 : if (tevent_req_nomem(subreq, req)) {
3682 0 : return tevent_req_post(req, ev);
3683 : }
3684 0 : tevent_req_set_callback(subreq, dcerpc_lsa_EnumPrivsAccount_r_done, req);
3685 :
3686 0 : return req;
3687 : }
3688 :
3689 0 : static void dcerpc_lsa_EnumPrivsAccount_r_done(struct tevent_req *subreq)
3690 : {
3691 0 : struct tevent_req *req =
3692 0 : tevent_req_callback_data(subreq,
3693 : struct tevent_req);
3694 0 : NTSTATUS status;
3695 :
3696 0 : status = dcerpc_binding_handle_call_recv(subreq);
3697 0 : TALLOC_FREE(subreq);
3698 0 : if (tevent_req_nterror(req, status)) {
3699 0 : return;
3700 : }
3701 :
3702 0 : tevent_req_done(req);
3703 : }
3704 :
3705 0 : NTSTATUS dcerpc_lsa_EnumPrivsAccount_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3706 : {
3707 0 : struct dcerpc_lsa_EnumPrivsAccount_r_state *state =
3708 0 : tevent_req_data(req,
3709 : struct dcerpc_lsa_EnumPrivsAccount_r_state);
3710 0 : NTSTATUS status;
3711 :
3712 0 : if (tevent_req_is_nterror(req, &status)) {
3713 0 : tevent_req_received(req);
3714 0 : return status;
3715 : }
3716 :
3717 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3718 :
3719 0 : tevent_req_received(req);
3720 0 : return NT_STATUS_OK;
3721 : }
3722 :
3723 30 : NTSTATUS dcerpc_lsa_EnumPrivsAccount_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_EnumPrivsAccount *r)
3724 : {
3725 0 : NTSTATUS status;
3726 :
3727 30 : status = dcerpc_binding_handle_call(h,
3728 : NULL, &ndr_table_lsarpc,
3729 : NDR_LSA_ENUMPRIVSACCOUNT, mem_ctx, r);
3730 :
3731 30 : return status;
3732 : }
3733 :
3734 : struct dcerpc_lsa_EnumPrivsAccount_state {
3735 : struct lsa_EnumPrivsAccount orig;
3736 : struct lsa_EnumPrivsAccount tmp;
3737 : TALLOC_CTX *out_mem_ctx;
3738 : };
3739 :
3740 : static void dcerpc_lsa_EnumPrivsAccount_done(struct tevent_req *subreq);
3741 :
3742 0 : struct tevent_req *dcerpc_lsa_EnumPrivsAccount_send(TALLOC_CTX *mem_ctx,
3743 : struct tevent_context *ev,
3744 : struct dcerpc_binding_handle *h,
3745 : struct policy_handle *_handle /* [in] [ref] */,
3746 : struct lsa_PrivilegeSet **_privs /* [out] [ref] */)
3747 : {
3748 0 : struct tevent_req *req;
3749 0 : struct dcerpc_lsa_EnumPrivsAccount_state *state;
3750 0 : struct tevent_req *subreq;
3751 :
3752 0 : req = tevent_req_create(mem_ctx, &state,
3753 : struct dcerpc_lsa_EnumPrivsAccount_state);
3754 0 : if (req == NULL) {
3755 0 : return NULL;
3756 : }
3757 0 : state->out_mem_ctx = NULL;
3758 :
3759 : /* In parameters */
3760 0 : state->orig.in.handle = _handle;
3761 :
3762 : /* Out parameters */
3763 0 : state->orig.out.privs = _privs;
3764 :
3765 : /* Result */
3766 0 : NDR_ZERO_STRUCT(state->orig.out.result);
3767 :
3768 0 : state->out_mem_ctx = talloc_named_const(state, 0,
3769 : "dcerpc_lsa_EnumPrivsAccount_out_memory");
3770 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
3771 0 : return tevent_req_post(req, ev);
3772 : }
3773 :
3774 : /* make a temporary copy, that we pass to the dispatch function */
3775 0 : state->tmp = state->orig;
3776 :
3777 0 : subreq = dcerpc_lsa_EnumPrivsAccount_r_send(state, ev, h, &state->tmp);
3778 0 : if (tevent_req_nomem(subreq, req)) {
3779 0 : return tevent_req_post(req, ev);
3780 : }
3781 0 : tevent_req_set_callback(subreq, dcerpc_lsa_EnumPrivsAccount_done, req);
3782 0 : return req;
3783 : }
3784 :
3785 0 : static void dcerpc_lsa_EnumPrivsAccount_done(struct tevent_req *subreq)
3786 : {
3787 0 : struct tevent_req *req = tevent_req_callback_data(
3788 : subreq, struct tevent_req);
3789 0 : struct dcerpc_lsa_EnumPrivsAccount_state *state = tevent_req_data(
3790 : req, struct dcerpc_lsa_EnumPrivsAccount_state);
3791 0 : NTSTATUS status;
3792 0 : TALLOC_CTX *mem_ctx;
3793 :
3794 0 : if (state->out_mem_ctx) {
3795 0 : mem_ctx = state->out_mem_ctx;
3796 : } else {
3797 0 : mem_ctx = state;
3798 : }
3799 :
3800 0 : status = dcerpc_lsa_EnumPrivsAccount_r_recv(subreq, mem_ctx);
3801 0 : TALLOC_FREE(subreq);
3802 0 : if (tevent_req_nterror(req, status)) {
3803 0 : return;
3804 : }
3805 :
3806 : /* Copy out parameters */
3807 0 : *state->orig.out.privs = *state->tmp.out.privs;
3808 :
3809 : /* Copy result */
3810 0 : state->orig.out.result = state->tmp.out.result;
3811 :
3812 : /* Reset temporary structure */
3813 0 : NDR_ZERO_STRUCT(state->tmp);
3814 :
3815 0 : tevent_req_done(req);
3816 : }
3817 :
3818 0 : NTSTATUS dcerpc_lsa_EnumPrivsAccount_recv(struct tevent_req *req,
3819 : TALLOC_CTX *mem_ctx,
3820 : NTSTATUS *result)
3821 : {
3822 0 : struct dcerpc_lsa_EnumPrivsAccount_state *state = tevent_req_data(
3823 : req, struct dcerpc_lsa_EnumPrivsAccount_state);
3824 0 : NTSTATUS status;
3825 :
3826 0 : if (tevent_req_is_nterror(req, &status)) {
3827 0 : tevent_req_received(req);
3828 0 : return status;
3829 : }
3830 :
3831 : /* Steal possible out parameters to the callers context */
3832 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3833 :
3834 : /* Return result */
3835 0 : *result = state->orig.out.result;
3836 :
3837 0 : tevent_req_received(req);
3838 0 : return NT_STATUS_OK;
3839 : }
3840 :
3841 0 : NTSTATUS dcerpc_lsa_EnumPrivsAccount(struct dcerpc_binding_handle *h,
3842 : TALLOC_CTX *mem_ctx,
3843 : struct policy_handle *_handle /* [in] [ref] */,
3844 : struct lsa_PrivilegeSet **_privs /* [out] [ref] */,
3845 : NTSTATUS *result)
3846 : {
3847 0 : struct lsa_EnumPrivsAccount r;
3848 0 : NTSTATUS status;
3849 :
3850 : /* In parameters */
3851 0 : r.in.handle = _handle;
3852 :
3853 : /* Out parameters */
3854 0 : r.out.privs = _privs;
3855 :
3856 : /* Result */
3857 0 : NDR_ZERO_STRUCT(r.out.result);
3858 :
3859 0 : status = dcerpc_lsa_EnumPrivsAccount_r(h, mem_ctx, &r);
3860 0 : if (!NT_STATUS_IS_OK(status)) {
3861 0 : return status;
3862 : }
3863 :
3864 : /* Return variables */
3865 0 : *_privs = *r.out.privs;
3866 :
3867 : /* Return result */
3868 0 : *result = r.out.result;
3869 :
3870 0 : return NT_STATUS_OK;
3871 : }
3872 :
3873 : struct dcerpc_lsa_AddPrivilegesToAccount_r_state {
3874 : TALLOC_CTX *out_mem_ctx;
3875 : };
3876 :
3877 : static void dcerpc_lsa_AddPrivilegesToAccount_r_done(struct tevent_req *subreq);
3878 :
3879 0 : struct tevent_req *dcerpc_lsa_AddPrivilegesToAccount_r_send(TALLOC_CTX *mem_ctx,
3880 : struct tevent_context *ev,
3881 : struct dcerpc_binding_handle *h,
3882 : struct lsa_AddPrivilegesToAccount *r)
3883 : {
3884 0 : struct tevent_req *req;
3885 0 : struct dcerpc_lsa_AddPrivilegesToAccount_r_state *state;
3886 0 : struct tevent_req *subreq;
3887 :
3888 0 : req = tevent_req_create(mem_ctx, &state,
3889 : struct dcerpc_lsa_AddPrivilegesToAccount_r_state);
3890 0 : if (req == NULL) {
3891 0 : return NULL;
3892 : }
3893 :
3894 0 : state->out_mem_ctx = NULL;
3895 :
3896 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
3897 : NULL, &ndr_table_lsarpc,
3898 : NDR_LSA_ADDPRIVILEGESTOACCOUNT, state, r);
3899 0 : if (tevent_req_nomem(subreq, req)) {
3900 0 : return tevent_req_post(req, ev);
3901 : }
3902 0 : tevent_req_set_callback(subreq, dcerpc_lsa_AddPrivilegesToAccount_r_done, req);
3903 :
3904 0 : return req;
3905 : }
3906 :
3907 0 : static void dcerpc_lsa_AddPrivilegesToAccount_r_done(struct tevent_req *subreq)
3908 : {
3909 0 : struct tevent_req *req =
3910 0 : tevent_req_callback_data(subreq,
3911 : struct tevent_req);
3912 0 : NTSTATUS status;
3913 :
3914 0 : status = dcerpc_binding_handle_call_recv(subreq);
3915 0 : TALLOC_FREE(subreq);
3916 0 : if (tevent_req_nterror(req, status)) {
3917 0 : return;
3918 : }
3919 :
3920 0 : tevent_req_done(req);
3921 : }
3922 :
3923 0 : NTSTATUS dcerpc_lsa_AddPrivilegesToAccount_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3924 : {
3925 0 : struct dcerpc_lsa_AddPrivilegesToAccount_r_state *state =
3926 0 : tevent_req_data(req,
3927 : struct dcerpc_lsa_AddPrivilegesToAccount_r_state);
3928 0 : NTSTATUS status;
3929 :
3930 0 : if (tevent_req_is_nterror(req, &status)) {
3931 0 : tevent_req_received(req);
3932 0 : return status;
3933 : }
3934 :
3935 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3936 :
3937 0 : tevent_req_received(req);
3938 0 : return NT_STATUS_OK;
3939 : }
3940 :
3941 17 : NTSTATUS dcerpc_lsa_AddPrivilegesToAccount_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_AddPrivilegesToAccount *r)
3942 : {
3943 0 : NTSTATUS status;
3944 :
3945 17 : status = dcerpc_binding_handle_call(h,
3946 : NULL, &ndr_table_lsarpc,
3947 : NDR_LSA_ADDPRIVILEGESTOACCOUNT, mem_ctx, r);
3948 :
3949 17 : return status;
3950 : }
3951 :
3952 : struct dcerpc_lsa_AddPrivilegesToAccount_state {
3953 : struct lsa_AddPrivilegesToAccount orig;
3954 : struct lsa_AddPrivilegesToAccount tmp;
3955 : TALLOC_CTX *out_mem_ctx;
3956 : };
3957 :
3958 : static void dcerpc_lsa_AddPrivilegesToAccount_done(struct tevent_req *subreq);
3959 :
3960 0 : struct tevent_req *dcerpc_lsa_AddPrivilegesToAccount_send(TALLOC_CTX *mem_ctx,
3961 : struct tevent_context *ev,
3962 : struct dcerpc_binding_handle *h,
3963 : struct policy_handle *_handle /* [in] [ref] */,
3964 : struct lsa_PrivilegeSet *_privs /* [in] [ref] */)
3965 : {
3966 0 : struct tevent_req *req;
3967 0 : struct dcerpc_lsa_AddPrivilegesToAccount_state *state;
3968 0 : struct tevent_req *subreq;
3969 :
3970 0 : req = tevent_req_create(mem_ctx, &state,
3971 : struct dcerpc_lsa_AddPrivilegesToAccount_state);
3972 0 : if (req == NULL) {
3973 0 : return NULL;
3974 : }
3975 0 : state->out_mem_ctx = NULL;
3976 :
3977 : /* In parameters */
3978 0 : state->orig.in.handle = _handle;
3979 0 : state->orig.in.privs = _privs;
3980 :
3981 : /* Out parameters */
3982 :
3983 : /* Result */
3984 0 : NDR_ZERO_STRUCT(state->orig.out.result);
3985 :
3986 : /* make a temporary copy, that we pass to the dispatch function */
3987 0 : state->tmp = state->orig;
3988 :
3989 0 : subreq = dcerpc_lsa_AddPrivilegesToAccount_r_send(state, ev, h, &state->tmp);
3990 0 : if (tevent_req_nomem(subreq, req)) {
3991 0 : return tevent_req_post(req, ev);
3992 : }
3993 0 : tevent_req_set_callback(subreq, dcerpc_lsa_AddPrivilegesToAccount_done, req);
3994 0 : return req;
3995 : }
3996 :
3997 0 : static void dcerpc_lsa_AddPrivilegesToAccount_done(struct tevent_req *subreq)
3998 : {
3999 0 : struct tevent_req *req = tevent_req_callback_data(
4000 : subreq, struct tevent_req);
4001 0 : struct dcerpc_lsa_AddPrivilegesToAccount_state *state = tevent_req_data(
4002 : req, struct dcerpc_lsa_AddPrivilegesToAccount_state);
4003 0 : NTSTATUS status;
4004 0 : TALLOC_CTX *mem_ctx;
4005 :
4006 0 : if (state->out_mem_ctx) {
4007 0 : mem_ctx = state->out_mem_ctx;
4008 : } else {
4009 0 : mem_ctx = state;
4010 : }
4011 :
4012 0 : status = dcerpc_lsa_AddPrivilegesToAccount_r_recv(subreq, mem_ctx);
4013 0 : TALLOC_FREE(subreq);
4014 0 : if (tevent_req_nterror(req, status)) {
4015 0 : return;
4016 : }
4017 :
4018 : /* Copy out parameters */
4019 :
4020 : /* Copy result */
4021 0 : state->orig.out.result = state->tmp.out.result;
4022 :
4023 : /* Reset temporary structure */
4024 0 : NDR_ZERO_STRUCT(state->tmp);
4025 :
4026 0 : tevent_req_done(req);
4027 : }
4028 :
4029 0 : NTSTATUS dcerpc_lsa_AddPrivilegesToAccount_recv(struct tevent_req *req,
4030 : TALLOC_CTX *mem_ctx,
4031 : NTSTATUS *result)
4032 : {
4033 0 : struct dcerpc_lsa_AddPrivilegesToAccount_state *state = tevent_req_data(
4034 : req, struct dcerpc_lsa_AddPrivilegesToAccount_state);
4035 0 : NTSTATUS status;
4036 :
4037 0 : if (tevent_req_is_nterror(req, &status)) {
4038 0 : tevent_req_received(req);
4039 0 : return status;
4040 : }
4041 :
4042 : /* Steal possible out parameters to the callers context */
4043 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4044 :
4045 : /* Return result */
4046 0 : *result = state->orig.out.result;
4047 :
4048 0 : tevent_req_received(req);
4049 0 : return NT_STATUS_OK;
4050 : }
4051 :
4052 0 : NTSTATUS dcerpc_lsa_AddPrivilegesToAccount(struct dcerpc_binding_handle *h,
4053 : TALLOC_CTX *mem_ctx,
4054 : struct policy_handle *_handle /* [in] [ref] */,
4055 : struct lsa_PrivilegeSet *_privs /* [in] [ref] */,
4056 : NTSTATUS *result)
4057 : {
4058 0 : struct lsa_AddPrivilegesToAccount r;
4059 0 : NTSTATUS status;
4060 :
4061 : /* In parameters */
4062 0 : r.in.handle = _handle;
4063 0 : r.in.privs = _privs;
4064 :
4065 : /* Out parameters */
4066 :
4067 : /* Result */
4068 0 : NDR_ZERO_STRUCT(r.out.result);
4069 :
4070 0 : status = dcerpc_lsa_AddPrivilegesToAccount_r(h, mem_ctx, &r);
4071 0 : if (!NT_STATUS_IS_OK(status)) {
4072 0 : return status;
4073 : }
4074 :
4075 : /* Return variables */
4076 :
4077 : /* Return result */
4078 0 : *result = r.out.result;
4079 :
4080 0 : return NT_STATUS_OK;
4081 : }
4082 :
4083 : struct dcerpc_lsa_RemovePrivilegesFromAccount_r_state {
4084 : TALLOC_CTX *out_mem_ctx;
4085 : };
4086 :
4087 : static void dcerpc_lsa_RemovePrivilegesFromAccount_r_done(struct tevent_req *subreq);
4088 :
4089 0 : struct tevent_req *dcerpc_lsa_RemovePrivilegesFromAccount_r_send(TALLOC_CTX *mem_ctx,
4090 : struct tevent_context *ev,
4091 : struct dcerpc_binding_handle *h,
4092 : struct lsa_RemovePrivilegesFromAccount *r)
4093 : {
4094 0 : struct tevent_req *req;
4095 0 : struct dcerpc_lsa_RemovePrivilegesFromAccount_r_state *state;
4096 0 : struct tevent_req *subreq;
4097 :
4098 0 : req = tevent_req_create(mem_ctx, &state,
4099 : struct dcerpc_lsa_RemovePrivilegesFromAccount_r_state);
4100 0 : if (req == NULL) {
4101 0 : return NULL;
4102 : }
4103 :
4104 0 : state->out_mem_ctx = NULL;
4105 :
4106 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
4107 : NULL, &ndr_table_lsarpc,
4108 : NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT, state, r);
4109 0 : if (tevent_req_nomem(subreq, req)) {
4110 0 : return tevent_req_post(req, ev);
4111 : }
4112 0 : tevent_req_set_callback(subreq, dcerpc_lsa_RemovePrivilegesFromAccount_r_done, req);
4113 :
4114 0 : return req;
4115 : }
4116 :
4117 0 : static void dcerpc_lsa_RemovePrivilegesFromAccount_r_done(struct tevent_req *subreq)
4118 : {
4119 0 : struct tevent_req *req =
4120 0 : tevent_req_callback_data(subreq,
4121 : struct tevent_req);
4122 0 : NTSTATUS status;
4123 :
4124 0 : status = dcerpc_binding_handle_call_recv(subreq);
4125 0 : TALLOC_FREE(subreq);
4126 0 : if (tevent_req_nterror(req, status)) {
4127 0 : return;
4128 : }
4129 :
4130 0 : tevent_req_done(req);
4131 : }
4132 :
4133 0 : NTSTATUS dcerpc_lsa_RemovePrivilegesFromAccount_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
4134 : {
4135 0 : struct dcerpc_lsa_RemovePrivilegesFromAccount_r_state *state =
4136 0 : tevent_req_data(req,
4137 : struct dcerpc_lsa_RemovePrivilegesFromAccount_r_state);
4138 0 : NTSTATUS status;
4139 :
4140 0 : if (tevent_req_is_nterror(req, &status)) {
4141 0 : tevent_req_received(req);
4142 0 : return status;
4143 : }
4144 :
4145 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4146 :
4147 0 : tevent_req_received(req);
4148 0 : return NT_STATUS_OK;
4149 : }
4150 :
4151 17 : NTSTATUS dcerpc_lsa_RemovePrivilegesFromAccount_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_RemovePrivilegesFromAccount *r)
4152 : {
4153 0 : NTSTATUS status;
4154 :
4155 17 : status = dcerpc_binding_handle_call(h,
4156 : NULL, &ndr_table_lsarpc,
4157 : NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT, mem_ctx, r);
4158 :
4159 17 : return status;
4160 : }
4161 :
4162 : struct dcerpc_lsa_RemovePrivilegesFromAccount_state {
4163 : struct lsa_RemovePrivilegesFromAccount orig;
4164 : struct lsa_RemovePrivilegesFromAccount tmp;
4165 : TALLOC_CTX *out_mem_ctx;
4166 : };
4167 :
4168 : static void dcerpc_lsa_RemovePrivilegesFromAccount_done(struct tevent_req *subreq);
4169 :
4170 0 : struct tevent_req *dcerpc_lsa_RemovePrivilegesFromAccount_send(TALLOC_CTX *mem_ctx,
4171 : struct tevent_context *ev,
4172 : struct dcerpc_binding_handle *h,
4173 : struct policy_handle *_handle /* [in] [ref] */,
4174 : uint8_t _remove_all /* [in] */,
4175 : struct lsa_PrivilegeSet *_privs /* [in] [unique] */)
4176 : {
4177 0 : struct tevent_req *req;
4178 0 : struct dcerpc_lsa_RemovePrivilegesFromAccount_state *state;
4179 0 : struct tevent_req *subreq;
4180 :
4181 0 : req = tevent_req_create(mem_ctx, &state,
4182 : struct dcerpc_lsa_RemovePrivilegesFromAccount_state);
4183 0 : if (req == NULL) {
4184 0 : return NULL;
4185 : }
4186 0 : state->out_mem_ctx = NULL;
4187 :
4188 : /* In parameters */
4189 0 : state->orig.in.handle = _handle;
4190 0 : state->orig.in.remove_all = _remove_all;
4191 0 : state->orig.in.privs = _privs;
4192 :
4193 : /* Out parameters */
4194 :
4195 : /* Result */
4196 0 : NDR_ZERO_STRUCT(state->orig.out.result);
4197 :
4198 : /* make a temporary copy, that we pass to the dispatch function */
4199 0 : state->tmp = state->orig;
4200 :
4201 0 : subreq = dcerpc_lsa_RemovePrivilegesFromAccount_r_send(state, ev, h, &state->tmp);
4202 0 : if (tevent_req_nomem(subreq, req)) {
4203 0 : return tevent_req_post(req, ev);
4204 : }
4205 0 : tevent_req_set_callback(subreq, dcerpc_lsa_RemovePrivilegesFromAccount_done, req);
4206 0 : return req;
4207 : }
4208 :
4209 0 : static void dcerpc_lsa_RemovePrivilegesFromAccount_done(struct tevent_req *subreq)
4210 : {
4211 0 : struct tevent_req *req = tevent_req_callback_data(
4212 : subreq, struct tevent_req);
4213 0 : struct dcerpc_lsa_RemovePrivilegesFromAccount_state *state = tevent_req_data(
4214 : req, struct dcerpc_lsa_RemovePrivilegesFromAccount_state);
4215 0 : NTSTATUS status;
4216 0 : TALLOC_CTX *mem_ctx;
4217 :
4218 0 : if (state->out_mem_ctx) {
4219 0 : mem_ctx = state->out_mem_ctx;
4220 : } else {
4221 0 : mem_ctx = state;
4222 : }
4223 :
4224 0 : status = dcerpc_lsa_RemovePrivilegesFromAccount_r_recv(subreq, mem_ctx);
4225 0 : TALLOC_FREE(subreq);
4226 0 : if (tevent_req_nterror(req, status)) {
4227 0 : return;
4228 : }
4229 :
4230 : /* Copy out parameters */
4231 :
4232 : /* Copy result */
4233 0 : state->orig.out.result = state->tmp.out.result;
4234 :
4235 : /* Reset temporary structure */
4236 0 : NDR_ZERO_STRUCT(state->tmp);
4237 :
4238 0 : tevent_req_done(req);
4239 : }
4240 :
4241 0 : NTSTATUS dcerpc_lsa_RemovePrivilegesFromAccount_recv(struct tevent_req *req,
4242 : TALLOC_CTX *mem_ctx,
4243 : NTSTATUS *result)
4244 : {
4245 0 : struct dcerpc_lsa_RemovePrivilegesFromAccount_state *state = tevent_req_data(
4246 : req, struct dcerpc_lsa_RemovePrivilegesFromAccount_state);
4247 0 : NTSTATUS status;
4248 :
4249 0 : if (tevent_req_is_nterror(req, &status)) {
4250 0 : tevent_req_received(req);
4251 0 : return status;
4252 : }
4253 :
4254 : /* Steal possible out parameters to the callers context */
4255 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4256 :
4257 : /* Return result */
4258 0 : *result = state->orig.out.result;
4259 :
4260 0 : tevent_req_received(req);
4261 0 : return NT_STATUS_OK;
4262 : }
4263 :
4264 0 : NTSTATUS dcerpc_lsa_RemovePrivilegesFromAccount(struct dcerpc_binding_handle *h,
4265 : TALLOC_CTX *mem_ctx,
4266 : struct policy_handle *_handle /* [in] [ref] */,
4267 : uint8_t _remove_all /* [in] */,
4268 : struct lsa_PrivilegeSet *_privs /* [in] [unique] */,
4269 : NTSTATUS *result)
4270 : {
4271 0 : struct lsa_RemovePrivilegesFromAccount r;
4272 0 : NTSTATUS status;
4273 :
4274 : /* In parameters */
4275 0 : r.in.handle = _handle;
4276 0 : r.in.remove_all = _remove_all;
4277 0 : r.in.privs = _privs;
4278 :
4279 : /* Out parameters */
4280 :
4281 : /* Result */
4282 0 : NDR_ZERO_STRUCT(r.out.result);
4283 :
4284 0 : status = dcerpc_lsa_RemovePrivilegesFromAccount_r(h, mem_ctx, &r);
4285 0 : if (!NT_STATUS_IS_OK(status)) {
4286 0 : return status;
4287 : }
4288 :
4289 : /* Return variables */
4290 :
4291 : /* Return result */
4292 0 : *result = r.out.result;
4293 :
4294 0 : return NT_STATUS_OK;
4295 : }
4296 :
4297 : struct dcerpc_lsa_GetSystemAccessAccount_r_state {
4298 : TALLOC_CTX *out_mem_ctx;
4299 : };
4300 :
4301 : static void dcerpc_lsa_GetSystemAccessAccount_r_done(struct tevent_req *subreq);
4302 :
4303 0 : struct tevent_req *dcerpc_lsa_GetSystemAccessAccount_r_send(TALLOC_CTX *mem_ctx,
4304 : struct tevent_context *ev,
4305 : struct dcerpc_binding_handle *h,
4306 : struct lsa_GetSystemAccessAccount *r)
4307 : {
4308 0 : struct tevent_req *req;
4309 0 : struct dcerpc_lsa_GetSystemAccessAccount_r_state *state;
4310 0 : struct tevent_req *subreq;
4311 :
4312 0 : req = tevent_req_create(mem_ctx, &state,
4313 : struct dcerpc_lsa_GetSystemAccessAccount_r_state);
4314 0 : if (req == NULL) {
4315 0 : return NULL;
4316 : }
4317 :
4318 0 : state->out_mem_ctx = talloc_new(state);
4319 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
4320 0 : return tevent_req_post(req, ev);
4321 : }
4322 :
4323 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
4324 : NULL, &ndr_table_lsarpc,
4325 0 : NDR_LSA_GETSYSTEMACCESSACCOUNT, state->out_mem_ctx, r);
4326 0 : if (tevent_req_nomem(subreq, req)) {
4327 0 : return tevent_req_post(req, ev);
4328 : }
4329 0 : tevent_req_set_callback(subreq, dcerpc_lsa_GetSystemAccessAccount_r_done, req);
4330 :
4331 0 : return req;
4332 : }
4333 :
4334 0 : static void dcerpc_lsa_GetSystemAccessAccount_r_done(struct tevent_req *subreq)
4335 : {
4336 0 : struct tevent_req *req =
4337 0 : tevent_req_callback_data(subreq,
4338 : struct tevent_req);
4339 0 : NTSTATUS status;
4340 :
4341 0 : status = dcerpc_binding_handle_call_recv(subreq);
4342 0 : TALLOC_FREE(subreq);
4343 0 : if (tevent_req_nterror(req, status)) {
4344 0 : return;
4345 : }
4346 :
4347 0 : tevent_req_done(req);
4348 : }
4349 :
4350 0 : NTSTATUS dcerpc_lsa_GetSystemAccessAccount_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
4351 : {
4352 0 : struct dcerpc_lsa_GetSystemAccessAccount_r_state *state =
4353 0 : tevent_req_data(req,
4354 : struct dcerpc_lsa_GetSystemAccessAccount_r_state);
4355 0 : NTSTATUS status;
4356 :
4357 0 : if (tevent_req_is_nterror(req, &status)) {
4358 0 : tevent_req_received(req);
4359 0 : return status;
4360 : }
4361 :
4362 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4363 :
4364 0 : tevent_req_received(req);
4365 0 : return NT_STATUS_OK;
4366 : }
4367 :
4368 42 : NTSTATUS dcerpc_lsa_GetSystemAccessAccount_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_GetSystemAccessAccount *r)
4369 : {
4370 0 : NTSTATUS status;
4371 :
4372 42 : status = dcerpc_binding_handle_call(h,
4373 : NULL, &ndr_table_lsarpc,
4374 : NDR_LSA_GETSYSTEMACCESSACCOUNT, mem_ctx, r);
4375 :
4376 42 : return status;
4377 : }
4378 :
4379 : struct dcerpc_lsa_GetSystemAccessAccount_state {
4380 : struct lsa_GetSystemAccessAccount orig;
4381 : struct lsa_GetSystemAccessAccount tmp;
4382 : TALLOC_CTX *out_mem_ctx;
4383 : };
4384 :
4385 : static void dcerpc_lsa_GetSystemAccessAccount_done(struct tevent_req *subreq);
4386 :
4387 0 : struct tevent_req *dcerpc_lsa_GetSystemAccessAccount_send(TALLOC_CTX *mem_ctx,
4388 : struct tevent_context *ev,
4389 : struct dcerpc_binding_handle *h,
4390 : struct policy_handle *_handle /* [in] [ref] */,
4391 : uint32_t *_access_mask /* [out] [ref] */)
4392 : {
4393 0 : struct tevent_req *req;
4394 0 : struct dcerpc_lsa_GetSystemAccessAccount_state *state;
4395 0 : struct tevent_req *subreq;
4396 :
4397 0 : req = tevent_req_create(mem_ctx, &state,
4398 : struct dcerpc_lsa_GetSystemAccessAccount_state);
4399 0 : if (req == NULL) {
4400 0 : return NULL;
4401 : }
4402 0 : state->out_mem_ctx = NULL;
4403 :
4404 : /* In parameters */
4405 0 : state->orig.in.handle = _handle;
4406 :
4407 : /* Out parameters */
4408 0 : state->orig.out.access_mask = _access_mask;
4409 :
4410 : /* Result */
4411 0 : NDR_ZERO_STRUCT(state->orig.out.result);
4412 :
4413 0 : state->out_mem_ctx = talloc_named_const(state, 0,
4414 : "dcerpc_lsa_GetSystemAccessAccount_out_memory");
4415 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
4416 0 : return tevent_req_post(req, ev);
4417 : }
4418 :
4419 : /* make a temporary copy, that we pass to the dispatch function */
4420 0 : state->tmp = state->orig;
4421 :
4422 0 : subreq = dcerpc_lsa_GetSystemAccessAccount_r_send(state, ev, h, &state->tmp);
4423 0 : if (tevent_req_nomem(subreq, req)) {
4424 0 : return tevent_req_post(req, ev);
4425 : }
4426 0 : tevent_req_set_callback(subreq, dcerpc_lsa_GetSystemAccessAccount_done, req);
4427 0 : return req;
4428 : }
4429 :
4430 0 : static void dcerpc_lsa_GetSystemAccessAccount_done(struct tevent_req *subreq)
4431 : {
4432 0 : struct tevent_req *req = tevent_req_callback_data(
4433 : subreq, struct tevent_req);
4434 0 : struct dcerpc_lsa_GetSystemAccessAccount_state *state = tevent_req_data(
4435 : req, struct dcerpc_lsa_GetSystemAccessAccount_state);
4436 0 : NTSTATUS status;
4437 0 : TALLOC_CTX *mem_ctx;
4438 :
4439 0 : if (state->out_mem_ctx) {
4440 0 : mem_ctx = state->out_mem_ctx;
4441 : } else {
4442 0 : mem_ctx = state;
4443 : }
4444 :
4445 0 : status = dcerpc_lsa_GetSystemAccessAccount_r_recv(subreq, mem_ctx);
4446 0 : TALLOC_FREE(subreq);
4447 0 : if (tevent_req_nterror(req, status)) {
4448 0 : return;
4449 : }
4450 :
4451 : /* Copy out parameters */
4452 0 : *state->orig.out.access_mask = *state->tmp.out.access_mask;
4453 :
4454 : /* Copy result */
4455 0 : state->orig.out.result = state->tmp.out.result;
4456 :
4457 : /* Reset temporary structure */
4458 0 : NDR_ZERO_STRUCT(state->tmp);
4459 :
4460 0 : tevent_req_done(req);
4461 : }
4462 :
4463 0 : NTSTATUS dcerpc_lsa_GetSystemAccessAccount_recv(struct tevent_req *req,
4464 : TALLOC_CTX *mem_ctx,
4465 : NTSTATUS *result)
4466 : {
4467 0 : struct dcerpc_lsa_GetSystemAccessAccount_state *state = tevent_req_data(
4468 : req, struct dcerpc_lsa_GetSystemAccessAccount_state);
4469 0 : NTSTATUS status;
4470 :
4471 0 : if (tevent_req_is_nterror(req, &status)) {
4472 0 : tevent_req_received(req);
4473 0 : return status;
4474 : }
4475 :
4476 : /* Steal possible out parameters to the callers context */
4477 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4478 :
4479 : /* Return result */
4480 0 : *result = state->orig.out.result;
4481 :
4482 0 : tevent_req_received(req);
4483 0 : return NT_STATUS_OK;
4484 : }
4485 :
4486 0 : NTSTATUS dcerpc_lsa_GetSystemAccessAccount(struct dcerpc_binding_handle *h,
4487 : TALLOC_CTX *mem_ctx,
4488 : struct policy_handle *_handle /* [in] [ref] */,
4489 : uint32_t *_access_mask /* [out] [ref] */,
4490 : NTSTATUS *result)
4491 : {
4492 0 : struct lsa_GetSystemAccessAccount r;
4493 0 : NTSTATUS status;
4494 :
4495 : /* In parameters */
4496 0 : r.in.handle = _handle;
4497 :
4498 : /* Out parameters */
4499 0 : r.out.access_mask = _access_mask;
4500 :
4501 : /* Result */
4502 0 : NDR_ZERO_STRUCT(r.out.result);
4503 :
4504 0 : status = dcerpc_lsa_GetSystemAccessAccount_r(h, mem_ctx, &r);
4505 0 : if (!NT_STATUS_IS_OK(status)) {
4506 0 : return status;
4507 : }
4508 :
4509 : /* Return variables */
4510 0 : *_access_mask = *r.out.access_mask;
4511 :
4512 : /* Return result */
4513 0 : *result = r.out.result;
4514 :
4515 0 : return NT_STATUS_OK;
4516 : }
4517 :
4518 : struct dcerpc_lsa_SetSystemAccessAccount_r_state {
4519 : TALLOC_CTX *out_mem_ctx;
4520 : };
4521 :
4522 : static void dcerpc_lsa_SetSystemAccessAccount_r_done(struct tevent_req *subreq);
4523 :
4524 0 : struct tevent_req *dcerpc_lsa_SetSystemAccessAccount_r_send(TALLOC_CTX *mem_ctx,
4525 : struct tevent_context *ev,
4526 : struct dcerpc_binding_handle *h,
4527 : struct lsa_SetSystemAccessAccount *r)
4528 : {
4529 0 : struct tevent_req *req;
4530 0 : struct dcerpc_lsa_SetSystemAccessAccount_r_state *state;
4531 0 : struct tevent_req *subreq;
4532 :
4533 0 : req = tevent_req_create(mem_ctx, &state,
4534 : struct dcerpc_lsa_SetSystemAccessAccount_r_state);
4535 0 : if (req == NULL) {
4536 0 : return NULL;
4537 : }
4538 :
4539 0 : state->out_mem_ctx = NULL;
4540 :
4541 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
4542 : NULL, &ndr_table_lsarpc,
4543 : NDR_LSA_SETSYSTEMACCESSACCOUNT, state, r);
4544 0 : if (tevent_req_nomem(subreq, req)) {
4545 0 : return tevent_req_post(req, ev);
4546 : }
4547 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetSystemAccessAccount_r_done, req);
4548 :
4549 0 : return req;
4550 : }
4551 :
4552 0 : static void dcerpc_lsa_SetSystemAccessAccount_r_done(struct tevent_req *subreq)
4553 : {
4554 0 : struct tevent_req *req =
4555 0 : tevent_req_callback_data(subreq,
4556 : struct tevent_req);
4557 0 : NTSTATUS status;
4558 :
4559 0 : status = dcerpc_binding_handle_call_recv(subreq);
4560 0 : TALLOC_FREE(subreq);
4561 0 : if (tevent_req_nterror(req, status)) {
4562 0 : return;
4563 : }
4564 :
4565 0 : tevent_req_done(req);
4566 : }
4567 :
4568 0 : NTSTATUS dcerpc_lsa_SetSystemAccessAccount_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
4569 : {
4570 0 : struct dcerpc_lsa_SetSystemAccessAccount_r_state *state =
4571 0 : tevent_req_data(req,
4572 : struct dcerpc_lsa_SetSystemAccessAccount_r_state);
4573 0 : NTSTATUS status;
4574 :
4575 0 : if (tevent_req_is_nterror(req, &status)) {
4576 0 : tevent_req_received(req);
4577 0 : return status;
4578 : }
4579 :
4580 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4581 :
4582 0 : tevent_req_received(req);
4583 0 : return NT_STATUS_OK;
4584 : }
4585 :
4586 0 : NTSTATUS dcerpc_lsa_SetSystemAccessAccount_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_SetSystemAccessAccount *r)
4587 : {
4588 0 : NTSTATUS status;
4589 :
4590 0 : status = dcerpc_binding_handle_call(h,
4591 : NULL, &ndr_table_lsarpc,
4592 : NDR_LSA_SETSYSTEMACCESSACCOUNT, mem_ctx, r);
4593 :
4594 0 : return status;
4595 : }
4596 :
4597 : struct dcerpc_lsa_SetSystemAccessAccount_state {
4598 : struct lsa_SetSystemAccessAccount orig;
4599 : struct lsa_SetSystemAccessAccount tmp;
4600 : TALLOC_CTX *out_mem_ctx;
4601 : };
4602 :
4603 : static void dcerpc_lsa_SetSystemAccessAccount_done(struct tevent_req *subreq);
4604 :
4605 0 : struct tevent_req *dcerpc_lsa_SetSystemAccessAccount_send(TALLOC_CTX *mem_ctx,
4606 : struct tevent_context *ev,
4607 : struct dcerpc_binding_handle *h,
4608 : struct policy_handle *_handle /* [in] [ref] */,
4609 : uint32_t _access_mask /* [in] */)
4610 : {
4611 0 : struct tevent_req *req;
4612 0 : struct dcerpc_lsa_SetSystemAccessAccount_state *state;
4613 0 : struct tevent_req *subreq;
4614 :
4615 0 : req = tevent_req_create(mem_ctx, &state,
4616 : struct dcerpc_lsa_SetSystemAccessAccount_state);
4617 0 : if (req == NULL) {
4618 0 : return NULL;
4619 : }
4620 0 : state->out_mem_ctx = NULL;
4621 :
4622 : /* In parameters */
4623 0 : state->orig.in.handle = _handle;
4624 0 : state->orig.in.access_mask = _access_mask;
4625 :
4626 : /* Out parameters */
4627 :
4628 : /* Result */
4629 0 : NDR_ZERO_STRUCT(state->orig.out.result);
4630 :
4631 : /* make a temporary copy, that we pass to the dispatch function */
4632 0 : state->tmp = state->orig;
4633 :
4634 0 : subreq = dcerpc_lsa_SetSystemAccessAccount_r_send(state, ev, h, &state->tmp);
4635 0 : if (tevent_req_nomem(subreq, req)) {
4636 0 : return tevent_req_post(req, ev);
4637 : }
4638 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetSystemAccessAccount_done, req);
4639 0 : return req;
4640 : }
4641 :
4642 0 : static void dcerpc_lsa_SetSystemAccessAccount_done(struct tevent_req *subreq)
4643 : {
4644 0 : struct tevent_req *req = tevent_req_callback_data(
4645 : subreq, struct tevent_req);
4646 0 : struct dcerpc_lsa_SetSystemAccessAccount_state *state = tevent_req_data(
4647 : req, struct dcerpc_lsa_SetSystemAccessAccount_state);
4648 0 : NTSTATUS status;
4649 0 : TALLOC_CTX *mem_ctx;
4650 :
4651 0 : if (state->out_mem_ctx) {
4652 0 : mem_ctx = state->out_mem_ctx;
4653 : } else {
4654 0 : mem_ctx = state;
4655 : }
4656 :
4657 0 : status = dcerpc_lsa_SetSystemAccessAccount_r_recv(subreq, mem_ctx);
4658 0 : TALLOC_FREE(subreq);
4659 0 : if (tevent_req_nterror(req, status)) {
4660 0 : return;
4661 : }
4662 :
4663 : /* Copy out parameters */
4664 :
4665 : /* Copy result */
4666 0 : state->orig.out.result = state->tmp.out.result;
4667 :
4668 : /* Reset temporary structure */
4669 0 : NDR_ZERO_STRUCT(state->tmp);
4670 :
4671 0 : tevent_req_done(req);
4672 : }
4673 :
4674 0 : NTSTATUS dcerpc_lsa_SetSystemAccessAccount_recv(struct tevent_req *req,
4675 : TALLOC_CTX *mem_ctx,
4676 : NTSTATUS *result)
4677 : {
4678 0 : struct dcerpc_lsa_SetSystemAccessAccount_state *state = tevent_req_data(
4679 : req, struct dcerpc_lsa_SetSystemAccessAccount_state);
4680 0 : NTSTATUS status;
4681 :
4682 0 : if (tevent_req_is_nterror(req, &status)) {
4683 0 : tevent_req_received(req);
4684 0 : return status;
4685 : }
4686 :
4687 : /* Steal possible out parameters to the callers context */
4688 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4689 :
4690 : /* Return result */
4691 0 : *result = state->orig.out.result;
4692 :
4693 0 : tevent_req_received(req);
4694 0 : return NT_STATUS_OK;
4695 : }
4696 :
4697 0 : NTSTATUS dcerpc_lsa_SetSystemAccessAccount(struct dcerpc_binding_handle *h,
4698 : TALLOC_CTX *mem_ctx,
4699 : struct policy_handle *_handle /* [in] [ref] */,
4700 : uint32_t _access_mask /* [in] */,
4701 : NTSTATUS *result)
4702 : {
4703 0 : struct lsa_SetSystemAccessAccount r;
4704 0 : NTSTATUS status;
4705 :
4706 : /* In parameters */
4707 0 : r.in.handle = _handle;
4708 0 : r.in.access_mask = _access_mask;
4709 :
4710 : /* Out parameters */
4711 :
4712 : /* Result */
4713 0 : NDR_ZERO_STRUCT(r.out.result);
4714 :
4715 0 : status = dcerpc_lsa_SetSystemAccessAccount_r(h, mem_ctx, &r);
4716 0 : if (!NT_STATUS_IS_OK(status)) {
4717 0 : return status;
4718 : }
4719 :
4720 : /* Return variables */
4721 :
4722 : /* Return result */
4723 0 : *result = r.out.result;
4724 :
4725 0 : return NT_STATUS_OK;
4726 : }
4727 :
4728 : struct dcerpc_lsa_OpenTrustedDomain_r_state {
4729 : TALLOC_CTX *out_mem_ctx;
4730 : };
4731 :
4732 : static void dcerpc_lsa_OpenTrustedDomain_r_done(struct tevent_req *subreq);
4733 :
4734 0 : struct tevent_req *dcerpc_lsa_OpenTrustedDomain_r_send(TALLOC_CTX *mem_ctx,
4735 : struct tevent_context *ev,
4736 : struct dcerpc_binding_handle *h,
4737 : struct lsa_OpenTrustedDomain *r)
4738 : {
4739 0 : struct tevent_req *req;
4740 0 : struct dcerpc_lsa_OpenTrustedDomain_r_state *state;
4741 0 : struct tevent_req *subreq;
4742 :
4743 0 : req = tevent_req_create(mem_ctx, &state,
4744 : struct dcerpc_lsa_OpenTrustedDomain_r_state);
4745 0 : if (req == NULL) {
4746 0 : return NULL;
4747 : }
4748 :
4749 0 : state->out_mem_ctx = talloc_new(state);
4750 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
4751 0 : return tevent_req_post(req, ev);
4752 : }
4753 :
4754 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
4755 : NULL, &ndr_table_lsarpc,
4756 0 : NDR_LSA_OPENTRUSTEDDOMAIN, state->out_mem_ctx, r);
4757 0 : if (tevent_req_nomem(subreq, req)) {
4758 0 : return tevent_req_post(req, ev);
4759 : }
4760 0 : tevent_req_set_callback(subreq, dcerpc_lsa_OpenTrustedDomain_r_done, req);
4761 :
4762 0 : return req;
4763 : }
4764 :
4765 0 : static void dcerpc_lsa_OpenTrustedDomain_r_done(struct tevent_req *subreq)
4766 : {
4767 0 : struct tevent_req *req =
4768 0 : tevent_req_callback_data(subreq,
4769 : struct tevent_req);
4770 0 : NTSTATUS status;
4771 :
4772 0 : status = dcerpc_binding_handle_call_recv(subreq);
4773 0 : TALLOC_FREE(subreq);
4774 0 : if (tevent_req_nterror(req, status)) {
4775 0 : return;
4776 : }
4777 :
4778 0 : tevent_req_done(req);
4779 : }
4780 :
4781 0 : NTSTATUS dcerpc_lsa_OpenTrustedDomain_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
4782 : {
4783 0 : struct dcerpc_lsa_OpenTrustedDomain_r_state *state =
4784 0 : tevent_req_data(req,
4785 : struct dcerpc_lsa_OpenTrustedDomain_r_state);
4786 0 : NTSTATUS status;
4787 :
4788 0 : if (tevent_req_is_nterror(req, &status)) {
4789 0 : tevent_req_received(req);
4790 0 : return status;
4791 : }
4792 :
4793 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4794 :
4795 0 : tevent_req_received(req);
4796 0 : return NT_STATUS_OK;
4797 : }
4798 :
4799 144 : NTSTATUS dcerpc_lsa_OpenTrustedDomain_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_OpenTrustedDomain *r)
4800 : {
4801 0 : NTSTATUS status;
4802 :
4803 144 : status = dcerpc_binding_handle_call(h,
4804 : NULL, &ndr_table_lsarpc,
4805 : NDR_LSA_OPENTRUSTEDDOMAIN, mem_ctx, r);
4806 :
4807 144 : return status;
4808 : }
4809 :
4810 : struct dcerpc_lsa_OpenTrustedDomain_state {
4811 : struct lsa_OpenTrustedDomain orig;
4812 : struct lsa_OpenTrustedDomain tmp;
4813 : TALLOC_CTX *out_mem_ctx;
4814 : };
4815 :
4816 : static void dcerpc_lsa_OpenTrustedDomain_done(struct tevent_req *subreq);
4817 :
4818 0 : struct tevent_req *dcerpc_lsa_OpenTrustedDomain_send(TALLOC_CTX *mem_ctx,
4819 : struct tevent_context *ev,
4820 : struct dcerpc_binding_handle *h,
4821 : struct policy_handle *_handle /* [in] [ref] */,
4822 : struct dom_sid2 *_sid /* [in] [ref] */,
4823 : uint32_t _access_mask /* [in] */,
4824 : struct policy_handle *_trustdom_handle /* [out] [ref] */)
4825 : {
4826 0 : struct tevent_req *req;
4827 0 : struct dcerpc_lsa_OpenTrustedDomain_state *state;
4828 0 : struct tevent_req *subreq;
4829 :
4830 0 : req = tevent_req_create(mem_ctx, &state,
4831 : struct dcerpc_lsa_OpenTrustedDomain_state);
4832 0 : if (req == NULL) {
4833 0 : return NULL;
4834 : }
4835 0 : state->out_mem_ctx = NULL;
4836 :
4837 : /* In parameters */
4838 0 : state->orig.in.handle = _handle;
4839 0 : state->orig.in.sid = _sid;
4840 0 : state->orig.in.access_mask = _access_mask;
4841 :
4842 : /* Out parameters */
4843 0 : state->orig.out.trustdom_handle = _trustdom_handle;
4844 :
4845 : /* Result */
4846 0 : NDR_ZERO_STRUCT(state->orig.out.result);
4847 :
4848 0 : state->out_mem_ctx = talloc_named_const(state, 0,
4849 : "dcerpc_lsa_OpenTrustedDomain_out_memory");
4850 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
4851 0 : return tevent_req_post(req, ev);
4852 : }
4853 :
4854 : /* make a temporary copy, that we pass to the dispatch function */
4855 0 : state->tmp = state->orig;
4856 :
4857 0 : subreq = dcerpc_lsa_OpenTrustedDomain_r_send(state, ev, h, &state->tmp);
4858 0 : if (tevent_req_nomem(subreq, req)) {
4859 0 : return tevent_req_post(req, ev);
4860 : }
4861 0 : tevent_req_set_callback(subreq, dcerpc_lsa_OpenTrustedDomain_done, req);
4862 0 : return req;
4863 : }
4864 :
4865 0 : static void dcerpc_lsa_OpenTrustedDomain_done(struct tevent_req *subreq)
4866 : {
4867 0 : struct tevent_req *req = tevent_req_callback_data(
4868 : subreq, struct tevent_req);
4869 0 : struct dcerpc_lsa_OpenTrustedDomain_state *state = tevent_req_data(
4870 : req, struct dcerpc_lsa_OpenTrustedDomain_state);
4871 0 : NTSTATUS status;
4872 0 : TALLOC_CTX *mem_ctx;
4873 :
4874 0 : if (state->out_mem_ctx) {
4875 0 : mem_ctx = state->out_mem_ctx;
4876 : } else {
4877 0 : mem_ctx = state;
4878 : }
4879 :
4880 0 : status = dcerpc_lsa_OpenTrustedDomain_r_recv(subreq, mem_ctx);
4881 0 : TALLOC_FREE(subreq);
4882 0 : if (tevent_req_nterror(req, status)) {
4883 0 : return;
4884 : }
4885 :
4886 : /* Copy out parameters */
4887 0 : *state->orig.out.trustdom_handle = *state->tmp.out.trustdom_handle;
4888 :
4889 : /* Copy result */
4890 0 : state->orig.out.result = state->tmp.out.result;
4891 :
4892 : /* Reset temporary structure */
4893 0 : NDR_ZERO_STRUCT(state->tmp);
4894 :
4895 0 : tevent_req_done(req);
4896 : }
4897 :
4898 0 : NTSTATUS dcerpc_lsa_OpenTrustedDomain_recv(struct tevent_req *req,
4899 : TALLOC_CTX *mem_ctx,
4900 : NTSTATUS *result)
4901 : {
4902 0 : struct dcerpc_lsa_OpenTrustedDomain_state *state = tevent_req_data(
4903 : req, struct dcerpc_lsa_OpenTrustedDomain_state);
4904 0 : NTSTATUS status;
4905 :
4906 0 : if (tevent_req_is_nterror(req, &status)) {
4907 0 : tevent_req_received(req);
4908 0 : return status;
4909 : }
4910 :
4911 : /* Steal possible out parameters to the callers context */
4912 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4913 :
4914 : /* Return result */
4915 0 : *result = state->orig.out.result;
4916 :
4917 0 : tevent_req_received(req);
4918 0 : return NT_STATUS_OK;
4919 : }
4920 :
4921 0 : NTSTATUS dcerpc_lsa_OpenTrustedDomain(struct dcerpc_binding_handle *h,
4922 : TALLOC_CTX *mem_ctx,
4923 : struct policy_handle *_handle /* [in] [ref] */,
4924 : struct dom_sid2 *_sid /* [in] [ref] */,
4925 : uint32_t _access_mask /* [in] */,
4926 : struct policy_handle *_trustdom_handle /* [out] [ref] */,
4927 : NTSTATUS *result)
4928 : {
4929 0 : struct lsa_OpenTrustedDomain r;
4930 0 : NTSTATUS status;
4931 :
4932 : /* In parameters */
4933 0 : r.in.handle = _handle;
4934 0 : r.in.sid = _sid;
4935 0 : r.in.access_mask = _access_mask;
4936 :
4937 : /* Out parameters */
4938 0 : r.out.trustdom_handle = _trustdom_handle;
4939 :
4940 : /* Result */
4941 0 : NDR_ZERO_STRUCT(r.out.result);
4942 :
4943 0 : status = dcerpc_lsa_OpenTrustedDomain_r(h, mem_ctx, &r);
4944 0 : if (!NT_STATUS_IS_OK(status)) {
4945 0 : return status;
4946 : }
4947 :
4948 : /* Return variables */
4949 0 : *_trustdom_handle = *r.out.trustdom_handle;
4950 :
4951 : /* Return result */
4952 0 : *result = r.out.result;
4953 :
4954 0 : return NT_STATUS_OK;
4955 : }
4956 :
4957 : struct dcerpc_lsa_QueryTrustedDomainInfo_r_state {
4958 : TALLOC_CTX *out_mem_ctx;
4959 : };
4960 :
4961 : static void dcerpc_lsa_QueryTrustedDomainInfo_r_done(struct tevent_req *subreq);
4962 :
4963 0 : struct tevent_req *dcerpc_lsa_QueryTrustedDomainInfo_r_send(TALLOC_CTX *mem_ctx,
4964 : struct tevent_context *ev,
4965 : struct dcerpc_binding_handle *h,
4966 : struct lsa_QueryTrustedDomainInfo *r)
4967 : {
4968 0 : struct tevent_req *req;
4969 0 : struct dcerpc_lsa_QueryTrustedDomainInfo_r_state *state;
4970 0 : struct tevent_req *subreq;
4971 :
4972 0 : req = tevent_req_create(mem_ctx, &state,
4973 : struct dcerpc_lsa_QueryTrustedDomainInfo_r_state);
4974 0 : if (req == NULL) {
4975 0 : return NULL;
4976 : }
4977 :
4978 0 : state->out_mem_ctx = talloc_new(state);
4979 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
4980 0 : return tevent_req_post(req, ev);
4981 : }
4982 :
4983 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
4984 : NULL, &ndr_table_lsarpc,
4985 0 : NDR_LSA_QUERYTRUSTEDDOMAININFO, state->out_mem_ctx, r);
4986 0 : if (tevent_req_nomem(subreq, req)) {
4987 0 : return tevent_req_post(req, ev);
4988 : }
4989 0 : tevent_req_set_callback(subreq, dcerpc_lsa_QueryTrustedDomainInfo_r_done, req);
4990 :
4991 0 : return req;
4992 : }
4993 :
4994 0 : static void dcerpc_lsa_QueryTrustedDomainInfo_r_done(struct tevent_req *subreq)
4995 : {
4996 0 : struct tevent_req *req =
4997 0 : tevent_req_callback_data(subreq,
4998 : struct tevent_req);
4999 0 : NTSTATUS status;
5000 :
5001 0 : status = dcerpc_binding_handle_call_recv(subreq);
5002 0 : TALLOC_FREE(subreq);
5003 0 : if (tevent_req_nterror(req, status)) {
5004 0 : return;
5005 : }
5006 :
5007 0 : tevent_req_done(req);
5008 : }
5009 :
5010 0 : NTSTATUS dcerpc_lsa_QueryTrustedDomainInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
5011 : {
5012 0 : struct dcerpc_lsa_QueryTrustedDomainInfo_r_state *state =
5013 0 : tevent_req_data(req,
5014 : struct dcerpc_lsa_QueryTrustedDomainInfo_r_state);
5015 0 : NTSTATUS status;
5016 :
5017 0 : if (tevent_req_is_nterror(req, &status)) {
5018 0 : tevent_req_received(req);
5019 0 : return status;
5020 : }
5021 :
5022 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5023 :
5024 0 : tevent_req_received(req);
5025 0 : return NT_STATUS_OK;
5026 : }
5027 :
5028 3891 : NTSTATUS dcerpc_lsa_QueryTrustedDomainInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_QueryTrustedDomainInfo *r)
5029 : {
5030 0 : NTSTATUS status;
5031 :
5032 3891 : status = dcerpc_binding_handle_call(h,
5033 : NULL, &ndr_table_lsarpc,
5034 : NDR_LSA_QUERYTRUSTEDDOMAININFO, mem_ctx, r);
5035 :
5036 3891 : return status;
5037 : }
5038 :
5039 : struct dcerpc_lsa_QueryTrustedDomainInfo_state {
5040 : struct lsa_QueryTrustedDomainInfo orig;
5041 : struct lsa_QueryTrustedDomainInfo tmp;
5042 : TALLOC_CTX *out_mem_ctx;
5043 : };
5044 :
5045 : static void dcerpc_lsa_QueryTrustedDomainInfo_done(struct tevent_req *subreq);
5046 :
5047 0 : struct tevent_req *dcerpc_lsa_QueryTrustedDomainInfo_send(TALLOC_CTX *mem_ctx,
5048 : struct tevent_context *ev,
5049 : struct dcerpc_binding_handle *h,
5050 : struct policy_handle *_trustdom_handle /* [in] [ref] */,
5051 : enum lsa_TrustDomInfoEnum _level /* [in] */,
5052 : union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */)
5053 : {
5054 0 : struct tevent_req *req;
5055 0 : struct dcerpc_lsa_QueryTrustedDomainInfo_state *state;
5056 0 : struct tevent_req *subreq;
5057 :
5058 0 : req = tevent_req_create(mem_ctx, &state,
5059 : struct dcerpc_lsa_QueryTrustedDomainInfo_state);
5060 0 : if (req == NULL) {
5061 0 : return NULL;
5062 : }
5063 0 : state->out_mem_ctx = NULL;
5064 :
5065 : /* In parameters */
5066 0 : state->orig.in.trustdom_handle = _trustdom_handle;
5067 0 : state->orig.in.level = _level;
5068 :
5069 : /* Out parameters */
5070 0 : state->orig.out.info = _info;
5071 :
5072 : /* Result */
5073 0 : NDR_ZERO_STRUCT(state->orig.out.result);
5074 :
5075 0 : state->out_mem_ctx = talloc_named_const(state, 0,
5076 : "dcerpc_lsa_QueryTrustedDomainInfo_out_memory");
5077 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
5078 0 : return tevent_req_post(req, ev);
5079 : }
5080 :
5081 : /* make a temporary copy, that we pass to the dispatch function */
5082 0 : state->tmp = state->orig;
5083 :
5084 0 : subreq = dcerpc_lsa_QueryTrustedDomainInfo_r_send(state, ev, h, &state->tmp);
5085 0 : if (tevent_req_nomem(subreq, req)) {
5086 0 : return tevent_req_post(req, ev);
5087 : }
5088 0 : tevent_req_set_callback(subreq, dcerpc_lsa_QueryTrustedDomainInfo_done, req);
5089 0 : return req;
5090 : }
5091 :
5092 0 : static void dcerpc_lsa_QueryTrustedDomainInfo_done(struct tevent_req *subreq)
5093 : {
5094 0 : struct tevent_req *req = tevent_req_callback_data(
5095 : subreq, struct tevent_req);
5096 0 : struct dcerpc_lsa_QueryTrustedDomainInfo_state *state = tevent_req_data(
5097 : req, struct dcerpc_lsa_QueryTrustedDomainInfo_state);
5098 0 : NTSTATUS status;
5099 0 : TALLOC_CTX *mem_ctx;
5100 :
5101 0 : if (state->out_mem_ctx) {
5102 0 : mem_ctx = state->out_mem_ctx;
5103 : } else {
5104 0 : mem_ctx = state;
5105 : }
5106 :
5107 0 : status = dcerpc_lsa_QueryTrustedDomainInfo_r_recv(subreq, mem_ctx);
5108 0 : TALLOC_FREE(subreq);
5109 0 : if (tevent_req_nterror(req, status)) {
5110 0 : return;
5111 : }
5112 :
5113 : /* Copy out parameters */
5114 0 : *state->orig.out.info = *state->tmp.out.info;
5115 :
5116 : /* Copy result */
5117 0 : state->orig.out.result = state->tmp.out.result;
5118 :
5119 : /* Reset temporary structure */
5120 0 : NDR_ZERO_STRUCT(state->tmp);
5121 :
5122 0 : tevent_req_done(req);
5123 : }
5124 :
5125 0 : NTSTATUS dcerpc_lsa_QueryTrustedDomainInfo_recv(struct tevent_req *req,
5126 : TALLOC_CTX *mem_ctx,
5127 : NTSTATUS *result)
5128 : {
5129 0 : struct dcerpc_lsa_QueryTrustedDomainInfo_state *state = tevent_req_data(
5130 : req, struct dcerpc_lsa_QueryTrustedDomainInfo_state);
5131 0 : NTSTATUS status;
5132 :
5133 0 : if (tevent_req_is_nterror(req, &status)) {
5134 0 : tevent_req_received(req);
5135 0 : return status;
5136 : }
5137 :
5138 : /* Steal possible out parameters to the callers context */
5139 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5140 :
5141 : /* Return result */
5142 0 : *result = state->orig.out.result;
5143 :
5144 0 : tevent_req_received(req);
5145 0 : return NT_STATUS_OK;
5146 : }
5147 :
5148 0 : NTSTATUS dcerpc_lsa_QueryTrustedDomainInfo(struct dcerpc_binding_handle *h,
5149 : TALLOC_CTX *mem_ctx,
5150 : struct policy_handle *_trustdom_handle /* [in] [ref] */,
5151 : enum lsa_TrustDomInfoEnum _level /* [in] */,
5152 : union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */,
5153 : NTSTATUS *result)
5154 : {
5155 0 : struct lsa_QueryTrustedDomainInfo r;
5156 0 : NTSTATUS status;
5157 :
5158 : /* In parameters */
5159 0 : r.in.trustdom_handle = _trustdom_handle;
5160 0 : r.in.level = _level;
5161 :
5162 : /* Out parameters */
5163 0 : r.out.info = _info;
5164 :
5165 : /* Result */
5166 0 : NDR_ZERO_STRUCT(r.out.result);
5167 :
5168 0 : status = dcerpc_lsa_QueryTrustedDomainInfo_r(h, mem_ctx, &r);
5169 0 : if (!NT_STATUS_IS_OK(status)) {
5170 0 : return status;
5171 : }
5172 :
5173 : /* Return variables */
5174 0 : *_info = *r.out.info;
5175 :
5176 : /* Return result */
5177 0 : *result = r.out.result;
5178 :
5179 0 : return NT_STATUS_OK;
5180 : }
5181 :
5182 : struct dcerpc_lsa_SetInformationTrustedDomain_r_state {
5183 : TALLOC_CTX *out_mem_ctx;
5184 : };
5185 :
5186 : static void dcerpc_lsa_SetInformationTrustedDomain_r_done(struct tevent_req *subreq);
5187 :
5188 0 : struct tevent_req *dcerpc_lsa_SetInformationTrustedDomain_r_send(TALLOC_CTX *mem_ctx,
5189 : struct tevent_context *ev,
5190 : struct dcerpc_binding_handle *h,
5191 : struct lsa_SetInformationTrustedDomain *r)
5192 : {
5193 0 : struct tevent_req *req;
5194 0 : struct dcerpc_lsa_SetInformationTrustedDomain_r_state *state;
5195 0 : struct tevent_req *subreq;
5196 :
5197 0 : req = tevent_req_create(mem_ctx, &state,
5198 : struct dcerpc_lsa_SetInformationTrustedDomain_r_state);
5199 0 : if (req == NULL) {
5200 0 : return NULL;
5201 : }
5202 :
5203 0 : state->out_mem_ctx = NULL;
5204 :
5205 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
5206 : NULL, &ndr_table_lsarpc,
5207 : NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN, state, r);
5208 0 : if (tevent_req_nomem(subreq, req)) {
5209 0 : return tevent_req_post(req, ev);
5210 : }
5211 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetInformationTrustedDomain_r_done, req);
5212 :
5213 0 : return req;
5214 : }
5215 :
5216 0 : static void dcerpc_lsa_SetInformationTrustedDomain_r_done(struct tevent_req *subreq)
5217 : {
5218 0 : struct tevent_req *req =
5219 0 : tevent_req_callback_data(subreq,
5220 : struct tevent_req);
5221 0 : NTSTATUS status;
5222 :
5223 0 : status = dcerpc_binding_handle_call_recv(subreq);
5224 0 : TALLOC_FREE(subreq);
5225 0 : if (tevent_req_nterror(req, status)) {
5226 0 : return;
5227 : }
5228 :
5229 0 : tevent_req_done(req);
5230 : }
5231 :
5232 0 : NTSTATUS dcerpc_lsa_SetInformationTrustedDomain_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
5233 : {
5234 0 : struct dcerpc_lsa_SetInformationTrustedDomain_r_state *state =
5235 0 : tevent_req_data(req,
5236 : struct dcerpc_lsa_SetInformationTrustedDomain_r_state);
5237 0 : NTSTATUS status;
5238 :
5239 0 : if (tevent_req_is_nterror(req, &status)) {
5240 0 : tevent_req_received(req);
5241 0 : return status;
5242 : }
5243 :
5244 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5245 :
5246 0 : tevent_req_received(req);
5247 0 : return NT_STATUS_OK;
5248 : }
5249 :
5250 22 : NTSTATUS dcerpc_lsa_SetInformationTrustedDomain_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_SetInformationTrustedDomain *r)
5251 : {
5252 0 : NTSTATUS status;
5253 :
5254 22 : status = dcerpc_binding_handle_call(h,
5255 : NULL, &ndr_table_lsarpc,
5256 : NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN, mem_ctx, r);
5257 :
5258 22 : return status;
5259 : }
5260 :
5261 : struct dcerpc_lsa_SetInformationTrustedDomain_state {
5262 : struct lsa_SetInformationTrustedDomain orig;
5263 : struct lsa_SetInformationTrustedDomain tmp;
5264 : TALLOC_CTX *out_mem_ctx;
5265 : };
5266 :
5267 : static void dcerpc_lsa_SetInformationTrustedDomain_done(struct tevent_req *subreq);
5268 :
5269 0 : struct tevent_req *dcerpc_lsa_SetInformationTrustedDomain_send(TALLOC_CTX *mem_ctx,
5270 : struct tevent_context *ev,
5271 : struct dcerpc_binding_handle *h,
5272 : struct policy_handle *_trustdom_handle /* [in] [ref] */,
5273 : enum lsa_TrustDomInfoEnum _level /* [in] */,
5274 : union lsa_TrustedDomainInfo *_info /* [in] [ref,switch_is(level)] */)
5275 : {
5276 0 : struct tevent_req *req;
5277 0 : struct dcerpc_lsa_SetInformationTrustedDomain_state *state;
5278 0 : struct tevent_req *subreq;
5279 :
5280 0 : req = tevent_req_create(mem_ctx, &state,
5281 : struct dcerpc_lsa_SetInformationTrustedDomain_state);
5282 0 : if (req == NULL) {
5283 0 : return NULL;
5284 : }
5285 0 : state->out_mem_ctx = NULL;
5286 :
5287 : /* In parameters */
5288 0 : state->orig.in.trustdom_handle = _trustdom_handle;
5289 0 : state->orig.in.level = _level;
5290 0 : state->orig.in.info = _info;
5291 :
5292 : /* Out parameters */
5293 :
5294 : /* Result */
5295 0 : NDR_ZERO_STRUCT(state->orig.out.result);
5296 :
5297 : /* make a temporary copy, that we pass to the dispatch function */
5298 0 : state->tmp = state->orig;
5299 :
5300 0 : subreq = dcerpc_lsa_SetInformationTrustedDomain_r_send(state, ev, h, &state->tmp);
5301 0 : if (tevent_req_nomem(subreq, req)) {
5302 0 : return tevent_req_post(req, ev);
5303 : }
5304 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetInformationTrustedDomain_done, req);
5305 0 : return req;
5306 : }
5307 :
5308 0 : static void dcerpc_lsa_SetInformationTrustedDomain_done(struct tevent_req *subreq)
5309 : {
5310 0 : struct tevent_req *req = tevent_req_callback_data(
5311 : subreq, struct tevent_req);
5312 0 : struct dcerpc_lsa_SetInformationTrustedDomain_state *state = tevent_req_data(
5313 : req, struct dcerpc_lsa_SetInformationTrustedDomain_state);
5314 0 : NTSTATUS status;
5315 0 : TALLOC_CTX *mem_ctx;
5316 :
5317 0 : if (state->out_mem_ctx) {
5318 0 : mem_ctx = state->out_mem_ctx;
5319 : } else {
5320 0 : mem_ctx = state;
5321 : }
5322 :
5323 0 : status = dcerpc_lsa_SetInformationTrustedDomain_r_recv(subreq, mem_ctx);
5324 0 : TALLOC_FREE(subreq);
5325 0 : if (tevent_req_nterror(req, status)) {
5326 0 : return;
5327 : }
5328 :
5329 : /* Copy out parameters */
5330 :
5331 : /* Copy result */
5332 0 : state->orig.out.result = state->tmp.out.result;
5333 :
5334 : /* Reset temporary structure */
5335 0 : NDR_ZERO_STRUCT(state->tmp);
5336 :
5337 0 : tevent_req_done(req);
5338 : }
5339 :
5340 0 : NTSTATUS dcerpc_lsa_SetInformationTrustedDomain_recv(struct tevent_req *req,
5341 : TALLOC_CTX *mem_ctx,
5342 : NTSTATUS *result)
5343 : {
5344 0 : struct dcerpc_lsa_SetInformationTrustedDomain_state *state = tevent_req_data(
5345 : req, struct dcerpc_lsa_SetInformationTrustedDomain_state);
5346 0 : NTSTATUS status;
5347 :
5348 0 : if (tevent_req_is_nterror(req, &status)) {
5349 0 : tevent_req_received(req);
5350 0 : return status;
5351 : }
5352 :
5353 : /* Steal possible out parameters to the callers context */
5354 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5355 :
5356 : /* Return result */
5357 0 : *result = state->orig.out.result;
5358 :
5359 0 : tevent_req_received(req);
5360 0 : return NT_STATUS_OK;
5361 : }
5362 :
5363 0 : NTSTATUS dcerpc_lsa_SetInformationTrustedDomain(struct dcerpc_binding_handle *h,
5364 : TALLOC_CTX *mem_ctx,
5365 : struct policy_handle *_trustdom_handle /* [in] [ref] */,
5366 : enum lsa_TrustDomInfoEnum _level /* [in] */,
5367 : union lsa_TrustedDomainInfo *_info /* [in] [ref,switch_is(level)] */,
5368 : NTSTATUS *result)
5369 : {
5370 0 : struct lsa_SetInformationTrustedDomain r;
5371 0 : NTSTATUS status;
5372 :
5373 : /* In parameters */
5374 0 : r.in.trustdom_handle = _trustdom_handle;
5375 0 : r.in.level = _level;
5376 0 : r.in.info = _info;
5377 :
5378 : /* Out parameters */
5379 :
5380 : /* Result */
5381 0 : NDR_ZERO_STRUCT(r.out.result);
5382 :
5383 0 : status = dcerpc_lsa_SetInformationTrustedDomain_r(h, mem_ctx, &r);
5384 0 : if (!NT_STATUS_IS_OK(status)) {
5385 0 : return status;
5386 : }
5387 :
5388 : /* Return variables */
5389 :
5390 : /* Return result */
5391 0 : *result = r.out.result;
5392 :
5393 0 : return NT_STATUS_OK;
5394 : }
5395 :
5396 : struct dcerpc_lsa_OpenSecret_r_state {
5397 : TALLOC_CTX *out_mem_ctx;
5398 : };
5399 :
5400 : static void dcerpc_lsa_OpenSecret_r_done(struct tevent_req *subreq);
5401 :
5402 0 : struct tevent_req *dcerpc_lsa_OpenSecret_r_send(TALLOC_CTX *mem_ctx,
5403 : struct tevent_context *ev,
5404 : struct dcerpc_binding_handle *h,
5405 : struct lsa_OpenSecret *r)
5406 : {
5407 0 : struct tevent_req *req;
5408 0 : struct dcerpc_lsa_OpenSecret_r_state *state;
5409 0 : struct tevent_req *subreq;
5410 :
5411 0 : req = tevent_req_create(mem_ctx, &state,
5412 : struct dcerpc_lsa_OpenSecret_r_state);
5413 0 : if (req == NULL) {
5414 0 : return NULL;
5415 : }
5416 :
5417 0 : state->out_mem_ctx = talloc_new(state);
5418 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
5419 0 : return tevent_req_post(req, ev);
5420 : }
5421 :
5422 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
5423 : NULL, &ndr_table_lsarpc,
5424 0 : NDR_LSA_OPENSECRET, state->out_mem_ctx, r);
5425 0 : if (tevent_req_nomem(subreq, req)) {
5426 0 : return tevent_req_post(req, ev);
5427 : }
5428 0 : tevent_req_set_callback(subreq, dcerpc_lsa_OpenSecret_r_done, req);
5429 :
5430 0 : return req;
5431 : }
5432 :
5433 0 : static void dcerpc_lsa_OpenSecret_r_done(struct tevent_req *subreq)
5434 : {
5435 0 : struct tevent_req *req =
5436 0 : tevent_req_callback_data(subreq,
5437 : struct tevent_req);
5438 0 : NTSTATUS status;
5439 :
5440 0 : status = dcerpc_binding_handle_call_recv(subreq);
5441 0 : TALLOC_FREE(subreq);
5442 0 : if (tevent_req_nterror(req, status)) {
5443 0 : return;
5444 : }
5445 :
5446 0 : tevent_req_done(req);
5447 : }
5448 :
5449 0 : NTSTATUS dcerpc_lsa_OpenSecret_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
5450 : {
5451 0 : struct dcerpc_lsa_OpenSecret_r_state *state =
5452 0 : tevent_req_data(req,
5453 : struct dcerpc_lsa_OpenSecret_r_state);
5454 0 : NTSTATUS status;
5455 :
5456 0 : if (tevent_req_is_nterror(req, &status)) {
5457 0 : tevent_req_received(req);
5458 0 : return status;
5459 : }
5460 :
5461 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5462 :
5463 0 : tevent_req_received(req);
5464 0 : return NT_STATUS_OK;
5465 : }
5466 :
5467 54 : NTSTATUS dcerpc_lsa_OpenSecret_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_OpenSecret *r)
5468 : {
5469 0 : NTSTATUS status;
5470 :
5471 54 : status = dcerpc_binding_handle_call(h,
5472 : NULL, &ndr_table_lsarpc,
5473 : NDR_LSA_OPENSECRET, mem_ctx, r);
5474 :
5475 54 : return status;
5476 : }
5477 :
5478 : struct dcerpc_lsa_OpenSecret_state {
5479 : struct lsa_OpenSecret orig;
5480 : struct lsa_OpenSecret tmp;
5481 : TALLOC_CTX *out_mem_ctx;
5482 : };
5483 :
5484 : static void dcerpc_lsa_OpenSecret_done(struct tevent_req *subreq);
5485 :
5486 0 : struct tevent_req *dcerpc_lsa_OpenSecret_send(TALLOC_CTX *mem_ctx,
5487 : struct tevent_context *ev,
5488 : struct dcerpc_binding_handle *h,
5489 : struct policy_handle *_handle /* [in] [ref] */,
5490 : struct lsa_String _name /* [in] */,
5491 : uint32_t _access_mask /* [in] */,
5492 : struct policy_handle *_sec_handle /* [out] [ref] */)
5493 : {
5494 0 : struct tevent_req *req;
5495 0 : struct dcerpc_lsa_OpenSecret_state *state;
5496 0 : struct tevent_req *subreq;
5497 :
5498 0 : req = tevent_req_create(mem_ctx, &state,
5499 : struct dcerpc_lsa_OpenSecret_state);
5500 0 : if (req == NULL) {
5501 0 : return NULL;
5502 : }
5503 0 : state->out_mem_ctx = NULL;
5504 :
5505 : /* In parameters */
5506 0 : state->orig.in.handle = _handle;
5507 0 : state->orig.in.name = _name;
5508 0 : state->orig.in.access_mask = _access_mask;
5509 :
5510 : /* Out parameters */
5511 0 : state->orig.out.sec_handle = _sec_handle;
5512 :
5513 : /* Result */
5514 0 : NDR_ZERO_STRUCT(state->orig.out.result);
5515 :
5516 0 : state->out_mem_ctx = talloc_named_const(state, 0,
5517 : "dcerpc_lsa_OpenSecret_out_memory");
5518 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
5519 0 : return tevent_req_post(req, ev);
5520 : }
5521 :
5522 : /* make a temporary copy, that we pass to the dispatch function */
5523 0 : state->tmp = state->orig;
5524 :
5525 0 : subreq = dcerpc_lsa_OpenSecret_r_send(state, ev, h, &state->tmp);
5526 0 : if (tevent_req_nomem(subreq, req)) {
5527 0 : return tevent_req_post(req, ev);
5528 : }
5529 0 : tevent_req_set_callback(subreq, dcerpc_lsa_OpenSecret_done, req);
5530 0 : return req;
5531 : }
5532 :
5533 0 : static void dcerpc_lsa_OpenSecret_done(struct tevent_req *subreq)
5534 : {
5535 0 : struct tevent_req *req = tevent_req_callback_data(
5536 : subreq, struct tevent_req);
5537 0 : struct dcerpc_lsa_OpenSecret_state *state = tevent_req_data(
5538 : req, struct dcerpc_lsa_OpenSecret_state);
5539 0 : NTSTATUS status;
5540 0 : TALLOC_CTX *mem_ctx;
5541 :
5542 0 : if (state->out_mem_ctx) {
5543 0 : mem_ctx = state->out_mem_ctx;
5544 : } else {
5545 0 : mem_ctx = state;
5546 : }
5547 :
5548 0 : status = dcerpc_lsa_OpenSecret_r_recv(subreq, mem_ctx);
5549 0 : TALLOC_FREE(subreq);
5550 0 : if (tevent_req_nterror(req, status)) {
5551 0 : return;
5552 : }
5553 :
5554 : /* Copy out parameters */
5555 0 : *state->orig.out.sec_handle = *state->tmp.out.sec_handle;
5556 :
5557 : /* Copy result */
5558 0 : state->orig.out.result = state->tmp.out.result;
5559 :
5560 : /* Reset temporary structure */
5561 0 : NDR_ZERO_STRUCT(state->tmp);
5562 :
5563 0 : tevent_req_done(req);
5564 : }
5565 :
5566 0 : NTSTATUS dcerpc_lsa_OpenSecret_recv(struct tevent_req *req,
5567 : TALLOC_CTX *mem_ctx,
5568 : NTSTATUS *result)
5569 : {
5570 0 : struct dcerpc_lsa_OpenSecret_state *state = tevent_req_data(
5571 : req, struct dcerpc_lsa_OpenSecret_state);
5572 0 : NTSTATUS status;
5573 :
5574 0 : if (tevent_req_is_nterror(req, &status)) {
5575 0 : tevent_req_received(req);
5576 0 : return status;
5577 : }
5578 :
5579 : /* Steal possible out parameters to the callers context */
5580 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5581 :
5582 : /* Return result */
5583 0 : *result = state->orig.out.result;
5584 :
5585 0 : tevent_req_received(req);
5586 0 : return NT_STATUS_OK;
5587 : }
5588 :
5589 0 : NTSTATUS dcerpc_lsa_OpenSecret(struct dcerpc_binding_handle *h,
5590 : TALLOC_CTX *mem_ctx,
5591 : struct policy_handle *_handle /* [in] [ref] */,
5592 : struct lsa_String _name /* [in] */,
5593 : uint32_t _access_mask /* [in] */,
5594 : struct policy_handle *_sec_handle /* [out] [ref] */,
5595 : NTSTATUS *result)
5596 : {
5597 0 : struct lsa_OpenSecret r;
5598 0 : NTSTATUS status;
5599 :
5600 : /* In parameters */
5601 0 : r.in.handle = _handle;
5602 0 : r.in.name = _name;
5603 0 : r.in.access_mask = _access_mask;
5604 :
5605 : /* Out parameters */
5606 0 : r.out.sec_handle = _sec_handle;
5607 :
5608 : /* Result */
5609 0 : NDR_ZERO_STRUCT(r.out.result);
5610 :
5611 0 : status = dcerpc_lsa_OpenSecret_r(h, mem_ctx, &r);
5612 0 : if (!NT_STATUS_IS_OK(status)) {
5613 0 : return status;
5614 : }
5615 :
5616 : /* Return variables */
5617 0 : *_sec_handle = *r.out.sec_handle;
5618 :
5619 : /* Return result */
5620 0 : *result = r.out.result;
5621 :
5622 0 : return NT_STATUS_OK;
5623 : }
5624 :
5625 : struct dcerpc_lsa_SetSecret_r_state {
5626 : TALLOC_CTX *out_mem_ctx;
5627 : };
5628 :
5629 : static void dcerpc_lsa_SetSecret_r_done(struct tevent_req *subreq);
5630 :
5631 0 : struct tevent_req *dcerpc_lsa_SetSecret_r_send(TALLOC_CTX *mem_ctx,
5632 : struct tevent_context *ev,
5633 : struct dcerpc_binding_handle *h,
5634 : struct lsa_SetSecret *r)
5635 : {
5636 0 : struct tevent_req *req;
5637 0 : struct dcerpc_lsa_SetSecret_r_state *state;
5638 0 : struct tevent_req *subreq;
5639 :
5640 0 : req = tevent_req_create(mem_ctx, &state,
5641 : struct dcerpc_lsa_SetSecret_r_state);
5642 0 : if (req == NULL) {
5643 0 : return NULL;
5644 : }
5645 :
5646 0 : state->out_mem_ctx = NULL;
5647 :
5648 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
5649 : NULL, &ndr_table_lsarpc,
5650 : NDR_LSA_SETSECRET, state, r);
5651 0 : if (tevent_req_nomem(subreq, req)) {
5652 0 : return tevent_req_post(req, ev);
5653 : }
5654 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetSecret_r_done, req);
5655 :
5656 0 : return req;
5657 : }
5658 :
5659 0 : static void dcerpc_lsa_SetSecret_r_done(struct tevent_req *subreq)
5660 : {
5661 0 : struct tevent_req *req =
5662 0 : tevent_req_callback_data(subreq,
5663 : struct tevent_req);
5664 0 : NTSTATUS status;
5665 :
5666 0 : status = dcerpc_binding_handle_call_recv(subreq);
5667 0 : TALLOC_FREE(subreq);
5668 0 : if (tevent_req_nterror(req, status)) {
5669 0 : return;
5670 : }
5671 :
5672 0 : tevent_req_done(req);
5673 : }
5674 :
5675 0 : NTSTATUS dcerpc_lsa_SetSecret_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
5676 : {
5677 0 : struct dcerpc_lsa_SetSecret_r_state *state =
5678 0 : tevent_req_data(req,
5679 : struct dcerpc_lsa_SetSecret_r_state);
5680 0 : NTSTATUS status;
5681 :
5682 0 : if (tevent_req_is_nterror(req, &status)) {
5683 0 : tevent_req_received(req);
5684 0 : return status;
5685 : }
5686 :
5687 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5688 :
5689 0 : tevent_req_received(req);
5690 0 : return NT_STATUS_OK;
5691 : }
5692 :
5693 3224 : NTSTATUS dcerpc_lsa_SetSecret_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_SetSecret *r)
5694 : {
5695 0 : NTSTATUS status;
5696 :
5697 3224 : status = dcerpc_binding_handle_call(h,
5698 : NULL, &ndr_table_lsarpc,
5699 : NDR_LSA_SETSECRET, mem_ctx, r);
5700 :
5701 3224 : return status;
5702 : }
5703 :
5704 : struct dcerpc_lsa_SetSecret_state {
5705 : struct lsa_SetSecret orig;
5706 : struct lsa_SetSecret tmp;
5707 : TALLOC_CTX *out_mem_ctx;
5708 : };
5709 :
5710 : static void dcerpc_lsa_SetSecret_done(struct tevent_req *subreq);
5711 :
5712 0 : struct tevent_req *dcerpc_lsa_SetSecret_send(TALLOC_CTX *mem_ctx,
5713 : struct tevent_context *ev,
5714 : struct dcerpc_binding_handle *h,
5715 : struct policy_handle *_sec_handle /* [in] [ref] */,
5716 : struct lsa_DATA_BUF *_new_val /* [in] [unique] */,
5717 : struct lsa_DATA_BUF *_old_val /* [in] [unique] */)
5718 : {
5719 0 : struct tevent_req *req;
5720 0 : struct dcerpc_lsa_SetSecret_state *state;
5721 0 : struct tevent_req *subreq;
5722 :
5723 0 : req = tevent_req_create(mem_ctx, &state,
5724 : struct dcerpc_lsa_SetSecret_state);
5725 0 : if (req == NULL) {
5726 0 : return NULL;
5727 : }
5728 0 : state->out_mem_ctx = NULL;
5729 :
5730 : /* In parameters */
5731 0 : state->orig.in.sec_handle = _sec_handle;
5732 0 : state->orig.in.new_val = _new_val;
5733 0 : state->orig.in.old_val = _old_val;
5734 :
5735 : /* Out parameters */
5736 :
5737 : /* Result */
5738 0 : NDR_ZERO_STRUCT(state->orig.out.result);
5739 :
5740 : /* make a temporary copy, that we pass to the dispatch function */
5741 0 : state->tmp = state->orig;
5742 :
5743 0 : subreq = dcerpc_lsa_SetSecret_r_send(state, ev, h, &state->tmp);
5744 0 : if (tevent_req_nomem(subreq, req)) {
5745 0 : return tevent_req_post(req, ev);
5746 : }
5747 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetSecret_done, req);
5748 0 : return req;
5749 : }
5750 :
5751 0 : static void dcerpc_lsa_SetSecret_done(struct tevent_req *subreq)
5752 : {
5753 0 : struct tevent_req *req = tevent_req_callback_data(
5754 : subreq, struct tevent_req);
5755 0 : struct dcerpc_lsa_SetSecret_state *state = tevent_req_data(
5756 : req, struct dcerpc_lsa_SetSecret_state);
5757 0 : NTSTATUS status;
5758 0 : TALLOC_CTX *mem_ctx;
5759 :
5760 0 : if (state->out_mem_ctx) {
5761 0 : mem_ctx = state->out_mem_ctx;
5762 : } else {
5763 0 : mem_ctx = state;
5764 : }
5765 :
5766 0 : status = dcerpc_lsa_SetSecret_r_recv(subreq, mem_ctx);
5767 0 : TALLOC_FREE(subreq);
5768 0 : if (tevent_req_nterror(req, status)) {
5769 0 : return;
5770 : }
5771 :
5772 : /* Copy out parameters */
5773 :
5774 : /* Copy result */
5775 0 : state->orig.out.result = state->tmp.out.result;
5776 :
5777 : /* Reset temporary structure */
5778 0 : NDR_ZERO_STRUCT(state->tmp);
5779 :
5780 0 : tevent_req_done(req);
5781 : }
5782 :
5783 0 : NTSTATUS dcerpc_lsa_SetSecret_recv(struct tevent_req *req,
5784 : TALLOC_CTX *mem_ctx,
5785 : NTSTATUS *result)
5786 : {
5787 0 : struct dcerpc_lsa_SetSecret_state *state = tevent_req_data(
5788 : req, struct dcerpc_lsa_SetSecret_state);
5789 0 : NTSTATUS status;
5790 :
5791 0 : if (tevent_req_is_nterror(req, &status)) {
5792 0 : tevent_req_received(req);
5793 0 : return status;
5794 : }
5795 :
5796 : /* Steal possible out parameters to the callers context */
5797 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5798 :
5799 : /* Return result */
5800 0 : *result = state->orig.out.result;
5801 :
5802 0 : tevent_req_received(req);
5803 0 : return NT_STATUS_OK;
5804 : }
5805 :
5806 0 : NTSTATUS dcerpc_lsa_SetSecret(struct dcerpc_binding_handle *h,
5807 : TALLOC_CTX *mem_ctx,
5808 : struct policy_handle *_sec_handle /* [in] [ref] */,
5809 : struct lsa_DATA_BUF *_new_val /* [in] [unique] */,
5810 : struct lsa_DATA_BUF *_old_val /* [in] [unique] */,
5811 : NTSTATUS *result)
5812 : {
5813 0 : struct lsa_SetSecret r;
5814 0 : NTSTATUS status;
5815 :
5816 : /* In parameters */
5817 0 : r.in.sec_handle = _sec_handle;
5818 0 : r.in.new_val = _new_val;
5819 0 : r.in.old_val = _old_val;
5820 :
5821 : /* Out parameters */
5822 :
5823 : /* Result */
5824 0 : NDR_ZERO_STRUCT(r.out.result);
5825 :
5826 0 : status = dcerpc_lsa_SetSecret_r(h, mem_ctx, &r);
5827 0 : if (!NT_STATUS_IS_OK(status)) {
5828 0 : return status;
5829 : }
5830 :
5831 : /* Return variables */
5832 :
5833 : /* Return result */
5834 0 : *result = r.out.result;
5835 :
5836 0 : return NT_STATUS_OK;
5837 : }
5838 :
5839 : struct dcerpc_lsa_QuerySecret_r_state {
5840 : TALLOC_CTX *out_mem_ctx;
5841 : };
5842 :
5843 : static void dcerpc_lsa_QuerySecret_r_done(struct tevent_req *subreq);
5844 :
5845 0 : struct tevent_req *dcerpc_lsa_QuerySecret_r_send(TALLOC_CTX *mem_ctx,
5846 : struct tevent_context *ev,
5847 : struct dcerpc_binding_handle *h,
5848 : struct lsa_QuerySecret *r)
5849 : {
5850 0 : struct tevent_req *req;
5851 0 : struct dcerpc_lsa_QuerySecret_r_state *state;
5852 0 : struct tevent_req *subreq;
5853 :
5854 0 : req = tevent_req_create(mem_ctx, &state,
5855 : struct dcerpc_lsa_QuerySecret_r_state);
5856 0 : if (req == NULL) {
5857 0 : return NULL;
5858 : }
5859 :
5860 0 : state->out_mem_ctx = talloc_new(state);
5861 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
5862 0 : return tevent_req_post(req, ev);
5863 : }
5864 :
5865 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
5866 : NULL, &ndr_table_lsarpc,
5867 0 : NDR_LSA_QUERYSECRET, state->out_mem_ctx, r);
5868 0 : if (tevent_req_nomem(subreq, req)) {
5869 0 : return tevent_req_post(req, ev);
5870 : }
5871 0 : tevent_req_set_callback(subreq, dcerpc_lsa_QuerySecret_r_done, req);
5872 :
5873 0 : return req;
5874 : }
5875 :
5876 0 : static void dcerpc_lsa_QuerySecret_r_done(struct tevent_req *subreq)
5877 : {
5878 0 : struct tevent_req *req =
5879 0 : tevent_req_callback_data(subreq,
5880 : struct tevent_req);
5881 0 : NTSTATUS status;
5882 :
5883 0 : status = dcerpc_binding_handle_call_recv(subreq);
5884 0 : TALLOC_FREE(subreq);
5885 0 : if (tevent_req_nterror(req, status)) {
5886 0 : return;
5887 : }
5888 :
5889 0 : tevent_req_done(req);
5890 : }
5891 :
5892 0 : NTSTATUS dcerpc_lsa_QuerySecret_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
5893 : {
5894 0 : struct dcerpc_lsa_QuerySecret_r_state *state =
5895 0 : tevent_req_data(req,
5896 : struct dcerpc_lsa_QuerySecret_r_state);
5897 0 : NTSTATUS status;
5898 :
5899 0 : if (tevent_req_is_nterror(req, &status)) {
5900 0 : tevent_req_received(req);
5901 0 : return status;
5902 : }
5903 :
5904 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5905 :
5906 0 : tevent_req_received(req);
5907 0 : return NT_STATUS_OK;
5908 : }
5909 :
5910 1640 : NTSTATUS dcerpc_lsa_QuerySecret_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_QuerySecret *r)
5911 : {
5912 0 : NTSTATUS status;
5913 :
5914 1640 : status = dcerpc_binding_handle_call(h,
5915 : NULL, &ndr_table_lsarpc,
5916 : NDR_LSA_QUERYSECRET, mem_ctx, r);
5917 :
5918 1640 : return status;
5919 : }
5920 :
5921 : struct dcerpc_lsa_QuerySecret_state {
5922 : struct lsa_QuerySecret orig;
5923 : struct lsa_QuerySecret tmp;
5924 : TALLOC_CTX *out_mem_ctx;
5925 : };
5926 :
5927 : static void dcerpc_lsa_QuerySecret_done(struct tevent_req *subreq);
5928 :
5929 0 : struct tevent_req *dcerpc_lsa_QuerySecret_send(TALLOC_CTX *mem_ctx,
5930 : struct tevent_context *ev,
5931 : struct dcerpc_binding_handle *h,
5932 : struct policy_handle *_sec_handle /* [in] [ref] */,
5933 : struct lsa_DATA_BUF_PTR *_new_val /* [in,out] [unique] */,
5934 : NTTIME *_new_mtime /* [in,out] [unique] */,
5935 : struct lsa_DATA_BUF_PTR *_old_val /* [in,out] [unique] */,
5936 : NTTIME *_old_mtime /* [in,out] [unique] */)
5937 : {
5938 0 : struct tevent_req *req;
5939 0 : struct dcerpc_lsa_QuerySecret_state *state;
5940 0 : struct tevent_req *subreq;
5941 :
5942 0 : req = tevent_req_create(mem_ctx, &state,
5943 : struct dcerpc_lsa_QuerySecret_state);
5944 0 : if (req == NULL) {
5945 0 : return NULL;
5946 : }
5947 0 : state->out_mem_ctx = NULL;
5948 :
5949 : /* In parameters */
5950 0 : state->orig.in.sec_handle = _sec_handle;
5951 0 : state->orig.in.new_val = _new_val;
5952 0 : state->orig.in.new_mtime = _new_mtime;
5953 0 : state->orig.in.old_val = _old_val;
5954 0 : state->orig.in.old_mtime = _old_mtime;
5955 :
5956 : /* Out parameters */
5957 0 : state->orig.out.new_val = _new_val;
5958 0 : state->orig.out.new_mtime = _new_mtime;
5959 0 : state->orig.out.old_val = _old_val;
5960 0 : state->orig.out.old_mtime = _old_mtime;
5961 :
5962 : /* Result */
5963 0 : NDR_ZERO_STRUCT(state->orig.out.result);
5964 :
5965 0 : state->out_mem_ctx = talloc_named_const(state, 0,
5966 : "dcerpc_lsa_QuerySecret_out_memory");
5967 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
5968 0 : return tevent_req_post(req, ev);
5969 : }
5970 :
5971 : /* make a temporary copy, that we pass to the dispatch function */
5972 0 : state->tmp = state->orig;
5973 :
5974 0 : subreq = dcerpc_lsa_QuerySecret_r_send(state, ev, h, &state->tmp);
5975 0 : if (tevent_req_nomem(subreq, req)) {
5976 0 : return tevent_req_post(req, ev);
5977 : }
5978 0 : tevent_req_set_callback(subreq, dcerpc_lsa_QuerySecret_done, req);
5979 0 : return req;
5980 : }
5981 :
5982 0 : static void dcerpc_lsa_QuerySecret_done(struct tevent_req *subreq)
5983 : {
5984 0 : struct tevent_req *req = tevent_req_callback_data(
5985 : subreq, struct tevent_req);
5986 0 : struct dcerpc_lsa_QuerySecret_state *state = tevent_req_data(
5987 : req, struct dcerpc_lsa_QuerySecret_state);
5988 0 : NTSTATUS status;
5989 0 : TALLOC_CTX *mem_ctx;
5990 :
5991 0 : if (state->out_mem_ctx) {
5992 0 : mem_ctx = state->out_mem_ctx;
5993 : } else {
5994 0 : mem_ctx = state;
5995 : }
5996 :
5997 0 : status = dcerpc_lsa_QuerySecret_r_recv(subreq, mem_ctx);
5998 0 : TALLOC_FREE(subreq);
5999 0 : if (tevent_req_nterror(req, status)) {
6000 0 : return;
6001 : }
6002 :
6003 : /* Copy out parameters */
6004 0 : if (state->orig.out.new_val && state->tmp.out.new_val) {
6005 0 : *state->orig.out.new_val = *state->tmp.out.new_val;
6006 : }
6007 0 : if (state->orig.out.new_mtime && state->tmp.out.new_mtime) {
6008 0 : *state->orig.out.new_mtime = *state->tmp.out.new_mtime;
6009 : }
6010 0 : if (state->orig.out.old_val && state->tmp.out.old_val) {
6011 0 : *state->orig.out.old_val = *state->tmp.out.old_val;
6012 : }
6013 0 : if (state->orig.out.old_mtime && state->tmp.out.old_mtime) {
6014 0 : *state->orig.out.old_mtime = *state->tmp.out.old_mtime;
6015 : }
6016 :
6017 : /* Copy result */
6018 0 : state->orig.out.result = state->tmp.out.result;
6019 :
6020 : /* Reset temporary structure */
6021 0 : NDR_ZERO_STRUCT(state->tmp);
6022 :
6023 0 : tevent_req_done(req);
6024 : }
6025 :
6026 0 : NTSTATUS dcerpc_lsa_QuerySecret_recv(struct tevent_req *req,
6027 : TALLOC_CTX *mem_ctx,
6028 : NTSTATUS *result)
6029 : {
6030 0 : struct dcerpc_lsa_QuerySecret_state *state = tevent_req_data(
6031 : req, struct dcerpc_lsa_QuerySecret_state);
6032 0 : NTSTATUS status;
6033 :
6034 0 : if (tevent_req_is_nterror(req, &status)) {
6035 0 : tevent_req_received(req);
6036 0 : return status;
6037 : }
6038 :
6039 : /* Steal possible out parameters to the callers context */
6040 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6041 :
6042 : /* Return result */
6043 0 : *result = state->orig.out.result;
6044 :
6045 0 : tevent_req_received(req);
6046 0 : return NT_STATUS_OK;
6047 : }
6048 :
6049 0 : NTSTATUS dcerpc_lsa_QuerySecret(struct dcerpc_binding_handle *h,
6050 : TALLOC_CTX *mem_ctx,
6051 : struct policy_handle *_sec_handle /* [in] [ref] */,
6052 : struct lsa_DATA_BUF_PTR *_new_val /* [in,out] [unique] */,
6053 : NTTIME *_new_mtime /* [in,out] [unique] */,
6054 : struct lsa_DATA_BUF_PTR *_old_val /* [in,out] [unique] */,
6055 : NTTIME *_old_mtime /* [in,out] [unique] */,
6056 : NTSTATUS *result)
6057 : {
6058 0 : struct lsa_QuerySecret r;
6059 0 : NTSTATUS status;
6060 :
6061 : /* In parameters */
6062 0 : r.in.sec_handle = _sec_handle;
6063 0 : r.in.new_val = _new_val;
6064 0 : r.in.new_mtime = _new_mtime;
6065 0 : r.in.old_val = _old_val;
6066 0 : r.in.old_mtime = _old_mtime;
6067 :
6068 : /* Out parameters */
6069 0 : r.out.new_val = _new_val;
6070 0 : r.out.new_mtime = _new_mtime;
6071 0 : r.out.old_val = _old_val;
6072 0 : r.out.old_mtime = _old_mtime;
6073 :
6074 : /* Result */
6075 0 : NDR_ZERO_STRUCT(r.out.result);
6076 :
6077 0 : status = dcerpc_lsa_QuerySecret_r(h, mem_ctx, &r);
6078 0 : if (!NT_STATUS_IS_OK(status)) {
6079 0 : return status;
6080 : }
6081 :
6082 : /* Return variables */
6083 0 : if (_new_val && r.out.new_val) {
6084 0 : *_new_val = *r.out.new_val;
6085 : }
6086 0 : if (_new_mtime && r.out.new_mtime) {
6087 0 : *_new_mtime = *r.out.new_mtime;
6088 : }
6089 0 : if (_old_val && r.out.old_val) {
6090 0 : *_old_val = *r.out.old_val;
6091 : }
6092 0 : if (_old_mtime && r.out.old_mtime) {
6093 0 : *_old_mtime = *r.out.old_mtime;
6094 : }
6095 :
6096 : /* Return result */
6097 0 : *result = r.out.result;
6098 :
6099 0 : return NT_STATUS_OK;
6100 : }
6101 :
6102 : struct dcerpc_lsa_LookupPrivValue_r_state {
6103 : TALLOC_CTX *out_mem_ctx;
6104 : };
6105 :
6106 : static void dcerpc_lsa_LookupPrivValue_r_done(struct tevent_req *subreq);
6107 :
6108 0 : struct tevent_req *dcerpc_lsa_LookupPrivValue_r_send(TALLOC_CTX *mem_ctx,
6109 : struct tevent_context *ev,
6110 : struct dcerpc_binding_handle *h,
6111 : struct lsa_LookupPrivValue *r)
6112 : {
6113 0 : struct tevent_req *req;
6114 0 : struct dcerpc_lsa_LookupPrivValue_r_state *state;
6115 0 : struct tevent_req *subreq;
6116 :
6117 0 : req = tevent_req_create(mem_ctx, &state,
6118 : struct dcerpc_lsa_LookupPrivValue_r_state);
6119 0 : if (req == NULL) {
6120 0 : return NULL;
6121 : }
6122 :
6123 0 : state->out_mem_ctx = talloc_new(state);
6124 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
6125 0 : return tevent_req_post(req, ev);
6126 : }
6127 :
6128 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
6129 : NULL, &ndr_table_lsarpc,
6130 0 : NDR_LSA_LOOKUPPRIVVALUE, state->out_mem_ctx, r);
6131 0 : if (tevent_req_nomem(subreq, req)) {
6132 0 : return tevent_req_post(req, ev);
6133 : }
6134 0 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupPrivValue_r_done, req);
6135 :
6136 0 : return req;
6137 : }
6138 :
6139 0 : static void dcerpc_lsa_LookupPrivValue_r_done(struct tevent_req *subreq)
6140 : {
6141 0 : struct tevent_req *req =
6142 0 : tevent_req_callback_data(subreq,
6143 : struct tevent_req);
6144 0 : NTSTATUS status;
6145 :
6146 0 : status = dcerpc_binding_handle_call_recv(subreq);
6147 0 : TALLOC_FREE(subreq);
6148 0 : if (tevent_req_nterror(req, status)) {
6149 0 : return;
6150 : }
6151 :
6152 0 : tevent_req_done(req);
6153 : }
6154 :
6155 0 : NTSTATUS dcerpc_lsa_LookupPrivValue_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
6156 : {
6157 0 : struct dcerpc_lsa_LookupPrivValue_r_state *state =
6158 0 : tevent_req_data(req,
6159 : struct dcerpc_lsa_LookupPrivValue_r_state);
6160 0 : NTSTATUS status;
6161 :
6162 0 : if (tevent_req_is_nterror(req, &status)) {
6163 0 : tevent_req_received(req);
6164 0 : return status;
6165 : }
6166 :
6167 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6168 :
6169 0 : tevent_req_received(req);
6170 0 : return NT_STATUS_OK;
6171 : }
6172 :
6173 97 : NTSTATUS dcerpc_lsa_LookupPrivValue_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_LookupPrivValue *r)
6174 : {
6175 0 : NTSTATUS status;
6176 :
6177 97 : status = dcerpc_binding_handle_call(h,
6178 : NULL, &ndr_table_lsarpc,
6179 : NDR_LSA_LOOKUPPRIVVALUE, mem_ctx, r);
6180 :
6181 97 : return status;
6182 : }
6183 :
6184 : struct dcerpc_lsa_LookupPrivValue_state {
6185 : struct lsa_LookupPrivValue orig;
6186 : struct lsa_LookupPrivValue tmp;
6187 : TALLOC_CTX *out_mem_ctx;
6188 : };
6189 :
6190 : static void dcerpc_lsa_LookupPrivValue_done(struct tevent_req *subreq);
6191 :
6192 0 : struct tevent_req *dcerpc_lsa_LookupPrivValue_send(TALLOC_CTX *mem_ctx,
6193 : struct tevent_context *ev,
6194 : struct dcerpc_binding_handle *h,
6195 : struct policy_handle *_handle /* [in] [ref] */,
6196 : struct lsa_String *_name /* [in] [ref] */,
6197 : struct lsa_LUID *_luid /* [out] [ref] */)
6198 : {
6199 0 : struct tevent_req *req;
6200 0 : struct dcerpc_lsa_LookupPrivValue_state *state;
6201 0 : struct tevent_req *subreq;
6202 :
6203 0 : req = tevent_req_create(mem_ctx, &state,
6204 : struct dcerpc_lsa_LookupPrivValue_state);
6205 0 : if (req == NULL) {
6206 0 : return NULL;
6207 : }
6208 0 : state->out_mem_ctx = NULL;
6209 :
6210 : /* In parameters */
6211 0 : state->orig.in.handle = _handle;
6212 0 : state->orig.in.name = _name;
6213 :
6214 : /* Out parameters */
6215 0 : state->orig.out.luid = _luid;
6216 :
6217 : /* Result */
6218 0 : NDR_ZERO_STRUCT(state->orig.out.result);
6219 :
6220 0 : state->out_mem_ctx = talloc_named_const(state, 0,
6221 : "dcerpc_lsa_LookupPrivValue_out_memory");
6222 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
6223 0 : return tevent_req_post(req, ev);
6224 : }
6225 :
6226 : /* make a temporary copy, that we pass to the dispatch function */
6227 0 : state->tmp = state->orig;
6228 :
6229 0 : subreq = dcerpc_lsa_LookupPrivValue_r_send(state, ev, h, &state->tmp);
6230 0 : if (tevent_req_nomem(subreq, req)) {
6231 0 : return tevent_req_post(req, ev);
6232 : }
6233 0 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupPrivValue_done, req);
6234 0 : return req;
6235 : }
6236 :
6237 0 : static void dcerpc_lsa_LookupPrivValue_done(struct tevent_req *subreq)
6238 : {
6239 0 : struct tevent_req *req = tevent_req_callback_data(
6240 : subreq, struct tevent_req);
6241 0 : struct dcerpc_lsa_LookupPrivValue_state *state = tevent_req_data(
6242 : req, struct dcerpc_lsa_LookupPrivValue_state);
6243 0 : NTSTATUS status;
6244 0 : TALLOC_CTX *mem_ctx;
6245 :
6246 0 : if (state->out_mem_ctx) {
6247 0 : mem_ctx = state->out_mem_ctx;
6248 : } else {
6249 0 : mem_ctx = state;
6250 : }
6251 :
6252 0 : status = dcerpc_lsa_LookupPrivValue_r_recv(subreq, mem_ctx);
6253 0 : TALLOC_FREE(subreq);
6254 0 : if (tevent_req_nterror(req, status)) {
6255 0 : return;
6256 : }
6257 :
6258 : /* Copy out parameters */
6259 0 : *state->orig.out.luid = *state->tmp.out.luid;
6260 :
6261 : /* Copy result */
6262 0 : state->orig.out.result = state->tmp.out.result;
6263 :
6264 : /* Reset temporary structure */
6265 0 : NDR_ZERO_STRUCT(state->tmp);
6266 :
6267 0 : tevent_req_done(req);
6268 : }
6269 :
6270 0 : NTSTATUS dcerpc_lsa_LookupPrivValue_recv(struct tevent_req *req,
6271 : TALLOC_CTX *mem_ctx,
6272 : NTSTATUS *result)
6273 : {
6274 0 : struct dcerpc_lsa_LookupPrivValue_state *state = tevent_req_data(
6275 : req, struct dcerpc_lsa_LookupPrivValue_state);
6276 0 : NTSTATUS status;
6277 :
6278 0 : if (tevent_req_is_nterror(req, &status)) {
6279 0 : tevent_req_received(req);
6280 0 : return status;
6281 : }
6282 :
6283 : /* Steal possible out parameters to the callers context */
6284 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6285 :
6286 : /* Return result */
6287 0 : *result = state->orig.out.result;
6288 :
6289 0 : tevent_req_received(req);
6290 0 : return NT_STATUS_OK;
6291 : }
6292 :
6293 0 : NTSTATUS dcerpc_lsa_LookupPrivValue(struct dcerpc_binding_handle *h,
6294 : TALLOC_CTX *mem_ctx,
6295 : struct policy_handle *_handle /* [in] [ref] */,
6296 : struct lsa_String *_name /* [in] [ref] */,
6297 : struct lsa_LUID *_luid /* [out] [ref] */,
6298 : NTSTATUS *result)
6299 : {
6300 0 : struct lsa_LookupPrivValue r;
6301 0 : NTSTATUS status;
6302 :
6303 : /* In parameters */
6304 0 : r.in.handle = _handle;
6305 0 : r.in.name = _name;
6306 :
6307 : /* Out parameters */
6308 0 : r.out.luid = _luid;
6309 :
6310 : /* Result */
6311 0 : NDR_ZERO_STRUCT(r.out.result);
6312 :
6313 0 : status = dcerpc_lsa_LookupPrivValue_r(h, mem_ctx, &r);
6314 0 : if (!NT_STATUS_IS_OK(status)) {
6315 0 : return status;
6316 : }
6317 :
6318 : /* Return variables */
6319 0 : *_luid = *r.out.luid;
6320 :
6321 : /* Return result */
6322 0 : *result = r.out.result;
6323 :
6324 0 : return NT_STATUS_OK;
6325 : }
6326 :
6327 : struct dcerpc_lsa_LookupPrivName_r_state {
6328 : TALLOC_CTX *out_mem_ctx;
6329 : };
6330 :
6331 : static void dcerpc_lsa_LookupPrivName_r_done(struct tevent_req *subreq);
6332 :
6333 0 : struct tevent_req *dcerpc_lsa_LookupPrivName_r_send(TALLOC_CTX *mem_ctx,
6334 : struct tevent_context *ev,
6335 : struct dcerpc_binding_handle *h,
6336 : struct lsa_LookupPrivName *r)
6337 : {
6338 0 : struct tevent_req *req;
6339 0 : struct dcerpc_lsa_LookupPrivName_r_state *state;
6340 0 : struct tevent_req *subreq;
6341 :
6342 0 : req = tevent_req_create(mem_ctx, &state,
6343 : struct dcerpc_lsa_LookupPrivName_r_state);
6344 0 : if (req == NULL) {
6345 0 : return NULL;
6346 : }
6347 :
6348 0 : state->out_mem_ctx = talloc_new(state);
6349 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
6350 0 : return tevent_req_post(req, ev);
6351 : }
6352 :
6353 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
6354 : NULL, &ndr_table_lsarpc,
6355 0 : NDR_LSA_LOOKUPPRIVNAME, state->out_mem_ctx, r);
6356 0 : if (tevent_req_nomem(subreq, req)) {
6357 0 : return tevent_req_post(req, ev);
6358 : }
6359 0 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupPrivName_r_done, req);
6360 :
6361 0 : return req;
6362 : }
6363 :
6364 0 : static void dcerpc_lsa_LookupPrivName_r_done(struct tevent_req *subreq)
6365 : {
6366 0 : struct tevent_req *req =
6367 0 : tevent_req_callback_data(subreq,
6368 : struct tevent_req);
6369 0 : NTSTATUS status;
6370 :
6371 0 : status = dcerpc_binding_handle_call_recv(subreq);
6372 0 : TALLOC_FREE(subreq);
6373 0 : if (tevent_req_nterror(req, status)) {
6374 0 : return;
6375 : }
6376 :
6377 0 : tevent_req_done(req);
6378 : }
6379 :
6380 0 : NTSTATUS dcerpc_lsa_LookupPrivName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
6381 : {
6382 0 : struct dcerpc_lsa_LookupPrivName_r_state *state =
6383 0 : tevent_req_data(req,
6384 : struct dcerpc_lsa_LookupPrivName_r_state);
6385 0 : NTSTATUS status;
6386 :
6387 0 : if (tevent_req_is_nterror(req, &status)) {
6388 0 : tevent_req_received(req);
6389 0 : return status;
6390 : }
6391 :
6392 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6393 :
6394 0 : tevent_req_received(req);
6395 0 : return NT_STATUS_OK;
6396 : }
6397 :
6398 146 : NTSTATUS dcerpc_lsa_LookupPrivName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_LookupPrivName *r)
6399 : {
6400 0 : NTSTATUS status;
6401 :
6402 146 : status = dcerpc_binding_handle_call(h,
6403 : NULL, &ndr_table_lsarpc,
6404 : NDR_LSA_LOOKUPPRIVNAME, mem_ctx, r);
6405 :
6406 146 : return status;
6407 : }
6408 :
6409 : struct dcerpc_lsa_LookupPrivName_state {
6410 : struct lsa_LookupPrivName orig;
6411 : struct lsa_LookupPrivName tmp;
6412 : TALLOC_CTX *out_mem_ctx;
6413 : };
6414 :
6415 : static void dcerpc_lsa_LookupPrivName_done(struct tevent_req *subreq);
6416 :
6417 0 : struct tevent_req *dcerpc_lsa_LookupPrivName_send(TALLOC_CTX *mem_ctx,
6418 : struct tevent_context *ev,
6419 : struct dcerpc_binding_handle *h,
6420 : struct policy_handle *_handle /* [in] [ref] */,
6421 : struct lsa_LUID *_luid /* [in] [ref] */,
6422 : struct lsa_StringLarge **_name /* [out] [ref] */)
6423 : {
6424 0 : struct tevent_req *req;
6425 0 : struct dcerpc_lsa_LookupPrivName_state *state;
6426 0 : struct tevent_req *subreq;
6427 :
6428 0 : req = tevent_req_create(mem_ctx, &state,
6429 : struct dcerpc_lsa_LookupPrivName_state);
6430 0 : if (req == NULL) {
6431 0 : return NULL;
6432 : }
6433 0 : state->out_mem_ctx = NULL;
6434 :
6435 : /* In parameters */
6436 0 : state->orig.in.handle = _handle;
6437 0 : state->orig.in.luid = _luid;
6438 :
6439 : /* Out parameters */
6440 0 : state->orig.out.name = _name;
6441 :
6442 : /* Result */
6443 0 : NDR_ZERO_STRUCT(state->orig.out.result);
6444 :
6445 0 : state->out_mem_ctx = talloc_named_const(state, 0,
6446 : "dcerpc_lsa_LookupPrivName_out_memory");
6447 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
6448 0 : return tevent_req_post(req, ev);
6449 : }
6450 :
6451 : /* make a temporary copy, that we pass to the dispatch function */
6452 0 : state->tmp = state->orig;
6453 :
6454 0 : subreq = dcerpc_lsa_LookupPrivName_r_send(state, ev, h, &state->tmp);
6455 0 : if (tevent_req_nomem(subreq, req)) {
6456 0 : return tevent_req_post(req, ev);
6457 : }
6458 0 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupPrivName_done, req);
6459 0 : return req;
6460 : }
6461 :
6462 0 : static void dcerpc_lsa_LookupPrivName_done(struct tevent_req *subreq)
6463 : {
6464 0 : struct tevent_req *req = tevent_req_callback_data(
6465 : subreq, struct tevent_req);
6466 0 : struct dcerpc_lsa_LookupPrivName_state *state = tevent_req_data(
6467 : req, struct dcerpc_lsa_LookupPrivName_state);
6468 0 : NTSTATUS status;
6469 0 : TALLOC_CTX *mem_ctx;
6470 :
6471 0 : if (state->out_mem_ctx) {
6472 0 : mem_ctx = state->out_mem_ctx;
6473 : } else {
6474 0 : mem_ctx = state;
6475 : }
6476 :
6477 0 : status = dcerpc_lsa_LookupPrivName_r_recv(subreq, mem_ctx);
6478 0 : TALLOC_FREE(subreq);
6479 0 : if (tevent_req_nterror(req, status)) {
6480 0 : return;
6481 : }
6482 :
6483 : /* Copy out parameters */
6484 0 : *state->orig.out.name = *state->tmp.out.name;
6485 :
6486 : /* Copy result */
6487 0 : state->orig.out.result = state->tmp.out.result;
6488 :
6489 : /* Reset temporary structure */
6490 0 : NDR_ZERO_STRUCT(state->tmp);
6491 :
6492 0 : tevent_req_done(req);
6493 : }
6494 :
6495 0 : NTSTATUS dcerpc_lsa_LookupPrivName_recv(struct tevent_req *req,
6496 : TALLOC_CTX *mem_ctx,
6497 : NTSTATUS *result)
6498 : {
6499 0 : struct dcerpc_lsa_LookupPrivName_state *state = tevent_req_data(
6500 : req, struct dcerpc_lsa_LookupPrivName_state);
6501 0 : NTSTATUS status;
6502 :
6503 0 : if (tevent_req_is_nterror(req, &status)) {
6504 0 : tevent_req_received(req);
6505 0 : return status;
6506 : }
6507 :
6508 : /* Steal possible out parameters to the callers context */
6509 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6510 :
6511 : /* Return result */
6512 0 : *result = state->orig.out.result;
6513 :
6514 0 : tevent_req_received(req);
6515 0 : return NT_STATUS_OK;
6516 : }
6517 :
6518 0 : NTSTATUS dcerpc_lsa_LookupPrivName(struct dcerpc_binding_handle *h,
6519 : TALLOC_CTX *mem_ctx,
6520 : struct policy_handle *_handle /* [in] [ref] */,
6521 : struct lsa_LUID *_luid /* [in] [ref] */,
6522 : struct lsa_StringLarge **_name /* [out] [ref] */,
6523 : NTSTATUS *result)
6524 : {
6525 0 : struct lsa_LookupPrivName r;
6526 0 : NTSTATUS status;
6527 :
6528 : /* In parameters */
6529 0 : r.in.handle = _handle;
6530 0 : r.in.luid = _luid;
6531 :
6532 : /* Out parameters */
6533 0 : r.out.name = _name;
6534 :
6535 : /* Result */
6536 0 : NDR_ZERO_STRUCT(r.out.result);
6537 :
6538 0 : status = dcerpc_lsa_LookupPrivName_r(h, mem_ctx, &r);
6539 0 : if (!NT_STATUS_IS_OK(status)) {
6540 0 : return status;
6541 : }
6542 :
6543 : /* Return variables */
6544 0 : *_name = *r.out.name;
6545 :
6546 : /* Return result */
6547 0 : *result = r.out.result;
6548 :
6549 0 : return NT_STATUS_OK;
6550 : }
6551 :
6552 : struct dcerpc_lsa_LookupPrivDisplayName_r_state {
6553 : TALLOC_CTX *out_mem_ctx;
6554 : };
6555 :
6556 : static void dcerpc_lsa_LookupPrivDisplayName_r_done(struct tevent_req *subreq);
6557 :
6558 0 : struct tevent_req *dcerpc_lsa_LookupPrivDisplayName_r_send(TALLOC_CTX *mem_ctx,
6559 : struct tevent_context *ev,
6560 : struct dcerpc_binding_handle *h,
6561 : struct lsa_LookupPrivDisplayName *r)
6562 : {
6563 0 : struct tevent_req *req;
6564 0 : struct dcerpc_lsa_LookupPrivDisplayName_r_state *state;
6565 0 : struct tevent_req *subreq;
6566 :
6567 0 : req = tevent_req_create(mem_ctx, &state,
6568 : struct dcerpc_lsa_LookupPrivDisplayName_r_state);
6569 0 : if (req == NULL) {
6570 0 : return NULL;
6571 : }
6572 :
6573 0 : state->out_mem_ctx = talloc_new(state);
6574 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
6575 0 : return tevent_req_post(req, ev);
6576 : }
6577 :
6578 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
6579 : NULL, &ndr_table_lsarpc,
6580 0 : NDR_LSA_LOOKUPPRIVDISPLAYNAME, state->out_mem_ctx, r);
6581 0 : if (tevent_req_nomem(subreq, req)) {
6582 0 : return tevent_req_post(req, ev);
6583 : }
6584 0 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupPrivDisplayName_r_done, req);
6585 :
6586 0 : return req;
6587 : }
6588 :
6589 0 : static void dcerpc_lsa_LookupPrivDisplayName_r_done(struct tevent_req *subreq)
6590 : {
6591 0 : struct tevent_req *req =
6592 0 : tevent_req_callback_data(subreq,
6593 : struct tevent_req);
6594 0 : NTSTATUS status;
6595 :
6596 0 : status = dcerpc_binding_handle_call_recv(subreq);
6597 0 : TALLOC_FREE(subreq);
6598 0 : if (tevent_req_nterror(req, status)) {
6599 0 : return;
6600 : }
6601 :
6602 0 : tevent_req_done(req);
6603 : }
6604 :
6605 0 : NTSTATUS dcerpc_lsa_LookupPrivDisplayName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
6606 : {
6607 0 : struct dcerpc_lsa_LookupPrivDisplayName_r_state *state =
6608 0 : tevent_req_data(req,
6609 : struct dcerpc_lsa_LookupPrivDisplayName_r_state);
6610 0 : NTSTATUS status;
6611 :
6612 0 : if (tevent_req_is_nterror(req, &status)) {
6613 0 : tevent_req_received(req);
6614 0 : return status;
6615 : }
6616 :
6617 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6618 :
6619 0 : tevent_req_received(req);
6620 0 : return NT_STATUS_OK;
6621 : }
6622 :
6623 93 : NTSTATUS dcerpc_lsa_LookupPrivDisplayName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_LookupPrivDisplayName *r)
6624 : {
6625 0 : NTSTATUS status;
6626 :
6627 93 : status = dcerpc_binding_handle_call(h,
6628 : NULL, &ndr_table_lsarpc,
6629 : NDR_LSA_LOOKUPPRIVDISPLAYNAME, mem_ctx, r);
6630 :
6631 93 : return status;
6632 : }
6633 :
6634 : struct dcerpc_lsa_LookupPrivDisplayName_state {
6635 : struct lsa_LookupPrivDisplayName orig;
6636 : struct lsa_LookupPrivDisplayName tmp;
6637 : TALLOC_CTX *out_mem_ctx;
6638 : };
6639 :
6640 : static void dcerpc_lsa_LookupPrivDisplayName_done(struct tevent_req *subreq);
6641 :
6642 0 : struct tevent_req *dcerpc_lsa_LookupPrivDisplayName_send(TALLOC_CTX *mem_ctx,
6643 : struct tevent_context *ev,
6644 : struct dcerpc_binding_handle *h,
6645 : struct policy_handle *_handle /* [in] [ref] */,
6646 : struct lsa_String *_name /* [in] [ref] */,
6647 : uint16_t _language_id /* [in] */,
6648 : uint16_t _language_id_sys /* [in] */,
6649 : struct lsa_StringLarge **_disp_name /* [out] [ref] */,
6650 : uint16_t *_returned_language_id /* [out] [ref] */)
6651 : {
6652 0 : struct tevent_req *req;
6653 0 : struct dcerpc_lsa_LookupPrivDisplayName_state *state;
6654 0 : struct tevent_req *subreq;
6655 :
6656 0 : req = tevent_req_create(mem_ctx, &state,
6657 : struct dcerpc_lsa_LookupPrivDisplayName_state);
6658 0 : if (req == NULL) {
6659 0 : return NULL;
6660 : }
6661 0 : state->out_mem_ctx = NULL;
6662 :
6663 : /* In parameters */
6664 0 : state->orig.in.handle = _handle;
6665 0 : state->orig.in.name = _name;
6666 0 : state->orig.in.language_id = _language_id;
6667 0 : state->orig.in.language_id_sys = _language_id_sys;
6668 :
6669 : /* Out parameters */
6670 0 : state->orig.out.disp_name = _disp_name;
6671 0 : state->orig.out.returned_language_id = _returned_language_id;
6672 :
6673 : /* Result */
6674 0 : NDR_ZERO_STRUCT(state->orig.out.result);
6675 :
6676 0 : state->out_mem_ctx = talloc_named_const(state, 0,
6677 : "dcerpc_lsa_LookupPrivDisplayName_out_memory");
6678 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
6679 0 : return tevent_req_post(req, ev);
6680 : }
6681 :
6682 : /* make a temporary copy, that we pass to the dispatch function */
6683 0 : state->tmp = state->orig;
6684 :
6685 0 : subreq = dcerpc_lsa_LookupPrivDisplayName_r_send(state, ev, h, &state->tmp);
6686 0 : if (tevent_req_nomem(subreq, req)) {
6687 0 : return tevent_req_post(req, ev);
6688 : }
6689 0 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupPrivDisplayName_done, req);
6690 0 : return req;
6691 : }
6692 :
6693 0 : static void dcerpc_lsa_LookupPrivDisplayName_done(struct tevent_req *subreq)
6694 : {
6695 0 : struct tevent_req *req = tevent_req_callback_data(
6696 : subreq, struct tevent_req);
6697 0 : struct dcerpc_lsa_LookupPrivDisplayName_state *state = tevent_req_data(
6698 : req, struct dcerpc_lsa_LookupPrivDisplayName_state);
6699 0 : NTSTATUS status;
6700 0 : TALLOC_CTX *mem_ctx;
6701 :
6702 0 : if (state->out_mem_ctx) {
6703 0 : mem_ctx = state->out_mem_ctx;
6704 : } else {
6705 0 : mem_ctx = state;
6706 : }
6707 :
6708 0 : status = dcerpc_lsa_LookupPrivDisplayName_r_recv(subreq, mem_ctx);
6709 0 : TALLOC_FREE(subreq);
6710 0 : if (tevent_req_nterror(req, status)) {
6711 0 : return;
6712 : }
6713 :
6714 : /* Copy out parameters */
6715 0 : *state->orig.out.disp_name = *state->tmp.out.disp_name;
6716 0 : *state->orig.out.returned_language_id = *state->tmp.out.returned_language_id;
6717 :
6718 : /* Copy result */
6719 0 : state->orig.out.result = state->tmp.out.result;
6720 :
6721 : /* Reset temporary structure */
6722 0 : NDR_ZERO_STRUCT(state->tmp);
6723 :
6724 0 : tevent_req_done(req);
6725 : }
6726 :
6727 0 : NTSTATUS dcerpc_lsa_LookupPrivDisplayName_recv(struct tevent_req *req,
6728 : TALLOC_CTX *mem_ctx,
6729 : NTSTATUS *result)
6730 : {
6731 0 : struct dcerpc_lsa_LookupPrivDisplayName_state *state = tevent_req_data(
6732 : req, struct dcerpc_lsa_LookupPrivDisplayName_state);
6733 0 : NTSTATUS status;
6734 :
6735 0 : if (tevent_req_is_nterror(req, &status)) {
6736 0 : tevent_req_received(req);
6737 0 : return status;
6738 : }
6739 :
6740 : /* Steal possible out parameters to the callers context */
6741 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6742 :
6743 : /* Return result */
6744 0 : *result = state->orig.out.result;
6745 :
6746 0 : tevent_req_received(req);
6747 0 : return NT_STATUS_OK;
6748 : }
6749 :
6750 0 : NTSTATUS dcerpc_lsa_LookupPrivDisplayName(struct dcerpc_binding_handle *h,
6751 : TALLOC_CTX *mem_ctx,
6752 : struct policy_handle *_handle /* [in] [ref] */,
6753 : struct lsa_String *_name /* [in] [ref] */,
6754 : uint16_t _language_id /* [in] */,
6755 : uint16_t _language_id_sys /* [in] */,
6756 : struct lsa_StringLarge **_disp_name /* [out] [ref] */,
6757 : uint16_t *_returned_language_id /* [out] [ref] */,
6758 : NTSTATUS *result)
6759 : {
6760 0 : struct lsa_LookupPrivDisplayName r;
6761 0 : NTSTATUS status;
6762 :
6763 : /* In parameters */
6764 0 : r.in.handle = _handle;
6765 0 : r.in.name = _name;
6766 0 : r.in.language_id = _language_id;
6767 0 : r.in.language_id_sys = _language_id_sys;
6768 :
6769 : /* Out parameters */
6770 0 : r.out.disp_name = _disp_name;
6771 0 : r.out.returned_language_id = _returned_language_id;
6772 :
6773 : /* Result */
6774 0 : NDR_ZERO_STRUCT(r.out.result);
6775 :
6776 0 : status = dcerpc_lsa_LookupPrivDisplayName_r(h, mem_ctx, &r);
6777 0 : if (!NT_STATUS_IS_OK(status)) {
6778 0 : return status;
6779 : }
6780 :
6781 : /* Return variables */
6782 0 : *_disp_name = *r.out.disp_name;
6783 0 : *_returned_language_id = *r.out.returned_language_id;
6784 :
6785 : /* Return result */
6786 0 : *result = r.out.result;
6787 :
6788 0 : return NT_STATUS_OK;
6789 : }
6790 :
6791 : struct dcerpc_lsa_DeleteObject_r_state {
6792 : TALLOC_CTX *out_mem_ctx;
6793 : };
6794 :
6795 : static void dcerpc_lsa_DeleteObject_r_done(struct tevent_req *subreq);
6796 :
6797 0 : struct tevent_req *dcerpc_lsa_DeleteObject_r_send(TALLOC_CTX *mem_ctx,
6798 : struct tevent_context *ev,
6799 : struct dcerpc_binding_handle *h,
6800 : struct lsa_DeleteObject *r)
6801 : {
6802 0 : struct tevent_req *req;
6803 0 : struct dcerpc_lsa_DeleteObject_r_state *state;
6804 0 : struct tevent_req *subreq;
6805 :
6806 0 : req = tevent_req_create(mem_ctx, &state,
6807 : struct dcerpc_lsa_DeleteObject_r_state);
6808 0 : if (req == NULL) {
6809 0 : return NULL;
6810 : }
6811 :
6812 0 : state->out_mem_ctx = talloc_new(state);
6813 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
6814 0 : return tevent_req_post(req, ev);
6815 : }
6816 :
6817 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
6818 : NULL, &ndr_table_lsarpc,
6819 0 : NDR_LSA_DELETEOBJECT, state->out_mem_ctx, r);
6820 0 : if (tevent_req_nomem(subreq, req)) {
6821 0 : return tevent_req_post(req, ev);
6822 : }
6823 0 : tevent_req_set_callback(subreq, dcerpc_lsa_DeleteObject_r_done, req);
6824 :
6825 0 : return req;
6826 : }
6827 :
6828 0 : static void dcerpc_lsa_DeleteObject_r_done(struct tevent_req *subreq)
6829 : {
6830 0 : struct tevent_req *req =
6831 0 : tevent_req_callback_data(subreq,
6832 : struct tevent_req);
6833 0 : NTSTATUS status;
6834 :
6835 0 : status = dcerpc_binding_handle_call_recv(subreq);
6836 0 : TALLOC_FREE(subreq);
6837 0 : if (tevent_req_nterror(req, status)) {
6838 0 : return;
6839 : }
6840 :
6841 0 : tevent_req_done(req);
6842 : }
6843 :
6844 0 : NTSTATUS dcerpc_lsa_DeleteObject_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
6845 : {
6846 0 : struct dcerpc_lsa_DeleteObject_r_state *state =
6847 0 : tevent_req_data(req,
6848 : struct dcerpc_lsa_DeleteObject_r_state);
6849 0 : NTSTATUS status;
6850 :
6851 0 : if (tevent_req_is_nterror(req, &status)) {
6852 0 : tevent_req_received(req);
6853 0 : return status;
6854 : }
6855 :
6856 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6857 :
6858 0 : tevent_req_received(req);
6859 0 : return NT_STATUS_OK;
6860 : }
6861 :
6862 2312 : NTSTATUS dcerpc_lsa_DeleteObject_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_DeleteObject *r)
6863 : {
6864 0 : NTSTATUS status;
6865 :
6866 2312 : status = dcerpc_binding_handle_call(h,
6867 : NULL, &ndr_table_lsarpc,
6868 : NDR_LSA_DELETEOBJECT, mem_ctx, r);
6869 :
6870 2312 : return status;
6871 : }
6872 :
6873 : struct dcerpc_lsa_DeleteObject_state {
6874 : struct lsa_DeleteObject orig;
6875 : struct lsa_DeleteObject tmp;
6876 : TALLOC_CTX *out_mem_ctx;
6877 : };
6878 :
6879 : static void dcerpc_lsa_DeleteObject_done(struct tevent_req *subreq);
6880 :
6881 0 : struct tevent_req *dcerpc_lsa_DeleteObject_send(TALLOC_CTX *mem_ctx,
6882 : struct tevent_context *ev,
6883 : struct dcerpc_binding_handle *h,
6884 : struct policy_handle *_handle /* [in,out] [ref] */)
6885 : {
6886 0 : struct tevent_req *req;
6887 0 : struct dcerpc_lsa_DeleteObject_state *state;
6888 0 : struct tevent_req *subreq;
6889 :
6890 0 : req = tevent_req_create(mem_ctx, &state,
6891 : struct dcerpc_lsa_DeleteObject_state);
6892 0 : if (req == NULL) {
6893 0 : return NULL;
6894 : }
6895 0 : state->out_mem_ctx = NULL;
6896 :
6897 : /* In parameters */
6898 0 : state->orig.in.handle = _handle;
6899 :
6900 : /* Out parameters */
6901 0 : state->orig.out.handle = _handle;
6902 :
6903 : /* Result */
6904 0 : NDR_ZERO_STRUCT(state->orig.out.result);
6905 :
6906 0 : state->out_mem_ctx = talloc_named_const(state, 0,
6907 : "dcerpc_lsa_DeleteObject_out_memory");
6908 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
6909 0 : return tevent_req_post(req, ev);
6910 : }
6911 :
6912 : /* make a temporary copy, that we pass to the dispatch function */
6913 0 : state->tmp = state->orig;
6914 :
6915 0 : subreq = dcerpc_lsa_DeleteObject_r_send(state, ev, h, &state->tmp);
6916 0 : if (tevent_req_nomem(subreq, req)) {
6917 0 : return tevent_req_post(req, ev);
6918 : }
6919 0 : tevent_req_set_callback(subreq, dcerpc_lsa_DeleteObject_done, req);
6920 0 : return req;
6921 : }
6922 :
6923 0 : static void dcerpc_lsa_DeleteObject_done(struct tevent_req *subreq)
6924 : {
6925 0 : struct tevent_req *req = tevent_req_callback_data(
6926 : subreq, struct tevent_req);
6927 0 : struct dcerpc_lsa_DeleteObject_state *state = tevent_req_data(
6928 : req, struct dcerpc_lsa_DeleteObject_state);
6929 0 : NTSTATUS status;
6930 0 : TALLOC_CTX *mem_ctx;
6931 :
6932 0 : if (state->out_mem_ctx) {
6933 0 : mem_ctx = state->out_mem_ctx;
6934 : } else {
6935 0 : mem_ctx = state;
6936 : }
6937 :
6938 0 : status = dcerpc_lsa_DeleteObject_r_recv(subreq, mem_ctx);
6939 0 : TALLOC_FREE(subreq);
6940 0 : if (tevent_req_nterror(req, status)) {
6941 0 : return;
6942 : }
6943 :
6944 : /* Copy out parameters */
6945 0 : *state->orig.out.handle = *state->tmp.out.handle;
6946 :
6947 : /* Copy result */
6948 0 : state->orig.out.result = state->tmp.out.result;
6949 :
6950 : /* Reset temporary structure */
6951 0 : NDR_ZERO_STRUCT(state->tmp);
6952 :
6953 0 : tevent_req_done(req);
6954 : }
6955 :
6956 0 : NTSTATUS dcerpc_lsa_DeleteObject_recv(struct tevent_req *req,
6957 : TALLOC_CTX *mem_ctx,
6958 : NTSTATUS *result)
6959 : {
6960 0 : struct dcerpc_lsa_DeleteObject_state *state = tevent_req_data(
6961 : req, struct dcerpc_lsa_DeleteObject_state);
6962 0 : NTSTATUS status;
6963 :
6964 0 : if (tevent_req_is_nterror(req, &status)) {
6965 0 : tevent_req_received(req);
6966 0 : return status;
6967 : }
6968 :
6969 : /* Steal possible out parameters to the callers context */
6970 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6971 :
6972 : /* Return result */
6973 0 : *result = state->orig.out.result;
6974 :
6975 0 : tevent_req_received(req);
6976 0 : return NT_STATUS_OK;
6977 : }
6978 :
6979 0 : NTSTATUS dcerpc_lsa_DeleteObject(struct dcerpc_binding_handle *h,
6980 : TALLOC_CTX *mem_ctx,
6981 : struct policy_handle *_handle /* [in,out] [ref] */,
6982 : NTSTATUS *result)
6983 : {
6984 0 : struct lsa_DeleteObject r;
6985 0 : NTSTATUS status;
6986 :
6987 : /* In parameters */
6988 0 : r.in.handle = _handle;
6989 :
6990 : /* Out parameters */
6991 0 : r.out.handle = _handle;
6992 :
6993 : /* Result */
6994 0 : NDR_ZERO_STRUCT(r.out.result);
6995 :
6996 0 : status = dcerpc_lsa_DeleteObject_r(h, mem_ctx, &r);
6997 0 : if (!NT_STATUS_IS_OK(status)) {
6998 0 : return status;
6999 : }
7000 :
7001 : /* Return variables */
7002 0 : *_handle = *r.out.handle;
7003 :
7004 : /* Return result */
7005 0 : *result = r.out.result;
7006 :
7007 0 : return NT_STATUS_OK;
7008 : }
7009 :
7010 : struct dcerpc_lsa_EnumAccountsWithUserRight_r_state {
7011 : TALLOC_CTX *out_mem_ctx;
7012 : };
7013 :
7014 : static void dcerpc_lsa_EnumAccountsWithUserRight_r_done(struct tevent_req *subreq);
7015 :
7016 0 : struct tevent_req *dcerpc_lsa_EnumAccountsWithUserRight_r_send(TALLOC_CTX *mem_ctx,
7017 : struct tevent_context *ev,
7018 : struct dcerpc_binding_handle *h,
7019 : struct lsa_EnumAccountsWithUserRight *r)
7020 : {
7021 0 : struct tevent_req *req;
7022 0 : struct dcerpc_lsa_EnumAccountsWithUserRight_r_state *state;
7023 0 : struct tevent_req *subreq;
7024 :
7025 0 : req = tevent_req_create(mem_ctx, &state,
7026 : struct dcerpc_lsa_EnumAccountsWithUserRight_r_state);
7027 0 : if (req == NULL) {
7028 0 : return NULL;
7029 : }
7030 :
7031 0 : state->out_mem_ctx = talloc_new(state);
7032 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
7033 0 : return tevent_req_post(req, ev);
7034 : }
7035 :
7036 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
7037 : NULL, &ndr_table_lsarpc,
7038 0 : NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT, state->out_mem_ctx, r);
7039 0 : if (tevent_req_nomem(subreq, req)) {
7040 0 : return tevent_req_post(req, ev);
7041 : }
7042 0 : tevent_req_set_callback(subreq, dcerpc_lsa_EnumAccountsWithUserRight_r_done, req);
7043 :
7044 0 : return req;
7045 : }
7046 :
7047 0 : static void dcerpc_lsa_EnumAccountsWithUserRight_r_done(struct tevent_req *subreq)
7048 : {
7049 0 : struct tevent_req *req =
7050 0 : tevent_req_callback_data(subreq,
7051 : struct tevent_req);
7052 0 : NTSTATUS status;
7053 :
7054 0 : status = dcerpc_binding_handle_call_recv(subreq);
7055 0 : TALLOC_FREE(subreq);
7056 0 : if (tevent_req_nterror(req, status)) {
7057 0 : return;
7058 : }
7059 :
7060 0 : tevent_req_done(req);
7061 : }
7062 :
7063 0 : NTSTATUS dcerpc_lsa_EnumAccountsWithUserRight_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
7064 : {
7065 0 : struct dcerpc_lsa_EnumAccountsWithUserRight_r_state *state =
7066 0 : tevent_req_data(req,
7067 : struct dcerpc_lsa_EnumAccountsWithUserRight_r_state);
7068 0 : NTSTATUS status;
7069 :
7070 0 : if (tevent_req_is_nterror(req, &status)) {
7071 0 : tevent_req_received(req);
7072 0 : return status;
7073 : }
7074 :
7075 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7076 :
7077 0 : tevent_req_received(req);
7078 0 : return NT_STATUS_OK;
7079 : }
7080 :
7081 93 : NTSTATUS dcerpc_lsa_EnumAccountsWithUserRight_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_EnumAccountsWithUserRight *r)
7082 : {
7083 0 : NTSTATUS status;
7084 :
7085 93 : status = dcerpc_binding_handle_call(h,
7086 : NULL, &ndr_table_lsarpc,
7087 : NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT, mem_ctx, r);
7088 :
7089 93 : return status;
7090 : }
7091 :
7092 : struct dcerpc_lsa_EnumAccountsWithUserRight_state {
7093 : struct lsa_EnumAccountsWithUserRight orig;
7094 : struct lsa_EnumAccountsWithUserRight tmp;
7095 : TALLOC_CTX *out_mem_ctx;
7096 : };
7097 :
7098 : static void dcerpc_lsa_EnumAccountsWithUserRight_done(struct tevent_req *subreq);
7099 :
7100 0 : struct tevent_req *dcerpc_lsa_EnumAccountsWithUserRight_send(TALLOC_CTX *mem_ctx,
7101 : struct tevent_context *ev,
7102 : struct dcerpc_binding_handle *h,
7103 : struct policy_handle *_handle /* [in] [ref] */,
7104 : struct lsa_String *_name /* [in] [unique] */,
7105 : struct lsa_SidArray *_sids /* [out] [ref] */)
7106 : {
7107 0 : struct tevent_req *req;
7108 0 : struct dcerpc_lsa_EnumAccountsWithUserRight_state *state;
7109 0 : struct tevent_req *subreq;
7110 :
7111 0 : req = tevent_req_create(mem_ctx, &state,
7112 : struct dcerpc_lsa_EnumAccountsWithUserRight_state);
7113 0 : if (req == NULL) {
7114 0 : return NULL;
7115 : }
7116 0 : state->out_mem_ctx = NULL;
7117 :
7118 : /* In parameters */
7119 0 : state->orig.in.handle = _handle;
7120 0 : state->orig.in.name = _name;
7121 :
7122 : /* Out parameters */
7123 0 : state->orig.out.sids = _sids;
7124 :
7125 : /* Result */
7126 0 : NDR_ZERO_STRUCT(state->orig.out.result);
7127 :
7128 0 : state->out_mem_ctx = talloc_named_const(state, 0,
7129 : "dcerpc_lsa_EnumAccountsWithUserRight_out_memory");
7130 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
7131 0 : return tevent_req_post(req, ev);
7132 : }
7133 :
7134 : /* make a temporary copy, that we pass to the dispatch function */
7135 0 : state->tmp = state->orig;
7136 :
7137 0 : subreq = dcerpc_lsa_EnumAccountsWithUserRight_r_send(state, ev, h, &state->tmp);
7138 0 : if (tevent_req_nomem(subreq, req)) {
7139 0 : return tevent_req_post(req, ev);
7140 : }
7141 0 : tevent_req_set_callback(subreq, dcerpc_lsa_EnumAccountsWithUserRight_done, req);
7142 0 : return req;
7143 : }
7144 :
7145 0 : static void dcerpc_lsa_EnumAccountsWithUserRight_done(struct tevent_req *subreq)
7146 : {
7147 0 : struct tevent_req *req = tevent_req_callback_data(
7148 : subreq, struct tevent_req);
7149 0 : struct dcerpc_lsa_EnumAccountsWithUserRight_state *state = tevent_req_data(
7150 : req, struct dcerpc_lsa_EnumAccountsWithUserRight_state);
7151 0 : NTSTATUS status;
7152 0 : TALLOC_CTX *mem_ctx;
7153 :
7154 0 : if (state->out_mem_ctx) {
7155 0 : mem_ctx = state->out_mem_ctx;
7156 : } else {
7157 0 : mem_ctx = state;
7158 : }
7159 :
7160 0 : status = dcerpc_lsa_EnumAccountsWithUserRight_r_recv(subreq, mem_ctx);
7161 0 : TALLOC_FREE(subreq);
7162 0 : if (tevent_req_nterror(req, status)) {
7163 0 : return;
7164 : }
7165 :
7166 : /* Copy out parameters */
7167 0 : *state->orig.out.sids = *state->tmp.out.sids;
7168 :
7169 : /* Copy result */
7170 0 : state->orig.out.result = state->tmp.out.result;
7171 :
7172 : /* Reset temporary structure */
7173 0 : NDR_ZERO_STRUCT(state->tmp);
7174 :
7175 0 : tevent_req_done(req);
7176 : }
7177 :
7178 0 : NTSTATUS dcerpc_lsa_EnumAccountsWithUserRight_recv(struct tevent_req *req,
7179 : TALLOC_CTX *mem_ctx,
7180 : NTSTATUS *result)
7181 : {
7182 0 : struct dcerpc_lsa_EnumAccountsWithUserRight_state *state = tevent_req_data(
7183 : req, struct dcerpc_lsa_EnumAccountsWithUserRight_state);
7184 0 : NTSTATUS status;
7185 :
7186 0 : if (tevent_req_is_nterror(req, &status)) {
7187 0 : tevent_req_received(req);
7188 0 : return status;
7189 : }
7190 :
7191 : /* Steal possible out parameters to the callers context */
7192 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7193 :
7194 : /* Return result */
7195 0 : *result = state->orig.out.result;
7196 :
7197 0 : tevent_req_received(req);
7198 0 : return NT_STATUS_OK;
7199 : }
7200 :
7201 0 : NTSTATUS dcerpc_lsa_EnumAccountsWithUserRight(struct dcerpc_binding_handle *h,
7202 : TALLOC_CTX *mem_ctx,
7203 : struct policy_handle *_handle /* [in] [ref] */,
7204 : struct lsa_String *_name /* [in] [unique] */,
7205 : struct lsa_SidArray *_sids /* [out] [ref] */,
7206 : NTSTATUS *result)
7207 : {
7208 0 : struct lsa_EnumAccountsWithUserRight r;
7209 0 : NTSTATUS status;
7210 :
7211 : /* In parameters */
7212 0 : r.in.handle = _handle;
7213 0 : r.in.name = _name;
7214 :
7215 : /* Out parameters */
7216 0 : r.out.sids = _sids;
7217 :
7218 : /* Result */
7219 0 : NDR_ZERO_STRUCT(r.out.result);
7220 :
7221 0 : status = dcerpc_lsa_EnumAccountsWithUserRight_r(h, mem_ctx, &r);
7222 0 : if (!NT_STATUS_IS_OK(status)) {
7223 0 : return status;
7224 : }
7225 :
7226 : /* Return variables */
7227 0 : *_sids = *r.out.sids;
7228 :
7229 : /* Return result */
7230 0 : *result = r.out.result;
7231 :
7232 0 : return NT_STATUS_OK;
7233 : }
7234 :
7235 : struct dcerpc_lsa_EnumAccountRights_r_state {
7236 : TALLOC_CTX *out_mem_ctx;
7237 : };
7238 :
7239 : static void dcerpc_lsa_EnumAccountRights_r_done(struct tevent_req *subreq);
7240 :
7241 0 : struct tevent_req *dcerpc_lsa_EnumAccountRights_r_send(TALLOC_CTX *mem_ctx,
7242 : struct tevent_context *ev,
7243 : struct dcerpc_binding_handle *h,
7244 : struct lsa_EnumAccountRights *r)
7245 : {
7246 0 : struct tevent_req *req;
7247 0 : struct dcerpc_lsa_EnumAccountRights_r_state *state;
7248 0 : struct tevent_req *subreq;
7249 :
7250 0 : req = tevent_req_create(mem_ctx, &state,
7251 : struct dcerpc_lsa_EnumAccountRights_r_state);
7252 0 : if (req == NULL) {
7253 0 : return NULL;
7254 : }
7255 :
7256 0 : state->out_mem_ctx = talloc_new(state);
7257 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
7258 0 : return tevent_req_post(req, ev);
7259 : }
7260 :
7261 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
7262 : NULL, &ndr_table_lsarpc,
7263 0 : NDR_LSA_ENUMACCOUNTRIGHTS, state->out_mem_ctx, r);
7264 0 : if (tevent_req_nomem(subreq, req)) {
7265 0 : return tevent_req_post(req, ev);
7266 : }
7267 0 : tevent_req_set_callback(subreq, dcerpc_lsa_EnumAccountRights_r_done, req);
7268 :
7269 0 : return req;
7270 : }
7271 :
7272 0 : static void dcerpc_lsa_EnumAccountRights_r_done(struct tevent_req *subreq)
7273 : {
7274 0 : struct tevent_req *req =
7275 0 : tevent_req_callback_data(subreq,
7276 : struct tevent_req);
7277 0 : NTSTATUS status;
7278 :
7279 0 : status = dcerpc_binding_handle_call_recv(subreq);
7280 0 : TALLOC_FREE(subreq);
7281 0 : if (tevent_req_nterror(req, status)) {
7282 0 : return;
7283 : }
7284 :
7285 0 : tevent_req_done(req);
7286 : }
7287 :
7288 0 : NTSTATUS dcerpc_lsa_EnumAccountRights_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
7289 : {
7290 0 : struct dcerpc_lsa_EnumAccountRights_r_state *state =
7291 0 : tevent_req_data(req,
7292 : struct dcerpc_lsa_EnumAccountRights_r_state);
7293 0 : NTSTATUS status;
7294 :
7295 0 : if (tevent_req_is_nterror(req, &status)) {
7296 0 : tevent_req_received(req);
7297 0 : return status;
7298 : }
7299 :
7300 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7301 :
7302 0 : tevent_req_received(req);
7303 0 : return NT_STATUS_OK;
7304 : }
7305 :
7306 162 : NTSTATUS dcerpc_lsa_EnumAccountRights_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_EnumAccountRights *r)
7307 : {
7308 0 : NTSTATUS status;
7309 :
7310 162 : status = dcerpc_binding_handle_call(h,
7311 : NULL, &ndr_table_lsarpc,
7312 : NDR_LSA_ENUMACCOUNTRIGHTS, mem_ctx, r);
7313 :
7314 162 : return status;
7315 : }
7316 :
7317 : struct dcerpc_lsa_EnumAccountRights_state {
7318 : struct lsa_EnumAccountRights orig;
7319 : struct lsa_EnumAccountRights tmp;
7320 : TALLOC_CTX *out_mem_ctx;
7321 : };
7322 :
7323 : static void dcerpc_lsa_EnumAccountRights_done(struct tevent_req *subreq);
7324 :
7325 0 : struct tevent_req *dcerpc_lsa_EnumAccountRights_send(TALLOC_CTX *mem_ctx,
7326 : struct tevent_context *ev,
7327 : struct dcerpc_binding_handle *h,
7328 : struct policy_handle *_handle /* [in] [ref] */,
7329 : struct dom_sid2 *_sid /* [in] [ref] */,
7330 : struct lsa_RightSet *_rights /* [out] [ref] */)
7331 : {
7332 0 : struct tevent_req *req;
7333 0 : struct dcerpc_lsa_EnumAccountRights_state *state;
7334 0 : struct tevent_req *subreq;
7335 :
7336 0 : req = tevent_req_create(mem_ctx, &state,
7337 : struct dcerpc_lsa_EnumAccountRights_state);
7338 0 : if (req == NULL) {
7339 0 : return NULL;
7340 : }
7341 0 : state->out_mem_ctx = NULL;
7342 :
7343 : /* In parameters */
7344 0 : state->orig.in.handle = _handle;
7345 0 : state->orig.in.sid = _sid;
7346 :
7347 : /* Out parameters */
7348 0 : state->orig.out.rights = _rights;
7349 :
7350 : /* Result */
7351 0 : NDR_ZERO_STRUCT(state->orig.out.result);
7352 :
7353 0 : state->out_mem_ctx = talloc_named_const(state, 0,
7354 : "dcerpc_lsa_EnumAccountRights_out_memory");
7355 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
7356 0 : return tevent_req_post(req, ev);
7357 : }
7358 :
7359 : /* make a temporary copy, that we pass to the dispatch function */
7360 0 : state->tmp = state->orig;
7361 :
7362 0 : subreq = dcerpc_lsa_EnumAccountRights_r_send(state, ev, h, &state->tmp);
7363 0 : if (tevent_req_nomem(subreq, req)) {
7364 0 : return tevent_req_post(req, ev);
7365 : }
7366 0 : tevent_req_set_callback(subreq, dcerpc_lsa_EnumAccountRights_done, req);
7367 0 : return req;
7368 : }
7369 :
7370 0 : static void dcerpc_lsa_EnumAccountRights_done(struct tevent_req *subreq)
7371 : {
7372 0 : struct tevent_req *req = tevent_req_callback_data(
7373 : subreq, struct tevent_req);
7374 0 : struct dcerpc_lsa_EnumAccountRights_state *state = tevent_req_data(
7375 : req, struct dcerpc_lsa_EnumAccountRights_state);
7376 0 : NTSTATUS status;
7377 0 : TALLOC_CTX *mem_ctx;
7378 :
7379 0 : if (state->out_mem_ctx) {
7380 0 : mem_ctx = state->out_mem_ctx;
7381 : } else {
7382 0 : mem_ctx = state;
7383 : }
7384 :
7385 0 : status = dcerpc_lsa_EnumAccountRights_r_recv(subreq, mem_ctx);
7386 0 : TALLOC_FREE(subreq);
7387 0 : if (tevent_req_nterror(req, status)) {
7388 0 : return;
7389 : }
7390 :
7391 : /* Copy out parameters */
7392 0 : *state->orig.out.rights = *state->tmp.out.rights;
7393 :
7394 : /* Copy result */
7395 0 : state->orig.out.result = state->tmp.out.result;
7396 :
7397 : /* Reset temporary structure */
7398 0 : NDR_ZERO_STRUCT(state->tmp);
7399 :
7400 0 : tevent_req_done(req);
7401 : }
7402 :
7403 0 : NTSTATUS dcerpc_lsa_EnumAccountRights_recv(struct tevent_req *req,
7404 : TALLOC_CTX *mem_ctx,
7405 : NTSTATUS *result)
7406 : {
7407 0 : struct dcerpc_lsa_EnumAccountRights_state *state = tevent_req_data(
7408 : req, struct dcerpc_lsa_EnumAccountRights_state);
7409 0 : NTSTATUS status;
7410 :
7411 0 : if (tevent_req_is_nterror(req, &status)) {
7412 0 : tevent_req_received(req);
7413 0 : return status;
7414 : }
7415 :
7416 : /* Steal possible out parameters to the callers context */
7417 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7418 :
7419 : /* Return result */
7420 0 : *result = state->orig.out.result;
7421 :
7422 0 : tevent_req_received(req);
7423 0 : return NT_STATUS_OK;
7424 : }
7425 :
7426 0 : NTSTATUS dcerpc_lsa_EnumAccountRights(struct dcerpc_binding_handle *h,
7427 : TALLOC_CTX *mem_ctx,
7428 : struct policy_handle *_handle /* [in] [ref] */,
7429 : struct dom_sid2 *_sid /* [in] [ref] */,
7430 : struct lsa_RightSet *_rights /* [out] [ref] */,
7431 : NTSTATUS *result)
7432 : {
7433 0 : struct lsa_EnumAccountRights r;
7434 0 : NTSTATUS status;
7435 :
7436 : /* In parameters */
7437 0 : r.in.handle = _handle;
7438 0 : r.in.sid = _sid;
7439 :
7440 : /* Out parameters */
7441 0 : r.out.rights = _rights;
7442 :
7443 : /* Result */
7444 0 : NDR_ZERO_STRUCT(r.out.result);
7445 :
7446 0 : status = dcerpc_lsa_EnumAccountRights_r(h, mem_ctx, &r);
7447 0 : if (!NT_STATUS_IS_OK(status)) {
7448 0 : return status;
7449 : }
7450 :
7451 : /* Return variables */
7452 0 : *_rights = *r.out.rights;
7453 :
7454 : /* Return result */
7455 0 : *result = r.out.result;
7456 :
7457 0 : return NT_STATUS_OK;
7458 : }
7459 :
7460 : struct dcerpc_lsa_AddAccountRights_r_state {
7461 : TALLOC_CTX *out_mem_ctx;
7462 : };
7463 :
7464 : static void dcerpc_lsa_AddAccountRights_r_done(struct tevent_req *subreq);
7465 :
7466 0 : struct tevent_req *dcerpc_lsa_AddAccountRights_r_send(TALLOC_CTX *mem_ctx,
7467 : struct tevent_context *ev,
7468 : struct dcerpc_binding_handle *h,
7469 : struct lsa_AddAccountRights *r)
7470 : {
7471 0 : struct tevent_req *req;
7472 0 : struct dcerpc_lsa_AddAccountRights_r_state *state;
7473 0 : struct tevent_req *subreq;
7474 :
7475 0 : req = tevent_req_create(mem_ctx, &state,
7476 : struct dcerpc_lsa_AddAccountRights_r_state);
7477 0 : if (req == NULL) {
7478 0 : return NULL;
7479 : }
7480 :
7481 0 : state->out_mem_ctx = NULL;
7482 :
7483 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
7484 : NULL, &ndr_table_lsarpc,
7485 : NDR_LSA_ADDACCOUNTRIGHTS, state, r);
7486 0 : if (tevent_req_nomem(subreq, req)) {
7487 0 : return tevent_req_post(req, ev);
7488 : }
7489 0 : tevent_req_set_callback(subreq, dcerpc_lsa_AddAccountRights_r_done, req);
7490 :
7491 0 : return req;
7492 : }
7493 :
7494 0 : static void dcerpc_lsa_AddAccountRights_r_done(struct tevent_req *subreq)
7495 : {
7496 0 : struct tevent_req *req =
7497 0 : tevent_req_callback_data(subreq,
7498 : struct tevent_req);
7499 0 : NTSTATUS status;
7500 :
7501 0 : status = dcerpc_binding_handle_call_recv(subreq);
7502 0 : TALLOC_FREE(subreq);
7503 0 : if (tevent_req_nterror(req, status)) {
7504 0 : return;
7505 : }
7506 :
7507 0 : tevent_req_done(req);
7508 : }
7509 :
7510 0 : NTSTATUS dcerpc_lsa_AddAccountRights_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
7511 : {
7512 0 : struct dcerpc_lsa_AddAccountRights_r_state *state =
7513 0 : tevent_req_data(req,
7514 : struct dcerpc_lsa_AddAccountRights_r_state);
7515 0 : NTSTATUS status;
7516 :
7517 0 : if (tevent_req_is_nterror(req, &status)) {
7518 0 : tevent_req_received(req);
7519 0 : return status;
7520 : }
7521 :
7522 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7523 :
7524 0 : tevent_req_received(req);
7525 0 : return NT_STATUS_OK;
7526 : }
7527 :
7528 36 : NTSTATUS dcerpc_lsa_AddAccountRights_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_AddAccountRights *r)
7529 : {
7530 0 : NTSTATUS status;
7531 :
7532 36 : status = dcerpc_binding_handle_call(h,
7533 : NULL, &ndr_table_lsarpc,
7534 : NDR_LSA_ADDACCOUNTRIGHTS, mem_ctx, r);
7535 :
7536 36 : return status;
7537 : }
7538 :
7539 : struct dcerpc_lsa_AddAccountRights_state {
7540 : struct lsa_AddAccountRights orig;
7541 : struct lsa_AddAccountRights tmp;
7542 : TALLOC_CTX *out_mem_ctx;
7543 : };
7544 :
7545 : static void dcerpc_lsa_AddAccountRights_done(struct tevent_req *subreq);
7546 :
7547 0 : struct tevent_req *dcerpc_lsa_AddAccountRights_send(TALLOC_CTX *mem_ctx,
7548 : struct tevent_context *ev,
7549 : struct dcerpc_binding_handle *h,
7550 : struct policy_handle *_handle /* [in] [ref] */,
7551 : struct dom_sid2 *_sid /* [in] [ref] */,
7552 : struct lsa_RightSet *_rights /* [in] [ref] */)
7553 : {
7554 0 : struct tevent_req *req;
7555 0 : struct dcerpc_lsa_AddAccountRights_state *state;
7556 0 : struct tevent_req *subreq;
7557 :
7558 0 : req = tevent_req_create(mem_ctx, &state,
7559 : struct dcerpc_lsa_AddAccountRights_state);
7560 0 : if (req == NULL) {
7561 0 : return NULL;
7562 : }
7563 0 : state->out_mem_ctx = NULL;
7564 :
7565 : /* In parameters */
7566 0 : state->orig.in.handle = _handle;
7567 0 : state->orig.in.sid = _sid;
7568 0 : state->orig.in.rights = _rights;
7569 :
7570 : /* Out parameters */
7571 :
7572 : /* Result */
7573 0 : NDR_ZERO_STRUCT(state->orig.out.result);
7574 :
7575 : /* make a temporary copy, that we pass to the dispatch function */
7576 0 : state->tmp = state->orig;
7577 :
7578 0 : subreq = dcerpc_lsa_AddAccountRights_r_send(state, ev, h, &state->tmp);
7579 0 : if (tevent_req_nomem(subreq, req)) {
7580 0 : return tevent_req_post(req, ev);
7581 : }
7582 0 : tevent_req_set_callback(subreq, dcerpc_lsa_AddAccountRights_done, req);
7583 0 : return req;
7584 : }
7585 :
7586 0 : static void dcerpc_lsa_AddAccountRights_done(struct tevent_req *subreq)
7587 : {
7588 0 : struct tevent_req *req = tevent_req_callback_data(
7589 : subreq, struct tevent_req);
7590 0 : struct dcerpc_lsa_AddAccountRights_state *state = tevent_req_data(
7591 : req, struct dcerpc_lsa_AddAccountRights_state);
7592 0 : NTSTATUS status;
7593 0 : TALLOC_CTX *mem_ctx;
7594 :
7595 0 : if (state->out_mem_ctx) {
7596 0 : mem_ctx = state->out_mem_ctx;
7597 : } else {
7598 0 : mem_ctx = state;
7599 : }
7600 :
7601 0 : status = dcerpc_lsa_AddAccountRights_r_recv(subreq, mem_ctx);
7602 0 : TALLOC_FREE(subreq);
7603 0 : if (tevent_req_nterror(req, status)) {
7604 0 : return;
7605 : }
7606 :
7607 : /* Copy out parameters */
7608 :
7609 : /* Copy result */
7610 0 : state->orig.out.result = state->tmp.out.result;
7611 :
7612 : /* Reset temporary structure */
7613 0 : NDR_ZERO_STRUCT(state->tmp);
7614 :
7615 0 : tevent_req_done(req);
7616 : }
7617 :
7618 0 : NTSTATUS dcerpc_lsa_AddAccountRights_recv(struct tevent_req *req,
7619 : TALLOC_CTX *mem_ctx,
7620 : NTSTATUS *result)
7621 : {
7622 0 : struct dcerpc_lsa_AddAccountRights_state *state = tevent_req_data(
7623 : req, struct dcerpc_lsa_AddAccountRights_state);
7624 0 : NTSTATUS status;
7625 :
7626 0 : if (tevent_req_is_nterror(req, &status)) {
7627 0 : tevent_req_received(req);
7628 0 : return status;
7629 : }
7630 :
7631 : /* Steal possible out parameters to the callers context */
7632 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7633 :
7634 : /* Return result */
7635 0 : *result = state->orig.out.result;
7636 :
7637 0 : tevent_req_received(req);
7638 0 : return NT_STATUS_OK;
7639 : }
7640 :
7641 20 : NTSTATUS dcerpc_lsa_AddAccountRights(struct dcerpc_binding_handle *h,
7642 : TALLOC_CTX *mem_ctx,
7643 : struct policy_handle *_handle /* [in] [ref] */,
7644 : struct dom_sid2 *_sid /* [in] [ref] */,
7645 : struct lsa_RightSet *_rights /* [in] [ref] */,
7646 : NTSTATUS *result)
7647 : {
7648 0 : struct lsa_AddAccountRights r;
7649 0 : NTSTATUS status;
7650 :
7651 : /* In parameters */
7652 20 : r.in.handle = _handle;
7653 20 : r.in.sid = _sid;
7654 20 : r.in.rights = _rights;
7655 :
7656 : /* Out parameters */
7657 :
7658 : /* Result */
7659 20 : NDR_ZERO_STRUCT(r.out.result);
7660 :
7661 20 : status = dcerpc_lsa_AddAccountRights_r(h, mem_ctx, &r);
7662 20 : if (!NT_STATUS_IS_OK(status)) {
7663 0 : return status;
7664 : }
7665 :
7666 : /* Return variables */
7667 :
7668 : /* Return result */
7669 20 : *result = r.out.result;
7670 :
7671 20 : return NT_STATUS_OK;
7672 : }
7673 :
7674 : struct dcerpc_lsa_RemoveAccountRights_r_state {
7675 : TALLOC_CTX *out_mem_ctx;
7676 : };
7677 :
7678 : static void dcerpc_lsa_RemoveAccountRights_r_done(struct tevent_req *subreq);
7679 :
7680 0 : struct tevent_req *dcerpc_lsa_RemoveAccountRights_r_send(TALLOC_CTX *mem_ctx,
7681 : struct tevent_context *ev,
7682 : struct dcerpc_binding_handle *h,
7683 : struct lsa_RemoveAccountRights *r)
7684 : {
7685 0 : struct tevent_req *req;
7686 0 : struct dcerpc_lsa_RemoveAccountRights_r_state *state;
7687 0 : struct tevent_req *subreq;
7688 :
7689 0 : req = tevent_req_create(mem_ctx, &state,
7690 : struct dcerpc_lsa_RemoveAccountRights_r_state);
7691 0 : if (req == NULL) {
7692 0 : return NULL;
7693 : }
7694 :
7695 0 : state->out_mem_ctx = NULL;
7696 :
7697 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
7698 : NULL, &ndr_table_lsarpc,
7699 : NDR_LSA_REMOVEACCOUNTRIGHTS, state, r);
7700 0 : if (tevent_req_nomem(subreq, req)) {
7701 0 : return tevent_req_post(req, ev);
7702 : }
7703 0 : tevent_req_set_callback(subreq, dcerpc_lsa_RemoveAccountRights_r_done, req);
7704 :
7705 0 : return req;
7706 : }
7707 :
7708 0 : static void dcerpc_lsa_RemoveAccountRights_r_done(struct tevent_req *subreq)
7709 : {
7710 0 : struct tevent_req *req =
7711 0 : tevent_req_callback_data(subreq,
7712 : struct tevent_req);
7713 0 : NTSTATUS status;
7714 :
7715 0 : status = dcerpc_binding_handle_call_recv(subreq);
7716 0 : TALLOC_FREE(subreq);
7717 0 : if (tevent_req_nterror(req, status)) {
7718 0 : return;
7719 : }
7720 :
7721 0 : tevent_req_done(req);
7722 : }
7723 :
7724 0 : NTSTATUS dcerpc_lsa_RemoveAccountRights_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
7725 : {
7726 0 : struct dcerpc_lsa_RemoveAccountRights_r_state *state =
7727 0 : tevent_req_data(req,
7728 : struct dcerpc_lsa_RemoveAccountRights_r_state);
7729 0 : NTSTATUS status;
7730 :
7731 0 : if (tevent_req_is_nterror(req, &status)) {
7732 0 : tevent_req_received(req);
7733 0 : return status;
7734 : }
7735 :
7736 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7737 :
7738 0 : tevent_req_received(req);
7739 0 : return NT_STATUS_OK;
7740 : }
7741 :
7742 20 : NTSTATUS dcerpc_lsa_RemoveAccountRights_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_RemoveAccountRights *r)
7743 : {
7744 0 : NTSTATUS status;
7745 :
7746 20 : status = dcerpc_binding_handle_call(h,
7747 : NULL, &ndr_table_lsarpc,
7748 : NDR_LSA_REMOVEACCOUNTRIGHTS, mem_ctx, r);
7749 :
7750 20 : return status;
7751 : }
7752 :
7753 : struct dcerpc_lsa_RemoveAccountRights_state {
7754 : struct lsa_RemoveAccountRights orig;
7755 : struct lsa_RemoveAccountRights tmp;
7756 : TALLOC_CTX *out_mem_ctx;
7757 : };
7758 :
7759 : static void dcerpc_lsa_RemoveAccountRights_done(struct tevent_req *subreq);
7760 :
7761 0 : struct tevent_req *dcerpc_lsa_RemoveAccountRights_send(TALLOC_CTX *mem_ctx,
7762 : struct tevent_context *ev,
7763 : struct dcerpc_binding_handle *h,
7764 : struct policy_handle *_handle /* [in] [ref] */,
7765 : struct dom_sid2 *_sid /* [in] [ref] */,
7766 : uint8_t _remove_all /* [in] */,
7767 : struct lsa_RightSet *_rights /* [in] [ref] */)
7768 : {
7769 0 : struct tevent_req *req;
7770 0 : struct dcerpc_lsa_RemoveAccountRights_state *state;
7771 0 : struct tevent_req *subreq;
7772 :
7773 0 : req = tevent_req_create(mem_ctx, &state,
7774 : struct dcerpc_lsa_RemoveAccountRights_state);
7775 0 : if (req == NULL) {
7776 0 : return NULL;
7777 : }
7778 0 : state->out_mem_ctx = NULL;
7779 :
7780 : /* In parameters */
7781 0 : state->orig.in.handle = _handle;
7782 0 : state->orig.in.sid = _sid;
7783 0 : state->orig.in.remove_all = _remove_all;
7784 0 : state->orig.in.rights = _rights;
7785 :
7786 : /* Out parameters */
7787 :
7788 : /* Result */
7789 0 : NDR_ZERO_STRUCT(state->orig.out.result);
7790 :
7791 : /* make a temporary copy, that we pass to the dispatch function */
7792 0 : state->tmp = state->orig;
7793 :
7794 0 : subreq = dcerpc_lsa_RemoveAccountRights_r_send(state, ev, h, &state->tmp);
7795 0 : if (tevent_req_nomem(subreq, req)) {
7796 0 : return tevent_req_post(req, ev);
7797 : }
7798 0 : tevent_req_set_callback(subreq, dcerpc_lsa_RemoveAccountRights_done, req);
7799 0 : return req;
7800 : }
7801 :
7802 0 : static void dcerpc_lsa_RemoveAccountRights_done(struct tevent_req *subreq)
7803 : {
7804 0 : struct tevent_req *req = tevent_req_callback_data(
7805 : subreq, struct tevent_req);
7806 0 : struct dcerpc_lsa_RemoveAccountRights_state *state = tevent_req_data(
7807 : req, struct dcerpc_lsa_RemoveAccountRights_state);
7808 0 : NTSTATUS status;
7809 0 : TALLOC_CTX *mem_ctx;
7810 :
7811 0 : if (state->out_mem_ctx) {
7812 0 : mem_ctx = state->out_mem_ctx;
7813 : } else {
7814 0 : mem_ctx = state;
7815 : }
7816 :
7817 0 : status = dcerpc_lsa_RemoveAccountRights_r_recv(subreq, mem_ctx);
7818 0 : TALLOC_FREE(subreq);
7819 0 : if (tevent_req_nterror(req, status)) {
7820 0 : return;
7821 : }
7822 :
7823 : /* Copy out parameters */
7824 :
7825 : /* Copy result */
7826 0 : state->orig.out.result = state->tmp.out.result;
7827 :
7828 : /* Reset temporary structure */
7829 0 : NDR_ZERO_STRUCT(state->tmp);
7830 :
7831 0 : tevent_req_done(req);
7832 : }
7833 :
7834 0 : NTSTATUS dcerpc_lsa_RemoveAccountRights_recv(struct tevent_req *req,
7835 : TALLOC_CTX *mem_ctx,
7836 : NTSTATUS *result)
7837 : {
7838 0 : struct dcerpc_lsa_RemoveAccountRights_state *state = tevent_req_data(
7839 : req, struct dcerpc_lsa_RemoveAccountRights_state);
7840 0 : NTSTATUS status;
7841 :
7842 0 : if (tevent_req_is_nterror(req, &status)) {
7843 0 : tevent_req_received(req);
7844 0 : return status;
7845 : }
7846 :
7847 : /* Steal possible out parameters to the callers context */
7848 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7849 :
7850 : /* Return result */
7851 0 : *result = state->orig.out.result;
7852 :
7853 0 : tevent_req_received(req);
7854 0 : return NT_STATUS_OK;
7855 : }
7856 :
7857 20 : NTSTATUS dcerpc_lsa_RemoveAccountRights(struct dcerpc_binding_handle *h,
7858 : TALLOC_CTX *mem_ctx,
7859 : struct policy_handle *_handle /* [in] [ref] */,
7860 : struct dom_sid2 *_sid /* [in] [ref] */,
7861 : uint8_t _remove_all /* [in] */,
7862 : struct lsa_RightSet *_rights /* [in] [ref] */,
7863 : NTSTATUS *result)
7864 : {
7865 0 : struct lsa_RemoveAccountRights r;
7866 0 : NTSTATUS status;
7867 :
7868 : /* In parameters */
7869 20 : r.in.handle = _handle;
7870 20 : r.in.sid = _sid;
7871 20 : r.in.remove_all = _remove_all;
7872 20 : r.in.rights = _rights;
7873 :
7874 : /* Out parameters */
7875 :
7876 : /* Result */
7877 20 : NDR_ZERO_STRUCT(r.out.result);
7878 :
7879 20 : status = dcerpc_lsa_RemoveAccountRights_r(h, mem_ctx, &r);
7880 20 : if (!NT_STATUS_IS_OK(status)) {
7881 0 : return status;
7882 : }
7883 :
7884 : /* Return variables */
7885 :
7886 : /* Return result */
7887 20 : *result = r.out.result;
7888 :
7889 20 : return NT_STATUS_OK;
7890 : }
7891 :
7892 : struct dcerpc_lsa_QueryTrustedDomainInfoBySid_r_state {
7893 : TALLOC_CTX *out_mem_ctx;
7894 : };
7895 :
7896 : static void dcerpc_lsa_QueryTrustedDomainInfoBySid_r_done(struct tevent_req *subreq);
7897 :
7898 0 : struct tevent_req *dcerpc_lsa_QueryTrustedDomainInfoBySid_r_send(TALLOC_CTX *mem_ctx,
7899 : struct tevent_context *ev,
7900 : struct dcerpc_binding_handle *h,
7901 : struct lsa_QueryTrustedDomainInfoBySid *r)
7902 : {
7903 0 : struct tevent_req *req;
7904 0 : struct dcerpc_lsa_QueryTrustedDomainInfoBySid_r_state *state;
7905 0 : struct tevent_req *subreq;
7906 :
7907 0 : req = tevent_req_create(mem_ctx, &state,
7908 : struct dcerpc_lsa_QueryTrustedDomainInfoBySid_r_state);
7909 0 : if (req == NULL) {
7910 0 : return NULL;
7911 : }
7912 :
7913 0 : state->out_mem_ctx = talloc_new(state);
7914 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
7915 0 : return tevent_req_post(req, ev);
7916 : }
7917 :
7918 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
7919 : NULL, &ndr_table_lsarpc,
7920 0 : NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID, state->out_mem_ctx, r);
7921 0 : if (tevent_req_nomem(subreq, req)) {
7922 0 : return tevent_req_post(req, ev);
7923 : }
7924 0 : tevent_req_set_callback(subreq, dcerpc_lsa_QueryTrustedDomainInfoBySid_r_done, req);
7925 :
7926 0 : return req;
7927 : }
7928 :
7929 0 : static void dcerpc_lsa_QueryTrustedDomainInfoBySid_r_done(struct tevent_req *subreq)
7930 : {
7931 0 : struct tevent_req *req =
7932 0 : tevent_req_callback_data(subreq,
7933 : struct tevent_req);
7934 0 : NTSTATUS status;
7935 :
7936 0 : status = dcerpc_binding_handle_call_recv(subreq);
7937 0 : TALLOC_FREE(subreq);
7938 0 : if (tevent_req_nterror(req, status)) {
7939 0 : return;
7940 : }
7941 :
7942 0 : tevent_req_done(req);
7943 : }
7944 :
7945 0 : NTSTATUS dcerpc_lsa_QueryTrustedDomainInfoBySid_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
7946 : {
7947 0 : struct dcerpc_lsa_QueryTrustedDomainInfoBySid_r_state *state =
7948 0 : tevent_req_data(req,
7949 : struct dcerpc_lsa_QueryTrustedDomainInfoBySid_r_state);
7950 0 : NTSTATUS status;
7951 :
7952 0 : if (tevent_req_is_nterror(req, &status)) {
7953 0 : tevent_req_received(req);
7954 0 : return status;
7955 : }
7956 :
7957 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7958 :
7959 0 : tevent_req_received(req);
7960 0 : return NT_STATUS_OK;
7961 : }
7962 :
7963 1873 : NTSTATUS dcerpc_lsa_QueryTrustedDomainInfoBySid_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_QueryTrustedDomainInfoBySid *r)
7964 : {
7965 0 : NTSTATUS status;
7966 :
7967 1873 : status = dcerpc_binding_handle_call(h,
7968 : NULL, &ndr_table_lsarpc,
7969 : NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID, mem_ctx, r);
7970 :
7971 1873 : return status;
7972 : }
7973 :
7974 : struct dcerpc_lsa_QueryTrustedDomainInfoBySid_state {
7975 : struct lsa_QueryTrustedDomainInfoBySid orig;
7976 : struct lsa_QueryTrustedDomainInfoBySid tmp;
7977 : TALLOC_CTX *out_mem_ctx;
7978 : };
7979 :
7980 : static void dcerpc_lsa_QueryTrustedDomainInfoBySid_done(struct tevent_req *subreq);
7981 :
7982 0 : struct tevent_req *dcerpc_lsa_QueryTrustedDomainInfoBySid_send(TALLOC_CTX *mem_ctx,
7983 : struct tevent_context *ev,
7984 : struct dcerpc_binding_handle *h,
7985 : struct policy_handle *_handle /* [in] [ref] */,
7986 : struct dom_sid2 *_dom_sid /* [in] [ref] */,
7987 : enum lsa_TrustDomInfoEnum _level /* [in] */,
7988 : union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */)
7989 : {
7990 0 : struct tevent_req *req;
7991 0 : struct dcerpc_lsa_QueryTrustedDomainInfoBySid_state *state;
7992 0 : struct tevent_req *subreq;
7993 :
7994 0 : req = tevent_req_create(mem_ctx, &state,
7995 : struct dcerpc_lsa_QueryTrustedDomainInfoBySid_state);
7996 0 : if (req == NULL) {
7997 0 : return NULL;
7998 : }
7999 0 : state->out_mem_ctx = NULL;
8000 :
8001 : /* In parameters */
8002 0 : state->orig.in.handle = _handle;
8003 0 : state->orig.in.dom_sid = _dom_sid;
8004 0 : state->orig.in.level = _level;
8005 :
8006 : /* Out parameters */
8007 0 : state->orig.out.info = _info;
8008 :
8009 : /* Result */
8010 0 : NDR_ZERO_STRUCT(state->orig.out.result);
8011 :
8012 0 : state->out_mem_ctx = talloc_named_const(state, 0,
8013 : "dcerpc_lsa_QueryTrustedDomainInfoBySid_out_memory");
8014 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
8015 0 : return tevent_req_post(req, ev);
8016 : }
8017 :
8018 : /* make a temporary copy, that we pass to the dispatch function */
8019 0 : state->tmp = state->orig;
8020 :
8021 0 : subreq = dcerpc_lsa_QueryTrustedDomainInfoBySid_r_send(state, ev, h, &state->tmp);
8022 0 : if (tevent_req_nomem(subreq, req)) {
8023 0 : return tevent_req_post(req, ev);
8024 : }
8025 0 : tevent_req_set_callback(subreq, dcerpc_lsa_QueryTrustedDomainInfoBySid_done, req);
8026 0 : return req;
8027 : }
8028 :
8029 0 : static void dcerpc_lsa_QueryTrustedDomainInfoBySid_done(struct tevent_req *subreq)
8030 : {
8031 0 : struct tevent_req *req = tevent_req_callback_data(
8032 : subreq, struct tevent_req);
8033 0 : struct dcerpc_lsa_QueryTrustedDomainInfoBySid_state *state = tevent_req_data(
8034 : req, struct dcerpc_lsa_QueryTrustedDomainInfoBySid_state);
8035 0 : NTSTATUS status;
8036 0 : TALLOC_CTX *mem_ctx;
8037 :
8038 0 : if (state->out_mem_ctx) {
8039 0 : mem_ctx = state->out_mem_ctx;
8040 : } else {
8041 0 : mem_ctx = state;
8042 : }
8043 :
8044 0 : status = dcerpc_lsa_QueryTrustedDomainInfoBySid_r_recv(subreq, mem_ctx);
8045 0 : TALLOC_FREE(subreq);
8046 0 : if (tevent_req_nterror(req, status)) {
8047 0 : return;
8048 : }
8049 :
8050 : /* Copy out parameters */
8051 0 : *state->orig.out.info = *state->tmp.out.info;
8052 :
8053 : /* Copy result */
8054 0 : state->orig.out.result = state->tmp.out.result;
8055 :
8056 : /* Reset temporary structure */
8057 0 : NDR_ZERO_STRUCT(state->tmp);
8058 :
8059 0 : tevent_req_done(req);
8060 : }
8061 :
8062 0 : NTSTATUS dcerpc_lsa_QueryTrustedDomainInfoBySid_recv(struct tevent_req *req,
8063 : TALLOC_CTX *mem_ctx,
8064 : NTSTATUS *result)
8065 : {
8066 0 : struct dcerpc_lsa_QueryTrustedDomainInfoBySid_state *state = tevent_req_data(
8067 : req, struct dcerpc_lsa_QueryTrustedDomainInfoBySid_state);
8068 0 : NTSTATUS status;
8069 :
8070 0 : if (tevent_req_is_nterror(req, &status)) {
8071 0 : tevent_req_received(req);
8072 0 : return status;
8073 : }
8074 :
8075 : /* Steal possible out parameters to the callers context */
8076 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8077 :
8078 : /* Return result */
8079 0 : *result = state->orig.out.result;
8080 :
8081 0 : tevent_req_received(req);
8082 0 : return NT_STATUS_OK;
8083 : }
8084 :
8085 0 : NTSTATUS dcerpc_lsa_QueryTrustedDomainInfoBySid(struct dcerpc_binding_handle *h,
8086 : TALLOC_CTX *mem_ctx,
8087 : struct policy_handle *_handle /* [in] [ref] */,
8088 : struct dom_sid2 *_dom_sid /* [in] [ref] */,
8089 : enum lsa_TrustDomInfoEnum _level /* [in] */,
8090 : union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */,
8091 : NTSTATUS *result)
8092 : {
8093 0 : struct lsa_QueryTrustedDomainInfoBySid r;
8094 0 : NTSTATUS status;
8095 :
8096 : /* In parameters */
8097 0 : r.in.handle = _handle;
8098 0 : r.in.dom_sid = _dom_sid;
8099 0 : r.in.level = _level;
8100 :
8101 : /* Out parameters */
8102 0 : r.out.info = _info;
8103 :
8104 : /* Result */
8105 0 : NDR_ZERO_STRUCT(r.out.result);
8106 :
8107 0 : status = dcerpc_lsa_QueryTrustedDomainInfoBySid_r(h, mem_ctx, &r);
8108 0 : if (!NT_STATUS_IS_OK(status)) {
8109 0 : return status;
8110 : }
8111 :
8112 : /* Return variables */
8113 0 : *_info = *r.out.info;
8114 :
8115 : /* Return result */
8116 0 : *result = r.out.result;
8117 :
8118 0 : return NT_STATUS_OK;
8119 : }
8120 :
8121 : struct dcerpc_lsa_SetTrustedDomainInfo_r_state {
8122 : TALLOC_CTX *out_mem_ctx;
8123 : };
8124 :
8125 : static void dcerpc_lsa_SetTrustedDomainInfo_r_done(struct tevent_req *subreq);
8126 :
8127 0 : struct tevent_req *dcerpc_lsa_SetTrustedDomainInfo_r_send(TALLOC_CTX *mem_ctx,
8128 : struct tevent_context *ev,
8129 : struct dcerpc_binding_handle *h,
8130 : struct lsa_SetTrustedDomainInfo *r)
8131 : {
8132 0 : struct tevent_req *req;
8133 0 : struct dcerpc_lsa_SetTrustedDomainInfo_r_state *state;
8134 0 : struct tevent_req *subreq;
8135 :
8136 0 : req = tevent_req_create(mem_ctx, &state,
8137 : struct dcerpc_lsa_SetTrustedDomainInfo_r_state);
8138 0 : if (req == NULL) {
8139 0 : return NULL;
8140 : }
8141 :
8142 0 : state->out_mem_ctx = NULL;
8143 :
8144 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
8145 : NULL, &ndr_table_lsarpc,
8146 : NDR_LSA_SETTRUSTEDDOMAININFO, state, r);
8147 0 : if (tevent_req_nomem(subreq, req)) {
8148 0 : return tevent_req_post(req, ev);
8149 : }
8150 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetTrustedDomainInfo_r_done, req);
8151 :
8152 0 : return req;
8153 : }
8154 :
8155 0 : static void dcerpc_lsa_SetTrustedDomainInfo_r_done(struct tevent_req *subreq)
8156 : {
8157 0 : struct tevent_req *req =
8158 0 : tevent_req_callback_data(subreq,
8159 : struct tevent_req);
8160 0 : NTSTATUS status;
8161 :
8162 0 : status = dcerpc_binding_handle_call_recv(subreq);
8163 0 : TALLOC_FREE(subreq);
8164 0 : if (tevent_req_nterror(req, status)) {
8165 0 : return;
8166 : }
8167 :
8168 0 : tevent_req_done(req);
8169 : }
8170 :
8171 0 : NTSTATUS dcerpc_lsa_SetTrustedDomainInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
8172 : {
8173 0 : struct dcerpc_lsa_SetTrustedDomainInfo_r_state *state =
8174 0 : tevent_req_data(req,
8175 : struct dcerpc_lsa_SetTrustedDomainInfo_r_state);
8176 0 : NTSTATUS status;
8177 :
8178 0 : if (tevent_req_is_nterror(req, &status)) {
8179 0 : tevent_req_received(req);
8180 0 : return status;
8181 : }
8182 :
8183 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8184 :
8185 0 : tevent_req_received(req);
8186 0 : return NT_STATUS_OK;
8187 : }
8188 :
8189 0 : NTSTATUS dcerpc_lsa_SetTrustedDomainInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_SetTrustedDomainInfo *r)
8190 : {
8191 0 : NTSTATUS status;
8192 :
8193 0 : status = dcerpc_binding_handle_call(h,
8194 : NULL, &ndr_table_lsarpc,
8195 : NDR_LSA_SETTRUSTEDDOMAININFO, mem_ctx, r);
8196 :
8197 0 : return status;
8198 : }
8199 :
8200 : struct dcerpc_lsa_SetTrustedDomainInfo_state {
8201 : struct lsa_SetTrustedDomainInfo orig;
8202 : struct lsa_SetTrustedDomainInfo tmp;
8203 : TALLOC_CTX *out_mem_ctx;
8204 : };
8205 :
8206 : static void dcerpc_lsa_SetTrustedDomainInfo_done(struct tevent_req *subreq);
8207 :
8208 0 : struct tevent_req *dcerpc_lsa_SetTrustedDomainInfo_send(TALLOC_CTX *mem_ctx,
8209 : struct tevent_context *ev,
8210 : struct dcerpc_binding_handle *h,
8211 : struct policy_handle *_handle /* [in] [ref] */,
8212 : struct dom_sid2 *_dom_sid /* [in] [ref] */,
8213 : enum lsa_TrustDomInfoEnum _level /* [in] */,
8214 : union lsa_TrustedDomainInfo *_info /* [in] [ref,switch_is(level)] */)
8215 : {
8216 0 : struct tevent_req *req;
8217 0 : struct dcerpc_lsa_SetTrustedDomainInfo_state *state;
8218 0 : struct tevent_req *subreq;
8219 :
8220 0 : req = tevent_req_create(mem_ctx, &state,
8221 : struct dcerpc_lsa_SetTrustedDomainInfo_state);
8222 0 : if (req == NULL) {
8223 0 : return NULL;
8224 : }
8225 0 : state->out_mem_ctx = NULL;
8226 :
8227 : /* In parameters */
8228 0 : state->orig.in.handle = _handle;
8229 0 : state->orig.in.dom_sid = _dom_sid;
8230 0 : state->orig.in.level = _level;
8231 0 : state->orig.in.info = _info;
8232 :
8233 : /* Out parameters */
8234 :
8235 : /* Result */
8236 0 : NDR_ZERO_STRUCT(state->orig.out.result);
8237 :
8238 : /* make a temporary copy, that we pass to the dispatch function */
8239 0 : state->tmp = state->orig;
8240 :
8241 0 : subreq = dcerpc_lsa_SetTrustedDomainInfo_r_send(state, ev, h, &state->tmp);
8242 0 : if (tevent_req_nomem(subreq, req)) {
8243 0 : return tevent_req_post(req, ev);
8244 : }
8245 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetTrustedDomainInfo_done, req);
8246 0 : return req;
8247 : }
8248 :
8249 0 : static void dcerpc_lsa_SetTrustedDomainInfo_done(struct tevent_req *subreq)
8250 : {
8251 0 : struct tevent_req *req = tevent_req_callback_data(
8252 : subreq, struct tevent_req);
8253 0 : struct dcerpc_lsa_SetTrustedDomainInfo_state *state = tevent_req_data(
8254 : req, struct dcerpc_lsa_SetTrustedDomainInfo_state);
8255 0 : NTSTATUS status;
8256 0 : TALLOC_CTX *mem_ctx;
8257 :
8258 0 : if (state->out_mem_ctx) {
8259 0 : mem_ctx = state->out_mem_ctx;
8260 : } else {
8261 0 : mem_ctx = state;
8262 : }
8263 :
8264 0 : status = dcerpc_lsa_SetTrustedDomainInfo_r_recv(subreq, mem_ctx);
8265 0 : TALLOC_FREE(subreq);
8266 0 : if (tevent_req_nterror(req, status)) {
8267 0 : return;
8268 : }
8269 :
8270 : /* Copy out parameters */
8271 :
8272 : /* Copy result */
8273 0 : state->orig.out.result = state->tmp.out.result;
8274 :
8275 : /* Reset temporary structure */
8276 0 : NDR_ZERO_STRUCT(state->tmp);
8277 :
8278 0 : tevent_req_done(req);
8279 : }
8280 :
8281 0 : NTSTATUS dcerpc_lsa_SetTrustedDomainInfo_recv(struct tevent_req *req,
8282 : TALLOC_CTX *mem_ctx,
8283 : NTSTATUS *result)
8284 : {
8285 0 : struct dcerpc_lsa_SetTrustedDomainInfo_state *state = tevent_req_data(
8286 : req, struct dcerpc_lsa_SetTrustedDomainInfo_state);
8287 0 : NTSTATUS status;
8288 :
8289 0 : if (tevent_req_is_nterror(req, &status)) {
8290 0 : tevent_req_received(req);
8291 0 : return status;
8292 : }
8293 :
8294 : /* Steal possible out parameters to the callers context */
8295 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8296 :
8297 : /* Return result */
8298 0 : *result = state->orig.out.result;
8299 :
8300 0 : tevent_req_received(req);
8301 0 : return NT_STATUS_OK;
8302 : }
8303 :
8304 0 : NTSTATUS dcerpc_lsa_SetTrustedDomainInfo(struct dcerpc_binding_handle *h,
8305 : TALLOC_CTX *mem_ctx,
8306 : struct policy_handle *_handle /* [in] [ref] */,
8307 : struct dom_sid2 *_dom_sid /* [in] [ref] */,
8308 : enum lsa_TrustDomInfoEnum _level /* [in] */,
8309 : union lsa_TrustedDomainInfo *_info /* [in] [ref,switch_is(level)] */,
8310 : NTSTATUS *result)
8311 : {
8312 0 : struct lsa_SetTrustedDomainInfo r;
8313 0 : NTSTATUS status;
8314 :
8315 : /* In parameters */
8316 0 : r.in.handle = _handle;
8317 0 : r.in.dom_sid = _dom_sid;
8318 0 : r.in.level = _level;
8319 0 : r.in.info = _info;
8320 :
8321 : /* Out parameters */
8322 :
8323 : /* Result */
8324 0 : NDR_ZERO_STRUCT(r.out.result);
8325 :
8326 0 : status = dcerpc_lsa_SetTrustedDomainInfo_r(h, mem_ctx, &r);
8327 0 : if (!NT_STATUS_IS_OK(status)) {
8328 0 : return status;
8329 : }
8330 :
8331 : /* Return variables */
8332 :
8333 : /* Return result */
8334 0 : *result = r.out.result;
8335 :
8336 0 : return NT_STATUS_OK;
8337 : }
8338 :
8339 : struct dcerpc_lsa_DeleteTrustedDomain_r_state {
8340 : TALLOC_CTX *out_mem_ctx;
8341 : };
8342 :
8343 : static void dcerpc_lsa_DeleteTrustedDomain_r_done(struct tevent_req *subreq);
8344 :
8345 0 : struct tevent_req *dcerpc_lsa_DeleteTrustedDomain_r_send(TALLOC_CTX *mem_ctx,
8346 : struct tevent_context *ev,
8347 : struct dcerpc_binding_handle *h,
8348 : struct lsa_DeleteTrustedDomain *r)
8349 : {
8350 0 : struct tevent_req *req;
8351 0 : struct dcerpc_lsa_DeleteTrustedDomain_r_state *state;
8352 0 : struct tevent_req *subreq;
8353 :
8354 0 : req = tevent_req_create(mem_ctx, &state,
8355 : struct dcerpc_lsa_DeleteTrustedDomain_r_state);
8356 0 : if (req == NULL) {
8357 0 : return NULL;
8358 : }
8359 :
8360 0 : state->out_mem_ctx = NULL;
8361 :
8362 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
8363 : NULL, &ndr_table_lsarpc,
8364 : NDR_LSA_DELETETRUSTEDDOMAIN, state, r);
8365 0 : if (tevent_req_nomem(subreq, req)) {
8366 0 : return tevent_req_post(req, ev);
8367 : }
8368 0 : tevent_req_set_callback(subreq, dcerpc_lsa_DeleteTrustedDomain_r_done, req);
8369 :
8370 0 : return req;
8371 : }
8372 :
8373 0 : static void dcerpc_lsa_DeleteTrustedDomain_r_done(struct tevent_req *subreq)
8374 : {
8375 0 : struct tevent_req *req =
8376 0 : tevent_req_callback_data(subreq,
8377 : struct tevent_req);
8378 0 : NTSTATUS status;
8379 :
8380 0 : status = dcerpc_binding_handle_call_recv(subreq);
8381 0 : TALLOC_FREE(subreq);
8382 0 : if (tevent_req_nterror(req, status)) {
8383 0 : return;
8384 : }
8385 :
8386 0 : tevent_req_done(req);
8387 : }
8388 :
8389 0 : NTSTATUS dcerpc_lsa_DeleteTrustedDomain_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
8390 : {
8391 0 : struct dcerpc_lsa_DeleteTrustedDomain_r_state *state =
8392 0 : tevent_req_data(req,
8393 : struct dcerpc_lsa_DeleteTrustedDomain_r_state);
8394 0 : NTSTATUS status;
8395 :
8396 0 : if (tevent_req_is_nterror(req, &status)) {
8397 0 : tevent_req_received(req);
8398 0 : return status;
8399 : }
8400 :
8401 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8402 :
8403 0 : tevent_req_received(req);
8404 0 : return NT_STATUS_OK;
8405 : }
8406 :
8407 149 : NTSTATUS dcerpc_lsa_DeleteTrustedDomain_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_DeleteTrustedDomain *r)
8408 : {
8409 0 : NTSTATUS status;
8410 :
8411 149 : status = dcerpc_binding_handle_call(h,
8412 : NULL, &ndr_table_lsarpc,
8413 : NDR_LSA_DELETETRUSTEDDOMAIN, mem_ctx, r);
8414 :
8415 149 : return status;
8416 : }
8417 :
8418 : struct dcerpc_lsa_DeleteTrustedDomain_state {
8419 : struct lsa_DeleteTrustedDomain orig;
8420 : struct lsa_DeleteTrustedDomain tmp;
8421 : TALLOC_CTX *out_mem_ctx;
8422 : };
8423 :
8424 : static void dcerpc_lsa_DeleteTrustedDomain_done(struct tevent_req *subreq);
8425 :
8426 0 : struct tevent_req *dcerpc_lsa_DeleteTrustedDomain_send(TALLOC_CTX *mem_ctx,
8427 : struct tevent_context *ev,
8428 : struct dcerpc_binding_handle *h,
8429 : struct policy_handle *_handle /* [in] [ref] */,
8430 : struct dom_sid2 *_dom_sid /* [in] [ref] */)
8431 : {
8432 0 : struct tevent_req *req;
8433 0 : struct dcerpc_lsa_DeleteTrustedDomain_state *state;
8434 0 : struct tevent_req *subreq;
8435 :
8436 0 : req = tevent_req_create(mem_ctx, &state,
8437 : struct dcerpc_lsa_DeleteTrustedDomain_state);
8438 0 : if (req == NULL) {
8439 0 : return NULL;
8440 : }
8441 0 : state->out_mem_ctx = NULL;
8442 :
8443 : /* In parameters */
8444 0 : state->orig.in.handle = _handle;
8445 0 : state->orig.in.dom_sid = _dom_sid;
8446 :
8447 : /* Out parameters */
8448 :
8449 : /* Result */
8450 0 : NDR_ZERO_STRUCT(state->orig.out.result);
8451 :
8452 : /* make a temporary copy, that we pass to the dispatch function */
8453 0 : state->tmp = state->orig;
8454 :
8455 0 : subreq = dcerpc_lsa_DeleteTrustedDomain_r_send(state, ev, h, &state->tmp);
8456 0 : if (tevent_req_nomem(subreq, req)) {
8457 0 : return tevent_req_post(req, ev);
8458 : }
8459 0 : tevent_req_set_callback(subreq, dcerpc_lsa_DeleteTrustedDomain_done, req);
8460 0 : return req;
8461 : }
8462 :
8463 0 : static void dcerpc_lsa_DeleteTrustedDomain_done(struct tevent_req *subreq)
8464 : {
8465 0 : struct tevent_req *req = tevent_req_callback_data(
8466 : subreq, struct tevent_req);
8467 0 : struct dcerpc_lsa_DeleteTrustedDomain_state *state = tevent_req_data(
8468 : req, struct dcerpc_lsa_DeleteTrustedDomain_state);
8469 0 : NTSTATUS status;
8470 0 : TALLOC_CTX *mem_ctx;
8471 :
8472 0 : if (state->out_mem_ctx) {
8473 0 : mem_ctx = state->out_mem_ctx;
8474 : } else {
8475 0 : mem_ctx = state;
8476 : }
8477 :
8478 0 : status = dcerpc_lsa_DeleteTrustedDomain_r_recv(subreq, mem_ctx);
8479 0 : TALLOC_FREE(subreq);
8480 0 : if (tevent_req_nterror(req, status)) {
8481 0 : return;
8482 : }
8483 :
8484 : /* Copy out parameters */
8485 :
8486 : /* Copy result */
8487 0 : state->orig.out.result = state->tmp.out.result;
8488 :
8489 : /* Reset temporary structure */
8490 0 : NDR_ZERO_STRUCT(state->tmp);
8491 :
8492 0 : tevent_req_done(req);
8493 : }
8494 :
8495 0 : NTSTATUS dcerpc_lsa_DeleteTrustedDomain_recv(struct tevent_req *req,
8496 : TALLOC_CTX *mem_ctx,
8497 : NTSTATUS *result)
8498 : {
8499 0 : struct dcerpc_lsa_DeleteTrustedDomain_state *state = tevent_req_data(
8500 : req, struct dcerpc_lsa_DeleteTrustedDomain_state);
8501 0 : NTSTATUS status;
8502 :
8503 0 : if (tevent_req_is_nterror(req, &status)) {
8504 0 : tevent_req_received(req);
8505 0 : return status;
8506 : }
8507 :
8508 : /* Steal possible out parameters to the callers context */
8509 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8510 :
8511 : /* Return result */
8512 0 : *result = state->orig.out.result;
8513 :
8514 0 : tevent_req_received(req);
8515 0 : return NT_STATUS_OK;
8516 : }
8517 :
8518 0 : NTSTATUS dcerpc_lsa_DeleteTrustedDomain(struct dcerpc_binding_handle *h,
8519 : TALLOC_CTX *mem_ctx,
8520 : struct policy_handle *_handle /* [in] [ref] */,
8521 : struct dom_sid2 *_dom_sid /* [in] [ref] */,
8522 : NTSTATUS *result)
8523 : {
8524 0 : struct lsa_DeleteTrustedDomain r;
8525 0 : NTSTATUS status;
8526 :
8527 : /* In parameters */
8528 0 : r.in.handle = _handle;
8529 0 : r.in.dom_sid = _dom_sid;
8530 :
8531 : /* Out parameters */
8532 :
8533 : /* Result */
8534 0 : NDR_ZERO_STRUCT(r.out.result);
8535 :
8536 0 : status = dcerpc_lsa_DeleteTrustedDomain_r(h, mem_ctx, &r);
8537 0 : if (!NT_STATUS_IS_OK(status)) {
8538 0 : return status;
8539 : }
8540 :
8541 : /* Return variables */
8542 :
8543 : /* Return result */
8544 0 : *result = r.out.result;
8545 :
8546 0 : return NT_STATUS_OK;
8547 : }
8548 :
8549 : struct dcerpc_lsa_StorePrivateData_r_state {
8550 : TALLOC_CTX *out_mem_ctx;
8551 : };
8552 :
8553 : static void dcerpc_lsa_StorePrivateData_r_done(struct tevent_req *subreq);
8554 :
8555 0 : struct tevent_req *dcerpc_lsa_StorePrivateData_r_send(TALLOC_CTX *mem_ctx,
8556 : struct tevent_context *ev,
8557 : struct dcerpc_binding_handle *h,
8558 : struct lsa_StorePrivateData *r)
8559 : {
8560 0 : struct tevent_req *req;
8561 0 : struct dcerpc_lsa_StorePrivateData_r_state *state;
8562 0 : struct tevent_req *subreq;
8563 :
8564 0 : req = tevent_req_create(mem_ctx, &state,
8565 : struct dcerpc_lsa_StorePrivateData_r_state);
8566 0 : if (req == NULL) {
8567 0 : return NULL;
8568 : }
8569 :
8570 0 : state->out_mem_ctx = NULL;
8571 :
8572 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
8573 : NULL, &ndr_table_lsarpc,
8574 : NDR_LSA_STOREPRIVATEDATA, state, r);
8575 0 : if (tevent_req_nomem(subreq, req)) {
8576 0 : return tevent_req_post(req, ev);
8577 : }
8578 0 : tevent_req_set_callback(subreq, dcerpc_lsa_StorePrivateData_r_done, req);
8579 :
8580 0 : return req;
8581 : }
8582 :
8583 0 : static void dcerpc_lsa_StorePrivateData_r_done(struct tevent_req *subreq)
8584 : {
8585 0 : struct tevent_req *req =
8586 0 : tevent_req_callback_data(subreq,
8587 : struct tevent_req);
8588 0 : NTSTATUS status;
8589 :
8590 0 : status = dcerpc_binding_handle_call_recv(subreq);
8591 0 : TALLOC_FREE(subreq);
8592 0 : if (tevent_req_nterror(req, status)) {
8593 0 : return;
8594 : }
8595 :
8596 0 : tevent_req_done(req);
8597 : }
8598 :
8599 0 : NTSTATUS dcerpc_lsa_StorePrivateData_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
8600 : {
8601 0 : struct dcerpc_lsa_StorePrivateData_r_state *state =
8602 0 : tevent_req_data(req,
8603 : struct dcerpc_lsa_StorePrivateData_r_state);
8604 0 : NTSTATUS status;
8605 :
8606 0 : if (tevent_req_is_nterror(req, &status)) {
8607 0 : tevent_req_received(req);
8608 0 : return status;
8609 : }
8610 :
8611 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8612 :
8613 0 : tevent_req_received(req);
8614 0 : return NT_STATUS_OK;
8615 : }
8616 :
8617 0 : NTSTATUS dcerpc_lsa_StorePrivateData_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_StorePrivateData *r)
8618 : {
8619 0 : NTSTATUS status;
8620 :
8621 0 : status = dcerpc_binding_handle_call(h,
8622 : NULL, &ndr_table_lsarpc,
8623 : NDR_LSA_STOREPRIVATEDATA, mem_ctx, r);
8624 :
8625 0 : return status;
8626 : }
8627 :
8628 : struct dcerpc_lsa_StorePrivateData_state {
8629 : struct lsa_StorePrivateData orig;
8630 : struct lsa_StorePrivateData tmp;
8631 : TALLOC_CTX *out_mem_ctx;
8632 : };
8633 :
8634 : static void dcerpc_lsa_StorePrivateData_done(struct tevent_req *subreq);
8635 :
8636 0 : struct tevent_req *dcerpc_lsa_StorePrivateData_send(TALLOC_CTX *mem_ctx,
8637 : struct tevent_context *ev,
8638 : struct dcerpc_binding_handle *h,
8639 : struct policy_handle *_handle /* [in] [ref] */,
8640 : struct lsa_String *_name /* [in] [ref] */,
8641 : struct lsa_DATA_BUF *_val /* [in] [unique] */)
8642 : {
8643 0 : struct tevent_req *req;
8644 0 : struct dcerpc_lsa_StorePrivateData_state *state;
8645 0 : struct tevent_req *subreq;
8646 :
8647 0 : req = tevent_req_create(mem_ctx, &state,
8648 : struct dcerpc_lsa_StorePrivateData_state);
8649 0 : if (req == NULL) {
8650 0 : return NULL;
8651 : }
8652 0 : state->out_mem_ctx = NULL;
8653 :
8654 : /* In parameters */
8655 0 : state->orig.in.handle = _handle;
8656 0 : state->orig.in.name = _name;
8657 0 : state->orig.in.val = _val;
8658 :
8659 : /* Out parameters */
8660 :
8661 : /* Result */
8662 0 : NDR_ZERO_STRUCT(state->orig.out.result);
8663 :
8664 : /* make a temporary copy, that we pass to the dispatch function */
8665 0 : state->tmp = state->orig;
8666 :
8667 0 : subreq = dcerpc_lsa_StorePrivateData_r_send(state, ev, h, &state->tmp);
8668 0 : if (tevent_req_nomem(subreq, req)) {
8669 0 : return tevent_req_post(req, ev);
8670 : }
8671 0 : tevent_req_set_callback(subreq, dcerpc_lsa_StorePrivateData_done, req);
8672 0 : return req;
8673 : }
8674 :
8675 0 : static void dcerpc_lsa_StorePrivateData_done(struct tevent_req *subreq)
8676 : {
8677 0 : struct tevent_req *req = tevent_req_callback_data(
8678 : subreq, struct tevent_req);
8679 0 : struct dcerpc_lsa_StorePrivateData_state *state = tevent_req_data(
8680 : req, struct dcerpc_lsa_StorePrivateData_state);
8681 0 : NTSTATUS status;
8682 0 : TALLOC_CTX *mem_ctx;
8683 :
8684 0 : if (state->out_mem_ctx) {
8685 0 : mem_ctx = state->out_mem_ctx;
8686 : } else {
8687 0 : mem_ctx = state;
8688 : }
8689 :
8690 0 : status = dcerpc_lsa_StorePrivateData_r_recv(subreq, mem_ctx);
8691 0 : TALLOC_FREE(subreq);
8692 0 : if (tevent_req_nterror(req, status)) {
8693 0 : return;
8694 : }
8695 :
8696 : /* Copy out parameters */
8697 :
8698 : /* Copy result */
8699 0 : state->orig.out.result = state->tmp.out.result;
8700 :
8701 : /* Reset temporary structure */
8702 0 : NDR_ZERO_STRUCT(state->tmp);
8703 :
8704 0 : tevent_req_done(req);
8705 : }
8706 :
8707 0 : NTSTATUS dcerpc_lsa_StorePrivateData_recv(struct tevent_req *req,
8708 : TALLOC_CTX *mem_ctx,
8709 : NTSTATUS *result)
8710 : {
8711 0 : struct dcerpc_lsa_StorePrivateData_state *state = tevent_req_data(
8712 : req, struct dcerpc_lsa_StorePrivateData_state);
8713 0 : NTSTATUS status;
8714 :
8715 0 : if (tevent_req_is_nterror(req, &status)) {
8716 0 : tevent_req_received(req);
8717 0 : return status;
8718 : }
8719 :
8720 : /* Steal possible out parameters to the callers context */
8721 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8722 :
8723 : /* Return result */
8724 0 : *result = state->orig.out.result;
8725 :
8726 0 : tevent_req_received(req);
8727 0 : return NT_STATUS_OK;
8728 : }
8729 :
8730 0 : NTSTATUS dcerpc_lsa_StorePrivateData(struct dcerpc_binding_handle *h,
8731 : TALLOC_CTX *mem_ctx,
8732 : struct policy_handle *_handle /* [in] [ref] */,
8733 : struct lsa_String *_name /* [in] [ref] */,
8734 : struct lsa_DATA_BUF *_val /* [in] [unique] */,
8735 : NTSTATUS *result)
8736 : {
8737 0 : struct lsa_StorePrivateData r;
8738 0 : NTSTATUS status;
8739 :
8740 : /* In parameters */
8741 0 : r.in.handle = _handle;
8742 0 : r.in.name = _name;
8743 0 : r.in.val = _val;
8744 :
8745 : /* Out parameters */
8746 :
8747 : /* Result */
8748 0 : NDR_ZERO_STRUCT(r.out.result);
8749 :
8750 0 : status = dcerpc_lsa_StorePrivateData_r(h, mem_ctx, &r);
8751 0 : if (!NT_STATUS_IS_OK(status)) {
8752 0 : return status;
8753 : }
8754 :
8755 : /* Return variables */
8756 :
8757 : /* Return result */
8758 0 : *result = r.out.result;
8759 :
8760 0 : return NT_STATUS_OK;
8761 : }
8762 :
8763 : struct dcerpc_lsa_RetrievePrivateData_r_state {
8764 : TALLOC_CTX *out_mem_ctx;
8765 : };
8766 :
8767 : static void dcerpc_lsa_RetrievePrivateData_r_done(struct tevent_req *subreq);
8768 :
8769 0 : struct tevent_req *dcerpc_lsa_RetrievePrivateData_r_send(TALLOC_CTX *mem_ctx,
8770 : struct tevent_context *ev,
8771 : struct dcerpc_binding_handle *h,
8772 : struct lsa_RetrievePrivateData *r)
8773 : {
8774 0 : struct tevent_req *req;
8775 0 : struct dcerpc_lsa_RetrievePrivateData_r_state *state;
8776 0 : struct tevent_req *subreq;
8777 :
8778 0 : req = tevent_req_create(mem_ctx, &state,
8779 : struct dcerpc_lsa_RetrievePrivateData_r_state);
8780 0 : if (req == NULL) {
8781 0 : return NULL;
8782 : }
8783 :
8784 0 : state->out_mem_ctx = talloc_new(state);
8785 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
8786 0 : return tevent_req_post(req, ev);
8787 : }
8788 :
8789 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
8790 : NULL, &ndr_table_lsarpc,
8791 0 : NDR_LSA_RETRIEVEPRIVATEDATA, state->out_mem_ctx, r);
8792 0 : if (tevent_req_nomem(subreq, req)) {
8793 0 : return tevent_req_post(req, ev);
8794 : }
8795 0 : tevent_req_set_callback(subreq, dcerpc_lsa_RetrievePrivateData_r_done, req);
8796 :
8797 0 : return req;
8798 : }
8799 :
8800 0 : static void dcerpc_lsa_RetrievePrivateData_r_done(struct tevent_req *subreq)
8801 : {
8802 0 : struct tevent_req *req =
8803 0 : tevent_req_callback_data(subreq,
8804 : struct tevent_req);
8805 0 : NTSTATUS status;
8806 :
8807 0 : status = dcerpc_binding_handle_call_recv(subreq);
8808 0 : TALLOC_FREE(subreq);
8809 0 : if (tevent_req_nterror(req, status)) {
8810 0 : return;
8811 : }
8812 :
8813 0 : tevent_req_done(req);
8814 : }
8815 :
8816 0 : NTSTATUS dcerpc_lsa_RetrievePrivateData_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
8817 : {
8818 0 : struct dcerpc_lsa_RetrievePrivateData_r_state *state =
8819 0 : tevent_req_data(req,
8820 : struct dcerpc_lsa_RetrievePrivateData_r_state);
8821 0 : NTSTATUS status;
8822 :
8823 0 : if (tevent_req_is_nterror(req, &status)) {
8824 0 : tevent_req_received(req);
8825 0 : return status;
8826 : }
8827 :
8828 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8829 :
8830 0 : tevent_req_received(req);
8831 0 : return NT_STATUS_OK;
8832 : }
8833 :
8834 0 : NTSTATUS dcerpc_lsa_RetrievePrivateData_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_RetrievePrivateData *r)
8835 : {
8836 0 : NTSTATUS status;
8837 :
8838 0 : status = dcerpc_binding_handle_call(h,
8839 : NULL, &ndr_table_lsarpc,
8840 : NDR_LSA_RETRIEVEPRIVATEDATA, mem_ctx, r);
8841 :
8842 0 : return status;
8843 : }
8844 :
8845 : struct dcerpc_lsa_RetrievePrivateData_state {
8846 : struct lsa_RetrievePrivateData orig;
8847 : struct lsa_RetrievePrivateData tmp;
8848 : TALLOC_CTX *out_mem_ctx;
8849 : };
8850 :
8851 : static void dcerpc_lsa_RetrievePrivateData_done(struct tevent_req *subreq);
8852 :
8853 0 : struct tevent_req *dcerpc_lsa_RetrievePrivateData_send(TALLOC_CTX *mem_ctx,
8854 : struct tevent_context *ev,
8855 : struct dcerpc_binding_handle *h,
8856 : struct policy_handle *_handle /* [in] [ref] */,
8857 : struct lsa_String *_name /* [in] [ref] */,
8858 : struct lsa_DATA_BUF **_val /* [in,out] [ref] */)
8859 : {
8860 0 : struct tevent_req *req;
8861 0 : struct dcerpc_lsa_RetrievePrivateData_state *state;
8862 0 : struct tevent_req *subreq;
8863 :
8864 0 : req = tevent_req_create(mem_ctx, &state,
8865 : struct dcerpc_lsa_RetrievePrivateData_state);
8866 0 : if (req == NULL) {
8867 0 : return NULL;
8868 : }
8869 0 : state->out_mem_ctx = NULL;
8870 :
8871 : /* In parameters */
8872 0 : state->orig.in.handle = _handle;
8873 0 : state->orig.in.name = _name;
8874 0 : state->orig.in.val = _val;
8875 :
8876 : /* Out parameters */
8877 0 : state->orig.out.val = _val;
8878 :
8879 : /* Result */
8880 0 : NDR_ZERO_STRUCT(state->orig.out.result);
8881 :
8882 0 : state->out_mem_ctx = talloc_named_const(state, 0,
8883 : "dcerpc_lsa_RetrievePrivateData_out_memory");
8884 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
8885 0 : return tevent_req_post(req, ev);
8886 : }
8887 :
8888 : /* make a temporary copy, that we pass to the dispatch function */
8889 0 : state->tmp = state->orig;
8890 :
8891 0 : subreq = dcerpc_lsa_RetrievePrivateData_r_send(state, ev, h, &state->tmp);
8892 0 : if (tevent_req_nomem(subreq, req)) {
8893 0 : return tevent_req_post(req, ev);
8894 : }
8895 0 : tevent_req_set_callback(subreq, dcerpc_lsa_RetrievePrivateData_done, req);
8896 0 : return req;
8897 : }
8898 :
8899 0 : static void dcerpc_lsa_RetrievePrivateData_done(struct tevent_req *subreq)
8900 : {
8901 0 : struct tevent_req *req = tevent_req_callback_data(
8902 : subreq, struct tevent_req);
8903 0 : struct dcerpc_lsa_RetrievePrivateData_state *state = tevent_req_data(
8904 : req, struct dcerpc_lsa_RetrievePrivateData_state);
8905 0 : NTSTATUS status;
8906 0 : TALLOC_CTX *mem_ctx;
8907 :
8908 0 : if (state->out_mem_ctx) {
8909 0 : mem_ctx = state->out_mem_ctx;
8910 : } else {
8911 0 : mem_ctx = state;
8912 : }
8913 :
8914 0 : status = dcerpc_lsa_RetrievePrivateData_r_recv(subreq, mem_ctx);
8915 0 : TALLOC_FREE(subreq);
8916 0 : if (tevent_req_nterror(req, status)) {
8917 0 : return;
8918 : }
8919 :
8920 : /* Copy out parameters */
8921 0 : *state->orig.out.val = *state->tmp.out.val;
8922 :
8923 : /* Copy result */
8924 0 : state->orig.out.result = state->tmp.out.result;
8925 :
8926 : /* Reset temporary structure */
8927 0 : NDR_ZERO_STRUCT(state->tmp);
8928 :
8929 0 : tevent_req_done(req);
8930 : }
8931 :
8932 0 : NTSTATUS dcerpc_lsa_RetrievePrivateData_recv(struct tevent_req *req,
8933 : TALLOC_CTX *mem_ctx,
8934 : NTSTATUS *result)
8935 : {
8936 0 : struct dcerpc_lsa_RetrievePrivateData_state *state = tevent_req_data(
8937 : req, struct dcerpc_lsa_RetrievePrivateData_state);
8938 0 : NTSTATUS status;
8939 :
8940 0 : if (tevent_req_is_nterror(req, &status)) {
8941 0 : tevent_req_received(req);
8942 0 : return status;
8943 : }
8944 :
8945 : /* Steal possible out parameters to the callers context */
8946 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8947 :
8948 : /* Return result */
8949 0 : *result = state->orig.out.result;
8950 :
8951 0 : tevent_req_received(req);
8952 0 : return NT_STATUS_OK;
8953 : }
8954 :
8955 0 : NTSTATUS dcerpc_lsa_RetrievePrivateData(struct dcerpc_binding_handle *h,
8956 : TALLOC_CTX *mem_ctx,
8957 : struct policy_handle *_handle /* [in] [ref] */,
8958 : struct lsa_String *_name /* [in] [ref] */,
8959 : struct lsa_DATA_BUF **_val /* [in,out] [ref] */,
8960 : NTSTATUS *result)
8961 : {
8962 0 : struct lsa_RetrievePrivateData r;
8963 0 : NTSTATUS status;
8964 :
8965 : /* In parameters */
8966 0 : r.in.handle = _handle;
8967 0 : r.in.name = _name;
8968 0 : r.in.val = _val;
8969 :
8970 : /* Out parameters */
8971 0 : r.out.val = _val;
8972 :
8973 : /* Result */
8974 0 : NDR_ZERO_STRUCT(r.out.result);
8975 :
8976 0 : status = dcerpc_lsa_RetrievePrivateData_r(h, mem_ctx, &r);
8977 0 : if (!NT_STATUS_IS_OK(status)) {
8978 0 : return status;
8979 : }
8980 :
8981 : /* Return variables */
8982 0 : *_val = *r.out.val;
8983 :
8984 : /* Return result */
8985 0 : *result = r.out.result;
8986 :
8987 0 : return NT_STATUS_OK;
8988 : }
8989 :
8990 : struct dcerpc_lsa_OpenPolicy2_r_state {
8991 : TALLOC_CTX *out_mem_ctx;
8992 : };
8993 :
8994 : static void dcerpc_lsa_OpenPolicy2_r_done(struct tevent_req *subreq);
8995 :
8996 567 : struct tevent_req *dcerpc_lsa_OpenPolicy2_r_send(TALLOC_CTX *mem_ctx,
8997 : struct tevent_context *ev,
8998 : struct dcerpc_binding_handle *h,
8999 : struct lsa_OpenPolicy2 *r)
9000 : {
9001 72 : struct tevent_req *req;
9002 72 : struct dcerpc_lsa_OpenPolicy2_r_state *state;
9003 72 : struct tevent_req *subreq;
9004 :
9005 567 : req = tevent_req_create(mem_ctx, &state,
9006 : struct dcerpc_lsa_OpenPolicy2_r_state);
9007 567 : if (req == NULL) {
9008 0 : return NULL;
9009 : }
9010 :
9011 567 : state->out_mem_ctx = talloc_new(state);
9012 567 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
9013 0 : return tevent_req_post(req, ev);
9014 : }
9015 :
9016 639 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
9017 : NULL, &ndr_table_lsarpc,
9018 567 : NDR_LSA_OPENPOLICY2, state->out_mem_ctx, r);
9019 567 : if (tevent_req_nomem(subreq, req)) {
9020 0 : return tevent_req_post(req, ev);
9021 : }
9022 567 : tevent_req_set_callback(subreq, dcerpc_lsa_OpenPolicy2_r_done, req);
9023 :
9024 567 : return req;
9025 : }
9026 :
9027 567 : static void dcerpc_lsa_OpenPolicy2_r_done(struct tevent_req *subreq)
9028 : {
9029 72 : struct tevent_req *req =
9030 567 : tevent_req_callback_data(subreq,
9031 : struct tevent_req);
9032 72 : NTSTATUS status;
9033 :
9034 567 : status = dcerpc_binding_handle_call_recv(subreq);
9035 567 : TALLOC_FREE(subreq);
9036 567 : if (tevent_req_nterror(req, status)) {
9037 0 : return;
9038 : }
9039 :
9040 567 : tevent_req_done(req);
9041 : }
9042 :
9043 567 : NTSTATUS dcerpc_lsa_OpenPolicy2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
9044 : {
9045 72 : struct dcerpc_lsa_OpenPolicy2_r_state *state =
9046 567 : tevent_req_data(req,
9047 : struct dcerpc_lsa_OpenPolicy2_r_state);
9048 72 : NTSTATUS status;
9049 :
9050 567 : if (tevent_req_is_nterror(req, &status)) {
9051 0 : tevent_req_received(req);
9052 0 : return status;
9053 : }
9054 :
9055 567 : talloc_steal(mem_ctx, state->out_mem_ctx);
9056 :
9057 567 : tevent_req_received(req);
9058 567 : return NT_STATUS_OK;
9059 : }
9060 :
9061 2684 : NTSTATUS dcerpc_lsa_OpenPolicy2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_OpenPolicy2 *r)
9062 : {
9063 12 : NTSTATUS status;
9064 :
9065 2684 : status = dcerpc_binding_handle_call(h,
9066 : NULL, &ndr_table_lsarpc,
9067 : NDR_LSA_OPENPOLICY2, mem_ctx, r);
9068 :
9069 2684 : return status;
9070 : }
9071 :
9072 : struct dcerpc_lsa_OpenPolicy2_state {
9073 : struct lsa_OpenPolicy2 orig;
9074 : struct lsa_OpenPolicy2 tmp;
9075 : TALLOC_CTX *out_mem_ctx;
9076 : };
9077 :
9078 : static void dcerpc_lsa_OpenPolicy2_done(struct tevent_req *subreq);
9079 :
9080 0 : struct tevent_req *dcerpc_lsa_OpenPolicy2_send(TALLOC_CTX *mem_ctx,
9081 : struct tevent_context *ev,
9082 : struct dcerpc_binding_handle *h,
9083 : const char *_system_name /* [in] [charset(UTF16),unique] */,
9084 : struct lsa_ObjectAttribute *_attr /* [in] [ref] */,
9085 : uint32_t _access_mask /* [in] */,
9086 : struct policy_handle *_handle /* [out] [ref] */)
9087 : {
9088 0 : struct tevent_req *req;
9089 0 : struct dcerpc_lsa_OpenPolicy2_state *state;
9090 0 : struct tevent_req *subreq;
9091 :
9092 0 : req = tevent_req_create(mem_ctx, &state,
9093 : struct dcerpc_lsa_OpenPolicy2_state);
9094 0 : if (req == NULL) {
9095 0 : return NULL;
9096 : }
9097 0 : state->out_mem_ctx = NULL;
9098 :
9099 : /* In parameters */
9100 0 : state->orig.in.system_name = _system_name;
9101 0 : state->orig.in.attr = _attr;
9102 0 : state->orig.in.access_mask = _access_mask;
9103 :
9104 : /* Out parameters */
9105 0 : state->orig.out.handle = _handle;
9106 :
9107 : /* Result */
9108 0 : NDR_ZERO_STRUCT(state->orig.out.result);
9109 :
9110 0 : state->out_mem_ctx = talloc_named_const(state, 0,
9111 : "dcerpc_lsa_OpenPolicy2_out_memory");
9112 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
9113 0 : return tevent_req_post(req, ev);
9114 : }
9115 :
9116 : /* make a temporary copy, that we pass to the dispatch function */
9117 0 : state->tmp = state->orig;
9118 :
9119 0 : subreq = dcerpc_lsa_OpenPolicy2_r_send(state, ev, h, &state->tmp);
9120 0 : if (tevent_req_nomem(subreq, req)) {
9121 0 : return tevent_req_post(req, ev);
9122 : }
9123 0 : tevent_req_set_callback(subreq, dcerpc_lsa_OpenPolicy2_done, req);
9124 0 : return req;
9125 : }
9126 :
9127 0 : static void dcerpc_lsa_OpenPolicy2_done(struct tevent_req *subreq)
9128 : {
9129 0 : struct tevent_req *req = tevent_req_callback_data(
9130 : subreq, struct tevent_req);
9131 0 : struct dcerpc_lsa_OpenPolicy2_state *state = tevent_req_data(
9132 : req, struct dcerpc_lsa_OpenPolicy2_state);
9133 0 : NTSTATUS status;
9134 0 : TALLOC_CTX *mem_ctx;
9135 :
9136 0 : if (state->out_mem_ctx) {
9137 0 : mem_ctx = state->out_mem_ctx;
9138 : } else {
9139 0 : mem_ctx = state;
9140 : }
9141 :
9142 0 : status = dcerpc_lsa_OpenPolicy2_r_recv(subreq, mem_ctx);
9143 0 : TALLOC_FREE(subreq);
9144 0 : if (tevent_req_nterror(req, status)) {
9145 0 : return;
9146 : }
9147 :
9148 : /* Copy out parameters */
9149 0 : *state->orig.out.handle = *state->tmp.out.handle;
9150 :
9151 : /* Copy result */
9152 0 : state->orig.out.result = state->tmp.out.result;
9153 :
9154 : /* Reset temporary structure */
9155 0 : NDR_ZERO_STRUCT(state->tmp);
9156 :
9157 0 : tevent_req_done(req);
9158 : }
9159 :
9160 0 : NTSTATUS dcerpc_lsa_OpenPolicy2_recv(struct tevent_req *req,
9161 : TALLOC_CTX *mem_ctx,
9162 : NTSTATUS *result)
9163 : {
9164 0 : struct dcerpc_lsa_OpenPolicy2_state *state = tevent_req_data(
9165 : req, struct dcerpc_lsa_OpenPolicy2_state);
9166 0 : NTSTATUS status;
9167 :
9168 0 : if (tevent_req_is_nterror(req, &status)) {
9169 0 : tevent_req_received(req);
9170 0 : return status;
9171 : }
9172 :
9173 : /* Steal possible out parameters to the callers context */
9174 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
9175 :
9176 : /* Return result */
9177 0 : *result = state->orig.out.result;
9178 :
9179 0 : tevent_req_received(req);
9180 0 : return NT_STATUS_OK;
9181 : }
9182 :
9183 0 : NTSTATUS dcerpc_lsa_OpenPolicy2(struct dcerpc_binding_handle *h,
9184 : TALLOC_CTX *mem_ctx,
9185 : const char *_system_name /* [in] [charset(UTF16),unique] */,
9186 : struct lsa_ObjectAttribute *_attr /* [in] [ref] */,
9187 : uint32_t _access_mask /* [in] */,
9188 : struct policy_handle *_handle /* [out] [ref] */,
9189 : NTSTATUS *result)
9190 : {
9191 0 : struct lsa_OpenPolicy2 r;
9192 0 : NTSTATUS status;
9193 :
9194 : /* In parameters */
9195 0 : r.in.system_name = _system_name;
9196 0 : r.in.attr = _attr;
9197 0 : r.in.access_mask = _access_mask;
9198 :
9199 : /* Out parameters */
9200 0 : r.out.handle = _handle;
9201 :
9202 : /* Result */
9203 0 : NDR_ZERO_STRUCT(r.out.result);
9204 :
9205 0 : status = dcerpc_lsa_OpenPolicy2_r(h, mem_ctx, &r);
9206 0 : if (!NT_STATUS_IS_OK(status)) {
9207 0 : return status;
9208 : }
9209 :
9210 : /* Return variables */
9211 0 : *_handle = *r.out.handle;
9212 :
9213 : /* Return result */
9214 0 : *result = r.out.result;
9215 :
9216 0 : return NT_STATUS_OK;
9217 : }
9218 :
9219 : struct dcerpc_lsa_GetUserName_r_state {
9220 : TALLOC_CTX *out_mem_ctx;
9221 : };
9222 :
9223 : static void dcerpc_lsa_GetUserName_r_done(struct tevent_req *subreq);
9224 :
9225 0 : struct tevent_req *dcerpc_lsa_GetUserName_r_send(TALLOC_CTX *mem_ctx,
9226 : struct tevent_context *ev,
9227 : struct dcerpc_binding_handle *h,
9228 : struct lsa_GetUserName *r)
9229 : {
9230 0 : struct tevent_req *req;
9231 0 : struct dcerpc_lsa_GetUserName_r_state *state;
9232 0 : struct tevent_req *subreq;
9233 :
9234 0 : req = tevent_req_create(mem_ctx, &state,
9235 : struct dcerpc_lsa_GetUserName_r_state);
9236 0 : if (req == NULL) {
9237 0 : return NULL;
9238 : }
9239 :
9240 0 : state->out_mem_ctx = talloc_new(state);
9241 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
9242 0 : return tevent_req_post(req, ev);
9243 : }
9244 :
9245 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
9246 : NULL, &ndr_table_lsarpc,
9247 0 : NDR_LSA_GETUSERNAME, state->out_mem_ctx, r);
9248 0 : if (tevent_req_nomem(subreq, req)) {
9249 0 : return tevent_req_post(req, ev);
9250 : }
9251 0 : tevent_req_set_callback(subreq, dcerpc_lsa_GetUserName_r_done, req);
9252 :
9253 0 : return req;
9254 : }
9255 :
9256 0 : static void dcerpc_lsa_GetUserName_r_done(struct tevent_req *subreq)
9257 : {
9258 0 : struct tevent_req *req =
9259 0 : tevent_req_callback_data(subreq,
9260 : struct tevent_req);
9261 0 : NTSTATUS status;
9262 :
9263 0 : status = dcerpc_binding_handle_call_recv(subreq);
9264 0 : TALLOC_FREE(subreq);
9265 0 : if (tevent_req_nterror(req, status)) {
9266 0 : return;
9267 : }
9268 :
9269 0 : tevent_req_done(req);
9270 : }
9271 :
9272 0 : NTSTATUS dcerpc_lsa_GetUserName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
9273 : {
9274 0 : struct dcerpc_lsa_GetUserName_r_state *state =
9275 0 : tevent_req_data(req,
9276 : struct dcerpc_lsa_GetUserName_r_state);
9277 0 : NTSTATUS status;
9278 :
9279 0 : if (tevent_req_is_nterror(req, &status)) {
9280 0 : tevent_req_received(req);
9281 0 : return status;
9282 : }
9283 :
9284 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
9285 :
9286 0 : tevent_req_received(req);
9287 0 : return NT_STATUS_OK;
9288 : }
9289 :
9290 646 : NTSTATUS dcerpc_lsa_GetUserName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_GetUserName *r)
9291 : {
9292 48 : NTSTATUS status;
9293 :
9294 646 : status = dcerpc_binding_handle_call(h,
9295 : NULL, &ndr_table_lsarpc,
9296 : NDR_LSA_GETUSERNAME, mem_ctx, r);
9297 :
9298 646 : return status;
9299 : }
9300 :
9301 : struct dcerpc_lsa_GetUserName_state {
9302 : struct lsa_GetUserName orig;
9303 : struct lsa_GetUserName tmp;
9304 : TALLOC_CTX *out_mem_ctx;
9305 : };
9306 :
9307 : static void dcerpc_lsa_GetUserName_done(struct tevent_req *subreq);
9308 :
9309 0 : struct tevent_req *dcerpc_lsa_GetUserName_send(TALLOC_CTX *mem_ctx,
9310 : struct tevent_context *ev,
9311 : struct dcerpc_binding_handle *h,
9312 : const char *_system_name /* [in] [charset(UTF16),unique] */,
9313 : struct lsa_String **_account_name /* [in,out] [ref] */,
9314 : struct lsa_String **_authority_name /* [in,out] [unique] */)
9315 : {
9316 0 : struct tevent_req *req;
9317 0 : struct dcerpc_lsa_GetUserName_state *state;
9318 0 : struct tevent_req *subreq;
9319 :
9320 0 : req = tevent_req_create(mem_ctx, &state,
9321 : struct dcerpc_lsa_GetUserName_state);
9322 0 : if (req == NULL) {
9323 0 : return NULL;
9324 : }
9325 0 : state->out_mem_ctx = NULL;
9326 :
9327 : /* In parameters */
9328 0 : state->orig.in.system_name = _system_name;
9329 0 : state->orig.in.account_name = _account_name;
9330 0 : state->orig.in.authority_name = _authority_name;
9331 :
9332 : /* Out parameters */
9333 0 : state->orig.out.account_name = _account_name;
9334 0 : state->orig.out.authority_name = _authority_name;
9335 :
9336 : /* Result */
9337 0 : NDR_ZERO_STRUCT(state->orig.out.result);
9338 :
9339 0 : state->out_mem_ctx = talloc_named_const(state, 0,
9340 : "dcerpc_lsa_GetUserName_out_memory");
9341 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
9342 0 : return tevent_req_post(req, ev);
9343 : }
9344 :
9345 : /* make a temporary copy, that we pass to the dispatch function */
9346 0 : state->tmp = state->orig;
9347 :
9348 0 : subreq = dcerpc_lsa_GetUserName_r_send(state, ev, h, &state->tmp);
9349 0 : if (tevent_req_nomem(subreq, req)) {
9350 0 : return tevent_req_post(req, ev);
9351 : }
9352 0 : tevent_req_set_callback(subreq, dcerpc_lsa_GetUserName_done, req);
9353 0 : return req;
9354 : }
9355 :
9356 0 : static void dcerpc_lsa_GetUserName_done(struct tevent_req *subreq)
9357 : {
9358 0 : struct tevent_req *req = tevent_req_callback_data(
9359 : subreq, struct tevent_req);
9360 0 : struct dcerpc_lsa_GetUserName_state *state = tevent_req_data(
9361 : req, struct dcerpc_lsa_GetUserName_state);
9362 0 : NTSTATUS status;
9363 0 : TALLOC_CTX *mem_ctx;
9364 :
9365 0 : if (state->out_mem_ctx) {
9366 0 : mem_ctx = state->out_mem_ctx;
9367 : } else {
9368 0 : mem_ctx = state;
9369 : }
9370 :
9371 0 : status = dcerpc_lsa_GetUserName_r_recv(subreq, mem_ctx);
9372 0 : TALLOC_FREE(subreq);
9373 0 : if (tevent_req_nterror(req, status)) {
9374 0 : return;
9375 : }
9376 :
9377 : /* Copy out parameters */
9378 0 : *state->orig.out.account_name = *state->tmp.out.account_name;
9379 0 : if (state->orig.out.authority_name && state->tmp.out.authority_name) {
9380 0 : *state->orig.out.authority_name = *state->tmp.out.authority_name;
9381 : }
9382 :
9383 : /* Copy result */
9384 0 : state->orig.out.result = state->tmp.out.result;
9385 :
9386 : /* Reset temporary structure */
9387 0 : NDR_ZERO_STRUCT(state->tmp);
9388 :
9389 0 : tevent_req_done(req);
9390 : }
9391 :
9392 0 : NTSTATUS dcerpc_lsa_GetUserName_recv(struct tevent_req *req,
9393 : TALLOC_CTX *mem_ctx,
9394 : NTSTATUS *result)
9395 : {
9396 0 : struct dcerpc_lsa_GetUserName_state *state = tevent_req_data(
9397 : req, struct dcerpc_lsa_GetUserName_state);
9398 0 : NTSTATUS status;
9399 :
9400 0 : if (tevent_req_is_nterror(req, &status)) {
9401 0 : tevent_req_received(req);
9402 0 : return status;
9403 : }
9404 :
9405 : /* Steal possible out parameters to the callers context */
9406 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
9407 :
9408 : /* Return result */
9409 0 : *result = state->orig.out.result;
9410 :
9411 0 : tevent_req_received(req);
9412 0 : return NT_STATUS_OK;
9413 : }
9414 :
9415 223 : NTSTATUS dcerpc_lsa_GetUserName(struct dcerpc_binding_handle *h,
9416 : TALLOC_CTX *mem_ctx,
9417 : const char *_system_name /* [in] [charset(UTF16),unique] */,
9418 : struct lsa_String **_account_name /* [in,out] [ref] */,
9419 : struct lsa_String **_authority_name /* [in,out] [unique] */,
9420 : NTSTATUS *result)
9421 : {
9422 0 : struct lsa_GetUserName r;
9423 0 : NTSTATUS status;
9424 :
9425 : /* In parameters */
9426 223 : r.in.system_name = _system_name;
9427 223 : r.in.account_name = _account_name;
9428 223 : r.in.authority_name = _authority_name;
9429 :
9430 : /* Out parameters */
9431 223 : r.out.account_name = _account_name;
9432 223 : r.out.authority_name = _authority_name;
9433 :
9434 : /* Result */
9435 223 : NDR_ZERO_STRUCT(r.out.result);
9436 :
9437 223 : status = dcerpc_lsa_GetUserName_r(h, mem_ctx, &r);
9438 223 : if (!NT_STATUS_IS_OK(status)) {
9439 30 : return status;
9440 : }
9441 :
9442 : /* Return variables */
9443 193 : *_account_name = *r.out.account_name;
9444 193 : if (_authority_name && r.out.authority_name) {
9445 193 : *_authority_name = *r.out.authority_name;
9446 : }
9447 :
9448 : /* Return result */
9449 193 : *result = r.out.result;
9450 :
9451 193 : return NT_STATUS_OK;
9452 : }
9453 :
9454 : struct dcerpc_lsa_QueryInfoPolicy2_r_state {
9455 : TALLOC_CTX *out_mem_ctx;
9456 : };
9457 :
9458 : static void dcerpc_lsa_QueryInfoPolicy2_r_done(struct tevent_req *subreq);
9459 :
9460 560 : struct tevent_req *dcerpc_lsa_QueryInfoPolicy2_r_send(TALLOC_CTX *mem_ctx,
9461 : struct tevent_context *ev,
9462 : struct dcerpc_binding_handle *h,
9463 : struct lsa_QueryInfoPolicy2 *r)
9464 : {
9465 72 : struct tevent_req *req;
9466 72 : struct dcerpc_lsa_QueryInfoPolicy2_r_state *state;
9467 72 : struct tevent_req *subreq;
9468 :
9469 560 : req = tevent_req_create(mem_ctx, &state,
9470 : struct dcerpc_lsa_QueryInfoPolicy2_r_state);
9471 560 : if (req == NULL) {
9472 0 : return NULL;
9473 : }
9474 :
9475 560 : state->out_mem_ctx = talloc_new(state);
9476 560 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
9477 0 : return tevent_req_post(req, ev);
9478 : }
9479 :
9480 632 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
9481 : NULL, &ndr_table_lsarpc,
9482 560 : NDR_LSA_QUERYINFOPOLICY2, state->out_mem_ctx, r);
9483 560 : if (tevent_req_nomem(subreq, req)) {
9484 0 : return tevent_req_post(req, ev);
9485 : }
9486 560 : tevent_req_set_callback(subreq, dcerpc_lsa_QueryInfoPolicy2_r_done, req);
9487 :
9488 560 : return req;
9489 : }
9490 :
9491 560 : static void dcerpc_lsa_QueryInfoPolicy2_r_done(struct tevent_req *subreq)
9492 : {
9493 72 : struct tevent_req *req =
9494 560 : tevent_req_callback_data(subreq,
9495 : struct tevent_req);
9496 72 : NTSTATUS status;
9497 :
9498 560 : status = dcerpc_binding_handle_call_recv(subreq);
9499 560 : TALLOC_FREE(subreq);
9500 560 : if (tevent_req_nterror(req, status)) {
9501 50 : return;
9502 : }
9503 :
9504 510 : tevent_req_done(req);
9505 : }
9506 :
9507 560 : NTSTATUS dcerpc_lsa_QueryInfoPolicy2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
9508 : {
9509 72 : struct dcerpc_lsa_QueryInfoPolicy2_r_state *state =
9510 560 : tevent_req_data(req,
9511 : struct dcerpc_lsa_QueryInfoPolicy2_r_state);
9512 72 : NTSTATUS status;
9513 :
9514 560 : if (tevent_req_is_nterror(req, &status)) {
9515 50 : tevent_req_received(req);
9516 50 : return status;
9517 : }
9518 :
9519 510 : talloc_steal(mem_ctx, state->out_mem_ctx);
9520 :
9521 510 : tevent_req_received(req);
9522 510 : return NT_STATUS_OK;
9523 : }
9524 :
9525 611 : NTSTATUS dcerpc_lsa_QueryInfoPolicy2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_QueryInfoPolicy2 *r)
9526 : {
9527 2 : NTSTATUS status;
9528 :
9529 611 : status = dcerpc_binding_handle_call(h,
9530 : NULL, &ndr_table_lsarpc,
9531 : NDR_LSA_QUERYINFOPOLICY2, mem_ctx, r);
9532 :
9533 611 : return status;
9534 : }
9535 :
9536 : struct dcerpc_lsa_QueryInfoPolicy2_state {
9537 : struct lsa_QueryInfoPolicy2 orig;
9538 : struct lsa_QueryInfoPolicy2 tmp;
9539 : TALLOC_CTX *out_mem_ctx;
9540 : };
9541 :
9542 : static void dcerpc_lsa_QueryInfoPolicy2_done(struct tevent_req *subreq);
9543 :
9544 0 : struct tevent_req *dcerpc_lsa_QueryInfoPolicy2_send(TALLOC_CTX *mem_ctx,
9545 : struct tevent_context *ev,
9546 : struct dcerpc_binding_handle *h,
9547 : struct policy_handle *_handle /* [in] [ref] */,
9548 : enum lsa_PolicyInfo _level /* [in] */,
9549 : union lsa_PolicyInformation **_info /* [out] [ref,switch_is(level)] */)
9550 : {
9551 0 : struct tevent_req *req;
9552 0 : struct dcerpc_lsa_QueryInfoPolicy2_state *state;
9553 0 : struct tevent_req *subreq;
9554 :
9555 0 : req = tevent_req_create(mem_ctx, &state,
9556 : struct dcerpc_lsa_QueryInfoPolicy2_state);
9557 0 : if (req == NULL) {
9558 0 : return NULL;
9559 : }
9560 0 : state->out_mem_ctx = NULL;
9561 :
9562 : /* In parameters */
9563 0 : state->orig.in.handle = _handle;
9564 0 : state->orig.in.level = _level;
9565 :
9566 : /* Out parameters */
9567 0 : state->orig.out.info = _info;
9568 :
9569 : /* Result */
9570 0 : NDR_ZERO_STRUCT(state->orig.out.result);
9571 :
9572 0 : state->out_mem_ctx = talloc_named_const(state, 0,
9573 : "dcerpc_lsa_QueryInfoPolicy2_out_memory");
9574 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
9575 0 : return tevent_req_post(req, ev);
9576 : }
9577 :
9578 : /* make a temporary copy, that we pass to the dispatch function */
9579 0 : state->tmp = state->orig;
9580 :
9581 0 : subreq = dcerpc_lsa_QueryInfoPolicy2_r_send(state, ev, h, &state->tmp);
9582 0 : if (tevent_req_nomem(subreq, req)) {
9583 0 : return tevent_req_post(req, ev);
9584 : }
9585 0 : tevent_req_set_callback(subreq, dcerpc_lsa_QueryInfoPolicy2_done, req);
9586 0 : return req;
9587 : }
9588 :
9589 0 : static void dcerpc_lsa_QueryInfoPolicy2_done(struct tevent_req *subreq)
9590 : {
9591 0 : struct tevent_req *req = tevent_req_callback_data(
9592 : subreq, struct tevent_req);
9593 0 : struct dcerpc_lsa_QueryInfoPolicy2_state *state = tevent_req_data(
9594 : req, struct dcerpc_lsa_QueryInfoPolicy2_state);
9595 0 : NTSTATUS status;
9596 0 : TALLOC_CTX *mem_ctx;
9597 :
9598 0 : if (state->out_mem_ctx) {
9599 0 : mem_ctx = state->out_mem_ctx;
9600 : } else {
9601 0 : mem_ctx = state;
9602 : }
9603 :
9604 0 : status = dcerpc_lsa_QueryInfoPolicy2_r_recv(subreq, mem_ctx);
9605 0 : TALLOC_FREE(subreq);
9606 0 : if (tevent_req_nterror(req, status)) {
9607 0 : return;
9608 : }
9609 :
9610 : /* Copy out parameters */
9611 0 : *state->orig.out.info = *state->tmp.out.info;
9612 :
9613 : /* Copy result */
9614 0 : state->orig.out.result = state->tmp.out.result;
9615 :
9616 : /* Reset temporary structure */
9617 0 : NDR_ZERO_STRUCT(state->tmp);
9618 :
9619 0 : tevent_req_done(req);
9620 : }
9621 :
9622 0 : NTSTATUS dcerpc_lsa_QueryInfoPolicy2_recv(struct tevent_req *req,
9623 : TALLOC_CTX *mem_ctx,
9624 : NTSTATUS *result)
9625 : {
9626 0 : struct dcerpc_lsa_QueryInfoPolicy2_state *state = tevent_req_data(
9627 : req, struct dcerpc_lsa_QueryInfoPolicy2_state);
9628 0 : NTSTATUS status;
9629 :
9630 0 : if (tevent_req_is_nterror(req, &status)) {
9631 0 : tevent_req_received(req);
9632 0 : return status;
9633 : }
9634 :
9635 : /* Steal possible out parameters to the callers context */
9636 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
9637 :
9638 : /* Return result */
9639 0 : *result = state->orig.out.result;
9640 :
9641 0 : tevent_req_received(req);
9642 0 : return NT_STATUS_OK;
9643 : }
9644 :
9645 204 : NTSTATUS dcerpc_lsa_QueryInfoPolicy2(struct dcerpc_binding_handle *h,
9646 : TALLOC_CTX *mem_ctx,
9647 : struct policy_handle *_handle /* [in] [ref] */,
9648 : enum lsa_PolicyInfo _level /* [in] */,
9649 : union lsa_PolicyInformation **_info /* [out] [ref,switch_is(level)] */,
9650 : NTSTATUS *result)
9651 : {
9652 0 : struct lsa_QueryInfoPolicy2 r;
9653 0 : NTSTATUS status;
9654 :
9655 : /* In parameters */
9656 204 : r.in.handle = _handle;
9657 204 : r.in.level = _level;
9658 :
9659 : /* Out parameters */
9660 204 : r.out.info = _info;
9661 :
9662 : /* Result */
9663 204 : NDR_ZERO_STRUCT(r.out.result);
9664 :
9665 204 : status = dcerpc_lsa_QueryInfoPolicy2_r(h, mem_ctx, &r);
9666 204 : if (!NT_STATUS_IS_OK(status)) {
9667 144 : return status;
9668 : }
9669 :
9670 : /* Return variables */
9671 60 : *_info = *r.out.info;
9672 :
9673 : /* Return result */
9674 60 : *result = r.out.result;
9675 :
9676 60 : return NT_STATUS_OK;
9677 : }
9678 :
9679 : struct dcerpc_lsa_SetInfoPolicy2_r_state {
9680 : TALLOC_CTX *out_mem_ctx;
9681 : };
9682 :
9683 : static void dcerpc_lsa_SetInfoPolicy2_r_done(struct tevent_req *subreq);
9684 :
9685 0 : struct tevent_req *dcerpc_lsa_SetInfoPolicy2_r_send(TALLOC_CTX *mem_ctx,
9686 : struct tevent_context *ev,
9687 : struct dcerpc_binding_handle *h,
9688 : struct lsa_SetInfoPolicy2 *r)
9689 : {
9690 0 : struct tevent_req *req;
9691 0 : struct dcerpc_lsa_SetInfoPolicy2_r_state *state;
9692 0 : struct tevent_req *subreq;
9693 :
9694 0 : req = tevent_req_create(mem_ctx, &state,
9695 : struct dcerpc_lsa_SetInfoPolicy2_r_state);
9696 0 : if (req == NULL) {
9697 0 : return NULL;
9698 : }
9699 :
9700 0 : state->out_mem_ctx = NULL;
9701 :
9702 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
9703 : NULL, &ndr_table_lsarpc,
9704 : NDR_LSA_SETINFOPOLICY2, state, r);
9705 0 : if (tevent_req_nomem(subreq, req)) {
9706 0 : return tevent_req_post(req, ev);
9707 : }
9708 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetInfoPolicy2_r_done, req);
9709 :
9710 0 : return req;
9711 : }
9712 :
9713 0 : static void dcerpc_lsa_SetInfoPolicy2_r_done(struct tevent_req *subreq)
9714 : {
9715 0 : struct tevent_req *req =
9716 0 : tevent_req_callback_data(subreq,
9717 : struct tevent_req);
9718 0 : NTSTATUS status;
9719 :
9720 0 : status = dcerpc_binding_handle_call_recv(subreq);
9721 0 : TALLOC_FREE(subreq);
9722 0 : if (tevent_req_nterror(req, status)) {
9723 0 : return;
9724 : }
9725 :
9726 0 : tevent_req_done(req);
9727 : }
9728 :
9729 0 : NTSTATUS dcerpc_lsa_SetInfoPolicy2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
9730 : {
9731 0 : struct dcerpc_lsa_SetInfoPolicy2_r_state *state =
9732 0 : tevent_req_data(req,
9733 : struct dcerpc_lsa_SetInfoPolicy2_r_state);
9734 0 : NTSTATUS status;
9735 :
9736 0 : if (tevent_req_is_nterror(req, &status)) {
9737 0 : tevent_req_received(req);
9738 0 : return status;
9739 : }
9740 :
9741 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
9742 :
9743 0 : tevent_req_received(req);
9744 0 : return NT_STATUS_OK;
9745 : }
9746 :
9747 0 : NTSTATUS dcerpc_lsa_SetInfoPolicy2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_SetInfoPolicy2 *r)
9748 : {
9749 0 : NTSTATUS status;
9750 :
9751 0 : status = dcerpc_binding_handle_call(h,
9752 : NULL, &ndr_table_lsarpc,
9753 : NDR_LSA_SETINFOPOLICY2, mem_ctx, r);
9754 :
9755 0 : return status;
9756 : }
9757 :
9758 : struct dcerpc_lsa_SetInfoPolicy2_state {
9759 : struct lsa_SetInfoPolicy2 orig;
9760 : struct lsa_SetInfoPolicy2 tmp;
9761 : TALLOC_CTX *out_mem_ctx;
9762 : };
9763 :
9764 : static void dcerpc_lsa_SetInfoPolicy2_done(struct tevent_req *subreq);
9765 :
9766 0 : struct tevent_req *dcerpc_lsa_SetInfoPolicy2_send(TALLOC_CTX *mem_ctx,
9767 : struct tevent_context *ev,
9768 : struct dcerpc_binding_handle *h,
9769 : struct policy_handle *_handle /* [in] [ref] */,
9770 : enum lsa_PolicyInfo _level /* [in] */,
9771 : union lsa_PolicyInformation *_info /* [in] [ref,switch_is(level)] */)
9772 : {
9773 0 : struct tevent_req *req;
9774 0 : struct dcerpc_lsa_SetInfoPolicy2_state *state;
9775 0 : struct tevent_req *subreq;
9776 :
9777 0 : req = tevent_req_create(mem_ctx, &state,
9778 : struct dcerpc_lsa_SetInfoPolicy2_state);
9779 0 : if (req == NULL) {
9780 0 : return NULL;
9781 : }
9782 0 : state->out_mem_ctx = NULL;
9783 :
9784 : /* In parameters */
9785 0 : state->orig.in.handle = _handle;
9786 0 : state->orig.in.level = _level;
9787 0 : state->orig.in.info = _info;
9788 :
9789 : /* Out parameters */
9790 :
9791 : /* Result */
9792 0 : NDR_ZERO_STRUCT(state->orig.out.result);
9793 :
9794 : /* make a temporary copy, that we pass to the dispatch function */
9795 0 : state->tmp = state->orig;
9796 :
9797 0 : subreq = dcerpc_lsa_SetInfoPolicy2_r_send(state, ev, h, &state->tmp);
9798 0 : if (tevent_req_nomem(subreq, req)) {
9799 0 : return tevent_req_post(req, ev);
9800 : }
9801 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetInfoPolicy2_done, req);
9802 0 : return req;
9803 : }
9804 :
9805 0 : static void dcerpc_lsa_SetInfoPolicy2_done(struct tevent_req *subreq)
9806 : {
9807 0 : struct tevent_req *req = tevent_req_callback_data(
9808 : subreq, struct tevent_req);
9809 0 : struct dcerpc_lsa_SetInfoPolicy2_state *state = tevent_req_data(
9810 : req, struct dcerpc_lsa_SetInfoPolicy2_state);
9811 0 : NTSTATUS status;
9812 0 : TALLOC_CTX *mem_ctx;
9813 :
9814 0 : if (state->out_mem_ctx) {
9815 0 : mem_ctx = state->out_mem_ctx;
9816 : } else {
9817 0 : mem_ctx = state;
9818 : }
9819 :
9820 0 : status = dcerpc_lsa_SetInfoPolicy2_r_recv(subreq, mem_ctx);
9821 0 : TALLOC_FREE(subreq);
9822 0 : if (tevent_req_nterror(req, status)) {
9823 0 : return;
9824 : }
9825 :
9826 : /* Copy out parameters */
9827 :
9828 : /* Copy result */
9829 0 : state->orig.out.result = state->tmp.out.result;
9830 :
9831 : /* Reset temporary structure */
9832 0 : NDR_ZERO_STRUCT(state->tmp);
9833 :
9834 0 : tevent_req_done(req);
9835 : }
9836 :
9837 0 : NTSTATUS dcerpc_lsa_SetInfoPolicy2_recv(struct tevent_req *req,
9838 : TALLOC_CTX *mem_ctx,
9839 : NTSTATUS *result)
9840 : {
9841 0 : struct dcerpc_lsa_SetInfoPolicy2_state *state = tevent_req_data(
9842 : req, struct dcerpc_lsa_SetInfoPolicy2_state);
9843 0 : NTSTATUS status;
9844 :
9845 0 : if (tevent_req_is_nterror(req, &status)) {
9846 0 : tevent_req_received(req);
9847 0 : return status;
9848 : }
9849 :
9850 : /* Steal possible out parameters to the callers context */
9851 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
9852 :
9853 : /* Return result */
9854 0 : *result = state->orig.out.result;
9855 :
9856 0 : tevent_req_received(req);
9857 0 : return NT_STATUS_OK;
9858 : }
9859 :
9860 0 : NTSTATUS dcerpc_lsa_SetInfoPolicy2(struct dcerpc_binding_handle *h,
9861 : TALLOC_CTX *mem_ctx,
9862 : struct policy_handle *_handle /* [in] [ref] */,
9863 : enum lsa_PolicyInfo _level /* [in] */,
9864 : union lsa_PolicyInformation *_info /* [in] [ref,switch_is(level)] */,
9865 : NTSTATUS *result)
9866 : {
9867 0 : struct lsa_SetInfoPolicy2 r;
9868 0 : NTSTATUS status;
9869 :
9870 : /* In parameters */
9871 0 : r.in.handle = _handle;
9872 0 : r.in.level = _level;
9873 0 : r.in.info = _info;
9874 :
9875 : /* Out parameters */
9876 :
9877 : /* Result */
9878 0 : NDR_ZERO_STRUCT(r.out.result);
9879 :
9880 0 : status = dcerpc_lsa_SetInfoPolicy2_r(h, mem_ctx, &r);
9881 0 : if (!NT_STATUS_IS_OK(status)) {
9882 0 : return status;
9883 : }
9884 :
9885 : /* Return variables */
9886 :
9887 : /* Return result */
9888 0 : *result = r.out.result;
9889 :
9890 0 : return NT_STATUS_OK;
9891 : }
9892 :
9893 : struct dcerpc_lsa_QueryTrustedDomainInfoByName_r_state {
9894 : TALLOC_CTX *out_mem_ctx;
9895 : };
9896 :
9897 : static void dcerpc_lsa_QueryTrustedDomainInfoByName_r_done(struct tevent_req *subreq);
9898 :
9899 0 : struct tevent_req *dcerpc_lsa_QueryTrustedDomainInfoByName_r_send(TALLOC_CTX *mem_ctx,
9900 : struct tevent_context *ev,
9901 : struct dcerpc_binding_handle *h,
9902 : struct lsa_QueryTrustedDomainInfoByName *r)
9903 : {
9904 0 : struct tevent_req *req;
9905 0 : struct dcerpc_lsa_QueryTrustedDomainInfoByName_r_state *state;
9906 0 : struct tevent_req *subreq;
9907 :
9908 0 : req = tevent_req_create(mem_ctx, &state,
9909 : struct dcerpc_lsa_QueryTrustedDomainInfoByName_r_state);
9910 0 : if (req == NULL) {
9911 0 : return NULL;
9912 : }
9913 :
9914 0 : state->out_mem_ctx = talloc_new(state);
9915 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
9916 0 : return tevent_req_post(req, ev);
9917 : }
9918 :
9919 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
9920 : NULL, &ndr_table_lsarpc,
9921 0 : NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME, state->out_mem_ctx, r);
9922 0 : if (tevent_req_nomem(subreq, req)) {
9923 0 : return tevent_req_post(req, ev);
9924 : }
9925 0 : tevent_req_set_callback(subreq, dcerpc_lsa_QueryTrustedDomainInfoByName_r_done, req);
9926 :
9927 0 : return req;
9928 : }
9929 :
9930 0 : static void dcerpc_lsa_QueryTrustedDomainInfoByName_r_done(struct tevent_req *subreq)
9931 : {
9932 0 : struct tevent_req *req =
9933 0 : tevent_req_callback_data(subreq,
9934 : struct tevent_req);
9935 0 : NTSTATUS status;
9936 :
9937 0 : status = dcerpc_binding_handle_call_recv(subreq);
9938 0 : TALLOC_FREE(subreq);
9939 0 : if (tevent_req_nterror(req, status)) {
9940 0 : return;
9941 : }
9942 :
9943 0 : tevent_req_done(req);
9944 : }
9945 :
9946 0 : NTSTATUS dcerpc_lsa_QueryTrustedDomainInfoByName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
9947 : {
9948 0 : struct dcerpc_lsa_QueryTrustedDomainInfoByName_r_state *state =
9949 0 : tevent_req_data(req,
9950 : struct dcerpc_lsa_QueryTrustedDomainInfoByName_r_state);
9951 0 : NTSTATUS status;
9952 :
9953 0 : if (tevent_req_is_nterror(req, &status)) {
9954 0 : tevent_req_received(req);
9955 0 : return status;
9956 : }
9957 :
9958 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
9959 :
9960 0 : tevent_req_received(req);
9961 0 : return NT_STATUS_OK;
9962 : }
9963 :
9964 2087 : NTSTATUS dcerpc_lsa_QueryTrustedDomainInfoByName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_QueryTrustedDomainInfoByName *r)
9965 : {
9966 0 : NTSTATUS status;
9967 :
9968 2087 : status = dcerpc_binding_handle_call(h,
9969 : NULL, &ndr_table_lsarpc,
9970 : NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME, mem_ctx, r);
9971 :
9972 2087 : return status;
9973 : }
9974 :
9975 : struct dcerpc_lsa_QueryTrustedDomainInfoByName_state {
9976 : struct lsa_QueryTrustedDomainInfoByName orig;
9977 : struct lsa_QueryTrustedDomainInfoByName tmp;
9978 : TALLOC_CTX *out_mem_ctx;
9979 : };
9980 :
9981 : static void dcerpc_lsa_QueryTrustedDomainInfoByName_done(struct tevent_req *subreq);
9982 :
9983 0 : struct tevent_req *dcerpc_lsa_QueryTrustedDomainInfoByName_send(TALLOC_CTX *mem_ctx,
9984 : struct tevent_context *ev,
9985 : struct dcerpc_binding_handle *h,
9986 : struct policy_handle *_handle /* [in] [ref] */,
9987 : struct lsa_String *_trusted_domain /* [in] [ref] */,
9988 : enum lsa_TrustDomInfoEnum _level /* [in] */,
9989 : union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */)
9990 : {
9991 0 : struct tevent_req *req;
9992 0 : struct dcerpc_lsa_QueryTrustedDomainInfoByName_state *state;
9993 0 : struct tevent_req *subreq;
9994 :
9995 0 : req = tevent_req_create(mem_ctx, &state,
9996 : struct dcerpc_lsa_QueryTrustedDomainInfoByName_state);
9997 0 : if (req == NULL) {
9998 0 : return NULL;
9999 : }
10000 0 : state->out_mem_ctx = NULL;
10001 :
10002 : /* In parameters */
10003 0 : state->orig.in.handle = _handle;
10004 0 : state->orig.in.trusted_domain = _trusted_domain;
10005 0 : state->orig.in.level = _level;
10006 :
10007 : /* Out parameters */
10008 0 : state->orig.out.info = _info;
10009 :
10010 : /* Result */
10011 0 : NDR_ZERO_STRUCT(state->orig.out.result);
10012 :
10013 0 : state->out_mem_ctx = talloc_named_const(state, 0,
10014 : "dcerpc_lsa_QueryTrustedDomainInfoByName_out_memory");
10015 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
10016 0 : return tevent_req_post(req, ev);
10017 : }
10018 :
10019 : /* make a temporary copy, that we pass to the dispatch function */
10020 0 : state->tmp = state->orig;
10021 :
10022 0 : subreq = dcerpc_lsa_QueryTrustedDomainInfoByName_r_send(state, ev, h, &state->tmp);
10023 0 : if (tevent_req_nomem(subreq, req)) {
10024 0 : return tevent_req_post(req, ev);
10025 : }
10026 0 : tevent_req_set_callback(subreq, dcerpc_lsa_QueryTrustedDomainInfoByName_done, req);
10027 0 : return req;
10028 : }
10029 :
10030 0 : static void dcerpc_lsa_QueryTrustedDomainInfoByName_done(struct tevent_req *subreq)
10031 : {
10032 0 : struct tevent_req *req = tevent_req_callback_data(
10033 : subreq, struct tevent_req);
10034 0 : struct dcerpc_lsa_QueryTrustedDomainInfoByName_state *state = tevent_req_data(
10035 : req, struct dcerpc_lsa_QueryTrustedDomainInfoByName_state);
10036 0 : NTSTATUS status;
10037 0 : TALLOC_CTX *mem_ctx;
10038 :
10039 0 : if (state->out_mem_ctx) {
10040 0 : mem_ctx = state->out_mem_ctx;
10041 : } else {
10042 0 : mem_ctx = state;
10043 : }
10044 :
10045 0 : status = dcerpc_lsa_QueryTrustedDomainInfoByName_r_recv(subreq, mem_ctx);
10046 0 : TALLOC_FREE(subreq);
10047 0 : if (tevent_req_nterror(req, status)) {
10048 0 : return;
10049 : }
10050 :
10051 : /* Copy out parameters */
10052 0 : *state->orig.out.info = *state->tmp.out.info;
10053 :
10054 : /* Copy result */
10055 0 : state->orig.out.result = state->tmp.out.result;
10056 :
10057 : /* Reset temporary structure */
10058 0 : NDR_ZERO_STRUCT(state->tmp);
10059 :
10060 0 : tevent_req_done(req);
10061 : }
10062 :
10063 0 : NTSTATUS dcerpc_lsa_QueryTrustedDomainInfoByName_recv(struct tevent_req *req,
10064 : TALLOC_CTX *mem_ctx,
10065 : NTSTATUS *result)
10066 : {
10067 0 : struct dcerpc_lsa_QueryTrustedDomainInfoByName_state *state = tevent_req_data(
10068 : req, struct dcerpc_lsa_QueryTrustedDomainInfoByName_state);
10069 0 : NTSTATUS status;
10070 :
10071 0 : if (tevent_req_is_nterror(req, &status)) {
10072 0 : tevent_req_received(req);
10073 0 : return status;
10074 : }
10075 :
10076 : /* Steal possible out parameters to the callers context */
10077 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
10078 :
10079 : /* Return result */
10080 0 : *result = state->orig.out.result;
10081 :
10082 0 : tevent_req_received(req);
10083 0 : return NT_STATUS_OK;
10084 : }
10085 :
10086 0 : NTSTATUS dcerpc_lsa_QueryTrustedDomainInfoByName(struct dcerpc_binding_handle *h,
10087 : TALLOC_CTX *mem_ctx,
10088 : struct policy_handle *_handle /* [in] [ref] */,
10089 : struct lsa_String *_trusted_domain /* [in] [ref] */,
10090 : enum lsa_TrustDomInfoEnum _level /* [in] */,
10091 : union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */,
10092 : NTSTATUS *result)
10093 : {
10094 0 : struct lsa_QueryTrustedDomainInfoByName r;
10095 0 : NTSTATUS status;
10096 :
10097 : /* In parameters */
10098 0 : r.in.handle = _handle;
10099 0 : r.in.trusted_domain = _trusted_domain;
10100 0 : r.in.level = _level;
10101 :
10102 : /* Out parameters */
10103 0 : r.out.info = _info;
10104 :
10105 : /* Result */
10106 0 : NDR_ZERO_STRUCT(r.out.result);
10107 :
10108 0 : status = dcerpc_lsa_QueryTrustedDomainInfoByName_r(h, mem_ctx, &r);
10109 0 : if (!NT_STATUS_IS_OK(status)) {
10110 0 : return status;
10111 : }
10112 :
10113 : /* Return variables */
10114 0 : *_info = *r.out.info;
10115 :
10116 : /* Return result */
10117 0 : *result = r.out.result;
10118 :
10119 0 : return NT_STATUS_OK;
10120 : }
10121 :
10122 : struct dcerpc_lsa_SetTrustedDomainInfoByName_r_state {
10123 : TALLOC_CTX *out_mem_ctx;
10124 : };
10125 :
10126 : static void dcerpc_lsa_SetTrustedDomainInfoByName_r_done(struct tevent_req *subreq);
10127 :
10128 0 : struct tevent_req *dcerpc_lsa_SetTrustedDomainInfoByName_r_send(TALLOC_CTX *mem_ctx,
10129 : struct tevent_context *ev,
10130 : struct dcerpc_binding_handle *h,
10131 : struct lsa_SetTrustedDomainInfoByName *r)
10132 : {
10133 0 : struct tevent_req *req;
10134 0 : struct dcerpc_lsa_SetTrustedDomainInfoByName_r_state *state;
10135 0 : struct tevent_req *subreq;
10136 :
10137 0 : req = tevent_req_create(mem_ctx, &state,
10138 : struct dcerpc_lsa_SetTrustedDomainInfoByName_r_state);
10139 0 : if (req == NULL) {
10140 0 : return NULL;
10141 : }
10142 :
10143 0 : state->out_mem_ctx = NULL;
10144 :
10145 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
10146 : NULL, &ndr_table_lsarpc,
10147 : NDR_LSA_SETTRUSTEDDOMAININFOBYNAME, state, r);
10148 0 : if (tevent_req_nomem(subreq, req)) {
10149 0 : return tevent_req_post(req, ev);
10150 : }
10151 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetTrustedDomainInfoByName_r_done, req);
10152 :
10153 0 : return req;
10154 : }
10155 :
10156 0 : static void dcerpc_lsa_SetTrustedDomainInfoByName_r_done(struct tevent_req *subreq)
10157 : {
10158 0 : struct tevent_req *req =
10159 0 : tevent_req_callback_data(subreq,
10160 : struct tevent_req);
10161 0 : NTSTATUS status;
10162 :
10163 0 : status = dcerpc_binding_handle_call_recv(subreq);
10164 0 : TALLOC_FREE(subreq);
10165 0 : if (tevent_req_nterror(req, status)) {
10166 0 : return;
10167 : }
10168 :
10169 0 : tevent_req_done(req);
10170 : }
10171 :
10172 0 : NTSTATUS dcerpc_lsa_SetTrustedDomainInfoByName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
10173 : {
10174 0 : struct dcerpc_lsa_SetTrustedDomainInfoByName_r_state *state =
10175 0 : tevent_req_data(req,
10176 : struct dcerpc_lsa_SetTrustedDomainInfoByName_r_state);
10177 0 : NTSTATUS status;
10178 :
10179 0 : if (tevent_req_is_nterror(req, &status)) {
10180 0 : tevent_req_received(req);
10181 0 : return status;
10182 : }
10183 :
10184 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
10185 :
10186 0 : tevent_req_received(req);
10187 0 : return NT_STATUS_OK;
10188 : }
10189 :
10190 18 : NTSTATUS dcerpc_lsa_SetTrustedDomainInfoByName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_SetTrustedDomainInfoByName *r)
10191 : {
10192 0 : NTSTATUS status;
10193 :
10194 18 : status = dcerpc_binding_handle_call(h,
10195 : NULL, &ndr_table_lsarpc,
10196 : NDR_LSA_SETTRUSTEDDOMAININFOBYNAME, mem_ctx, r);
10197 :
10198 18 : return status;
10199 : }
10200 :
10201 : struct dcerpc_lsa_SetTrustedDomainInfoByName_state {
10202 : struct lsa_SetTrustedDomainInfoByName orig;
10203 : struct lsa_SetTrustedDomainInfoByName tmp;
10204 : TALLOC_CTX *out_mem_ctx;
10205 : };
10206 :
10207 : static void dcerpc_lsa_SetTrustedDomainInfoByName_done(struct tevent_req *subreq);
10208 :
10209 0 : struct tevent_req *dcerpc_lsa_SetTrustedDomainInfoByName_send(TALLOC_CTX *mem_ctx,
10210 : struct tevent_context *ev,
10211 : struct dcerpc_binding_handle *h,
10212 : struct policy_handle *_handle /* [in] [ref] */,
10213 : struct lsa_String *_trusted_domain /* [in] [ref] */,
10214 : enum lsa_TrustDomInfoEnum _level /* [in] */,
10215 : union lsa_TrustedDomainInfo *_info /* [in] [ref,switch_is(level)] */)
10216 : {
10217 0 : struct tevent_req *req;
10218 0 : struct dcerpc_lsa_SetTrustedDomainInfoByName_state *state;
10219 0 : struct tevent_req *subreq;
10220 :
10221 0 : req = tevent_req_create(mem_ctx, &state,
10222 : struct dcerpc_lsa_SetTrustedDomainInfoByName_state);
10223 0 : if (req == NULL) {
10224 0 : return NULL;
10225 : }
10226 0 : state->out_mem_ctx = NULL;
10227 :
10228 : /* In parameters */
10229 0 : state->orig.in.handle = _handle;
10230 0 : state->orig.in.trusted_domain = _trusted_domain;
10231 0 : state->orig.in.level = _level;
10232 0 : state->orig.in.info = _info;
10233 :
10234 : /* Out parameters */
10235 :
10236 : /* Result */
10237 0 : NDR_ZERO_STRUCT(state->orig.out.result);
10238 :
10239 : /* make a temporary copy, that we pass to the dispatch function */
10240 0 : state->tmp = state->orig;
10241 :
10242 0 : subreq = dcerpc_lsa_SetTrustedDomainInfoByName_r_send(state, ev, h, &state->tmp);
10243 0 : if (tevent_req_nomem(subreq, req)) {
10244 0 : return tevent_req_post(req, ev);
10245 : }
10246 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetTrustedDomainInfoByName_done, req);
10247 0 : return req;
10248 : }
10249 :
10250 0 : static void dcerpc_lsa_SetTrustedDomainInfoByName_done(struct tevent_req *subreq)
10251 : {
10252 0 : struct tevent_req *req = tevent_req_callback_data(
10253 : subreq, struct tevent_req);
10254 0 : struct dcerpc_lsa_SetTrustedDomainInfoByName_state *state = tevent_req_data(
10255 : req, struct dcerpc_lsa_SetTrustedDomainInfoByName_state);
10256 0 : NTSTATUS status;
10257 0 : TALLOC_CTX *mem_ctx;
10258 :
10259 0 : if (state->out_mem_ctx) {
10260 0 : mem_ctx = state->out_mem_ctx;
10261 : } else {
10262 0 : mem_ctx = state;
10263 : }
10264 :
10265 0 : status = dcerpc_lsa_SetTrustedDomainInfoByName_r_recv(subreq, mem_ctx);
10266 0 : TALLOC_FREE(subreq);
10267 0 : if (tevent_req_nterror(req, status)) {
10268 0 : return;
10269 : }
10270 :
10271 : /* Copy out parameters */
10272 :
10273 : /* Copy result */
10274 0 : state->orig.out.result = state->tmp.out.result;
10275 :
10276 : /* Reset temporary structure */
10277 0 : NDR_ZERO_STRUCT(state->tmp);
10278 :
10279 0 : tevent_req_done(req);
10280 : }
10281 :
10282 0 : NTSTATUS dcerpc_lsa_SetTrustedDomainInfoByName_recv(struct tevent_req *req,
10283 : TALLOC_CTX *mem_ctx,
10284 : NTSTATUS *result)
10285 : {
10286 0 : struct dcerpc_lsa_SetTrustedDomainInfoByName_state *state = tevent_req_data(
10287 : req, struct dcerpc_lsa_SetTrustedDomainInfoByName_state);
10288 0 : NTSTATUS status;
10289 :
10290 0 : if (tevent_req_is_nterror(req, &status)) {
10291 0 : tevent_req_received(req);
10292 0 : return status;
10293 : }
10294 :
10295 : /* Steal possible out parameters to the callers context */
10296 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
10297 :
10298 : /* Return result */
10299 0 : *result = state->orig.out.result;
10300 :
10301 0 : tevent_req_received(req);
10302 0 : return NT_STATUS_OK;
10303 : }
10304 :
10305 0 : NTSTATUS dcerpc_lsa_SetTrustedDomainInfoByName(struct dcerpc_binding_handle *h,
10306 : TALLOC_CTX *mem_ctx,
10307 : struct policy_handle *_handle /* [in] [ref] */,
10308 : struct lsa_String *_trusted_domain /* [in] [ref] */,
10309 : enum lsa_TrustDomInfoEnum _level /* [in] */,
10310 : union lsa_TrustedDomainInfo *_info /* [in] [ref,switch_is(level)] */,
10311 : NTSTATUS *result)
10312 : {
10313 0 : struct lsa_SetTrustedDomainInfoByName r;
10314 0 : NTSTATUS status;
10315 :
10316 : /* In parameters */
10317 0 : r.in.handle = _handle;
10318 0 : r.in.trusted_domain = _trusted_domain;
10319 0 : r.in.level = _level;
10320 0 : r.in.info = _info;
10321 :
10322 : /* Out parameters */
10323 :
10324 : /* Result */
10325 0 : NDR_ZERO_STRUCT(r.out.result);
10326 :
10327 0 : status = dcerpc_lsa_SetTrustedDomainInfoByName_r(h, mem_ctx, &r);
10328 0 : if (!NT_STATUS_IS_OK(status)) {
10329 0 : return status;
10330 : }
10331 :
10332 : /* Return variables */
10333 :
10334 : /* Return result */
10335 0 : *result = r.out.result;
10336 :
10337 0 : return NT_STATUS_OK;
10338 : }
10339 :
10340 : struct dcerpc_lsa_EnumTrustedDomainsEx_r_state {
10341 : TALLOC_CTX *out_mem_ctx;
10342 : };
10343 :
10344 : static void dcerpc_lsa_EnumTrustedDomainsEx_r_done(struct tevent_req *subreq);
10345 :
10346 0 : struct tevent_req *dcerpc_lsa_EnumTrustedDomainsEx_r_send(TALLOC_CTX *mem_ctx,
10347 : struct tevent_context *ev,
10348 : struct dcerpc_binding_handle *h,
10349 : struct lsa_EnumTrustedDomainsEx *r)
10350 : {
10351 0 : struct tevent_req *req;
10352 0 : struct dcerpc_lsa_EnumTrustedDomainsEx_r_state *state;
10353 0 : struct tevent_req *subreq;
10354 :
10355 0 : req = tevent_req_create(mem_ctx, &state,
10356 : struct dcerpc_lsa_EnumTrustedDomainsEx_r_state);
10357 0 : if (req == NULL) {
10358 0 : return NULL;
10359 : }
10360 :
10361 0 : state->out_mem_ctx = talloc_new(state);
10362 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
10363 0 : return tevent_req_post(req, ev);
10364 : }
10365 :
10366 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
10367 : NULL, &ndr_table_lsarpc,
10368 0 : NDR_LSA_ENUMTRUSTEDDOMAINSEX, state->out_mem_ctx, r);
10369 0 : if (tevent_req_nomem(subreq, req)) {
10370 0 : return tevent_req_post(req, ev);
10371 : }
10372 0 : tevent_req_set_callback(subreq, dcerpc_lsa_EnumTrustedDomainsEx_r_done, req);
10373 :
10374 0 : return req;
10375 : }
10376 :
10377 0 : static void dcerpc_lsa_EnumTrustedDomainsEx_r_done(struct tevent_req *subreq)
10378 : {
10379 0 : struct tevent_req *req =
10380 0 : tevent_req_callback_data(subreq,
10381 : struct tevent_req);
10382 0 : NTSTATUS status;
10383 :
10384 0 : status = dcerpc_binding_handle_call_recv(subreq);
10385 0 : TALLOC_FREE(subreq);
10386 0 : if (tevent_req_nterror(req, status)) {
10387 0 : return;
10388 : }
10389 :
10390 0 : tevent_req_done(req);
10391 : }
10392 :
10393 0 : NTSTATUS dcerpc_lsa_EnumTrustedDomainsEx_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
10394 : {
10395 0 : struct dcerpc_lsa_EnumTrustedDomainsEx_r_state *state =
10396 0 : tevent_req_data(req,
10397 : struct dcerpc_lsa_EnumTrustedDomainsEx_r_state);
10398 0 : NTSTATUS status;
10399 :
10400 0 : if (tevent_req_is_nterror(req, &status)) {
10401 0 : tevent_req_received(req);
10402 0 : return status;
10403 : }
10404 :
10405 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
10406 :
10407 0 : tevent_req_received(req);
10408 0 : return NT_STATUS_OK;
10409 : }
10410 :
10411 54 : NTSTATUS dcerpc_lsa_EnumTrustedDomainsEx_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_EnumTrustedDomainsEx *r)
10412 : {
10413 0 : NTSTATUS status;
10414 :
10415 54 : status = dcerpc_binding_handle_call(h,
10416 : NULL, &ndr_table_lsarpc,
10417 : NDR_LSA_ENUMTRUSTEDDOMAINSEX, mem_ctx, r);
10418 :
10419 54 : return status;
10420 : }
10421 :
10422 : struct dcerpc_lsa_EnumTrustedDomainsEx_state {
10423 : struct lsa_EnumTrustedDomainsEx orig;
10424 : struct lsa_EnumTrustedDomainsEx tmp;
10425 : TALLOC_CTX *out_mem_ctx;
10426 : };
10427 :
10428 : static void dcerpc_lsa_EnumTrustedDomainsEx_done(struct tevent_req *subreq);
10429 :
10430 0 : struct tevent_req *dcerpc_lsa_EnumTrustedDomainsEx_send(TALLOC_CTX *mem_ctx,
10431 : struct tevent_context *ev,
10432 : struct dcerpc_binding_handle *h,
10433 : struct policy_handle *_handle /* [in] [ref] */,
10434 : uint32_t *_resume_handle /* [in,out] [ref] */,
10435 : struct lsa_DomainListEx *_domains /* [out] [ref] */,
10436 : uint32_t _max_size /* [in] */)
10437 : {
10438 0 : struct tevent_req *req;
10439 0 : struct dcerpc_lsa_EnumTrustedDomainsEx_state *state;
10440 0 : struct tevent_req *subreq;
10441 :
10442 0 : req = tevent_req_create(mem_ctx, &state,
10443 : struct dcerpc_lsa_EnumTrustedDomainsEx_state);
10444 0 : if (req == NULL) {
10445 0 : return NULL;
10446 : }
10447 0 : state->out_mem_ctx = NULL;
10448 :
10449 : /* In parameters */
10450 0 : state->orig.in.handle = _handle;
10451 0 : state->orig.in.resume_handle = _resume_handle;
10452 0 : state->orig.in.max_size = _max_size;
10453 :
10454 : /* Out parameters */
10455 0 : state->orig.out.resume_handle = _resume_handle;
10456 0 : state->orig.out.domains = _domains;
10457 :
10458 : /* Result */
10459 0 : NDR_ZERO_STRUCT(state->orig.out.result);
10460 :
10461 0 : state->out_mem_ctx = talloc_named_const(state, 0,
10462 : "dcerpc_lsa_EnumTrustedDomainsEx_out_memory");
10463 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
10464 0 : return tevent_req_post(req, ev);
10465 : }
10466 :
10467 : /* make a temporary copy, that we pass to the dispatch function */
10468 0 : state->tmp = state->orig;
10469 :
10470 0 : subreq = dcerpc_lsa_EnumTrustedDomainsEx_r_send(state, ev, h, &state->tmp);
10471 0 : if (tevent_req_nomem(subreq, req)) {
10472 0 : return tevent_req_post(req, ev);
10473 : }
10474 0 : tevent_req_set_callback(subreq, dcerpc_lsa_EnumTrustedDomainsEx_done, req);
10475 0 : return req;
10476 : }
10477 :
10478 0 : static void dcerpc_lsa_EnumTrustedDomainsEx_done(struct tevent_req *subreq)
10479 : {
10480 0 : struct tevent_req *req = tevent_req_callback_data(
10481 : subreq, struct tevent_req);
10482 0 : struct dcerpc_lsa_EnumTrustedDomainsEx_state *state = tevent_req_data(
10483 : req, struct dcerpc_lsa_EnumTrustedDomainsEx_state);
10484 0 : NTSTATUS status;
10485 0 : TALLOC_CTX *mem_ctx;
10486 :
10487 0 : if (state->out_mem_ctx) {
10488 0 : mem_ctx = state->out_mem_ctx;
10489 : } else {
10490 0 : mem_ctx = state;
10491 : }
10492 :
10493 0 : status = dcerpc_lsa_EnumTrustedDomainsEx_r_recv(subreq, mem_ctx);
10494 0 : TALLOC_FREE(subreq);
10495 0 : if (tevent_req_nterror(req, status)) {
10496 0 : return;
10497 : }
10498 :
10499 : /* Copy out parameters */
10500 0 : *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
10501 0 : *state->orig.out.domains = *state->tmp.out.domains;
10502 :
10503 : /* Copy result */
10504 0 : state->orig.out.result = state->tmp.out.result;
10505 :
10506 : /* Reset temporary structure */
10507 0 : NDR_ZERO_STRUCT(state->tmp);
10508 :
10509 0 : tevent_req_done(req);
10510 : }
10511 :
10512 0 : NTSTATUS dcerpc_lsa_EnumTrustedDomainsEx_recv(struct tevent_req *req,
10513 : TALLOC_CTX *mem_ctx,
10514 : NTSTATUS *result)
10515 : {
10516 0 : struct dcerpc_lsa_EnumTrustedDomainsEx_state *state = tevent_req_data(
10517 : req, struct dcerpc_lsa_EnumTrustedDomainsEx_state);
10518 0 : NTSTATUS status;
10519 :
10520 0 : if (tevent_req_is_nterror(req, &status)) {
10521 0 : tevent_req_received(req);
10522 0 : return status;
10523 : }
10524 :
10525 : /* Steal possible out parameters to the callers context */
10526 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
10527 :
10528 : /* Return result */
10529 0 : *result = state->orig.out.result;
10530 :
10531 0 : tevent_req_received(req);
10532 0 : return NT_STATUS_OK;
10533 : }
10534 :
10535 0 : NTSTATUS dcerpc_lsa_EnumTrustedDomainsEx(struct dcerpc_binding_handle *h,
10536 : TALLOC_CTX *mem_ctx,
10537 : struct policy_handle *_handle /* [in] [ref] */,
10538 : uint32_t *_resume_handle /* [in,out] [ref] */,
10539 : struct lsa_DomainListEx *_domains /* [out] [ref] */,
10540 : uint32_t _max_size /* [in] */,
10541 : NTSTATUS *result)
10542 : {
10543 0 : struct lsa_EnumTrustedDomainsEx r;
10544 0 : NTSTATUS status;
10545 :
10546 : /* In parameters */
10547 0 : r.in.handle = _handle;
10548 0 : r.in.resume_handle = _resume_handle;
10549 0 : r.in.max_size = _max_size;
10550 :
10551 : /* Out parameters */
10552 0 : r.out.resume_handle = _resume_handle;
10553 0 : r.out.domains = _domains;
10554 :
10555 : /* Result */
10556 0 : NDR_ZERO_STRUCT(r.out.result);
10557 :
10558 0 : status = dcerpc_lsa_EnumTrustedDomainsEx_r(h, mem_ctx, &r);
10559 0 : if (!NT_STATUS_IS_OK(status)) {
10560 0 : return status;
10561 : }
10562 :
10563 : /* Return variables */
10564 0 : *_resume_handle = *r.out.resume_handle;
10565 0 : *_domains = *r.out.domains;
10566 :
10567 : /* Return result */
10568 0 : *result = r.out.result;
10569 :
10570 0 : return NT_STATUS_OK;
10571 : }
10572 :
10573 : struct dcerpc_lsa_CreateTrustedDomainEx_r_state {
10574 : TALLOC_CTX *out_mem_ctx;
10575 : };
10576 :
10577 : static void dcerpc_lsa_CreateTrustedDomainEx_r_done(struct tevent_req *subreq);
10578 :
10579 0 : struct tevent_req *dcerpc_lsa_CreateTrustedDomainEx_r_send(TALLOC_CTX *mem_ctx,
10580 : struct tevent_context *ev,
10581 : struct dcerpc_binding_handle *h,
10582 : struct lsa_CreateTrustedDomainEx *r)
10583 : {
10584 0 : struct tevent_req *req;
10585 0 : struct dcerpc_lsa_CreateTrustedDomainEx_r_state *state;
10586 0 : struct tevent_req *subreq;
10587 :
10588 0 : req = tevent_req_create(mem_ctx, &state,
10589 : struct dcerpc_lsa_CreateTrustedDomainEx_r_state);
10590 0 : if (req == NULL) {
10591 0 : return NULL;
10592 : }
10593 :
10594 0 : state->out_mem_ctx = talloc_new(state);
10595 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
10596 0 : return tevent_req_post(req, ev);
10597 : }
10598 :
10599 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
10600 : NULL, &ndr_table_lsarpc,
10601 0 : NDR_LSA_CREATETRUSTEDDOMAINEX, state->out_mem_ctx, r);
10602 0 : if (tevent_req_nomem(subreq, req)) {
10603 0 : return tevent_req_post(req, ev);
10604 : }
10605 0 : tevent_req_set_callback(subreq, dcerpc_lsa_CreateTrustedDomainEx_r_done, req);
10606 :
10607 0 : return req;
10608 : }
10609 :
10610 0 : static void dcerpc_lsa_CreateTrustedDomainEx_r_done(struct tevent_req *subreq)
10611 : {
10612 0 : struct tevent_req *req =
10613 0 : tevent_req_callback_data(subreq,
10614 : struct tevent_req);
10615 0 : NTSTATUS status;
10616 :
10617 0 : status = dcerpc_binding_handle_call_recv(subreq);
10618 0 : TALLOC_FREE(subreq);
10619 0 : if (tevent_req_nterror(req, status)) {
10620 0 : return;
10621 : }
10622 :
10623 0 : tevent_req_done(req);
10624 : }
10625 :
10626 0 : NTSTATUS dcerpc_lsa_CreateTrustedDomainEx_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
10627 : {
10628 0 : struct dcerpc_lsa_CreateTrustedDomainEx_r_state *state =
10629 0 : tevent_req_data(req,
10630 : struct dcerpc_lsa_CreateTrustedDomainEx_r_state);
10631 0 : NTSTATUS status;
10632 :
10633 0 : if (tevent_req_is_nterror(req, &status)) {
10634 0 : tevent_req_received(req);
10635 0 : return status;
10636 : }
10637 :
10638 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
10639 :
10640 0 : tevent_req_received(req);
10641 0 : return NT_STATUS_OK;
10642 : }
10643 :
10644 36 : NTSTATUS dcerpc_lsa_CreateTrustedDomainEx_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_CreateTrustedDomainEx *r)
10645 : {
10646 0 : NTSTATUS status;
10647 :
10648 36 : status = dcerpc_binding_handle_call(h,
10649 : NULL, &ndr_table_lsarpc,
10650 : NDR_LSA_CREATETRUSTEDDOMAINEX, mem_ctx, r);
10651 :
10652 36 : return status;
10653 : }
10654 :
10655 : struct dcerpc_lsa_CreateTrustedDomainEx_state {
10656 : struct lsa_CreateTrustedDomainEx orig;
10657 : struct lsa_CreateTrustedDomainEx tmp;
10658 : TALLOC_CTX *out_mem_ctx;
10659 : };
10660 :
10661 : static void dcerpc_lsa_CreateTrustedDomainEx_done(struct tevent_req *subreq);
10662 :
10663 0 : struct tevent_req *dcerpc_lsa_CreateTrustedDomainEx_send(TALLOC_CTX *mem_ctx,
10664 : struct tevent_context *ev,
10665 : struct dcerpc_binding_handle *h,
10666 : struct policy_handle *_policy_handle /* [in] [ref] */,
10667 : struct lsa_TrustDomainInfoInfoEx *_info /* [in] [ref] */,
10668 : struct lsa_TrustDomainInfoAuthInfo *_auth_info /* [in] [ref] */,
10669 : uint32_t _access_mask /* [in] */,
10670 : struct policy_handle *_trustdom_handle /* [out] [ref] */)
10671 : {
10672 0 : struct tevent_req *req;
10673 0 : struct dcerpc_lsa_CreateTrustedDomainEx_state *state;
10674 0 : struct tevent_req *subreq;
10675 :
10676 0 : req = tevent_req_create(mem_ctx, &state,
10677 : struct dcerpc_lsa_CreateTrustedDomainEx_state);
10678 0 : if (req == NULL) {
10679 0 : return NULL;
10680 : }
10681 0 : state->out_mem_ctx = NULL;
10682 :
10683 : /* In parameters */
10684 0 : state->orig.in.policy_handle = _policy_handle;
10685 0 : state->orig.in.info = _info;
10686 0 : state->orig.in.auth_info = _auth_info;
10687 0 : state->orig.in.access_mask = _access_mask;
10688 :
10689 : /* Out parameters */
10690 0 : state->orig.out.trustdom_handle = _trustdom_handle;
10691 :
10692 : /* Result */
10693 0 : NDR_ZERO_STRUCT(state->orig.out.result);
10694 :
10695 0 : state->out_mem_ctx = talloc_named_const(state, 0,
10696 : "dcerpc_lsa_CreateTrustedDomainEx_out_memory");
10697 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
10698 0 : return tevent_req_post(req, ev);
10699 : }
10700 :
10701 : /* make a temporary copy, that we pass to the dispatch function */
10702 0 : state->tmp = state->orig;
10703 :
10704 0 : subreq = dcerpc_lsa_CreateTrustedDomainEx_r_send(state, ev, h, &state->tmp);
10705 0 : if (tevent_req_nomem(subreq, req)) {
10706 0 : return tevent_req_post(req, ev);
10707 : }
10708 0 : tevent_req_set_callback(subreq, dcerpc_lsa_CreateTrustedDomainEx_done, req);
10709 0 : return req;
10710 : }
10711 :
10712 0 : static void dcerpc_lsa_CreateTrustedDomainEx_done(struct tevent_req *subreq)
10713 : {
10714 0 : struct tevent_req *req = tevent_req_callback_data(
10715 : subreq, struct tevent_req);
10716 0 : struct dcerpc_lsa_CreateTrustedDomainEx_state *state = tevent_req_data(
10717 : req, struct dcerpc_lsa_CreateTrustedDomainEx_state);
10718 0 : NTSTATUS status;
10719 0 : TALLOC_CTX *mem_ctx;
10720 :
10721 0 : if (state->out_mem_ctx) {
10722 0 : mem_ctx = state->out_mem_ctx;
10723 : } else {
10724 0 : mem_ctx = state;
10725 : }
10726 :
10727 0 : status = dcerpc_lsa_CreateTrustedDomainEx_r_recv(subreq, mem_ctx);
10728 0 : TALLOC_FREE(subreq);
10729 0 : if (tevent_req_nterror(req, status)) {
10730 0 : return;
10731 : }
10732 :
10733 : /* Copy out parameters */
10734 0 : *state->orig.out.trustdom_handle = *state->tmp.out.trustdom_handle;
10735 :
10736 : /* Copy result */
10737 0 : state->orig.out.result = state->tmp.out.result;
10738 :
10739 : /* Reset temporary structure */
10740 0 : NDR_ZERO_STRUCT(state->tmp);
10741 :
10742 0 : tevent_req_done(req);
10743 : }
10744 :
10745 0 : NTSTATUS dcerpc_lsa_CreateTrustedDomainEx_recv(struct tevent_req *req,
10746 : TALLOC_CTX *mem_ctx,
10747 : NTSTATUS *result)
10748 : {
10749 0 : struct dcerpc_lsa_CreateTrustedDomainEx_state *state = tevent_req_data(
10750 : req, struct dcerpc_lsa_CreateTrustedDomainEx_state);
10751 0 : NTSTATUS status;
10752 :
10753 0 : if (tevent_req_is_nterror(req, &status)) {
10754 0 : tevent_req_received(req);
10755 0 : return status;
10756 : }
10757 :
10758 : /* Steal possible out parameters to the callers context */
10759 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
10760 :
10761 : /* Return result */
10762 0 : *result = state->orig.out.result;
10763 :
10764 0 : tevent_req_received(req);
10765 0 : return NT_STATUS_OK;
10766 : }
10767 :
10768 0 : NTSTATUS dcerpc_lsa_CreateTrustedDomainEx(struct dcerpc_binding_handle *h,
10769 : TALLOC_CTX *mem_ctx,
10770 : struct policy_handle *_policy_handle /* [in] [ref] */,
10771 : struct lsa_TrustDomainInfoInfoEx *_info /* [in] [ref] */,
10772 : struct lsa_TrustDomainInfoAuthInfo *_auth_info /* [in] [ref] */,
10773 : uint32_t _access_mask /* [in] */,
10774 : struct policy_handle *_trustdom_handle /* [out] [ref] */,
10775 : NTSTATUS *result)
10776 : {
10777 0 : struct lsa_CreateTrustedDomainEx r;
10778 0 : NTSTATUS status;
10779 :
10780 : /* In parameters */
10781 0 : r.in.policy_handle = _policy_handle;
10782 0 : r.in.info = _info;
10783 0 : r.in.auth_info = _auth_info;
10784 0 : r.in.access_mask = _access_mask;
10785 :
10786 : /* Out parameters */
10787 0 : r.out.trustdom_handle = _trustdom_handle;
10788 :
10789 : /* Result */
10790 0 : NDR_ZERO_STRUCT(r.out.result);
10791 :
10792 0 : status = dcerpc_lsa_CreateTrustedDomainEx_r(h, mem_ctx, &r);
10793 0 : if (!NT_STATUS_IS_OK(status)) {
10794 0 : return status;
10795 : }
10796 :
10797 : /* Return variables */
10798 0 : *_trustdom_handle = *r.out.trustdom_handle;
10799 :
10800 : /* Return result */
10801 0 : *result = r.out.result;
10802 :
10803 0 : return NT_STATUS_OK;
10804 : }
10805 :
10806 : struct dcerpc_lsa_CloseTrustedDomainEx_r_state {
10807 : TALLOC_CTX *out_mem_ctx;
10808 : };
10809 :
10810 : static void dcerpc_lsa_CloseTrustedDomainEx_r_done(struct tevent_req *subreq);
10811 :
10812 0 : struct tevent_req *dcerpc_lsa_CloseTrustedDomainEx_r_send(TALLOC_CTX *mem_ctx,
10813 : struct tevent_context *ev,
10814 : struct dcerpc_binding_handle *h,
10815 : struct lsa_CloseTrustedDomainEx *r)
10816 : {
10817 0 : struct tevent_req *req;
10818 0 : struct dcerpc_lsa_CloseTrustedDomainEx_r_state *state;
10819 0 : struct tevent_req *subreq;
10820 :
10821 0 : req = tevent_req_create(mem_ctx, &state,
10822 : struct dcerpc_lsa_CloseTrustedDomainEx_r_state);
10823 0 : if (req == NULL) {
10824 0 : return NULL;
10825 : }
10826 :
10827 0 : state->out_mem_ctx = talloc_new(state);
10828 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
10829 0 : return tevent_req_post(req, ev);
10830 : }
10831 :
10832 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
10833 : NULL, &ndr_table_lsarpc,
10834 0 : NDR_LSA_CLOSETRUSTEDDOMAINEX, state->out_mem_ctx, r);
10835 0 : if (tevent_req_nomem(subreq, req)) {
10836 0 : return tevent_req_post(req, ev);
10837 : }
10838 0 : tevent_req_set_callback(subreq, dcerpc_lsa_CloseTrustedDomainEx_r_done, req);
10839 :
10840 0 : return req;
10841 : }
10842 :
10843 0 : static void dcerpc_lsa_CloseTrustedDomainEx_r_done(struct tevent_req *subreq)
10844 : {
10845 0 : struct tevent_req *req =
10846 0 : tevent_req_callback_data(subreq,
10847 : struct tevent_req);
10848 0 : NTSTATUS status;
10849 :
10850 0 : status = dcerpc_binding_handle_call_recv(subreq);
10851 0 : TALLOC_FREE(subreq);
10852 0 : if (tevent_req_nterror(req, status)) {
10853 0 : return;
10854 : }
10855 :
10856 0 : tevent_req_done(req);
10857 : }
10858 :
10859 0 : NTSTATUS dcerpc_lsa_CloseTrustedDomainEx_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
10860 : {
10861 0 : struct dcerpc_lsa_CloseTrustedDomainEx_r_state *state =
10862 0 : tevent_req_data(req,
10863 : struct dcerpc_lsa_CloseTrustedDomainEx_r_state);
10864 0 : NTSTATUS status;
10865 :
10866 0 : if (tevent_req_is_nterror(req, &status)) {
10867 0 : tevent_req_received(req);
10868 0 : return status;
10869 : }
10870 :
10871 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
10872 :
10873 0 : tevent_req_received(req);
10874 0 : return NT_STATUS_OK;
10875 : }
10876 :
10877 144 : NTSTATUS dcerpc_lsa_CloseTrustedDomainEx_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_CloseTrustedDomainEx *r)
10878 : {
10879 0 : NTSTATUS status;
10880 :
10881 144 : status = dcerpc_binding_handle_call(h,
10882 : NULL, &ndr_table_lsarpc,
10883 : NDR_LSA_CLOSETRUSTEDDOMAINEX, mem_ctx, r);
10884 :
10885 144 : return status;
10886 : }
10887 :
10888 : struct dcerpc_lsa_CloseTrustedDomainEx_state {
10889 : struct lsa_CloseTrustedDomainEx orig;
10890 : struct lsa_CloseTrustedDomainEx tmp;
10891 : TALLOC_CTX *out_mem_ctx;
10892 : };
10893 :
10894 : static void dcerpc_lsa_CloseTrustedDomainEx_done(struct tevent_req *subreq);
10895 :
10896 0 : struct tevent_req *dcerpc_lsa_CloseTrustedDomainEx_send(TALLOC_CTX *mem_ctx,
10897 : struct tevent_context *ev,
10898 : struct dcerpc_binding_handle *h,
10899 : struct policy_handle *_handle /* [in,out] [ref] */)
10900 : {
10901 0 : struct tevent_req *req;
10902 0 : struct dcerpc_lsa_CloseTrustedDomainEx_state *state;
10903 0 : struct tevent_req *subreq;
10904 :
10905 0 : req = tevent_req_create(mem_ctx, &state,
10906 : struct dcerpc_lsa_CloseTrustedDomainEx_state);
10907 0 : if (req == NULL) {
10908 0 : return NULL;
10909 : }
10910 0 : state->out_mem_ctx = NULL;
10911 :
10912 : /* In parameters */
10913 0 : state->orig.in.handle = _handle;
10914 :
10915 : /* Out parameters */
10916 0 : state->orig.out.handle = _handle;
10917 :
10918 : /* Result */
10919 0 : NDR_ZERO_STRUCT(state->orig.out.result);
10920 :
10921 0 : state->out_mem_ctx = talloc_named_const(state, 0,
10922 : "dcerpc_lsa_CloseTrustedDomainEx_out_memory");
10923 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
10924 0 : return tevent_req_post(req, ev);
10925 : }
10926 :
10927 : /* make a temporary copy, that we pass to the dispatch function */
10928 0 : state->tmp = state->orig;
10929 :
10930 0 : subreq = dcerpc_lsa_CloseTrustedDomainEx_r_send(state, ev, h, &state->tmp);
10931 0 : if (tevent_req_nomem(subreq, req)) {
10932 0 : return tevent_req_post(req, ev);
10933 : }
10934 0 : tevent_req_set_callback(subreq, dcerpc_lsa_CloseTrustedDomainEx_done, req);
10935 0 : return req;
10936 : }
10937 :
10938 0 : static void dcerpc_lsa_CloseTrustedDomainEx_done(struct tevent_req *subreq)
10939 : {
10940 0 : struct tevent_req *req = tevent_req_callback_data(
10941 : subreq, struct tevent_req);
10942 0 : struct dcerpc_lsa_CloseTrustedDomainEx_state *state = tevent_req_data(
10943 : req, struct dcerpc_lsa_CloseTrustedDomainEx_state);
10944 0 : NTSTATUS status;
10945 0 : TALLOC_CTX *mem_ctx;
10946 :
10947 0 : if (state->out_mem_ctx) {
10948 0 : mem_ctx = state->out_mem_ctx;
10949 : } else {
10950 0 : mem_ctx = state;
10951 : }
10952 :
10953 0 : status = dcerpc_lsa_CloseTrustedDomainEx_r_recv(subreq, mem_ctx);
10954 0 : TALLOC_FREE(subreq);
10955 0 : if (tevent_req_nterror(req, status)) {
10956 0 : return;
10957 : }
10958 :
10959 : /* Copy out parameters */
10960 0 : *state->orig.out.handle = *state->tmp.out.handle;
10961 :
10962 : /* Copy result */
10963 0 : state->orig.out.result = state->tmp.out.result;
10964 :
10965 : /* Reset temporary structure */
10966 0 : NDR_ZERO_STRUCT(state->tmp);
10967 :
10968 0 : tevent_req_done(req);
10969 : }
10970 :
10971 0 : NTSTATUS dcerpc_lsa_CloseTrustedDomainEx_recv(struct tevent_req *req,
10972 : TALLOC_CTX *mem_ctx,
10973 : NTSTATUS *result)
10974 : {
10975 0 : struct dcerpc_lsa_CloseTrustedDomainEx_state *state = tevent_req_data(
10976 : req, struct dcerpc_lsa_CloseTrustedDomainEx_state);
10977 0 : NTSTATUS status;
10978 :
10979 0 : if (tevent_req_is_nterror(req, &status)) {
10980 0 : tevent_req_received(req);
10981 0 : return status;
10982 : }
10983 :
10984 : /* Steal possible out parameters to the callers context */
10985 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
10986 :
10987 : /* Return result */
10988 0 : *result = state->orig.out.result;
10989 :
10990 0 : tevent_req_received(req);
10991 0 : return NT_STATUS_OK;
10992 : }
10993 :
10994 0 : NTSTATUS dcerpc_lsa_CloseTrustedDomainEx(struct dcerpc_binding_handle *h,
10995 : TALLOC_CTX *mem_ctx,
10996 : struct policy_handle *_handle /* [in,out] [ref] */,
10997 : NTSTATUS *result)
10998 : {
10999 0 : struct lsa_CloseTrustedDomainEx r;
11000 0 : NTSTATUS status;
11001 :
11002 : /* In parameters */
11003 0 : r.in.handle = _handle;
11004 :
11005 : /* Out parameters */
11006 0 : r.out.handle = _handle;
11007 :
11008 : /* Result */
11009 0 : NDR_ZERO_STRUCT(r.out.result);
11010 :
11011 0 : status = dcerpc_lsa_CloseTrustedDomainEx_r(h, mem_ctx, &r);
11012 0 : if (!NT_STATUS_IS_OK(status)) {
11013 0 : return status;
11014 : }
11015 :
11016 : /* Return variables */
11017 0 : *_handle = *r.out.handle;
11018 :
11019 : /* Return result */
11020 0 : *result = r.out.result;
11021 :
11022 0 : return NT_STATUS_OK;
11023 : }
11024 :
11025 : struct dcerpc_lsa_QueryDomainInformationPolicy_r_state {
11026 : TALLOC_CTX *out_mem_ctx;
11027 : };
11028 :
11029 : static void dcerpc_lsa_QueryDomainInformationPolicy_r_done(struct tevent_req *subreq);
11030 :
11031 0 : struct tevent_req *dcerpc_lsa_QueryDomainInformationPolicy_r_send(TALLOC_CTX *mem_ctx,
11032 : struct tevent_context *ev,
11033 : struct dcerpc_binding_handle *h,
11034 : struct lsa_QueryDomainInformationPolicy *r)
11035 : {
11036 0 : struct tevent_req *req;
11037 0 : struct dcerpc_lsa_QueryDomainInformationPolicy_r_state *state;
11038 0 : struct tevent_req *subreq;
11039 :
11040 0 : req = tevent_req_create(mem_ctx, &state,
11041 : struct dcerpc_lsa_QueryDomainInformationPolicy_r_state);
11042 0 : if (req == NULL) {
11043 0 : return NULL;
11044 : }
11045 :
11046 0 : state->out_mem_ctx = talloc_new(state);
11047 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
11048 0 : return tevent_req_post(req, ev);
11049 : }
11050 :
11051 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
11052 : NULL, &ndr_table_lsarpc,
11053 0 : NDR_LSA_QUERYDOMAININFORMATIONPOLICY, state->out_mem_ctx, r);
11054 0 : if (tevent_req_nomem(subreq, req)) {
11055 0 : return tevent_req_post(req, ev);
11056 : }
11057 0 : tevent_req_set_callback(subreq, dcerpc_lsa_QueryDomainInformationPolicy_r_done, req);
11058 :
11059 0 : return req;
11060 : }
11061 :
11062 0 : static void dcerpc_lsa_QueryDomainInformationPolicy_r_done(struct tevent_req *subreq)
11063 : {
11064 0 : struct tevent_req *req =
11065 0 : tevent_req_callback_data(subreq,
11066 : struct tevent_req);
11067 0 : NTSTATUS status;
11068 :
11069 0 : status = dcerpc_binding_handle_call_recv(subreq);
11070 0 : TALLOC_FREE(subreq);
11071 0 : if (tevent_req_nterror(req, status)) {
11072 0 : return;
11073 : }
11074 :
11075 0 : tevent_req_done(req);
11076 : }
11077 :
11078 0 : NTSTATUS dcerpc_lsa_QueryDomainInformationPolicy_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
11079 : {
11080 0 : struct dcerpc_lsa_QueryDomainInformationPolicy_r_state *state =
11081 0 : tevent_req_data(req,
11082 : struct dcerpc_lsa_QueryDomainInformationPolicy_r_state);
11083 0 : NTSTATUS status;
11084 :
11085 0 : if (tevent_req_is_nterror(req, &status)) {
11086 0 : tevent_req_received(req);
11087 0 : return status;
11088 : }
11089 :
11090 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
11091 :
11092 0 : tevent_req_received(req);
11093 0 : return NT_STATUS_OK;
11094 : }
11095 :
11096 24 : NTSTATUS dcerpc_lsa_QueryDomainInformationPolicy_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_QueryDomainInformationPolicy *r)
11097 : {
11098 0 : NTSTATUS status;
11099 :
11100 24 : status = dcerpc_binding_handle_call(h,
11101 : NULL, &ndr_table_lsarpc,
11102 : NDR_LSA_QUERYDOMAININFORMATIONPOLICY, mem_ctx, r);
11103 :
11104 24 : return status;
11105 : }
11106 :
11107 : struct dcerpc_lsa_QueryDomainInformationPolicy_state {
11108 : struct lsa_QueryDomainInformationPolicy orig;
11109 : struct lsa_QueryDomainInformationPolicy tmp;
11110 : TALLOC_CTX *out_mem_ctx;
11111 : };
11112 :
11113 : static void dcerpc_lsa_QueryDomainInformationPolicy_done(struct tevent_req *subreq);
11114 :
11115 0 : struct tevent_req *dcerpc_lsa_QueryDomainInformationPolicy_send(TALLOC_CTX *mem_ctx,
11116 : struct tevent_context *ev,
11117 : struct dcerpc_binding_handle *h,
11118 : struct policy_handle *_handle /* [in] [ref] */,
11119 : enum lsa_DomainInfoEnum _level /* [in] */,
11120 : union lsa_DomainInformationPolicy **_info /* [out] [ref,switch_is(level)] */)
11121 : {
11122 0 : struct tevent_req *req;
11123 0 : struct dcerpc_lsa_QueryDomainInformationPolicy_state *state;
11124 0 : struct tevent_req *subreq;
11125 :
11126 0 : req = tevent_req_create(mem_ctx, &state,
11127 : struct dcerpc_lsa_QueryDomainInformationPolicy_state);
11128 0 : if (req == NULL) {
11129 0 : return NULL;
11130 : }
11131 0 : state->out_mem_ctx = NULL;
11132 :
11133 : /* In parameters */
11134 0 : state->orig.in.handle = _handle;
11135 0 : state->orig.in.level = _level;
11136 :
11137 : /* Out parameters */
11138 0 : state->orig.out.info = _info;
11139 :
11140 : /* Result */
11141 0 : NDR_ZERO_STRUCT(state->orig.out.result);
11142 :
11143 0 : state->out_mem_ctx = talloc_named_const(state, 0,
11144 : "dcerpc_lsa_QueryDomainInformationPolicy_out_memory");
11145 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
11146 0 : return tevent_req_post(req, ev);
11147 : }
11148 :
11149 : /* make a temporary copy, that we pass to the dispatch function */
11150 0 : state->tmp = state->orig;
11151 :
11152 0 : subreq = dcerpc_lsa_QueryDomainInformationPolicy_r_send(state, ev, h, &state->tmp);
11153 0 : if (tevent_req_nomem(subreq, req)) {
11154 0 : return tevent_req_post(req, ev);
11155 : }
11156 0 : tevent_req_set_callback(subreq, dcerpc_lsa_QueryDomainInformationPolicy_done, req);
11157 0 : return req;
11158 : }
11159 :
11160 0 : static void dcerpc_lsa_QueryDomainInformationPolicy_done(struct tevent_req *subreq)
11161 : {
11162 0 : struct tevent_req *req = tevent_req_callback_data(
11163 : subreq, struct tevent_req);
11164 0 : struct dcerpc_lsa_QueryDomainInformationPolicy_state *state = tevent_req_data(
11165 : req, struct dcerpc_lsa_QueryDomainInformationPolicy_state);
11166 0 : NTSTATUS status;
11167 0 : TALLOC_CTX *mem_ctx;
11168 :
11169 0 : if (state->out_mem_ctx) {
11170 0 : mem_ctx = state->out_mem_ctx;
11171 : } else {
11172 0 : mem_ctx = state;
11173 : }
11174 :
11175 0 : status = dcerpc_lsa_QueryDomainInformationPolicy_r_recv(subreq, mem_ctx);
11176 0 : TALLOC_FREE(subreq);
11177 0 : if (tevent_req_nterror(req, status)) {
11178 0 : return;
11179 : }
11180 :
11181 : /* Copy out parameters */
11182 0 : *state->orig.out.info = *state->tmp.out.info;
11183 :
11184 : /* Copy result */
11185 0 : state->orig.out.result = state->tmp.out.result;
11186 :
11187 : /* Reset temporary structure */
11188 0 : NDR_ZERO_STRUCT(state->tmp);
11189 :
11190 0 : tevent_req_done(req);
11191 : }
11192 :
11193 0 : NTSTATUS dcerpc_lsa_QueryDomainInformationPolicy_recv(struct tevent_req *req,
11194 : TALLOC_CTX *mem_ctx,
11195 : NTSTATUS *result)
11196 : {
11197 0 : struct dcerpc_lsa_QueryDomainInformationPolicy_state *state = tevent_req_data(
11198 : req, struct dcerpc_lsa_QueryDomainInformationPolicy_state);
11199 0 : NTSTATUS status;
11200 :
11201 0 : if (tevent_req_is_nterror(req, &status)) {
11202 0 : tevent_req_received(req);
11203 0 : return status;
11204 : }
11205 :
11206 : /* Steal possible out parameters to the callers context */
11207 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
11208 :
11209 : /* Return result */
11210 0 : *result = state->orig.out.result;
11211 :
11212 0 : tevent_req_received(req);
11213 0 : return NT_STATUS_OK;
11214 : }
11215 :
11216 0 : NTSTATUS dcerpc_lsa_QueryDomainInformationPolicy(struct dcerpc_binding_handle *h,
11217 : TALLOC_CTX *mem_ctx,
11218 : struct policy_handle *_handle /* [in] [ref] */,
11219 : enum lsa_DomainInfoEnum _level /* [in] */,
11220 : union lsa_DomainInformationPolicy **_info /* [out] [ref,switch_is(level)] */,
11221 : NTSTATUS *result)
11222 : {
11223 0 : struct lsa_QueryDomainInformationPolicy r;
11224 0 : NTSTATUS status;
11225 :
11226 : /* In parameters */
11227 0 : r.in.handle = _handle;
11228 0 : r.in.level = _level;
11229 :
11230 : /* Out parameters */
11231 0 : r.out.info = _info;
11232 :
11233 : /* Result */
11234 0 : NDR_ZERO_STRUCT(r.out.result);
11235 :
11236 0 : status = dcerpc_lsa_QueryDomainInformationPolicy_r(h, mem_ctx, &r);
11237 0 : if (!NT_STATUS_IS_OK(status)) {
11238 0 : return status;
11239 : }
11240 :
11241 : /* Return variables */
11242 0 : *_info = *r.out.info;
11243 :
11244 : /* Return result */
11245 0 : *result = r.out.result;
11246 :
11247 0 : return NT_STATUS_OK;
11248 : }
11249 :
11250 : struct dcerpc_lsa_SetDomainInformationPolicy_r_state {
11251 : TALLOC_CTX *out_mem_ctx;
11252 : };
11253 :
11254 : static void dcerpc_lsa_SetDomainInformationPolicy_r_done(struct tevent_req *subreq);
11255 :
11256 0 : struct tevent_req *dcerpc_lsa_SetDomainInformationPolicy_r_send(TALLOC_CTX *mem_ctx,
11257 : struct tevent_context *ev,
11258 : struct dcerpc_binding_handle *h,
11259 : struct lsa_SetDomainInformationPolicy *r)
11260 : {
11261 0 : struct tevent_req *req;
11262 0 : struct dcerpc_lsa_SetDomainInformationPolicy_r_state *state;
11263 0 : struct tevent_req *subreq;
11264 :
11265 0 : req = tevent_req_create(mem_ctx, &state,
11266 : struct dcerpc_lsa_SetDomainInformationPolicy_r_state);
11267 0 : if (req == NULL) {
11268 0 : return NULL;
11269 : }
11270 :
11271 0 : state->out_mem_ctx = NULL;
11272 :
11273 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
11274 : NULL, &ndr_table_lsarpc,
11275 : NDR_LSA_SETDOMAININFORMATIONPOLICY, state, r);
11276 0 : if (tevent_req_nomem(subreq, req)) {
11277 0 : return tevent_req_post(req, ev);
11278 : }
11279 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetDomainInformationPolicy_r_done, req);
11280 :
11281 0 : return req;
11282 : }
11283 :
11284 0 : static void dcerpc_lsa_SetDomainInformationPolicy_r_done(struct tevent_req *subreq)
11285 : {
11286 0 : struct tevent_req *req =
11287 0 : tevent_req_callback_data(subreq,
11288 : struct tevent_req);
11289 0 : NTSTATUS status;
11290 :
11291 0 : status = dcerpc_binding_handle_call_recv(subreq);
11292 0 : TALLOC_FREE(subreq);
11293 0 : if (tevent_req_nterror(req, status)) {
11294 0 : return;
11295 : }
11296 :
11297 0 : tevent_req_done(req);
11298 : }
11299 :
11300 0 : NTSTATUS dcerpc_lsa_SetDomainInformationPolicy_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
11301 : {
11302 0 : struct dcerpc_lsa_SetDomainInformationPolicy_r_state *state =
11303 0 : tevent_req_data(req,
11304 : struct dcerpc_lsa_SetDomainInformationPolicy_r_state);
11305 0 : NTSTATUS status;
11306 :
11307 0 : if (tevent_req_is_nterror(req, &status)) {
11308 0 : tevent_req_received(req);
11309 0 : return status;
11310 : }
11311 :
11312 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
11313 :
11314 0 : tevent_req_received(req);
11315 0 : return NT_STATUS_OK;
11316 : }
11317 :
11318 0 : NTSTATUS dcerpc_lsa_SetDomainInformationPolicy_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_SetDomainInformationPolicy *r)
11319 : {
11320 0 : NTSTATUS status;
11321 :
11322 0 : status = dcerpc_binding_handle_call(h,
11323 : NULL, &ndr_table_lsarpc,
11324 : NDR_LSA_SETDOMAININFORMATIONPOLICY, mem_ctx, r);
11325 :
11326 0 : return status;
11327 : }
11328 :
11329 : struct dcerpc_lsa_SetDomainInformationPolicy_state {
11330 : struct lsa_SetDomainInformationPolicy orig;
11331 : struct lsa_SetDomainInformationPolicy tmp;
11332 : TALLOC_CTX *out_mem_ctx;
11333 : };
11334 :
11335 : static void dcerpc_lsa_SetDomainInformationPolicy_done(struct tevent_req *subreq);
11336 :
11337 0 : struct tevent_req *dcerpc_lsa_SetDomainInformationPolicy_send(TALLOC_CTX *mem_ctx,
11338 : struct tevent_context *ev,
11339 : struct dcerpc_binding_handle *h,
11340 : struct policy_handle *_handle /* [in] [ref] */,
11341 : enum lsa_DomainInfoEnum _level /* [in] */,
11342 : union lsa_DomainInformationPolicy *_info /* [in] [switch_is(level),unique] */)
11343 : {
11344 0 : struct tevent_req *req;
11345 0 : struct dcerpc_lsa_SetDomainInformationPolicy_state *state;
11346 0 : struct tevent_req *subreq;
11347 :
11348 0 : req = tevent_req_create(mem_ctx, &state,
11349 : struct dcerpc_lsa_SetDomainInformationPolicy_state);
11350 0 : if (req == NULL) {
11351 0 : return NULL;
11352 : }
11353 0 : state->out_mem_ctx = NULL;
11354 :
11355 : /* In parameters */
11356 0 : state->orig.in.handle = _handle;
11357 0 : state->orig.in.level = _level;
11358 0 : state->orig.in.info = _info;
11359 :
11360 : /* Out parameters */
11361 :
11362 : /* Result */
11363 0 : NDR_ZERO_STRUCT(state->orig.out.result);
11364 :
11365 : /* make a temporary copy, that we pass to the dispatch function */
11366 0 : state->tmp = state->orig;
11367 :
11368 0 : subreq = dcerpc_lsa_SetDomainInformationPolicy_r_send(state, ev, h, &state->tmp);
11369 0 : if (tevent_req_nomem(subreq, req)) {
11370 0 : return tevent_req_post(req, ev);
11371 : }
11372 0 : tevent_req_set_callback(subreq, dcerpc_lsa_SetDomainInformationPolicy_done, req);
11373 0 : return req;
11374 : }
11375 :
11376 0 : static void dcerpc_lsa_SetDomainInformationPolicy_done(struct tevent_req *subreq)
11377 : {
11378 0 : struct tevent_req *req = tevent_req_callback_data(
11379 : subreq, struct tevent_req);
11380 0 : struct dcerpc_lsa_SetDomainInformationPolicy_state *state = tevent_req_data(
11381 : req, struct dcerpc_lsa_SetDomainInformationPolicy_state);
11382 0 : NTSTATUS status;
11383 0 : TALLOC_CTX *mem_ctx;
11384 :
11385 0 : if (state->out_mem_ctx) {
11386 0 : mem_ctx = state->out_mem_ctx;
11387 : } else {
11388 0 : mem_ctx = state;
11389 : }
11390 :
11391 0 : status = dcerpc_lsa_SetDomainInformationPolicy_r_recv(subreq, mem_ctx);
11392 0 : TALLOC_FREE(subreq);
11393 0 : if (tevent_req_nterror(req, status)) {
11394 0 : return;
11395 : }
11396 :
11397 : /* Copy out parameters */
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_lsa_SetDomainInformationPolicy_recv(struct tevent_req *req,
11409 : TALLOC_CTX *mem_ctx,
11410 : NTSTATUS *result)
11411 : {
11412 0 : struct dcerpc_lsa_SetDomainInformationPolicy_state *state = tevent_req_data(
11413 : req, struct dcerpc_lsa_SetDomainInformationPolicy_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 0 : NTSTATUS dcerpc_lsa_SetDomainInformationPolicy(struct dcerpc_binding_handle *h,
11432 : TALLOC_CTX *mem_ctx,
11433 : struct policy_handle *_handle /* [in] [ref] */,
11434 : enum lsa_DomainInfoEnum _level /* [in] */,
11435 : union lsa_DomainInformationPolicy *_info /* [in] [switch_is(level),unique] */,
11436 : NTSTATUS *result)
11437 : {
11438 0 : struct lsa_SetDomainInformationPolicy r;
11439 0 : NTSTATUS status;
11440 :
11441 : /* In parameters */
11442 0 : r.in.handle = _handle;
11443 0 : r.in.level = _level;
11444 0 : r.in.info = _info;
11445 :
11446 : /* Out parameters */
11447 :
11448 : /* Result */
11449 0 : NDR_ZERO_STRUCT(r.out.result);
11450 :
11451 0 : status = dcerpc_lsa_SetDomainInformationPolicy_r(h, mem_ctx, &r);
11452 0 : if (!NT_STATUS_IS_OK(status)) {
11453 0 : return status;
11454 : }
11455 :
11456 : /* Return variables */
11457 :
11458 : /* Return result */
11459 0 : *result = r.out.result;
11460 :
11461 0 : return NT_STATUS_OK;
11462 : }
11463 :
11464 : struct dcerpc_lsa_OpenTrustedDomainByName_r_state {
11465 : TALLOC_CTX *out_mem_ctx;
11466 : };
11467 :
11468 : static void dcerpc_lsa_OpenTrustedDomainByName_r_done(struct tevent_req *subreq);
11469 :
11470 0 : struct tevent_req *dcerpc_lsa_OpenTrustedDomainByName_r_send(TALLOC_CTX *mem_ctx,
11471 : struct tevent_context *ev,
11472 : struct dcerpc_binding_handle *h,
11473 : struct lsa_OpenTrustedDomainByName *r)
11474 : {
11475 0 : struct tevent_req *req;
11476 0 : struct dcerpc_lsa_OpenTrustedDomainByName_r_state *state;
11477 0 : struct tevent_req *subreq;
11478 :
11479 0 : req = tevent_req_create(mem_ctx, &state,
11480 : struct dcerpc_lsa_OpenTrustedDomainByName_r_state);
11481 0 : if (req == NULL) {
11482 0 : return NULL;
11483 : }
11484 :
11485 0 : state->out_mem_ctx = talloc_new(state);
11486 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
11487 0 : return tevent_req_post(req, ev);
11488 : }
11489 :
11490 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
11491 : NULL, &ndr_table_lsarpc,
11492 0 : NDR_LSA_OPENTRUSTEDDOMAINBYNAME, state->out_mem_ctx, r);
11493 0 : if (tevent_req_nomem(subreq, req)) {
11494 0 : return tevent_req_post(req, ev);
11495 : }
11496 0 : tevent_req_set_callback(subreq, dcerpc_lsa_OpenTrustedDomainByName_r_done, req);
11497 :
11498 0 : return req;
11499 : }
11500 :
11501 0 : static void dcerpc_lsa_OpenTrustedDomainByName_r_done(struct tevent_req *subreq)
11502 : {
11503 0 : struct tevent_req *req =
11504 0 : tevent_req_callback_data(subreq,
11505 : struct tevent_req);
11506 0 : NTSTATUS status;
11507 :
11508 0 : status = dcerpc_binding_handle_call_recv(subreq);
11509 0 : TALLOC_FREE(subreq);
11510 0 : if (tevent_req_nterror(req, status)) {
11511 0 : return;
11512 : }
11513 :
11514 0 : tevent_req_done(req);
11515 : }
11516 :
11517 0 : NTSTATUS dcerpc_lsa_OpenTrustedDomainByName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
11518 : {
11519 0 : struct dcerpc_lsa_OpenTrustedDomainByName_r_state *state =
11520 0 : tevent_req_data(req,
11521 : struct dcerpc_lsa_OpenTrustedDomainByName_r_state);
11522 0 : NTSTATUS status;
11523 :
11524 0 : if (tevent_req_is_nterror(req, &status)) {
11525 0 : tevent_req_received(req);
11526 0 : return status;
11527 : }
11528 :
11529 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
11530 :
11531 0 : tevent_req_received(req);
11532 0 : return NT_STATUS_OK;
11533 : }
11534 :
11535 144 : NTSTATUS dcerpc_lsa_OpenTrustedDomainByName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_OpenTrustedDomainByName *r)
11536 : {
11537 0 : NTSTATUS status;
11538 :
11539 144 : status = dcerpc_binding_handle_call(h,
11540 : NULL, &ndr_table_lsarpc,
11541 : NDR_LSA_OPENTRUSTEDDOMAINBYNAME, mem_ctx, r);
11542 :
11543 144 : return status;
11544 : }
11545 :
11546 : struct dcerpc_lsa_OpenTrustedDomainByName_state {
11547 : struct lsa_OpenTrustedDomainByName orig;
11548 : struct lsa_OpenTrustedDomainByName tmp;
11549 : TALLOC_CTX *out_mem_ctx;
11550 : };
11551 :
11552 : static void dcerpc_lsa_OpenTrustedDomainByName_done(struct tevent_req *subreq);
11553 :
11554 0 : struct tevent_req *dcerpc_lsa_OpenTrustedDomainByName_send(TALLOC_CTX *mem_ctx,
11555 : struct tevent_context *ev,
11556 : struct dcerpc_binding_handle *h,
11557 : struct policy_handle *_handle /* [in] [ref] */,
11558 : struct lsa_String _name /* [in] */,
11559 : uint32_t _access_mask /* [in] */,
11560 : struct policy_handle *_trustdom_handle /* [out] [ref] */)
11561 : {
11562 0 : struct tevent_req *req;
11563 0 : struct dcerpc_lsa_OpenTrustedDomainByName_state *state;
11564 0 : struct tevent_req *subreq;
11565 :
11566 0 : req = tevent_req_create(mem_ctx, &state,
11567 : struct dcerpc_lsa_OpenTrustedDomainByName_state);
11568 0 : if (req == NULL) {
11569 0 : return NULL;
11570 : }
11571 0 : state->out_mem_ctx = NULL;
11572 :
11573 : /* In parameters */
11574 0 : state->orig.in.handle = _handle;
11575 0 : state->orig.in.name = _name;
11576 0 : state->orig.in.access_mask = _access_mask;
11577 :
11578 : /* Out parameters */
11579 0 : state->orig.out.trustdom_handle = _trustdom_handle;
11580 :
11581 : /* Result */
11582 0 : NDR_ZERO_STRUCT(state->orig.out.result);
11583 :
11584 0 : state->out_mem_ctx = talloc_named_const(state, 0,
11585 : "dcerpc_lsa_OpenTrustedDomainByName_out_memory");
11586 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
11587 0 : return tevent_req_post(req, ev);
11588 : }
11589 :
11590 : /* make a temporary copy, that we pass to the dispatch function */
11591 0 : state->tmp = state->orig;
11592 :
11593 0 : subreq = dcerpc_lsa_OpenTrustedDomainByName_r_send(state, ev, h, &state->tmp);
11594 0 : if (tevent_req_nomem(subreq, req)) {
11595 0 : return tevent_req_post(req, ev);
11596 : }
11597 0 : tevent_req_set_callback(subreq, dcerpc_lsa_OpenTrustedDomainByName_done, req);
11598 0 : return req;
11599 : }
11600 :
11601 0 : static void dcerpc_lsa_OpenTrustedDomainByName_done(struct tevent_req *subreq)
11602 : {
11603 0 : struct tevent_req *req = tevent_req_callback_data(
11604 : subreq, struct tevent_req);
11605 0 : struct dcerpc_lsa_OpenTrustedDomainByName_state *state = tevent_req_data(
11606 : req, struct dcerpc_lsa_OpenTrustedDomainByName_state);
11607 0 : NTSTATUS status;
11608 0 : TALLOC_CTX *mem_ctx;
11609 :
11610 0 : if (state->out_mem_ctx) {
11611 0 : mem_ctx = state->out_mem_ctx;
11612 : } else {
11613 0 : mem_ctx = state;
11614 : }
11615 :
11616 0 : status = dcerpc_lsa_OpenTrustedDomainByName_r_recv(subreq, mem_ctx);
11617 0 : TALLOC_FREE(subreq);
11618 0 : if (tevent_req_nterror(req, status)) {
11619 0 : return;
11620 : }
11621 :
11622 : /* Copy out parameters */
11623 0 : *state->orig.out.trustdom_handle = *state->tmp.out.trustdom_handle;
11624 :
11625 : /* Copy result */
11626 0 : state->orig.out.result = state->tmp.out.result;
11627 :
11628 : /* Reset temporary structure */
11629 0 : NDR_ZERO_STRUCT(state->tmp);
11630 :
11631 0 : tevent_req_done(req);
11632 : }
11633 :
11634 0 : NTSTATUS dcerpc_lsa_OpenTrustedDomainByName_recv(struct tevent_req *req,
11635 : TALLOC_CTX *mem_ctx,
11636 : NTSTATUS *result)
11637 : {
11638 0 : struct dcerpc_lsa_OpenTrustedDomainByName_state *state = tevent_req_data(
11639 : req, struct dcerpc_lsa_OpenTrustedDomainByName_state);
11640 0 : NTSTATUS status;
11641 :
11642 0 : if (tevent_req_is_nterror(req, &status)) {
11643 0 : tevent_req_received(req);
11644 0 : return status;
11645 : }
11646 :
11647 : /* Steal possible out parameters to the callers context */
11648 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
11649 :
11650 : /* Return result */
11651 0 : *result = state->orig.out.result;
11652 :
11653 0 : tevent_req_received(req);
11654 0 : return NT_STATUS_OK;
11655 : }
11656 :
11657 0 : NTSTATUS dcerpc_lsa_OpenTrustedDomainByName(struct dcerpc_binding_handle *h,
11658 : TALLOC_CTX *mem_ctx,
11659 : struct policy_handle *_handle /* [in] [ref] */,
11660 : struct lsa_String _name /* [in] */,
11661 : uint32_t _access_mask /* [in] */,
11662 : struct policy_handle *_trustdom_handle /* [out] [ref] */,
11663 : NTSTATUS *result)
11664 : {
11665 0 : struct lsa_OpenTrustedDomainByName r;
11666 0 : NTSTATUS status;
11667 :
11668 : /* In parameters */
11669 0 : r.in.handle = _handle;
11670 0 : r.in.name = _name;
11671 0 : r.in.access_mask = _access_mask;
11672 :
11673 : /* Out parameters */
11674 0 : r.out.trustdom_handle = _trustdom_handle;
11675 :
11676 : /* Result */
11677 0 : NDR_ZERO_STRUCT(r.out.result);
11678 :
11679 0 : status = dcerpc_lsa_OpenTrustedDomainByName_r(h, mem_ctx, &r);
11680 0 : if (!NT_STATUS_IS_OK(status)) {
11681 0 : return status;
11682 : }
11683 :
11684 : /* Return variables */
11685 0 : *_trustdom_handle = *r.out.trustdom_handle;
11686 :
11687 : /* Return result */
11688 0 : *result = r.out.result;
11689 :
11690 0 : return NT_STATUS_OK;
11691 : }
11692 :
11693 : struct dcerpc_lsa_LookupSids2_r_state {
11694 : TALLOC_CTX *out_mem_ctx;
11695 : };
11696 :
11697 : static void dcerpc_lsa_LookupSids2_r_done(struct tevent_req *subreq);
11698 :
11699 0 : struct tevent_req *dcerpc_lsa_LookupSids2_r_send(TALLOC_CTX *mem_ctx,
11700 : struct tevent_context *ev,
11701 : struct dcerpc_binding_handle *h,
11702 : struct lsa_LookupSids2 *r)
11703 : {
11704 0 : struct tevent_req *req;
11705 0 : struct dcerpc_lsa_LookupSids2_r_state *state;
11706 0 : struct tevent_req *subreq;
11707 :
11708 0 : req = tevent_req_create(mem_ctx, &state,
11709 : struct dcerpc_lsa_LookupSids2_r_state);
11710 0 : if (req == NULL) {
11711 0 : return NULL;
11712 : }
11713 :
11714 0 : state->out_mem_ctx = talloc_new(state);
11715 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
11716 0 : return tevent_req_post(req, ev);
11717 : }
11718 :
11719 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
11720 : NULL, &ndr_table_lsarpc,
11721 0 : NDR_LSA_LOOKUPSIDS2, state->out_mem_ctx, r);
11722 0 : if (tevent_req_nomem(subreq, req)) {
11723 0 : return tevent_req_post(req, ev);
11724 : }
11725 0 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupSids2_r_done, req);
11726 :
11727 0 : return req;
11728 : }
11729 :
11730 0 : static void dcerpc_lsa_LookupSids2_r_done(struct tevent_req *subreq)
11731 : {
11732 0 : struct tevent_req *req =
11733 0 : tevent_req_callback_data(subreq,
11734 : struct tevent_req);
11735 0 : NTSTATUS status;
11736 :
11737 0 : status = dcerpc_binding_handle_call_recv(subreq);
11738 0 : TALLOC_FREE(subreq);
11739 0 : if (tevent_req_nterror(req, status)) {
11740 0 : return;
11741 : }
11742 :
11743 0 : tevent_req_done(req);
11744 : }
11745 :
11746 0 : NTSTATUS dcerpc_lsa_LookupSids2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
11747 : {
11748 0 : struct dcerpc_lsa_LookupSids2_r_state *state =
11749 0 : tevent_req_data(req,
11750 : struct dcerpc_lsa_LookupSids2_r_state);
11751 0 : NTSTATUS status;
11752 :
11753 0 : if (tevent_req_is_nterror(req, &status)) {
11754 0 : tevent_req_received(req);
11755 0 : return status;
11756 : }
11757 :
11758 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
11759 :
11760 0 : tevent_req_received(req);
11761 0 : return NT_STATUS_OK;
11762 : }
11763 :
11764 5 : NTSTATUS dcerpc_lsa_LookupSids2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_LookupSids2 *r)
11765 : {
11766 0 : NTSTATUS status;
11767 :
11768 5 : status = dcerpc_binding_handle_call(h,
11769 : NULL, &ndr_table_lsarpc,
11770 : NDR_LSA_LOOKUPSIDS2, mem_ctx, r);
11771 :
11772 5 : return status;
11773 : }
11774 :
11775 : struct dcerpc_lsa_LookupSids2_state {
11776 : struct lsa_LookupSids2 orig;
11777 : struct lsa_LookupSids2 tmp;
11778 : TALLOC_CTX *out_mem_ctx;
11779 : };
11780 :
11781 : static void dcerpc_lsa_LookupSids2_done(struct tevent_req *subreq);
11782 :
11783 0 : struct tevent_req *dcerpc_lsa_LookupSids2_send(TALLOC_CTX *mem_ctx,
11784 : struct tevent_context *ev,
11785 : struct dcerpc_binding_handle *h,
11786 : struct policy_handle *_handle /* [in] [ref] */,
11787 : struct lsa_SidArray *_sids /* [in] [ref] */,
11788 : struct lsa_RefDomainList **_domains /* [out] [ref] */,
11789 : struct lsa_TransNameArray2 *_names /* [in,out] [ref] */,
11790 : enum lsa_LookupNamesLevel _level /* [in] */,
11791 : uint32_t *_count /* [in,out] [ref] */,
11792 : enum lsa_LookupOptions _lookup_options /* [in] */,
11793 : enum lsa_ClientRevision _client_revision /* [in] */)
11794 : {
11795 0 : struct tevent_req *req;
11796 0 : struct dcerpc_lsa_LookupSids2_state *state;
11797 0 : struct tevent_req *subreq;
11798 :
11799 0 : req = tevent_req_create(mem_ctx, &state,
11800 : struct dcerpc_lsa_LookupSids2_state);
11801 0 : if (req == NULL) {
11802 0 : return NULL;
11803 : }
11804 0 : state->out_mem_ctx = NULL;
11805 :
11806 : /* In parameters */
11807 0 : state->orig.in.handle = _handle;
11808 0 : state->orig.in.sids = _sids;
11809 0 : state->orig.in.names = _names;
11810 0 : state->orig.in.level = _level;
11811 0 : state->orig.in.count = _count;
11812 0 : state->orig.in.lookup_options = _lookup_options;
11813 0 : state->orig.in.client_revision = _client_revision;
11814 :
11815 : /* Out parameters */
11816 0 : state->orig.out.domains = _domains;
11817 0 : state->orig.out.names = _names;
11818 0 : state->orig.out.count = _count;
11819 :
11820 : /* Result */
11821 0 : NDR_ZERO_STRUCT(state->orig.out.result);
11822 :
11823 0 : state->out_mem_ctx = talloc_named_const(state, 0,
11824 : "dcerpc_lsa_LookupSids2_out_memory");
11825 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
11826 0 : return tevent_req_post(req, ev);
11827 : }
11828 :
11829 : /* make a temporary copy, that we pass to the dispatch function */
11830 0 : state->tmp = state->orig;
11831 :
11832 0 : subreq = dcerpc_lsa_LookupSids2_r_send(state, ev, h, &state->tmp);
11833 0 : if (tevent_req_nomem(subreq, req)) {
11834 0 : return tevent_req_post(req, ev);
11835 : }
11836 0 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupSids2_done, req);
11837 0 : return req;
11838 : }
11839 :
11840 0 : static void dcerpc_lsa_LookupSids2_done(struct tevent_req *subreq)
11841 : {
11842 0 : struct tevent_req *req = tevent_req_callback_data(
11843 : subreq, struct tevent_req);
11844 0 : struct dcerpc_lsa_LookupSids2_state *state = tevent_req_data(
11845 : req, struct dcerpc_lsa_LookupSids2_state);
11846 0 : NTSTATUS status;
11847 0 : TALLOC_CTX *mem_ctx;
11848 :
11849 0 : if (state->out_mem_ctx) {
11850 0 : mem_ctx = state->out_mem_ctx;
11851 : } else {
11852 0 : mem_ctx = state;
11853 : }
11854 :
11855 0 : status = dcerpc_lsa_LookupSids2_r_recv(subreq, mem_ctx);
11856 0 : TALLOC_FREE(subreq);
11857 0 : if (tevent_req_nterror(req, status)) {
11858 0 : return;
11859 : }
11860 :
11861 : /* Copy out parameters */
11862 0 : *state->orig.out.domains = *state->tmp.out.domains;
11863 0 : *state->orig.out.names = *state->tmp.out.names;
11864 0 : *state->orig.out.count = *state->tmp.out.count;
11865 :
11866 : /* Copy result */
11867 0 : state->orig.out.result = state->tmp.out.result;
11868 :
11869 : /* Reset temporary structure */
11870 0 : NDR_ZERO_STRUCT(state->tmp);
11871 :
11872 0 : tevent_req_done(req);
11873 : }
11874 :
11875 0 : NTSTATUS dcerpc_lsa_LookupSids2_recv(struct tevent_req *req,
11876 : TALLOC_CTX *mem_ctx,
11877 : NTSTATUS *result)
11878 : {
11879 0 : struct dcerpc_lsa_LookupSids2_state *state = tevent_req_data(
11880 : req, struct dcerpc_lsa_LookupSids2_state);
11881 0 : NTSTATUS status;
11882 :
11883 0 : if (tevent_req_is_nterror(req, &status)) {
11884 0 : tevent_req_received(req);
11885 0 : return status;
11886 : }
11887 :
11888 : /* Steal possible out parameters to the callers context */
11889 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
11890 :
11891 : /* Return result */
11892 0 : *result = state->orig.out.result;
11893 :
11894 0 : tevent_req_received(req);
11895 0 : return NT_STATUS_OK;
11896 : }
11897 :
11898 0 : NTSTATUS dcerpc_lsa_LookupSids2(struct dcerpc_binding_handle *h,
11899 : TALLOC_CTX *mem_ctx,
11900 : struct policy_handle *_handle /* [in] [ref] */,
11901 : struct lsa_SidArray *_sids /* [in] [ref] */,
11902 : struct lsa_RefDomainList **_domains /* [out] [ref] */,
11903 : struct lsa_TransNameArray2 *_names /* [in,out] [ref] */,
11904 : enum lsa_LookupNamesLevel _level /* [in] */,
11905 : uint32_t *_count /* [in,out] [ref] */,
11906 : enum lsa_LookupOptions _lookup_options /* [in] */,
11907 : enum lsa_ClientRevision _client_revision /* [in] */,
11908 : NTSTATUS *result)
11909 : {
11910 0 : struct lsa_LookupSids2 r;
11911 0 : NTSTATUS status;
11912 :
11913 : /* In parameters */
11914 0 : r.in.handle = _handle;
11915 0 : r.in.sids = _sids;
11916 0 : r.in.names = _names;
11917 0 : r.in.level = _level;
11918 0 : r.in.count = _count;
11919 0 : r.in.lookup_options = _lookup_options;
11920 0 : r.in.client_revision = _client_revision;
11921 :
11922 : /* Out parameters */
11923 0 : r.out.domains = _domains;
11924 0 : r.out.names = _names;
11925 0 : r.out.count = _count;
11926 :
11927 : /* Result */
11928 0 : NDR_ZERO_STRUCT(r.out.result);
11929 :
11930 0 : status = dcerpc_lsa_LookupSids2_r(h, mem_ctx, &r);
11931 0 : if (!NT_STATUS_IS_OK(status)) {
11932 0 : return status;
11933 : }
11934 :
11935 : /* Return variables */
11936 0 : *_domains = *r.out.domains;
11937 0 : *_names = *r.out.names;
11938 0 : *_count = *r.out.count;
11939 :
11940 : /* Return result */
11941 0 : *result = r.out.result;
11942 :
11943 0 : return NT_STATUS_OK;
11944 : }
11945 :
11946 : struct dcerpc_lsa_LookupNames2_r_state {
11947 : TALLOC_CTX *out_mem_ctx;
11948 : };
11949 :
11950 : static void dcerpc_lsa_LookupNames2_r_done(struct tevent_req *subreq);
11951 :
11952 0 : struct tevent_req *dcerpc_lsa_LookupNames2_r_send(TALLOC_CTX *mem_ctx,
11953 : struct tevent_context *ev,
11954 : struct dcerpc_binding_handle *h,
11955 : struct lsa_LookupNames2 *r)
11956 : {
11957 0 : struct tevent_req *req;
11958 0 : struct dcerpc_lsa_LookupNames2_r_state *state;
11959 0 : struct tevent_req *subreq;
11960 :
11961 0 : req = tevent_req_create(mem_ctx, &state,
11962 : struct dcerpc_lsa_LookupNames2_r_state);
11963 0 : if (req == NULL) {
11964 0 : return NULL;
11965 : }
11966 :
11967 0 : state->out_mem_ctx = talloc_new(state);
11968 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
11969 0 : return tevent_req_post(req, ev);
11970 : }
11971 :
11972 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
11973 : NULL, &ndr_table_lsarpc,
11974 0 : NDR_LSA_LOOKUPNAMES2, state->out_mem_ctx, r);
11975 0 : if (tevent_req_nomem(subreq, req)) {
11976 0 : return tevent_req_post(req, ev);
11977 : }
11978 0 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupNames2_r_done, req);
11979 :
11980 0 : return req;
11981 : }
11982 :
11983 0 : static void dcerpc_lsa_LookupNames2_r_done(struct tevent_req *subreq)
11984 : {
11985 0 : struct tevent_req *req =
11986 0 : tevent_req_callback_data(subreq,
11987 : struct tevent_req);
11988 0 : NTSTATUS status;
11989 :
11990 0 : status = dcerpc_binding_handle_call_recv(subreq);
11991 0 : TALLOC_FREE(subreq);
11992 0 : if (tevent_req_nterror(req, status)) {
11993 0 : return;
11994 : }
11995 :
11996 0 : tevent_req_done(req);
11997 : }
11998 :
11999 0 : NTSTATUS dcerpc_lsa_LookupNames2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
12000 : {
12001 0 : struct dcerpc_lsa_LookupNames2_r_state *state =
12002 0 : tevent_req_data(req,
12003 : struct dcerpc_lsa_LookupNames2_r_state);
12004 0 : NTSTATUS status;
12005 :
12006 0 : if (tevent_req_is_nterror(req, &status)) {
12007 0 : tevent_req_received(req);
12008 0 : return status;
12009 : }
12010 :
12011 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
12012 :
12013 0 : tevent_req_received(req);
12014 0 : return NT_STATUS_OK;
12015 : }
12016 :
12017 10 : NTSTATUS dcerpc_lsa_LookupNames2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_LookupNames2 *r)
12018 : {
12019 0 : NTSTATUS status;
12020 :
12021 10 : status = dcerpc_binding_handle_call(h,
12022 : NULL, &ndr_table_lsarpc,
12023 : NDR_LSA_LOOKUPNAMES2, mem_ctx, r);
12024 :
12025 10 : return status;
12026 : }
12027 :
12028 : struct dcerpc_lsa_LookupNames2_state {
12029 : struct lsa_LookupNames2 orig;
12030 : struct lsa_LookupNames2 tmp;
12031 : TALLOC_CTX *out_mem_ctx;
12032 : };
12033 :
12034 : static void dcerpc_lsa_LookupNames2_done(struct tevent_req *subreq);
12035 :
12036 0 : struct tevent_req *dcerpc_lsa_LookupNames2_send(TALLOC_CTX *mem_ctx,
12037 : struct tevent_context *ev,
12038 : struct dcerpc_binding_handle *h,
12039 : struct policy_handle *_handle /* [in] [ref] */,
12040 : uint32_t _num_names /* [in] [range(0,1000)] */,
12041 : struct lsa_String *_names /* [in] [size_is(num_names)] */,
12042 : struct lsa_RefDomainList **_domains /* [out] [ref] */,
12043 : struct lsa_TransSidArray2 *_sids /* [in,out] [ref] */,
12044 : enum lsa_LookupNamesLevel _level /* [in] */,
12045 : uint32_t *_count /* [in,out] [ref] */,
12046 : enum lsa_LookupOptions _lookup_options /* [in] */,
12047 : enum lsa_ClientRevision _client_revision /* [in] */)
12048 : {
12049 0 : struct tevent_req *req;
12050 0 : struct dcerpc_lsa_LookupNames2_state *state;
12051 0 : struct tevent_req *subreq;
12052 :
12053 0 : req = tevent_req_create(mem_ctx, &state,
12054 : struct dcerpc_lsa_LookupNames2_state);
12055 0 : if (req == NULL) {
12056 0 : return NULL;
12057 : }
12058 0 : state->out_mem_ctx = NULL;
12059 :
12060 : /* In parameters */
12061 0 : state->orig.in.handle = _handle;
12062 0 : state->orig.in.num_names = _num_names;
12063 0 : state->orig.in.names = _names;
12064 0 : state->orig.in.sids = _sids;
12065 0 : state->orig.in.level = _level;
12066 0 : state->orig.in.count = _count;
12067 0 : state->orig.in.lookup_options = _lookup_options;
12068 0 : state->orig.in.client_revision = _client_revision;
12069 :
12070 : /* Out parameters */
12071 0 : state->orig.out.domains = _domains;
12072 0 : state->orig.out.sids = _sids;
12073 0 : state->orig.out.count = _count;
12074 :
12075 : /* Result */
12076 0 : NDR_ZERO_STRUCT(state->orig.out.result);
12077 :
12078 0 : state->out_mem_ctx = talloc_named_const(state, 0,
12079 : "dcerpc_lsa_LookupNames2_out_memory");
12080 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
12081 0 : return tevent_req_post(req, ev);
12082 : }
12083 :
12084 : /* make a temporary copy, that we pass to the dispatch function */
12085 0 : state->tmp = state->orig;
12086 :
12087 0 : subreq = dcerpc_lsa_LookupNames2_r_send(state, ev, h, &state->tmp);
12088 0 : if (tevent_req_nomem(subreq, req)) {
12089 0 : return tevent_req_post(req, ev);
12090 : }
12091 0 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupNames2_done, req);
12092 0 : return req;
12093 : }
12094 :
12095 0 : static void dcerpc_lsa_LookupNames2_done(struct tevent_req *subreq)
12096 : {
12097 0 : struct tevent_req *req = tevent_req_callback_data(
12098 : subreq, struct tevent_req);
12099 0 : struct dcerpc_lsa_LookupNames2_state *state = tevent_req_data(
12100 : req, struct dcerpc_lsa_LookupNames2_state);
12101 0 : NTSTATUS status;
12102 0 : TALLOC_CTX *mem_ctx;
12103 :
12104 0 : if (state->out_mem_ctx) {
12105 0 : mem_ctx = state->out_mem_ctx;
12106 : } else {
12107 0 : mem_ctx = state;
12108 : }
12109 :
12110 0 : status = dcerpc_lsa_LookupNames2_r_recv(subreq, mem_ctx);
12111 0 : TALLOC_FREE(subreq);
12112 0 : if (tevent_req_nterror(req, status)) {
12113 0 : return;
12114 : }
12115 :
12116 : /* Copy out parameters */
12117 0 : *state->orig.out.domains = *state->tmp.out.domains;
12118 0 : *state->orig.out.sids = *state->tmp.out.sids;
12119 0 : *state->orig.out.count = *state->tmp.out.count;
12120 :
12121 : /* Copy result */
12122 0 : state->orig.out.result = state->tmp.out.result;
12123 :
12124 : /* Reset temporary structure */
12125 0 : NDR_ZERO_STRUCT(state->tmp);
12126 :
12127 0 : tevent_req_done(req);
12128 : }
12129 :
12130 0 : NTSTATUS dcerpc_lsa_LookupNames2_recv(struct tevent_req *req,
12131 : TALLOC_CTX *mem_ctx,
12132 : NTSTATUS *result)
12133 : {
12134 0 : struct dcerpc_lsa_LookupNames2_state *state = tevent_req_data(
12135 : req, struct dcerpc_lsa_LookupNames2_state);
12136 0 : NTSTATUS status;
12137 :
12138 0 : if (tevent_req_is_nterror(req, &status)) {
12139 0 : tevent_req_received(req);
12140 0 : return status;
12141 : }
12142 :
12143 : /* Steal possible out parameters to the callers context */
12144 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
12145 :
12146 : /* Return result */
12147 0 : *result = state->orig.out.result;
12148 :
12149 0 : tevent_req_received(req);
12150 0 : return NT_STATUS_OK;
12151 : }
12152 :
12153 0 : NTSTATUS dcerpc_lsa_LookupNames2(struct dcerpc_binding_handle *h,
12154 : TALLOC_CTX *mem_ctx,
12155 : struct policy_handle *_handle /* [in] [ref] */,
12156 : uint32_t _num_names /* [in] [range(0,1000)] */,
12157 : struct lsa_String *_names /* [in] [size_is(num_names)] */,
12158 : struct lsa_RefDomainList **_domains /* [out] [ref] */,
12159 : struct lsa_TransSidArray2 *_sids /* [in,out] [ref] */,
12160 : enum lsa_LookupNamesLevel _level /* [in] */,
12161 : uint32_t *_count /* [in,out] [ref] */,
12162 : enum lsa_LookupOptions _lookup_options /* [in] */,
12163 : enum lsa_ClientRevision _client_revision /* [in] */,
12164 : NTSTATUS *result)
12165 : {
12166 0 : struct lsa_LookupNames2 r;
12167 0 : NTSTATUS status;
12168 :
12169 : /* In parameters */
12170 0 : r.in.handle = _handle;
12171 0 : r.in.num_names = _num_names;
12172 0 : r.in.names = _names;
12173 0 : r.in.sids = _sids;
12174 0 : r.in.level = _level;
12175 0 : r.in.count = _count;
12176 0 : r.in.lookup_options = _lookup_options;
12177 0 : r.in.client_revision = _client_revision;
12178 :
12179 : /* Out parameters */
12180 0 : r.out.domains = _domains;
12181 0 : r.out.sids = _sids;
12182 0 : r.out.count = _count;
12183 :
12184 : /* Result */
12185 0 : NDR_ZERO_STRUCT(r.out.result);
12186 :
12187 0 : status = dcerpc_lsa_LookupNames2_r(h, mem_ctx, &r);
12188 0 : if (!NT_STATUS_IS_OK(status)) {
12189 0 : return status;
12190 : }
12191 :
12192 : /* Return variables */
12193 0 : *_domains = *r.out.domains;
12194 0 : *_sids = *r.out.sids;
12195 0 : *_count = *r.out.count;
12196 :
12197 : /* Return result */
12198 0 : *result = r.out.result;
12199 :
12200 0 : return NT_STATUS_OK;
12201 : }
12202 :
12203 : struct dcerpc_lsa_CreateTrustedDomainEx2_r_state {
12204 : TALLOC_CTX *out_mem_ctx;
12205 : };
12206 :
12207 : static void dcerpc_lsa_CreateTrustedDomainEx2_r_done(struct tevent_req *subreq);
12208 :
12209 0 : struct tevent_req *dcerpc_lsa_CreateTrustedDomainEx2_r_send(TALLOC_CTX *mem_ctx,
12210 : struct tevent_context *ev,
12211 : struct dcerpc_binding_handle *h,
12212 : struct lsa_CreateTrustedDomainEx2 *r)
12213 : {
12214 0 : struct tevent_req *req;
12215 0 : struct dcerpc_lsa_CreateTrustedDomainEx2_r_state *state;
12216 0 : struct tevent_req *subreq;
12217 :
12218 0 : req = tevent_req_create(mem_ctx, &state,
12219 : struct dcerpc_lsa_CreateTrustedDomainEx2_r_state);
12220 0 : if (req == NULL) {
12221 0 : return NULL;
12222 : }
12223 :
12224 0 : state->out_mem_ctx = talloc_new(state);
12225 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
12226 0 : return tevent_req_post(req, ev);
12227 : }
12228 :
12229 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
12230 : NULL, &ndr_table_lsarpc,
12231 0 : NDR_LSA_CREATETRUSTEDDOMAINEX2, state->out_mem_ctx, r);
12232 0 : if (tevent_req_nomem(subreq, req)) {
12233 0 : return tevent_req_post(req, ev);
12234 : }
12235 0 : tevent_req_set_callback(subreq, dcerpc_lsa_CreateTrustedDomainEx2_r_done, req);
12236 :
12237 0 : return req;
12238 : }
12239 :
12240 0 : static void dcerpc_lsa_CreateTrustedDomainEx2_r_done(struct tevent_req *subreq)
12241 : {
12242 0 : struct tevent_req *req =
12243 0 : tevent_req_callback_data(subreq,
12244 : struct tevent_req);
12245 0 : NTSTATUS status;
12246 :
12247 0 : status = dcerpc_binding_handle_call_recv(subreq);
12248 0 : TALLOC_FREE(subreq);
12249 0 : if (tevent_req_nterror(req, status)) {
12250 0 : return;
12251 : }
12252 :
12253 0 : tevent_req_done(req);
12254 : }
12255 :
12256 0 : NTSTATUS dcerpc_lsa_CreateTrustedDomainEx2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
12257 : {
12258 0 : struct dcerpc_lsa_CreateTrustedDomainEx2_r_state *state =
12259 0 : tevent_req_data(req,
12260 : struct dcerpc_lsa_CreateTrustedDomainEx2_r_state);
12261 0 : NTSTATUS status;
12262 :
12263 0 : if (tevent_req_is_nterror(req, &status)) {
12264 0 : tevent_req_received(req);
12265 0 : return status;
12266 : }
12267 :
12268 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
12269 :
12270 0 : tevent_req_received(req);
12271 0 : return NT_STATUS_OK;
12272 : }
12273 :
12274 44 : NTSTATUS dcerpc_lsa_CreateTrustedDomainEx2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_CreateTrustedDomainEx2 *r)
12275 : {
12276 0 : NTSTATUS status;
12277 :
12278 44 : status = dcerpc_binding_handle_call(h,
12279 : NULL, &ndr_table_lsarpc,
12280 : NDR_LSA_CREATETRUSTEDDOMAINEX2, mem_ctx, r);
12281 :
12282 44 : return status;
12283 : }
12284 :
12285 : struct dcerpc_lsa_CreateTrustedDomainEx2_state {
12286 : struct lsa_CreateTrustedDomainEx2 orig;
12287 : struct lsa_CreateTrustedDomainEx2 tmp;
12288 : TALLOC_CTX *out_mem_ctx;
12289 : };
12290 :
12291 : static void dcerpc_lsa_CreateTrustedDomainEx2_done(struct tevent_req *subreq);
12292 :
12293 0 : struct tevent_req *dcerpc_lsa_CreateTrustedDomainEx2_send(TALLOC_CTX *mem_ctx,
12294 : struct tevent_context *ev,
12295 : struct dcerpc_binding_handle *h,
12296 : struct policy_handle *_policy_handle /* [in] [ref] */,
12297 : struct lsa_TrustDomainInfoInfoEx *_info /* [in] [ref] */,
12298 : struct lsa_TrustDomainInfoAuthInfoInternal *_auth_info_internal /* [in] [ref] */,
12299 : uint32_t _access_mask /* [in] */,
12300 : struct policy_handle *_trustdom_handle /* [out] [ref] */)
12301 : {
12302 0 : struct tevent_req *req;
12303 0 : struct dcerpc_lsa_CreateTrustedDomainEx2_state *state;
12304 0 : struct tevent_req *subreq;
12305 :
12306 0 : req = tevent_req_create(mem_ctx, &state,
12307 : struct dcerpc_lsa_CreateTrustedDomainEx2_state);
12308 0 : if (req == NULL) {
12309 0 : return NULL;
12310 : }
12311 0 : state->out_mem_ctx = NULL;
12312 :
12313 : /* In parameters */
12314 0 : state->orig.in.policy_handle = _policy_handle;
12315 0 : state->orig.in.info = _info;
12316 0 : state->orig.in.auth_info_internal = _auth_info_internal;
12317 0 : state->orig.in.access_mask = _access_mask;
12318 :
12319 : /* Out parameters */
12320 0 : state->orig.out.trustdom_handle = _trustdom_handle;
12321 :
12322 : /* Result */
12323 0 : NDR_ZERO_STRUCT(state->orig.out.result);
12324 :
12325 0 : state->out_mem_ctx = talloc_named_const(state, 0,
12326 : "dcerpc_lsa_CreateTrustedDomainEx2_out_memory");
12327 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
12328 0 : return tevent_req_post(req, ev);
12329 : }
12330 :
12331 : /* make a temporary copy, that we pass to the dispatch function */
12332 0 : state->tmp = state->orig;
12333 :
12334 0 : subreq = dcerpc_lsa_CreateTrustedDomainEx2_r_send(state, ev, h, &state->tmp);
12335 0 : if (tevent_req_nomem(subreq, req)) {
12336 0 : return tevent_req_post(req, ev);
12337 : }
12338 0 : tevent_req_set_callback(subreq, dcerpc_lsa_CreateTrustedDomainEx2_done, req);
12339 0 : return req;
12340 : }
12341 :
12342 0 : static void dcerpc_lsa_CreateTrustedDomainEx2_done(struct tevent_req *subreq)
12343 : {
12344 0 : struct tevent_req *req = tevent_req_callback_data(
12345 : subreq, struct tevent_req);
12346 0 : struct dcerpc_lsa_CreateTrustedDomainEx2_state *state = tevent_req_data(
12347 : req, struct dcerpc_lsa_CreateTrustedDomainEx2_state);
12348 0 : NTSTATUS status;
12349 0 : TALLOC_CTX *mem_ctx;
12350 :
12351 0 : if (state->out_mem_ctx) {
12352 0 : mem_ctx = state->out_mem_ctx;
12353 : } else {
12354 0 : mem_ctx = state;
12355 : }
12356 :
12357 0 : status = dcerpc_lsa_CreateTrustedDomainEx2_r_recv(subreq, mem_ctx);
12358 0 : TALLOC_FREE(subreq);
12359 0 : if (tevent_req_nterror(req, status)) {
12360 0 : return;
12361 : }
12362 :
12363 : /* Copy out parameters */
12364 0 : *state->orig.out.trustdom_handle = *state->tmp.out.trustdom_handle;
12365 :
12366 : /* Copy result */
12367 0 : state->orig.out.result = state->tmp.out.result;
12368 :
12369 : /* Reset temporary structure */
12370 0 : NDR_ZERO_STRUCT(state->tmp);
12371 :
12372 0 : tevent_req_done(req);
12373 : }
12374 :
12375 0 : NTSTATUS dcerpc_lsa_CreateTrustedDomainEx2_recv(struct tevent_req *req,
12376 : TALLOC_CTX *mem_ctx,
12377 : NTSTATUS *result)
12378 : {
12379 0 : struct dcerpc_lsa_CreateTrustedDomainEx2_state *state = tevent_req_data(
12380 : req, struct dcerpc_lsa_CreateTrustedDomainEx2_state);
12381 0 : NTSTATUS status;
12382 :
12383 0 : if (tevent_req_is_nterror(req, &status)) {
12384 0 : tevent_req_received(req);
12385 0 : return status;
12386 : }
12387 :
12388 : /* Steal possible out parameters to the callers context */
12389 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
12390 :
12391 : /* Return result */
12392 0 : *result = state->orig.out.result;
12393 :
12394 0 : tevent_req_received(req);
12395 0 : return NT_STATUS_OK;
12396 : }
12397 :
12398 0 : NTSTATUS dcerpc_lsa_CreateTrustedDomainEx2(struct dcerpc_binding_handle *h,
12399 : TALLOC_CTX *mem_ctx,
12400 : struct policy_handle *_policy_handle /* [in] [ref] */,
12401 : struct lsa_TrustDomainInfoInfoEx *_info /* [in] [ref] */,
12402 : struct lsa_TrustDomainInfoAuthInfoInternal *_auth_info_internal /* [in] [ref] */,
12403 : uint32_t _access_mask /* [in] */,
12404 : struct policy_handle *_trustdom_handle /* [out] [ref] */,
12405 : NTSTATUS *result)
12406 : {
12407 0 : struct lsa_CreateTrustedDomainEx2 r;
12408 0 : NTSTATUS status;
12409 :
12410 : /* In parameters */
12411 0 : r.in.policy_handle = _policy_handle;
12412 0 : r.in.info = _info;
12413 0 : r.in.auth_info_internal = _auth_info_internal;
12414 0 : r.in.access_mask = _access_mask;
12415 :
12416 : /* Out parameters */
12417 0 : r.out.trustdom_handle = _trustdom_handle;
12418 :
12419 : /* Result */
12420 0 : NDR_ZERO_STRUCT(r.out.result);
12421 :
12422 0 : status = dcerpc_lsa_CreateTrustedDomainEx2_r(h, mem_ctx, &r);
12423 0 : if (!NT_STATUS_IS_OK(status)) {
12424 0 : return status;
12425 : }
12426 :
12427 : /* Return variables */
12428 0 : *_trustdom_handle = *r.out.trustdom_handle;
12429 :
12430 : /* Return result */
12431 0 : *result = r.out.result;
12432 :
12433 0 : return NT_STATUS_OK;
12434 : }
12435 :
12436 : struct dcerpc_lsa_LookupNames3_r_state {
12437 : TALLOC_CTX *out_mem_ctx;
12438 : };
12439 :
12440 : static void dcerpc_lsa_LookupNames3_r_done(struct tevent_req *subreq);
12441 :
12442 0 : struct tevent_req *dcerpc_lsa_LookupNames3_r_send(TALLOC_CTX *mem_ctx,
12443 : struct tevent_context *ev,
12444 : struct dcerpc_binding_handle *h,
12445 : struct lsa_LookupNames3 *r)
12446 : {
12447 0 : struct tevent_req *req;
12448 0 : struct dcerpc_lsa_LookupNames3_r_state *state;
12449 0 : struct tevent_req *subreq;
12450 :
12451 0 : req = tevent_req_create(mem_ctx, &state,
12452 : struct dcerpc_lsa_LookupNames3_r_state);
12453 0 : if (req == NULL) {
12454 0 : return NULL;
12455 : }
12456 :
12457 0 : state->out_mem_ctx = talloc_new(state);
12458 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
12459 0 : return tevent_req_post(req, ev);
12460 : }
12461 :
12462 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
12463 : NULL, &ndr_table_lsarpc,
12464 0 : NDR_LSA_LOOKUPNAMES3, state->out_mem_ctx, r);
12465 0 : if (tevent_req_nomem(subreq, req)) {
12466 0 : return tevent_req_post(req, ev);
12467 : }
12468 0 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupNames3_r_done, req);
12469 :
12470 0 : return req;
12471 : }
12472 :
12473 0 : static void dcerpc_lsa_LookupNames3_r_done(struct tevent_req *subreq)
12474 : {
12475 0 : struct tevent_req *req =
12476 0 : tevent_req_callback_data(subreq,
12477 : struct tevent_req);
12478 0 : NTSTATUS status;
12479 :
12480 0 : status = dcerpc_binding_handle_call_recv(subreq);
12481 0 : TALLOC_FREE(subreq);
12482 0 : if (tevent_req_nterror(req, status)) {
12483 0 : return;
12484 : }
12485 :
12486 0 : tevent_req_done(req);
12487 : }
12488 :
12489 0 : NTSTATUS dcerpc_lsa_LookupNames3_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
12490 : {
12491 0 : struct dcerpc_lsa_LookupNames3_r_state *state =
12492 0 : tevent_req_data(req,
12493 : struct dcerpc_lsa_LookupNames3_r_state);
12494 0 : NTSTATUS status;
12495 :
12496 0 : if (tevent_req_is_nterror(req, &status)) {
12497 0 : tevent_req_received(req);
12498 0 : return status;
12499 : }
12500 :
12501 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
12502 :
12503 0 : tevent_req_received(req);
12504 0 : return NT_STATUS_OK;
12505 : }
12506 :
12507 10 : NTSTATUS dcerpc_lsa_LookupNames3_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_LookupNames3 *r)
12508 : {
12509 0 : NTSTATUS status;
12510 :
12511 10 : status = dcerpc_binding_handle_call(h,
12512 : NULL, &ndr_table_lsarpc,
12513 : NDR_LSA_LOOKUPNAMES3, mem_ctx, r);
12514 :
12515 10 : return status;
12516 : }
12517 :
12518 : struct dcerpc_lsa_LookupNames3_state {
12519 : struct lsa_LookupNames3 orig;
12520 : struct lsa_LookupNames3 tmp;
12521 : TALLOC_CTX *out_mem_ctx;
12522 : };
12523 :
12524 : static void dcerpc_lsa_LookupNames3_done(struct tevent_req *subreq);
12525 :
12526 0 : struct tevent_req *dcerpc_lsa_LookupNames3_send(TALLOC_CTX *mem_ctx,
12527 : struct tevent_context *ev,
12528 : struct dcerpc_binding_handle *h,
12529 : struct policy_handle *_handle /* [in] [ref] */,
12530 : uint32_t _num_names /* [in] [range(0,1000)] */,
12531 : struct lsa_String *_names /* [in] [size_is(num_names)] */,
12532 : struct lsa_RefDomainList **_domains /* [out] [ref] */,
12533 : struct lsa_TransSidArray3 *_sids /* [in,out] [ref] */,
12534 : enum lsa_LookupNamesLevel _level /* [in] */,
12535 : uint32_t *_count /* [in,out] [ref] */,
12536 : enum lsa_LookupOptions _lookup_options /* [in] */,
12537 : enum lsa_ClientRevision _client_revision /* [in] */)
12538 : {
12539 0 : struct tevent_req *req;
12540 0 : struct dcerpc_lsa_LookupNames3_state *state;
12541 0 : struct tevent_req *subreq;
12542 :
12543 0 : req = tevent_req_create(mem_ctx, &state,
12544 : struct dcerpc_lsa_LookupNames3_state);
12545 0 : if (req == NULL) {
12546 0 : return NULL;
12547 : }
12548 0 : state->out_mem_ctx = NULL;
12549 :
12550 : /* In parameters */
12551 0 : state->orig.in.handle = _handle;
12552 0 : state->orig.in.num_names = _num_names;
12553 0 : state->orig.in.names = _names;
12554 0 : state->orig.in.sids = _sids;
12555 0 : state->orig.in.level = _level;
12556 0 : state->orig.in.count = _count;
12557 0 : state->orig.in.lookup_options = _lookup_options;
12558 0 : state->orig.in.client_revision = _client_revision;
12559 :
12560 : /* Out parameters */
12561 0 : state->orig.out.domains = _domains;
12562 0 : state->orig.out.sids = _sids;
12563 0 : state->orig.out.count = _count;
12564 :
12565 : /* Result */
12566 0 : NDR_ZERO_STRUCT(state->orig.out.result);
12567 :
12568 0 : state->out_mem_ctx = talloc_named_const(state, 0,
12569 : "dcerpc_lsa_LookupNames3_out_memory");
12570 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
12571 0 : return tevent_req_post(req, ev);
12572 : }
12573 :
12574 : /* make a temporary copy, that we pass to the dispatch function */
12575 0 : state->tmp = state->orig;
12576 :
12577 0 : subreq = dcerpc_lsa_LookupNames3_r_send(state, ev, h, &state->tmp);
12578 0 : if (tevent_req_nomem(subreq, req)) {
12579 0 : return tevent_req_post(req, ev);
12580 : }
12581 0 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupNames3_done, req);
12582 0 : return req;
12583 : }
12584 :
12585 0 : static void dcerpc_lsa_LookupNames3_done(struct tevent_req *subreq)
12586 : {
12587 0 : struct tevent_req *req = tevent_req_callback_data(
12588 : subreq, struct tevent_req);
12589 0 : struct dcerpc_lsa_LookupNames3_state *state = tevent_req_data(
12590 : req, struct dcerpc_lsa_LookupNames3_state);
12591 0 : NTSTATUS status;
12592 0 : TALLOC_CTX *mem_ctx;
12593 :
12594 0 : if (state->out_mem_ctx) {
12595 0 : mem_ctx = state->out_mem_ctx;
12596 : } else {
12597 0 : mem_ctx = state;
12598 : }
12599 :
12600 0 : status = dcerpc_lsa_LookupNames3_r_recv(subreq, mem_ctx);
12601 0 : TALLOC_FREE(subreq);
12602 0 : if (tevent_req_nterror(req, status)) {
12603 0 : return;
12604 : }
12605 :
12606 : /* Copy out parameters */
12607 0 : *state->orig.out.domains = *state->tmp.out.domains;
12608 0 : *state->orig.out.sids = *state->tmp.out.sids;
12609 0 : *state->orig.out.count = *state->tmp.out.count;
12610 :
12611 : /* Copy result */
12612 0 : state->orig.out.result = state->tmp.out.result;
12613 :
12614 : /* Reset temporary structure */
12615 0 : NDR_ZERO_STRUCT(state->tmp);
12616 :
12617 0 : tevent_req_done(req);
12618 : }
12619 :
12620 0 : NTSTATUS dcerpc_lsa_LookupNames3_recv(struct tevent_req *req,
12621 : TALLOC_CTX *mem_ctx,
12622 : NTSTATUS *result)
12623 : {
12624 0 : struct dcerpc_lsa_LookupNames3_state *state = tevent_req_data(
12625 : req, struct dcerpc_lsa_LookupNames3_state);
12626 0 : NTSTATUS status;
12627 :
12628 0 : if (tevent_req_is_nterror(req, &status)) {
12629 0 : tevent_req_received(req);
12630 0 : return status;
12631 : }
12632 :
12633 : /* Steal possible out parameters to the callers context */
12634 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
12635 :
12636 : /* Return result */
12637 0 : *result = state->orig.out.result;
12638 :
12639 0 : tevent_req_received(req);
12640 0 : return NT_STATUS_OK;
12641 : }
12642 :
12643 0 : NTSTATUS dcerpc_lsa_LookupNames3(struct dcerpc_binding_handle *h,
12644 : TALLOC_CTX *mem_ctx,
12645 : struct policy_handle *_handle /* [in] [ref] */,
12646 : uint32_t _num_names /* [in] [range(0,1000)] */,
12647 : struct lsa_String *_names /* [in] [size_is(num_names)] */,
12648 : struct lsa_RefDomainList **_domains /* [out] [ref] */,
12649 : struct lsa_TransSidArray3 *_sids /* [in,out] [ref] */,
12650 : enum lsa_LookupNamesLevel _level /* [in] */,
12651 : uint32_t *_count /* [in,out] [ref] */,
12652 : enum lsa_LookupOptions _lookup_options /* [in] */,
12653 : enum lsa_ClientRevision _client_revision /* [in] */,
12654 : NTSTATUS *result)
12655 : {
12656 0 : struct lsa_LookupNames3 r;
12657 0 : NTSTATUS status;
12658 :
12659 : /* In parameters */
12660 0 : r.in.handle = _handle;
12661 0 : r.in.num_names = _num_names;
12662 0 : r.in.names = _names;
12663 0 : r.in.sids = _sids;
12664 0 : r.in.level = _level;
12665 0 : r.in.count = _count;
12666 0 : r.in.lookup_options = _lookup_options;
12667 0 : r.in.client_revision = _client_revision;
12668 :
12669 : /* Out parameters */
12670 0 : r.out.domains = _domains;
12671 0 : r.out.sids = _sids;
12672 0 : r.out.count = _count;
12673 :
12674 : /* Result */
12675 0 : NDR_ZERO_STRUCT(r.out.result);
12676 :
12677 0 : status = dcerpc_lsa_LookupNames3_r(h, mem_ctx, &r);
12678 0 : if (!NT_STATUS_IS_OK(status)) {
12679 0 : return status;
12680 : }
12681 :
12682 : /* Return variables */
12683 0 : *_domains = *r.out.domains;
12684 0 : *_sids = *r.out.sids;
12685 0 : *_count = *r.out.count;
12686 :
12687 : /* Return result */
12688 0 : *result = r.out.result;
12689 :
12690 0 : return NT_STATUS_OK;
12691 : }
12692 :
12693 : struct dcerpc_lsa_lsaRQueryForestTrustInformation_r_state {
12694 : TALLOC_CTX *out_mem_ctx;
12695 : };
12696 :
12697 : static void dcerpc_lsa_lsaRQueryForestTrustInformation_r_done(struct tevent_req *subreq);
12698 :
12699 0 : struct tevent_req *dcerpc_lsa_lsaRQueryForestTrustInformation_r_send(TALLOC_CTX *mem_ctx,
12700 : struct tevent_context *ev,
12701 : struct dcerpc_binding_handle *h,
12702 : struct lsa_lsaRQueryForestTrustInformation *r)
12703 : {
12704 0 : struct tevent_req *req;
12705 0 : struct dcerpc_lsa_lsaRQueryForestTrustInformation_r_state *state;
12706 0 : struct tevent_req *subreq;
12707 :
12708 0 : req = tevent_req_create(mem_ctx, &state,
12709 : struct dcerpc_lsa_lsaRQueryForestTrustInformation_r_state);
12710 0 : if (req == NULL) {
12711 0 : return NULL;
12712 : }
12713 :
12714 0 : state->out_mem_ctx = talloc_new(state);
12715 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
12716 0 : return tevent_req_post(req, ev);
12717 : }
12718 :
12719 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
12720 : NULL, &ndr_table_lsarpc,
12721 0 : NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION, state->out_mem_ctx, r);
12722 0 : if (tevent_req_nomem(subreq, req)) {
12723 0 : return tevent_req_post(req, ev);
12724 : }
12725 0 : tevent_req_set_callback(subreq, dcerpc_lsa_lsaRQueryForestTrustInformation_r_done, req);
12726 :
12727 0 : return req;
12728 : }
12729 :
12730 0 : static void dcerpc_lsa_lsaRQueryForestTrustInformation_r_done(struct tevent_req *subreq)
12731 : {
12732 0 : struct tevent_req *req =
12733 0 : tevent_req_callback_data(subreq,
12734 : struct tevent_req);
12735 0 : NTSTATUS status;
12736 :
12737 0 : status = dcerpc_binding_handle_call_recv(subreq);
12738 0 : TALLOC_FREE(subreq);
12739 0 : if (tevent_req_nterror(req, status)) {
12740 0 : return;
12741 : }
12742 :
12743 0 : tevent_req_done(req);
12744 : }
12745 :
12746 0 : NTSTATUS dcerpc_lsa_lsaRQueryForestTrustInformation_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
12747 : {
12748 0 : struct dcerpc_lsa_lsaRQueryForestTrustInformation_r_state *state =
12749 0 : tevent_req_data(req,
12750 : struct dcerpc_lsa_lsaRQueryForestTrustInformation_r_state);
12751 0 : NTSTATUS status;
12752 :
12753 0 : if (tevent_req_is_nterror(req, &status)) {
12754 0 : tevent_req_received(req);
12755 0 : return status;
12756 : }
12757 :
12758 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
12759 :
12760 0 : tevent_req_received(req);
12761 0 : return NT_STATUS_OK;
12762 : }
12763 :
12764 124 : NTSTATUS dcerpc_lsa_lsaRQueryForestTrustInformation_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_lsaRQueryForestTrustInformation *r)
12765 : {
12766 0 : NTSTATUS status;
12767 :
12768 124 : status = dcerpc_binding_handle_call(h,
12769 : NULL, &ndr_table_lsarpc,
12770 : NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION, mem_ctx, r);
12771 :
12772 124 : return status;
12773 : }
12774 :
12775 : struct dcerpc_lsa_lsaRQueryForestTrustInformation_state {
12776 : struct lsa_lsaRQueryForestTrustInformation orig;
12777 : struct lsa_lsaRQueryForestTrustInformation tmp;
12778 : TALLOC_CTX *out_mem_ctx;
12779 : };
12780 :
12781 : static void dcerpc_lsa_lsaRQueryForestTrustInformation_done(struct tevent_req *subreq);
12782 :
12783 0 : struct tevent_req *dcerpc_lsa_lsaRQueryForestTrustInformation_send(TALLOC_CTX *mem_ctx,
12784 : struct tevent_context *ev,
12785 : struct dcerpc_binding_handle *h,
12786 : struct policy_handle *_handle /* [in] [ref] */,
12787 : struct lsa_String *_trusted_domain_name /* [in] [ref] */,
12788 : enum lsa_ForestTrustRecordType _highest_record_type /* [in] */,
12789 : struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */)
12790 : {
12791 0 : struct tevent_req *req;
12792 0 : struct dcerpc_lsa_lsaRQueryForestTrustInformation_state *state;
12793 0 : struct tevent_req *subreq;
12794 :
12795 0 : req = tevent_req_create(mem_ctx, &state,
12796 : struct dcerpc_lsa_lsaRQueryForestTrustInformation_state);
12797 0 : if (req == NULL) {
12798 0 : return NULL;
12799 : }
12800 0 : state->out_mem_ctx = NULL;
12801 :
12802 : /* In parameters */
12803 0 : state->orig.in.handle = _handle;
12804 0 : state->orig.in.trusted_domain_name = _trusted_domain_name;
12805 0 : state->orig.in.highest_record_type = _highest_record_type;
12806 :
12807 : /* Out parameters */
12808 0 : state->orig.out.forest_trust_info = _forest_trust_info;
12809 :
12810 : /* Result */
12811 0 : NDR_ZERO_STRUCT(state->orig.out.result);
12812 :
12813 0 : state->out_mem_ctx = talloc_named_const(state, 0,
12814 : "dcerpc_lsa_lsaRQueryForestTrustInformation_out_memory");
12815 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
12816 0 : return tevent_req_post(req, ev);
12817 : }
12818 :
12819 : /* make a temporary copy, that we pass to the dispatch function */
12820 0 : state->tmp = state->orig;
12821 :
12822 0 : subreq = dcerpc_lsa_lsaRQueryForestTrustInformation_r_send(state, ev, h, &state->tmp);
12823 0 : if (tevent_req_nomem(subreq, req)) {
12824 0 : return tevent_req_post(req, ev);
12825 : }
12826 0 : tevent_req_set_callback(subreq, dcerpc_lsa_lsaRQueryForestTrustInformation_done, req);
12827 0 : return req;
12828 : }
12829 :
12830 0 : static void dcerpc_lsa_lsaRQueryForestTrustInformation_done(struct tevent_req *subreq)
12831 : {
12832 0 : struct tevent_req *req = tevent_req_callback_data(
12833 : subreq, struct tevent_req);
12834 0 : struct dcerpc_lsa_lsaRQueryForestTrustInformation_state *state = tevent_req_data(
12835 : req, struct dcerpc_lsa_lsaRQueryForestTrustInformation_state);
12836 0 : NTSTATUS status;
12837 0 : TALLOC_CTX *mem_ctx;
12838 :
12839 0 : if (state->out_mem_ctx) {
12840 0 : mem_ctx = state->out_mem_ctx;
12841 : } else {
12842 0 : mem_ctx = state;
12843 : }
12844 :
12845 0 : status = dcerpc_lsa_lsaRQueryForestTrustInformation_r_recv(subreq, mem_ctx);
12846 0 : TALLOC_FREE(subreq);
12847 0 : if (tevent_req_nterror(req, status)) {
12848 0 : return;
12849 : }
12850 :
12851 : /* Copy out parameters */
12852 0 : *state->orig.out.forest_trust_info = *state->tmp.out.forest_trust_info;
12853 :
12854 : /* Copy result */
12855 0 : state->orig.out.result = state->tmp.out.result;
12856 :
12857 : /* Reset temporary structure */
12858 0 : NDR_ZERO_STRUCT(state->tmp);
12859 :
12860 0 : tevent_req_done(req);
12861 : }
12862 :
12863 0 : NTSTATUS dcerpc_lsa_lsaRQueryForestTrustInformation_recv(struct tevent_req *req,
12864 : TALLOC_CTX *mem_ctx,
12865 : NTSTATUS *result)
12866 : {
12867 0 : struct dcerpc_lsa_lsaRQueryForestTrustInformation_state *state = tevent_req_data(
12868 : req, struct dcerpc_lsa_lsaRQueryForestTrustInformation_state);
12869 0 : NTSTATUS status;
12870 :
12871 0 : if (tevent_req_is_nterror(req, &status)) {
12872 0 : tevent_req_received(req);
12873 0 : return status;
12874 : }
12875 :
12876 : /* Steal possible out parameters to the callers context */
12877 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
12878 :
12879 : /* Return result */
12880 0 : *result = state->orig.out.result;
12881 :
12882 0 : tevent_req_received(req);
12883 0 : return NT_STATUS_OK;
12884 : }
12885 :
12886 0 : NTSTATUS dcerpc_lsa_lsaRQueryForestTrustInformation(struct dcerpc_binding_handle *h,
12887 : TALLOC_CTX *mem_ctx,
12888 : struct policy_handle *_handle /* [in] [ref] */,
12889 : struct lsa_String *_trusted_domain_name /* [in] [ref] */,
12890 : enum lsa_ForestTrustRecordType _highest_record_type /* [in] */,
12891 : struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */,
12892 : NTSTATUS *result)
12893 : {
12894 0 : struct lsa_lsaRQueryForestTrustInformation r;
12895 0 : NTSTATUS status;
12896 :
12897 : /* In parameters */
12898 0 : r.in.handle = _handle;
12899 0 : r.in.trusted_domain_name = _trusted_domain_name;
12900 0 : r.in.highest_record_type = _highest_record_type;
12901 :
12902 : /* Out parameters */
12903 0 : r.out.forest_trust_info = _forest_trust_info;
12904 :
12905 : /* Result */
12906 0 : NDR_ZERO_STRUCT(r.out.result);
12907 :
12908 0 : status = dcerpc_lsa_lsaRQueryForestTrustInformation_r(h, mem_ctx, &r);
12909 0 : if (!NT_STATUS_IS_OK(status)) {
12910 0 : return status;
12911 : }
12912 :
12913 : /* Return variables */
12914 0 : *_forest_trust_info = *r.out.forest_trust_info;
12915 :
12916 : /* Return result */
12917 0 : *result = r.out.result;
12918 :
12919 0 : return NT_STATUS_OK;
12920 : }
12921 :
12922 : struct dcerpc_lsa_lsaRSetForestTrustInformation_r_state {
12923 : TALLOC_CTX *out_mem_ctx;
12924 : };
12925 :
12926 : static void dcerpc_lsa_lsaRSetForestTrustInformation_r_done(struct tevent_req *subreq);
12927 :
12928 0 : struct tevent_req *dcerpc_lsa_lsaRSetForestTrustInformation_r_send(TALLOC_CTX *mem_ctx,
12929 : struct tevent_context *ev,
12930 : struct dcerpc_binding_handle *h,
12931 : struct lsa_lsaRSetForestTrustInformation *r)
12932 : {
12933 0 : struct tevent_req *req;
12934 0 : struct dcerpc_lsa_lsaRSetForestTrustInformation_r_state *state;
12935 0 : struct tevent_req *subreq;
12936 :
12937 0 : req = tevent_req_create(mem_ctx, &state,
12938 : struct dcerpc_lsa_lsaRSetForestTrustInformation_r_state);
12939 0 : if (req == NULL) {
12940 0 : return NULL;
12941 : }
12942 :
12943 0 : state->out_mem_ctx = talloc_new(state);
12944 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
12945 0 : return tevent_req_post(req, ev);
12946 : }
12947 :
12948 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
12949 : NULL, &ndr_table_lsarpc,
12950 0 : NDR_LSA_LSARSETFORESTTRUSTINFORMATION, state->out_mem_ctx, r);
12951 0 : if (tevent_req_nomem(subreq, req)) {
12952 0 : return tevent_req_post(req, ev);
12953 : }
12954 0 : tevent_req_set_callback(subreq, dcerpc_lsa_lsaRSetForestTrustInformation_r_done, req);
12955 :
12956 0 : return req;
12957 : }
12958 :
12959 0 : static void dcerpc_lsa_lsaRSetForestTrustInformation_r_done(struct tevent_req *subreq)
12960 : {
12961 0 : struct tevent_req *req =
12962 0 : tevent_req_callback_data(subreq,
12963 : struct tevent_req);
12964 0 : NTSTATUS status;
12965 :
12966 0 : status = dcerpc_binding_handle_call_recv(subreq);
12967 0 : TALLOC_FREE(subreq);
12968 0 : if (tevent_req_nterror(req, status)) {
12969 0 : return;
12970 : }
12971 :
12972 0 : tevent_req_done(req);
12973 : }
12974 :
12975 0 : NTSTATUS dcerpc_lsa_lsaRSetForestTrustInformation_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
12976 : {
12977 0 : struct dcerpc_lsa_lsaRSetForestTrustInformation_r_state *state =
12978 0 : tevent_req_data(req,
12979 : struct dcerpc_lsa_lsaRSetForestTrustInformation_r_state);
12980 0 : NTSTATUS status;
12981 :
12982 0 : if (tevent_req_is_nterror(req, &status)) {
12983 0 : tevent_req_received(req);
12984 0 : return status;
12985 : }
12986 :
12987 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
12988 :
12989 0 : tevent_req_received(req);
12990 0 : return NT_STATUS_OK;
12991 : }
12992 :
12993 71 : NTSTATUS dcerpc_lsa_lsaRSetForestTrustInformation_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_lsaRSetForestTrustInformation *r)
12994 : {
12995 0 : NTSTATUS status;
12996 :
12997 71 : status = dcerpc_binding_handle_call(h,
12998 : NULL, &ndr_table_lsarpc,
12999 : NDR_LSA_LSARSETFORESTTRUSTINFORMATION, mem_ctx, r);
13000 :
13001 71 : return status;
13002 : }
13003 :
13004 : struct dcerpc_lsa_lsaRSetForestTrustInformation_state {
13005 : struct lsa_lsaRSetForestTrustInformation orig;
13006 : struct lsa_lsaRSetForestTrustInformation tmp;
13007 : TALLOC_CTX *out_mem_ctx;
13008 : };
13009 :
13010 : static void dcerpc_lsa_lsaRSetForestTrustInformation_done(struct tevent_req *subreq);
13011 :
13012 0 : struct tevent_req *dcerpc_lsa_lsaRSetForestTrustInformation_send(TALLOC_CTX *mem_ctx,
13013 : struct tevent_context *ev,
13014 : struct dcerpc_binding_handle *h,
13015 : struct policy_handle *_handle /* [in] [ref] */,
13016 : struct lsa_StringLarge *_trusted_domain_name /* [in] [ref] */,
13017 : enum lsa_ForestTrustRecordType _highest_record_type /* [in] */,
13018 : struct lsa_ForestTrustInformation *_forest_trust_info /* [in] [ref] */,
13019 : uint8_t _check_only /* [in] */,
13020 : struct lsa_ForestTrustCollisionInfo **_collision_info /* [out] [ref] */)
13021 : {
13022 0 : struct tevent_req *req;
13023 0 : struct dcerpc_lsa_lsaRSetForestTrustInformation_state *state;
13024 0 : struct tevent_req *subreq;
13025 :
13026 0 : req = tevent_req_create(mem_ctx, &state,
13027 : struct dcerpc_lsa_lsaRSetForestTrustInformation_state);
13028 0 : if (req == NULL) {
13029 0 : return NULL;
13030 : }
13031 0 : state->out_mem_ctx = NULL;
13032 :
13033 : /* In parameters */
13034 0 : state->orig.in.handle = _handle;
13035 0 : state->orig.in.trusted_domain_name = _trusted_domain_name;
13036 0 : state->orig.in.highest_record_type = _highest_record_type;
13037 0 : state->orig.in.forest_trust_info = _forest_trust_info;
13038 0 : state->orig.in.check_only = _check_only;
13039 :
13040 : /* Out parameters */
13041 0 : state->orig.out.collision_info = _collision_info;
13042 :
13043 : /* Result */
13044 0 : NDR_ZERO_STRUCT(state->orig.out.result);
13045 :
13046 0 : state->out_mem_ctx = talloc_named_const(state, 0,
13047 : "dcerpc_lsa_lsaRSetForestTrustInformation_out_memory");
13048 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
13049 0 : return tevent_req_post(req, ev);
13050 : }
13051 :
13052 : /* make a temporary copy, that we pass to the dispatch function */
13053 0 : state->tmp = state->orig;
13054 :
13055 0 : subreq = dcerpc_lsa_lsaRSetForestTrustInformation_r_send(state, ev, h, &state->tmp);
13056 0 : if (tevent_req_nomem(subreq, req)) {
13057 0 : return tevent_req_post(req, ev);
13058 : }
13059 0 : tevent_req_set_callback(subreq, dcerpc_lsa_lsaRSetForestTrustInformation_done, req);
13060 0 : return req;
13061 : }
13062 :
13063 0 : static void dcerpc_lsa_lsaRSetForestTrustInformation_done(struct tevent_req *subreq)
13064 : {
13065 0 : struct tevent_req *req = tevent_req_callback_data(
13066 : subreq, struct tevent_req);
13067 0 : struct dcerpc_lsa_lsaRSetForestTrustInformation_state *state = tevent_req_data(
13068 : req, struct dcerpc_lsa_lsaRSetForestTrustInformation_state);
13069 0 : NTSTATUS status;
13070 0 : TALLOC_CTX *mem_ctx;
13071 :
13072 0 : if (state->out_mem_ctx) {
13073 0 : mem_ctx = state->out_mem_ctx;
13074 : } else {
13075 0 : mem_ctx = state;
13076 : }
13077 :
13078 0 : status = dcerpc_lsa_lsaRSetForestTrustInformation_r_recv(subreq, mem_ctx);
13079 0 : TALLOC_FREE(subreq);
13080 0 : if (tevent_req_nterror(req, status)) {
13081 0 : return;
13082 : }
13083 :
13084 : /* Copy out parameters */
13085 0 : *state->orig.out.collision_info = *state->tmp.out.collision_info;
13086 :
13087 : /* Copy result */
13088 0 : state->orig.out.result = state->tmp.out.result;
13089 :
13090 : /* Reset temporary structure */
13091 0 : NDR_ZERO_STRUCT(state->tmp);
13092 :
13093 0 : tevent_req_done(req);
13094 : }
13095 :
13096 0 : NTSTATUS dcerpc_lsa_lsaRSetForestTrustInformation_recv(struct tevent_req *req,
13097 : TALLOC_CTX *mem_ctx,
13098 : NTSTATUS *result)
13099 : {
13100 0 : struct dcerpc_lsa_lsaRSetForestTrustInformation_state *state = tevent_req_data(
13101 : req, struct dcerpc_lsa_lsaRSetForestTrustInformation_state);
13102 0 : NTSTATUS status;
13103 :
13104 0 : if (tevent_req_is_nterror(req, &status)) {
13105 0 : tevent_req_received(req);
13106 0 : return status;
13107 : }
13108 :
13109 : /* Steal possible out parameters to the callers context */
13110 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
13111 :
13112 : /* Return result */
13113 0 : *result = state->orig.out.result;
13114 :
13115 0 : tevent_req_received(req);
13116 0 : return NT_STATUS_OK;
13117 : }
13118 :
13119 0 : NTSTATUS dcerpc_lsa_lsaRSetForestTrustInformation(struct dcerpc_binding_handle *h,
13120 : TALLOC_CTX *mem_ctx,
13121 : struct policy_handle *_handle /* [in] [ref] */,
13122 : struct lsa_StringLarge *_trusted_domain_name /* [in] [ref] */,
13123 : enum lsa_ForestTrustRecordType _highest_record_type /* [in] */,
13124 : struct lsa_ForestTrustInformation *_forest_trust_info /* [in] [ref] */,
13125 : uint8_t _check_only /* [in] */,
13126 : struct lsa_ForestTrustCollisionInfo **_collision_info /* [out] [ref] */,
13127 : NTSTATUS *result)
13128 : {
13129 0 : struct lsa_lsaRSetForestTrustInformation r;
13130 0 : NTSTATUS status;
13131 :
13132 : /* In parameters */
13133 0 : r.in.handle = _handle;
13134 0 : r.in.trusted_domain_name = _trusted_domain_name;
13135 0 : r.in.highest_record_type = _highest_record_type;
13136 0 : r.in.forest_trust_info = _forest_trust_info;
13137 0 : r.in.check_only = _check_only;
13138 :
13139 : /* Out parameters */
13140 0 : r.out.collision_info = _collision_info;
13141 :
13142 : /* Result */
13143 0 : NDR_ZERO_STRUCT(r.out.result);
13144 :
13145 0 : status = dcerpc_lsa_lsaRSetForestTrustInformation_r(h, mem_ctx, &r);
13146 0 : if (!NT_STATUS_IS_OK(status)) {
13147 0 : return status;
13148 : }
13149 :
13150 : /* Return variables */
13151 0 : *_collision_info = *r.out.collision_info;
13152 :
13153 : /* Return result */
13154 0 : *result = r.out.result;
13155 :
13156 0 : return NT_STATUS_OK;
13157 : }
13158 :
13159 : struct dcerpc_lsa_LookupSids3_r_state {
13160 : TALLOC_CTX *out_mem_ctx;
13161 : };
13162 :
13163 : static void dcerpc_lsa_LookupSids3_r_done(struct tevent_req *subreq);
13164 :
13165 20 : struct tevent_req *dcerpc_lsa_LookupSids3_r_send(TALLOC_CTX *mem_ctx,
13166 : struct tevent_context *ev,
13167 : struct dcerpc_binding_handle *h,
13168 : struct lsa_LookupSids3 *r)
13169 : {
13170 0 : struct tevent_req *req;
13171 0 : struct dcerpc_lsa_LookupSids3_r_state *state;
13172 0 : struct tevent_req *subreq;
13173 :
13174 20 : req = tevent_req_create(mem_ctx, &state,
13175 : struct dcerpc_lsa_LookupSids3_r_state);
13176 20 : if (req == NULL) {
13177 0 : return NULL;
13178 : }
13179 :
13180 20 : state->out_mem_ctx = talloc_new(state);
13181 20 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
13182 0 : return tevent_req_post(req, ev);
13183 : }
13184 :
13185 20 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
13186 : NULL, &ndr_table_lsarpc,
13187 20 : NDR_LSA_LOOKUPSIDS3, state->out_mem_ctx, r);
13188 20 : if (tevent_req_nomem(subreq, req)) {
13189 0 : return tevent_req_post(req, ev);
13190 : }
13191 20 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupSids3_r_done, req);
13192 :
13193 20 : return req;
13194 : }
13195 :
13196 20 : static void dcerpc_lsa_LookupSids3_r_done(struct tevent_req *subreq)
13197 : {
13198 0 : struct tevent_req *req =
13199 20 : tevent_req_callback_data(subreq,
13200 : struct tevent_req);
13201 0 : NTSTATUS status;
13202 :
13203 20 : status = dcerpc_binding_handle_call_recv(subreq);
13204 20 : TALLOC_FREE(subreq);
13205 20 : if (tevent_req_nterror(req, status)) {
13206 0 : return;
13207 : }
13208 :
13209 20 : tevent_req_done(req);
13210 : }
13211 :
13212 20 : NTSTATUS dcerpc_lsa_LookupSids3_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
13213 : {
13214 0 : struct dcerpc_lsa_LookupSids3_r_state *state =
13215 20 : tevent_req_data(req,
13216 : struct dcerpc_lsa_LookupSids3_r_state);
13217 0 : NTSTATUS status;
13218 :
13219 20 : if (tevent_req_is_nterror(req, &status)) {
13220 0 : tevent_req_received(req);
13221 0 : return status;
13222 : }
13223 :
13224 20 : talloc_steal(mem_ctx, state->out_mem_ctx);
13225 :
13226 20 : tevent_req_received(req);
13227 20 : return NT_STATUS_OK;
13228 : }
13229 :
13230 303 : NTSTATUS dcerpc_lsa_LookupSids3_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_LookupSids3 *r)
13231 : {
13232 48 : NTSTATUS status;
13233 :
13234 303 : status = dcerpc_binding_handle_call(h,
13235 : NULL, &ndr_table_lsarpc,
13236 : NDR_LSA_LOOKUPSIDS3, mem_ctx, r);
13237 :
13238 303 : return status;
13239 : }
13240 :
13241 : struct dcerpc_lsa_LookupSids3_state {
13242 : struct lsa_LookupSids3 orig;
13243 : struct lsa_LookupSids3 tmp;
13244 : TALLOC_CTX *out_mem_ctx;
13245 : };
13246 :
13247 : static void dcerpc_lsa_LookupSids3_done(struct tevent_req *subreq);
13248 :
13249 20 : struct tevent_req *dcerpc_lsa_LookupSids3_send(TALLOC_CTX *mem_ctx,
13250 : struct tevent_context *ev,
13251 : struct dcerpc_binding_handle *h,
13252 : struct lsa_SidArray *_sids /* [in] [ref] */,
13253 : struct lsa_RefDomainList **_domains /* [out] [ref] */,
13254 : struct lsa_TransNameArray2 *_names /* [in,out] [ref] */,
13255 : enum lsa_LookupNamesLevel _level /* [in] */,
13256 : uint32_t *_count /* [in,out] [ref] */,
13257 : enum lsa_LookupOptions _lookup_options /* [in] */,
13258 : enum lsa_ClientRevision _client_revision /* [in] */)
13259 : {
13260 0 : struct tevent_req *req;
13261 0 : struct dcerpc_lsa_LookupSids3_state *state;
13262 0 : struct tevent_req *subreq;
13263 :
13264 20 : req = tevent_req_create(mem_ctx, &state,
13265 : struct dcerpc_lsa_LookupSids3_state);
13266 20 : if (req == NULL) {
13267 0 : return NULL;
13268 : }
13269 20 : state->out_mem_ctx = NULL;
13270 :
13271 : /* In parameters */
13272 20 : state->orig.in.sids = _sids;
13273 20 : state->orig.in.names = _names;
13274 20 : state->orig.in.level = _level;
13275 20 : state->orig.in.count = _count;
13276 20 : state->orig.in.lookup_options = _lookup_options;
13277 20 : state->orig.in.client_revision = _client_revision;
13278 :
13279 : /* Out parameters */
13280 20 : state->orig.out.domains = _domains;
13281 20 : state->orig.out.names = _names;
13282 20 : state->orig.out.count = _count;
13283 :
13284 : /* Result */
13285 20 : NDR_ZERO_STRUCT(state->orig.out.result);
13286 :
13287 20 : state->out_mem_ctx = talloc_named_const(state, 0,
13288 : "dcerpc_lsa_LookupSids3_out_memory");
13289 20 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
13290 0 : return tevent_req_post(req, ev);
13291 : }
13292 :
13293 : /* make a temporary copy, that we pass to the dispatch function */
13294 20 : state->tmp = state->orig;
13295 :
13296 20 : subreq = dcerpc_lsa_LookupSids3_r_send(state, ev, h, &state->tmp);
13297 20 : if (tevent_req_nomem(subreq, req)) {
13298 0 : return tevent_req_post(req, ev);
13299 : }
13300 20 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupSids3_done, req);
13301 20 : return req;
13302 : }
13303 :
13304 20 : static void dcerpc_lsa_LookupSids3_done(struct tevent_req *subreq)
13305 : {
13306 20 : struct tevent_req *req = tevent_req_callback_data(
13307 : subreq, struct tevent_req);
13308 20 : struct dcerpc_lsa_LookupSids3_state *state = tevent_req_data(
13309 : req, struct dcerpc_lsa_LookupSids3_state);
13310 0 : NTSTATUS status;
13311 0 : TALLOC_CTX *mem_ctx;
13312 :
13313 20 : if (state->out_mem_ctx) {
13314 20 : mem_ctx = state->out_mem_ctx;
13315 : } else {
13316 0 : mem_ctx = state;
13317 : }
13318 :
13319 20 : status = dcerpc_lsa_LookupSids3_r_recv(subreq, mem_ctx);
13320 20 : TALLOC_FREE(subreq);
13321 20 : if (tevent_req_nterror(req, status)) {
13322 0 : return;
13323 : }
13324 :
13325 : /* Copy out parameters */
13326 20 : *state->orig.out.domains = *state->tmp.out.domains;
13327 20 : *state->orig.out.names = *state->tmp.out.names;
13328 20 : *state->orig.out.count = *state->tmp.out.count;
13329 :
13330 : /* Copy result */
13331 20 : state->orig.out.result = state->tmp.out.result;
13332 :
13333 : /* Reset temporary structure */
13334 20 : NDR_ZERO_STRUCT(state->tmp);
13335 :
13336 20 : tevent_req_done(req);
13337 : }
13338 :
13339 20 : NTSTATUS dcerpc_lsa_LookupSids3_recv(struct tevent_req *req,
13340 : TALLOC_CTX *mem_ctx,
13341 : NTSTATUS *result)
13342 : {
13343 20 : struct dcerpc_lsa_LookupSids3_state *state = tevent_req_data(
13344 : req, struct dcerpc_lsa_LookupSids3_state);
13345 0 : NTSTATUS status;
13346 :
13347 20 : if (tevent_req_is_nterror(req, &status)) {
13348 0 : tevent_req_received(req);
13349 0 : return status;
13350 : }
13351 :
13352 : /* Steal possible out parameters to the callers context */
13353 20 : talloc_steal(mem_ctx, state->out_mem_ctx);
13354 :
13355 : /* Return result */
13356 20 : *result = state->orig.out.result;
13357 :
13358 20 : tevent_req_received(req);
13359 20 : return NT_STATUS_OK;
13360 : }
13361 :
13362 2 : NTSTATUS dcerpc_lsa_LookupSids3(struct dcerpc_binding_handle *h,
13363 : TALLOC_CTX *mem_ctx,
13364 : struct lsa_SidArray *_sids /* [in] [ref] */,
13365 : struct lsa_RefDomainList **_domains /* [out] [ref] */,
13366 : struct lsa_TransNameArray2 *_names /* [in,out] [ref] */,
13367 : enum lsa_LookupNamesLevel _level /* [in] */,
13368 : uint32_t *_count /* [in,out] [ref] */,
13369 : enum lsa_LookupOptions _lookup_options /* [in] */,
13370 : enum lsa_ClientRevision _client_revision /* [in] */,
13371 : NTSTATUS *result)
13372 : {
13373 0 : struct lsa_LookupSids3 r;
13374 0 : NTSTATUS status;
13375 :
13376 : /* In parameters */
13377 2 : r.in.sids = _sids;
13378 2 : r.in.names = _names;
13379 2 : r.in.level = _level;
13380 2 : r.in.count = _count;
13381 2 : r.in.lookup_options = _lookup_options;
13382 2 : r.in.client_revision = _client_revision;
13383 :
13384 : /* Out parameters */
13385 2 : r.out.domains = _domains;
13386 2 : r.out.names = _names;
13387 2 : r.out.count = _count;
13388 :
13389 : /* Result */
13390 2 : NDR_ZERO_STRUCT(r.out.result);
13391 :
13392 2 : status = dcerpc_lsa_LookupSids3_r(h, mem_ctx, &r);
13393 2 : if (!NT_STATUS_IS_OK(status)) {
13394 0 : return status;
13395 : }
13396 :
13397 : /* Return variables */
13398 2 : *_domains = *r.out.domains;
13399 2 : *_names = *r.out.names;
13400 2 : *_count = *r.out.count;
13401 :
13402 : /* Return result */
13403 2 : *result = r.out.result;
13404 :
13405 2 : return NT_STATUS_OK;
13406 : }
13407 :
13408 : struct dcerpc_lsa_LookupNames4_r_state {
13409 : TALLOC_CTX *out_mem_ctx;
13410 : };
13411 :
13412 : static void dcerpc_lsa_LookupNames4_r_done(struct tevent_req *subreq);
13413 :
13414 48 : struct tevent_req *dcerpc_lsa_LookupNames4_r_send(TALLOC_CTX *mem_ctx,
13415 : struct tevent_context *ev,
13416 : struct dcerpc_binding_handle *h,
13417 : struct lsa_LookupNames4 *r)
13418 : {
13419 0 : struct tevent_req *req;
13420 0 : struct dcerpc_lsa_LookupNames4_r_state *state;
13421 0 : struct tevent_req *subreq;
13422 :
13423 48 : req = tevent_req_create(mem_ctx, &state,
13424 : struct dcerpc_lsa_LookupNames4_r_state);
13425 48 : if (req == NULL) {
13426 0 : return NULL;
13427 : }
13428 :
13429 48 : state->out_mem_ctx = talloc_new(state);
13430 48 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
13431 0 : return tevent_req_post(req, ev);
13432 : }
13433 :
13434 48 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
13435 : NULL, &ndr_table_lsarpc,
13436 48 : NDR_LSA_LOOKUPNAMES4, state->out_mem_ctx, r);
13437 48 : if (tevent_req_nomem(subreq, req)) {
13438 0 : return tevent_req_post(req, ev);
13439 : }
13440 48 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupNames4_r_done, req);
13441 :
13442 48 : return req;
13443 : }
13444 :
13445 48 : static void dcerpc_lsa_LookupNames4_r_done(struct tevent_req *subreq)
13446 : {
13447 0 : struct tevent_req *req =
13448 48 : tevent_req_callback_data(subreq,
13449 : struct tevent_req);
13450 0 : NTSTATUS status;
13451 :
13452 48 : status = dcerpc_binding_handle_call_recv(subreq);
13453 48 : TALLOC_FREE(subreq);
13454 48 : if (tevent_req_nterror(req, status)) {
13455 16 : return;
13456 : }
13457 :
13458 32 : tevent_req_done(req);
13459 : }
13460 :
13461 48 : NTSTATUS dcerpc_lsa_LookupNames4_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
13462 : {
13463 0 : struct dcerpc_lsa_LookupNames4_r_state *state =
13464 48 : tevent_req_data(req,
13465 : struct dcerpc_lsa_LookupNames4_r_state);
13466 0 : NTSTATUS status;
13467 :
13468 48 : if (tevent_req_is_nterror(req, &status)) {
13469 16 : tevent_req_received(req);
13470 16 : return status;
13471 : }
13472 :
13473 32 : talloc_steal(mem_ctx, state->out_mem_ctx);
13474 :
13475 32 : tevent_req_received(req);
13476 32 : return NT_STATUS_OK;
13477 : }
13478 :
13479 575 : NTSTATUS dcerpc_lsa_LookupNames4_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_LookupNames4 *r)
13480 : {
13481 96 : NTSTATUS status;
13482 :
13483 575 : status = dcerpc_binding_handle_call(h,
13484 : NULL, &ndr_table_lsarpc,
13485 : NDR_LSA_LOOKUPNAMES4, mem_ctx, r);
13486 :
13487 575 : return status;
13488 : }
13489 :
13490 : struct dcerpc_lsa_LookupNames4_state {
13491 : struct lsa_LookupNames4 orig;
13492 : struct lsa_LookupNames4 tmp;
13493 : TALLOC_CTX *out_mem_ctx;
13494 : };
13495 :
13496 : static void dcerpc_lsa_LookupNames4_done(struct tevent_req *subreq);
13497 :
13498 48 : struct tevent_req *dcerpc_lsa_LookupNames4_send(TALLOC_CTX *mem_ctx,
13499 : struct tevent_context *ev,
13500 : struct dcerpc_binding_handle *h,
13501 : uint32_t _num_names /* [in] [range(0,1000)] */,
13502 : struct lsa_String *_names /* [in] [size_is(num_names)] */,
13503 : struct lsa_RefDomainList **_domains /* [out] [ref] */,
13504 : struct lsa_TransSidArray3 *_sids /* [in,out] [ref] */,
13505 : enum lsa_LookupNamesLevel _level /* [in] */,
13506 : uint32_t *_count /* [in,out] [ref] */,
13507 : enum lsa_LookupOptions _lookup_options /* [in] */,
13508 : enum lsa_ClientRevision _client_revision /* [in] */)
13509 : {
13510 0 : struct tevent_req *req;
13511 0 : struct dcerpc_lsa_LookupNames4_state *state;
13512 0 : struct tevent_req *subreq;
13513 :
13514 48 : req = tevent_req_create(mem_ctx, &state,
13515 : struct dcerpc_lsa_LookupNames4_state);
13516 48 : if (req == NULL) {
13517 0 : return NULL;
13518 : }
13519 48 : state->out_mem_ctx = NULL;
13520 :
13521 : /* In parameters */
13522 48 : state->orig.in.num_names = _num_names;
13523 48 : state->orig.in.names = _names;
13524 48 : state->orig.in.sids = _sids;
13525 48 : state->orig.in.level = _level;
13526 48 : state->orig.in.count = _count;
13527 48 : state->orig.in.lookup_options = _lookup_options;
13528 48 : state->orig.in.client_revision = _client_revision;
13529 :
13530 : /* Out parameters */
13531 48 : state->orig.out.domains = _domains;
13532 48 : state->orig.out.sids = _sids;
13533 48 : state->orig.out.count = _count;
13534 :
13535 : /* Result */
13536 48 : NDR_ZERO_STRUCT(state->orig.out.result);
13537 :
13538 48 : state->out_mem_ctx = talloc_named_const(state, 0,
13539 : "dcerpc_lsa_LookupNames4_out_memory");
13540 48 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
13541 0 : return tevent_req_post(req, ev);
13542 : }
13543 :
13544 : /* make a temporary copy, that we pass to the dispatch function */
13545 48 : state->tmp = state->orig;
13546 :
13547 48 : subreq = dcerpc_lsa_LookupNames4_r_send(state, ev, h, &state->tmp);
13548 48 : if (tevent_req_nomem(subreq, req)) {
13549 0 : return tevent_req_post(req, ev);
13550 : }
13551 48 : tevent_req_set_callback(subreq, dcerpc_lsa_LookupNames4_done, req);
13552 48 : return req;
13553 : }
13554 :
13555 48 : static void dcerpc_lsa_LookupNames4_done(struct tevent_req *subreq)
13556 : {
13557 48 : struct tevent_req *req = tevent_req_callback_data(
13558 : subreq, struct tevent_req);
13559 48 : struct dcerpc_lsa_LookupNames4_state *state = tevent_req_data(
13560 : req, struct dcerpc_lsa_LookupNames4_state);
13561 0 : NTSTATUS status;
13562 0 : TALLOC_CTX *mem_ctx;
13563 :
13564 48 : if (state->out_mem_ctx) {
13565 48 : mem_ctx = state->out_mem_ctx;
13566 : } else {
13567 0 : mem_ctx = state;
13568 : }
13569 :
13570 48 : status = dcerpc_lsa_LookupNames4_r_recv(subreq, mem_ctx);
13571 48 : TALLOC_FREE(subreq);
13572 48 : if (tevent_req_nterror(req, status)) {
13573 16 : return;
13574 : }
13575 :
13576 : /* Copy out parameters */
13577 32 : *state->orig.out.domains = *state->tmp.out.domains;
13578 32 : *state->orig.out.sids = *state->tmp.out.sids;
13579 32 : *state->orig.out.count = *state->tmp.out.count;
13580 :
13581 : /* Copy result */
13582 32 : state->orig.out.result = state->tmp.out.result;
13583 :
13584 : /* Reset temporary structure */
13585 32 : NDR_ZERO_STRUCT(state->tmp);
13586 :
13587 32 : tevent_req_done(req);
13588 : }
13589 :
13590 48 : NTSTATUS dcerpc_lsa_LookupNames4_recv(struct tevent_req *req,
13591 : TALLOC_CTX *mem_ctx,
13592 : NTSTATUS *result)
13593 : {
13594 48 : struct dcerpc_lsa_LookupNames4_state *state = tevent_req_data(
13595 : req, struct dcerpc_lsa_LookupNames4_state);
13596 0 : NTSTATUS status;
13597 :
13598 48 : if (tevent_req_is_nterror(req, &status)) {
13599 16 : tevent_req_received(req);
13600 16 : return status;
13601 : }
13602 :
13603 : /* Steal possible out parameters to the callers context */
13604 32 : talloc_steal(mem_ctx, state->out_mem_ctx);
13605 :
13606 : /* Return result */
13607 32 : *result = state->orig.out.result;
13608 :
13609 32 : tevent_req_received(req);
13610 32 : return NT_STATUS_OK;
13611 : }
13612 :
13613 0 : NTSTATUS dcerpc_lsa_LookupNames4(struct dcerpc_binding_handle *h,
13614 : TALLOC_CTX *mem_ctx,
13615 : uint32_t _num_names /* [in] [range(0,1000)] */,
13616 : struct lsa_String *_names /* [in] [size_is(num_names)] */,
13617 : struct lsa_RefDomainList **_domains /* [out] [ref] */,
13618 : struct lsa_TransSidArray3 *_sids /* [in,out] [ref] */,
13619 : enum lsa_LookupNamesLevel _level /* [in] */,
13620 : uint32_t *_count /* [in,out] [ref] */,
13621 : enum lsa_LookupOptions _lookup_options /* [in] */,
13622 : enum lsa_ClientRevision _client_revision /* [in] */,
13623 : NTSTATUS *result)
13624 : {
13625 0 : struct lsa_LookupNames4 r;
13626 0 : NTSTATUS status;
13627 :
13628 : /* In parameters */
13629 0 : r.in.num_names = _num_names;
13630 0 : r.in.names = _names;
13631 0 : r.in.sids = _sids;
13632 0 : r.in.level = _level;
13633 0 : r.in.count = _count;
13634 0 : r.in.lookup_options = _lookup_options;
13635 0 : r.in.client_revision = _client_revision;
13636 :
13637 : /* Out parameters */
13638 0 : r.out.domains = _domains;
13639 0 : r.out.sids = _sids;
13640 0 : r.out.count = _count;
13641 :
13642 : /* Result */
13643 0 : NDR_ZERO_STRUCT(r.out.result);
13644 :
13645 0 : status = dcerpc_lsa_LookupNames4_r(h, mem_ctx, &r);
13646 0 : if (!NT_STATUS_IS_OK(status)) {
13647 0 : return status;
13648 : }
13649 :
13650 : /* Return variables */
13651 0 : *_domains = *r.out.domains;
13652 0 : *_sids = *r.out.sids;
13653 0 : *_count = *r.out.count;
13654 :
13655 : /* Return result */
13656 0 : *result = r.out.result;
13657 :
13658 0 : return NT_STATUS_OK;
13659 : }
13660 :
13661 : struct dcerpc_lsa_CreateTrustedDomainEx3_r_state {
13662 : TALLOC_CTX *out_mem_ctx;
13663 : };
13664 :
13665 : static void dcerpc_lsa_CreateTrustedDomainEx3_r_done(struct tevent_req *subreq);
13666 :
13667 0 : struct tevent_req *dcerpc_lsa_CreateTrustedDomainEx3_r_send(TALLOC_CTX *mem_ctx,
13668 : struct tevent_context *ev,
13669 : struct dcerpc_binding_handle *h,
13670 : struct lsa_CreateTrustedDomainEx3 *r)
13671 : {
13672 0 : struct tevent_req *req;
13673 0 : struct dcerpc_lsa_CreateTrustedDomainEx3_r_state *state;
13674 0 : struct tevent_req *subreq;
13675 :
13676 0 : req = tevent_req_create(mem_ctx, &state,
13677 : struct dcerpc_lsa_CreateTrustedDomainEx3_r_state);
13678 0 : if (req == NULL) {
13679 0 : return NULL;
13680 : }
13681 :
13682 0 : state->out_mem_ctx = talloc_new(state);
13683 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
13684 0 : return tevent_req_post(req, ev);
13685 : }
13686 :
13687 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
13688 : NULL, &ndr_table_lsarpc,
13689 0 : NDR_LSA_CREATETRUSTEDDOMAINEX3, state->out_mem_ctx, r);
13690 0 : if (tevent_req_nomem(subreq, req)) {
13691 0 : return tevent_req_post(req, ev);
13692 : }
13693 0 : tevent_req_set_callback(subreq, dcerpc_lsa_CreateTrustedDomainEx3_r_done, req);
13694 :
13695 0 : return req;
13696 : }
13697 :
13698 0 : static void dcerpc_lsa_CreateTrustedDomainEx3_r_done(struct tevent_req *subreq)
13699 : {
13700 0 : struct tevent_req *req =
13701 0 : tevent_req_callback_data(subreq,
13702 : struct tevent_req);
13703 0 : NTSTATUS status;
13704 :
13705 0 : status = dcerpc_binding_handle_call_recv(subreq);
13706 0 : TALLOC_FREE(subreq);
13707 0 : if (tevent_req_nterror(req, status)) {
13708 0 : return;
13709 : }
13710 :
13711 0 : tevent_req_done(req);
13712 : }
13713 :
13714 0 : NTSTATUS dcerpc_lsa_CreateTrustedDomainEx3_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
13715 : {
13716 0 : struct dcerpc_lsa_CreateTrustedDomainEx3_r_state *state =
13717 0 : tevent_req_data(req,
13718 : struct dcerpc_lsa_CreateTrustedDomainEx3_r_state);
13719 0 : NTSTATUS status;
13720 :
13721 0 : if (tevent_req_is_nterror(req, &status)) {
13722 0 : tevent_req_received(req);
13723 0 : return status;
13724 : }
13725 :
13726 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
13727 :
13728 0 : tevent_req_received(req);
13729 0 : return NT_STATUS_OK;
13730 : }
13731 :
13732 59 : NTSTATUS dcerpc_lsa_CreateTrustedDomainEx3_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_CreateTrustedDomainEx3 *r)
13733 : {
13734 0 : NTSTATUS status;
13735 :
13736 59 : status = dcerpc_binding_handle_call(h,
13737 : NULL, &ndr_table_lsarpc,
13738 : NDR_LSA_CREATETRUSTEDDOMAINEX3, mem_ctx, r);
13739 :
13740 59 : return status;
13741 : }
13742 :
13743 : struct dcerpc_lsa_CreateTrustedDomainEx3_state {
13744 : struct lsa_CreateTrustedDomainEx3 orig;
13745 : struct lsa_CreateTrustedDomainEx3 tmp;
13746 : TALLOC_CTX *out_mem_ctx;
13747 : };
13748 :
13749 : static void dcerpc_lsa_CreateTrustedDomainEx3_done(struct tevent_req *subreq);
13750 :
13751 0 : struct tevent_req *dcerpc_lsa_CreateTrustedDomainEx3_send(TALLOC_CTX *mem_ctx,
13752 : struct tevent_context *ev,
13753 : struct dcerpc_binding_handle *h,
13754 : struct policy_handle *_policy_handle /* [in] [ref] */,
13755 : struct lsa_TrustDomainInfoInfoEx *_info /* [in] [ref] */,
13756 : struct lsa_TrustDomainInfoAuthInfoInternalAES *_auth_info_internal /* [in] [ref] */,
13757 : uint32_t _access_mask /* [in] */,
13758 : struct policy_handle *_trustdom_handle /* [out] [ref] */)
13759 : {
13760 0 : struct tevent_req *req;
13761 0 : struct dcerpc_lsa_CreateTrustedDomainEx3_state *state;
13762 0 : struct tevent_req *subreq;
13763 :
13764 0 : req = tevent_req_create(mem_ctx, &state,
13765 : struct dcerpc_lsa_CreateTrustedDomainEx3_state);
13766 0 : if (req == NULL) {
13767 0 : return NULL;
13768 : }
13769 0 : state->out_mem_ctx = NULL;
13770 :
13771 : /* In parameters */
13772 0 : state->orig.in.policy_handle = _policy_handle;
13773 0 : state->orig.in.info = _info;
13774 0 : state->orig.in.auth_info_internal = _auth_info_internal;
13775 0 : state->orig.in.access_mask = _access_mask;
13776 :
13777 : /* Out parameters */
13778 0 : state->orig.out.trustdom_handle = _trustdom_handle;
13779 :
13780 : /* Result */
13781 0 : NDR_ZERO_STRUCT(state->orig.out.result);
13782 :
13783 0 : state->out_mem_ctx = talloc_named_const(state, 0,
13784 : "dcerpc_lsa_CreateTrustedDomainEx3_out_memory");
13785 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
13786 0 : return tevent_req_post(req, ev);
13787 : }
13788 :
13789 : /* make a temporary copy, that we pass to the dispatch function */
13790 0 : state->tmp = state->orig;
13791 :
13792 0 : subreq = dcerpc_lsa_CreateTrustedDomainEx3_r_send(state, ev, h, &state->tmp);
13793 0 : if (tevent_req_nomem(subreq, req)) {
13794 0 : return tevent_req_post(req, ev);
13795 : }
13796 0 : tevent_req_set_callback(subreq, dcerpc_lsa_CreateTrustedDomainEx3_done, req);
13797 0 : return req;
13798 : }
13799 :
13800 0 : static void dcerpc_lsa_CreateTrustedDomainEx3_done(struct tevent_req *subreq)
13801 : {
13802 0 : struct tevent_req *req = tevent_req_callback_data(
13803 : subreq, struct tevent_req);
13804 0 : struct dcerpc_lsa_CreateTrustedDomainEx3_state *state = tevent_req_data(
13805 : req, struct dcerpc_lsa_CreateTrustedDomainEx3_state);
13806 0 : NTSTATUS status;
13807 0 : TALLOC_CTX *mem_ctx;
13808 :
13809 0 : if (state->out_mem_ctx) {
13810 0 : mem_ctx = state->out_mem_ctx;
13811 : } else {
13812 0 : mem_ctx = state;
13813 : }
13814 :
13815 0 : status = dcerpc_lsa_CreateTrustedDomainEx3_r_recv(subreq, mem_ctx);
13816 0 : TALLOC_FREE(subreq);
13817 0 : if (tevent_req_nterror(req, status)) {
13818 0 : return;
13819 : }
13820 :
13821 : /* Copy out parameters */
13822 0 : *state->orig.out.trustdom_handle = *state->tmp.out.trustdom_handle;
13823 :
13824 : /* Copy result */
13825 0 : state->orig.out.result = state->tmp.out.result;
13826 :
13827 : /* Reset temporary structure */
13828 0 : NDR_ZERO_STRUCT(state->tmp);
13829 :
13830 0 : tevent_req_done(req);
13831 : }
13832 :
13833 0 : NTSTATUS dcerpc_lsa_CreateTrustedDomainEx3_recv(struct tevent_req *req,
13834 : TALLOC_CTX *mem_ctx,
13835 : NTSTATUS *result)
13836 : {
13837 0 : struct dcerpc_lsa_CreateTrustedDomainEx3_state *state = tevent_req_data(
13838 : req, struct dcerpc_lsa_CreateTrustedDomainEx3_state);
13839 0 : NTSTATUS status;
13840 :
13841 0 : if (tevent_req_is_nterror(req, &status)) {
13842 0 : tevent_req_received(req);
13843 0 : return status;
13844 : }
13845 :
13846 : /* Steal possible out parameters to the callers context */
13847 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
13848 :
13849 : /* Return result */
13850 0 : *result = state->orig.out.result;
13851 :
13852 0 : tevent_req_received(req);
13853 0 : return NT_STATUS_OK;
13854 : }
13855 :
13856 0 : NTSTATUS dcerpc_lsa_CreateTrustedDomainEx3(struct dcerpc_binding_handle *h,
13857 : TALLOC_CTX *mem_ctx,
13858 : struct policy_handle *_policy_handle /* [in] [ref] */,
13859 : struct lsa_TrustDomainInfoInfoEx *_info /* [in] [ref] */,
13860 : struct lsa_TrustDomainInfoAuthInfoInternalAES *_auth_info_internal /* [in] [ref] */,
13861 : uint32_t _access_mask /* [in] */,
13862 : struct policy_handle *_trustdom_handle /* [out] [ref] */,
13863 : NTSTATUS *result)
13864 : {
13865 0 : struct lsa_CreateTrustedDomainEx3 r;
13866 0 : NTSTATUS status;
13867 :
13868 : /* In parameters */
13869 0 : r.in.policy_handle = _policy_handle;
13870 0 : r.in.info = _info;
13871 0 : r.in.auth_info_internal = _auth_info_internal;
13872 0 : r.in.access_mask = _access_mask;
13873 :
13874 : /* Out parameters */
13875 0 : r.out.trustdom_handle = _trustdom_handle;
13876 :
13877 : /* Result */
13878 0 : NDR_ZERO_STRUCT(r.out.result);
13879 :
13880 0 : status = dcerpc_lsa_CreateTrustedDomainEx3_r(h, mem_ctx, &r);
13881 0 : if (!NT_STATUS_IS_OK(status)) {
13882 0 : return status;
13883 : }
13884 :
13885 : /* Return variables */
13886 0 : *_trustdom_handle = *r.out.trustdom_handle;
13887 :
13888 : /* Return result */
13889 0 : *result = r.out.result;
13890 :
13891 0 : return NT_STATUS_OK;
13892 : }
13893 :
13894 : struct dcerpc_lsa_OpenPolicy3_r_state {
13895 : TALLOC_CTX *out_mem_ctx;
13896 : };
13897 :
13898 : static void dcerpc_lsa_OpenPolicy3_r_done(struct tevent_req *subreq);
13899 :
13900 0 : struct tevent_req *dcerpc_lsa_OpenPolicy3_r_send(TALLOC_CTX *mem_ctx,
13901 : struct tevent_context *ev,
13902 : struct dcerpc_binding_handle *h,
13903 : struct lsa_OpenPolicy3 *r)
13904 : {
13905 0 : struct tevent_req *req;
13906 0 : struct dcerpc_lsa_OpenPolicy3_r_state *state;
13907 0 : struct tevent_req *subreq;
13908 :
13909 0 : req = tevent_req_create(mem_ctx, &state,
13910 : struct dcerpc_lsa_OpenPolicy3_r_state);
13911 0 : if (req == NULL) {
13912 0 : return NULL;
13913 : }
13914 :
13915 0 : state->out_mem_ctx = talloc_new(state);
13916 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
13917 0 : return tevent_req_post(req, ev);
13918 : }
13919 :
13920 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
13921 : NULL, &ndr_table_lsarpc,
13922 0 : NDR_LSA_OPENPOLICY3, state->out_mem_ctx, r);
13923 0 : if (tevent_req_nomem(subreq, req)) {
13924 0 : return tevent_req_post(req, ev);
13925 : }
13926 0 : tevent_req_set_callback(subreq, dcerpc_lsa_OpenPolicy3_r_done, req);
13927 :
13928 0 : return req;
13929 : }
13930 :
13931 0 : static void dcerpc_lsa_OpenPolicy3_r_done(struct tevent_req *subreq)
13932 : {
13933 0 : struct tevent_req *req =
13934 0 : tevent_req_callback_data(subreq,
13935 : struct tevent_req);
13936 0 : NTSTATUS status;
13937 :
13938 0 : status = dcerpc_binding_handle_call_recv(subreq);
13939 0 : TALLOC_FREE(subreq);
13940 0 : if (tevent_req_nterror(req, status)) {
13941 0 : return;
13942 : }
13943 :
13944 0 : tevent_req_done(req);
13945 : }
13946 :
13947 0 : NTSTATUS dcerpc_lsa_OpenPolicy3_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
13948 : {
13949 0 : struct dcerpc_lsa_OpenPolicy3_r_state *state =
13950 0 : tevent_req_data(req,
13951 : struct dcerpc_lsa_OpenPolicy3_r_state);
13952 0 : NTSTATUS status;
13953 :
13954 0 : if (tevent_req_is_nterror(req, &status)) {
13955 0 : tevent_req_received(req);
13956 0 : return status;
13957 : }
13958 :
13959 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
13960 :
13961 0 : tevent_req_received(req);
13962 0 : return NT_STATUS_OK;
13963 : }
13964 :
13965 314 : NTSTATUS dcerpc_lsa_OpenPolicy3_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_OpenPolicy3 *r)
13966 : {
13967 2 : NTSTATUS status;
13968 :
13969 314 : status = dcerpc_binding_handle_call(h,
13970 : NULL, &ndr_table_lsarpc,
13971 : NDR_LSA_OPENPOLICY3, mem_ctx, r);
13972 :
13973 314 : return status;
13974 : }
13975 :
13976 : struct dcerpc_lsa_OpenPolicy3_state {
13977 : struct lsa_OpenPolicy3 orig;
13978 : struct lsa_OpenPolicy3 tmp;
13979 : TALLOC_CTX *out_mem_ctx;
13980 : };
13981 :
13982 : static void dcerpc_lsa_OpenPolicy3_done(struct tevent_req *subreq);
13983 :
13984 0 : struct tevent_req *dcerpc_lsa_OpenPolicy3_send(TALLOC_CTX *mem_ctx,
13985 : struct tevent_context *ev,
13986 : struct dcerpc_binding_handle *h,
13987 : const char *_system_name /* [in] [charset(UTF16),unique] */,
13988 : struct lsa_ObjectAttribute *_attr /* [in] [ref] */,
13989 : uint32_t _access_mask /* [in] */,
13990 : uint32_t _in_version /* [in] */,
13991 : union lsa_revision_info *_in_revision_info /* [in] [ref,switch_is(in_version)] */,
13992 : uint32_t *_out_version /* [out] [ref] */,
13993 : union lsa_revision_info *_out_revision_info /* [out] [ref,switch_is(*out_version)] */,
13994 : struct policy_handle *_handle /* [out] [ref] */)
13995 : {
13996 0 : struct tevent_req *req;
13997 0 : struct dcerpc_lsa_OpenPolicy3_state *state;
13998 0 : struct tevent_req *subreq;
13999 :
14000 0 : req = tevent_req_create(mem_ctx, &state,
14001 : struct dcerpc_lsa_OpenPolicy3_state);
14002 0 : if (req == NULL) {
14003 0 : return NULL;
14004 : }
14005 0 : state->out_mem_ctx = NULL;
14006 :
14007 : /* In parameters */
14008 0 : state->orig.in.system_name = _system_name;
14009 0 : state->orig.in.attr = _attr;
14010 0 : state->orig.in.access_mask = _access_mask;
14011 0 : state->orig.in.in_version = _in_version;
14012 0 : state->orig.in.in_revision_info = _in_revision_info;
14013 :
14014 : /* Out parameters */
14015 0 : state->orig.out.out_version = _out_version;
14016 0 : state->orig.out.out_revision_info = _out_revision_info;
14017 0 : state->orig.out.handle = _handle;
14018 :
14019 : /* Result */
14020 0 : NDR_ZERO_STRUCT(state->orig.out.result);
14021 :
14022 0 : state->out_mem_ctx = talloc_named_const(state, 0,
14023 : "dcerpc_lsa_OpenPolicy3_out_memory");
14024 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
14025 0 : return tevent_req_post(req, ev);
14026 : }
14027 :
14028 : /* make a temporary copy, that we pass to the dispatch function */
14029 0 : state->tmp = state->orig;
14030 :
14031 0 : subreq = dcerpc_lsa_OpenPolicy3_r_send(state, ev, h, &state->tmp);
14032 0 : if (tevent_req_nomem(subreq, req)) {
14033 0 : return tevent_req_post(req, ev);
14034 : }
14035 0 : tevent_req_set_callback(subreq, dcerpc_lsa_OpenPolicy3_done, req);
14036 0 : return req;
14037 : }
14038 :
14039 0 : static void dcerpc_lsa_OpenPolicy3_done(struct tevent_req *subreq)
14040 : {
14041 0 : struct tevent_req *req = tevent_req_callback_data(
14042 : subreq, struct tevent_req);
14043 0 : struct dcerpc_lsa_OpenPolicy3_state *state = tevent_req_data(
14044 : req, struct dcerpc_lsa_OpenPolicy3_state);
14045 0 : NTSTATUS status;
14046 0 : TALLOC_CTX *mem_ctx;
14047 :
14048 0 : if (state->out_mem_ctx) {
14049 0 : mem_ctx = state->out_mem_ctx;
14050 : } else {
14051 0 : mem_ctx = state;
14052 : }
14053 :
14054 0 : status = dcerpc_lsa_OpenPolicy3_r_recv(subreq, mem_ctx);
14055 0 : TALLOC_FREE(subreq);
14056 0 : if (tevent_req_nterror(req, status)) {
14057 0 : return;
14058 : }
14059 :
14060 : /* Copy out parameters */
14061 0 : *state->orig.out.out_version = *state->tmp.out.out_version;
14062 0 : *state->orig.out.out_revision_info = *state->tmp.out.out_revision_info;
14063 0 : *state->orig.out.handle = *state->tmp.out.handle;
14064 :
14065 : /* Copy result */
14066 0 : state->orig.out.result = state->tmp.out.result;
14067 :
14068 : /* Reset temporary structure */
14069 0 : NDR_ZERO_STRUCT(state->tmp);
14070 :
14071 0 : tevent_req_done(req);
14072 : }
14073 :
14074 0 : NTSTATUS dcerpc_lsa_OpenPolicy3_recv(struct tevent_req *req,
14075 : TALLOC_CTX *mem_ctx,
14076 : NTSTATUS *result)
14077 : {
14078 0 : struct dcerpc_lsa_OpenPolicy3_state *state = tevent_req_data(
14079 : req, struct dcerpc_lsa_OpenPolicy3_state);
14080 0 : NTSTATUS status;
14081 :
14082 0 : if (tevent_req_is_nterror(req, &status)) {
14083 0 : tevent_req_received(req);
14084 0 : return status;
14085 : }
14086 :
14087 : /* Steal possible out parameters to the callers context */
14088 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
14089 :
14090 : /* Return result */
14091 0 : *result = state->orig.out.result;
14092 :
14093 0 : tevent_req_received(req);
14094 0 : return NT_STATUS_OK;
14095 : }
14096 :
14097 48 : NTSTATUS dcerpc_lsa_OpenPolicy3(struct dcerpc_binding_handle *h,
14098 : TALLOC_CTX *mem_ctx,
14099 : const char *_system_name /* [in] [charset(UTF16),unique] */,
14100 : struct lsa_ObjectAttribute *_attr /* [in] [ref] */,
14101 : uint32_t _access_mask /* [in] */,
14102 : uint32_t _in_version /* [in] */,
14103 : union lsa_revision_info *_in_revision_info /* [in] [ref,switch_is(in_version)] */,
14104 : uint32_t *_out_version /* [out] [ref] */,
14105 : union lsa_revision_info *_out_revision_info /* [out] [ref,switch_is(*out_version)] */,
14106 : struct policy_handle *_handle /* [out] [ref] */,
14107 : NTSTATUS *result)
14108 : {
14109 0 : struct lsa_OpenPolicy3 r;
14110 0 : NTSTATUS status;
14111 :
14112 : /* In parameters */
14113 48 : r.in.system_name = _system_name;
14114 48 : r.in.attr = _attr;
14115 48 : r.in.access_mask = _access_mask;
14116 48 : r.in.in_version = _in_version;
14117 48 : r.in.in_revision_info = _in_revision_info;
14118 :
14119 : /* Out parameters */
14120 48 : r.out.out_version = _out_version;
14121 48 : r.out.out_revision_info = _out_revision_info;
14122 48 : r.out.handle = _handle;
14123 :
14124 : /* Result */
14125 48 : NDR_ZERO_STRUCT(r.out.result);
14126 :
14127 48 : status = dcerpc_lsa_OpenPolicy3_r(h, mem_ctx, &r);
14128 48 : if (!NT_STATUS_IS_OK(status)) {
14129 0 : return status;
14130 : }
14131 :
14132 : /* Return variables */
14133 48 : *_out_version = *r.out.out_version;
14134 48 : *_out_revision_info = *r.out.out_revision_info;
14135 48 : *_handle = *r.out.handle;
14136 :
14137 : /* Return result */
14138 48 : *result = r.out.result;
14139 :
14140 48 : return NT_STATUS_OK;
14141 : }
14142 :
14143 : struct dcerpc_lsa_lsaRQueryForestTrustInformation2_r_state {
14144 : TALLOC_CTX *out_mem_ctx;
14145 : };
14146 :
14147 : static void dcerpc_lsa_lsaRQueryForestTrustInformation2_r_done(struct tevent_req *subreq);
14148 :
14149 0 : struct tevent_req *dcerpc_lsa_lsaRQueryForestTrustInformation2_r_send(TALLOC_CTX *mem_ctx,
14150 : struct tevent_context *ev,
14151 : struct dcerpc_binding_handle *h,
14152 : struct lsa_lsaRQueryForestTrustInformation2 *r)
14153 : {
14154 0 : struct tevent_req *req;
14155 0 : struct dcerpc_lsa_lsaRQueryForestTrustInformation2_r_state *state;
14156 0 : struct tevent_req *subreq;
14157 :
14158 0 : req = tevent_req_create(mem_ctx, &state,
14159 : struct dcerpc_lsa_lsaRQueryForestTrustInformation2_r_state);
14160 0 : if (req == NULL) {
14161 0 : return NULL;
14162 : }
14163 :
14164 0 : state->out_mem_ctx = talloc_new(state);
14165 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
14166 0 : return tevent_req_post(req, ev);
14167 : }
14168 :
14169 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
14170 : NULL, &ndr_table_lsarpc,
14171 0 : NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION2, state->out_mem_ctx, r);
14172 0 : if (tevent_req_nomem(subreq, req)) {
14173 0 : return tevent_req_post(req, ev);
14174 : }
14175 0 : tevent_req_set_callback(subreq, dcerpc_lsa_lsaRQueryForestTrustInformation2_r_done, req);
14176 :
14177 0 : return req;
14178 : }
14179 :
14180 0 : static void dcerpc_lsa_lsaRQueryForestTrustInformation2_r_done(struct tevent_req *subreq)
14181 : {
14182 0 : struct tevent_req *req =
14183 0 : tevent_req_callback_data(subreq,
14184 : struct tevent_req);
14185 0 : NTSTATUS status;
14186 :
14187 0 : status = dcerpc_binding_handle_call_recv(subreq);
14188 0 : TALLOC_FREE(subreq);
14189 0 : if (tevent_req_nterror(req, status)) {
14190 0 : return;
14191 : }
14192 :
14193 0 : tevent_req_done(req);
14194 : }
14195 :
14196 0 : NTSTATUS dcerpc_lsa_lsaRQueryForestTrustInformation2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
14197 : {
14198 0 : struct dcerpc_lsa_lsaRQueryForestTrustInformation2_r_state *state =
14199 0 : tevent_req_data(req,
14200 : struct dcerpc_lsa_lsaRQueryForestTrustInformation2_r_state);
14201 0 : NTSTATUS status;
14202 :
14203 0 : if (tevent_req_is_nterror(req, &status)) {
14204 0 : tevent_req_received(req);
14205 0 : return status;
14206 : }
14207 :
14208 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
14209 :
14210 0 : tevent_req_received(req);
14211 0 : return NT_STATUS_OK;
14212 : }
14213 :
14214 0 : NTSTATUS dcerpc_lsa_lsaRQueryForestTrustInformation2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_lsaRQueryForestTrustInformation2 *r)
14215 : {
14216 0 : NTSTATUS status;
14217 :
14218 0 : status = dcerpc_binding_handle_call(h,
14219 : NULL, &ndr_table_lsarpc,
14220 : NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION2, mem_ctx, r);
14221 :
14222 0 : return status;
14223 : }
14224 :
14225 : struct dcerpc_lsa_lsaRQueryForestTrustInformation2_state {
14226 : struct lsa_lsaRQueryForestTrustInformation2 orig;
14227 : struct lsa_lsaRQueryForestTrustInformation2 tmp;
14228 : TALLOC_CTX *out_mem_ctx;
14229 : };
14230 :
14231 : static void dcerpc_lsa_lsaRQueryForestTrustInformation2_done(struct tevent_req *subreq);
14232 :
14233 0 : struct tevent_req *dcerpc_lsa_lsaRQueryForestTrustInformation2_send(TALLOC_CTX *mem_ctx,
14234 : struct tevent_context *ev,
14235 : struct dcerpc_binding_handle *h,
14236 : struct policy_handle *_handle /* [in] [ref] */,
14237 : struct lsa_String *_trusted_domain_name /* [in] [ref] */,
14238 : enum lsa_ForestTrustRecordType _highest_record_type /* [in] */,
14239 : struct lsa_ForestTrustInformation2 **_forest_trust_info /* [out] [ref] */)
14240 : {
14241 0 : struct tevent_req *req;
14242 0 : struct dcerpc_lsa_lsaRQueryForestTrustInformation2_state *state;
14243 0 : struct tevent_req *subreq;
14244 :
14245 0 : req = tevent_req_create(mem_ctx, &state,
14246 : struct dcerpc_lsa_lsaRQueryForestTrustInformation2_state);
14247 0 : if (req == NULL) {
14248 0 : return NULL;
14249 : }
14250 0 : state->out_mem_ctx = NULL;
14251 :
14252 : /* In parameters */
14253 0 : state->orig.in.handle = _handle;
14254 0 : state->orig.in.trusted_domain_name = _trusted_domain_name;
14255 0 : state->orig.in.highest_record_type = _highest_record_type;
14256 :
14257 : /* Out parameters */
14258 0 : state->orig.out.forest_trust_info = _forest_trust_info;
14259 :
14260 : /* Result */
14261 0 : NDR_ZERO_STRUCT(state->orig.out.result);
14262 :
14263 0 : state->out_mem_ctx = talloc_named_const(state, 0,
14264 : "dcerpc_lsa_lsaRQueryForestTrustInformation2_out_memory");
14265 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
14266 0 : return tevent_req_post(req, ev);
14267 : }
14268 :
14269 : /* make a temporary copy, that we pass to the dispatch function */
14270 0 : state->tmp = state->orig;
14271 :
14272 0 : subreq = dcerpc_lsa_lsaRQueryForestTrustInformation2_r_send(state, ev, h, &state->tmp);
14273 0 : if (tevent_req_nomem(subreq, req)) {
14274 0 : return tevent_req_post(req, ev);
14275 : }
14276 0 : tevent_req_set_callback(subreq, dcerpc_lsa_lsaRQueryForestTrustInformation2_done, req);
14277 0 : return req;
14278 : }
14279 :
14280 0 : static void dcerpc_lsa_lsaRQueryForestTrustInformation2_done(struct tevent_req *subreq)
14281 : {
14282 0 : struct tevent_req *req = tevent_req_callback_data(
14283 : subreq, struct tevent_req);
14284 0 : struct dcerpc_lsa_lsaRQueryForestTrustInformation2_state *state = tevent_req_data(
14285 : req, struct dcerpc_lsa_lsaRQueryForestTrustInformation2_state);
14286 0 : NTSTATUS status;
14287 0 : TALLOC_CTX *mem_ctx;
14288 :
14289 0 : if (state->out_mem_ctx) {
14290 0 : mem_ctx = state->out_mem_ctx;
14291 : } else {
14292 0 : mem_ctx = state;
14293 : }
14294 :
14295 0 : status = dcerpc_lsa_lsaRQueryForestTrustInformation2_r_recv(subreq, mem_ctx);
14296 0 : TALLOC_FREE(subreq);
14297 0 : if (tevent_req_nterror(req, status)) {
14298 0 : return;
14299 : }
14300 :
14301 : /* Copy out parameters */
14302 0 : *state->orig.out.forest_trust_info = *state->tmp.out.forest_trust_info;
14303 :
14304 : /* Copy result */
14305 0 : state->orig.out.result = state->tmp.out.result;
14306 :
14307 : /* Reset temporary structure */
14308 0 : NDR_ZERO_STRUCT(state->tmp);
14309 :
14310 0 : tevent_req_done(req);
14311 : }
14312 :
14313 0 : NTSTATUS dcerpc_lsa_lsaRQueryForestTrustInformation2_recv(struct tevent_req *req,
14314 : TALLOC_CTX *mem_ctx,
14315 : NTSTATUS *result)
14316 : {
14317 0 : struct dcerpc_lsa_lsaRQueryForestTrustInformation2_state *state = tevent_req_data(
14318 : req, struct dcerpc_lsa_lsaRQueryForestTrustInformation2_state);
14319 0 : NTSTATUS status;
14320 :
14321 0 : if (tevent_req_is_nterror(req, &status)) {
14322 0 : tevent_req_received(req);
14323 0 : return status;
14324 : }
14325 :
14326 : /* Steal possible out parameters to the callers context */
14327 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
14328 :
14329 : /* Return result */
14330 0 : *result = state->orig.out.result;
14331 :
14332 0 : tevent_req_received(req);
14333 0 : return NT_STATUS_OK;
14334 : }
14335 :
14336 0 : NTSTATUS dcerpc_lsa_lsaRQueryForestTrustInformation2(struct dcerpc_binding_handle *h,
14337 : TALLOC_CTX *mem_ctx,
14338 : struct policy_handle *_handle /* [in] [ref] */,
14339 : struct lsa_String *_trusted_domain_name /* [in] [ref] */,
14340 : enum lsa_ForestTrustRecordType _highest_record_type /* [in] */,
14341 : struct lsa_ForestTrustInformation2 **_forest_trust_info /* [out] [ref] */,
14342 : NTSTATUS *result)
14343 : {
14344 0 : struct lsa_lsaRQueryForestTrustInformation2 r;
14345 0 : NTSTATUS status;
14346 :
14347 : /* In parameters */
14348 0 : r.in.handle = _handle;
14349 0 : r.in.trusted_domain_name = _trusted_domain_name;
14350 0 : r.in.highest_record_type = _highest_record_type;
14351 :
14352 : /* Out parameters */
14353 0 : r.out.forest_trust_info = _forest_trust_info;
14354 :
14355 : /* Result */
14356 0 : NDR_ZERO_STRUCT(r.out.result);
14357 :
14358 0 : status = dcerpc_lsa_lsaRQueryForestTrustInformation2_r(h, mem_ctx, &r);
14359 0 : if (!NT_STATUS_IS_OK(status)) {
14360 0 : return status;
14361 : }
14362 :
14363 : /* Return variables */
14364 0 : *_forest_trust_info = *r.out.forest_trust_info;
14365 :
14366 : /* Return result */
14367 0 : *result = r.out.result;
14368 :
14369 0 : return NT_STATUS_OK;
14370 : }
14371 :
14372 : struct dcerpc_lsa_lsaRSetForestTrustInformation2_r_state {
14373 : TALLOC_CTX *out_mem_ctx;
14374 : };
14375 :
14376 : static void dcerpc_lsa_lsaRSetForestTrustInformation2_r_done(struct tevent_req *subreq);
14377 :
14378 0 : struct tevent_req *dcerpc_lsa_lsaRSetForestTrustInformation2_r_send(TALLOC_CTX *mem_ctx,
14379 : struct tevent_context *ev,
14380 : struct dcerpc_binding_handle *h,
14381 : struct lsa_lsaRSetForestTrustInformation2 *r)
14382 : {
14383 0 : struct tevent_req *req;
14384 0 : struct dcerpc_lsa_lsaRSetForestTrustInformation2_r_state *state;
14385 0 : struct tevent_req *subreq;
14386 :
14387 0 : req = tevent_req_create(mem_ctx, &state,
14388 : struct dcerpc_lsa_lsaRSetForestTrustInformation2_r_state);
14389 0 : if (req == NULL) {
14390 0 : return NULL;
14391 : }
14392 :
14393 0 : state->out_mem_ctx = talloc_new(state);
14394 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
14395 0 : return tevent_req_post(req, ev);
14396 : }
14397 :
14398 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
14399 : NULL, &ndr_table_lsarpc,
14400 0 : NDR_LSA_LSARSETFORESTTRUSTINFORMATION2, state->out_mem_ctx, r);
14401 0 : if (tevent_req_nomem(subreq, req)) {
14402 0 : return tevent_req_post(req, ev);
14403 : }
14404 0 : tevent_req_set_callback(subreq, dcerpc_lsa_lsaRSetForestTrustInformation2_r_done, req);
14405 :
14406 0 : return req;
14407 : }
14408 :
14409 0 : static void dcerpc_lsa_lsaRSetForestTrustInformation2_r_done(struct tevent_req *subreq)
14410 : {
14411 0 : struct tevent_req *req =
14412 0 : tevent_req_callback_data(subreq,
14413 : struct tevent_req);
14414 0 : NTSTATUS status;
14415 :
14416 0 : status = dcerpc_binding_handle_call_recv(subreq);
14417 0 : TALLOC_FREE(subreq);
14418 0 : if (tevent_req_nterror(req, status)) {
14419 0 : return;
14420 : }
14421 :
14422 0 : tevent_req_done(req);
14423 : }
14424 :
14425 0 : NTSTATUS dcerpc_lsa_lsaRSetForestTrustInformation2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
14426 : {
14427 0 : struct dcerpc_lsa_lsaRSetForestTrustInformation2_r_state *state =
14428 0 : tevent_req_data(req,
14429 : struct dcerpc_lsa_lsaRSetForestTrustInformation2_r_state);
14430 0 : NTSTATUS status;
14431 :
14432 0 : if (tevent_req_is_nterror(req, &status)) {
14433 0 : tevent_req_received(req);
14434 0 : return status;
14435 : }
14436 :
14437 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
14438 :
14439 0 : tevent_req_received(req);
14440 0 : return NT_STATUS_OK;
14441 : }
14442 :
14443 0 : NTSTATUS dcerpc_lsa_lsaRSetForestTrustInformation2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct lsa_lsaRSetForestTrustInformation2 *r)
14444 : {
14445 0 : NTSTATUS status;
14446 :
14447 0 : status = dcerpc_binding_handle_call(h,
14448 : NULL, &ndr_table_lsarpc,
14449 : NDR_LSA_LSARSETFORESTTRUSTINFORMATION2, mem_ctx, r);
14450 :
14451 0 : return status;
14452 : }
14453 :
14454 : struct dcerpc_lsa_lsaRSetForestTrustInformation2_state {
14455 : struct lsa_lsaRSetForestTrustInformation2 orig;
14456 : struct lsa_lsaRSetForestTrustInformation2 tmp;
14457 : TALLOC_CTX *out_mem_ctx;
14458 : };
14459 :
14460 : static void dcerpc_lsa_lsaRSetForestTrustInformation2_done(struct tevent_req *subreq);
14461 :
14462 0 : struct tevent_req *dcerpc_lsa_lsaRSetForestTrustInformation2_send(TALLOC_CTX *mem_ctx,
14463 : struct tevent_context *ev,
14464 : struct dcerpc_binding_handle *h,
14465 : struct policy_handle *_handle /* [in] [ref] */,
14466 : struct lsa_StringLarge *_trusted_domain_name /* [in] [ref] */,
14467 : enum lsa_ForestTrustRecordType _highest_record_type /* [in] */,
14468 : struct lsa_ForestTrustInformation2 *_forest_trust_info /* [in] [ref] */,
14469 : uint8_t _check_only /* [in] */,
14470 : struct lsa_ForestTrustCollisionInfo **_collision_info /* [out] [ref] */)
14471 : {
14472 0 : struct tevent_req *req;
14473 0 : struct dcerpc_lsa_lsaRSetForestTrustInformation2_state *state;
14474 0 : struct tevent_req *subreq;
14475 :
14476 0 : req = tevent_req_create(mem_ctx, &state,
14477 : struct dcerpc_lsa_lsaRSetForestTrustInformation2_state);
14478 0 : if (req == NULL) {
14479 0 : return NULL;
14480 : }
14481 0 : state->out_mem_ctx = NULL;
14482 :
14483 : /* In parameters */
14484 0 : state->orig.in.handle = _handle;
14485 0 : state->orig.in.trusted_domain_name = _trusted_domain_name;
14486 0 : state->orig.in.highest_record_type = _highest_record_type;
14487 0 : state->orig.in.forest_trust_info = _forest_trust_info;
14488 0 : state->orig.in.check_only = _check_only;
14489 :
14490 : /* Out parameters */
14491 0 : state->orig.out.collision_info = _collision_info;
14492 :
14493 : /* Result */
14494 0 : NDR_ZERO_STRUCT(state->orig.out.result);
14495 :
14496 0 : state->out_mem_ctx = talloc_named_const(state, 0,
14497 : "dcerpc_lsa_lsaRSetForestTrustInformation2_out_memory");
14498 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
14499 0 : return tevent_req_post(req, ev);
14500 : }
14501 :
14502 : /* make a temporary copy, that we pass to the dispatch function */
14503 0 : state->tmp = state->orig;
14504 :
14505 0 : subreq = dcerpc_lsa_lsaRSetForestTrustInformation2_r_send(state, ev, h, &state->tmp);
14506 0 : if (tevent_req_nomem(subreq, req)) {
14507 0 : return tevent_req_post(req, ev);
14508 : }
14509 0 : tevent_req_set_callback(subreq, dcerpc_lsa_lsaRSetForestTrustInformation2_done, req);
14510 0 : return req;
14511 : }
14512 :
14513 0 : static void dcerpc_lsa_lsaRSetForestTrustInformation2_done(struct tevent_req *subreq)
14514 : {
14515 0 : struct tevent_req *req = tevent_req_callback_data(
14516 : subreq, struct tevent_req);
14517 0 : struct dcerpc_lsa_lsaRSetForestTrustInformation2_state *state = tevent_req_data(
14518 : req, struct dcerpc_lsa_lsaRSetForestTrustInformation2_state);
14519 0 : NTSTATUS status;
14520 0 : TALLOC_CTX *mem_ctx;
14521 :
14522 0 : if (state->out_mem_ctx) {
14523 0 : mem_ctx = state->out_mem_ctx;
14524 : } else {
14525 0 : mem_ctx = state;
14526 : }
14527 :
14528 0 : status = dcerpc_lsa_lsaRSetForestTrustInformation2_r_recv(subreq, mem_ctx);
14529 0 : TALLOC_FREE(subreq);
14530 0 : if (tevent_req_nterror(req, status)) {
14531 0 : return;
14532 : }
14533 :
14534 : /* Copy out parameters */
14535 0 : *state->orig.out.collision_info = *state->tmp.out.collision_info;
14536 :
14537 : /* Copy result */
14538 0 : state->orig.out.result = state->tmp.out.result;
14539 :
14540 : /* Reset temporary structure */
14541 0 : NDR_ZERO_STRUCT(state->tmp);
14542 :
14543 0 : tevent_req_done(req);
14544 : }
14545 :
14546 0 : NTSTATUS dcerpc_lsa_lsaRSetForestTrustInformation2_recv(struct tevent_req *req,
14547 : TALLOC_CTX *mem_ctx,
14548 : NTSTATUS *result)
14549 : {
14550 0 : struct dcerpc_lsa_lsaRSetForestTrustInformation2_state *state = tevent_req_data(
14551 : req, struct dcerpc_lsa_lsaRSetForestTrustInformation2_state);
14552 0 : NTSTATUS status;
14553 :
14554 0 : if (tevent_req_is_nterror(req, &status)) {
14555 0 : tevent_req_received(req);
14556 0 : return status;
14557 : }
14558 :
14559 : /* Steal possible out parameters to the callers context */
14560 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
14561 :
14562 : /* Return result */
14563 0 : *result = state->orig.out.result;
14564 :
14565 0 : tevent_req_received(req);
14566 0 : return NT_STATUS_OK;
14567 : }
14568 :
14569 0 : NTSTATUS dcerpc_lsa_lsaRSetForestTrustInformation2(struct dcerpc_binding_handle *h,
14570 : TALLOC_CTX *mem_ctx,
14571 : struct policy_handle *_handle /* [in] [ref] */,
14572 : struct lsa_StringLarge *_trusted_domain_name /* [in] [ref] */,
14573 : enum lsa_ForestTrustRecordType _highest_record_type /* [in] */,
14574 : struct lsa_ForestTrustInformation2 *_forest_trust_info /* [in] [ref] */,
14575 : uint8_t _check_only /* [in] */,
14576 : struct lsa_ForestTrustCollisionInfo **_collision_info /* [out] [ref] */,
14577 : NTSTATUS *result)
14578 : {
14579 0 : struct lsa_lsaRSetForestTrustInformation2 r;
14580 0 : NTSTATUS status;
14581 :
14582 : /* In parameters */
14583 0 : r.in.handle = _handle;
14584 0 : r.in.trusted_domain_name = _trusted_domain_name;
14585 0 : r.in.highest_record_type = _highest_record_type;
14586 0 : r.in.forest_trust_info = _forest_trust_info;
14587 0 : r.in.check_only = _check_only;
14588 :
14589 : /* Out parameters */
14590 0 : r.out.collision_info = _collision_info;
14591 :
14592 : /* Result */
14593 0 : NDR_ZERO_STRUCT(r.out.result);
14594 :
14595 0 : status = dcerpc_lsa_lsaRSetForestTrustInformation2_r(h, mem_ctx, &r);
14596 0 : if (!NT_STATUS_IS_OK(status)) {
14597 0 : return status;
14598 : }
14599 :
14600 : /* Return variables */
14601 0 : *_collision_info = *r.out.collision_info;
14602 :
14603 : /* Return result */
14604 0 : *result = r.out.result;
14605 :
14606 0 : return NT_STATUS_OK;
14607 : }
14608 :
|