2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/cli_lsa.h"
9 struct rpccli_lsa_Close_state
{
10 struct lsa_Close orig
;
12 TALLOC_CTX
*out_mem_ctx
;
13 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
16 static void rpccli_lsa_Close_done(struct tevent_req
*subreq
);
18 struct tevent_req
*rpccli_lsa_Close_send(TALLOC_CTX
*mem_ctx
,
19 struct tevent_context
*ev
,
20 struct rpc_pipe_client
*cli
,
21 struct policy_handle
*_handle
/* [in,out] [ref] */)
23 struct tevent_req
*req
;
24 struct rpccli_lsa_Close_state
*state
;
25 struct tevent_req
*subreq
;
27 req
= tevent_req_create(mem_ctx
, &state
,
28 struct rpccli_lsa_Close_state
);
32 state
->out_mem_ctx
= NULL
;
33 state
->dispatch_recv
= cli
->dispatch_recv
;
36 state
->orig
.in
.handle
= _handle
;
39 state
->orig
.out
.handle
= _handle
;
42 ZERO_STRUCT(state
->orig
.out
.result
);
44 state
->out_mem_ctx
= talloc_named_const(state
, 0,
45 "rpccli_lsa_Close_out_memory");
46 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
47 return tevent_req_post(req
, ev
);
50 /* make a temporary copy, that we pass to the dispatch function */
51 state
->tmp
= state
->orig
;
53 subreq
= cli
->dispatch_send(state
, ev
, cli
,
54 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
57 if (tevent_req_nomem(subreq
, req
)) {
58 return tevent_req_post(req
, ev
);
60 tevent_req_set_callback(subreq
, rpccli_lsa_Close_done
, req
);
64 static void rpccli_lsa_Close_done(struct tevent_req
*subreq
)
66 struct tevent_req
*req
= tevent_req_callback_data(
67 subreq
, struct tevent_req
);
68 struct rpccli_lsa_Close_state
*state
= tevent_req_data(
69 req
, struct rpccli_lsa_Close_state
);
73 if (state
->out_mem_ctx
) {
74 mem_ctx
= state
->out_mem_ctx
;
79 status
= state
->dispatch_recv(subreq
, mem_ctx
);
81 if (!NT_STATUS_IS_OK(status
)) {
82 tevent_req_nterror(req
, status
);
86 /* Copy out parameters */
87 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
90 state
->orig
.out
.result
= state
->tmp
.out
.result
;
92 /* Reset temporary structure */
93 ZERO_STRUCT(state
->tmp
);
98 NTSTATUS
rpccli_lsa_Close_recv(struct tevent_req
*req
,
102 struct rpccli_lsa_Close_state
*state
= tevent_req_data(
103 req
, struct rpccli_lsa_Close_state
);
106 if (tevent_req_is_nterror(req
, &status
)) {
107 tevent_req_received(req
);
111 /* Steal possbile out parameters to the callers context */
112 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
115 *result
= state
->orig
.out
.result
;
117 tevent_req_received(req
);
121 NTSTATUS
rpccli_lsa_Close(struct rpc_pipe_client
*cli
,
123 struct policy_handle
*handle
/* [in,out] [ref] */)
129 r
.in
.handle
= handle
;
131 status
= cli
->dispatch(cli
,
133 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
137 if (!NT_STATUS_IS_OK(status
)) {
141 if (NT_STATUS_IS_ERR(status
)) {
145 /* Return variables */
146 *handle
= *r
.out
.handle
;
152 struct rpccli_lsa_Delete_state
{
153 struct lsa_Delete orig
;
154 struct lsa_Delete tmp
;
155 TALLOC_CTX
*out_mem_ctx
;
156 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
159 static void rpccli_lsa_Delete_done(struct tevent_req
*subreq
);
161 struct tevent_req
*rpccli_lsa_Delete_send(TALLOC_CTX
*mem_ctx
,
162 struct tevent_context
*ev
,
163 struct rpc_pipe_client
*cli
,
164 struct policy_handle
*_handle
/* [in] [ref] */)
166 struct tevent_req
*req
;
167 struct rpccli_lsa_Delete_state
*state
;
168 struct tevent_req
*subreq
;
170 req
= tevent_req_create(mem_ctx
, &state
,
171 struct rpccli_lsa_Delete_state
);
175 state
->out_mem_ctx
= NULL
;
176 state
->dispatch_recv
= cli
->dispatch_recv
;
179 state
->orig
.in
.handle
= _handle
;
184 ZERO_STRUCT(state
->orig
.out
.result
);
186 /* make a temporary copy, that we pass to the dispatch function */
187 state
->tmp
= state
->orig
;
189 subreq
= cli
->dispatch_send(state
, ev
, cli
,
190 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
193 if (tevent_req_nomem(subreq
, req
)) {
194 return tevent_req_post(req
, ev
);
196 tevent_req_set_callback(subreq
, rpccli_lsa_Delete_done
, req
);
200 static void rpccli_lsa_Delete_done(struct tevent_req
*subreq
)
202 struct tevent_req
*req
= tevent_req_callback_data(
203 subreq
, struct tevent_req
);
204 struct rpccli_lsa_Delete_state
*state
= tevent_req_data(
205 req
, struct rpccli_lsa_Delete_state
);
209 if (state
->out_mem_ctx
) {
210 mem_ctx
= state
->out_mem_ctx
;
215 status
= state
->dispatch_recv(subreq
, mem_ctx
);
217 if (!NT_STATUS_IS_OK(status
)) {
218 tevent_req_nterror(req
, status
);
222 /* Copy out parameters */
225 state
->orig
.out
.result
= state
->tmp
.out
.result
;
227 /* Reset temporary structure */
228 ZERO_STRUCT(state
->tmp
);
230 tevent_req_done(req
);
233 NTSTATUS
rpccli_lsa_Delete_recv(struct tevent_req
*req
,
237 struct rpccli_lsa_Delete_state
*state
= tevent_req_data(
238 req
, struct rpccli_lsa_Delete_state
);
241 if (tevent_req_is_nterror(req
, &status
)) {
242 tevent_req_received(req
);
246 /* Steal possbile out parameters to the callers context */
247 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
250 *result
= state
->orig
.out
.result
;
252 tevent_req_received(req
);
256 NTSTATUS
rpccli_lsa_Delete(struct rpc_pipe_client
*cli
,
258 struct policy_handle
*handle
/* [in] [ref] */)
264 r
.in
.handle
= handle
;
266 status
= cli
->dispatch(cli
,
268 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
272 if (!NT_STATUS_IS_OK(status
)) {
276 if (NT_STATUS_IS_ERR(status
)) {
280 /* Return variables */
286 struct rpccli_lsa_EnumPrivs_state
{
287 struct lsa_EnumPrivs orig
;
288 struct lsa_EnumPrivs tmp
;
289 TALLOC_CTX
*out_mem_ctx
;
290 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
293 static void rpccli_lsa_EnumPrivs_done(struct tevent_req
*subreq
);
295 struct tevent_req
*rpccli_lsa_EnumPrivs_send(TALLOC_CTX
*mem_ctx
,
296 struct tevent_context
*ev
,
297 struct rpc_pipe_client
*cli
,
298 struct policy_handle
*_handle
/* [in] [ref] */,
299 uint32_t *_resume_handle
/* [in,out] [ref] */,
300 struct lsa_PrivArray
*_privs
/* [out] [ref] */,
301 uint32_t _max_count
/* [in] */)
303 struct tevent_req
*req
;
304 struct rpccli_lsa_EnumPrivs_state
*state
;
305 struct tevent_req
*subreq
;
307 req
= tevent_req_create(mem_ctx
, &state
,
308 struct rpccli_lsa_EnumPrivs_state
);
312 state
->out_mem_ctx
= NULL
;
313 state
->dispatch_recv
= cli
->dispatch_recv
;
316 state
->orig
.in
.handle
= _handle
;
317 state
->orig
.in
.resume_handle
= _resume_handle
;
318 state
->orig
.in
.max_count
= _max_count
;
321 state
->orig
.out
.resume_handle
= _resume_handle
;
322 state
->orig
.out
.privs
= _privs
;
325 ZERO_STRUCT(state
->orig
.out
.result
);
327 state
->out_mem_ctx
= talloc_named_const(state
, 0,
328 "rpccli_lsa_EnumPrivs_out_memory");
329 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
330 return tevent_req_post(req
, ev
);
333 /* make a temporary copy, that we pass to the dispatch function */
334 state
->tmp
= state
->orig
;
336 subreq
= cli
->dispatch_send(state
, ev
, cli
,
337 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
340 if (tevent_req_nomem(subreq
, req
)) {
341 return tevent_req_post(req
, ev
);
343 tevent_req_set_callback(subreq
, rpccli_lsa_EnumPrivs_done
, req
);
347 static void rpccli_lsa_EnumPrivs_done(struct tevent_req
*subreq
)
349 struct tevent_req
*req
= tevent_req_callback_data(
350 subreq
, struct tevent_req
);
351 struct rpccli_lsa_EnumPrivs_state
*state
= tevent_req_data(
352 req
, struct rpccli_lsa_EnumPrivs_state
);
356 if (state
->out_mem_ctx
) {
357 mem_ctx
= state
->out_mem_ctx
;
362 status
= state
->dispatch_recv(subreq
, mem_ctx
);
364 if (!NT_STATUS_IS_OK(status
)) {
365 tevent_req_nterror(req
, status
);
369 /* Copy out parameters */
370 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
371 *state
->orig
.out
.privs
= *state
->tmp
.out
.privs
;
374 state
->orig
.out
.result
= state
->tmp
.out
.result
;
376 /* Reset temporary structure */
377 ZERO_STRUCT(state
->tmp
);
379 tevent_req_done(req
);
382 NTSTATUS
rpccli_lsa_EnumPrivs_recv(struct tevent_req
*req
,
386 struct rpccli_lsa_EnumPrivs_state
*state
= tevent_req_data(
387 req
, struct rpccli_lsa_EnumPrivs_state
);
390 if (tevent_req_is_nterror(req
, &status
)) {
391 tevent_req_received(req
);
395 /* Steal possbile out parameters to the callers context */
396 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
399 *result
= state
->orig
.out
.result
;
401 tevent_req_received(req
);
405 NTSTATUS
rpccli_lsa_EnumPrivs(struct rpc_pipe_client
*cli
,
407 struct policy_handle
*handle
/* [in] [ref] */,
408 uint32_t *resume_handle
/* [in,out] [ref] */,
409 struct lsa_PrivArray
*privs
/* [out] [ref] */,
410 uint32_t max_count
/* [in] */)
412 struct lsa_EnumPrivs r
;
416 r
.in
.handle
= handle
;
417 r
.in
.resume_handle
= resume_handle
;
418 r
.in
.max_count
= max_count
;
420 status
= cli
->dispatch(cli
,
422 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
426 if (!NT_STATUS_IS_OK(status
)) {
430 if (NT_STATUS_IS_ERR(status
)) {
434 /* Return variables */
435 *resume_handle
= *r
.out
.resume_handle
;
436 *privs
= *r
.out
.privs
;
442 struct rpccli_lsa_QuerySecurity_state
{
443 struct lsa_QuerySecurity orig
;
444 struct lsa_QuerySecurity tmp
;
445 TALLOC_CTX
*out_mem_ctx
;
446 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
449 static void rpccli_lsa_QuerySecurity_done(struct tevent_req
*subreq
);
451 struct tevent_req
*rpccli_lsa_QuerySecurity_send(TALLOC_CTX
*mem_ctx
,
452 struct tevent_context
*ev
,
453 struct rpc_pipe_client
*cli
,
454 struct policy_handle
*_handle
/* [in] [ref] */,
455 uint32_t _sec_info
/* [in] */,
456 struct sec_desc_buf
**_sdbuf
/* [out] [ref] */)
458 struct tevent_req
*req
;
459 struct rpccli_lsa_QuerySecurity_state
*state
;
460 struct tevent_req
*subreq
;
462 req
= tevent_req_create(mem_ctx
, &state
,
463 struct rpccli_lsa_QuerySecurity_state
);
467 state
->out_mem_ctx
= NULL
;
468 state
->dispatch_recv
= cli
->dispatch_recv
;
471 state
->orig
.in
.handle
= _handle
;
472 state
->orig
.in
.sec_info
= _sec_info
;
475 state
->orig
.out
.sdbuf
= _sdbuf
;
478 ZERO_STRUCT(state
->orig
.out
.result
);
480 state
->out_mem_ctx
= talloc_named_const(state
, 0,
481 "rpccli_lsa_QuerySecurity_out_memory");
482 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
483 return tevent_req_post(req
, ev
);
486 /* make a temporary copy, that we pass to the dispatch function */
487 state
->tmp
= state
->orig
;
489 subreq
= cli
->dispatch_send(state
, ev
, cli
,
490 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
491 NDR_LSA_QUERYSECURITY
,
493 if (tevent_req_nomem(subreq
, req
)) {
494 return tevent_req_post(req
, ev
);
496 tevent_req_set_callback(subreq
, rpccli_lsa_QuerySecurity_done
, req
);
500 static void rpccli_lsa_QuerySecurity_done(struct tevent_req
*subreq
)
502 struct tevent_req
*req
= tevent_req_callback_data(
503 subreq
, struct tevent_req
);
504 struct rpccli_lsa_QuerySecurity_state
*state
= tevent_req_data(
505 req
, struct rpccli_lsa_QuerySecurity_state
);
509 if (state
->out_mem_ctx
) {
510 mem_ctx
= state
->out_mem_ctx
;
515 status
= state
->dispatch_recv(subreq
, mem_ctx
);
517 if (!NT_STATUS_IS_OK(status
)) {
518 tevent_req_nterror(req
, status
);
522 /* Copy out parameters */
523 *state
->orig
.out
.sdbuf
= *state
->tmp
.out
.sdbuf
;
526 state
->orig
.out
.result
= state
->tmp
.out
.result
;
528 /* Reset temporary structure */
529 ZERO_STRUCT(state
->tmp
);
531 tevent_req_done(req
);
534 NTSTATUS
rpccli_lsa_QuerySecurity_recv(struct tevent_req
*req
,
538 struct rpccli_lsa_QuerySecurity_state
*state
= tevent_req_data(
539 req
, struct rpccli_lsa_QuerySecurity_state
);
542 if (tevent_req_is_nterror(req
, &status
)) {
543 tevent_req_received(req
);
547 /* Steal possbile out parameters to the callers context */
548 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
551 *result
= state
->orig
.out
.result
;
553 tevent_req_received(req
);
557 NTSTATUS
rpccli_lsa_QuerySecurity(struct rpc_pipe_client
*cli
,
559 struct policy_handle
*handle
/* [in] [ref] */,
560 uint32_t sec_info
/* [in] */,
561 struct sec_desc_buf
**sdbuf
/* [out] [ref] */)
563 struct lsa_QuerySecurity r
;
567 r
.in
.handle
= handle
;
568 r
.in
.sec_info
= sec_info
;
570 status
= cli
->dispatch(cli
,
572 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
573 NDR_LSA_QUERYSECURITY
,
576 if (!NT_STATUS_IS_OK(status
)) {
580 if (NT_STATUS_IS_ERR(status
)) {
584 /* Return variables */
585 *sdbuf
= *r
.out
.sdbuf
;
591 struct rpccli_lsa_SetSecObj_state
{
592 struct lsa_SetSecObj orig
;
593 struct lsa_SetSecObj tmp
;
594 TALLOC_CTX
*out_mem_ctx
;
595 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
598 static void rpccli_lsa_SetSecObj_done(struct tevent_req
*subreq
);
600 struct tevent_req
*rpccli_lsa_SetSecObj_send(TALLOC_CTX
*mem_ctx
,
601 struct tevent_context
*ev
,
602 struct rpc_pipe_client
*cli
,
603 struct policy_handle
*_handle
/* [in] [ref] */,
604 uint32_t _sec_info
/* [in] */,
605 struct sec_desc_buf
*_sdbuf
/* [in] [ref] */)
607 struct tevent_req
*req
;
608 struct rpccli_lsa_SetSecObj_state
*state
;
609 struct tevent_req
*subreq
;
611 req
= tevent_req_create(mem_ctx
, &state
,
612 struct rpccli_lsa_SetSecObj_state
);
616 state
->out_mem_ctx
= NULL
;
617 state
->dispatch_recv
= cli
->dispatch_recv
;
620 state
->orig
.in
.handle
= _handle
;
621 state
->orig
.in
.sec_info
= _sec_info
;
622 state
->orig
.in
.sdbuf
= _sdbuf
;
627 ZERO_STRUCT(state
->orig
.out
.result
);
629 /* make a temporary copy, that we pass to the dispatch function */
630 state
->tmp
= state
->orig
;
632 subreq
= cli
->dispatch_send(state
, ev
, cli
,
633 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
636 if (tevent_req_nomem(subreq
, req
)) {
637 return tevent_req_post(req
, ev
);
639 tevent_req_set_callback(subreq
, rpccli_lsa_SetSecObj_done
, req
);
643 static void rpccli_lsa_SetSecObj_done(struct tevent_req
*subreq
)
645 struct tevent_req
*req
= tevent_req_callback_data(
646 subreq
, struct tevent_req
);
647 struct rpccli_lsa_SetSecObj_state
*state
= tevent_req_data(
648 req
, struct rpccli_lsa_SetSecObj_state
);
652 if (state
->out_mem_ctx
) {
653 mem_ctx
= state
->out_mem_ctx
;
658 status
= state
->dispatch_recv(subreq
, mem_ctx
);
660 if (!NT_STATUS_IS_OK(status
)) {
661 tevent_req_nterror(req
, status
);
665 /* Copy out parameters */
668 state
->orig
.out
.result
= state
->tmp
.out
.result
;
670 /* Reset temporary structure */
671 ZERO_STRUCT(state
->tmp
);
673 tevent_req_done(req
);
676 NTSTATUS
rpccli_lsa_SetSecObj_recv(struct tevent_req
*req
,
680 struct rpccli_lsa_SetSecObj_state
*state
= tevent_req_data(
681 req
, struct rpccli_lsa_SetSecObj_state
);
684 if (tevent_req_is_nterror(req
, &status
)) {
685 tevent_req_received(req
);
689 /* Steal possbile out parameters to the callers context */
690 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
693 *result
= state
->orig
.out
.result
;
695 tevent_req_received(req
);
699 NTSTATUS
rpccli_lsa_SetSecObj(struct rpc_pipe_client
*cli
,
701 struct policy_handle
*handle
/* [in] [ref] */,
702 uint32_t sec_info
/* [in] */,
703 struct sec_desc_buf
*sdbuf
/* [in] [ref] */)
705 struct lsa_SetSecObj r
;
709 r
.in
.handle
= handle
;
710 r
.in
.sec_info
= sec_info
;
713 status
= cli
->dispatch(cli
,
715 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
719 if (!NT_STATUS_IS_OK(status
)) {
723 if (NT_STATUS_IS_ERR(status
)) {
727 /* Return variables */
733 struct rpccli_lsa_ChangePassword_state
{
734 struct lsa_ChangePassword orig
;
735 struct lsa_ChangePassword tmp
;
736 TALLOC_CTX
*out_mem_ctx
;
737 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
740 static void rpccli_lsa_ChangePassword_done(struct tevent_req
*subreq
);
742 struct tevent_req
*rpccli_lsa_ChangePassword_send(TALLOC_CTX
*mem_ctx
,
743 struct tevent_context
*ev
,
744 struct rpc_pipe_client
*cli
)
746 struct tevent_req
*req
;
747 struct rpccli_lsa_ChangePassword_state
*state
;
748 struct tevent_req
*subreq
;
750 req
= tevent_req_create(mem_ctx
, &state
,
751 struct rpccli_lsa_ChangePassword_state
);
755 state
->out_mem_ctx
= NULL
;
756 state
->dispatch_recv
= cli
->dispatch_recv
;
763 ZERO_STRUCT(state
->orig
.out
.result
);
765 /* make a temporary copy, that we pass to the dispatch function */
766 state
->tmp
= state
->orig
;
768 subreq
= cli
->dispatch_send(state
, ev
, cli
,
769 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
770 NDR_LSA_CHANGEPASSWORD
,
772 if (tevent_req_nomem(subreq
, req
)) {
773 return tevent_req_post(req
, ev
);
775 tevent_req_set_callback(subreq
, rpccli_lsa_ChangePassword_done
, req
);
779 static void rpccli_lsa_ChangePassword_done(struct tevent_req
*subreq
)
781 struct tevent_req
*req
= tevent_req_callback_data(
782 subreq
, struct tevent_req
);
783 struct rpccli_lsa_ChangePassword_state
*state
= tevent_req_data(
784 req
, struct rpccli_lsa_ChangePassword_state
);
788 if (state
->out_mem_ctx
) {
789 mem_ctx
= state
->out_mem_ctx
;
794 status
= state
->dispatch_recv(subreq
, mem_ctx
);
796 if (!NT_STATUS_IS_OK(status
)) {
797 tevent_req_nterror(req
, status
);
801 /* Copy out parameters */
804 state
->orig
.out
.result
= state
->tmp
.out
.result
;
806 /* Reset temporary structure */
807 ZERO_STRUCT(state
->tmp
);
809 tevent_req_done(req
);
812 NTSTATUS
rpccli_lsa_ChangePassword_recv(struct tevent_req
*req
,
816 struct rpccli_lsa_ChangePassword_state
*state
= tevent_req_data(
817 req
, struct rpccli_lsa_ChangePassword_state
);
820 if (tevent_req_is_nterror(req
, &status
)) {
821 tevent_req_received(req
);
825 /* Steal possbile out parameters to the callers context */
826 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
829 *result
= state
->orig
.out
.result
;
831 tevent_req_received(req
);
835 NTSTATUS
rpccli_lsa_ChangePassword(struct rpc_pipe_client
*cli
,
838 struct lsa_ChangePassword r
;
843 status
= cli
->dispatch(cli
,
845 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
846 NDR_LSA_CHANGEPASSWORD
,
849 if (!NT_STATUS_IS_OK(status
)) {
853 if (NT_STATUS_IS_ERR(status
)) {
857 /* Return variables */
863 struct rpccli_lsa_OpenPolicy_state
{
864 struct lsa_OpenPolicy orig
;
865 struct lsa_OpenPolicy tmp
;
866 TALLOC_CTX
*out_mem_ctx
;
867 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
870 static void rpccli_lsa_OpenPolicy_done(struct tevent_req
*subreq
);
872 struct tevent_req
*rpccli_lsa_OpenPolicy_send(TALLOC_CTX
*mem_ctx
,
873 struct tevent_context
*ev
,
874 struct rpc_pipe_client
*cli
,
875 uint16_t *_system_name
/* [in] [unique] */,
876 struct lsa_ObjectAttribute
*_attr
/* [in] [ref] */,
877 uint32_t _access_mask
/* [in] */,
878 struct policy_handle
*_handle
/* [out] [ref] */)
880 struct tevent_req
*req
;
881 struct rpccli_lsa_OpenPolicy_state
*state
;
882 struct tevent_req
*subreq
;
884 req
= tevent_req_create(mem_ctx
, &state
,
885 struct rpccli_lsa_OpenPolicy_state
);
889 state
->out_mem_ctx
= NULL
;
890 state
->dispatch_recv
= cli
->dispatch_recv
;
893 state
->orig
.in
.system_name
= _system_name
;
894 state
->orig
.in
.attr
= _attr
;
895 state
->orig
.in
.access_mask
= _access_mask
;
898 state
->orig
.out
.handle
= _handle
;
901 ZERO_STRUCT(state
->orig
.out
.result
);
903 state
->out_mem_ctx
= talloc_named_const(state
, 0,
904 "rpccli_lsa_OpenPolicy_out_memory");
905 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
906 return tevent_req_post(req
, ev
);
909 /* make a temporary copy, that we pass to the dispatch function */
910 state
->tmp
= state
->orig
;
912 subreq
= cli
->dispatch_send(state
, ev
, cli
,
913 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
916 if (tevent_req_nomem(subreq
, req
)) {
917 return tevent_req_post(req
, ev
);
919 tevent_req_set_callback(subreq
, rpccli_lsa_OpenPolicy_done
, req
);
923 static void rpccli_lsa_OpenPolicy_done(struct tevent_req
*subreq
)
925 struct tevent_req
*req
= tevent_req_callback_data(
926 subreq
, struct tevent_req
);
927 struct rpccli_lsa_OpenPolicy_state
*state
= tevent_req_data(
928 req
, struct rpccli_lsa_OpenPolicy_state
);
932 if (state
->out_mem_ctx
) {
933 mem_ctx
= state
->out_mem_ctx
;
938 status
= state
->dispatch_recv(subreq
, mem_ctx
);
940 if (!NT_STATUS_IS_OK(status
)) {
941 tevent_req_nterror(req
, status
);
945 /* Copy out parameters */
946 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
949 state
->orig
.out
.result
= state
->tmp
.out
.result
;
951 /* Reset temporary structure */
952 ZERO_STRUCT(state
->tmp
);
954 tevent_req_done(req
);
957 NTSTATUS
rpccli_lsa_OpenPolicy_recv(struct tevent_req
*req
,
961 struct rpccli_lsa_OpenPolicy_state
*state
= tevent_req_data(
962 req
, struct rpccli_lsa_OpenPolicy_state
);
965 if (tevent_req_is_nterror(req
, &status
)) {
966 tevent_req_received(req
);
970 /* Steal possbile out parameters to the callers context */
971 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
974 *result
= state
->orig
.out
.result
;
976 tevent_req_received(req
);
980 NTSTATUS
rpccli_lsa_OpenPolicy(struct rpc_pipe_client
*cli
,
982 uint16_t *system_name
/* [in] [unique] */,
983 struct lsa_ObjectAttribute
*attr
/* [in] [ref] */,
984 uint32_t access_mask
/* [in] */,
985 struct policy_handle
*handle
/* [out] [ref] */)
987 struct lsa_OpenPolicy r
;
991 r
.in
.system_name
= system_name
;
993 r
.in
.access_mask
= access_mask
;
995 status
= cli
->dispatch(cli
,
997 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
1001 if (!NT_STATUS_IS_OK(status
)) {
1005 if (NT_STATUS_IS_ERR(status
)) {
1009 /* Return variables */
1010 *handle
= *r
.out
.handle
;
1013 return r
.out
.result
;
1016 struct rpccli_lsa_QueryInfoPolicy_state
{
1017 struct lsa_QueryInfoPolicy orig
;
1018 struct lsa_QueryInfoPolicy tmp
;
1019 TALLOC_CTX
*out_mem_ctx
;
1020 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1023 static void rpccli_lsa_QueryInfoPolicy_done(struct tevent_req
*subreq
);
1025 struct tevent_req
*rpccli_lsa_QueryInfoPolicy_send(TALLOC_CTX
*mem_ctx
,
1026 struct tevent_context
*ev
,
1027 struct rpc_pipe_client
*cli
,
1028 struct policy_handle
*_handle
/* [in] [ref] */,
1029 enum lsa_PolicyInfo _level
/* [in] */,
1030 union lsa_PolicyInformation
**_info
/* [out] [ref,switch_is(level)] */)
1032 struct tevent_req
*req
;
1033 struct rpccli_lsa_QueryInfoPolicy_state
*state
;
1034 struct tevent_req
*subreq
;
1036 req
= tevent_req_create(mem_ctx
, &state
,
1037 struct rpccli_lsa_QueryInfoPolicy_state
);
1041 state
->out_mem_ctx
= NULL
;
1042 state
->dispatch_recv
= cli
->dispatch_recv
;
1045 state
->orig
.in
.handle
= _handle
;
1046 state
->orig
.in
.level
= _level
;
1048 /* Out parameters */
1049 state
->orig
.out
.info
= _info
;
1052 ZERO_STRUCT(state
->orig
.out
.result
);
1054 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1055 "rpccli_lsa_QueryInfoPolicy_out_memory");
1056 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1057 return tevent_req_post(req
, ev
);
1060 /* make a temporary copy, that we pass to the dispatch function */
1061 state
->tmp
= state
->orig
;
1063 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1064 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
1065 NDR_LSA_QUERYINFOPOLICY
,
1067 if (tevent_req_nomem(subreq
, req
)) {
1068 return tevent_req_post(req
, ev
);
1070 tevent_req_set_callback(subreq
, rpccli_lsa_QueryInfoPolicy_done
, req
);
1074 static void rpccli_lsa_QueryInfoPolicy_done(struct tevent_req
*subreq
)
1076 struct tevent_req
*req
= tevent_req_callback_data(
1077 subreq
, struct tevent_req
);
1078 struct rpccli_lsa_QueryInfoPolicy_state
*state
= tevent_req_data(
1079 req
, struct rpccli_lsa_QueryInfoPolicy_state
);
1081 TALLOC_CTX
*mem_ctx
;
1083 if (state
->out_mem_ctx
) {
1084 mem_ctx
= state
->out_mem_ctx
;
1089 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1090 TALLOC_FREE(subreq
);
1091 if (!NT_STATUS_IS_OK(status
)) {
1092 tevent_req_nterror(req
, status
);
1096 /* Copy out parameters */
1097 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
1100 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1102 /* Reset temporary structure */
1103 ZERO_STRUCT(state
->tmp
);
1105 tevent_req_done(req
);
1108 NTSTATUS
rpccli_lsa_QueryInfoPolicy_recv(struct tevent_req
*req
,
1109 TALLOC_CTX
*mem_ctx
,
1112 struct rpccli_lsa_QueryInfoPolicy_state
*state
= tevent_req_data(
1113 req
, struct rpccli_lsa_QueryInfoPolicy_state
);
1116 if (tevent_req_is_nterror(req
, &status
)) {
1117 tevent_req_received(req
);
1121 /* Steal possbile out parameters to the callers context */
1122 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1125 *result
= state
->orig
.out
.result
;
1127 tevent_req_received(req
);
1128 return NT_STATUS_OK
;
1131 NTSTATUS
rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client
*cli
,
1132 TALLOC_CTX
*mem_ctx
,
1133 struct policy_handle
*handle
/* [in] [ref] */,
1134 enum lsa_PolicyInfo level
/* [in] */,
1135 union lsa_PolicyInformation
**info
/* [out] [ref,switch_is(level)] */)
1137 struct lsa_QueryInfoPolicy r
;
1141 r
.in
.handle
= handle
;
1144 status
= cli
->dispatch(cli
,
1146 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
1147 NDR_LSA_QUERYINFOPOLICY
,
1150 if (!NT_STATUS_IS_OK(status
)) {
1154 if (NT_STATUS_IS_ERR(status
)) {
1158 /* Return variables */
1159 *info
= *r
.out
.info
;
1162 return r
.out
.result
;
1165 struct rpccli_lsa_SetInfoPolicy_state
{
1166 struct lsa_SetInfoPolicy orig
;
1167 struct lsa_SetInfoPolicy tmp
;
1168 TALLOC_CTX
*out_mem_ctx
;
1169 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1172 static void rpccli_lsa_SetInfoPolicy_done(struct tevent_req
*subreq
);
1174 struct tevent_req
*rpccli_lsa_SetInfoPolicy_send(TALLOC_CTX
*mem_ctx
,
1175 struct tevent_context
*ev
,
1176 struct rpc_pipe_client
*cli
,
1177 struct policy_handle
*_handle
/* [in] [ref] */,
1178 enum lsa_PolicyInfo _level
/* [in] */,
1179 union lsa_PolicyInformation
*_info
/* [in] [ref,switch_is(level)] */)
1181 struct tevent_req
*req
;
1182 struct rpccli_lsa_SetInfoPolicy_state
*state
;
1183 struct tevent_req
*subreq
;
1185 req
= tevent_req_create(mem_ctx
, &state
,
1186 struct rpccli_lsa_SetInfoPolicy_state
);
1190 state
->out_mem_ctx
= NULL
;
1191 state
->dispatch_recv
= cli
->dispatch_recv
;
1194 state
->orig
.in
.handle
= _handle
;
1195 state
->orig
.in
.level
= _level
;
1196 state
->orig
.in
.info
= _info
;
1198 /* Out parameters */
1201 ZERO_STRUCT(state
->orig
.out
.result
);
1203 /* make a temporary copy, that we pass to the dispatch function */
1204 state
->tmp
= state
->orig
;
1206 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1207 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
1208 NDR_LSA_SETINFOPOLICY
,
1210 if (tevent_req_nomem(subreq
, req
)) {
1211 return tevent_req_post(req
, ev
);
1213 tevent_req_set_callback(subreq
, rpccli_lsa_SetInfoPolicy_done
, req
);
1217 static void rpccli_lsa_SetInfoPolicy_done(struct tevent_req
*subreq
)
1219 struct tevent_req
*req
= tevent_req_callback_data(
1220 subreq
, struct tevent_req
);
1221 struct rpccli_lsa_SetInfoPolicy_state
*state
= tevent_req_data(
1222 req
, struct rpccli_lsa_SetInfoPolicy_state
);
1224 TALLOC_CTX
*mem_ctx
;
1226 if (state
->out_mem_ctx
) {
1227 mem_ctx
= state
->out_mem_ctx
;
1232 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1233 TALLOC_FREE(subreq
);
1234 if (!NT_STATUS_IS_OK(status
)) {
1235 tevent_req_nterror(req
, status
);
1239 /* Copy out parameters */
1242 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1244 /* Reset temporary structure */
1245 ZERO_STRUCT(state
->tmp
);
1247 tevent_req_done(req
);
1250 NTSTATUS
rpccli_lsa_SetInfoPolicy_recv(struct tevent_req
*req
,
1251 TALLOC_CTX
*mem_ctx
,
1254 struct rpccli_lsa_SetInfoPolicy_state
*state
= tevent_req_data(
1255 req
, struct rpccli_lsa_SetInfoPolicy_state
);
1258 if (tevent_req_is_nterror(req
, &status
)) {
1259 tevent_req_received(req
);
1263 /* Steal possbile out parameters to the callers context */
1264 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1267 *result
= state
->orig
.out
.result
;
1269 tevent_req_received(req
);
1270 return NT_STATUS_OK
;
1273 NTSTATUS
rpccli_lsa_SetInfoPolicy(struct rpc_pipe_client
*cli
,
1274 TALLOC_CTX
*mem_ctx
,
1275 struct policy_handle
*handle
/* [in] [ref] */,
1276 enum lsa_PolicyInfo level
/* [in] */,
1277 union lsa_PolicyInformation
*info
/* [in] [ref,switch_is(level)] */)
1279 struct lsa_SetInfoPolicy r
;
1283 r
.in
.handle
= handle
;
1287 status
= cli
->dispatch(cli
,
1289 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
1290 NDR_LSA_SETINFOPOLICY
,
1293 if (!NT_STATUS_IS_OK(status
)) {
1297 if (NT_STATUS_IS_ERR(status
)) {
1301 /* Return variables */
1304 return r
.out
.result
;
1307 struct rpccli_lsa_ClearAuditLog_state
{
1308 struct lsa_ClearAuditLog orig
;
1309 struct lsa_ClearAuditLog tmp
;
1310 TALLOC_CTX
*out_mem_ctx
;
1311 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1314 static void rpccli_lsa_ClearAuditLog_done(struct tevent_req
*subreq
);
1316 struct tevent_req
*rpccli_lsa_ClearAuditLog_send(TALLOC_CTX
*mem_ctx
,
1317 struct tevent_context
*ev
,
1318 struct rpc_pipe_client
*cli
)
1320 struct tevent_req
*req
;
1321 struct rpccli_lsa_ClearAuditLog_state
*state
;
1322 struct tevent_req
*subreq
;
1324 req
= tevent_req_create(mem_ctx
, &state
,
1325 struct rpccli_lsa_ClearAuditLog_state
);
1329 state
->out_mem_ctx
= NULL
;
1330 state
->dispatch_recv
= cli
->dispatch_recv
;
1334 /* Out parameters */
1337 ZERO_STRUCT(state
->orig
.out
.result
);
1339 /* make a temporary copy, that we pass to the dispatch function */
1340 state
->tmp
= state
->orig
;
1342 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1343 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
1344 NDR_LSA_CLEARAUDITLOG
,
1346 if (tevent_req_nomem(subreq
, req
)) {
1347 return tevent_req_post(req
, ev
);
1349 tevent_req_set_callback(subreq
, rpccli_lsa_ClearAuditLog_done
, req
);
1353 static void rpccli_lsa_ClearAuditLog_done(struct tevent_req
*subreq
)
1355 struct tevent_req
*req
= tevent_req_callback_data(
1356 subreq
, struct tevent_req
);
1357 struct rpccli_lsa_ClearAuditLog_state
*state
= tevent_req_data(
1358 req
, struct rpccli_lsa_ClearAuditLog_state
);
1360 TALLOC_CTX
*mem_ctx
;
1362 if (state
->out_mem_ctx
) {
1363 mem_ctx
= state
->out_mem_ctx
;
1368 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1369 TALLOC_FREE(subreq
);
1370 if (!NT_STATUS_IS_OK(status
)) {
1371 tevent_req_nterror(req
, status
);
1375 /* Copy out parameters */
1378 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1380 /* Reset temporary structure */
1381 ZERO_STRUCT(state
->tmp
);
1383 tevent_req_done(req
);
1386 NTSTATUS
rpccli_lsa_ClearAuditLog_recv(struct tevent_req
*req
,
1387 TALLOC_CTX
*mem_ctx
,
1390 struct rpccli_lsa_ClearAuditLog_state
*state
= tevent_req_data(
1391 req
, struct rpccli_lsa_ClearAuditLog_state
);
1394 if (tevent_req_is_nterror(req
, &status
)) {
1395 tevent_req_received(req
);
1399 /* Steal possbile out parameters to the callers context */
1400 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1403 *result
= state
->orig
.out
.result
;
1405 tevent_req_received(req
);
1406 return NT_STATUS_OK
;
1409 NTSTATUS
rpccli_lsa_ClearAuditLog(struct rpc_pipe_client
*cli
,
1410 TALLOC_CTX
*mem_ctx
)
1412 struct lsa_ClearAuditLog r
;
1417 status
= cli
->dispatch(cli
,
1419 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
1420 NDR_LSA_CLEARAUDITLOG
,
1423 if (!NT_STATUS_IS_OK(status
)) {
1427 if (NT_STATUS_IS_ERR(status
)) {
1431 /* Return variables */
1434 return r
.out
.result
;
1437 struct rpccli_lsa_CreateAccount_state
{
1438 struct lsa_CreateAccount orig
;
1439 struct lsa_CreateAccount tmp
;
1440 TALLOC_CTX
*out_mem_ctx
;
1441 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1444 static void rpccli_lsa_CreateAccount_done(struct tevent_req
*subreq
);
1446 struct tevent_req
*rpccli_lsa_CreateAccount_send(TALLOC_CTX
*mem_ctx
,
1447 struct tevent_context
*ev
,
1448 struct rpc_pipe_client
*cli
,
1449 struct policy_handle
*_handle
/* [in] [ref] */,
1450 struct dom_sid2
*_sid
/* [in] [ref] */,
1451 uint32_t _access_mask
/* [in] */,
1452 struct policy_handle
*_acct_handle
/* [out] [ref] */)
1454 struct tevent_req
*req
;
1455 struct rpccli_lsa_CreateAccount_state
*state
;
1456 struct tevent_req
*subreq
;
1458 req
= tevent_req_create(mem_ctx
, &state
,
1459 struct rpccli_lsa_CreateAccount_state
);
1463 state
->out_mem_ctx
= NULL
;
1464 state
->dispatch_recv
= cli
->dispatch_recv
;
1467 state
->orig
.in
.handle
= _handle
;
1468 state
->orig
.in
.sid
= _sid
;
1469 state
->orig
.in
.access_mask
= _access_mask
;
1471 /* Out parameters */
1472 state
->orig
.out
.acct_handle
= _acct_handle
;
1475 ZERO_STRUCT(state
->orig
.out
.result
);
1477 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1478 "rpccli_lsa_CreateAccount_out_memory");
1479 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1480 return tevent_req_post(req
, ev
);
1483 /* make a temporary copy, that we pass to the dispatch function */
1484 state
->tmp
= state
->orig
;
1486 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1487 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
1488 NDR_LSA_CREATEACCOUNT
,
1490 if (tevent_req_nomem(subreq
, req
)) {
1491 return tevent_req_post(req
, ev
);
1493 tevent_req_set_callback(subreq
, rpccli_lsa_CreateAccount_done
, req
);
1497 static void rpccli_lsa_CreateAccount_done(struct tevent_req
*subreq
)
1499 struct tevent_req
*req
= tevent_req_callback_data(
1500 subreq
, struct tevent_req
);
1501 struct rpccli_lsa_CreateAccount_state
*state
= tevent_req_data(
1502 req
, struct rpccli_lsa_CreateAccount_state
);
1504 TALLOC_CTX
*mem_ctx
;
1506 if (state
->out_mem_ctx
) {
1507 mem_ctx
= state
->out_mem_ctx
;
1512 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1513 TALLOC_FREE(subreq
);
1514 if (!NT_STATUS_IS_OK(status
)) {
1515 tevent_req_nterror(req
, status
);
1519 /* Copy out parameters */
1520 *state
->orig
.out
.acct_handle
= *state
->tmp
.out
.acct_handle
;
1523 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1525 /* Reset temporary structure */
1526 ZERO_STRUCT(state
->tmp
);
1528 tevent_req_done(req
);
1531 NTSTATUS
rpccli_lsa_CreateAccount_recv(struct tevent_req
*req
,
1532 TALLOC_CTX
*mem_ctx
,
1535 struct rpccli_lsa_CreateAccount_state
*state
= tevent_req_data(
1536 req
, struct rpccli_lsa_CreateAccount_state
);
1539 if (tevent_req_is_nterror(req
, &status
)) {
1540 tevent_req_received(req
);
1544 /* Steal possbile out parameters to the callers context */
1545 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1548 *result
= state
->orig
.out
.result
;
1550 tevent_req_received(req
);
1551 return NT_STATUS_OK
;
1554 NTSTATUS
rpccli_lsa_CreateAccount(struct rpc_pipe_client
*cli
,
1555 TALLOC_CTX
*mem_ctx
,
1556 struct policy_handle
*handle
/* [in] [ref] */,
1557 struct dom_sid2
*sid
/* [in] [ref] */,
1558 uint32_t access_mask
/* [in] */,
1559 struct policy_handle
*acct_handle
/* [out] [ref] */)
1561 struct lsa_CreateAccount r
;
1565 r
.in
.handle
= handle
;
1567 r
.in
.access_mask
= access_mask
;
1569 status
= cli
->dispatch(cli
,
1571 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
1572 NDR_LSA_CREATEACCOUNT
,
1575 if (!NT_STATUS_IS_OK(status
)) {
1579 if (NT_STATUS_IS_ERR(status
)) {
1583 /* Return variables */
1584 *acct_handle
= *r
.out
.acct_handle
;
1587 return r
.out
.result
;
1590 struct rpccli_lsa_EnumAccounts_state
{
1591 struct lsa_EnumAccounts orig
;
1592 struct lsa_EnumAccounts tmp
;
1593 TALLOC_CTX
*out_mem_ctx
;
1594 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1597 static void rpccli_lsa_EnumAccounts_done(struct tevent_req
*subreq
);
1599 struct tevent_req
*rpccli_lsa_EnumAccounts_send(TALLOC_CTX
*mem_ctx
,
1600 struct tevent_context
*ev
,
1601 struct rpc_pipe_client
*cli
,
1602 struct policy_handle
*_handle
/* [in] [ref] */,
1603 uint32_t *_resume_handle
/* [in,out] [ref] */,
1604 struct lsa_SidArray
*_sids
/* [out] [ref] */,
1605 uint32_t _num_entries
/* [in] [range(0,8192)] */)
1607 struct tevent_req
*req
;
1608 struct rpccli_lsa_EnumAccounts_state
*state
;
1609 struct tevent_req
*subreq
;
1611 req
= tevent_req_create(mem_ctx
, &state
,
1612 struct rpccli_lsa_EnumAccounts_state
);
1616 state
->out_mem_ctx
= NULL
;
1617 state
->dispatch_recv
= cli
->dispatch_recv
;
1620 state
->orig
.in
.handle
= _handle
;
1621 state
->orig
.in
.resume_handle
= _resume_handle
;
1622 state
->orig
.in
.num_entries
= _num_entries
;
1624 /* Out parameters */
1625 state
->orig
.out
.resume_handle
= _resume_handle
;
1626 state
->orig
.out
.sids
= _sids
;
1629 ZERO_STRUCT(state
->orig
.out
.result
);
1631 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1632 "rpccli_lsa_EnumAccounts_out_memory");
1633 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1634 return tevent_req_post(req
, ev
);
1637 /* make a temporary copy, that we pass to the dispatch function */
1638 state
->tmp
= state
->orig
;
1640 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1641 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
1642 NDR_LSA_ENUMACCOUNTS
,
1644 if (tevent_req_nomem(subreq
, req
)) {
1645 return tevent_req_post(req
, ev
);
1647 tevent_req_set_callback(subreq
, rpccli_lsa_EnumAccounts_done
, req
);
1651 static void rpccli_lsa_EnumAccounts_done(struct tevent_req
*subreq
)
1653 struct tevent_req
*req
= tevent_req_callback_data(
1654 subreq
, struct tevent_req
);
1655 struct rpccli_lsa_EnumAccounts_state
*state
= tevent_req_data(
1656 req
, struct rpccli_lsa_EnumAccounts_state
);
1658 TALLOC_CTX
*mem_ctx
;
1660 if (state
->out_mem_ctx
) {
1661 mem_ctx
= state
->out_mem_ctx
;
1666 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1667 TALLOC_FREE(subreq
);
1668 if (!NT_STATUS_IS_OK(status
)) {
1669 tevent_req_nterror(req
, status
);
1673 /* Copy out parameters */
1674 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
1675 *state
->orig
.out
.sids
= *state
->tmp
.out
.sids
;
1678 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1680 /* Reset temporary structure */
1681 ZERO_STRUCT(state
->tmp
);
1683 tevent_req_done(req
);
1686 NTSTATUS
rpccli_lsa_EnumAccounts_recv(struct tevent_req
*req
,
1687 TALLOC_CTX
*mem_ctx
,
1690 struct rpccli_lsa_EnumAccounts_state
*state
= tevent_req_data(
1691 req
, struct rpccli_lsa_EnumAccounts_state
);
1694 if (tevent_req_is_nterror(req
, &status
)) {
1695 tevent_req_received(req
);
1699 /* Steal possbile out parameters to the callers context */
1700 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1703 *result
= state
->orig
.out
.result
;
1705 tevent_req_received(req
);
1706 return NT_STATUS_OK
;
1709 NTSTATUS
rpccli_lsa_EnumAccounts(struct rpc_pipe_client
*cli
,
1710 TALLOC_CTX
*mem_ctx
,
1711 struct policy_handle
*handle
/* [in] [ref] */,
1712 uint32_t *resume_handle
/* [in,out] [ref] */,
1713 struct lsa_SidArray
*sids
/* [out] [ref] */,
1714 uint32_t num_entries
/* [in] [range(0,8192)] */)
1716 struct lsa_EnumAccounts r
;
1720 r
.in
.handle
= handle
;
1721 r
.in
.resume_handle
= resume_handle
;
1722 r
.in
.num_entries
= num_entries
;
1724 status
= cli
->dispatch(cli
,
1726 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
1727 NDR_LSA_ENUMACCOUNTS
,
1730 if (!NT_STATUS_IS_OK(status
)) {
1734 if (NT_STATUS_IS_ERR(status
)) {
1738 /* Return variables */
1739 *resume_handle
= *r
.out
.resume_handle
;
1740 *sids
= *r
.out
.sids
;
1743 return r
.out
.result
;
1746 struct rpccli_lsa_CreateTrustedDomain_state
{
1747 struct lsa_CreateTrustedDomain orig
;
1748 struct lsa_CreateTrustedDomain tmp
;
1749 TALLOC_CTX
*out_mem_ctx
;
1750 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1753 static void rpccli_lsa_CreateTrustedDomain_done(struct tevent_req
*subreq
);
1755 struct tevent_req
*rpccli_lsa_CreateTrustedDomain_send(TALLOC_CTX
*mem_ctx
,
1756 struct tevent_context
*ev
,
1757 struct rpc_pipe_client
*cli
,
1758 struct policy_handle
*_policy_handle
/* [in] [ref] */,
1759 struct lsa_DomainInfo
*_info
/* [in] [ref] */,
1760 uint32_t _access_mask
/* [in] */,
1761 struct policy_handle
*_trustdom_handle
/* [out] [ref] */)
1763 struct tevent_req
*req
;
1764 struct rpccli_lsa_CreateTrustedDomain_state
*state
;
1765 struct tevent_req
*subreq
;
1767 req
= tevent_req_create(mem_ctx
, &state
,
1768 struct rpccli_lsa_CreateTrustedDomain_state
);
1772 state
->out_mem_ctx
= NULL
;
1773 state
->dispatch_recv
= cli
->dispatch_recv
;
1776 state
->orig
.in
.policy_handle
= _policy_handle
;
1777 state
->orig
.in
.info
= _info
;
1778 state
->orig
.in
.access_mask
= _access_mask
;
1780 /* Out parameters */
1781 state
->orig
.out
.trustdom_handle
= _trustdom_handle
;
1784 ZERO_STRUCT(state
->orig
.out
.result
);
1786 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1787 "rpccli_lsa_CreateTrustedDomain_out_memory");
1788 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1789 return tevent_req_post(req
, ev
);
1792 /* make a temporary copy, that we pass to the dispatch function */
1793 state
->tmp
= state
->orig
;
1795 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1796 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
1797 NDR_LSA_CREATETRUSTEDDOMAIN
,
1799 if (tevent_req_nomem(subreq
, req
)) {
1800 return tevent_req_post(req
, ev
);
1802 tevent_req_set_callback(subreq
, rpccli_lsa_CreateTrustedDomain_done
, req
);
1806 static void rpccli_lsa_CreateTrustedDomain_done(struct tevent_req
*subreq
)
1808 struct tevent_req
*req
= tevent_req_callback_data(
1809 subreq
, struct tevent_req
);
1810 struct rpccli_lsa_CreateTrustedDomain_state
*state
= tevent_req_data(
1811 req
, struct rpccli_lsa_CreateTrustedDomain_state
);
1813 TALLOC_CTX
*mem_ctx
;
1815 if (state
->out_mem_ctx
) {
1816 mem_ctx
= state
->out_mem_ctx
;
1821 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1822 TALLOC_FREE(subreq
);
1823 if (!NT_STATUS_IS_OK(status
)) {
1824 tevent_req_nterror(req
, status
);
1828 /* Copy out parameters */
1829 *state
->orig
.out
.trustdom_handle
= *state
->tmp
.out
.trustdom_handle
;
1832 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1834 /* Reset temporary structure */
1835 ZERO_STRUCT(state
->tmp
);
1837 tevent_req_done(req
);
1840 NTSTATUS
rpccli_lsa_CreateTrustedDomain_recv(struct tevent_req
*req
,
1841 TALLOC_CTX
*mem_ctx
,
1844 struct rpccli_lsa_CreateTrustedDomain_state
*state
= tevent_req_data(
1845 req
, struct rpccli_lsa_CreateTrustedDomain_state
);
1848 if (tevent_req_is_nterror(req
, &status
)) {
1849 tevent_req_received(req
);
1853 /* Steal possbile out parameters to the callers context */
1854 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1857 *result
= state
->orig
.out
.result
;
1859 tevent_req_received(req
);
1860 return NT_STATUS_OK
;
1863 NTSTATUS
rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client
*cli
,
1864 TALLOC_CTX
*mem_ctx
,
1865 struct policy_handle
*policy_handle
/* [in] [ref] */,
1866 struct lsa_DomainInfo
*info
/* [in] [ref] */,
1867 uint32_t access_mask
/* [in] */,
1868 struct policy_handle
*trustdom_handle
/* [out] [ref] */)
1870 struct lsa_CreateTrustedDomain r
;
1874 r
.in
.policy_handle
= policy_handle
;
1876 r
.in
.access_mask
= access_mask
;
1878 status
= cli
->dispatch(cli
,
1880 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
1881 NDR_LSA_CREATETRUSTEDDOMAIN
,
1884 if (!NT_STATUS_IS_OK(status
)) {
1888 if (NT_STATUS_IS_ERR(status
)) {
1892 /* Return variables */
1893 *trustdom_handle
= *r
.out
.trustdom_handle
;
1896 return r
.out
.result
;
1899 struct rpccli_lsa_EnumTrustDom_state
{
1900 struct lsa_EnumTrustDom orig
;
1901 struct lsa_EnumTrustDom tmp
;
1902 TALLOC_CTX
*out_mem_ctx
;
1903 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1906 static void rpccli_lsa_EnumTrustDom_done(struct tevent_req
*subreq
);
1908 struct tevent_req
*rpccli_lsa_EnumTrustDom_send(TALLOC_CTX
*mem_ctx
,
1909 struct tevent_context
*ev
,
1910 struct rpc_pipe_client
*cli
,
1911 struct policy_handle
*_handle
/* [in] [ref] */,
1912 uint32_t *_resume_handle
/* [in,out] [ref] */,
1913 struct lsa_DomainList
*_domains
/* [out] [ref] */,
1914 uint32_t _max_size
/* [in] */)
1916 struct tevent_req
*req
;
1917 struct rpccli_lsa_EnumTrustDom_state
*state
;
1918 struct tevent_req
*subreq
;
1920 req
= tevent_req_create(mem_ctx
, &state
,
1921 struct rpccli_lsa_EnumTrustDom_state
);
1925 state
->out_mem_ctx
= NULL
;
1926 state
->dispatch_recv
= cli
->dispatch_recv
;
1929 state
->orig
.in
.handle
= _handle
;
1930 state
->orig
.in
.resume_handle
= _resume_handle
;
1931 state
->orig
.in
.max_size
= _max_size
;
1933 /* Out parameters */
1934 state
->orig
.out
.resume_handle
= _resume_handle
;
1935 state
->orig
.out
.domains
= _domains
;
1938 ZERO_STRUCT(state
->orig
.out
.result
);
1940 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1941 "rpccli_lsa_EnumTrustDom_out_memory");
1942 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1943 return tevent_req_post(req
, ev
);
1946 /* make a temporary copy, that we pass to the dispatch function */
1947 state
->tmp
= state
->orig
;
1949 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1950 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
1951 NDR_LSA_ENUMTRUSTDOM
,
1953 if (tevent_req_nomem(subreq
, req
)) {
1954 return tevent_req_post(req
, ev
);
1956 tevent_req_set_callback(subreq
, rpccli_lsa_EnumTrustDom_done
, req
);
1960 static void rpccli_lsa_EnumTrustDom_done(struct tevent_req
*subreq
)
1962 struct tevent_req
*req
= tevent_req_callback_data(
1963 subreq
, struct tevent_req
);
1964 struct rpccli_lsa_EnumTrustDom_state
*state
= tevent_req_data(
1965 req
, struct rpccli_lsa_EnumTrustDom_state
);
1967 TALLOC_CTX
*mem_ctx
;
1969 if (state
->out_mem_ctx
) {
1970 mem_ctx
= state
->out_mem_ctx
;
1975 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1976 TALLOC_FREE(subreq
);
1977 if (!NT_STATUS_IS_OK(status
)) {
1978 tevent_req_nterror(req
, status
);
1982 /* Copy out parameters */
1983 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
1984 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
1987 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1989 /* Reset temporary structure */
1990 ZERO_STRUCT(state
->tmp
);
1992 tevent_req_done(req
);
1995 NTSTATUS
rpccli_lsa_EnumTrustDom_recv(struct tevent_req
*req
,
1996 TALLOC_CTX
*mem_ctx
,
1999 struct rpccli_lsa_EnumTrustDom_state
*state
= tevent_req_data(
2000 req
, struct rpccli_lsa_EnumTrustDom_state
);
2003 if (tevent_req_is_nterror(req
, &status
)) {
2004 tevent_req_received(req
);
2008 /* Steal possbile out parameters to the callers context */
2009 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2012 *result
= state
->orig
.out
.result
;
2014 tevent_req_received(req
);
2015 return NT_STATUS_OK
;
2018 NTSTATUS
rpccli_lsa_EnumTrustDom(struct rpc_pipe_client
*cli
,
2019 TALLOC_CTX
*mem_ctx
,
2020 struct policy_handle
*handle
/* [in] [ref] */,
2021 uint32_t *resume_handle
/* [in,out] [ref] */,
2022 struct lsa_DomainList
*domains
/* [out] [ref] */,
2023 uint32_t max_size
/* [in] */)
2025 struct lsa_EnumTrustDom r
;
2029 r
.in
.handle
= handle
;
2030 r
.in
.resume_handle
= resume_handle
;
2031 r
.in
.max_size
= max_size
;
2033 status
= cli
->dispatch(cli
,
2035 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
2036 NDR_LSA_ENUMTRUSTDOM
,
2039 if (!NT_STATUS_IS_OK(status
)) {
2043 if (NT_STATUS_IS_ERR(status
)) {
2047 /* Return variables */
2048 *resume_handle
= *r
.out
.resume_handle
;
2049 *domains
= *r
.out
.domains
;
2052 return r
.out
.result
;
2055 struct rpccli_lsa_LookupNames_state
{
2056 struct lsa_LookupNames orig
;
2057 struct lsa_LookupNames tmp
;
2058 TALLOC_CTX
*out_mem_ctx
;
2059 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2062 static void rpccli_lsa_LookupNames_done(struct tevent_req
*subreq
);
2064 struct tevent_req
*rpccli_lsa_LookupNames_send(TALLOC_CTX
*mem_ctx
,
2065 struct tevent_context
*ev
,
2066 struct rpc_pipe_client
*cli
,
2067 struct policy_handle
*_handle
/* [in] [ref] */,
2068 uint32_t _num_names
/* [in] [range(0,1000)] */,
2069 struct lsa_String
*_names
/* [in] [size_is(num_names)] */,
2070 struct lsa_RefDomainList
**_domains
/* [out] [ref] */,
2071 struct lsa_TransSidArray
*_sids
/* [in,out] [ref] */,
2072 enum lsa_LookupNamesLevel _level
/* [in] */,
2073 uint32_t *_count
/* [in,out] [ref] */)
2075 struct tevent_req
*req
;
2076 struct rpccli_lsa_LookupNames_state
*state
;
2077 struct tevent_req
*subreq
;
2079 req
= tevent_req_create(mem_ctx
, &state
,
2080 struct rpccli_lsa_LookupNames_state
);
2084 state
->out_mem_ctx
= NULL
;
2085 state
->dispatch_recv
= cli
->dispatch_recv
;
2088 state
->orig
.in
.handle
= _handle
;
2089 state
->orig
.in
.num_names
= _num_names
;
2090 state
->orig
.in
.names
= _names
;
2091 state
->orig
.in
.sids
= _sids
;
2092 state
->orig
.in
.level
= _level
;
2093 state
->orig
.in
.count
= _count
;
2095 /* Out parameters */
2096 state
->orig
.out
.domains
= _domains
;
2097 state
->orig
.out
.sids
= _sids
;
2098 state
->orig
.out
.count
= _count
;
2101 ZERO_STRUCT(state
->orig
.out
.result
);
2103 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2104 "rpccli_lsa_LookupNames_out_memory");
2105 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2106 return tevent_req_post(req
, ev
);
2109 /* make a temporary copy, that we pass to the dispatch function */
2110 state
->tmp
= state
->orig
;
2112 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2113 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
2114 NDR_LSA_LOOKUPNAMES
,
2116 if (tevent_req_nomem(subreq
, req
)) {
2117 return tevent_req_post(req
, ev
);
2119 tevent_req_set_callback(subreq
, rpccli_lsa_LookupNames_done
, req
);
2123 static void rpccli_lsa_LookupNames_done(struct tevent_req
*subreq
)
2125 struct tevent_req
*req
= tevent_req_callback_data(
2126 subreq
, struct tevent_req
);
2127 struct rpccli_lsa_LookupNames_state
*state
= tevent_req_data(
2128 req
, struct rpccli_lsa_LookupNames_state
);
2130 TALLOC_CTX
*mem_ctx
;
2132 if (state
->out_mem_ctx
) {
2133 mem_ctx
= state
->out_mem_ctx
;
2138 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2139 TALLOC_FREE(subreq
);
2140 if (!NT_STATUS_IS_OK(status
)) {
2141 tevent_req_nterror(req
, status
);
2145 /* Copy out parameters */
2146 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
2147 *state
->orig
.out
.sids
= *state
->tmp
.out
.sids
;
2148 *state
->orig
.out
.count
= *state
->tmp
.out
.count
;
2151 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2153 /* Reset temporary structure */
2154 ZERO_STRUCT(state
->tmp
);
2156 tevent_req_done(req
);
2159 NTSTATUS
rpccli_lsa_LookupNames_recv(struct tevent_req
*req
,
2160 TALLOC_CTX
*mem_ctx
,
2163 struct rpccli_lsa_LookupNames_state
*state
= tevent_req_data(
2164 req
, struct rpccli_lsa_LookupNames_state
);
2167 if (tevent_req_is_nterror(req
, &status
)) {
2168 tevent_req_received(req
);
2172 /* Steal possbile out parameters to the callers context */
2173 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2176 *result
= state
->orig
.out
.result
;
2178 tevent_req_received(req
);
2179 return NT_STATUS_OK
;
2182 NTSTATUS
rpccli_lsa_LookupNames(struct rpc_pipe_client
*cli
,
2183 TALLOC_CTX
*mem_ctx
,
2184 struct policy_handle
*handle
/* [in] [ref] */,
2185 uint32_t num_names
/* [in] [range(0,1000)] */,
2186 struct lsa_String
*names
/* [in] [size_is(num_names)] */,
2187 struct lsa_RefDomainList
**domains
/* [out] [ref] */,
2188 struct lsa_TransSidArray
*sids
/* [in,out] [ref] */,
2189 enum lsa_LookupNamesLevel level
/* [in] */,
2190 uint32_t *count
/* [in,out] [ref] */)
2192 struct lsa_LookupNames r
;
2196 r
.in
.handle
= handle
;
2197 r
.in
.num_names
= num_names
;
2203 status
= cli
->dispatch(cli
,
2205 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
2206 NDR_LSA_LOOKUPNAMES
,
2209 if (!NT_STATUS_IS_OK(status
)) {
2213 if (NT_STATUS_IS_ERR(status
)) {
2217 /* Return variables */
2218 *domains
= *r
.out
.domains
;
2219 *sids
= *r
.out
.sids
;
2220 *count
= *r
.out
.count
;
2223 return r
.out
.result
;
2226 struct rpccli_lsa_LookupSids_state
{
2227 struct lsa_LookupSids orig
;
2228 struct lsa_LookupSids tmp
;
2229 TALLOC_CTX
*out_mem_ctx
;
2230 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2233 static void rpccli_lsa_LookupSids_done(struct tevent_req
*subreq
);
2235 struct tevent_req
*rpccli_lsa_LookupSids_send(TALLOC_CTX
*mem_ctx
,
2236 struct tevent_context
*ev
,
2237 struct rpc_pipe_client
*cli
,
2238 struct policy_handle
*_handle
/* [in] [ref] */,
2239 struct lsa_SidArray
*_sids
/* [in] [ref] */,
2240 struct lsa_RefDomainList
**_domains
/* [out] [ref] */,
2241 struct lsa_TransNameArray
*_names
/* [in,out] [ref] */,
2242 enum lsa_LookupNamesLevel _level
/* [in] */,
2243 uint32_t *_count
/* [in,out] [ref] */)
2245 struct tevent_req
*req
;
2246 struct rpccli_lsa_LookupSids_state
*state
;
2247 struct tevent_req
*subreq
;
2249 req
= tevent_req_create(mem_ctx
, &state
,
2250 struct rpccli_lsa_LookupSids_state
);
2254 state
->out_mem_ctx
= NULL
;
2255 state
->dispatch_recv
= cli
->dispatch_recv
;
2258 state
->orig
.in
.handle
= _handle
;
2259 state
->orig
.in
.sids
= _sids
;
2260 state
->orig
.in
.names
= _names
;
2261 state
->orig
.in
.level
= _level
;
2262 state
->orig
.in
.count
= _count
;
2264 /* Out parameters */
2265 state
->orig
.out
.domains
= _domains
;
2266 state
->orig
.out
.names
= _names
;
2267 state
->orig
.out
.count
= _count
;
2270 ZERO_STRUCT(state
->orig
.out
.result
);
2272 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2273 "rpccli_lsa_LookupSids_out_memory");
2274 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2275 return tevent_req_post(req
, ev
);
2278 /* make a temporary copy, that we pass to the dispatch function */
2279 state
->tmp
= state
->orig
;
2281 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2282 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
2285 if (tevent_req_nomem(subreq
, req
)) {
2286 return tevent_req_post(req
, ev
);
2288 tevent_req_set_callback(subreq
, rpccli_lsa_LookupSids_done
, req
);
2292 static void rpccli_lsa_LookupSids_done(struct tevent_req
*subreq
)
2294 struct tevent_req
*req
= tevent_req_callback_data(
2295 subreq
, struct tevent_req
);
2296 struct rpccli_lsa_LookupSids_state
*state
= tevent_req_data(
2297 req
, struct rpccli_lsa_LookupSids_state
);
2299 TALLOC_CTX
*mem_ctx
;
2301 if (state
->out_mem_ctx
) {
2302 mem_ctx
= state
->out_mem_ctx
;
2307 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2308 TALLOC_FREE(subreq
);
2309 if (!NT_STATUS_IS_OK(status
)) {
2310 tevent_req_nterror(req
, status
);
2314 /* Copy out parameters */
2315 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
2316 *state
->orig
.out
.names
= *state
->tmp
.out
.names
;
2317 *state
->orig
.out
.count
= *state
->tmp
.out
.count
;
2320 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2322 /* Reset temporary structure */
2323 ZERO_STRUCT(state
->tmp
);
2325 tevent_req_done(req
);
2328 NTSTATUS
rpccli_lsa_LookupSids_recv(struct tevent_req
*req
,
2329 TALLOC_CTX
*mem_ctx
,
2332 struct rpccli_lsa_LookupSids_state
*state
= tevent_req_data(
2333 req
, struct rpccli_lsa_LookupSids_state
);
2336 if (tevent_req_is_nterror(req
, &status
)) {
2337 tevent_req_received(req
);
2341 /* Steal possbile out parameters to the callers context */
2342 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2345 *result
= state
->orig
.out
.result
;
2347 tevent_req_received(req
);
2348 return NT_STATUS_OK
;
2351 NTSTATUS
rpccli_lsa_LookupSids(struct rpc_pipe_client
*cli
,
2352 TALLOC_CTX
*mem_ctx
,
2353 struct policy_handle
*handle
/* [in] [ref] */,
2354 struct lsa_SidArray
*sids
/* [in] [ref] */,
2355 struct lsa_RefDomainList
**domains
/* [out] [ref] */,
2356 struct lsa_TransNameArray
*names
/* [in,out] [ref] */,
2357 enum lsa_LookupNamesLevel level
/* [in] */,
2358 uint32_t *count
/* [in,out] [ref] */)
2360 struct lsa_LookupSids r
;
2364 r
.in
.handle
= handle
;
2370 status
= cli
->dispatch(cli
,
2372 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
2376 if (!NT_STATUS_IS_OK(status
)) {
2380 if (NT_STATUS_IS_ERR(status
)) {
2384 /* Return variables */
2385 *domains
= *r
.out
.domains
;
2386 *names
= *r
.out
.names
;
2387 *count
= *r
.out
.count
;
2390 return r
.out
.result
;
2393 struct rpccli_lsa_CreateSecret_state
{
2394 struct lsa_CreateSecret orig
;
2395 struct lsa_CreateSecret tmp
;
2396 TALLOC_CTX
*out_mem_ctx
;
2397 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2400 static void rpccli_lsa_CreateSecret_done(struct tevent_req
*subreq
);
2402 struct tevent_req
*rpccli_lsa_CreateSecret_send(TALLOC_CTX
*mem_ctx
,
2403 struct tevent_context
*ev
,
2404 struct rpc_pipe_client
*cli
,
2405 struct policy_handle
*_handle
/* [in] [ref] */,
2406 struct lsa_String _name
/* [in] */,
2407 uint32_t _access_mask
/* [in] */,
2408 struct policy_handle
*_sec_handle
/* [out] [ref] */)
2410 struct tevent_req
*req
;
2411 struct rpccli_lsa_CreateSecret_state
*state
;
2412 struct tevent_req
*subreq
;
2414 req
= tevent_req_create(mem_ctx
, &state
,
2415 struct rpccli_lsa_CreateSecret_state
);
2419 state
->out_mem_ctx
= NULL
;
2420 state
->dispatch_recv
= cli
->dispatch_recv
;
2423 state
->orig
.in
.handle
= _handle
;
2424 state
->orig
.in
.name
= _name
;
2425 state
->orig
.in
.access_mask
= _access_mask
;
2427 /* Out parameters */
2428 state
->orig
.out
.sec_handle
= _sec_handle
;
2431 ZERO_STRUCT(state
->orig
.out
.result
);
2433 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2434 "rpccli_lsa_CreateSecret_out_memory");
2435 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2436 return tevent_req_post(req
, ev
);
2439 /* make a temporary copy, that we pass to the dispatch function */
2440 state
->tmp
= state
->orig
;
2442 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2443 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
2444 NDR_LSA_CREATESECRET
,
2446 if (tevent_req_nomem(subreq
, req
)) {
2447 return tevent_req_post(req
, ev
);
2449 tevent_req_set_callback(subreq
, rpccli_lsa_CreateSecret_done
, req
);
2453 static void rpccli_lsa_CreateSecret_done(struct tevent_req
*subreq
)
2455 struct tevent_req
*req
= tevent_req_callback_data(
2456 subreq
, struct tevent_req
);
2457 struct rpccli_lsa_CreateSecret_state
*state
= tevent_req_data(
2458 req
, struct rpccli_lsa_CreateSecret_state
);
2460 TALLOC_CTX
*mem_ctx
;
2462 if (state
->out_mem_ctx
) {
2463 mem_ctx
= state
->out_mem_ctx
;
2468 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2469 TALLOC_FREE(subreq
);
2470 if (!NT_STATUS_IS_OK(status
)) {
2471 tevent_req_nterror(req
, status
);
2475 /* Copy out parameters */
2476 *state
->orig
.out
.sec_handle
= *state
->tmp
.out
.sec_handle
;
2479 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2481 /* Reset temporary structure */
2482 ZERO_STRUCT(state
->tmp
);
2484 tevent_req_done(req
);
2487 NTSTATUS
rpccli_lsa_CreateSecret_recv(struct tevent_req
*req
,
2488 TALLOC_CTX
*mem_ctx
,
2491 struct rpccli_lsa_CreateSecret_state
*state
= tevent_req_data(
2492 req
, struct rpccli_lsa_CreateSecret_state
);
2495 if (tevent_req_is_nterror(req
, &status
)) {
2496 tevent_req_received(req
);
2500 /* Steal possbile out parameters to the callers context */
2501 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2504 *result
= state
->orig
.out
.result
;
2506 tevent_req_received(req
);
2507 return NT_STATUS_OK
;
2510 NTSTATUS
rpccli_lsa_CreateSecret(struct rpc_pipe_client
*cli
,
2511 TALLOC_CTX
*mem_ctx
,
2512 struct policy_handle
*handle
/* [in] [ref] */,
2513 struct lsa_String name
/* [in] */,
2514 uint32_t access_mask
/* [in] */,
2515 struct policy_handle
*sec_handle
/* [out] [ref] */)
2517 struct lsa_CreateSecret r
;
2521 r
.in
.handle
= handle
;
2523 r
.in
.access_mask
= access_mask
;
2525 status
= cli
->dispatch(cli
,
2527 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
2528 NDR_LSA_CREATESECRET
,
2531 if (!NT_STATUS_IS_OK(status
)) {
2535 if (NT_STATUS_IS_ERR(status
)) {
2539 /* Return variables */
2540 *sec_handle
= *r
.out
.sec_handle
;
2543 return r
.out
.result
;
2546 struct rpccli_lsa_OpenAccount_state
{
2547 struct lsa_OpenAccount orig
;
2548 struct lsa_OpenAccount tmp
;
2549 TALLOC_CTX
*out_mem_ctx
;
2550 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2553 static void rpccli_lsa_OpenAccount_done(struct tevent_req
*subreq
);
2555 struct tevent_req
*rpccli_lsa_OpenAccount_send(TALLOC_CTX
*mem_ctx
,
2556 struct tevent_context
*ev
,
2557 struct rpc_pipe_client
*cli
,
2558 struct policy_handle
*_handle
/* [in] [ref] */,
2559 struct dom_sid2
*_sid
/* [in] [ref] */,
2560 uint32_t _access_mask
/* [in] */,
2561 struct policy_handle
*_acct_handle
/* [out] [ref] */)
2563 struct tevent_req
*req
;
2564 struct rpccli_lsa_OpenAccount_state
*state
;
2565 struct tevent_req
*subreq
;
2567 req
= tevent_req_create(mem_ctx
, &state
,
2568 struct rpccli_lsa_OpenAccount_state
);
2572 state
->out_mem_ctx
= NULL
;
2573 state
->dispatch_recv
= cli
->dispatch_recv
;
2576 state
->orig
.in
.handle
= _handle
;
2577 state
->orig
.in
.sid
= _sid
;
2578 state
->orig
.in
.access_mask
= _access_mask
;
2580 /* Out parameters */
2581 state
->orig
.out
.acct_handle
= _acct_handle
;
2584 ZERO_STRUCT(state
->orig
.out
.result
);
2586 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2587 "rpccli_lsa_OpenAccount_out_memory");
2588 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2589 return tevent_req_post(req
, ev
);
2592 /* make a temporary copy, that we pass to the dispatch function */
2593 state
->tmp
= state
->orig
;
2595 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2596 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
2597 NDR_LSA_OPENACCOUNT
,
2599 if (tevent_req_nomem(subreq
, req
)) {
2600 return tevent_req_post(req
, ev
);
2602 tevent_req_set_callback(subreq
, rpccli_lsa_OpenAccount_done
, req
);
2606 static void rpccli_lsa_OpenAccount_done(struct tevent_req
*subreq
)
2608 struct tevent_req
*req
= tevent_req_callback_data(
2609 subreq
, struct tevent_req
);
2610 struct rpccli_lsa_OpenAccount_state
*state
= tevent_req_data(
2611 req
, struct rpccli_lsa_OpenAccount_state
);
2613 TALLOC_CTX
*mem_ctx
;
2615 if (state
->out_mem_ctx
) {
2616 mem_ctx
= state
->out_mem_ctx
;
2621 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2622 TALLOC_FREE(subreq
);
2623 if (!NT_STATUS_IS_OK(status
)) {
2624 tevent_req_nterror(req
, status
);
2628 /* Copy out parameters */
2629 *state
->orig
.out
.acct_handle
= *state
->tmp
.out
.acct_handle
;
2632 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2634 /* Reset temporary structure */
2635 ZERO_STRUCT(state
->tmp
);
2637 tevent_req_done(req
);
2640 NTSTATUS
rpccli_lsa_OpenAccount_recv(struct tevent_req
*req
,
2641 TALLOC_CTX
*mem_ctx
,
2644 struct rpccli_lsa_OpenAccount_state
*state
= tevent_req_data(
2645 req
, struct rpccli_lsa_OpenAccount_state
);
2648 if (tevent_req_is_nterror(req
, &status
)) {
2649 tevent_req_received(req
);
2653 /* Steal possbile out parameters to the callers context */
2654 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2657 *result
= state
->orig
.out
.result
;
2659 tevent_req_received(req
);
2660 return NT_STATUS_OK
;
2663 NTSTATUS
rpccli_lsa_OpenAccount(struct rpc_pipe_client
*cli
,
2664 TALLOC_CTX
*mem_ctx
,
2665 struct policy_handle
*handle
/* [in] [ref] */,
2666 struct dom_sid2
*sid
/* [in] [ref] */,
2667 uint32_t access_mask
/* [in] */,
2668 struct policy_handle
*acct_handle
/* [out] [ref] */)
2670 struct lsa_OpenAccount r
;
2674 r
.in
.handle
= handle
;
2676 r
.in
.access_mask
= access_mask
;
2678 status
= cli
->dispatch(cli
,
2680 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
2681 NDR_LSA_OPENACCOUNT
,
2684 if (!NT_STATUS_IS_OK(status
)) {
2688 if (NT_STATUS_IS_ERR(status
)) {
2692 /* Return variables */
2693 *acct_handle
= *r
.out
.acct_handle
;
2696 return r
.out
.result
;
2699 struct rpccli_lsa_EnumPrivsAccount_state
{
2700 struct lsa_EnumPrivsAccount orig
;
2701 struct lsa_EnumPrivsAccount tmp
;
2702 TALLOC_CTX
*out_mem_ctx
;
2703 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2706 static void rpccli_lsa_EnumPrivsAccount_done(struct tevent_req
*subreq
);
2708 struct tevent_req
*rpccli_lsa_EnumPrivsAccount_send(TALLOC_CTX
*mem_ctx
,
2709 struct tevent_context
*ev
,
2710 struct rpc_pipe_client
*cli
,
2711 struct policy_handle
*_handle
/* [in] [ref] */,
2712 struct lsa_PrivilegeSet
**_privs
/* [out] [ref] */)
2714 struct tevent_req
*req
;
2715 struct rpccli_lsa_EnumPrivsAccount_state
*state
;
2716 struct tevent_req
*subreq
;
2718 req
= tevent_req_create(mem_ctx
, &state
,
2719 struct rpccli_lsa_EnumPrivsAccount_state
);
2723 state
->out_mem_ctx
= NULL
;
2724 state
->dispatch_recv
= cli
->dispatch_recv
;
2727 state
->orig
.in
.handle
= _handle
;
2729 /* Out parameters */
2730 state
->orig
.out
.privs
= _privs
;
2733 ZERO_STRUCT(state
->orig
.out
.result
);
2735 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2736 "rpccli_lsa_EnumPrivsAccount_out_memory");
2737 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2738 return tevent_req_post(req
, ev
);
2741 /* make a temporary copy, that we pass to the dispatch function */
2742 state
->tmp
= state
->orig
;
2744 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2745 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
2746 NDR_LSA_ENUMPRIVSACCOUNT
,
2748 if (tevent_req_nomem(subreq
, req
)) {
2749 return tevent_req_post(req
, ev
);
2751 tevent_req_set_callback(subreq
, rpccli_lsa_EnumPrivsAccount_done
, req
);
2755 static void rpccli_lsa_EnumPrivsAccount_done(struct tevent_req
*subreq
)
2757 struct tevent_req
*req
= tevent_req_callback_data(
2758 subreq
, struct tevent_req
);
2759 struct rpccli_lsa_EnumPrivsAccount_state
*state
= tevent_req_data(
2760 req
, struct rpccli_lsa_EnumPrivsAccount_state
);
2762 TALLOC_CTX
*mem_ctx
;
2764 if (state
->out_mem_ctx
) {
2765 mem_ctx
= state
->out_mem_ctx
;
2770 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2771 TALLOC_FREE(subreq
);
2772 if (!NT_STATUS_IS_OK(status
)) {
2773 tevent_req_nterror(req
, status
);
2777 /* Copy out parameters */
2778 *state
->orig
.out
.privs
= *state
->tmp
.out
.privs
;
2781 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2783 /* Reset temporary structure */
2784 ZERO_STRUCT(state
->tmp
);
2786 tevent_req_done(req
);
2789 NTSTATUS
rpccli_lsa_EnumPrivsAccount_recv(struct tevent_req
*req
,
2790 TALLOC_CTX
*mem_ctx
,
2793 struct rpccli_lsa_EnumPrivsAccount_state
*state
= tevent_req_data(
2794 req
, struct rpccli_lsa_EnumPrivsAccount_state
);
2797 if (tevent_req_is_nterror(req
, &status
)) {
2798 tevent_req_received(req
);
2802 /* Steal possbile out parameters to the callers context */
2803 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2806 *result
= state
->orig
.out
.result
;
2808 tevent_req_received(req
);
2809 return NT_STATUS_OK
;
2812 NTSTATUS
rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client
*cli
,
2813 TALLOC_CTX
*mem_ctx
,
2814 struct policy_handle
*handle
/* [in] [ref] */,
2815 struct lsa_PrivilegeSet
**privs
/* [out] [ref] */)
2817 struct lsa_EnumPrivsAccount r
;
2821 r
.in
.handle
= handle
;
2823 status
= cli
->dispatch(cli
,
2825 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
2826 NDR_LSA_ENUMPRIVSACCOUNT
,
2829 if (!NT_STATUS_IS_OK(status
)) {
2833 if (NT_STATUS_IS_ERR(status
)) {
2837 /* Return variables */
2838 *privs
= *r
.out
.privs
;
2841 return r
.out
.result
;
2844 struct rpccli_lsa_AddPrivilegesToAccount_state
{
2845 struct lsa_AddPrivilegesToAccount orig
;
2846 struct lsa_AddPrivilegesToAccount tmp
;
2847 TALLOC_CTX
*out_mem_ctx
;
2848 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2851 static void rpccli_lsa_AddPrivilegesToAccount_done(struct tevent_req
*subreq
);
2853 struct tevent_req
*rpccli_lsa_AddPrivilegesToAccount_send(TALLOC_CTX
*mem_ctx
,
2854 struct tevent_context
*ev
,
2855 struct rpc_pipe_client
*cli
,
2856 struct policy_handle
*_handle
/* [in] [ref] */,
2857 struct lsa_PrivilegeSet
*_privs
/* [in] [ref] */)
2859 struct tevent_req
*req
;
2860 struct rpccli_lsa_AddPrivilegesToAccount_state
*state
;
2861 struct tevent_req
*subreq
;
2863 req
= tevent_req_create(mem_ctx
, &state
,
2864 struct rpccli_lsa_AddPrivilegesToAccount_state
);
2868 state
->out_mem_ctx
= NULL
;
2869 state
->dispatch_recv
= cli
->dispatch_recv
;
2872 state
->orig
.in
.handle
= _handle
;
2873 state
->orig
.in
.privs
= _privs
;
2875 /* Out parameters */
2878 ZERO_STRUCT(state
->orig
.out
.result
);
2880 /* make a temporary copy, that we pass to the dispatch function */
2881 state
->tmp
= state
->orig
;
2883 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2884 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
2885 NDR_LSA_ADDPRIVILEGESTOACCOUNT
,
2887 if (tevent_req_nomem(subreq
, req
)) {
2888 return tevent_req_post(req
, ev
);
2890 tevent_req_set_callback(subreq
, rpccli_lsa_AddPrivilegesToAccount_done
, req
);
2894 static void rpccli_lsa_AddPrivilegesToAccount_done(struct tevent_req
*subreq
)
2896 struct tevent_req
*req
= tevent_req_callback_data(
2897 subreq
, struct tevent_req
);
2898 struct rpccli_lsa_AddPrivilegesToAccount_state
*state
= tevent_req_data(
2899 req
, struct rpccli_lsa_AddPrivilegesToAccount_state
);
2901 TALLOC_CTX
*mem_ctx
;
2903 if (state
->out_mem_ctx
) {
2904 mem_ctx
= state
->out_mem_ctx
;
2909 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2910 TALLOC_FREE(subreq
);
2911 if (!NT_STATUS_IS_OK(status
)) {
2912 tevent_req_nterror(req
, status
);
2916 /* Copy out parameters */
2919 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2921 /* Reset temporary structure */
2922 ZERO_STRUCT(state
->tmp
);
2924 tevent_req_done(req
);
2927 NTSTATUS
rpccli_lsa_AddPrivilegesToAccount_recv(struct tevent_req
*req
,
2928 TALLOC_CTX
*mem_ctx
,
2931 struct rpccli_lsa_AddPrivilegesToAccount_state
*state
= tevent_req_data(
2932 req
, struct rpccli_lsa_AddPrivilegesToAccount_state
);
2935 if (tevent_req_is_nterror(req
, &status
)) {
2936 tevent_req_received(req
);
2940 /* Steal possbile out parameters to the callers context */
2941 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2944 *result
= state
->orig
.out
.result
;
2946 tevent_req_received(req
);
2947 return NT_STATUS_OK
;
2950 NTSTATUS
rpccli_lsa_AddPrivilegesToAccount(struct rpc_pipe_client
*cli
,
2951 TALLOC_CTX
*mem_ctx
,
2952 struct policy_handle
*handle
/* [in] [ref] */,
2953 struct lsa_PrivilegeSet
*privs
/* [in] [ref] */)
2955 struct lsa_AddPrivilegesToAccount r
;
2959 r
.in
.handle
= handle
;
2962 status
= cli
->dispatch(cli
,
2964 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
2965 NDR_LSA_ADDPRIVILEGESTOACCOUNT
,
2968 if (!NT_STATUS_IS_OK(status
)) {
2972 if (NT_STATUS_IS_ERR(status
)) {
2976 /* Return variables */
2979 return r
.out
.result
;
2982 struct rpccli_lsa_RemovePrivilegesFromAccount_state
{
2983 struct lsa_RemovePrivilegesFromAccount orig
;
2984 struct lsa_RemovePrivilegesFromAccount tmp
;
2985 TALLOC_CTX
*out_mem_ctx
;
2986 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2989 static void rpccli_lsa_RemovePrivilegesFromAccount_done(struct tevent_req
*subreq
);
2991 struct tevent_req
*rpccli_lsa_RemovePrivilegesFromAccount_send(TALLOC_CTX
*mem_ctx
,
2992 struct tevent_context
*ev
,
2993 struct rpc_pipe_client
*cli
,
2994 struct policy_handle
*_handle
/* [in] [ref] */,
2995 uint8_t _remove_all
/* [in] */,
2996 struct lsa_PrivilegeSet
*_privs
/* [in] [unique] */)
2998 struct tevent_req
*req
;
2999 struct rpccli_lsa_RemovePrivilegesFromAccount_state
*state
;
3000 struct tevent_req
*subreq
;
3002 req
= tevent_req_create(mem_ctx
, &state
,
3003 struct rpccli_lsa_RemovePrivilegesFromAccount_state
);
3007 state
->out_mem_ctx
= NULL
;
3008 state
->dispatch_recv
= cli
->dispatch_recv
;
3011 state
->orig
.in
.handle
= _handle
;
3012 state
->orig
.in
.remove_all
= _remove_all
;
3013 state
->orig
.in
.privs
= _privs
;
3015 /* Out parameters */
3018 ZERO_STRUCT(state
->orig
.out
.result
);
3020 /* make a temporary copy, that we pass to the dispatch function */
3021 state
->tmp
= state
->orig
;
3023 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3024 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
3025 NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT
,
3027 if (tevent_req_nomem(subreq
, req
)) {
3028 return tevent_req_post(req
, ev
);
3030 tevent_req_set_callback(subreq
, rpccli_lsa_RemovePrivilegesFromAccount_done
, req
);
3034 static void rpccli_lsa_RemovePrivilegesFromAccount_done(struct tevent_req
*subreq
)
3036 struct tevent_req
*req
= tevent_req_callback_data(
3037 subreq
, struct tevent_req
);
3038 struct rpccli_lsa_RemovePrivilegesFromAccount_state
*state
= tevent_req_data(
3039 req
, struct rpccli_lsa_RemovePrivilegesFromAccount_state
);
3041 TALLOC_CTX
*mem_ctx
;
3043 if (state
->out_mem_ctx
) {
3044 mem_ctx
= state
->out_mem_ctx
;
3049 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3050 TALLOC_FREE(subreq
);
3051 if (!NT_STATUS_IS_OK(status
)) {
3052 tevent_req_nterror(req
, status
);
3056 /* Copy out parameters */
3059 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3061 /* Reset temporary structure */
3062 ZERO_STRUCT(state
->tmp
);
3064 tevent_req_done(req
);
3067 NTSTATUS
rpccli_lsa_RemovePrivilegesFromAccount_recv(struct tevent_req
*req
,
3068 TALLOC_CTX
*mem_ctx
,
3071 struct rpccli_lsa_RemovePrivilegesFromAccount_state
*state
= tevent_req_data(
3072 req
, struct rpccli_lsa_RemovePrivilegesFromAccount_state
);
3075 if (tevent_req_is_nterror(req
, &status
)) {
3076 tevent_req_received(req
);
3080 /* Steal possbile out parameters to the callers context */
3081 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3084 *result
= state
->orig
.out
.result
;
3086 tevent_req_received(req
);
3087 return NT_STATUS_OK
;
3090 NTSTATUS
rpccli_lsa_RemovePrivilegesFromAccount(struct rpc_pipe_client
*cli
,
3091 TALLOC_CTX
*mem_ctx
,
3092 struct policy_handle
*handle
/* [in] [ref] */,
3093 uint8_t remove_all
/* [in] */,
3094 struct lsa_PrivilegeSet
*privs
/* [in] [unique] */)
3096 struct lsa_RemovePrivilegesFromAccount r
;
3100 r
.in
.handle
= handle
;
3101 r
.in
.remove_all
= remove_all
;
3104 status
= cli
->dispatch(cli
,
3106 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
3107 NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT
,
3110 if (!NT_STATUS_IS_OK(status
)) {
3114 if (NT_STATUS_IS_ERR(status
)) {
3118 /* Return variables */
3121 return r
.out
.result
;
3124 struct rpccli_lsa_GetQuotasForAccount_state
{
3125 struct lsa_GetQuotasForAccount orig
;
3126 struct lsa_GetQuotasForAccount tmp
;
3127 TALLOC_CTX
*out_mem_ctx
;
3128 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3131 static void rpccli_lsa_GetQuotasForAccount_done(struct tevent_req
*subreq
);
3133 struct tevent_req
*rpccli_lsa_GetQuotasForAccount_send(TALLOC_CTX
*mem_ctx
,
3134 struct tevent_context
*ev
,
3135 struct rpc_pipe_client
*cli
)
3137 struct tevent_req
*req
;
3138 struct rpccli_lsa_GetQuotasForAccount_state
*state
;
3139 struct tevent_req
*subreq
;
3141 req
= tevent_req_create(mem_ctx
, &state
,
3142 struct rpccli_lsa_GetQuotasForAccount_state
);
3146 state
->out_mem_ctx
= NULL
;
3147 state
->dispatch_recv
= cli
->dispatch_recv
;
3151 /* Out parameters */
3154 ZERO_STRUCT(state
->orig
.out
.result
);
3156 /* make a temporary copy, that we pass to the dispatch function */
3157 state
->tmp
= state
->orig
;
3159 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3160 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
3161 NDR_LSA_GETQUOTASFORACCOUNT
,
3163 if (tevent_req_nomem(subreq
, req
)) {
3164 return tevent_req_post(req
, ev
);
3166 tevent_req_set_callback(subreq
, rpccli_lsa_GetQuotasForAccount_done
, req
);
3170 static void rpccli_lsa_GetQuotasForAccount_done(struct tevent_req
*subreq
)
3172 struct tevent_req
*req
= tevent_req_callback_data(
3173 subreq
, struct tevent_req
);
3174 struct rpccli_lsa_GetQuotasForAccount_state
*state
= tevent_req_data(
3175 req
, struct rpccli_lsa_GetQuotasForAccount_state
);
3177 TALLOC_CTX
*mem_ctx
;
3179 if (state
->out_mem_ctx
) {
3180 mem_ctx
= state
->out_mem_ctx
;
3185 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3186 TALLOC_FREE(subreq
);
3187 if (!NT_STATUS_IS_OK(status
)) {
3188 tevent_req_nterror(req
, status
);
3192 /* Copy out parameters */
3195 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3197 /* Reset temporary structure */
3198 ZERO_STRUCT(state
->tmp
);
3200 tevent_req_done(req
);
3203 NTSTATUS
rpccli_lsa_GetQuotasForAccount_recv(struct tevent_req
*req
,
3204 TALLOC_CTX
*mem_ctx
,
3207 struct rpccli_lsa_GetQuotasForAccount_state
*state
= tevent_req_data(
3208 req
, struct rpccli_lsa_GetQuotasForAccount_state
);
3211 if (tevent_req_is_nterror(req
, &status
)) {
3212 tevent_req_received(req
);
3216 /* Steal possbile out parameters to the callers context */
3217 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3220 *result
= state
->orig
.out
.result
;
3222 tevent_req_received(req
);
3223 return NT_STATUS_OK
;
3226 NTSTATUS
rpccli_lsa_GetQuotasForAccount(struct rpc_pipe_client
*cli
,
3227 TALLOC_CTX
*mem_ctx
)
3229 struct lsa_GetQuotasForAccount r
;
3234 status
= cli
->dispatch(cli
,
3236 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
3237 NDR_LSA_GETQUOTASFORACCOUNT
,
3240 if (!NT_STATUS_IS_OK(status
)) {
3244 if (NT_STATUS_IS_ERR(status
)) {
3248 /* Return variables */
3251 return r
.out
.result
;
3254 struct rpccli_lsa_SetQuotasForAccount_state
{
3255 struct lsa_SetQuotasForAccount orig
;
3256 struct lsa_SetQuotasForAccount tmp
;
3257 TALLOC_CTX
*out_mem_ctx
;
3258 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3261 static void rpccli_lsa_SetQuotasForAccount_done(struct tevent_req
*subreq
);
3263 struct tevent_req
*rpccli_lsa_SetQuotasForAccount_send(TALLOC_CTX
*mem_ctx
,
3264 struct tevent_context
*ev
,
3265 struct rpc_pipe_client
*cli
)
3267 struct tevent_req
*req
;
3268 struct rpccli_lsa_SetQuotasForAccount_state
*state
;
3269 struct tevent_req
*subreq
;
3271 req
= tevent_req_create(mem_ctx
, &state
,
3272 struct rpccli_lsa_SetQuotasForAccount_state
);
3276 state
->out_mem_ctx
= NULL
;
3277 state
->dispatch_recv
= cli
->dispatch_recv
;
3281 /* Out parameters */
3284 ZERO_STRUCT(state
->orig
.out
.result
);
3286 /* make a temporary copy, that we pass to the dispatch function */
3287 state
->tmp
= state
->orig
;
3289 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3290 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
3291 NDR_LSA_SETQUOTASFORACCOUNT
,
3293 if (tevent_req_nomem(subreq
, req
)) {
3294 return tevent_req_post(req
, ev
);
3296 tevent_req_set_callback(subreq
, rpccli_lsa_SetQuotasForAccount_done
, req
);
3300 static void rpccli_lsa_SetQuotasForAccount_done(struct tevent_req
*subreq
)
3302 struct tevent_req
*req
= tevent_req_callback_data(
3303 subreq
, struct tevent_req
);
3304 struct rpccli_lsa_SetQuotasForAccount_state
*state
= tevent_req_data(
3305 req
, struct rpccli_lsa_SetQuotasForAccount_state
);
3307 TALLOC_CTX
*mem_ctx
;
3309 if (state
->out_mem_ctx
) {
3310 mem_ctx
= state
->out_mem_ctx
;
3315 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3316 TALLOC_FREE(subreq
);
3317 if (!NT_STATUS_IS_OK(status
)) {
3318 tevent_req_nterror(req
, status
);
3322 /* Copy out parameters */
3325 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3327 /* Reset temporary structure */
3328 ZERO_STRUCT(state
->tmp
);
3330 tevent_req_done(req
);
3333 NTSTATUS
rpccli_lsa_SetQuotasForAccount_recv(struct tevent_req
*req
,
3334 TALLOC_CTX
*mem_ctx
,
3337 struct rpccli_lsa_SetQuotasForAccount_state
*state
= tevent_req_data(
3338 req
, struct rpccli_lsa_SetQuotasForAccount_state
);
3341 if (tevent_req_is_nterror(req
, &status
)) {
3342 tevent_req_received(req
);
3346 /* Steal possbile out parameters to the callers context */
3347 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3350 *result
= state
->orig
.out
.result
;
3352 tevent_req_received(req
);
3353 return NT_STATUS_OK
;
3356 NTSTATUS
rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client
*cli
,
3357 TALLOC_CTX
*mem_ctx
)
3359 struct lsa_SetQuotasForAccount r
;
3364 status
= cli
->dispatch(cli
,
3366 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
3367 NDR_LSA_SETQUOTASFORACCOUNT
,
3370 if (!NT_STATUS_IS_OK(status
)) {
3374 if (NT_STATUS_IS_ERR(status
)) {
3378 /* Return variables */
3381 return r
.out
.result
;
3384 struct rpccli_lsa_GetSystemAccessAccount_state
{
3385 struct lsa_GetSystemAccessAccount orig
;
3386 struct lsa_GetSystemAccessAccount tmp
;
3387 TALLOC_CTX
*out_mem_ctx
;
3388 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3391 static void rpccli_lsa_GetSystemAccessAccount_done(struct tevent_req
*subreq
);
3393 struct tevent_req
*rpccli_lsa_GetSystemAccessAccount_send(TALLOC_CTX
*mem_ctx
,
3394 struct tevent_context
*ev
,
3395 struct rpc_pipe_client
*cli
,
3396 struct policy_handle
*_handle
/* [in] [ref] */,
3397 uint32_t *_access_mask
/* [out] [ref] */)
3399 struct tevent_req
*req
;
3400 struct rpccli_lsa_GetSystemAccessAccount_state
*state
;
3401 struct tevent_req
*subreq
;
3403 req
= tevent_req_create(mem_ctx
, &state
,
3404 struct rpccli_lsa_GetSystemAccessAccount_state
);
3408 state
->out_mem_ctx
= NULL
;
3409 state
->dispatch_recv
= cli
->dispatch_recv
;
3412 state
->orig
.in
.handle
= _handle
;
3414 /* Out parameters */
3415 state
->orig
.out
.access_mask
= _access_mask
;
3418 ZERO_STRUCT(state
->orig
.out
.result
);
3420 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3421 "rpccli_lsa_GetSystemAccessAccount_out_memory");
3422 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3423 return tevent_req_post(req
, ev
);
3426 /* make a temporary copy, that we pass to the dispatch function */
3427 state
->tmp
= state
->orig
;
3429 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3430 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
3431 NDR_LSA_GETSYSTEMACCESSACCOUNT
,
3433 if (tevent_req_nomem(subreq
, req
)) {
3434 return tevent_req_post(req
, ev
);
3436 tevent_req_set_callback(subreq
, rpccli_lsa_GetSystemAccessAccount_done
, req
);
3440 static void rpccli_lsa_GetSystemAccessAccount_done(struct tevent_req
*subreq
)
3442 struct tevent_req
*req
= tevent_req_callback_data(
3443 subreq
, struct tevent_req
);
3444 struct rpccli_lsa_GetSystemAccessAccount_state
*state
= tevent_req_data(
3445 req
, struct rpccli_lsa_GetSystemAccessAccount_state
);
3447 TALLOC_CTX
*mem_ctx
;
3449 if (state
->out_mem_ctx
) {
3450 mem_ctx
= state
->out_mem_ctx
;
3455 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3456 TALLOC_FREE(subreq
);
3457 if (!NT_STATUS_IS_OK(status
)) {
3458 tevent_req_nterror(req
, status
);
3462 /* Copy out parameters */
3463 *state
->orig
.out
.access_mask
= *state
->tmp
.out
.access_mask
;
3466 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3468 /* Reset temporary structure */
3469 ZERO_STRUCT(state
->tmp
);
3471 tevent_req_done(req
);
3474 NTSTATUS
rpccli_lsa_GetSystemAccessAccount_recv(struct tevent_req
*req
,
3475 TALLOC_CTX
*mem_ctx
,
3478 struct rpccli_lsa_GetSystemAccessAccount_state
*state
= tevent_req_data(
3479 req
, struct rpccli_lsa_GetSystemAccessAccount_state
);
3482 if (tevent_req_is_nterror(req
, &status
)) {
3483 tevent_req_received(req
);
3487 /* Steal possbile out parameters to the callers context */
3488 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3491 *result
= state
->orig
.out
.result
;
3493 tevent_req_received(req
);
3494 return NT_STATUS_OK
;
3497 NTSTATUS
rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client
*cli
,
3498 TALLOC_CTX
*mem_ctx
,
3499 struct policy_handle
*handle
/* [in] [ref] */,
3500 uint32_t *access_mask
/* [out] [ref] */)
3502 struct lsa_GetSystemAccessAccount r
;
3506 r
.in
.handle
= handle
;
3508 status
= cli
->dispatch(cli
,
3510 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
3511 NDR_LSA_GETSYSTEMACCESSACCOUNT
,
3514 if (!NT_STATUS_IS_OK(status
)) {
3518 if (NT_STATUS_IS_ERR(status
)) {
3522 /* Return variables */
3523 *access_mask
= *r
.out
.access_mask
;
3526 return r
.out
.result
;
3529 struct rpccli_lsa_SetSystemAccessAccount_state
{
3530 struct lsa_SetSystemAccessAccount orig
;
3531 struct lsa_SetSystemAccessAccount tmp
;
3532 TALLOC_CTX
*out_mem_ctx
;
3533 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3536 static void rpccli_lsa_SetSystemAccessAccount_done(struct tevent_req
*subreq
);
3538 struct tevent_req
*rpccli_lsa_SetSystemAccessAccount_send(TALLOC_CTX
*mem_ctx
,
3539 struct tevent_context
*ev
,
3540 struct rpc_pipe_client
*cli
,
3541 struct policy_handle
*_handle
/* [in] [ref] */,
3542 uint32_t _access_mask
/* [in] */)
3544 struct tevent_req
*req
;
3545 struct rpccli_lsa_SetSystemAccessAccount_state
*state
;
3546 struct tevent_req
*subreq
;
3548 req
= tevent_req_create(mem_ctx
, &state
,
3549 struct rpccli_lsa_SetSystemAccessAccount_state
);
3553 state
->out_mem_ctx
= NULL
;
3554 state
->dispatch_recv
= cli
->dispatch_recv
;
3557 state
->orig
.in
.handle
= _handle
;
3558 state
->orig
.in
.access_mask
= _access_mask
;
3560 /* Out parameters */
3563 ZERO_STRUCT(state
->orig
.out
.result
);
3565 /* make a temporary copy, that we pass to the dispatch function */
3566 state
->tmp
= state
->orig
;
3568 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3569 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
3570 NDR_LSA_SETSYSTEMACCESSACCOUNT
,
3572 if (tevent_req_nomem(subreq
, req
)) {
3573 return tevent_req_post(req
, ev
);
3575 tevent_req_set_callback(subreq
, rpccli_lsa_SetSystemAccessAccount_done
, req
);
3579 static void rpccli_lsa_SetSystemAccessAccount_done(struct tevent_req
*subreq
)
3581 struct tevent_req
*req
= tevent_req_callback_data(
3582 subreq
, struct tevent_req
);
3583 struct rpccli_lsa_SetSystemAccessAccount_state
*state
= tevent_req_data(
3584 req
, struct rpccli_lsa_SetSystemAccessAccount_state
);
3586 TALLOC_CTX
*mem_ctx
;
3588 if (state
->out_mem_ctx
) {
3589 mem_ctx
= state
->out_mem_ctx
;
3594 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3595 TALLOC_FREE(subreq
);
3596 if (!NT_STATUS_IS_OK(status
)) {
3597 tevent_req_nterror(req
, status
);
3601 /* Copy out parameters */
3604 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3606 /* Reset temporary structure */
3607 ZERO_STRUCT(state
->tmp
);
3609 tevent_req_done(req
);
3612 NTSTATUS
rpccli_lsa_SetSystemAccessAccount_recv(struct tevent_req
*req
,
3613 TALLOC_CTX
*mem_ctx
,
3616 struct rpccli_lsa_SetSystemAccessAccount_state
*state
= tevent_req_data(
3617 req
, struct rpccli_lsa_SetSystemAccessAccount_state
);
3620 if (tevent_req_is_nterror(req
, &status
)) {
3621 tevent_req_received(req
);
3625 /* Steal possbile out parameters to the callers context */
3626 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3629 *result
= state
->orig
.out
.result
;
3631 tevent_req_received(req
);
3632 return NT_STATUS_OK
;
3635 NTSTATUS
rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client
*cli
,
3636 TALLOC_CTX
*mem_ctx
,
3637 struct policy_handle
*handle
/* [in] [ref] */,
3638 uint32_t access_mask
/* [in] */)
3640 struct lsa_SetSystemAccessAccount r
;
3644 r
.in
.handle
= handle
;
3645 r
.in
.access_mask
= access_mask
;
3647 status
= cli
->dispatch(cli
,
3649 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
3650 NDR_LSA_SETSYSTEMACCESSACCOUNT
,
3653 if (!NT_STATUS_IS_OK(status
)) {
3657 if (NT_STATUS_IS_ERR(status
)) {
3661 /* Return variables */
3664 return r
.out
.result
;
3667 struct rpccli_lsa_OpenTrustedDomain_state
{
3668 struct lsa_OpenTrustedDomain orig
;
3669 struct lsa_OpenTrustedDomain tmp
;
3670 TALLOC_CTX
*out_mem_ctx
;
3671 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3674 static void rpccli_lsa_OpenTrustedDomain_done(struct tevent_req
*subreq
);
3676 struct tevent_req
*rpccli_lsa_OpenTrustedDomain_send(TALLOC_CTX
*mem_ctx
,
3677 struct tevent_context
*ev
,
3678 struct rpc_pipe_client
*cli
,
3679 struct policy_handle
*_handle
/* [in] [ref] */,
3680 struct dom_sid2
*_sid
/* [in] [ref] */,
3681 uint32_t _access_mask
/* [in] */,
3682 struct policy_handle
*_trustdom_handle
/* [out] [ref] */)
3684 struct tevent_req
*req
;
3685 struct rpccli_lsa_OpenTrustedDomain_state
*state
;
3686 struct tevent_req
*subreq
;
3688 req
= tevent_req_create(mem_ctx
, &state
,
3689 struct rpccli_lsa_OpenTrustedDomain_state
);
3693 state
->out_mem_ctx
= NULL
;
3694 state
->dispatch_recv
= cli
->dispatch_recv
;
3697 state
->orig
.in
.handle
= _handle
;
3698 state
->orig
.in
.sid
= _sid
;
3699 state
->orig
.in
.access_mask
= _access_mask
;
3701 /* Out parameters */
3702 state
->orig
.out
.trustdom_handle
= _trustdom_handle
;
3705 ZERO_STRUCT(state
->orig
.out
.result
);
3707 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3708 "rpccli_lsa_OpenTrustedDomain_out_memory");
3709 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3710 return tevent_req_post(req
, ev
);
3713 /* make a temporary copy, that we pass to the dispatch function */
3714 state
->tmp
= state
->orig
;
3716 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3717 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
3718 NDR_LSA_OPENTRUSTEDDOMAIN
,
3720 if (tevent_req_nomem(subreq
, req
)) {
3721 return tevent_req_post(req
, ev
);
3723 tevent_req_set_callback(subreq
, rpccli_lsa_OpenTrustedDomain_done
, req
);
3727 static void rpccli_lsa_OpenTrustedDomain_done(struct tevent_req
*subreq
)
3729 struct tevent_req
*req
= tevent_req_callback_data(
3730 subreq
, struct tevent_req
);
3731 struct rpccli_lsa_OpenTrustedDomain_state
*state
= tevent_req_data(
3732 req
, struct rpccli_lsa_OpenTrustedDomain_state
);
3734 TALLOC_CTX
*mem_ctx
;
3736 if (state
->out_mem_ctx
) {
3737 mem_ctx
= state
->out_mem_ctx
;
3742 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3743 TALLOC_FREE(subreq
);
3744 if (!NT_STATUS_IS_OK(status
)) {
3745 tevent_req_nterror(req
, status
);
3749 /* Copy out parameters */
3750 *state
->orig
.out
.trustdom_handle
= *state
->tmp
.out
.trustdom_handle
;
3753 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3755 /* Reset temporary structure */
3756 ZERO_STRUCT(state
->tmp
);
3758 tevent_req_done(req
);
3761 NTSTATUS
rpccli_lsa_OpenTrustedDomain_recv(struct tevent_req
*req
,
3762 TALLOC_CTX
*mem_ctx
,
3765 struct rpccli_lsa_OpenTrustedDomain_state
*state
= tevent_req_data(
3766 req
, struct rpccli_lsa_OpenTrustedDomain_state
);
3769 if (tevent_req_is_nterror(req
, &status
)) {
3770 tevent_req_received(req
);
3774 /* Steal possbile out parameters to the callers context */
3775 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3778 *result
= state
->orig
.out
.result
;
3780 tevent_req_received(req
);
3781 return NT_STATUS_OK
;
3784 NTSTATUS
rpccli_lsa_OpenTrustedDomain(struct rpc_pipe_client
*cli
,
3785 TALLOC_CTX
*mem_ctx
,
3786 struct policy_handle
*handle
/* [in] [ref] */,
3787 struct dom_sid2
*sid
/* [in] [ref] */,
3788 uint32_t access_mask
/* [in] */,
3789 struct policy_handle
*trustdom_handle
/* [out] [ref] */)
3791 struct lsa_OpenTrustedDomain r
;
3795 r
.in
.handle
= handle
;
3797 r
.in
.access_mask
= access_mask
;
3799 status
= cli
->dispatch(cli
,
3801 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
3802 NDR_LSA_OPENTRUSTEDDOMAIN
,
3805 if (!NT_STATUS_IS_OK(status
)) {
3809 if (NT_STATUS_IS_ERR(status
)) {
3813 /* Return variables */
3814 *trustdom_handle
= *r
.out
.trustdom_handle
;
3817 return r
.out
.result
;
3820 struct rpccli_lsa_QueryTrustedDomainInfo_state
{
3821 struct lsa_QueryTrustedDomainInfo orig
;
3822 struct lsa_QueryTrustedDomainInfo tmp
;
3823 TALLOC_CTX
*out_mem_ctx
;
3824 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3827 static void rpccli_lsa_QueryTrustedDomainInfo_done(struct tevent_req
*subreq
);
3829 struct tevent_req
*rpccli_lsa_QueryTrustedDomainInfo_send(TALLOC_CTX
*mem_ctx
,
3830 struct tevent_context
*ev
,
3831 struct rpc_pipe_client
*cli
,
3832 struct policy_handle
*_trustdom_handle
/* [in] [ref] */,
3833 enum lsa_TrustDomInfoEnum _level
/* [in] */,
3834 union lsa_TrustedDomainInfo
**_info
/* [out] [ref,switch_is(level)] */)
3836 struct tevent_req
*req
;
3837 struct rpccli_lsa_QueryTrustedDomainInfo_state
*state
;
3838 struct tevent_req
*subreq
;
3840 req
= tevent_req_create(mem_ctx
, &state
,
3841 struct rpccli_lsa_QueryTrustedDomainInfo_state
);
3845 state
->out_mem_ctx
= NULL
;
3846 state
->dispatch_recv
= cli
->dispatch_recv
;
3849 state
->orig
.in
.trustdom_handle
= _trustdom_handle
;
3850 state
->orig
.in
.level
= _level
;
3852 /* Out parameters */
3853 state
->orig
.out
.info
= _info
;
3856 ZERO_STRUCT(state
->orig
.out
.result
);
3858 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3859 "rpccli_lsa_QueryTrustedDomainInfo_out_memory");
3860 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3861 return tevent_req_post(req
, ev
);
3864 /* make a temporary copy, that we pass to the dispatch function */
3865 state
->tmp
= state
->orig
;
3867 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3868 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
3869 NDR_LSA_QUERYTRUSTEDDOMAININFO
,
3871 if (tevent_req_nomem(subreq
, req
)) {
3872 return tevent_req_post(req
, ev
);
3874 tevent_req_set_callback(subreq
, rpccli_lsa_QueryTrustedDomainInfo_done
, req
);
3878 static void rpccli_lsa_QueryTrustedDomainInfo_done(struct tevent_req
*subreq
)
3880 struct tevent_req
*req
= tevent_req_callback_data(
3881 subreq
, struct tevent_req
);
3882 struct rpccli_lsa_QueryTrustedDomainInfo_state
*state
= tevent_req_data(
3883 req
, struct rpccli_lsa_QueryTrustedDomainInfo_state
);
3885 TALLOC_CTX
*mem_ctx
;
3887 if (state
->out_mem_ctx
) {
3888 mem_ctx
= state
->out_mem_ctx
;
3893 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3894 TALLOC_FREE(subreq
);
3895 if (!NT_STATUS_IS_OK(status
)) {
3896 tevent_req_nterror(req
, status
);
3900 /* Copy out parameters */
3901 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
3904 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3906 /* Reset temporary structure */
3907 ZERO_STRUCT(state
->tmp
);
3909 tevent_req_done(req
);
3912 NTSTATUS
rpccli_lsa_QueryTrustedDomainInfo_recv(struct tevent_req
*req
,
3913 TALLOC_CTX
*mem_ctx
,
3916 struct rpccli_lsa_QueryTrustedDomainInfo_state
*state
= tevent_req_data(
3917 req
, struct rpccli_lsa_QueryTrustedDomainInfo_state
);
3920 if (tevent_req_is_nterror(req
, &status
)) {
3921 tevent_req_received(req
);
3925 /* Steal possbile out parameters to the callers context */
3926 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3929 *result
= state
->orig
.out
.result
;
3931 tevent_req_received(req
);
3932 return NT_STATUS_OK
;
3935 NTSTATUS
rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client
*cli
,
3936 TALLOC_CTX
*mem_ctx
,
3937 struct policy_handle
*trustdom_handle
/* [in] [ref] */,
3938 enum lsa_TrustDomInfoEnum level
/* [in] */,
3939 union lsa_TrustedDomainInfo
**info
/* [out] [ref,switch_is(level)] */)
3941 struct lsa_QueryTrustedDomainInfo r
;
3945 r
.in
.trustdom_handle
= trustdom_handle
;
3948 status
= cli
->dispatch(cli
,
3950 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
3951 NDR_LSA_QUERYTRUSTEDDOMAININFO
,
3954 if (!NT_STATUS_IS_OK(status
)) {
3958 if (NT_STATUS_IS_ERR(status
)) {
3962 /* Return variables */
3963 *info
= *r
.out
.info
;
3966 return r
.out
.result
;
3969 struct rpccli_lsa_SetInformationTrustedDomain_state
{
3970 struct lsa_SetInformationTrustedDomain orig
;
3971 struct lsa_SetInformationTrustedDomain tmp
;
3972 TALLOC_CTX
*out_mem_ctx
;
3973 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3976 static void rpccli_lsa_SetInformationTrustedDomain_done(struct tevent_req
*subreq
);
3978 struct tevent_req
*rpccli_lsa_SetInformationTrustedDomain_send(TALLOC_CTX
*mem_ctx
,
3979 struct tevent_context
*ev
,
3980 struct rpc_pipe_client
*cli
,
3981 struct policy_handle
*_trustdom_handle
/* [in] [ref] */,
3982 enum lsa_TrustDomInfoEnum _level
/* [in] */,
3983 union lsa_TrustedDomainInfo
*_info
/* [in] [ref,switch_is(level)] */)
3985 struct tevent_req
*req
;
3986 struct rpccli_lsa_SetInformationTrustedDomain_state
*state
;
3987 struct tevent_req
*subreq
;
3989 req
= tevent_req_create(mem_ctx
, &state
,
3990 struct rpccli_lsa_SetInformationTrustedDomain_state
);
3994 state
->out_mem_ctx
= NULL
;
3995 state
->dispatch_recv
= cli
->dispatch_recv
;
3998 state
->orig
.in
.trustdom_handle
= _trustdom_handle
;
3999 state
->orig
.in
.level
= _level
;
4000 state
->orig
.in
.info
= _info
;
4002 /* Out parameters */
4005 ZERO_STRUCT(state
->orig
.out
.result
);
4007 /* make a temporary copy, that we pass to the dispatch function */
4008 state
->tmp
= state
->orig
;
4010 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4011 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
4012 NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN
,
4014 if (tevent_req_nomem(subreq
, req
)) {
4015 return tevent_req_post(req
, ev
);
4017 tevent_req_set_callback(subreq
, rpccli_lsa_SetInformationTrustedDomain_done
, req
);
4021 static void rpccli_lsa_SetInformationTrustedDomain_done(struct tevent_req
*subreq
)
4023 struct tevent_req
*req
= tevent_req_callback_data(
4024 subreq
, struct tevent_req
);
4025 struct rpccli_lsa_SetInformationTrustedDomain_state
*state
= tevent_req_data(
4026 req
, struct rpccli_lsa_SetInformationTrustedDomain_state
);
4028 TALLOC_CTX
*mem_ctx
;
4030 if (state
->out_mem_ctx
) {
4031 mem_ctx
= state
->out_mem_ctx
;
4036 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4037 TALLOC_FREE(subreq
);
4038 if (!NT_STATUS_IS_OK(status
)) {
4039 tevent_req_nterror(req
, status
);
4043 /* Copy out parameters */
4046 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4048 /* Reset temporary structure */
4049 ZERO_STRUCT(state
->tmp
);
4051 tevent_req_done(req
);
4054 NTSTATUS
rpccli_lsa_SetInformationTrustedDomain_recv(struct tevent_req
*req
,
4055 TALLOC_CTX
*mem_ctx
,
4058 struct rpccli_lsa_SetInformationTrustedDomain_state
*state
= tevent_req_data(
4059 req
, struct rpccli_lsa_SetInformationTrustedDomain_state
);
4062 if (tevent_req_is_nterror(req
, &status
)) {
4063 tevent_req_received(req
);
4067 /* Steal possbile out parameters to the callers context */
4068 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4071 *result
= state
->orig
.out
.result
;
4073 tevent_req_received(req
);
4074 return NT_STATUS_OK
;
4077 NTSTATUS
rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client
*cli
,
4078 TALLOC_CTX
*mem_ctx
,
4079 struct policy_handle
*trustdom_handle
/* [in] [ref] */,
4080 enum lsa_TrustDomInfoEnum level
/* [in] */,
4081 union lsa_TrustedDomainInfo
*info
/* [in] [ref,switch_is(level)] */)
4083 struct lsa_SetInformationTrustedDomain r
;
4087 r
.in
.trustdom_handle
= trustdom_handle
;
4091 status
= cli
->dispatch(cli
,
4093 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
4094 NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN
,
4097 if (!NT_STATUS_IS_OK(status
)) {
4101 if (NT_STATUS_IS_ERR(status
)) {
4105 /* Return variables */
4108 return r
.out
.result
;
4111 struct rpccli_lsa_OpenSecret_state
{
4112 struct lsa_OpenSecret orig
;
4113 struct lsa_OpenSecret tmp
;
4114 TALLOC_CTX
*out_mem_ctx
;
4115 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4118 static void rpccli_lsa_OpenSecret_done(struct tevent_req
*subreq
);
4120 struct tevent_req
*rpccli_lsa_OpenSecret_send(TALLOC_CTX
*mem_ctx
,
4121 struct tevent_context
*ev
,
4122 struct rpc_pipe_client
*cli
,
4123 struct policy_handle
*_handle
/* [in] [ref] */,
4124 struct lsa_String _name
/* [in] */,
4125 uint32_t _access_mask
/* [in] */,
4126 struct policy_handle
*_sec_handle
/* [out] [ref] */)
4128 struct tevent_req
*req
;
4129 struct rpccli_lsa_OpenSecret_state
*state
;
4130 struct tevent_req
*subreq
;
4132 req
= tevent_req_create(mem_ctx
, &state
,
4133 struct rpccli_lsa_OpenSecret_state
);
4137 state
->out_mem_ctx
= NULL
;
4138 state
->dispatch_recv
= cli
->dispatch_recv
;
4141 state
->orig
.in
.handle
= _handle
;
4142 state
->orig
.in
.name
= _name
;
4143 state
->orig
.in
.access_mask
= _access_mask
;
4145 /* Out parameters */
4146 state
->orig
.out
.sec_handle
= _sec_handle
;
4149 ZERO_STRUCT(state
->orig
.out
.result
);
4151 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4152 "rpccli_lsa_OpenSecret_out_memory");
4153 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4154 return tevent_req_post(req
, ev
);
4157 /* make a temporary copy, that we pass to the dispatch function */
4158 state
->tmp
= state
->orig
;
4160 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4161 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
4164 if (tevent_req_nomem(subreq
, req
)) {
4165 return tevent_req_post(req
, ev
);
4167 tevent_req_set_callback(subreq
, rpccli_lsa_OpenSecret_done
, req
);
4171 static void rpccli_lsa_OpenSecret_done(struct tevent_req
*subreq
)
4173 struct tevent_req
*req
= tevent_req_callback_data(
4174 subreq
, struct tevent_req
);
4175 struct rpccli_lsa_OpenSecret_state
*state
= tevent_req_data(
4176 req
, struct rpccli_lsa_OpenSecret_state
);
4178 TALLOC_CTX
*mem_ctx
;
4180 if (state
->out_mem_ctx
) {
4181 mem_ctx
= state
->out_mem_ctx
;
4186 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4187 TALLOC_FREE(subreq
);
4188 if (!NT_STATUS_IS_OK(status
)) {
4189 tevent_req_nterror(req
, status
);
4193 /* Copy out parameters */
4194 *state
->orig
.out
.sec_handle
= *state
->tmp
.out
.sec_handle
;
4197 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4199 /* Reset temporary structure */
4200 ZERO_STRUCT(state
->tmp
);
4202 tevent_req_done(req
);
4205 NTSTATUS
rpccli_lsa_OpenSecret_recv(struct tevent_req
*req
,
4206 TALLOC_CTX
*mem_ctx
,
4209 struct rpccli_lsa_OpenSecret_state
*state
= tevent_req_data(
4210 req
, struct rpccli_lsa_OpenSecret_state
);
4213 if (tevent_req_is_nterror(req
, &status
)) {
4214 tevent_req_received(req
);
4218 /* Steal possbile out parameters to the callers context */
4219 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4222 *result
= state
->orig
.out
.result
;
4224 tevent_req_received(req
);
4225 return NT_STATUS_OK
;
4228 NTSTATUS
rpccli_lsa_OpenSecret(struct rpc_pipe_client
*cli
,
4229 TALLOC_CTX
*mem_ctx
,
4230 struct policy_handle
*handle
/* [in] [ref] */,
4231 struct lsa_String name
/* [in] */,
4232 uint32_t access_mask
/* [in] */,
4233 struct policy_handle
*sec_handle
/* [out] [ref] */)
4235 struct lsa_OpenSecret r
;
4239 r
.in
.handle
= handle
;
4241 r
.in
.access_mask
= access_mask
;
4243 status
= cli
->dispatch(cli
,
4245 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
4249 if (!NT_STATUS_IS_OK(status
)) {
4253 if (NT_STATUS_IS_ERR(status
)) {
4257 /* Return variables */
4258 *sec_handle
= *r
.out
.sec_handle
;
4261 return r
.out
.result
;
4264 struct rpccli_lsa_SetSecret_state
{
4265 struct lsa_SetSecret orig
;
4266 struct lsa_SetSecret tmp
;
4267 TALLOC_CTX
*out_mem_ctx
;
4268 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4271 static void rpccli_lsa_SetSecret_done(struct tevent_req
*subreq
);
4273 struct tevent_req
*rpccli_lsa_SetSecret_send(TALLOC_CTX
*mem_ctx
,
4274 struct tevent_context
*ev
,
4275 struct rpc_pipe_client
*cli
,
4276 struct policy_handle
*_sec_handle
/* [in] [ref] */,
4277 struct lsa_DATA_BUF
*_new_val
/* [in] [unique] */,
4278 struct lsa_DATA_BUF
*_old_val
/* [in] [unique] */)
4280 struct tevent_req
*req
;
4281 struct rpccli_lsa_SetSecret_state
*state
;
4282 struct tevent_req
*subreq
;
4284 req
= tevent_req_create(mem_ctx
, &state
,
4285 struct rpccli_lsa_SetSecret_state
);
4289 state
->out_mem_ctx
= NULL
;
4290 state
->dispatch_recv
= cli
->dispatch_recv
;
4293 state
->orig
.in
.sec_handle
= _sec_handle
;
4294 state
->orig
.in
.new_val
= _new_val
;
4295 state
->orig
.in
.old_val
= _old_val
;
4297 /* Out parameters */
4300 ZERO_STRUCT(state
->orig
.out
.result
);
4302 /* make a temporary copy, that we pass to the dispatch function */
4303 state
->tmp
= state
->orig
;
4305 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4306 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
4309 if (tevent_req_nomem(subreq
, req
)) {
4310 return tevent_req_post(req
, ev
);
4312 tevent_req_set_callback(subreq
, rpccli_lsa_SetSecret_done
, req
);
4316 static void rpccli_lsa_SetSecret_done(struct tevent_req
*subreq
)
4318 struct tevent_req
*req
= tevent_req_callback_data(
4319 subreq
, struct tevent_req
);
4320 struct rpccli_lsa_SetSecret_state
*state
= tevent_req_data(
4321 req
, struct rpccli_lsa_SetSecret_state
);
4323 TALLOC_CTX
*mem_ctx
;
4325 if (state
->out_mem_ctx
) {
4326 mem_ctx
= state
->out_mem_ctx
;
4331 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4332 TALLOC_FREE(subreq
);
4333 if (!NT_STATUS_IS_OK(status
)) {
4334 tevent_req_nterror(req
, status
);
4338 /* Copy out parameters */
4341 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4343 /* Reset temporary structure */
4344 ZERO_STRUCT(state
->tmp
);
4346 tevent_req_done(req
);
4349 NTSTATUS
rpccli_lsa_SetSecret_recv(struct tevent_req
*req
,
4350 TALLOC_CTX
*mem_ctx
,
4353 struct rpccli_lsa_SetSecret_state
*state
= tevent_req_data(
4354 req
, struct rpccli_lsa_SetSecret_state
);
4357 if (tevent_req_is_nterror(req
, &status
)) {
4358 tevent_req_received(req
);
4362 /* Steal possbile out parameters to the callers context */
4363 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4366 *result
= state
->orig
.out
.result
;
4368 tevent_req_received(req
);
4369 return NT_STATUS_OK
;
4372 NTSTATUS
rpccli_lsa_SetSecret(struct rpc_pipe_client
*cli
,
4373 TALLOC_CTX
*mem_ctx
,
4374 struct policy_handle
*sec_handle
/* [in] [ref] */,
4375 struct lsa_DATA_BUF
*new_val
/* [in] [unique] */,
4376 struct lsa_DATA_BUF
*old_val
/* [in] [unique] */)
4378 struct lsa_SetSecret r
;
4382 r
.in
.sec_handle
= sec_handle
;
4383 r
.in
.new_val
= new_val
;
4384 r
.in
.old_val
= old_val
;
4386 status
= cli
->dispatch(cli
,
4388 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
4392 if (!NT_STATUS_IS_OK(status
)) {
4396 if (NT_STATUS_IS_ERR(status
)) {
4400 /* Return variables */
4403 return r
.out
.result
;
4406 struct rpccli_lsa_QuerySecret_state
{
4407 struct lsa_QuerySecret orig
;
4408 struct lsa_QuerySecret tmp
;
4409 TALLOC_CTX
*out_mem_ctx
;
4410 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4413 static void rpccli_lsa_QuerySecret_done(struct tevent_req
*subreq
);
4415 struct tevent_req
*rpccli_lsa_QuerySecret_send(TALLOC_CTX
*mem_ctx
,
4416 struct tevent_context
*ev
,
4417 struct rpc_pipe_client
*cli
,
4418 struct policy_handle
*_sec_handle
/* [in] [ref] */,
4419 struct lsa_DATA_BUF_PTR
*_new_val
/* [in,out] [unique] */,
4420 NTTIME
*_new_mtime
/* [in,out] [unique] */,
4421 struct lsa_DATA_BUF_PTR
*_old_val
/* [in,out] [unique] */,
4422 NTTIME
*_old_mtime
/* [in,out] [unique] */)
4424 struct tevent_req
*req
;
4425 struct rpccli_lsa_QuerySecret_state
*state
;
4426 struct tevent_req
*subreq
;
4428 req
= tevent_req_create(mem_ctx
, &state
,
4429 struct rpccli_lsa_QuerySecret_state
);
4433 state
->out_mem_ctx
= NULL
;
4434 state
->dispatch_recv
= cli
->dispatch_recv
;
4437 state
->orig
.in
.sec_handle
= _sec_handle
;
4438 state
->orig
.in
.new_val
= _new_val
;
4439 state
->orig
.in
.new_mtime
= _new_mtime
;
4440 state
->orig
.in
.old_val
= _old_val
;
4441 state
->orig
.in
.old_mtime
= _old_mtime
;
4443 /* Out parameters */
4444 state
->orig
.out
.new_val
= _new_val
;
4445 state
->orig
.out
.new_mtime
= _new_mtime
;
4446 state
->orig
.out
.old_val
= _old_val
;
4447 state
->orig
.out
.old_mtime
= _old_mtime
;
4450 ZERO_STRUCT(state
->orig
.out
.result
);
4452 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4453 "rpccli_lsa_QuerySecret_out_memory");
4454 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4455 return tevent_req_post(req
, ev
);
4458 /* make a temporary copy, that we pass to the dispatch function */
4459 state
->tmp
= state
->orig
;
4461 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4462 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
4463 NDR_LSA_QUERYSECRET
,
4465 if (tevent_req_nomem(subreq
, req
)) {
4466 return tevent_req_post(req
, ev
);
4468 tevent_req_set_callback(subreq
, rpccli_lsa_QuerySecret_done
, req
);
4472 static void rpccli_lsa_QuerySecret_done(struct tevent_req
*subreq
)
4474 struct tevent_req
*req
= tevent_req_callback_data(
4475 subreq
, struct tevent_req
);
4476 struct rpccli_lsa_QuerySecret_state
*state
= tevent_req_data(
4477 req
, struct rpccli_lsa_QuerySecret_state
);
4479 TALLOC_CTX
*mem_ctx
;
4481 if (state
->out_mem_ctx
) {
4482 mem_ctx
= state
->out_mem_ctx
;
4487 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4488 TALLOC_FREE(subreq
);
4489 if (!NT_STATUS_IS_OK(status
)) {
4490 tevent_req_nterror(req
, status
);
4494 /* Copy out parameters */
4495 if (state
->orig
.out
.new_val
&& state
->tmp
.out
.new_val
) {
4496 *state
->orig
.out
.new_val
= *state
->tmp
.out
.new_val
;
4498 if (state
->orig
.out
.new_mtime
&& state
->tmp
.out
.new_mtime
) {
4499 *state
->orig
.out
.new_mtime
= *state
->tmp
.out
.new_mtime
;
4501 if (state
->orig
.out
.old_val
&& state
->tmp
.out
.old_val
) {
4502 *state
->orig
.out
.old_val
= *state
->tmp
.out
.old_val
;
4504 if (state
->orig
.out
.old_mtime
&& state
->tmp
.out
.old_mtime
) {
4505 *state
->orig
.out
.old_mtime
= *state
->tmp
.out
.old_mtime
;
4509 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4511 /* Reset temporary structure */
4512 ZERO_STRUCT(state
->tmp
);
4514 tevent_req_done(req
);
4517 NTSTATUS
rpccli_lsa_QuerySecret_recv(struct tevent_req
*req
,
4518 TALLOC_CTX
*mem_ctx
,
4521 struct rpccli_lsa_QuerySecret_state
*state
= tevent_req_data(
4522 req
, struct rpccli_lsa_QuerySecret_state
);
4525 if (tevent_req_is_nterror(req
, &status
)) {
4526 tevent_req_received(req
);
4530 /* Steal possbile out parameters to the callers context */
4531 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4534 *result
= state
->orig
.out
.result
;
4536 tevent_req_received(req
);
4537 return NT_STATUS_OK
;
4540 NTSTATUS
rpccli_lsa_QuerySecret(struct rpc_pipe_client
*cli
,
4541 TALLOC_CTX
*mem_ctx
,
4542 struct policy_handle
*sec_handle
/* [in] [ref] */,
4543 struct lsa_DATA_BUF_PTR
*new_val
/* [in,out] [unique] */,
4544 NTTIME
*new_mtime
/* [in,out] [unique] */,
4545 struct lsa_DATA_BUF_PTR
*old_val
/* [in,out] [unique] */,
4546 NTTIME
*old_mtime
/* [in,out] [unique] */)
4548 struct lsa_QuerySecret r
;
4552 r
.in
.sec_handle
= sec_handle
;
4553 r
.in
.new_val
= new_val
;
4554 r
.in
.new_mtime
= new_mtime
;
4555 r
.in
.old_val
= old_val
;
4556 r
.in
.old_mtime
= old_mtime
;
4558 status
= cli
->dispatch(cli
,
4560 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
4561 NDR_LSA_QUERYSECRET
,
4564 if (!NT_STATUS_IS_OK(status
)) {
4568 if (NT_STATUS_IS_ERR(status
)) {
4572 /* Return variables */
4573 if (new_val
&& r
.out
.new_val
) {
4574 *new_val
= *r
.out
.new_val
;
4576 if (new_mtime
&& r
.out
.new_mtime
) {
4577 *new_mtime
= *r
.out
.new_mtime
;
4579 if (old_val
&& r
.out
.old_val
) {
4580 *old_val
= *r
.out
.old_val
;
4582 if (old_mtime
&& r
.out
.old_mtime
) {
4583 *old_mtime
= *r
.out
.old_mtime
;
4587 return r
.out
.result
;
4590 struct rpccli_lsa_LookupPrivValue_state
{
4591 struct lsa_LookupPrivValue orig
;
4592 struct lsa_LookupPrivValue tmp
;
4593 TALLOC_CTX
*out_mem_ctx
;
4594 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4597 static void rpccli_lsa_LookupPrivValue_done(struct tevent_req
*subreq
);
4599 struct tevent_req
*rpccli_lsa_LookupPrivValue_send(TALLOC_CTX
*mem_ctx
,
4600 struct tevent_context
*ev
,
4601 struct rpc_pipe_client
*cli
,
4602 struct policy_handle
*_handle
/* [in] [ref] */,
4603 struct lsa_String
*_name
/* [in] [ref] */,
4604 struct lsa_LUID
*_luid
/* [out] [ref] */)
4606 struct tevent_req
*req
;
4607 struct rpccli_lsa_LookupPrivValue_state
*state
;
4608 struct tevent_req
*subreq
;
4610 req
= tevent_req_create(mem_ctx
, &state
,
4611 struct rpccli_lsa_LookupPrivValue_state
);
4615 state
->out_mem_ctx
= NULL
;
4616 state
->dispatch_recv
= cli
->dispatch_recv
;
4619 state
->orig
.in
.handle
= _handle
;
4620 state
->orig
.in
.name
= _name
;
4622 /* Out parameters */
4623 state
->orig
.out
.luid
= _luid
;
4626 ZERO_STRUCT(state
->orig
.out
.result
);
4628 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4629 "rpccli_lsa_LookupPrivValue_out_memory");
4630 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4631 return tevent_req_post(req
, ev
);
4634 /* make a temporary copy, that we pass to the dispatch function */
4635 state
->tmp
= state
->orig
;
4637 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4638 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
4639 NDR_LSA_LOOKUPPRIVVALUE
,
4641 if (tevent_req_nomem(subreq
, req
)) {
4642 return tevent_req_post(req
, ev
);
4644 tevent_req_set_callback(subreq
, rpccli_lsa_LookupPrivValue_done
, req
);
4648 static void rpccli_lsa_LookupPrivValue_done(struct tevent_req
*subreq
)
4650 struct tevent_req
*req
= tevent_req_callback_data(
4651 subreq
, struct tevent_req
);
4652 struct rpccli_lsa_LookupPrivValue_state
*state
= tevent_req_data(
4653 req
, struct rpccli_lsa_LookupPrivValue_state
);
4655 TALLOC_CTX
*mem_ctx
;
4657 if (state
->out_mem_ctx
) {
4658 mem_ctx
= state
->out_mem_ctx
;
4663 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4664 TALLOC_FREE(subreq
);
4665 if (!NT_STATUS_IS_OK(status
)) {
4666 tevent_req_nterror(req
, status
);
4670 /* Copy out parameters */
4671 *state
->orig
.out
.luid
= *state
->tmp
.out
.luid
;
4674 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4676 /* Reset temporary structure */
4677 ZERO_STRUCT(state
->tmp
);
4679 tevent_req_done(req
);
4682 NTSTATUS
rpccli_lsa_LookupPrivValue_recv(struct tevent_req
*req
,
4683 TALLOC_CTX
*mem_ctx
,
4686 struct rpccli_lsa_LookupPrivValue_state
*state
= tevent_req_data(
4687 req
, struct rpccli_lsa_LookupPrivValue_state
);
4690 if (tevent_req_is_nterror(req
, &status
)) {
4691 tevent_req_received(req
);
4695 /* Steal possbile out parameters to the callers context */
4696 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4699 *result
= state
->orig
.out
.result
;
4701 tevent_req_received(req
);
4702 return NT_STATUS_OK
;
4705 NTSTATUS
rpccli_lsa_LookupPrivValue(struct rpc_pipe_client
*cli
,
4706 TALLOC_CTX
*mem_ctx
,
4707 struct policy_handle
*handle
/* [in] [ref] */,
4708 struct lsa_String
*name
/* [in] [ref] */,
4709 struct lsa_LUID
*luid
/* [out] [ref] */)
4711 struct lsa_LookupPrivValue r
;
4715 r
.in
.handle
= handle
;
4718 status
= cli
->dispatch(cli
,
4720 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
4721 NDR_LSA_LOOKUPPRIVVALUE
,
4724 if (!NT_STATUS_IS_OK(status
)) {
4728 if (NT_STATUS_IS_ERR(status
)) {
4732 /* Return variables */
4733 *luid
= *r
.out
.luid
;
4736 return r
.out
.result
;
4739 struct rpccli_lsa_LookupPrivName_state
{
4740 struct lsa_LookupPrivName orig
;
4741 struct lsa_LookupPrivName tmp
;
4742 TALLOC_CTX
*out_mem_ctx
;
4743 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4746 static void rpccli_lsa_LookupPrivName_done(struct tevent_req
*subreq
);
4748 struct tevent_req
*rpccli_lsa_LookupPrivName_send(TALLOC_CTX
*mem_ctx
,
4749 struct tevent_context
*ev
,
4750 struct rpc_pipe_client
*cli
,
4751 struct policy_handle
*_handle
/* [in] [ref] */,
4752 struct lsa_LUID
*_luid
/* [in] [ref] */,
4753 struct lsa_StringLarge
**_name
/* [out] [ref] */)
4755 struct tevent_req
*req
;
4756 struct rpccli_lsa_LookupPrivName_state
*state
;
4757 struct tevent_req
*subreq
;
4759 req
= tevent_req_create(mem_ctx
, &state
,
4760 struct rpccli_lsa_LookupPrivName_state
);
4764 state
->out_mem_ctx
= NULL
;
4765 state
->dispatch_recv
= cli
->dispatch_recv
;
4768 state
->orig
.in
.handle
= _handle
;
4769 state
->orig
.in
.luid
= _luid
;
4771 /* Out parameters */
4772 state
->orig
.out
.name
= _name
;
4775 ZERO_STRUCT(state
->orig
.out
.result
);
4777 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4778 "rpccli_lsa_LookupPrivName_out_memory");
4779 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4780 return tevent_req_post(req
, ev
);
4783 /* make a temporary copy, that we pass to the dispatch function */
4784 state
->tmp
= state
->orig
;
4786 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4787 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
4788 NDR_LSA_LOOKUPPRIVNAME
,
4790 if (tevent_req_nomem(subreq
, req
)) {
4791 return tevent_req_post(req
, ev
);
4793 tevent_req_set_callback(subreq
, rpccli_lsa_LookupPrivName_done
, req
);
4797 static void rpccli_lsa_LookupPrivName_done(struct tevent_req
*subreq
)
4799 struct tevent_req
*req
= tevent_req_callback_data(
4800 subreq
, struct tevent_req
);
4801 struct rpccli_lsa_LookupPrivName_state
*state
= tevent_req_data(
4802 req
, struct rpccli_lsa_LookupPrivName_state
);
4804 TALLOC_CTX
*mem_ctx
;
4806 if (state
->out_mem_ctx
) {
4807 mem_ctx
= state
->out_mem_ctx
;
4812 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4813 TALLOC_FREE(subreq
);
4814 if (!NT_STATUS_IS_OK(status
)) {
4815 tevent_req_nterror(req
, status
);
4819 /* Copy out parameters */
4820 *state
->orig
.out
.name
= *state
->tmp
.out
.name
;
4823 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4825 /* Reset temporary structure */
4826 ZERO_STRUCT(state
->tmp
);
4828 tevent_req_done(req
);
4831 NTSTATUS
rpccli_lsa_LookupPrivName_recv(struct tevent_req
*req
,
4832 TALLOC_CTX
*mem_ctx
,
4835 struct rpccli_lsa_LookupPrivName_state
*state
= tevent_req_data(
4836 req
, struct rpccli_lsa_LookupPrivName_state
);
4839 if (tevent_req_is_nterror(req
, &status
)) {
4840 tevent_req_received(req
);
4844 /* Steal possbile out parameters to the callers context */
4845 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4848 *result
= state
->orig
.out
.result
;
4850 tevent_req_received(req
);
4851 return NT_STATUS_OK
;
4854 NTSTATUS
rpccli_lsa_LookupPrivName(struct rpc_pipe_client
*cli
,
4855 TALLOC_CTX
*mem_ctx
,
4856 struct policy_handle
*handle
/* [in] [ref] */,
4857 struct lsa_LUID
*luid
/* [in] [ref] */,
4858 struct lsa_StringLarge
**name
/* [out] [ref] */)
4860 struct lsa_LookupPrivName r
;
4864 r
.in
.handle
= handle
;
4867 status
= cli
->dispatch(cli
,
4869 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
4870 NDR_LSA_LOOKUPPRIVNAME
,
4873 if (!NT_STATUS_IS_OK(status
)) {
4877 if (NT_STATUS_IS_ERR(status
)) {
4881 /* Return variables */
4882 *name
= *r
.out
.name
;
4885 return r
.out
.result
;
4888 struct rpccli_lsa_LookupPrivDisplayName_state
{
4889 struct lsa_LookupPrivDisplayName orig
;
4890 struct lsa_LookupPrivDisplayName tmp
;
4891 TALLOC_CTX
*out_mem_ctx
;
4892 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4895 static void rpccli_lsa_LookupPrivDisplayName_done(struct tevent_req
*subreq
);
4897 struct tevent_req
*rpccli_lsa_LookupPrivDisplayName_send(TALLOC_CTX
*mem_ctx
,
4898 struct tevent_context
*ev
,
4899 struct rpc_pipe_client
*cli
,
4900 struct policy_handle
*_handle
/* [in] [ref] */,
4901 struct lsa_String
*_name
/* [in] [ref] */,
4902 uint16_t _language_id
/* [in] */,
4903 uint16_t _language_id_sys
/* [in] */,
4904 struct lsa_StringLarge
**_disp_name
/* [out] [ref] */,
4905 uint16_t *_returned_language_id
/* [out] [ref] */)
4907 struct tevent_req
*req
;
4908 struct rpccli_lsa_LookupPrivDisplayName_state
*state
;
4909 struct tevent_req
*subreq
;
4911 req
= tevent_req_create(mem_ctx
, &state
,
4912 struct rpccli_lsa_LookupPrivDisplayName_state
);
4916 state
->out_mem_ctx
= NULL
;
4917 state
->dispatch_recv
= cli
->dispatch_recv
;
4920 state
->orig
.in
.handle
= _handle
;
4921 state
->orig
.in
.name
= _name
;
4922 state
->orig
.in
.language_id
= _language_id
;
4923 state
->orig
.in
.language_id_sys
= _language_id_sys
;
4925 /* Out parameters */
4926 state
->orig
.out
.disp_name
= _disp_name
;
4927 state
->orig
.out
.returned_language_id
= _returned_language_id
;
4930 ZERO_STRUCT(state
->orig
.out
.result
);
4932 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4933 "rpccli_lsa_LookupPrivDisplayName_out_memory");
4934 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4935 return tevent_req_post(req
, ev
);
4938 /* make a temporary copy, that we pass to the dispatch function */
4939 state
->tmp
= state
->orig
;
4941 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4942 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
4943 NDR_LSA_LOOKUPPRIVDISPLAYNAME
,
4945 if (tevent_req_nomem(subreq
, req
)) {
4946 return tevent_req_post(req
, ev
);
4948 tevent_req_set_callback(subreq
, rpccli_lsa_LookupPrivDisplayName_done
, req
);
4952 static void rpccli_lsa_LookupPrivDisplayName_done(struct tevent_req
*subreq
)
4954 struct tevent_req
*req
= tevent_req_callback_data(
4955 subreq
, struct tevent_req
);
4956 struct rpccli_lsa_LookupPrivDisplayName_state
*state
= tevent_req_data(
4957 req
, struct rpccli_lsa_LookupPrivDisplayName_state
);
4959 TALLOC_CTX
*mem_ctx
;
4961 if (state
->out_mem_ctx
) {
4962 mem_ctx
= state
->out_mem_ctx
;
4967 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4968 TALLOC_FREE(subreq
);
4969 if (!NT_STATUS_IS_OK(status
)) {
4970 tevent_req_nterror(req
, status
);
4974 /* Copy out parameters */
4975 *state
->orig
.out
.disp_name
= *state
->tmp
.out
.disp_name
;
4976 *state
->orig
.out
.returned_language_id
= *state
->tmp
.out
.returned_language_id
;
4979 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4981 /* Reset temporary structure */
4982 ZERO_STRUCT(state
->tmp
);
4984 tevent_req_done(req
);
4987 NTSTATUS
rpccli_lsa_LookupPrivDisplayName_recv(struct tevent_req
*req
,
4988 TALLOC_CTX
*mem_ctx
,
4991 struct rpccli_lsa_LookupPrivDisplayName_state
*state
= tevent_req_data(
4992 req
, struct rpccli_lsa_LookupPrivDisplayName_state
);
4995 if (tevent_req_is_nterror(req
, &status
)) {
4996 tevent_req_received(req
);
5000 /* Steal possbile out parameters to the callers context */
5001 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5004 *result
= state
->orig
.out
.result
;
5006 tevent_req_received(req
);
5007 return NT_STATUS_OK
;
5010 NTSTATUS
rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client
*cli
,
5011 TALLOC_CTX
*mem_ctx
,
5012 struct policy_handle
*handle
/* [in] [ref] */,
5013 struct lsa_String
*name
/* [in] [ref] */,
5014 uint16_t language_id
/* [in] */,
5015 uint16_t language_id_sys
/* [in] */,
5016 struct lsa_StringLarge
**disp_name
/* [out] [ref] */,
5017 uint16_t *returned_language_id
/* [out] [ref] */)
5019 struct lsa_LookupPrivDisplayName r
;
5023 r
.in
.handle
= handle
;
5025 r
.in
.language_id
= language_id
;
5026 r
.in
.language_id_sys
= language_id_sys
;
5028 status
= cli
->dispatch(cli
,
5030 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
5031 NDR_LSA_LOOKUPPRIVDISPLAYNAME
,
5034 if (!NT_STATUS_IS_OK(status
)) {
5038 if (NT_STATUS_IS_ERR(status
)) {
5042 /* Return variables */
5043 *disp_name
= *r
.out
.disp_name
;
5044 *returned_language_id
= *r
.out
.returned_language_id
;
5047 return r
.out
.result
;
5050 struct rpccli_lsa_DeleteObject_state
{
5051 struct lsa_DeleteObject orig
;
5052 struct lsa_DeleteObject tmp
;
5053 TALLOC_CTX
*out_mem_ctx
;
5054 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5057 static void rpccli_lsa_DeleteObject_done(struct tevent_req
*subreq
);
5059 struct tevent_req
*rpccli_lsa_DeleteObject_send(TALLOC_CTX
*mem_ctx
,
5060 struct tevent_context
*ev
,
5061 struct rpc_pipe_client
*cli
,
5062 struct policy_handle
*_handle
/* [in,out] [ref] */)
5064 struct tevent_req
*req
;
5065 struct rpccli_lsa_DeleteObject_state
*state
;
5066 struct tevent_req
*subreq
;
5068 req
= tevent_req_create(mem_ctx
, &state
,
5069 struct rpccli_lsa_DeleteObject_state
);
5073 state
->out_mem_ctx
= NULL
;
5074 state
->dispatch_recv
= cli
->dispatch_recv
;
5077 state
->orig
.in
.handle
= _handle
;
5079 /* Out parameters */
5080 state
->orig
.out
.handle
= _handle
;
5083 ZERO_STRUCT(state
->orig
.out
.result
);
5085 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5086 "rpccli_lsa_DeleteObject_out_memory");
5087 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5088 return tevent_req_post(req
, ev
);
5091 /* make a temporary copy, that we pass to the dispatch function */
5092 state
->tmp
= state
->orig
;
5094 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5095 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
5096 NDR_LSA_DELETEOBJECT
,
5098 if (tevent_req_nomem(subreq
, req
)) {
5099 return tevent_req_post(req
, ev
);
5101 tevent_req_set_callback(subreq
, rpccli_lsa_DeleteObject_done
, req
);
5105 static void rpccli_lsa_DeleteObject_done(struct tevent_req
*subreq
)
5107 struct tevent_req
*req
= tevent_req_callback_data(
5108 subreq
, struct tevent_req
);
5109 struct rpccli_lsa_DeleteObject_state
*state
= tevent_req_data(
5110 req
, struct rpccli_lsa_DeleteObject_state
);
5112 TALLOC_CTX
*mem_ctx
;
5114 if (state
->out_mem_ctx
) {
5115 mem_ctx
= state
->out_mem_ctx
;
5120 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5121 TALLOC_FREE(subreq
);
5122 if (!NT_STATUS_IS_OK(status
)) {
5123 tevent_req_nterror(req
, status
);
5127 /* Copy out parameters */
5128 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
5131 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5133 /* Reset temporary structure */
5134 ZERO_STRUCT(state
->tmp
);
5136 tevent_req_done(req
);
5139 NTSTATUS
rpccli_lsa_DeleteObject_recv(struct tevent_req
*req
,
5140 TALLOC_CTX
*mem_ctx
,
5143 struct rpccli_lsa_DeleteObject_state
*state
= tevent_req_data(
5144 req
, struct rpccli_lsa_DeleteObject_state
);
5147 if (tevent_req_is_nterror(req
, &status
)) {
5148 tevent_req_received(req
);
5152 /* Steal possbile out parameters to the callers context */
5153 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5156 *result
= state
->orig
.out
.result
;
5158 tevent_req_received(req
);
5159 return NT_STATUS_OK
;
5162 NTSTATUS
rpccli_lsa_DeleteObject(struct rpc_pipe_client
*cli
,
5163 TALLOC_CTX
*mem_ctx
,
5164 struct policy_handle
*handle
/* [in,out] [ref] */)
5166 struct lsa_DeleteObject r
;
5170 r
.in
.handle
= handle
;
5172 status
= cli
->dispatch(cli
,
5174 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
5175 NDR_LSA_DELETEOBJECT
,
5178 if (!NT_STATUS_IS_OK(status
)) {
5182 if (NT_STATUS_IS_ERR(status
)) {
5186 /* Return variables */
5187 *handle
= *r
.out
.handle
;
5190 return r
.out
.result
;
5193 struct rpccli_lsa_EnumAccountsWithUserRight_state
{
5194 struct lsa_EnumAccountsWithUserRight orig
;
5195 struct lsa_EnumAccountsWithUserRight tmp
;
5196 TALLOC_CTX
*out_mem_ctx
;
5197 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5200 static void rpccli_lsa_EnumAccountsWithUserRight_done(struct tevent_req
*subreq
);
5202 struct tevent_req
*rpccli_lsa_EnumAccountsWithUserRight_send(TALLOC_CTX
*mem_ctx
,
5203 struct tevent_context
*ev
,
5204 struct rpc_pipe_client
*cli
,
5205 struct policy_handle
*_handle
/* [in] [ref] */,
5206 struct lsa_String
*_name
/* [in] [unique] */,
5207 struct lsa_SidArray
*_sids
/* [out] [ref] */)
5209 struct tevent_req
*req
;
5210 struct rpccli_lsa_EnumAccountsWithUserRight_state
*state
;
5211 struct tevent_req
*subreq
;
5213 req
= tevent_req_create(mem_ctx
, &state
,
5214 struct rpccli_lsa_EnumAccountsWithUserRight_state
);
5218 state
->out_mem_ctx
= NULL
;
5219 state
->dispatch_recv
= cli
->dispatch_recv
;
5222 state
->orig
.in
.handle
= _handle
;
5223 state
->orig
.in
.name
= _name
;
5225 /* Out parameters */
5226 state
->orig
.out
.sids
= _sids
;
5229 ZERO_STRUCT(state
->orig
.out
.result
);
5231 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5232 "rpccli_lsa_EnumAccountsWithUserRight_out_memory");
5233 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5234 return tevent_req_post(req
, ev
);
5237 /* make a temporary copy, that we pass to the dispatch function */
5238 state
->tmp
= state
->orig
;
5240 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5241 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
5242 NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT
,
5244 if (tevent_req_nomem(subreq
, req
)) {
5245 return tevent_req_post(req
, ev
);
5247 tevent_req_set_callback(subreq
, rpccli_lsa_EnumAccountsWithUserRight_done
, req
);
5251 static void rpccli_lsa_EnumAccountsWithUserRight_done(struct tevent_req
*subreq
)
5253 struct tevent_req
*req
= tevent_req_callback_data(
5254 subreq
, struct tevent_req
);
5255 struct rpccli_lsa_EnumAccountsWithUserRight_state
*state
= tevent_req_data(
5256 req
, struct rpccli_lsa_EnumAccountsWithUserRight_state
);
5258 TALLOC_CTX
*mem_ctx
;
5260 if (state
->out_mem_ctx
) {
5261 mem_ctx
= state
->out_mem_ctx
;
5266 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5267 TALLOC_FREE(subreq
);
5268 if (!NT_STATUS_IS_OK(status
)) {
5269 tevent_req_nterror(req
, status
);
5273 /* Copy out parameters */
5274 *state
->orig
.out
.sids
= *state
->tmp
.out
.sids
;
5277 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5279 /* Reset temporary structure */
5280 ZERO_STRUCT(state
->tmp
);
5282 tevent_req_done(req
);
5285 NTSTATUS
rpccli_lsa_EnumAccountsWithUserRight_recv(struct tevent_req
*req
,
5286 TALLOC_CTX
*mem_ctx
,
5289 struct rpccli_lsa_EnumAccountsWithUserRight_state
*state
= tevent_req_data(
5290 req
, struct rpccli_lsa_EnumAccountsWithUserRight_state
);
5293 if (tevent_req_is_nterror(req
, &status
)) {
5294 tevent_req_received(req
);
5298 /* Steal possbile out parameters to the callers context */
5299 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5302 *result
= state
->orig
.out
.result
;
5304 tevent_req_received(req
);
5305 return NT_STATUS_OK
;
5308 NTSTATUS
rpccli_lsa_EnumAccountsWithUserRight(struct rpc_pipe_client
*cli
,
5309 TALLOC_CTX
*mem_ctx
,
5310 struct policy_handle
*handle
/* [in] [ref] */,
5311 struct lsa_String
*name
/* [in] [unique] */,
5312 struct lsa_SidArray
*sids
/* [out] [ref] */)
5314 struct lsa_EnumAccountsWithUserRight r
;
5318 r
.in
.handle
= handle
;
5321 status
= cli
->dispatch(cli
,
5323 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
5324 NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT
,
5327 if (!NT_STATUS_IS_OK(status
)) {
5331 if (NT_STATUS_IS_ERR(status
)) {
5335 /* Return variables */
5336 *sids
= *r
.out
.sids
;
5339 return r
.out
.result
;
5342 struct rpccli_lsa_EnumAccountRights_state
{
5343 struct lsa_EnumAccountRights orig
;
5344 struct lsa_EnumAccountRights tmp
;
5345 TALLOC_CTX
*out_mem_ctx
;
5346 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5349 static void rpccli_lsa_EnumAccountRights_done(struct tevent_req
*subreq
);
5351 struct tevent_req
*rpccli_lsa_EnumAccountRights_send(TALLOC_CTX
*mem_ctx
,
5352 struct tevent_context
*ev
,
5353 struct rpc_pipe_client
*cli
,
5354 struct policy_handle
*_handle
/* [in] [ref] */,
5355 struct dom_sid2
*_sid
/* [in] [ref] */,
5356 struct lsa_RightSet
*_rights
/* [out] [ref] */)
5358 struct tevent_req
*req
;
5359 struct rpccli_lsa_EnumAccountRights_state
*state
;
5360 struct tevent_req
*subreq
;
5362 req
= tevent_req_create(mem_ctx
, &state
,
5363 struct rpccli_lsa_EnumAccountRights_state
);
5367 state
->out_mem_ctx
= NULL
;
5368 state
->dispatch_recv
= cli
->dispatch_recv
;
5371 state
->orig
.in
.handle
= _handle
;
5372 state
->orig
.in
.sid
= _sid
;
5374 /* Out parameters */
5375 state
->orig
.out
.rights
= _rights
;
5378 ZERO_STRUCT(state
->orig
.out
.result
);
5380 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5381 "rpccli_lsa_EnumAccountRights_out_memory");
5382 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5383 return tevent_req_post(req
, ev
);
5386 /* make a temporary copy, that we pass to the dispatch function */
5387 state
->tmp
= state
->orig
;
5389 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5390 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
5391 NDR_LSA_ENUMACCOUNTRIGHTS
,
5393 if (tevent_req_nomem(subreq
, req
)) {
5394 return tevent_req_post(req
, ev
);
5396 tevent_req_set_callback(subreq
, rpccli_lsa_EnumAccountRights_done
, req
);
5400 static void rpccli_lsa_EnumAccountRights_done(struct tevent_req
*subreq
)
5402 struct tevent_req
*req
= tevent_req_callback_data(
5403 subreq
, struct tevent_req
);
5404 struct rpccli_lsa_EnumAccountRights_state
*state
= tevent_req_data(
5405 req
, struct rpccli_lsa_EnumAccountRights_state
);
5407 TALLOC_CTX
*mem_ctx
;
5409 if (state
->out_mem_ctx
) {
5410 mem_ctx
= state
->out_mem_ctx
;
5415 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5416 TALLOC_FREE(subreq
);
5417 if (!NT_STATUS_IS_OK(status
)) {
5418 tevent_req_nterror(req
, status
);
5422 /* Copy out parameters */
5423 *state
->orig
.out
.rights
= *state
->tmp
.out
.rights
;
5426 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5428 /* Reset temporary structure */
5429 ZERO_STRUCT(state
->tmp
);
5431 tevent_req_done(req
);
5434 NTSTATUS
rpccli_lsa_EnumAccountRights_recv(struct tevent_req
*req
,
5435 TALLOC_CTX
*mem_ctx
,
5438 struct rpccli_lsa_EnumAccountRights_state
*state
= tevent_req_data(
5439 req
, struct rpccli_lsa_EnumAccountRights_state
);
5442 if (tevent_req_is_nterror(req
, &status
)) {
5443 tevent_req_received(req
);
5447 /* Steal possbile out parameters to the callers context */
5448 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5451 *result
= state
->orig
.out
.result
;
5453 tevent_req_received(req
);
5454 return NT_STATUS_OK
;
5457 NTSTATUS
rpccli_lsa_EnumAccountRights(struct rpc_pipe_client
*cli
,
5458 TALLOC_CTX
*mem_ctx
,
5459 struct policy_handle
*handle
/* [in] [ref] */,
5460 struct dom_sid2
*sid
/* [in] [ref] */,
5461 struct lsa_RightSet
*rights
/* [out] [ref] */)
5463 struct lsa_EnumAccountRights r
;
5467 r
.in
.handle
= handle
;
5470 status
= cli
->dispatch(cli
,
5472 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
5473 NDR_LSA_ENUMACCOUNTRIGHTS
,
5476 if (!NT_STATUS_IS_OK(status
)) {
5480 if (NT_STATUS_IS_ERR(status
)) {
5484 /* Return variables */
5485 *rights
= *r
.out
.rights
;
5488 return r
.out
.result
;
5491 struct rpccli_lsa_AddAccountRights_state
{
5492 struct lsa_AddAccountRights orig
;
5493 struct lsa_AddAccountRights tmp
;
5494 TALLOC_CTX
*out_mem_ctx
;
5495 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5498 static void rpccli_lsa_AddAccountRights_done(struct tevent_req
*subreq
);
5500 struct tevent_req
*rpccli_lsa_AddAccountRights_send(TALLOC_CTX
*mem_ctx
,
5501 struct tevent_context
*ev
,
5502 struct rpc_pipe_client
*cli
,
5503 struct policy_handle
*_handle
/* [in] [ref] */,
5504 struct dom_sid2
*_sid
/* [in] [ref] */,
5505 struct lsa_RightSet
*_rights
/* [in] [ref] */)
5507 struct tevent_req
*req
;
5508 struct rpccli_lsa_AddAccountRights_state
*state
;
5509 struct tevent_req
*subreq
;
5511 req
= tevent_req_create(mem_ctx
, &state
,
5512 struct rpccli_lsa_AddAccountRights_state
);
5516 state
->out_mem_ctx
= NULL
;
5517 state
->dispatch_recv
= cli
->dispatch_recv
;
5520 state
->orig
.in
.handle
= _handle
;
5521 state
->orig
.in
.sid
= _sid
;
5522 state
->orig
.in
.rights
= _rights
;
5524 /* Out parameters */
5527 ZERO_STRUCT(state
->orig
.out
.result
);
5529 /* make a temporary copy, that we pass to the dispatch function */
5530 state
->tmp
= state
->orig
;
5532 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5533 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
5534 NDR_LSA_ADDACCOUNTRIGHTS
,
5536 if (tevent_req_nomem(subreq
, req
)) {
5537 return tevent_req_post(req
, ev
);
5539 tevent_req_set_callback(subreq
, rpccli_lsa_AddAccountRights_done
, req
);
5543 static void rpccli_lsa_AddAccountRights_done(struct tevent_req
*subreq
)
5545 struct tevent_req
*req
= tevent_req_callback_data(
5546 subreq
, struct tevent_req
);
5547 struct rpccli_lsa_AddAccountRights_state
*state
= tevent_req_data(
5548 req
, struct rpccli_lsa_AddAccountRights_state
);
5550 TALLOC_CTX
*mem_ctx
;
5552 if (state
->out_mem_ctx
) {
5553 mem_ctx
= state
->out_mem_ctx
;
5558 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5559 TALLOC_FREE(subreq
);
5560 if (!NT_STATUS_IS_OK(status
)) {
5561 tevent_req_nterror(req
, status
);
5565 /* Copy out parameters */
5568 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5570 /* Reset temporary structure */
5571 ZERO_STRUCT(state
->tmp
);
5573 tevent_req_done(req
);
5576 NTSTATUS
rpccli_lsa_AddAccountRights_recv(struct tevent_req
*req
,
5577 TALLOC_CTX
*mem_ctx
,
5580 struct rpccli_lsa_AddAccountRights_state
*state
= tevent_req_data(
5581 req
, struct rpccli_lsa_AddAccountRights_state
);
5584 if (tevent_req_is_nterror(req
, &status
)) {
5585 tevent_req_received(req
);
5589 /* Steal possbile out parameters to the callers context */
5590 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5593 *result
= state
->orig
.out
.result
;
5595 tevent_req_received(req
);
5596 return NT_STATUS_OK
;
5599 NTSTATUS
rpccli_lsa_AddAccountRights(struct rpc_pipe_client
*cli
,
5600 TALLOC_CTX
*mem_ctx
,
5601 struct policy_handle
*handle
/* [in] [ref] */,
5602 struct dom_sid2
*sid
/* [in] [ref] */,
5603 struct lsa_RightSet
*rights
/* [in] [ref] */)
5605 struct lsa_AddAccountRights r
;
5609 r
.in
.handle
= handle
;
5611 r
.in
.rights
= rights
;
5613 status
= cli
->dispatch(cli
,
5615 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
5616 NDR_LSA_ADDACCOUNTRIGHTS
,
5619 if (!NT_STATUS_IS_OK(status
)) {
5623 if (NT_STATUS_IS_ERR(status
)) {
5627 /* Return variables */
5630 return r
.out
.result
;
5633 struct rpccli_lsa_RemoveAccountRights_state
{
5634 struct lsa_RemoveAccountRights orig
;
5635 struct lsa_RemoveAccountRights tmp
;
5636 TALLOC_CTX
*out_mem_ctx
;
5637 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5640 static void rpccli_lsa_RemoveAccountRights_done(struct tevent_req
*subreq
);
5642 struct tevent_req
*rpccli_lsa_RemoveAccountRights_send(TALLOC_CTX
*mem_ctx
,
5643 struct tevent_context
*ev
,
5644 struct rpc_pipe_client
*cli
,
5645 struct policy_handle
*_handle
/* [in] [ref] */,
5646 struct dom_sid2
*_sid
/* [in] [ref] */,
5647 uint8_t _remove_all
/* [in] */,
5648 struct lsa_RightSet
*_rights
/* [in] [ref] */)
5650 struct tevent_req
*req
;
5651 struct rpccli_lsa_RemoveAccountRights_state
*state
;
5652 struct tevent_req
*subreq
;
5654 req
= tevent_req_create(mem_ctx
, &state
,
5655 struct rpccli_lsa_RemoveAccountRights_state
);
5659 state
->out_mem_ctx
= NULL
;
5660 state
->dispatch_recv
= cli
->dispatch_recv
;
5663 state
->orig
.in
.handle
= _handle
;
5664 state
->orig
.in
.sid
= _sid
;
5665 state
->orig
.in
.remove_all
= _remove_all
;
5666 state
->orig
.in
.rights
= _rights
;
5668 /* Out parameters */
5671 ZERO_STRUCT(state
->orig
.out
.result
);
5673 /* make a temporary copy, that we pass to the dispatch function */
5674 state
->tmp
= state
->orig
;
5676 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5677 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
5678 NDR_LSA_REMOVEACCOUNTRIGHTS
,
5680 if (tevent_req_nomem(subreq
, req
)) {
5681 return tevent_req_post(req
, ev
);
5683 tevent_req_set_callback(subreq
, rpccli_lsa_RemoveAccountRights_done
, req
);
5687 static void rpccli_lsa_RemoveAccountRights_done(struct tevent_req
*subreq
)
5689 struct tevent_req
*req
= tevent_req_callback_data(
5690 subreq
, struct tevent_req
);
5691 struct rpccli_lsa_RemoveAccountRights_state
*state
= tevent_req_data(
5692 req
, struct rpccli_lsa_RemoveAccountRights_state
);
5694 TALLOC_CTX
*mem_ctx
;
5696 if (state
->out_mem_ctx
) {
5697 mem_ctx
= state
->out_mem_ctx
;
5702 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5703 TALLOC_FREE(subreq
);
5704 if (!NT_STATUS_IS_OK(status
)) {
5705 tevent_req_nterror(req
, status
);
5709 /* Copy out parameters */
5712 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5714 /* Reset temporary structure */
5715 ZERO_STRUCT(state
->tmp
);
5717 tevent_req_done(req
);
5720 NTSTATUS
rpccli_lsa_RemoveAccountRights_recv(struct tevent_req
*req
,
5721 TALLOC_CTX
*mem_ctx
,
5724 struct rpccli_lsa_RemoveAccountRights_state
*state
= tevent_req_data(
5725 req
, struct rpccli_lsa_RemoveAccountRights_state
);
5728 if (tevent_req_is_nterror(req
, &status
)) {
5729 tevent_req_received(req
);
5733 /* Steal possbile out parameters to the callers context */
5734 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5737 *result
= state
->orig
.out
.result
;
5739 tevent_req_received(req
);
5740 return NT_STATUS_OK
;
5743 NTSTATUS
rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client
*cli
,
5744 TALLOC_CTX
*mem_ctx
,
5745 struct policy_handle
*handle
/* [in] [ref] */,
5746 struct dom_sid2
*sid
/* [in] [ref] */,
5747 uint8_t remove_all
/* [in] */,
5748 struct lsa_RightSet
*rights
/* [in] [ref] */)
5750 struct lsa_RemoveAccountRights r
;
5754 r
.in
.handle
= handle
;
5756 r
.in
.remove_all
= remove_all
;
5757 r
.in
.rights
= rights
;
5759 status
= cli
->dispatch(cli
,
5761 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
5762 NDR_LSA_REMOVEACCOUNTRIGHTS
,
5765 if (!NT_STATUS_IS_OK(status
)) {
5769 if (NT_STATUS_IS_ERR(status
)) {
5773 /* Return variables */
5776 return r
.out
.result
;
5779 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state
{
5780 struct lsa_QueryTrustedDomainInfoBySid orig
;
5781 struct lsa_QueryTrustedDomainInfoBySid tmp
;
5782 TALLOC_CTX
*out_mem_ctx
;
5783 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5786 static void rpccli_lsa_QueryTrustedDomainInfoBySid_done(struct tevent_req
*subreq
);
5788 struct tevent_req
*rpccli_lsa_QueryTrustedDomainInfoBySid_send(TALLOC_CTX
*mem_ctx
,
5789 struct tevent_context
*ev
,
5790 struct rpc_pipe_client
*cli
,
5791 struct policy_handle
*_handle
/* [in] [ref] */,
5792 struct dom_sid2
*_dom_sid
/* [in] [ref] */,
5793 enum lsa_TrustDomInfoEnum _level
/* [in] */,
5794 union lsa_TrustedDomainInfo
**_info
/* [out] [ref,switch_is(level)] */)
5796 struct tevent_req
*req
;
5797 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state
*state
;
5798 struct tevent_req
*subreq
;
5800 req
= tevent_req_create(mem_ctx
, &state
,
5801 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state
);
5805 state
->out_mem_ctx
= NULL
;
5806 state
->dispatch_recv
= cli
->dispatch_recv
;
5809 state
->orig
.in
.handle
= _handle
;
5810 state
->orig
.in
.dom_sid
= _dom_sid
;
5811 state
->orig
.in
.level
= _level
;
5813 /* Out parameters */
5814 state
->orig
.out
.info
= _info
;
5817 ZERO_STRUCT(state
->orig
.out
.result
);
5819 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5820 "rpccli_lsa_QueryTrustedDomainInfoBySid_out_memory");
5821 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5822 return tevent_req_post(req
, ev
);
5825 /* make a temporary copy, that we pass to the dispatch function */
5826 state
->tmp
= state
->orig
;
5828 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5829 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
5830 NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID
,
5832 if (tevent_req_nomem(subreq
, req
)) {
5833 return tevent_req_post(req
, ev
);
5835 tevent_req_set_callback(subreq
, rpccli_lsa_QueryTrustedDomainInfoBySid_done
, req
);
5839 static void rpccli_lsa_QueryTrustedDomainInfoBySid_done(struct tevent_req
*subreq
)
5841 struct tevent_req
*req
= tevent_req_callback_data(
5842 subreq
, struct tevent_req
);
5843 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state
*state
= tevent_req_data(
5844 req
, struct rpccli_lsa_QueryTrustedDomainInfoBySid_state
);
5846 TALLOC_CTX
*mem_ctx
;
5848 if (state
->out_mem_ctx
) {
5849 mem_ctx
= state
->out_mem_ctx
;
5854 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5855 TALLOC_FREE(subreq
);
5856 if (!NT_STATUS_IS_OK(status
)) {
5857 tevent_req_nterror(req
, status
);
5861 /* Copy out parameters */
5862 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
5865 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5867 /* Reset temporary structure */
5868 ZERO_STRUCT(state
->tmp
);
5870 tevent_req_done(req
);
5873 NTSTATUS
rpccli_lsa_QueryTrustedDomainInfoBySid_recv(struct tevent_req
*req
,
5874 TALLOC_CTX
*mem_ctx
,
5877 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state
*state
= tevent_req_data(
5878 req
, struct rpccli_lsa_QueryTrustedDomainInfoBySid_state
);
5881 if (tevent_req_is_nterror(req
, &status
)) {
5882 tevent_req_received(req
);
5886 /* Steal possbile out parameters to the callers context */
5887 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5890 *result
= state
->orig
.out
.result
;
5892 tevent_req_received(req
);
5893 return NT_STATUS_OK
;
5896 NTSTATUS
rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client
*cli
,
5897 TALLOC_CTX
*mem_ctx
,
5898 struct policy_handle
*handle
/* [in] [ref] */,
5899 struct dom_sid2
*dom_sid
/* [in] [ref] */,
5900 enum lsa_TrustDomInfoEnum level
/* [in] */,
5901 union lsa_TrustedDomainInfo
**info
/* [out] [ref,switch_is(level)] */)
5903 struct lsa_QueryTrustedDomainInfoBySid r
;
5907 r
.in
.handle
= handle
;
5908 r
.in
.dom_sid
= dom_sid
;
5911 status
= cli
->dispatch(cli
,
5913 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
5914 NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID
,
5917 if (!NT_STATUS_IS_OK(status
)) {
5921 if (NT_STATUS_IS_ERR(status
)) {
5925 /* Return variables */
5926 *info
= *r
.out
.info
;
5929 return r
.out
.result
;
5932 struct rpccli_lsa_SetTrustedDomainInfo_state
{
5933 struct lsa_SetTrustedDomainInfo orig
;
5934 struct lsa_SetTrustedDomainInfo tmp
;
5935 TALLOC_CTX
*out_mem_ctx
;
5936 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5939 static void rpccli_lsa_SetTrustedDomainInfo_done(struct tevent_req
*subreq
);
5941 struct tevent_req
*rpccli_lsa_SetTrustedDomainInfo_send(TALLOC_CTX
*mem_ctx
,
5942 struct tevent_context
*ev
,
5943 struct rpc_pipe_client
*cli
,
5944 struct policy_handle
*_handle
/* [in] [ref] */,
5945 struct dom_sid2
*_dom_sid
/* [in] [ref] */,
5946 enum lsa_TrustDomInfoEnum _level
/* [in] */,
5947 union lsa_TrustedDomainInfo
*_info
/* [in] [ref,switch_is(level)] */)
5949 struct tevent_req
*req
;
5950 struct rpccli_lsa_SetTrustedDomainInfo_state
*state
;
5951 struct tevent_req
*subreq
;
5953 req
= tevent_req_create(mem_ctx
, &state
,
5954 struct rpccli_lsa_SetTrustedDomainInfo_state
);
5958 state
->out_mem_ctx
= NULL
;
5959 state
->dispatch_recv
= cli
->dispatch_recv
;
5962 state
->orig
.in
.handle
= _handle
;
5963 state
->orig
.in
.dom_sid
= _dom_sid
;
5964 state
->orig
.in
.level
= _level
;
5965 state
->orig
.in
.info
= _info
;
5967 /* Out parameters */
5970 ZERO_STRUCT(state
->orig
.out
.result
);
5972 /* make a temporary copy, that we pass to the dispatch function */
5973 state
->tmp
= state
->orig
;
5975 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5976 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
5977 NDR_LSA_SETTRUSTEDDOMAININFO
,
5979 if (tevent_req_nomem(subreq
, req
)) {
5980 return tevent_req_post(req
, ev
);
5982 tevent_req_set_callback(subreq
, rpccli_lsa_SetTrustedDomainInfo_done
, req
);
5986 static void rpccli_lsa_SetTrustedDomainInfo_done(struct tevent_req
*subreq
)
5988 struct tevent_req
*req
= tevent_req_callback_data(
5989 subreq
, struct tevent_req
);
5990 struct rpccli_lsa_SetTrustedDomainInfo_state
*state
= tevent_req_data(
5991 req
, struct rpccli_lsa_SetTrustedDomainInfo_state
);
5993 TALLOC_CTX
*mem_ctx
;
5995 if (state
->out_mem_ctx
) {
5996 mem_ctx
= state
->out_mem_ctx
;
6001 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6002 TALLOC_FREE(subreq
);
6003 if (!NT_STATUS_IS_OK(status
)) {
6004 tevent_req_nterror(req
, status
);
6008 /* Copy out parameters */
6011 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6013 /* Reset temporary structure */
6014 ZERO_STRUCT(state
->tmp
);
6016 tevent_req_done(req
);
6019 NTSTATUS
rpccli_lsa_SetTrustedDomainInfo_recv(struct tevent_req
*req
,
6020 TALLOC_CTX
*mem_ctx
,
6023 struct rpccli_lsa_SetTrustedDomainInfo_state
*state
= tevent_req_data(
6024 req
, struct rpccli_lsa_SetTrustedDomainInfo_state
);
6027 if (tevent_req_is_nterror(req
, &status
)) {
6028 tevent_req_received(req
);
6032 /* Steal possbile out parameters to the callers context */
6033 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6036 *result
= state
->orig
.out
.result
;
6038 tevent_req_received(req
);
6039 return NT_STATUS_OK
;
6042 NTSTATUS
rpccli_lsa_SetTrustedDomainInfo(struct rpc_pipe_client
*cli
,
6043 TALLOC_CTX
*mem_ctx
,
6044 struct policy_handle
*handle
/* [in] [ref] */,
6045 struct dom_sid2
*dom_sid
/* [in] [ref] */,
6046 enum lsa_TrustDomInfoEnum level
/* [in] */,
6047 union lsa_TrustedDomainInfo
*info
/* [in] [ref,switch_is(level)] */)
6049 struct lsa_SetTrustedDomainInfo r
;
6053 r
.in
.handle
= handle
;
6054 r
.in
.dom_sid
= dom_sid
;
6058 status
= cli
->dispatch(cli
,
6060 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
6061 NDR_LSA_SETTRUSTEDDOMAININFO
,
6064 if (!NT_STATUS_IS_OK(status
)) {
6068 if (NT_STATUS_IS_ERR(status
)) {
6072 /* Return variables */
6075 return r
.out
.result
;
6078 struct rpccli_lsa_DeleteTrustedDomain_state
{
6079 struct lsa_DeleteTrustedDomain orig
;
6080 struct lsa_DeleteTrustedDomain tmp
;
6081 TALLOC_CTX
*out_mem_ctx
;
6082 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6085 static void rpccli_lsa_DeleteTrustedDomain_done(struct tevent_req
*subreq
);
6087 struct tevent_req
*rpccli_lsa_DeleteTrustedDomain_send(TALLOC_CTX
*mem_ctx
,
6088 struct tevent_context
*ev
,
6089 struct rpc_pipe_client
*cli
,
6090 struct policy_handle
*_handle
/* [in] [ref] */,
6091 struct dom_sid2
*_dom_sid
/* [in] [ref] */)
6093 struct tevent_req
*req
;
6094 struct rpccli_lsa_DeleteTrustedDomain_state
*state
;
6095 struct tevent_req
*subreq
;
6097 req
= tevent_req_create(mem_ctx
, &state
,
6098 struct rpccli_lsa_DeleteTrustedDomain_state
);
6102 state
->out_mem_ctx
= NULL
;
6103 state
->dispatch_recv
= cli
->dispatch_recv
;
6106 state
->orig
.in
.handle
= _handle
;
6107 state
->orig
.in
.dom_sid
= _dom_sid
;
6109 /* Out parameters */
6112 ZERO_STRUCT(state
->orig
.out
.result
);
6114 /* make a temporary copy, that we pass to the dispatch function */
6115 state
->tmp
= state
->orig
;
6117 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6118 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
6119 NDR_LSA_DELETETRUSTEDDOMAIN
,
6121 if (tevent_req_nomem(subreq
, req
)) {
6122 return tevent_req_post(req
, ev
);
6124 tevent_req_set_callback(subreq
, rpccli_lsa_DeleteTrustedDomain_done
, req
);
6128 static void rpccli_lsa_DeleteTrustedDomain_done(struct tevent_req
*subreq
)
6130 struct tevent_req
*req
= tevent_req_callback_data(
6131 subreq
, struct tevent_req
);
6132 struct rpccli_lsa_DeleteTrustedDomain_state
*state
= tevent_req_data(
6133 req
, struct rpccli_lsa_DeleteTrustedDomain_state
);
6135 TALLOC_CTX
*mem_ctx
;
6137 if (state
->out_mem_ctx
) {
6138 mem_ctx
= state
->out_mem_ctx
;
6143 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6144 TALLOC_FREE(subreq
);
6145 if (!NT_STATUS_IS_OK(status
)) {
6146 tevent_req_nterror(req
, status
);
6150 /* Copy out parameters */
6153 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6155 /* Reset temporary structure */
6156 ZERO_STRUCT(state
->tmp
);
6158 tevent_req_done(req
);
6161 NTSTATUS
rpccli_lsa_DeleteTrustedDomain_recv(struct tevent_req
*req
,
6162 TALLOC_CTX
*mem_ctx
,
6165 struct rpccli_lsa_DeleteTrustedDomain_state
*state
= tevent_req_data(
6166 req
, struct rpccli_lsa_DeleteTrustedDomain_state
);
6169 if (tevent_req_is_nterror(req
, &status
)) {
6170 tevent_req_received(req
);
6174 /* Steal possbile out parameters to the callers context */
6175 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6178 *result
= state
->orig
.out
.result
;
6180 tevent_req_received(req
);
6181 return NT_STATUS_OK
;
6184 NTSTATUS
rpccli_lsa_DeleteTrustedDomain(struct rpc_pipe_client
*cli
,
6185 TALLOC_CTX
*mem_ctx
,
6186 struct policy_handle
*handle
/* [in] [ref] */,
6187 struct dom_sid2
*dom_sid
/* [in] [ref] */)
6189 struct lsa_DeleteTrustedDomain r
;
6193 r
.in
.handle
= handle
;
6194 r
.in
.dom_sid
= dom_sid
;
6196 status
= cli
->dispatch(cli
,
6198 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
6199 NDR_LSA_DELETETRUSTEDDOMAIN
,
6202 if (!NT_STATUS_IS_OK(status
)) {
6206 if (NT_STATUS_IS_ERR(status
)) {
6210 /* Return variables */
6213 return r
.out
.result
;
6216 struct rpccli_lsa_StorePrivateData_state
{
6217 struct lsa_StorePrivateData orig
;
6218 struct lsa_StorePrivateData tmp
;
6219 TALLOC_CTX
*out_mem_ctx
;
6220 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6223 static void rpccli_lsa_StorePrivateData_done(struct tevent_req
*subreq
);
6225 struct tevent_req
*rpccli_lsa_StorePrivateData_send(TALLOC_CTX
*mem_ctx
,
6226 struct tevent_context
*ev
,
6227 struct rpc_pipe_client
*cli
,
6228 struct policy_handle
*_handle
/* [in] [ref] */,
6229 struct lsa_String
*_name
/* [in] [ref] */,
6230 struct lsa_DATA_BUF
*_val
/* [in] [unique] */)
6232 struct tevent_req
*req
;
6233 struct rpccli_lsa_StorePrivateData_state
*state
;
6234 struct tevent_req
*subreq
;
6236 req
= tevent_req_create(mem_ctx
, &state
,
6237 struct rpccli_lsa_StorePrivateData_state
);
6241 state
->out_mem_ctx
= NULL
;
6242 state
->dispatch_recv
= cli
->dispatch_recv
;
6245 state
->orig
.in
.handle
= _handle
;
6246 state
->orig
.in
.name
= _name
;
6247 state
->orig
.in
.val
= _val
;
6249 /* Out parameters */
6252 ZERO_STRUCT(state
->orig
.out
.result
);
6254 /* make a temporary copy, that we pass to the dispatch function */
6255 state
->tmp
= state
->orig
;
6257 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6258 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
6259 NDR_LSA_STOREPRIVATEDATA
,
6261 if (tevent_req_nomem(subreq
, req
)) {
6262 return tevent_req_post(req
, ev
);
6264 tevent_req_set_callback(subreq
, rpccli_lsa_StorePrivateData_done
, req
);
6268 static void rpccli_lsa_StorePrivateData_done(struct tevent_req
*subreq
)
6270 struct tevent_req
*req
= tevent_req_callback_data(
6271 subreq
, struct tevent_req
);
6272 struct rpccli_lsa_StorePrivateData_state
*state
= tevent_req_data(
6273 req
, struct rpccli_lsa_StorePrivateData_state
);
6275 TALLOC_CTX
*mem_ctx
;
6277 if (state
->out_mem_ctx
) {
6278 mem_ctx
= state
->out_mem_ctx
;
6283 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6284 TALLOC_FREE(subreq
);
6285 if (!NT_STATUS_IS_OK(status
)) {
6286 tevent_req_nterror(req
, status
);
6290 /* Copy out parameters */
6293 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6295 /* Reset temporary structure */
6296 ZERO_STRUCT(state
->tmp
);
6298 tevent_req_done(req
);
6301 NTSTATUS
rpccli_lsa_StorePrivateData_recv(struct tevent_req
*req
,
6302 TALLOC_CTX
*mem_ctx
,
6305 struct rpccli_lsa_StorePrivateData_state
*state
= tevent_req_data(
6306 req
, struct rpccli_lsa_StorePrivateData_state
);
6309 if (tevent_req_is_nterror(req
, &status
)) {
6310 tevent_req_received(req
);
6314 /* Steal possbile out parameters to the callers context */
6315 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6318 *result
= state
->orig
.out
.result
;
6320 tevent_req_received(req
);
6321 return NT_STATUS_OK
;
6324 NTSTATUS
rpccli_lsa_StorePrivateData(struct rpc_pipe_client
*cli
,
6325 TALLOC_CTX
*mem_ctx
,
6326 struct policy_handle
*handle
/* [in] [ref] */,
6327 struct lsa_String
*name
/* [in] [ref] */,
6328 struct lsa_DATA_BUF
*val
/* [in] [unique] */)
6330 struct lsa_StorePrivateData r
;
6334 r
.in
.handle
= handle
;
6338 status
= cli
->dispatch(cli
,
6340 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
6341 NDR_LSA_STOREPRIVATEDATA
,
6344 if (!NT_STATUS_IS_OK(status
)) {
6348 if (NT_STATUS_IS_ERR(status
)) {
6352 /* Return variables */
6355 return r
.out
.result
;
6358 struct rpccli_lsa_RetrievePrivateData_state
{
6359 struct lsa_RetrievePrivateData orig
;
6360 struct lsa_RetrievePrivateData tmp
;
6361 TALLOC_CTX
*out_mem_ctx
;
6362 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6365 static void rpccli_lsa_RetrievePrivateData_done(struct tevent_req
*subreq
);
6367 struct tevent_req
*rpccli_lsa_RetrievePrivateData_send(TALLOC_CTX
*mem_ctx
,
6368 struct tevent_context
*ev
,
6369 struct rpc_pipe_client
*cli
,
6370 struct policy_handle
*_handle
/* [in] [ref] */,
6371 struct lsa_String
*_name
/* [in] [ref] */,
6372 struct lsa_DATA_BUF
**_val
/* [in,out] [ref] */)
6374 struct tevent_req
*req
;
6375 struct rpccli_lsa_RetrievePrivateData_state
*state
;
6376 struct tevent_req
*subreq
;
6378 req
= tevent_req_create(mem_ctx
, &state
,
6379 struct rpccli_lsa_RetrievePrivateData_state
);
6383 state
->out_mem_ctx
= NULL
;
6384 state
->dispatch_recv
= cli
->dispatch_recv
;
6387 state
->orig
.in
.handle
= _handle
;
6388 state
->orig
.in
.name
= _name
;
6389 state
->orig
.in
.val
= _val
;
6391 /* Out parameters */
6392 state
->orig
.out
.val
= _val
;
6395 ZERO_STRUCT(state
->orig
.out
.result
);
6397 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6398 "rpccli_lsa_RetrievePrivateData_out_memory");
6399 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6400 return tevent_req_post(req
, ev
);
6403 /* make a temporary copy, that we pass to the dispatch function */
6404 state
->tmp
= state
->orig
;
6406 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6407 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
6408 NDR_LSA_RETRIEVEPRIVATEDATA
,
6410 if (tevent_req_nomem(subreq
, req
)) {
6411 return tevent_req_post(req
, ev
);
6413 tevent_req_set_callback(subreq
, rpccli_lsa_RetrievePrivateData_done
, req
);
6417 static void rpccli_lsa_RetrievePrivateData_done(struct tevent_req
*subreq
)
6419 struct tevent_req
*req
= tevent_req_callback_data(
6420 subreq
, struct tevent_req
);
6421 struct rpccli_lsa_RetrievePrivateData_state
*state
= tevent_req_data(
6422 req
, struct rpccli_lsa_RetrievePrivateData_state
);
6424 TALLOC_CTX
*mem_ctx
;
6426 if (state
->out_mem_ctx
) {
6427 mem_ctx
= state
->out_mem_ctx
;
6432 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6433 TALLOC_FREE(subreq
);
6434 if (!NT_STATUS_IS_OK(status
)) {
6435 tevent_req_nterror(req
, status
);
6439 /* Copy out parameters */
6440 *state
->orig
.out
.val
= *state
->tmp
.out
.val
;
6443 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6445 /* Reset temporary structure */
6446 ZERO_STRUCT(state
->tmp
);
6448 tevent_req_done(req
);
6451 NTSTATUS
rpccli_lsa_RetrievePrivateData_recv(struct tevent_req
*req
,
6452 TALLOC_CTX
*mem_ctx
,
6455 struct rpccli_lsa_RetrievePrivateData_state
*state
= tevent_req_data(
6456 req
, struct rpccli_lsa_RetrievePrivateData_state
);
6459 if (tevent_req_is_nterror(req
, &status
)) {
6460 tevent_req_received(req
);
6464 /* Steal possbile out parameters to the callers context */
6465 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6468 *result
= state
->orig
.out
.result
;
6470 tevent_req_received(req
);
6471 return NT_STATUS_OK
;
6474 NTSTATUS
rpccli_lsa_RetrievePrivateData(struct rpc_pipe_client
*cli
,
6475 TALLOC_CTX
*mem_ctx
,
6476 struct policy_handle
*handle
/* [in] [ref] */,
6477 struct lsa_String
*name
/* [in] [ref] */,
6478 struct lsa_DATA_BUF
**val
/* [in,out] [ref] */)
6480 struct lsa_RetrievePrivateData r
;
6484 r
.in
.handle
= handle
;
6488 status
= cli
->dispatch(cli
,
6490 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
6491 NDR_LSA_RETRIEVEPRIVATEDATA
,
6494 if (!NT_STATUS_IS_OK(status
)) {
6498 if (NT_STATUS_IS_ERR(status
)) {
6502 /* Return variables */
6506 return r
.out
.result
;
6509 struct rpccli_lsa_OpenPolicy2_state
{
6510 struct lsa_OpenPolicy2 orig
;
6511 struct lsa_OpenPolicy2 tmp
;
6512 TALLOC_CTX
*out_mem_ctx
;
6513 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6516 static void rpccli_lsa_OpenPolicy2_done(struct tevent_req
*subreq
);
6518 struct tevent_req
*rpccli_lsa_OpenPolicy2_send(TALLOC_CTX
*mem_ctx
,
6519 struct tevent_context
*ev
,
6520 struct rpc_pipe_client
*cli
,
6521 const char *_system_name
/* [in] [unique,charset(UTF16)] */,
6522 struct lsa_ObjectAttribute
*_attr
/* [in] [ref] */,
6523 uint32_t _access_mask
/* [in] */,
6524 struct policy_handle
*_handle
/* [out] [ref] */)
6526 struct tevent_req
*req
;
6527 struct rpccli_lsa_OpenPolicy2_state
*state
;
6528 struct tevent_req
*subreq
;
6530 req
= tevent_req_create(mem_ctx
, &state
,
6531 struct rpccli_lsa_OpenPolicy2_state
);
6535 state
->out_mem_ctx
= NULL
;
6536 state
->dispatch_recv
= cli
->dispatch_recv
;
6539 state
->orig
.in
.system_name
= _system_name
;
6540 state
->orig
.in
.attr
= _attr
;
6541 state
->orig
.in
.access_mask
= _access_mask
;
6543 /* Out parameters */
6544 state
->orig
.out
.handle
= _handle
;
6547 ZERO_STRUCT(state
->orig
.out
.result
);
6549 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6550 "rpccli_lsa_OpenPolicy2_out_memory");
6551 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6552 return tevent_req_post(req
, ev
);
6555 /* make a temporary copy, that we pass to the dispatch function */
6556 state
->tmp
= state
->orig
;
6558 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6559 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
6560 NDR_LSA_OPENPOLICY2
,
6562 if (tevent_req_nomem(subreq
, req
)) {
6563 return tevent_req_post(req
, ev
);
6565 tevent_req_set_callback(subreq
, rpccli_lsa_OpenPolicy2_done
, req
);
6569 static void rpccli_lsa_OpenPolicy2_done(struct tevent_req
*subreq
)
6571 struct tevent_req
*req
= tevent_req_callback_data(
6572 subreq
, struct tevent_req
);
6573 struct rpccli_lsa_OpenPolicy2_state
*state
= tevent_req_data(
6574 req
, struct rpccli_lsa_OpenPolicy2_state
);
6576 TALLOC_CTX
*mem_ctx
;
6578 if (state
->out_mem_ctx
) {
6579 mem_ctx
= state
->out_mem_ctx
;
6584 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6585 TALLOC_FREE(subreq
);
6586 if (!NT_STATUS_IS_OK(status
)) {
6587 tevent_req_nterror(req
, status
);
6591 /* Copy out parameters */
6592 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
6595 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6597 /* Reset temporary structure */
6598 ZERO_STRUCT(state
->tmp
);
6600 tevent_req_done(req
);
6603 NTSTATUS
rpccli_lsa_OpenPolicy2_recv(struct tevent_req
*req
,
6604 TALLOC_CTX
*mem_ctx
,
6607 struct rpccli_lsa_OpenPolicy2_state
*state
= tevent_req_data(
6608 req
, struct rpccli_lsa_OpenPolicy2_state
);
6611 if (tevent_req_is_nterror(req
, &status
)) {
6612 tevent_req_received(req
);
6616 /* Steal possbile out parameters to the callers context */
6617 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6620 *result
= state
->orig
.out
.result
;
6622 tevent_req_received(req
);
6623 return NT_STATUS_OK
;
6626 NTSTATUS
rpccli_lsa_OpenPolicy2(struct rpc_pipe_client
*cli
,
6627 TALLOC_CTX
*mem_ctx
,
6628 const char *system_name
/* [in] [unique,charset(UTF16)] */,
6629 struct lsa_ObjectAttribute
*attr
/* [in] [ref] */,
6630 uint32_t access_mask
/* [in] */,
6631 struct policy_handle
*handle
/* [out] [ref] */)
6633 struct lsa_OpenPolicy2 r
;
6637 r
.in
.system_name
= system_name
;
6639 r
.in
.access_mask
= access_mask
;
6641 status
= cli
->dispatch(cli
,
6643 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
6644 NDR_LSA_OPENPOLICY2
,
6647 if (!NT_STATUS_IS_OK(status
)) {
6651 if (NT_STATUS_IS_ERR(status
)) {
6655 /* Return variables */
6656 *handle
= *r
.out
.handle
;
6659 return r
.out
.result
;
6662 struct rpccli_lsa_GetUserName_state
{
6663 struct lsa_GetUserName orig
;
6664 struct lsa_GetUserName tmp
;
6665 TALLOC_CTX
*out_mem_ctx
;
6666 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6669 static void rpccli_lsa_GetUserName_done(struct tevent_req
*subreq
);
6671 struct tevent_req
*rpccli_lsa_GetUserName_send(TALLOC_CTX
*mem_ctx
,
6672 struct tevent_context
*ev
,
6673 struct rpc_pipe_client
*cli
,
6674 const char *_system_name
/* [in] [unique,charset(UTF16)] */,
6675 struct lsa_String
**_account_name
/* [in,out] [ref] */,
6676 struct lsa_String
**_authority_name
/* [in,out] [unique] */)
6678 struct tevent_req
*req
;
6679 struct rpccli_lsa_GetUserName_state
*state
;
6680 struct tevent_req
*subreq
;
6682 req
= tevent_req_create(mem_ctx
, &state
,
6683 struct rpccli_lsa_GetUserName_state
);
6687 state
->out_mem_ctx
= NULL
;
6688 state
->dispatch_recv
= cli
->dispatch_recv
;
6691 state
->orig
.in
.system_name
= _system_name
;
6692 state
->orig
.in
.account_name
= _account_name
;
6693 state
->orig
.in
.authority_name
= _authority_name
;
6695 /* Out parameters */
6696 state
->orig
.out
.account_name
= _account_name
;
6697 state
->orig
.out
.authority_name
= _authority_name
;
6700 ZERO_STRUCT(state
->orig
.out
.result
);
6702 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6703 "rpccli_lsa_GetUserName_out_memory");
6704 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6705 return tevent_req_post(req
, ev
);
6708 /* make a temporary copy, that we pass to the dispatch function */
6709 state
->tmp
= state
->orig
;
6711 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6712 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
6713 NDR_LSA_GETUSERNAME
,
6715 if (tevent_req_nomem(subreq
, req
)) {
6716 return tevent_req_post(req
, ev
);
6718 tevent_req_set_callback(subreq
, rpccli_lsa_GetUserName_done
, req
);
6722 static void rpccli_lsa_GetUserName_done(struct tevent_req
*subreq
)
6724 struct tevent_req
*req
= tevent_req_callback_data(
6725 subreq
, struct tevent_req
);
6726 struct rpccli_lsa_GetUserName_state
*state
= tevent_req_data(
6727 req
, struct rpccli_lsa_GetUserName_state
);
6729 TALLOC_CTX
*mem_ctx
;
6731 if (state
->out_mem_ctx
) {
6732 mem_ctx
= state
->out_mem_ctx
;
6737 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6738 TALLOC_FREE(subreq
);
6739 if (!NT_STATUS_IS_OK(status
)) {
6740 tevent_req_nterror(req
, status
);
6744 /* Copy out parameters */
6745 *state
->orig
.out
.account_name
= *state
->tmp
.out
.account_name
;
6746 if (state
->orig
.out
.authority_name
&& state
->tmp
.out
.authority_name
) {
6747 *state
->orig
.out
.authority_name
= *state
->tmp
.out
.authority_name
;
6751 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6753 /* Reset temporary structure */
6754 ZERO_STRUCT(state
->tmp
);
6756 tevent_req_done(req
);
6759 NTSTATUS
rpccli_lsa_GetUserName_recv(struct tevent_req
*req
,
6760 TALLOC_CTX
*mem_ctx
,
6763 struct rpccli_lsa_GetUserName_state
*state
= tevent_req_data(
6764 req
, struct rpccli_lsa_GetUserName_state
);
6767 if (tevent_req_is_nterror(req
, &status
)) {
6768 tevent_req_received(req
);
6772 /* Steal possbile out parameters to the callers context */
6773 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6776 *result
= state
->orig
.out
.result
;
6778 tevent_req_received(req
);
6779 return NT_STATUS_OK
;
6782 NTSTATUS
rpccli_lsa_GetUserName(struct rpc_pipe_client
*cli
,
6783 TALLOC_CTX
*mem_ctx
,
6784 const char *system_name
/* [in] [unique,charset(UTF16)] */,
6785 struct lsa_String
**account_name
/* [in,out] [ref] */,
6786 struct lsa_String
**authority_name
/* [in,out] [unique] */)
6788 struct lsa_GetUserName r
;
6792 r
.in
.system_name
= system_name
;
6793 r
.in
.account_name
= account_name
;
6794 r
.in
.authority_name
= authority_name
;
6796 status
= cli
->dispatch(cli
,
6798 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
6799 NDR_LSA_GETUSERNAME
,
6802 if (!NT_STATUS_IS_OK(status
)) {
6806 if (NT_STATUS_IS_ERR(status
)) {
6810 /* Return variables */
6811 *account_name
= *r
.out
.account_name
;
6812 if (authority_name
&& r
.out
.authority_name
) {
6813 *authority_name
= *r
.out
.authority_name
;
6817 return r
.out
.result
;
6820 struct rpccli_lsa_QueryInfoPolicy2_state
{
6821 struct lsa_QueryInfoPolicy2 orig
;
6822 struct lsa_QueryInfoPolicy2 tmp
;
6823 TALLOC_CTX
*out_mem_ctx
;
6824 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6827 static void rpccli_lsa_QueryInfoPolicy2_done(struct tevent_req
*subreq
);
6829 struct tevent_req
*rpccli_lsa_QueryInfoPolicy2_send(TALLOC_CTX
*mem_ctx
,
6830 struct tevent_context
*ev
,
6831 struct rpc_pipe_client
*cli
,
6832 struct policy_handle
*_handle
/* [in] [ref] */,
6833 enum lsa_PolicyInfo _level
/* [in] */,
6834 union lsa_PolicyInformation
**_info
/* [out] [ref,switch_is(level)] */)
6836 struct tevent_req
*req
;
6837 struct rpccli_lsa_QueryInfoPolicy2_state
*state
;
6838 struct tevent_req
*subreq
;
6840 req
= tevent_req_create(mem_ctx
, &state
,
6841 struct rpccli_lsa_QueryInfoPolicy2_state
);
6845 state
->out_mem_ctx
= NULL
;
6846 state
->dispatch_recv
= cli
->dispatch_recv
;
6849 state
->orig
.in
.handle
= _handle
;
6850 state
->orig
.in
.level
= _level
;
6852 /* Out parameters */
6853 state
->orig
.out
.info
= _info
;
6856 ZERO_STRUCT(state
->orig
.out
.result
);
6858 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6859 "rpccli_lsa_QueryInfoPolicy2_out_memory");
6860 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6861 return tevent_req_post(req
, ev
);
6864 /* make a temporary copy, that we pass to the dispatch function */
6865 state
->tmp
= state
->orig
;
6867 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6868 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
6869 NDR_LSA_QUERYINFOPOLICY2
,
6871 if (tevent_req_nomem(subreq
, req
)) {
6872 return tevent_req_post(req
, ev
);
6874 tevent_req_set_callback(subreq
, rpccli_lsa_QueryInfoPolicy2_done
, req
);
6878 static void rpccli_lsa_QueryInfoPolicy2_done(struct tevent_req
*subreq
)
6880 struct tevent_req
*req
= tevent_req_callback_data(
6881 subreq
, struct tevent_req
);
6882 struct rpccli_lsa_QueryInfoPolicy2_state
*state
= tevent_req_data(
6883 req
, struct rpccli_lsa_QueryInfoPolicy2_state
);
6885 TALLOC_CTX
*mem_ctx
;
6887 if (state
->out_mem_ctx
) {
6888 mem_ctx
= state
->out_mem_ctx
;
6893 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6894 TALLOC_FREE(subreq
);
6895 if (!NT_STATUS_IS_OK(status
)) {
6896 tevent_req_nterror(req
, status
);
6900 /* Copy out parameters */
6901 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
6904 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6906 /* Reset temporary structure */
6907 ZERO_STRUCT(state
->tmp
);
6909 tevent_req_done(req
);
6912 NTSTATUS
rpccli_lsa_QueryInfoPolicy2_recv(struct tevent_req
*req
,
6913 TALLOC_CTX
*mem_ctx
,
6916 struct rpccli_lsa_QueryInfoPolicy2_state
*state
= tevent_req_data(
6917 req
, struct rpccli_lsa_QueryInfoPolicy2_state
);
6920 if (tevent_req_is_nterror(req
, &status
)) {
6921 tevent_req_received(req
);
6925 /* Steal possbile out parameters to the callers context */
6926 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6929 *result
= state
->orig
.out
.result
;
6931 tevent_req_received(req
);
6932 return NT_STATUS_OK
;
6935 NTSTATUS
rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client
*cli
,
6936 TALLOC_CTX
*mem_ctx
,
6937 struct policy_handle
*handle
/* [in] [ref] */,
6938 enum lsa_PolicyInfo level
/* [in] */,
6939 union lsa_PolicyInformation
**info
/* [out] [ref,switch_is(level)] */)
6941 struct lsa_QueryInfoPolicy2 r
;
6945 r
.in
.handle
= handle
;
6948 status
= cli
->dispatch(cli
,
6950 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
6951 NDR_LSA_QUERYINFOPOLICY2
,
6954 if (!NT_STATUS_IS_OK(status
)) {
6958 if (NT_STATUS_IS_ERR(status
)) {
6962 /* Return variables */
6963 *info
= *r
.out
.info
;
6966 return r
.out
.result
;
6969 struct rpccli_lsa_SetInfoPolicy2_state
{
6970 struct lsa_SetInfoPolicy2 orig
;
6971 struct lsa_SetInfoPolicy2 tmp
;
6972 TALLOC_CTX
*out_mem_ctx
;
6973 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6976 static void rpccli_lsa_SetInfoPolicy2_done(struct tevent_req
*subreq
);
6978 struct tevent_req
*rpccli_lsa_SetInfoPolicy2_send(TALLOC_CTX
*mem_ctx
,
6979 struct tevent_context
*ev
,
6980 struct rpc_pipe_client
*cli
,
6981 struct policy_handle
*_handle
/* [in] [ref] */,
6982 enum lsa_PolicyInfo _level
/* [in] */,
6983 union lsa_PolicyInformation
*_info
/* [in] [ref,switch_is(level)] */)
6985 struct tevent_req
*req
;
6986 struct rpccli_lsa_SetInfoPolicy2_state
*state
;
6987 struct tevent_req
*subreq
;
6989 req
= tevent_req_create(mem_ctx
, &state
,
6990 struct rpccli_lsa_SetInfoPolicy2_state
);
6994 state
->out_mem_ctx
= NULL
;
6995 state
->dispatch_recv
= cli
->dispatch_recv
;
6998 state
->orig
.in
.handle
= _handle
;
6999 state
->orig
.in
.level
= _level
;
7000 state
->orig
.in
.info
= _info
;
7002 /* Out parameters */
7005 ZERO_STRUCT(state
->orig
.out
.result
);
7007 /* make a temporary copy, that we pass to the dispatch function */
7008 state
->tmp
= state
->orig
;
7010 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7011 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
7012 NDR_LSA_SETINFOPOLICY2
,
7014 if (tevent_req_nomem(subreq
, req
)) {
7015 return tevent_req_post(req
, ev
);
7017 tevent_req_set_callback(subreq
, rpccli_lsa_SetInfoPolicy2_done
, req
);
7021 static void rpccli_lsa_SetInfoPolicy2_done(struct tevent_req
*subreq
)
7023 struct tevent_req
*req
= tevent_req_callback_data(
7024 subreq
, struct tevent_req
);
7025 struct rpccli_lsa_SetInfoPolicy2_state
*state
= tevent_req_data(
7026 req
, struct rpccli_lsa_SetInfoPolicy2_state
);
7028 TALLOC_CTX
*mem_ctx
;
7030 if (state
->out_mem_ctx
) {
7031 mem_ctx
= state
->out_mem_ctx
;
7036 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7037 TALLOC_FREE(subreq
);
7038 if (!NT_STATUS_IS_OK(status
)) {
7039 tevent_req_nterror(req
, status
);
7043 /* Copy out parameters */
7046 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7048 /* Reset temporary structure */
7049 ZERO_STRUCT(state
->tmp
);
7051 tevent_req_done(req
);
7054 NTSTATUS
rpccli_lsa_SetInfoPolicy2_recv(struct tevent_req
*req
,
7055 TALLOC_CTX
*mem_ctx
,
7058 struct rpccli_lsa_SetInfoPolicy2_state
*state
= tevent_req_data(
7059 req
, struct rpccli_lsa_SetInfoPolicy2_state
);
7062 if (tevent_req_is_nterror(req
, &status
)) {
7063 tevent_req_received(req
);
7067 /* Steal possbile out parameters to the callers context */
7068 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7071 *result
= state
->orig
.out
.result
;
7073 tevent_req_received(req
);
7074 return NT_STATUS_OK
;
7077 NTSTATUS
rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client
*cli
,
7078 TALLOC_CTX
*mem_ctx
,
7079 struct policy_handle
*handle
/* [in] [ref] */,
7080 enum lsa_PolicyInfo level
/* [in] */,
7081 union lsa_PolicyInformation
*info
/* [in] [ref,switch_is(level)] */)
7083 struct lsa_SetInfoPolicy2 r
;
7087 r
.in
.handle
= handle
;
7091 status
= cli
->dispatch(cli
,
7093 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
7094 NDR_LSA_SETINFOPOLICY2
,
7097 if (!NT_STATUS_IS_OK(status
)) {
7101 if (NT_STATUS_IS_ERR(status
)) {
7105 /* Return variables */
7108 return r
.out
.result
;
7111 struct rpccli_lsa_QueryTrustedDomainInfoByName_state
{
7112 struct lsa_QueryTrustedDomainInfoByName orig
;
7113 struct lsa_QueryTrustedDomainInfoByName tmp
;
7114 TALLOC_CTX
*out_mem_ctx
;
7115 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7118 static void rpccli_lsa_QueryTrustedDomainInfoByName_done(struct tevent_req
*subreq
);
7120 struct tevent_req
*rpccli_lsa_QueryTrustedDomainInfoByName_send(TALLOC_CTX
*mem_ctx
,
7121 struct tevent_context
*ev
,
7122 struct rpc_pipe_client
*cli
,
7123 struct policy_handle
*_handle
/* [in] [ref] */,
7124 struct lsa_String
*_trusted_domain
/* [in] [ref] */,
7125 enum lsa_TrustDomInfoEnum _level
/* [in] */,
7126 union lsa_TrustedDomainInfo
**_info
/* [out] [ref,switch_is(level)] */)
7128 struct tevent_req
*req
;
7129 struct rpccli_lsa_QueryTrustedDomainInfoByName_state
*state
;
7130 struct tevent_req
*subreq
;
7132 req
= tevent_req_create(mem_ctx
, &state
,
7133 struct rpccli_lsa_QueryTrustedDomainInfoByName_state
);
7137 state
->out_mem_ctx
= NULL
;
7138 state
->dispatch_recv
= cli
->dispatch_recv
;
7141 state
->orig
.in
.handle
= _handle
;
7142 state
->orig
.in
.trusted_domain
= _trusted_domain
;
7143 state
->orig
.in
.level
= _level
;
7145 /* Out parameters */
7146 state
->orig
.out
.info
= _info
;
7149 ZERO_STRUCT(state
->orig
.out
.result
);
7151 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7152 "rpccli_lsa_QueryTrustedDomainInfoByName_out_memory");
7153 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7154 return tevent_req_post(req
, ev
);
7157 /* make a temporary copy, that we pass to the dispatch function */
7158 state
->tmp
= state
->orig
;
7160 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7161 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
7162 NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME
,
7164 if (tevent_req_nomem(subreq
, req
)) {
7165 return tevent_req_post(req
, ev
);
7167 tevent_req_set_callback(subreq
, rpccli_lsa_QueryTrustedDomainInfoByName_done
, req
);
7171 static void rpccli_lsa_QueryTrustedDomainInfoByName_done(struct tevent_req
*subreq
)
7173 struct tevent_req
*req
= tevent_req_callback_data(
7174 subreq
, struct tevent_req
);
7175 struct rpccli_lsa_QueryTrustedDomainInfoByName_state
*state
= tevent_req_data(
7176 req
, struct rpccli_lsa_QueryTrustedDomainInfoByName_state
);
7178 TALLOC_CTX
*mem_ctx
;
7180 if (state
->out_mem_ctx
) {
7181 mem_ctx
= state
->out_mem_ctx
;
7186 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7187 TALLOC_FREE(subreq
);
7188 if (!NT_STATUS_IS_OK(status
)) {
7189 tevent_req_nterror(req
, status
);
7193 /* Copy out parameters */
7194 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
7197 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7199 /* Reset temporary structure */
7200 ZERO_STRUCT(state
->tmp
);
7202 tevent_req_done(req
);
7205 NTSTATUS
rpccli_lsa_QueryTrustedDomainInfoByName_recv(struct tevent_req
*req
,
7206 TALLOC_CTX
*mem_ctx
,
7209 struct rpccli_lsa_QueryTrustedDomainInfoByName_state
*state
= tevent_req_data(
7210 req
, struct rpccli_lsa_QueryTrustedDomainInfoByName_state
);
7213 if (tevent_req_is_nterror(req
, &status
)) {
7214 tevent_req_received(req
);
7218 /* Steal possbile out parameters to the callers context */
7219 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7222 *result
= state
->orig
.out
.result
;
7224 tevent_req_received(req
);
7225 return NT_STATUS_OK
;
7228 NTSTATUS
rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client
*cli
,
7229 TALLOC_CTX
*mem_ctx
,
7230 struct policy_handle
*handle
/* [in] [ref] */,
7231 struct lsa_String
*trusted_domain
/* [in] [ref] */,
7232 enum lsa_TrustDomInfoEnum level
/* [in] */,
7233 union lsa_TrustedDomainInfo
**info
/* [out] [ref,switch_is(level)] */)
7235 struct lsa_QueryTrustedDomainInfoByName r
;
7239 r
.in
.handle
= handle
;
7240 r
.in
.trusted_domain
= trusted_domain
;
7243 status
= cli
->dispatch(cli
,
7245 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
7246 NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME
,
7249 if (!NT_STATUS_IS_OK(status
)) {
7253 if (NT_STATUS_IS_ERR(status
)) {
7257 /* Return variables */
7258 *info
= *r
.out
.info
;
7261 return r
.out
.result
;
7264 struct rpccli_lsa_SetTrustedDomainInfoByName_state
{
7265 struct lsa_SetTrustedDomainInfoByName orig
;
7266 struct lsa_SetTrustedDomainInfoByName tmp
;
7267 TALLOC_CTX
*out_mem_ctx
;
7268 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7271 static void rpccli_lsa_SetTrustedDomainInfoByName_done(struct tevent_req
*subreq
);
7273 struct tevent_req
*rpccli_lsa_SetTrustedDomainInfoByName_send(TALLOC_CTX
*mem_ctx
,
7274 struct tevent_context
*ev
,
7275 struct rpc_pipe_client
*cli
,
7276 struct policy_handle
*_handle
/* [in] [ref] */,
7277 struct lsa_String _trusted_domain
/* [in] */,
7278 enum lsa_TrustDomInfoEnum _level
/* [in] */,
7279 union lsa_TrustedDomainInfo
*_info
/* [in] [unique,switch_is(level)] */)
7281 struct tevent_req
*req
;
7282 struct rpccli_lsa_SetTrustedDomainInfoByName_state
*state
;
7283 struct tevent_req
*subreq
;
7285 req
= tevent_req_create(mem_ctx
, &state
,
7286 struct rpccli_lsa_SetTrustedDomainInfoByName_state
);
7290 state
->out_mem_ctx
= NULL
;
7291 state
->dispatch_recv
= cli
->dispatch_recv
;
7294 state
->orig
.in
.handle
= _handle
;
7295 state
->orig
.in
.trusted_domain
= _trusted_domain
;
7296 state
->orig
.in
.level
= _level
;
7297 state
->orig
.in
.info
= _info
;
7299 /* Out parameters */
7302 ZERO_STRUCT(state
->orig
.out
.result
);
7304 /* make a temporary copy, that we pass to the dispatch function */
7305 state
->tmp
= state
->orig
;
7307 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7308 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
7309 NDR_LSA_SETTRUSTEDDOMAININFOBYNAME
,
7311 if (tevent_req_nomem(subreq
, req
)) {
7312 return tevent_req_post(req
, ev
);
7314 tevent_req_set_callback(subreq
, rpccli_lsa_SetTrustedDomainInfoByName_done
, req
);
7318 static void rpccli_lsa_SetTrustedDomainInfoByName_done(struct tevent_req
*subreq
)
7320 struct tevent_req
*req
= tevent_req_callback_data(
7321 subreq
, struct tevent_req
);
7322 struct rpccli_lsa_SetTrustedDomainInfoByName_state
*state
= tevent_req_data(
7323 req
, struct rpccli_lsa_SetTrustedDomainInfoByName_state
);
7325 TALLOC_CTX
*mem_ctx
;
7327 if (state
->out_mem_ctx
) {
7328 mem_ctx
= state
->out_mem_ctx
;
7333 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7334 TALLOC_FREE(subreq
);
7335 if (!NT_STATUS_IS_OK(status
)) {
7336 tevent_req_nterror(req
, status
);
7340 /* Copy out parameters */
7343 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7345 /* Reset temporary structure */
7346 ZERO_STRUCT(state
->tmp
);
7348 tevent_req_done(req
);
7351 NTSTATUS
rpccli_lsa_SetTrustedDomainInfoByName_recv(struct tevent_req
*req
,
7352 TALLOC_CTX
*mem_ctx
,
7355 struct rpccli_lsa_SetTrustedDomainInfoByName_state
*state
= tevent_req_data(
7356 req
, struct rpccli_lsa_SetTrustedDomainInfoByName_state
);
7359 if (tevent_req_is_nterror(req
, &status
)) {
7360 tevent_req_received(req
);
7364 /* Steal possbile out parameters to the callers context */
7365 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7368 *result
= state
->orig
.out
.result
;
7370 tevent_req_received(req
);
7371 return NT_STATUS_OK
;
7374 NTSTATUS
rpccli_lsa_SetTrustedDomainInfoByName(struct rpc_pipe_client
*cli
,
7375 TALLOC_CTX
*mem_ctx
,
7376 struct policy_handle
*handle
/* [in] [ref] */,
7377 struct lsa_String trusted_domain
/* [in] */,
7378 enum lsa_TrustDomInfoEnum level
/* [in] */,
7379 union lsa_TrustedDomainInfo
*info
/* [in] [unique,switch_is(level)] */)
7381 struct lsa_SetTrustedDomainInfoByName r
;
7385 r
.in
.handle
= handle
;
7386 r
.in
.trusted_domain
= trusted_domain
;
7390 status
= cli
->dispatch(cli
,
7392 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
7393 NDR_LSA_SETTRUSTEDDOMAININFOBYNAME
,
7396 if (!NT_STATUS_IS_OK(status
)) {
7400 if (NT_STATUS_IS_ERR(status
)) {
7404 /* Return variables */
7407 return r
.out
.result
;
7410 struct rpccli_lsa_EnumTrustedDomainsEx_state
{
7411 struct lsa_EnumTrustedDomainsEx orig
;
7412 struct lsa_EnumTrustedDomainsEx tmp
;
7413 TALLOC_CTX
*out_mem_ctx
;
7414 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7417 static void rpccli_lsa_EnumTrustedDomainsEx_done(struct tevent_req
*subreq
);
7419 struct tevent_req
*rpccli_lsa_EnumTrustedDomainsEx_send(TALLOC_CTX
*mem_ctx
,
7420 struct tevent_context
*ev
,
7421 struct rpc_pipe_client
*cli
,
7422 struct policy_handle
*_handle
/* [in] [ref] */,
7423 uint32_t *_resume_handle
/* [in,out] [ref] */,
7424 struct lsa_DomainListEx
*_domains
/* [out] [ref] */,
7425 uint32_t _max_size
/* [in] */)
7427 struct tevent_req
*req
;
7428 struct rpccli_lsa_EnumTrustedDomainsEx_state
*state
;
7429 struct tevent_req
*subreq
;
7431 req
= tevent_req_create(mem_ctx
, &state
,
7432 struct rpccli_lsa_EnumTrustedDomainsEx_state
);
7436 state
->out_mem_ctx
= NULL
;
7437 state
->dispatch_recv
= cli
->dispatch_recv
;
7440 state
->orig
.in
.handle
= _handle
;
7441 state
->orig
.in
.resume_handle
= _resume_handle
;
7442 state
->orig
.in
.max_size
= _max_size
;
7444 /* Out parameters */
7445 state
->orig
.out
.resume_handle
= _resume_handle
;
7446 state
->orig
.out
.domains
= _domains
;
7449 ZERO_STRUCT(state
->orig
.out
.result
);
7451 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7452 "rpccli_lsa_EnumTrustedDomainsEx_out_memory");
7453 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7454 return tevent_req_post(req
, ev
);
7457 /* make a temporary copy, that we pass to the dispatch function */
7458 state
->tmp
= state
->orig
;
7460 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7461 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
7462 NDR_LSA_ENUMTRUSTEDDOMAINSEX
,
7464 if (tevent_req_nomem(subreq
, req
)) {
7465 return tevent_req_post(req
, ev
);
7467 tevent_req_set_callback(subreq
, rpccli_lsa_EnumTrustedDomainsEx_done
, req
);
7471 static void rpccli_lsa_EnumTrustedDomainsEx_done(struct tevent_req
*subreq
)
7473 struct tevent_req
*req
= tevent_req_callback_data(
7474 subreq
, struct tevent_req
);
7475 struct rpccli_lsa_EnumTrustedDomainsEx_state
*state
= tevent_req_data(
7476 req
, struct rpccli_lsa_EnumTrustedDomainsEx_state
);
7478 TALLOC_CTX
*mem_ctx
;
7480 if (state
->out_mem_ctx
) {
7481 mem_ctx
= state
->out_mem_ctx
;
7486 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7487 TALLOC_FREE(subreq
);
7488 if (!NT_STATUS_IS_OK(status
)) {
7489 tevent_req_nterror(req
, status
);
7493 /* Copy out parameters */
7494 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
7495 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
7498 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7500 /* Reset temporary structure */
7501 ZERO_STRUCT(state
->tmp
);
7503 tevent_req_done(req
);
7506 NTSTATUS
rpccli_lsa_EnumTrustedDomainsEx_recv(struct tevent_req
*req
,
7507 TALLOC_CTX
*mem_ctx
,
7510 struct rpccli_lsa_EnumTrustedDomainsEx_state
*state
= tevent_req_data(
7511 req
, struct rpccli_lsa_EnumTrustedDomainsEx_state
);
7514 if (tevent_req_is_nterror(req
, &status
)) {
7515 tevent_req_received(req
);
7519 /* Steal possbile out parameters to the callers context */
7520 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7523 *result
= state
->orig
.out
.result
;
7525 tevent_req_received(req
);
7526 return NT_STATUS_OK
;
7529 NTSTATUS
rpccli_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client
*cli
,
7530 TALLOC_CTX
*mem_ctx
,
7531 struct policy_handle
*handle
/* [in] [ref] */,
7532 uint32_t *resume_handle
/* [in,out] [ref] */,
7533 struct lsa_DomainListEx
*domains
/* [out] [ref] */,
7534 uint32_t max_size
/* [in] */)
7536 struct lsa_EnumTrustedDomainsEx r
;
7540 r
.in
.handle
= handle
;
7541 r
.in
.resume_handle
= resume_handle
;
7542 r
.in
.max_size
= max_size
;
7544 status
= cli
->dispatch(cli
,
7546 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
7547 NDR_LSA_ENUMTRUSTEDDOMAINSEX
,
7550 if (!NT_STATUS_IS_OK(status
)) {
7554 if (NT_STATUS_IS_ERR(status
)) {
7558 /* Return variables */
7559 *resume_handle
= *r
.out
.resume_handle
;
7560 *domains
= *r
.out
.domains
;
7563 return r
.out
.result
;
7566 struct rpccli_lsa_CreateTrustedDomainEx_state
{
7567 struct lsa_CreateTrustedDomainEx orig
;
7568 struct lsa_CreateTrustedDomainEx tmp
;
7569 TALLOC_CTX
*out_mem_ctx
;
7570 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7573 static void rpccli_lsa_CreateTrustedDomainEx_done(struct tevent_req
*subreq
);
7575 struct tevent_req
*rpccli_lsa_CreateTrustedDomainEx_send(TALLOC_CTX
*mem_ctx
,
7576 struct tevent_context
*ev
,
7577 struct rpc_pipe_client
*cli
,
7578 struct policy_handle
*_policy_handle
/* [in] [ref] */,
7579 struct lsa_TrustDomainInfoInfoEx
*_info
/* [in] [ref] */,
7580 struct lsa_TrustDomainInfoAuthInfoInternal
*_auth_info
/* [in] [ref] */,
7581 uint32_t _access_mask
/* [in] */,
7582 struct policy_handle
*_trustdom_handle
/* [out] [ref] */)
7584 struct tevent_req
*req
;
7585 struct rpccli_lsa_CreateTrustedDomainEx_state
*state
;
7586 struct tevent_req
*subreq
;
7588 req
= tevent_req_create(mem_ctx
, &state
,
7589 struct rpccli_lsa_CreateTrustedDomainEx_state
);
7593 state
->out_mem_ctx
= NULL
;
7594 state
->dispatch_recv
= cli
->dispatch_recv
;
7597 state
->orig
.in
.policy_handle
= _policy_handle
;
7598 state
->orig
.in
.info
= _info
;
7599 state
->orig
.in
.auth_info
= _auth_info
;
7600 state
->orig
.in
.access_mask
= _access_mask
;
7602 /* Out parameters */
7603 state
->orig
.out
.trustdom_handle
= _trustdom_handle
;
7606 ZERO_STRUCT(state
->orig
.out
.result
);
7608 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7609 "rpccli_lsa_CreateTrustedDomainEx_out_memory");
7610 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7611 return tevent_req_post(req
, ev
);
7614 /* make a temporary copy, that we pass to the dispatch function */
7615 state
->tmp
= state
->orig
;
7617 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7618 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
7619 NDR_LSA_CREATETRUSTEDDOMAINEX
,
7621 if (tevent_req_nomem(subreq
, req
)) {
7622 return tevent_req_post(req
, ev
);
7624 tevent_req_set_callback(subreq
, rpccli_lsa_CreateTrustedDomainEx_done
, req
);
7628 static void rpccli_lsa_CreateTrustedDomainEx_done(struct tevent_req
*subreq
)
7630 struct tevent_req
*req
= tevent_req_callback_data(
7631 subreq
, struct tevent_req
);
7632 struct rpccli_lsa_CreateTrustedDomainEx_state
*state
= tevent_req_data(
7633 req
, struct rpccli_lsa_CreateTrustedDomainEx_state
);
7635 TALLOC_CTX
*mem_ctx
;
7637 if (state
->out_mem_ctx
) {
7638 mem_ctx
= state
->out_mem_ctx
;
7643 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7644 TALLOC_FREE(subreq
);
7645 if (!NT_STATUS_IS_OK(status
)) {
7646 tevent_req_nterror(req
, status
);
7650 /* Copy out parameters */
7651 *state
->orig
.out
.trustdom_handle
= *state
->tmp
.out
.trustdom_handle
;
7654 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7656 /* Reset temporary structure */
7657 ZERO_STRUCT(state
->tmp
);
7659 tevent_req_done(req
);
7662 NTSTATUS
rpccli_lsa_CreateTrustedDomainEx_recv(struct tevent_req
*req
,
7663 TALLOC_CTX
*mem_ctx
,
7666 struct rpccli_lsa_CreateTrustedDomainEx_state
*state
= tevent_req_data(
7667 req
, struct rpccli_lsa_CreateTrustedDomainEx_state
);
7670 if (tevent_req_is_nterror(req
, &status
)) {
7671 tevent_req_received(req
);
7675 /* Steal possbile out parameters to the callers context */
7676 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7679 *result
= state
->orig
.out
.result
;
7681 tevent_req_received(req
);
7682 return NT_STATUS_OK
;
7685 NTSTATUS
rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client
*cli
,
7686 TALLOC_CTX
*mem_ctx
,
7687 struct policy_handle
*policy_handle
/* [in] [ref] */,
7688 struct lsa_TrustDomainInfoInfoEx
*info
/* [in] [ref] */,
7689 struct lsa_TrustDomainInfoAuthInfoInternal
*auth_info
/* [in] [ref] */,
7690 uint32_t access_mask
/* [in] */,
7691 struct policy_handle
*trustdom_handle
/* [out] [ref] */)
7693 struct lsa_CreateTrustedDomainEx r
;
7697 r
.in
.policy_handle
= policy_handle
;
7699 r
.in
.auth_info
= auth_info
;
7700 r
.in
.access_mask
= access_mask
;
7702 status
= cli
->dispatch(cli
,
7704 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
7705 NDR_LSA_CREATETRUSTEDDOMAINEX
,
7708 if (!NT_STATUS_IS_OK(status
)) {
7712 if (NT_STATUS_IS_ERR(status
)) {
7716 /* Return variables */
7717 *trustdom_handle
= *r
.out
.trustdom_handle
;
7720 return r
.out
.result
;
7723 struct rpccli_lsa_CloseTrustedDomainEx_state
{
7724 struct lsa_CloseTrustedDomainEx orig
;
7725 struct lsa_CloseTrustedDomainEx tmp
;
7726 TALLOC_CTX
*out_mem_ctx
;
7727 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7730 static void rpccli_lsa_CloseTrustedDomainEx_done(struct tevent_req
*subreq
);
7732 struct tevent_req
*rpccli_lsa_CloseTrustedDomainEx_send(TALLOC_CTX
*mem_ctx
,
7733 struct tevent_context
*ev
,
7734 struct rpc_pipe_client
*cli
,
7735 struct policy_handle
*_handle
/* [in,out] [ref] */)
7737 struct tevent_req
*req
;
7738 struct rpccli_lsa_CloseTrustedDomainEx_state
*state
;
7739 struct tevent_req
*subreq
;
7741 req
= tevent_req_create(mem_ctx
, &state
,
7742 struct rpccli_lsa_CloseTrustedDomainEx_state
);
7746 state
->out_mem_ctx
= NULL
;
7747 state
->dispatch_recv
= cli
->dispatch_recv
;
7750 state
->orig
.in
.handle
= _handle
;
7752 /* Out parameters */
7753 state
->orig
.out
.handle
= _handle
;
7756 ZERO_STRUCT(state
->orig
.out
.result
);
7758 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7759 "rpccli_lsa_CloseTrustedDomainEx_out_memory");
7760 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7761 return tevent_req_post(req
, ev
);
7764 /* make a temporary copy, that we pass to the dispatch function */
7765 state
->tmp
= state
->orig
;
7767 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7768 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
7769 NDR_LSA_CLOSETRUSTEDDOMAINEX
,
7771 if (tevent_req_nomem(subreq
, req
)) {
7772 return tevent_req_post(req
, ev
);
7774 tevent_req_set_callback(subreq
, rpccli_lsa_CloseTrustedDomainEx_done
, req
);
7778 static void rpccli_lsa_CloseTrustedDomainEx_done(struct tevent_req
*subreq
)
7780 struct tevent_req
*req
= tevent_req_callback_data(
7781 subreq
, struct tevent_req
);
7782 struct rpccli_lsa_CloseTrustedDomainEx_state
*state
= tevent_req_data(
7783 req
, struct rpccli_lsa_CloseTrustedDomainEx_state
);
7785 TALLOC_CTX
*mem_ctx
;
7787 if (state
->out_mem_ctx
) {
7788 mem_ctx
= state
->out_mem_ctx
;
7793 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7794 TALLOC_FREE(subreq
);
7795 if (!NT_STATUS_IS_OK(status
)) {
7796 tevent_req_nterror(req
, status
);
7800 /* Copy out parameters */
7801 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
7804 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7806 /* Reset temporary structure */
7807 ZERO_STRUCT(state
->tmp
);
7809 tevent_req_done(req
);
7812 NTSTATUS
rpccli_lsa_CloseTrustedDomainEx_recv(struct tevent_req
*req
,
7813 TALLOC_CTX
*mem_ctx
,
7816 struct rpccli_lsa_CloseTrustedDomainEx_state
*state
= tevent_req_data(
7817 req
, struct rpccli_lsa_CloseTrustedDomainEx_state
);
7820 if (tevent_req_is_nterror(req
, &status
)) {
7821 tevent_req_received(req
);
7825 /* Steal possbile out parameters to the callers context */
7826 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7829 *result
= state
->orig
.out
.result
;
7831 tevent_req_received(req
);
7832 return NT_STATUS_OK
;
7835 NTSTATUS
rpccli_lsa_CloseTrustedDomainEx(struct rpc_pipe_client
*cli
,
7836 TALLOC_CTX
*mem_ctx
,
7837 struct policy_handle
*handle
/* [in,out] [ref] */)
7839 struct lsa_CloseTrustedDomainEx r
;
7843 r
.in
.handle
= handle
;
7845 status
= cli
->dispatch(cli
,
7847 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
7848 NDR_LSA_CLOSETRUSTEDDOMAINEX
,
7851 if (!NT_STATUS_IS_OK(status
)) {
7855 if (NT_STATUS_IS_ERR(status
)) {
7859 /* Return variables */
7860 *handle
= *r
.out
.handle
;
7863 return r
.out
.result
;
7866 struct rpccli_lsa_QueryDomainInformationPolicy_state
{
7867 struct lsa_QueryDomainInformationPolicy orig
;
7868 struct lsa_QueryDomainInformationPolicy tmp
;
7869 TALLOC_CTX
*out_mem_ctx
;
7870 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7873 static void rpccli_lsa_QueryDomainInformationPolicy_done(struct tevent_req
*subreq
);
7875 struct tevent_req
*rpccli_lsa_QueryDomainInformationPolicy_send(TALLOC_CTX
*mem_ctx
,
7876 struct tevent_context
*ev
,
7877 struct rpc_pipe_client
*cli
,
7878 struct policy_handle
*_handle
/* [in] [ref] */,
7879 uint16_t _level
/* [in] */,
7880 union lsa_DomainInformationPolicy
**_info
/* [out] [ref,switch_is(level)] */)
7882 struct tevent_req
*req
;
7883 struct rpccli_lsa_QueryDomainInformationPolicy_state
*state
;
7884 struct tevent_req
*subreq
;
7886 req
= tevent_req_create(mem_ctx
, &state
,
7887 struct rpccli_lsa_QueryDomainInformationPolicy_state
);
7891 state
->out_mem_ctx
= NULL
;
7892 state
->dispatch_recv
= cli
->dispatch_recv
;
7895 state
->orig
.in
.handle
= _handle
;
7896 state
->orig
.in
.level
= _level
;
7898 /* Out parameters */
7899 state
->orig
.out
.info
= _info
;
7902 ZERO_STRUCT(state
->orig
.out
.result
);
7904 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7905 "rpccli_lsa_QueryDomainInformationPolicy_out_memory");
7906 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7907 return tevent_req_post(req
, ev
);
7910 /* make a temporary copy, that we pass to the dispatch function */
7911 state
->tmp
= state
->orig
;
7913 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7914 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
7915 NDR_LSA_QUERYDOMAININFORMATIONPOLICY
,
7917 if (tevent_req_nomem(subreq
, req
)) {
7918 return tevent_req_post(req
, ev
);
7920 tevent_req_set_callback(subreq
, rpccli_lsa_QueryDomainInformationPolicy_done
, req
);
7924 static void rpccli_lsa_QueryDomainInformationPolicy_done(struct tevent_req
*subreq
)
7926 struct tevent_req
*req
= tevent_req_callback_data(
7927 subreq
, struct tevent_req
);
7928 struct rpccli_lsa_QueryDomainInformationPolicy_state
*state
= tevent_req_data(
7929 req
, struct rpccli_lsa_QueryDomainInformationPolicy_state
);
7931 TALLOC_CTX
*mem_ctx
;
7933 if (state
->out_mem_ctx
) {
7934 mem_ctx
= state
->out_mem_ctx
;
7939 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7940 TALLOC_FREE(subreq
);
7941 if (!NT_STATUS_IS_OK(status
)) {
7942 tevent_req_nterror(req
, status
);
7946 /* Copy out parameters */
7947 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
7950 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7952 /* Reset temporary structure */
7953 ZERO_STRUCT(state
->tmp
);
7955 tevent_req_done(req
);
7958 NTSTATUS
rpccli_lsa_QueryDomainInformationPolicy_recv(struct tevent_req
*req
,
7959 TALLOC_CTX
*mem_ctx
,
7962 struct rpccli_lsa_QueryDomainInformationPolicy_state
*state
= tevent_req_data(
7963 req
, struct rpccli_lsa_QueryDomainInformationPolicy_state
);
7966 if (tevent_req_is_nterror(req
, &status
)) {
7967 tevent_req_received(req
);
7971 /* Steal possbile out parameters to the callers context */
7972 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7975 *result
= state
->orig
.out
.result
;
7977 tevent_req_received(req
);
7978 return NT_STATUS_OK
;
7981 NTSTATUS
rpccli_lsa_QueryDomainInformationPolicy(struct rpc_pipe_client
*cli
,
7982 TALLOC_CTX
*mem_ctx
,
7983 struct policy_handle
*handle
/* [in] [ref] */,
7984 uint16_t level
/* [in] */,
7985 union lsa_DomainInformationPolicy
**info
/* [out] [ref,switch_is(level)] */)
7987 struct lsa_QueryDomainInformationPolicy r
;
7991 r
.in
.handle
= handle
;
7994 status
= cli
->dispatch(cli
,
7996 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
7997 NDR_LSA_QUERYDOMAININFORMATIONPOLICY
,
8000 if (!NT_STATUS_IS_OK(status
)) {
8004 if (NT_STATUS_IS_ERR(status
)) {
8008 /* Return variables */
8009 *info
= *r
.out
.info
;
8012 return r
.out
.result
;
8015 struct rpccli_lsa_SetDomainInformationPolicy_state
{
8016 struct lsa_SetDomainInformationPolicy orig
;
8017 struct lsa_SetDomainInformationPolicy tmp
;
8018 TALLOC_CTX
*out_mem_ctx
;
8019 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8022 static void rpccli_lsa_SetDomainInformationPolicy_done(struct tevent_req
*subreq
);
8024 struct tevent_req
*rpccli_lsa_SetDomainInformationPolicy_send(TALLOC_CTX
*mem_ctx
,
8025 struct tevent_context
*ev
,
8026 struct rpc_pipe_client
*cli
,
8027 struct policy_handle
*_handle
/* [in] [ref] */,
8028 uint16_t _level
/* [in] */,
8029 union lsa_DomainInformationPolicy
*_info
/* [in] [unique,switch_is(level)] */)
8031 struct tevent_req
*req
;
8032 struct rpccli_lsa_SetDomainInformationPolicy_state
*state
;
8033 struct tevent_req
*subreq
;
8035 req
= tevent_req_create(mem_ctx
, &state
,
8036 struct rpccli_lsa_SetDomainInformationPolicy_state
);
8040 state
->out_mem_ctx
= NULL
;
8041 state
->dispatch_recv
= cli
->dispatch_recv
;
8044 state
->orig
.in
.handle
= _handle
;
8045 state
->orig
.in
.level
= _level
;
8046 state
->orig
.in
.info
= _info
;
8048 /* Out parameters */
8051 ZERO_STRUCT(state
->orig
.out
.result
);
8053 /* make a temporary copy, that we pass to the dispatch function */
8054 state
->tmp
= state
->orig
;
8056 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8057 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
8058 NDR_LSA_SETDOMAININFORMATIONPOLICY
,
8060 if (tevent_req_nomem(subreq
, req
)) {
8061 return tevent_req_post(req
, ev
);
8063 tevent_req_set_callback(subreq
, rpccli_lsa_SetDomainInformationPolicy_done
, req
);
8067 static void rpccli_lsa_SetDomainInformationPolicy_done(struct tevent_req
*subreq
)
8069 struct tevent_req
*req
= tevent_req_callback_data(
8070 subreq
, struct tevent_req
);
8071 struct rpccli_lsa_SetDomainInformationPolicy_state
*state
= tevent_req_data(
8072 req
, struct rpccli_lsa_SetDomainInformationPolicy_state
);
8074 TALLOC_CTX
*mem_ctx
;
8076 if (state
->out_mem_ctx
) {
8077 mem_ctx
= state
->out_mem_ctx
;
8082 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8083 TALLOC_FREE(subreq
);
8084 if (!NT_STATUS_IS_OK(status
)) {
8085 tevent_req_nterror(req
, status
);
8089 /* Copy out parameters */
8092 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8094 /* Reset temporary structure */
8095 ZERO_STRUCT(state
->tmp
);
8097 tevent_req_done(req
);
8100 NTSTATUS
rpccli_lsa_SetDomainInformationPolicy_recv(struct tevent_req
*req
,
8101 TALLOC_CTX
*mem_ctx
,
8104 struct rpccli_lsa_SetDomainInformationPolicy_state
*state
= tevent_req_data(
8105 req
, struct rpccli_lsa_SetDomainInformationPolicy_state
);
8108 if (tevent_req_is_nterror(req
, &status
)) {
8109 tevent_req_received(req
);
8113 /* Steal possbile out parameters to the callers context */
8114 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8117 *result
= state
->orig
.out
.result
;
8119 tevent_req_received(req
);
8120 return NT_STATUS_OK
;
8123 NTSTATUS
rpccli_lsa_SetDomainInformationPolicy(struct rpc_pipe_client
*cli
,
8124 TALLOC_CTX
*mem_ctx
,
8125 struct policy_handle
*handle
/* [in] [ref] */,
8126 uint16_t level
/* [in] */,
8127 union lsa_DomainInformationPolicy
*info
/* [in] [unique,switch_is(level)] */)
8129 struct lsa_SetDomainInformationPolicy r
;
8133 r
.in
.handle
= handle
;
8137 status
= cli
->dispatch(cli
,
8139 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
8140 NDR_LSA_SETDOMAININFORMATIONPOLICY
,
8143 if (!NT_STATUS_IS_OK(status
)) {
8147 if (NT_STATUS_IS_ERR(status
)) {
8151 /* Return variables */
8154 return r
.out
.result
;
8157 struct rpccli_lsa_OpenTrustedDomainByName_state
{
8158 struct lsa_OpenTrustedDomainByName orig
;
8159 struct lsa_OpenTrustedDomainByName tmp
;
8160 TALLOC_CTX
*out_mem_ctx
;
8161 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8164 static void rpccli_lsa_OpenTrustedDomainByName_done(struct tevent_req
*subreq
);
8166 struct tevent_req
*rpccli_lsa_OpenTrustedDomainByName_send(TALLOC_CTX
*mem_ctx
,
8167 struct tevent_context
*ev
,
8168 struct rpc_pipe_client
*cli
,
8169 struct policy_handle
*_handle
/* [in] [ref] */,
8170 struct lsa_String _name
/* [in] */,
8171 uint32_t _access_mask
/* [in] */,
8172 struct policy_handle
*_trustdom_handle
/* [out] [ref] */)
8174 struct tevent_req
*req
;
8175 struct rpccli_lsa_OpenTrustedDomainByName_state
*state
;
8176 struct tevent_req
*subreq
;
8178 req
= tevent_req_create(mem_ctx
, &state
,
8179 struct rpccli_lsa_OpenTrustedDomainByName_state
);
8183 state
->out_mem_ctx
= NULL
;
8184 state
->dispatch_recv
= cli
->dispatch_recv
;
8187 state
->orig
.in
.handle
= _handle
;
8188 state
->orig
.in
.name
= _name
;
8189 state
->orig
.in
.access_mask
= _access_mask
;
8191 /* Out parameters */
8192 state
->orig
.out
.trustdom_handle
= _trustdom_handle
;
8195 ZERO_STRUCT(state
->orig
.out
.result
);
8197 state
->out_mem_ctx
= talloc_named_const(state
, 0,
8198 "rpccli_lsa_OpenTrustedDomainByName_out_memory");
8199 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
8200 return tevent_req_post(req
, ev
);
8203 /* make a temporary copy, that we pass to the dispatch function */
8204 state
->tmp
= state
->orig
;
8206 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8207 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
8208 NDR_LSA_OPENTRUSTEDDOMAINBYNAME
,
8210 if (tevent_req_nomem(subreq
, req
)) {
8211 return tevent_req_post(req
, ev
);
8213 tevent_req_set_callback(subreq
, rpccli_lsa_OpenTrustedDomainByName_done
, req
);
8217 static void rpccli_lsa_OpenTrustedDomainByName_done(struct tevent_req
*subreq
)
8219 struct tevent_req
*req
= tevent_req_callback_data(
8220 subreq
, struct tevent_req
);
8221 struct rpccli_lsa_OpenTrustedDomainByName_state
*state
= tevent_req_data(
8222 req
, struct rpccli_lsa_OpenTrustedDomainByName_state
);
8224 TALLOC_CTX
*mem_ctx
;
8226 if (state
->out_mem_ctx
) {
8227 mem_ctx
= state
->out_mem_ctx
;
8232 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8233 TALLOC_FREE(subreq
);
8234 if (!NT_STATUS_IS_OK(status
)) {
8235 tevent_req_nterror(req
, status
);
8239 /* Copy out parameters */
8240 *state
->orig
.out
.trustdom_handle
= *state
->tmp
.out
.trustdom_handle
;
8243 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8245 /* Reset temporary structure */
8246 ZERO_STRUCT(state
->tmp
);
8248 tevent_req_done(req
);
8251 NTSTATUS
rpccli_lsa_OpenTrustedDomainByName_recv(struct tevent_req
*req
,
8252 TALLOC_CTX
*mem_ctx
,
8255 struct rpccli_lsa_OpenTrustedDomainByName_state
*state
= tevent_req_data(
8256 req
, struct rpccli_lsa_OpenTrustedDomainByName_state
);
8259 if (tevent_req_is_nterror(req
, &status
)) {
8260 tevent_req_received(req
);
8264 /* Steal possbile out parameters to the callers context */
8265 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8268 *result
= state
->orig
.out
.result
;
8270 tevent_req_received(req
);
8271 return NT_STATUS_OK
;
8274 NTSTATUS
rpccli_lsa_OpenTrustedDomainByName(struct rpc_pipe_client
*cli
,
8275 TALLOC_CTX
*mem_ctx
,
8276 struct policy_handle
*handle
/* [in] [ref] */,
8277 struct lsa_String name
/* [in] */,
8278 uint32_t access_mask
/* [in] */,
8279 struct policy_handle
*trustdom_handle
/* [out] [ref] */)
8281 struct lsa_OpenTrustedDomainByName r
;
8285 r
.in
.handle
= handle
;
8287 r
.in
.access_mask
= access_mask
;
8289 status
= cli
->dispatch(cli
,
8291 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
8292 NDR_LSA_OPENTRUSTEDDOMAINBYNAME
,
8295 if (!NT_STATUS_IS_OK(status
)) {
8299 if (NT_STATUS_IS_ERR(status
)) {
8303 /* Return variables */
8304 *trustdom_handle
= *r
.out
.trustdom_handle
;
8307 return r
.out
.result
;
8310 struct rpccli_lsa_TestCall_state
{
8311 struct lsa_TestCall orig
;
8312 struct lsa_TestCall tmp
;
8313 TALLOC_CTX
*out_mem_ctx
;
8314 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8317 static void rpccli_lsa_TestCall_done(struct tevent_req
*subreq
);
8319 struct tevent_req
*rpccli_lsa_TestCall_send(TALLOC_CTX
*mem_ctx
,
8320 struct tevent_context
*ev
,
8321 struct rpc_pipe_client
*cli
)
8323 struct tevent_req
*req
;
8324 struct rpccli_lsa_TestCall_state
*state
;
8325 struct tevent_req
*subreq
;
8327 req
= tevent_req_create(mem_ctx
, &state
,
8328 struct rpccli_lsa_TestCall_state
);
8332 state
->out_mem_ctx
= NULL
;
8333 state
->dispatch_recv
= cli
->dispatch_recv
;
8337 /* Out parameters */
8340 ZERO_STRUCT(state
->orig
.out
.result
);
8342 /* make a temporary copy, that we pass to the dispatch function */
8343 state
->tmp
= state
->orig
;
8345 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8346 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
8349 if (tevent_req_nomem(subreq
, req
)) {
8350 return tevent_req_post(req
, ev
);
8352 tevent_req_set_callback(subreq
, rpccli_lsa_TestCall_done
, req
);
8356 static void rpccli_lsa_TestCall_done(struct tevent_req
*subreq
)
8358 struct tevent_req
*req
= tevent_req_callback_data(
8359 subreq
, struct tevent_req
);
8360 struct rpccli_lsa_TestCall_state
*state
= tevent_req_data(
8361 req
, struct rpccli_lsa_TestCall_state
);
8363 TALLOC_CTX
*mem_ctx
;
8365 if (state
->out_mem_ctx
) {
8366 mem_ctx
= state
->out_mem_ctx
;
8371 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8372 TALLOC_FREE(subreq
);
8373 if (!NT_STATUS_IS_OK(status
)) {
8374 tevent_req_nterror(req
, status
);
8378 /* Copy out parameters */
8381 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8383 /* Reset temporary structure */
8384 ZERO_STRUCT(state
->tmp
);
8386 tevent_req_done(req
);
8389 NTSTATUS
rpccli_lsa_TestCall_recv(struct tevent_req
*req
,
8390 TALLOC_CTX
*mem_ctx
,
8393 struct rpccli_lsa_TestCall_state
*state
= tevent_req_data(
8394 req
, struct rpccli_lsa_TestCall_state
);
8397 if (tevent_req_is_nterror(req
, &status
)) {
8398 tevent_req_received(req
);
8402 /* Steal possbile out parameters to the callers context */
8403 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8406 *result
= state
->orig
.out
.result
;
8408 tevent_req_received(req
);
8409 return NT_STATUS_OK
;
8412 NTSTATUS
rpccli_lsa_TestCall(struct rpc_pipe_client
*cli
,
8413 TALLOC_CTX
*mem_ctx
)
8415 struct lsa_TestCall r
;
8420 status
= cli
->dispatch(cli
,
8422 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
8426 if (!NT_STATUS_IS_OK(status
)) {
8430 if (NT_STATUS_IS_ERR(status
)) {
8434 /* Return variables */
8437 return r
.out
.result
;
8440 struct rpccli_lsa_LookupSids2_state
{
8441 struct lsa_LookupSids2 orig
;
8442 struct lsa_LookupSids2 tmp
;
8443 TALLOC_CTX
*out_mem_ctx
;
8444 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8447 static void rpccli_lsa_LookupSids2_done(struct tevent_req
*subreq
);
8449 struct tevent_req
*rpccli_lsa_LookupSids2_send(TALLOC_CTX
*mem_ctx
,
8450 struct tevent_context
*ev
,
8451 struct rpc_pipe_client
*cli
,
8452 struct policy_handle
*_handle
/* [in] [ref] */,
8453 struct lsa_SidArray
*_sids
/* [in] [ref] */,
8454 struct lsa_RefDomainList
**_domains
/* [out] [ref] */,
8455 struct lsa_TransNameArray2
*_names
/* [in,out] [ref] */,
8456 enum lsa_LookupNamesLevel _level
/* [in] */,
8457 uint32_t *_count
/* [in,out] [ref] */,
8458 enum lsa_LookupOptions _lookup_options
/* [in] */,
8459 enum lsa_ClientRevision _client_revision
/* [in] */)
8461 struct tevent_req
*req
;
8462 struct rpccli_lsa_LookupSids2_state
*state
;
8463 struct tevent_req
*subreq
;
8465 req
= tevent_req_create(mem_ctx
, &state
,
8466 struct rpccli_lsa_LookupSids2_state
);
8470 state
->out_mem_ctx
= NULL
;
8471 state
->dispatch_recv
= cli
->dispatch_recv
;
8474 state
->orig
.in
.handle
= _handle
;
8475 state
->orig
.in
.sids
= _sids
;
8476 state
->orig
.in
.names
= _names
;
8477 state
->orig
.in
.level
= _level
;
8478 state
->orig
.in
.count
= _count
;
8479 state
->orig
.in
.lookup_options
= _lookup_options
;
8480 state
->orig
.in
.client_revision
= _client_revision
;
8482 /* Out parameters */
8483 state
->orig
.out
.domains
= _domains
;
8484 state
->orig
.out
.names
= _names
;
8485 state
->orig
.out
.count
= _count
;
8488 ZERO_STRUCT(state
->orig
.out
.result
);
8490 state
->out_mem_ctx
= talloc_named_const(state
, 0,
8491 "rpccli_lsa_LookupSids2_out_memory");
8492 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
8493 return tevent_req_post(req
, ev
);
8496 /* make a temporary copy, that we pass to the dispatch function */
8497 state
->tmp
= state
->orig
;
8499 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8500 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
8501 NDR_LSA_LOOKUPSIDS2
,
8503 if (tevent_req_nomem(subreq
, req
)) {
8504 return tevent_req_post(req
, ev
);
8506 tevent_req_set_callback(subreq
, rpccli_lsa_LookupSids2_done
, req
);
8510 static void rpccli_lsa_LookupSids2_done(struct tevent_req
*subreq
)
8512 struct tevent_req
*req
= tevent_req_callback_data(
8513 subreq
, struct tevent_req
);
8514 struct rpccli_lsa_LookupSids2_state
*state
= tevent_req_data(
8515 req
, struct rpccli_lsa_LookupSids2_state
);
8517 TALLOC_CTX
*mem_ctx
;
8519 if (state
->out_mem_ctx
) {
8520 mem_ctx
= state
->out_mem_ctx
;
8525 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8526 TALLOC_FREE(subreq
);
8527 if (!NT_STATUS_IS_OK(status
)) {
8528 tevent_req_nterror(req
, status
);
8532 /* Copy out parameters */
8533 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
8534 *state
->orig
.out
.names
= *state
->tmp
.out
.names
;
8535 *state
->orig
.out
.count
= *state
->tmp
.out
.count
;
8538 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8540 /* Reset temporary structure */
8541 ZERO_STRUCT(state
->tmp
);
8543 tevent_req_done(req
);
8546 NTSTATUS
rpccli_lsa_LookupSids2_recv(struct tevent_req
*req
,
8547 TALLOC_CTX
*mem_ctx
,
8550 struct rpccli_lsa_LookupSids2_state
*state
= tevent_req_data(
8551 req
, struct rpccli_lsa_LookupSids2_state
);
8554 if (tevent_req_is_nterror(req
, &status
)) {
8555 tevent_req_received(req
);
8559 /* Steal possbile out parameters to the callers context */
8560 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8563 *result
= state
->orig
.out
.result
;
8565 tevent_req_received(req
);
8566 return NT_STATUS_OK
;
8569 NTSTATUS
rpccli_lsa_LookupSids2(struct rpc_pipe_client
*cli
,
8570 TALLOC_CTX
*mem_ctx
,
8571 struct policy_handle
*handle
/* [in] [ref] */,
8572 struct lsa_SidArray
*sids
/* [in] [ref] */,
8573 struct lsa_RefDomainList
**domains
/* [out] [ref] */,
8574 struct lsa_TransNameArray2
*names
/* [in,out] [ref] */,
8575 enum lsa_LookupNamesLevel level
/* [in] */,
8576 uint32_t *count
/* [in,out] [ref] */,
8577 enum lsa_LookupOptions lookup_options
/* [in] */,
8578 enum lsa_ClientRevision client_revision
/* [in] */)
8580 struct lsa_LookupSids2 r
;
8584 r
.in
.handle
= handle
;
8589 r
.in
.lookup_options
= lookup_options
;
8590 r
.in
.client_revision
= client_revision
;
8592 status
= cli
->dispatch(cli
,
8594 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
8595 NDR_LSA_LOOKUPSIDS2
,
8598 if (!NT_STATUS_IS_OK(status
)) {
8602 if (NT_STATUS_IS_ERR(status
)) {
8606 /* Return variables */
8607 *domains
= *r
.out
.domains
;
8608 *names
= *r
.out
.names
;
8609 *count
= *r
.out
.count
;
8612 return r
.out
.result
;
8615 struct rpccli_lsa_LookupNames2_state
{
8616 struct lsa_LookupNames2 orig
;
8617 struct lsa_LookupNames2 tmp
;
8618 TALLOC_CTX
*out_mem_ctx
;
8619 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8622 static void rpccli_lsa_LookupNames2_done(struct tevent_req
*subreq
);
8624 struct tevent_req
*rpccli_lsa_LookupNames2_send(TALLOC_CTX
*mem_ctx
,
8625 struct tevent_context
*ev
,
8626 struct rpc_pipe_client
*cli
,
8627 struct policy_handle
*_handle
/* [in] [ref] */,
8628 uint32_t _num_names
/* [in] [range(0,1000)] */,
8629 struct lsa_String
*_names
/* [in] [size_is(num_names)] */,
8630 struct lsa_RefDomainList
**_domains
/* [out] [ref] */,
8631 struct lsa_TransSidArray2
*_sids
/* [in,out] [ref] */,
8632 enum lsa_LookupNamesLevel _level
/* [in] */,
8633 uint32_t *_count
/* [in,out] [ref] */,
8634 enum lsa_LookupOptions _lookup_options
/* [in] */,
8635 enum lsa_ClientRevision _client_revision
/* [in] */)
8637 struct tevent_req
*req
;
8638 struct rpccli_lsa_LookupNames2_state
*state
;
8639 struct tevent_req
*subreq
;
8641 req
= tevent_req_create(mem_ctx
, &state
,
8642 struct rpccli_lsa_LookupNames2_state
);
8646 state
->out_mem_ctx
= NULL
;
8647 state
->dispatch_recv
= cli
->dispatch_recv
;
8650 state
->orig
.in
.handle
= _handle
;
8651 state
->orig
.in
.num_names
= _num_names
;
8652 state
->orig
.in
.names
= _names
;
8653 state
->orig
.in
.sids
= _sids
;
8654 state
->orig
.in
.level
= _level
;
8655 state
->orig
.in
.count
= _count
;
8656 state
->orig
.in
.lookup_options
= _lookup_options
;
8657 state
->orig
.in
.client_revision
= _client_revision
;
8659 /* Out parameters */
8660 state
->orig
.out
.domains
= _domains
;
8661 state
->orig
.out
.sids
= _sids
;
8662 state
->orig
.out
.count
= _count
;
8665 ZERO_STRUCT(state
->orig
.out
.result
);
8667 state
->out_mem_ctx
= talloc_named_const(state
, 0,
8668 "rpccli_lsa_LookupNames2_out_memory");
8669 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
8670 return tevent_req_post(req
, ev
);
8673 /* make a temporary copy, that we pass to the dispatch function */
8674 state
->tmp
= state
->orig
;
8676 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8677 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
8678 NDR_LSA_LOOKUPNAMES2
,
8680 if (tevent_req_nomem(subreq
, req
)) {
8681 return tevent_req_post(req
, ev
);
8683 tevent_req_set_callback(subreq
, rpccli_lsa_LookupNames2_done
, req
);
8687 static void rpccli_lsa_LookupNames2_done(struct tevent_req
*subreq
)
8689 struct tevent_req
*req
= tevent_req_callback_data(
8690 subreq
, struct tevent_req
);
8691 struct rpccli_lsa_LookupNames2_state
*state
= tevent_req_data(
8692 req
, struct rpccli_lsa_LookupNames2_state
);
8694 TALLOC_CTX
*mem_ctx
;
8696 if (state
->out_mem_ctx
) {
8697 mem_ctx
= state
->out_mem_ctx
;
8702 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8703 TALLOC_FREE(subreq
);
8704 if (!NT_STATUS_IS_OK(status
)) {
8705 tevent_req_nterror(req
, status
);
8709 /* Copy out parameters */
8710 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
8711 *state
->orig
.out
.sids
= *state
->tmp
.out
.sids
;
8712 *state
->orig
.out
.count
= *state
->tmp
.out
.count
;
8715 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8717 /* Reset temporary structure */
8718 ZERO_STRUCT(state
->tmp
);
8720 tevent_req_done(req
);
8723 NTSTATUS
rpccli_lsa_LookupNames2_recv(struct tevent_req
*req
,
8724 TALLOC_CTX
*mem_ctx
,
8727 struct rpccli_lsa_LookupNames2_state
*state
= tevent_req_data(
8728 req
, struct rpccli_lsa_LookupNames2_state
);
8731 if (tevent_req_is_nterror(req
, &status
)) {
8732 tevent_req_received(req
);
8736 /* Steal possbile out parameters to the callers context */
8737 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8740 *result
= state
->orig
.out
.result
;
8742 tevent_req_received(req
);
8743 return NT_STATUS_OK
;
8746 NTSTATUS
rpccli_lsa_LookupNames2(struct rpc_pipe_client
*cli
,
8747 TALLOC_CTX
*mem_ctx
,
8748 struct policy_handle
*handle
/* [in] [ref] */,
8749 uint32_t num_names
/* [in] [range(0,1000)] */,
8750 struct lsa_String
*names
/* [in] [size_is(num_names)] */,
8751 struct lsa_RefDomainList
**domains
/* [out] [ref] */,
8752 struct lsa_TransSidArray2
*sids
/* [in,out] [ref] */,
8753 enum lsa_LookupNamesLevel level
/* [in] */,
8754 uint32_t *count
/* [in,out] [ref] */,
8755 enum lsa_LookupOptions lookup_options
/* [in] */,
8756 enum lsa_ClientRevision client_revision
/* [in] */)
8758 struct lsa_LookupNames2 r
;
8762 r
.in
.handle
= handle
;
8763 r
.in
.num_names
= num_names
;
8768 r
.in
.lookup_options
= lookup_options
;
8769 r
.in
.client_revision
= client_revision
;
8771 status
= cli
->dispatch(cli
,
8773 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
8774 NDR_LSA_LOOKUPNAMES2
,
8777 if (!NT_STATUS_IS_OK(status
)) {
8781 if (NT_STATUS_IS_ERR(status
)) {
8785 /* Return variables */
8786 *domains
= *r
.out
.domains
;
8787 *sids
= *r
.out
.sids
;
8788 *count
= *r
.out
.count
;
8791 return r
.out
.result
;
8794 struct rpccli_lsa_CreateTrustedDomainEx2_state
{
8795 struct lsa_CreateTrustedDomainEx2 orig
;
8796 struct lsa_CreateTrustedDomainEx2 tmp
;
8797 TALLOC_CTX
*out_mem_ctx
;
8798 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8801 static void rpccli_lsa_CreateTrustedDomainEx2_done(struct tevent_req
*subreq
);
8803 struct tevent_req
*rpccli_lsa_CreateTrustedDomainEx2_send(TALLOC_CTX
*mem_ctx
,
8804 struct tevent_context
*ev
,
8805 struct rpc_pipe_client
*cli
,
8806 struct policy_handle
*_policy_handle
/* [in] [ref] */,
8807 struct lsa_TrustDomainInfoInfoEx
*_info
/* [in] [ref] */,
8808 struct lsa_TrustDomainInfoAuthInfoInternal
*_auth_info
/* [in] [ref] */,
8809 uint32_t _access_mask
/* [in] */,
8810 struct policy_handle
*_trustdom_handle
/* [out] [ref] */)
8812 struct tevent_req
*req
;
8813 struct rpccli_lsa_CreateTrustedDomainEx2_state
*state
;
8814 struct tevent_req
*subreq
;
8816 req
= tevent_req_create(mem_ctx
, &state
,
8817 struct rpccli_lsa_CreateTrustedDomainEx2_state
);
8821 state
->out_mem_ctx
= NULL
;
8822 state
->dispatch_recv
= cli
->dispatch_recv
;
8825 state
->orig
.in
.policy_handle
= _policy_handle
;
8826 state
->orig
.in
.info
= _info
;
8827 state
->orig
.in
.auth_info
= _auth_info
;
8828 state
->orig
.in
.access_mask
= _access_mask
;
8830 /* Out parameters */
8831 state
->orig
.out
.trustdom_handle
= _trustdom_handle
;
8834 ZERO_STRUCT(state
->orig
.out
.result
);
8836 state
->out_mem_ctx
= talloc_named_const(state
, 0,
8837 "rpccli_lsa_CreateTrustedDomainEx2_out_memory");
8838 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
8839 return tevent_req_post(req
, ev
);
8842 /* make a temporary copy, that we pass to the dispatch function */
8843 state
->tmp
= state
->orig
;
8845 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8846 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
8847 NDR_LSA_CREATETRUSTEDDOMAINEX2
,
8849 if (tevent_req_nomem(subreq
, req
)) {
8850 return tevent_req_post(req
, ev
);
8852 tevent_req_set_callback(subreq
, rpccli_lsa_CreateTrustedDomainEx2_done
, req
);
8856 static void rpccli_lsa_CreateTrustedDomainEx2_done(struct tevent_req
*subreq
)
8858 struct tevent_req
*req
= tevent_req_callback_data(
8859 subreq
, struct tevent_req
);
8860 struct rpccli_lsa_CreateTrustedDomainEx2_state
*state
= tevent_req_data(
8861 req
, struct rpccli_lsa_CreateTrustedDomainEx2_state
);
8863 TALLOC_CTX
*mem_ctx
;
8865 if (state
->out_mem_ctx
) {
8866 mem_ctx
= state
->out_mem_ctx
;
8871 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8872 TALLOC_FREE(subreq
);
8873 if (!NT_STATUS_IS_OK(status
)) {
8874 tevent_req_nterror(req
, status
);
8878 /* Copy out parameters */
8879 *state
->orig
.out
.trustdom_handle
= *state
->tmp
.out
.trustdom_handle
;
8882 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8884 /* Reset temporary structure */
8885 ZERO_STRUCT(state
->tmp
);
8887 tevent_req_done(req
);
8890 NTSTATUS
rpccli_lsa_CreateTrustedDomainEx2_recv(struct tevent_req
*req
,
8891 TALLOC_CTX
*mem_ctx
,
8894 struct rpccli_lsa_CreateTrustedDomainEx2_state
*state
= tevent_req_data(
8895 req
, struct rpccli_lsa_CreateTrustedDomainEx2_state
);
8898 if (tevent_req_is_nterror(req
, &status
)) {
8899 tevent_req_received(req
);
8903 /* Steal possbile out parameters to the callers context */
8904 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8907 *result
= state
->orig
.out
.result
;
8909 tevent_req_received(req
);
8910 return NT_STATUS_OK
;
8913 NTSTATUS
rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client
*cli
,
8914 TALLOC_CTX
*mem_ctx
,
8915 struct policy_handle
*policy_handle
/* [in] [ref] */,
8916 struct lsa_TrustDomainInfoInfoEx
*info
/* [in] [ref] */,
8917 struct lsa_TrustDomainInfoAuthInfoInternal
*auth_info
/* [in] [ref] */,
8918 uint32_t access_mask
/* [in] */,
8919 struct policy_handle
*trustdom_handle
/* [out] [ref] */)
8921 struct lsa_CreateTrustedDomainEx2 r
;
8925 r
.in
.policy_handle
= policy_handle
;
8927 r
.in
.auth_info
= auth_info
;
8928 r
.in
.access_mask
= access_mask
;
8930 status
= cli
->dispatch(cli
,
8932 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
8933 NDR_LSA_CREATETRUSTEDDOMAINEX2
,
8936 if (!NT_STATUS_IS_OK(status
)) {
8940 if (NT_STATUS_IS_ERR(status
)) {
8944 /* Return variables */
8945 *trustdom_handle
= *r
.out
.trustdom_handle
;
8948 return r
.out
.result
;
8951 struct rpccli_lsa_CREDRWRITE_state
{
8952 struct lsa_CREDRWRITE orig
;
8953 struct lsa_CREDRWRITE tmp
;
8954 TALLOC_CTX
*out_mem_ctx
;
8955 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8958 static void rpccli_lsa_CREDRWRITE_done(struct tevent_req
*subreq
);
8960 struct tevent_req
*rpccli_lsa_CREDRWRITE_send(TALLOC_CTX
*mem_ctx
,
8961 struct tevent_context
*ev
,
8962 struct rpc_pipe_client
*cli
)
8964 struct tevent_req
*req
;
8965 struct rpccli_lsa_CREDRWRITE_state
*state
;
8966 struct tevent_req
*subreq
;
8968 req
= tevent_req_create(mem_ctx
, &state
,
8969 struct rpccli_lsa_CREDRWRITE_state
);
8973 state
->out_mem_ctx
= NULL
;
8974 state
->dispatch_recv
= cli
->dispatch_recv
;
8978 /* Out parameters */
8981 ZERO_STRUCT(state
->orig
.out
.result
);
8983 /* make a temporary copy, that we pass to the dispatch function */
8984 state
->tmp
= state
->orig
;
8986 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8987 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
8990 if (tevent_req_nomem(subreq
, req
)) {
8991 return tevent_req_post(req
, ev
);
8993 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRWRITE_done
, req
);
8997 static void rpccli_lsa_CREDRWRITE_done(struct tevent_req
*subreq
)
8999 struct tevent_req
*req
= tevent_req_callback_data(
9000 subreq
, struct tevent_req
);
9001 struct rpccli_lsa_CREDRWRITE_state
*state
= tevent_req_data(
9002 req
, struct rpccli_lsa_CREDRWRITE_state
);
9004 TALLOC_CTX
*mem_ctx
;
9006 if (state
->out_mem_ctx
) {
9007 mem_ctx
= state
->out_mem_ctx
;
9012 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9013 TALLOC_FREE(subreq
);
9014 if (!NT_STATUS_IS_OK(status
)) {
9015 tevent_req_nterror(req
, status
);
9019 /* Copy out parameters */
9022 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9024 /* Reset temporary structure */
9025 ZERO_STRUCT(state
->tmp
);
9027 tevent_req_done(req
);
9030 NTSTATUS
rpccli_lsa_CREDRWRITE_recv(struct tevent_req
*req
,
9031 TALLOC_CTX
*mem_ctx
,
9034 struct rpccli_lsa_CREDRWRITE_state
*state
= tevent_req_data(
9035 req
, struct rpccli_lsa_CREDRWRITE_state
);
9038 if (tevent_req_is_nterror(req
, &status
)) {
9039 tevent_req_received(req
);
9043 /* Steal possbile out parameters to the callers context */
9044 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9047 *result
= state
->orig
.out
.result
;
9049 tevent_req_received(req
);
9050 return NT_STATUS_OK
;
9053 NTSTATUS
rpccli_lsa_CREDRWRITE(struct rpc_pipe_client
*cli
,
9054 TALLOC_CTX
*mem_ctx
)
9056 struct lsa_CREDRWRITE r
;
9061 status
= cli
->dispatch(cli
,
9063 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9067 if (!NT_STATUS_IS_OK(status
)) {
9071 if (NT_STATUS_IS_ERR(status
)) {
9075 /* Return variables */
9078 return r
.out
.result
;
9081 struct rpccli_lsa_CREDRREAD_state
{
9082 struct lsa_CREDRREAD orig
;
9083 struct lsa_CREDRREAD tmp
;
9084 TALLOC_CTX
*out_mem_ctx
;
9085 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9088 static void rpccli_lsa_CREDRREAD_done(struct tevent_req
*subreq
);
9090 struct tevent_req
*rpccli_lsa_CREDRREAD_send(TALLOC_CTX
*mem_ctx
,
9091 struct tevent_context
*ev
,
9092 struct rpc_pipe_client
*cli
)
9094 struct tevent_req
*req
;
9095 struct rpccli_lsa_CREDRREAD_state
*state
;
9096 struct tevent_req
*subreq
;
9098 req
= tevent_req_create(mem_ctx
, &state
,
9099 struct rpccli_lsa_CREDRREAD_state
);
9103 state
->out_mem_ctx
= NULL
;
9104 state
->dispatch_recv
= cli
->dispatch_recv
;
9108 /* Out parameters */
9111 ZERO_STRUCT(state
->orig
.out
.result
);
9113 /* make a temporary copy, that we pass to the dispatch function */
9114 state
->tmp
= state
->orig
;
9116 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9117 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9120 if (tevent_req_nomem(subreq
, req
)) {
9121 return tevent_req_post(req
, ev
);
9123 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRREAD_done
, req
);
9127 static void rpccli_lsa_CREDRREAD_done(struct tevent_req
*subreq
)
9129 struct tevent_req
*req
= tevent_req_callback_data(
9130 subreq
, struct tevent_req
);
9131 struct rpccli_lsa_CREDRREAD_state
*state
= tevent_req_data(
9132 req
, struct rpccli_lsa_CREDRREAD_state
);
9134 TALLOC_CTX
*mem_ctx
;
9136 if (state
->out_mem_ctx
) {
9137 mem_ctx
= state
->out_mem_ctx
;
9142 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9143 TALLOC_FREE(subreq
);
9144 if (!NT_STATUS_IS_OK(status
)) {
9145 tevent_req_nterror(req
, status
);
9149 /* Copy out parameters */
9152 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9154 /* Reset temporary structure */
9155 ZERO_STRUCT(state
->tmp
);
9157 tevent_req_done(req
);
9160 NTSTATUS
rpccli_lsa_CREDRREAD_recv(struct tevent_req
*req
,
9161 TALLOC_CTX
*mem_ctx
,
9164 struct rpccli_lsa_CREDRREAD_state
*state
= tevent_req_data(
9165 req
, struct rpccli_lsa_CREDRREAD_state
);
9168 if (tevent_req_is_nterror(req
, &status
)) {
9169 tevent_req_received(req
);
9173 /* Steal possbile out parameters to the callers context */
9174 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9177 *result
= state
->orig
.out
.result
;
9179 tevent_req_received(req
);
9180 return NT_STATUS_OK
;
9183 NTSTATUS
rpccli_lsa_CREDRREAD(struct rpc_pipe_client
*cli
,
9184 TALLOC_CTX
*mem_ctx
)
9186 struct lsa_CREDRREAD r
;
9191 status
= cli
->dispatch(cli
,
9193 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9197 if (!NT_STATUS_IS_OK(status
)) {
9201 if (NT_STATUS_IS_ERR(status
)) {
9205 /* Return variables */
9208 return r
.out
.result
;
9211 struct rpccli_lsa_CREDRENUMERATE_state
{
9212 struct lsa_CREDRENUMERATE orig
;
9213 struct lsa_CREDRENUMERATE tmp
;
9214 TALLOC_CTX
*out_mem_ctx
;
9215 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9218 static void rpccli_lsa_CREDRENUMERATE_done(struct tevent_req
*subreq
);
9220 struct tevent_req
*rpccli_lsa_CREDRENUMERATE_send(TALLOC_CTX
*mem_ctx
,
9221 struct tevent_context
*ev
,
9222 struct rpc_pipe_client
*cli
)
9224 struct tevent_req
*req
;
9225 struct rpccli_lsa_CREDRENUMERATE_state
*state
;
9226 struct tevent_req
*subreq
;
9228 req
= tevent_req_create(mem_ctx
, &state
,
9229 struct rpccli_lsa_CREDRENUMERATE_state
);
9233 state
->out_mem_ctx
= NULL
;
9234 state
->dispatch_recv
= cli
->dispatch_recv
;
9238 /* Out parameters */
9241 ZERO_STRUCT(state
->orig
.out
.result
);
9243 /* make a temporary copy, that we pass to the dispatch function */
9244 state
->tmp
= state
->orig
;
9246 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9247 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9248 NDR_LSA_CREDRENUMERATE
,
9250 if (tevent_req_nomem(subreq
, req
)) {
9251 return tevent_req_post(req
, ev
);
9253 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRENUMERATE_done
, req
);
9257 static void rpccli_lsa_CREDRENUMERATE_done(struct tevent_req
*subreq
)
9259 struct tevent_req
*req
= tevent_req_callback_data(
9260 subreq
, struct tevent_req
);
9261 struct rpccli_lsa_CREDRENUMERATE_state
*state
= tevent_req_data(
9262 req
, struct rpccli_lsa_CREDRENUMERATE_state
);
9264 TALLOC_CTX
*mem_ctx
;
9266 if (state
->out_mem_ctx
) {
9267 mem_ctx
= state
->out_mem_ctx
;
9272 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9273 TALLOC_FREE(subreq
);
9274 if (!NT_STATUS_IS_OK(status
)) {
9275 tevent_req_nterror(req
, status
);
9279 /* Copy out parameters */
9282 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9284 /* Reset temporary structure */
9285 ZERO_STRUCT(state
->tmp
);
9287 tevent_req_done(req
);
9290 NTSTATUS
rpccli_lsa_CREDRENUMERATE_recv(struct tevent_req
*req
,
9291 TALLOC_CTX
*mem_ctx
,
9294 struct rpccli_lsa_CREDRENUMERATE_state
*state
= tevent_req_data(
9295 req
, struct rpccli_lsa_CREDRENUMERATE_state
);
9298 if (tevent_req_is_nterror(req
, &status
)) {
9299 tevent_req_received(req
);
9303 /* Steal possbile out parameters to the callers context */
9304 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9307 *result
= state
->orig
.out
.result
;
9309 tevent_req_received(req
);
9310 return NT_STATUS_OK
;
9313 NTSTATUS
rpccli_lsa_CREDRENUMERATE(struct rpc_pipe_client
*cli
,
9314 TALLOC_CTX
*mem_ctx
)
9316 struct lsa_CREDRENUMERATE r
;
9321 status
= cli
->dispatch(cli
,
9323 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9324 NDR_LSA_CREDRENUMERATE
,
9327 if (!NT_STATUS_IS_OK(status
)) {
9331 if (NT_STATUS_IS_ERR(status
)) {
9335 /* Return variables */
9338 return r
.out
.result
;
9341 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state
{
9342 struct lsa_CREDRWRITEDOMAINCREDENTIALS orig
;
9343 struct lsa_CREDRWRITEDOMAINCREDENTIALS tmp
;
9344 TALLOC_CTX
*out_mem_ctx
;
9345 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9348 static void rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_done(struct tevent_req
*subreq
);
9350 struct tevent_req
*rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_send(TALLOC_CTX
*mem_ctx
,
9351 struct tevent_context
*ev
,
9352 struct rpc_pipe_client
*cli
)
9354 struct tevent_req
*req
;
9355 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state
*state
;
9356 struct tevent_req
*subreq
;
9358 req
= tevent_req_create(mem_ctx
, &state
,
9359 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state
);
9363 state
->out_mem_ctx
= NULL
;
9364 state
->dispatch_recv
= cli
->dispatch_recv
;
9368 /* Out parameters */
9371 ZERO_STRUCT(state
->orig
.out
.result
);
9373 /* make a temporary copy, that we pass to the dispatch function */
9374 state
->tmp
= state
->orig
;
9376 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9377 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9378 NDR_LSA_CREDRWRITEDOMAINCREDENTIALS
,
9380 if (tevent_req_nomem(subreq
, req
)) {
9381 return tevent_req_post(req
, ev
);
9383 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_done
, req
);
9387 static void rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_done(struct tevent_req
*subreq
)
9389 struct tevent_req
*req
= tevent_req_callback_data(
9390 subreq
, struct tevent_req
);
9391 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state
*state
= tevent_req_data(
9392 req
, struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state
);
9394 TALLOC_CTX
*mem_ctx
;
9396 if (state
->out_mem_ctx
) {
9397 mem_ctx
= state
->out_mem_ctx
;
9402 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9403 TALLOC_FREE(subreq
);
9404 if (!NT_STATUS_IS_OK(status
)) {
9405 tevent_req_nterror(req
, status
);
9409 /* Copy out parameters */
9412 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9414 /* Reset temporary structure */
9415 ZERO_STRUCT(state
->tmp
);
9417 tevent_req_done(req
);
9420 NTSTATUS
rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_recv(struct tevent_req
*req
,
9421 TALLOC_CTX
*mem_ctx
,
9424 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state
*state
= tevent_req_data(
9425 req
, struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state
);
9428 if (tevent_req_is_nterror(req
, &status
)) {
9429 tevent_req_received(req
);
9433 /* Steal possbile out parameters to the callers context */
9434 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9437 *result
= state
->orig
.out
.result
;
9439 tevent_req_received(req
);
9440 return NT_STATUS_OK
;
9443 NTSTATUS
rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS(struct rpc_pipe_client
*cli
,
9444 TALLOC_CTX
*mem_ctx
)
9446 struct lsa_CREDRWRITEDOMAINCREDENTIALS r
;
9451 status
= cli
->dispatch(cli
,
9453 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9454 NDR_LSA_CREDRWRITEDOMAINCREDENTIALS
,
9457 if (!NT_STATUS_IS_OK(status
)) {
9461 if (NT_STATUS_IS_ERR(status
)) {
9465 /* Return variables */
9468 return r
.out
.result
;
9471 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state
{
9472 struct lsa_CREDRREADDOMAINCREDENTIALS orig
;
9473 struct lsa_CREDRREADDOMAINCREDENTIALS tmp
;
9474 TALLOC_CTX
*out_mem_ctx
;
9475 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9478 static void rpccli_lsa_CREDRREADDOMAINCREDENTIALS_done(struct tevent_req
*subreq
);
9480 struct tevent_req
*rpccli_lsa_CREDRREADDOMAINCREDENTIALS_send(TALLOC_CTX
*mem_ctx
,
9481 struct tevent_context
*ev
,
9482 struct rpc_pipe_client
*cli
)
9484 struct tevent_req
*req
;
9485 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state
*state
;
9486 struct tevent_req
*subreq
;
9488 req
= tevent_req_create(mem_ctx
, &state
,
9489 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state
);
9493 state
->out_mem_ctx
= NULL
;
9494 state
->dispatch_recv
= cli
->dispatch_recv
;
9498 /* Out parameters */
9501 ZERO_STRUCT(state
->orig
.out
.result
);
9503 /* make a temporary copy, that we pass to the dispatch function */
9504 state
->tmp
= state
->orig
;
9506 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9507 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9508 NDR_LSA_CREDRREADDOMAINCREDENTIALS
,
9510 if (tevent_req_nomem(subreq
, req
)) {
9511 return tevent_req_post(req
, ev
);
9513 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRREADDOMAINCREDENTIALS_done
, req
);
9517 static void rpccli_lsa_CREDRREADDOMAINCREDENTIALS_done(struct tevent_req
*subreq
)
9519 struct tevent_req
*req
= tevent_req_callback_data(
9520 subreq
, struct tevent_req
);
9521 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state
*state
= tevent_req_data(
9522 req
, struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state
);
9524 TALLOC_CTX
*mem_ctx
;
9526 if (state
->out_mem_ctx
) {
9527 mem_ctx
= state
->out_mem_ctx
;
9532 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9533 TALLOC_FREE(subreq
);
9534 if (!NT_STATUS_IS_OK(status
)) {
9535 tevent_req_nterror(req
, status
);
9539 /* Copy out parameters */
9542 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9544 /* Reset temporary structure */
9545 ZERO_STRUCT(state
->tmp
);
9547 tevent_req_done(req
);
9550 NTSTATUS
rpccli_lsa_CREDRREADDOMAINCREDENTIALS_recv(struct tevent_req
*req
,
9551 TALLOC_CTX
*mem_ctx
,
9554 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state
*state
= tevent_req_data(
9555 req
, struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state
);
9558 if (tevent_req_is_nterror(req
, &status
)) {
9559 tevent_req_received(req
);
9563 /* Steal possbile out parameters to the callers context */
9564 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9567 *result
= state
->orig
.out
.result
;
9569 tevent_req_received(req
);
9570 return NT_STATUS_OK
;
9573 NTSTATUS
rpccli_lsa_CREDRREADDOMAINCREDENTIALS(struct rpc_pipe_client
*cli
,
9574 TALLOC_CTX
*mem_ctx
)
9576 struct lsa_CREDRREADDOMAINCREDENTIALS r
;
9581 status
= cli
->dispatch(cli
,
9583 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9584 NDR_LSA_CREDRREADDOMAINCREDENTIALS
,
9587 if (!NT_STATUS_IS_OK(status
)) {
9591 if (NT_STATUS_IS_ERR(status
)) {
9595 /* Return variables */
9598 return r
.out
.result
;
9601 struct rpccli_lsa_CREDRDELETE_state
{
9602 struct lsa_CREDRDELETE orig
;
9603 struct lsa_CREDRDELETE tmp
;
9604 TALLOC_CTX
*out_mem_ctx
;
9605 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9608 static void rpccli_lsa_CREDRDELETE_done(struct tevent_req
*subreq
);
9610 struct tevent_req
*rpccli_lsa_CREDRDELETE_send(TALLOC_CTX
*mem_ctx
,
9611 struct tevent_context
*ev
,
9612 struct rpc_pipe_client
*cli
)
9614 struct tevent_req
*req
;
9615 struct rpccli_lsa_CREDRDELETE_state
*state
;
9616 struct tevent_req
*subreq
;
9618 req
= tevent_req_create(mem_ctx
, &state
,
9619 struct rpccli_lsa_CREDRDELETE_state
);
9623 state
->out_mem_ctx
= NULL
;
9624 state
->dispatch_recv
= cli
->dispatch_recv
;
9628 /* Out parameters */
9631 ZERO_STRUCT(state
->orig
.out
.result
);
9633 /* make a temporary copy, that we pass to the dispatch function */
9634 state
->tmp
= state
->orig
;
9636 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9637 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9638 NDR_LSA_CREDRDELETE
,
9640 if (tevent_req_nomem(subreq
, req
)) {
9641 return tevent_req_post(req
, ev
);
9643 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRDELETE_done
, req
);
9647 static void rpccli_lsa_CREDRDELETE_done(struct tevent_req
*subreq
)
9649 struct tevent_req
*req
= tevent_req_callback_data(
9650 subreq
, struct tevent_req
);
9651 struct rpccli_lsa_CREDRDELETE_state
*state
= tevent_req_data(
9652 req
, struct rpccli_lsa_CREDRDELETE_state
);
9654 TALLOC_CTX
*mem_ctx
;
9656 if (state
->out_mem_ctx
) {
9657 mem_ctx
= state
->out_mem_ctx
;
9662 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9663 TALLOC_FREE(subreq
);
9664 if (!NT_STATUS_IS_OK(status
)) {
9665 tevent_req_nterror(req
, status
);
9669 /* Copy out parameters */
9672 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9674 /* Reset temporary structure */
9675 ZERO_STRUCT(state
->tmp
);
9677 tevent_req_done(req
);
9680 NTSTATUS
rpccli_lsa_CREDRDELETE_recv(struct tevent_req
*req
,
9681 TALLOC_CTX
*mem_ctx
,
9684 struct rpccli_lsa_CREDRDELETE_state
*state
= tevent_req_data(
9685 req
, struct rpccli_lsa_CREDRDELETE_state
);
9688 if (tevent_req_is_nterror(req
, &status
)) {
9689 tevent_req_received(req
);
9693 /* Steal possbile out parameters to the callers context */
9694 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9697 *result
= state
->orig
.out
.result
;
9699 tevent_req_received(req
);
9700 return NT_STATUS_OK
;
9703 NTSTATUS
rpccli_lsa_CREDRDELETE(struct rpc_pipe_client
*cli
,
9704 TALLOC_CTX
*mem_ctx
)
9706 struct lsa_CREDRDELETE r
;
9711 status
= cli
->dispatch(cli
,
9713 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9714 NDR_LSA_CREDRDELETE
,
9717 if (!NT_STATUS_IS_OK(status
)) {
9721 if (NT_STATUS_IS_ERR(status
)) {
9725 /* Return variables */
9728 return r
.out
.result
;
9731 struct rpccli_lsa_CREDRGETTARGETINFO_state
{
9732 struct lsa_CREDRGETTARGETINFO orig
;
9733 struct lsa_CREDRGETTARGETINFO tmp
;
9734 TALLOC_CTX
*out_mem_ctx
;
9735 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9738 static void rpccli_lsa_CREDRGETTARGETINFO_done(struct tevent_req
*subreq
);
9740 struct tevent_req
*rpccli_lsa_CREDRGETTARGETINFO_send(TALLOC_CTX
*mem_ctx
,
9741 struct tevent_context
*ev
,
9742 struct rpc_pipe_client
*cli
)
9744 struct tevent_req
*req
;
9745 struct rpccli_lsa_CREDRGETTARGETINFO_state
*state
;
9746 struct tevent_req
*subreq
;
9748 req
= tevent_req_create(mem_ctx
, &state
,
9749 struct rpccli_lsa_CREDRGETTARGETINFO_state
);
9753 state
->out_mem_ctx
= NULL
;
9754 state
->dispatch_recv
= cli
->dispatch_recv
;
9758 /* Out parameters */
9761 ZERO_STRUCT(state
->orig
.out
.result
);
9763 /* make a temporary copy, that we pass to the dispatch function */
9764 state
->tmp
= state
->orig
;
9766 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9767 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9768 NDR_LSA_CREDRGETTARGETINFO
,
9770 if (tevent_req_nomem(subreq
, req
)) {
9771 return tevent_req_post(req
, ev
);
9773 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRGETTARGETINFO_done
, req
);
9777 static void rpccli_lsa_CREDRGETTARGETINFO_done(struct tevent_req
*subreq
)
9779 struct tevent_req
*req
= tevent_req_callback_data(
9780 subreq
, struct tevent_req
);
9781 struct rpccli_lsa_CREDRGETTARGETINFO_state
*state
= tevent_req_data(
9782 req
, struct rpccli_lsa_CREDRGETTARGETINFO_state
);
9784 TALLOC_CTX
*mem_ctx
;
9786 if (state
->out_mem_ctx
) {
9787 mem_ctx
= state
->out_mem_ctx
;
9792 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9793 TALLOC_FREE(subreq
);
9794 if (!NT_STATUS_IS_OK(status
)) {
9795 tevent_req_nterror(req
, status
);
9799 /* Copy out parameters */
9802 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9804 /* Reset temporary structure */
9805 ZERO_STRUCT(state
->tmp
);
9807 tevent_req_done(req
);
9810 NTSTATUS
rpccli_lsa_CREDRGETTARGETINFO_recv(struct tevent_req
*req
,
9811 TALLOC_CTX
*mem_ctx
,
9814 struct rpccli_lsa_CREDRGETTARGETINFO_state
*state
= tevent_req_data(
9815 req
, struct rpccli_lsa_CREDRGETTARGETINFO_state
);
9818 if (tevent_req_is_nterror(req
, &status
)) {
9819 tevent_req_received(req
);
9823 /* Steal possbile out parameters to the callers context */
9824 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9827 *result
= state
->orig
.out
.result
;
9829 tevent_req_received(req
);
9830 return NT_STATUS_OK
;
9833 NTSTATUS
rpccli_lsa_CREDRGETTARGETINFO(struct rpc_pipe_client
*cli
,
9834 TALLOC_CTX
*mem_ctx
)
9836 struct lsa_CREDRGETTARGETINFO r
;
9841 status
= cli
->dispatch(cli
,
9843 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9844 NDR_LSA_CREDRGETTARGETINFO
,
9847 if (!NT_STATUS_IS_OK(status
)) {
9851 if (NT_STATUS_IS_ERR(status
)) {
9855 /* Return variables */
9858 return r
.out
.result
;
9861 struct rpccli_lsa_CREDRPROFILELOADED_state
{
9862 struct lsa_CREDRPROFILELOADED orig
;
9863 struct lsa_CREDRPROFILELOADED tmp
;
9864 TALLOC_CTX
*out_mem_ctx
;
9865 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9868 static void rpccli_lsa_CREDRPROFILELOADED_done(struct tevent_req
*subreq
);
9870 struct tevent_req
*rpccli_lsa_CREDRPROFILELOADED_send(TALLOC_CTX
*mem_ctx
,
9871 struct tevent_context
*ev
,
9872 struct rpc_pipe_client
*cli
)
9874 struct tevent_req
*req
;
9875 struct rpccli_lsa_CREDRPROFILELOADED_state
*state
;
9876 struct tevent_req
*subreq
;
9878 req
= tevent_req_create(mem_ctx
, &state
,
9879 struct rpccli_lsa_CREDRPROFILELOADED_state
);
9883 state
->out_mem_ctx
= NULL
;
9884 state
->dispatch_recv
= cli
->dispatch_recv
;
9888 /* Out parameters */
9891 ZERO_STRUCT(state
->orig
.out
.result
);
9893 /* make a temporary copy, that we pass to the dispatch function */
9894 state
->tmp
= state
->orig
;
9896 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9897 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9898 NDR_LSA_CREDRPROFILELOADED
,
9900 if (tevent_req_nomem(subreq
, req
)) {
9901 return tevent_req_post(req
, ev
);
9903 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRPROFILELOADED_done
, req
);
9907 static void rpccli_lsa_CREDRPROFILELOADED_done(struct tevent_req
*subreq
)
9909 struct tevent_req
*req
= tevent_req_callback_data(
9910 subreq
, struct tevent_req
);
9911 struct rpccli_lsa_CREDRPROFILELOADED_state
*state
= tevent_req_data(
9912 req
, struct rpccli_lsa_CREDRPROFILELOADED_state
);
9914 TALLOC_CTX
*mem_ctx
;
9916 if (state
->out_mem_ctx
) {
9917 mem_ctx
= state
->out_mem_ctx
;
9922 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9923 TALLOC_FREE(subreq
);
9924 if (!NT_STATUS_IS_OK(status
)) {
9925 tevent_req_nterror(req
, status
);
9929 /* Copy out parameters */
9932 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9934 /* Reset temporary structure */
9935 ZERO_STRUCT(state
->tmp
);
9937 tevent_req_done(req
);
9940 NTSTATUS
rpccli_lsa_CREDRPROFILELOADED_recv(struct tevent_req
*req
,
9941 TALLOC_CTX
*mem_ctx
,
9944 struct rpccli_lsa_CREDRPROFILELOADED_state
*state
= tevent_req_data(
9945 req
, struct rpccli_lsa_CREDRPROFILELOADED_state
);
9948 if (tevent_req_is_nterror(req
, &status
)) {
9949 tevent_req_received(req
);
9953 /* Steal possbile out parameters to the callers context */
9954 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9957 *result
= state
->orig
.out
.result
;
9959 tevent_req_received(req
);
9960 return NT_STATUS_OK
;
9963 NTSTATUS
rpccli_lsa_CREDRPROFILELOADED(struct rpc_pipe_client
*cli
,
9964 TALLOC_CTX
*mem_ctx
)
9966 struct lsa_CREDRPROFILELOADED r
;
9971 status
= cli
->dispatch(cli
,
9973 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
9974 NDR_LSA_CREDRPROFILELOADED
,
9977 if (!NT_STATUS_IS_OK(status
)) {
9981 if (NT_STATUS_IS_ERR(status
)) {
9985 /* Return variables */
9988 return r
.out
.result
;
9991 struct rpccli_lsa_LookupNames3_state
{
9992 struct lsa_LookupNames3 orig
;
9993 struct lsa_LookupNames3 tmp
;
9994 TALLOC_CTX
*out_mem_ctx
;
9995 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9998 static void rpccli_lsa_LookupNames3_done(struct tevent_req
*subreq
);
10000 struct tevent_req
*rpccli_lsa_LookupNames3_send(TALLOC_CTX
*mem_ctx
,
10001 struct tevent_context
*ev
,
10002 struct rpc_pipe_client
*cli
,
10003 struct policy_handle
*_handle
/* [in] [ref] */,
10004 uint32_t _num_names
/* [in] [range(0,1000)] */,
10005 struct lsa_String
*_names
/* [in] [size_is(num_names)] */,
10006 struct lsa_RefDomainList
**_domains
/* [out] [ref] */,
10007 struct lsa_TransSidArray3
*_sids
/* [in,out] [ref] */,
10008 enum lsa_LookupNamesLevel _level
/* [in] */,
10009 uint32_t *_count
/* [in,out] [ref] */,
10010 enum lsa_LookupOptions _lookup_options
/* [in] */,
10011 enum lsa_ClientRevision _client_revision
/* [in] */)
10013 struct tevent_req
*req
;
10014 struct rpccli_lsa_LookupNames3_state
*state
;
10015 struct tevent_req
*subreq
;
10017 req
= tevent_req_create(mem_ctx
, &state
,
10018 struct rpccli_lsa_LookupNames3_state
);
10022 state
->out_mem_ctx
= NULL
;
10023 state
->dispatch_recv
= cli
->dispatch_recv
;
10025 /* In parameters */
10026 state
->orig
.in
.handle
= _handle
;
10027 state
->orig
.in
.num_names
= _num_names
;
10028 state
->orig
.in
.names
= _names
;
10029 state
->orig
.in
.sids
= _sids
;
10030 state
->orig
.in
.level
= _level
;
10031 state
->orig
.in
.count
= _count
;
10032 state
->orig
.in
.lookup_options
= _lookup_options
;
10033 state
->orig
.in
.client_revision
= _client_revision
;
10035 /* Out parameters */
10036 state
->orig
.out
.domains
= _domains
;
10037 state
->orig
.out
.sids
= _sids
;
10038 state
->orig
.out
.count
= _count
;
10041 ZERO_STRUCT(state
->orig
.out
.result
);
10043 state
->out_mem_ctx
= talloc_named_const(state
, 0,
10044 "rpccli_lsa_LookupNames3_out_memory");
10045 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
10046 return tevent_req_post(req
, ev
);
10049 /* make a temporary copy, that we pass to the dispatch function */
10050 state
->tmp
= state
->orig
;
10052 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10053 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
10054 NDR_LSA_LOOKUPNAMES3
,
10056 if (tevent_req_nomem(subreq
, req
)) {
10057 return tevent_req_post(req
, ev
);
10059 tevent_req_set_callback(subreq
, rpccli_lsa_LookupNames3_done
, req
);
10063 static void rpccli_lsa_LookupNames3_done(struct tevent_req
*subreq
)
10065 struct tevent_req
*req
= tevent_req_callback_data(
10066 subreq
, struct tevent_req
);
10067 struct rpccli_lsa_LookupNames3_state
*state
= tevent_req_data(
10068 req
, struct rpccli_lsa_LookupNames3_state
);
10070 TALLOC_CTX
*mem_ctx
;
10072 if (state
->out_mem_ctx
) {
10073 mem_ctx
= state
->out_mem_ctx
;
10078 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10079 TALLOC_FREE(subreq
);
10080 if (!NT_STATUS_IS_OK(status
)) {
10081 tevent_req_nterror(req
, status
);
10085 /* Copy out parameters */
10086 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
10087 *state
->orig
.out
.sids
= *state
->tmp
.out
.sids
;
10088 *state
->orig
.out
.count
= *state
->tmp
.out
.count
;
10091 state
->orig
.out
.result
= state
->tmp
.out
.result
;
10093 /* Reset temporary structure */
10094 ZERO_STRUCT(state
->tmp
);
10096 tevent_req_done(req
);
10099 NTSTATUS
rpccli_lsa_LookupNames3_recv(struct tevent_req
*req
,
10100 TALLOC_CTX
*mem_ctx
,
10103 struct rpccli_lsa_LookupNames3_state
*state
= tevent_req_data(
10104 req
, struct rpccli_lsa_LookupNames3_state
);
10107 if (tevent_req_is_nterror(req
, &status
)) {
10108 tevent_req_received(req
);
10112 /* Steal possbile out parameters to the callers context */
10113 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10115 /* Return result */
10116 *result
= state
->orig
.out
.result
;
10118 tevent_req_received(req
);
10119 return NT_STATUS_OK
;
10122 NTSTATUS
rpccli_lsa_LookupNames3(struct rpc_pipe_client
*cli
,
10123 TALLOC_CTX
*mem_ctx
,
10124 struct policy_handle
*handle
/* [in] [ref] */,
10125 uint32_t num_names
/* [in] [range(0,1000)] */,
10126 struct lsa_String
*names
/* [in] [size_is(num_names)] */,
10127 struct lsa_RefDomainList
**domains
/* [out] [ref] */,
10128 struct lsa_TransSidArray3
*sids
/* [in,out] [ref] */,
10129 enum lsa_LookupNamesLevel level
/* [in] */,
10130 uint32_t *count
/* [in,out] [ref] */,
10131 enum lsa_LookupOptions lookup_options
/* [in] */,
10132 enum lsa_ClientRevision client_revision
/* [in] */)
10134 struct lsa_LookupNames3 r
;
10137 /* In parameters */
10138 r
.in
.handle
= handle
;
10139 r
.in
.num_names
= num_names
;
10140 r
.in
.names
= names
;
10142 r
.in
.level
= level
;
10143 r
.in
.count
= count
;
10144 r
.in
.lookup_options
= lookup_options
;
10145 r
.in
.client_revision
= client_revision
;
10147 status
= cli
->dispatch(cli
,
10149 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
10150 NDR_LSA_LOOKUPNAMES3
,
10153 if (!NT_STATUS_IS_OK(status
)) {
10157 if (NT_STATUS_IS_ERR(status
)) {
10161 /* Return variables */
10162 *domains
= *r
.out
.domains
;
10163 *sids
= *r
.out
.sids
;
10164 *count
= *r
.out
.count
;
10166 /* Return result */
10167 return r
.out
.result
;
10170 struct rpccli_lsa_CREDRGETSESSIONTYPES_state
{
10171 struct lsa_CREDRGETSESSIONTYPES orig
;
10172 struct lsa_CREDRGETSESSIONTYPES tmp
;
10173 TALLOC_CTX
*out_mem_ctx
;
10174 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10177 static void rpccli_lsa_CREDRGETSESSIONTYPES_done(struct tevent_req
*subreq
);
10179 struct tevent_req
*rpccli_lsa_CREDRGETSESSIONTYPES_send(TALLOC_CTX
*mem_ctx
,
10180 struct tevent_context
*ev
,
10181 struct rpc_pipe_client
*cli
)
10183 struct tevent_req
*req
;
10184 struct rpccli_lsa_CREDRGETSESSIONTYPES_state
*state
;
10185 struct tevent_req
*subreq
;
10187 req
= tevent_req_create(mem_ctx
, &state
,
10188 struct rpccli_lsa_CREDRGETSESSIONTYPES_state
);
10192 state
->out_mem_ctx
= NULL
;
10193 state
->dispatch_recv
= cli
->dispatch_recv
;
10195 /* In parameters */
10197 /* Out parameters */
10200 ZERO_STRUCT(state
->orig
.out
.result
);
10202 /* make a temporary copy, that we pass to the dispatch function */
10203 state
->tmp
= state
->orig
;
10205 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10206 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
10207 NDR_LSA_CREDRGETSESSIONTYPES
,
10209 if (tevent_req_nomem(subreq
, req
)) {
10210 return tevent_req_post(req
, ev
);
10212 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRGETSESSIONTYPES_done
, req
);
10216 static void rpccli_lsa_CREDRGETSESSIONTYPES_done(struct tevent_req
*subreq
)
10218 struct tevent_req
*req
= tevent_req_callback_data(
10219 subreq
, struct tevent_req
);
10220 struct rpccli_lsa_CREDRGETSESSIONTYPES_state
*state
= tevent_req_data(
10221 req
, struct rpccli_lsa_CREDRGETSESSIONTYPES_state
);
10223 TALLOC_CTX
*mem_ctx
;
10225 if (state
->out_mem_ctx
) {
10226 mem_ctx
= state
->out_mem_ctx
;
10231 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10232 TALLOC_FREE(subreq
);
10233 if (!NT_STATUS_IS_OK(status
)) {
10234 tevent_req_nterror(req
, status
);
10238 /* Copy out parameters */
10241 state
->orig
.out
.result
= state
->tmp
.out
.result
;
10243 /* Reset temporary structure */
10244 ZERO_STRUCT(state
->tmp
);
10246 tevent_req_done(req
);
10249 NTSTATUS
rpccli_lsa_CREDRGETSESSIONTYPES_recv(struct tevent_req
*req
,
10250 TALLOC_CTX
*mem_ctx
,
10253 struct rpccli_lsa_CREDRGETSESSIONTYPES_state
*state
= tevent_req_data(
10254 req
, struct rpccli_lsa_CREDRGETSESSIONTYPES_state
);
10257 if (tevent_req_is_nterror(req
, &status
)) {
10258 tevent_req_received(req
);
10262 /* Steal possbile out parameters to the callers context */
10263 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10265 /* Return result */
10266 *result
= state
->orig
.out
.result
;
10268 tevent_req_received(req
);
10269 return NT_STATUS_OK
;
10272 NTSTATUS
rpccli_lsa_CREDRGETSESSIONTYPES(struct rpc_pipe_client
*cli
,
10273 TALLOC_CTX
*mem_ctx
)
10275 struct lsa_CREDRGETSESSIONTYPES r
;
10278 /* In parameters */
10280 status
= cli
->dispatch(cli
,
10282 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
10283 NDR_LSA_CREDRGETSESSIONTYPES
,
10286 if (!NT_STATUS_IS_OK(status
)) {
10290 if (NT_STATUS_IS_ERR(status
)) {
10294 /* Return variables */
10296 /* Return result */
10297 return r
.out
.result
;
10300 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state
{
10301 struct lsa_LSARREGISTERAUDITEVENT orig
;
10302 struct lsa_LSARREGISTERAUDITEVENT tmp
;
10303 TALLOC_CTX
*out_mem_ctx
;
10304 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10307 static void rpccli_lsa_LSARREGISTERAUDITEVENT_done(struct tevent_req
*subreq
);
10309 struct tevent_req
*rpccli_lsa_LSARREGISTERAUDITEVENT_send(TALLOC_CTX
*mem_ctx
,
10310 struct tevent_context
*ev
,
10311 struct rpc_pipe_client
*cli
)
10313 struct tevent_req
*req
;
10314 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state
*state
;
10315 struct tevent_req
*subreq
;
10317 req
= tevent_req_create(mem_ctx
, &state
,
10318 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state
);
10322 state
->out_mem_ctx
= NULL
;
10323 state
->dispatch_recv
= cli
->dispatch_recv
;
10325 /* In parameters */
10327 /* Out parameters */
10330 ZERO_STRUCT(state
->orig
.out
.result
);
10332 /* make a temporary copy, that we pass to the dispatch function */
10333 state
->tmp
= state
->orig
;
10335 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10336 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
10337 NDR_LSA_LSARREGISTERAUDITEVENT
,
10339 if (tevent_req_nomem(subreq
, req
)) {
10340 return tevent_req_post(req
, ev
);
10342 tevent_req_set_callback(subreq
, rpccli_lsa_LSARREGISTERAUDITEVENT_done
, req
);
10346 static void rpccli_lsa_LSARREGISTERAUDITEVENT_done(struct tevent_req
*subreq
)
10348 struct tevent_req
*req
= tevent_req_callback_data(
10349 subreq
, struct tevent_req
);
10350 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state
*state
= tevent_req_data(
10351 req
, struct rpccli_lsa_LSARREGISTERAUDITEVENT_state
);
10353 TALLOC_CTX
*mem_ctx
;
10355 if (state
->out_mem_ctx
) {
10356 mem_ctx
= state
->out_mem_ctx
;
10361 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10362 TALLOC_FREE(subreq
);
10363 if (!NT_STATUS_IS_OK(status
)) {
10364 tevent_req_nterror(req
, status
);
10368 /* Copy out parameters */
10371 state
->orig
.out
.result
= state
->tmp
.out
.result
;
10373 /* Reset temporary structure */
10374 ZERO_STRUCT(state
->tmp
);
10376 tevent_req_done(req
);
10379 NTSTATUS
rpccli_lsa_LSARREGISTERAUDITEVENT_recv(struct tevent_req
*req
,
10380 TALLOC_CTX
*mem_ctx
,
10383 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state
*state
= tevent_req_data(
10384 req
, struct rpccli_lsa_LSARREGISTERAUDITEVENT_state
);
10387 if (tevent_req_is_nterror(req
, &status
)) {
10388 tevent_req_received(req
);
10392 /* Steal possbile out parameters to the callers context */
10393 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10395 /* Return result */
10396 *result
= state
->orig
.out
.result
;
10398 tevent_req_received(req
);
10399 return NT_STATUS_OK
;
10402 NTSTATUS
rpccli_lsa_LSARREGISTERAUDITEVENT(struct rpc_pipe_client
*cli
,
10403 TALLOC_CTX
*mem_ctx
)
10405 struct lsa_LSARREGISTERAUDITEVENT r
;
10408 /* In parameters */
10410 status
= cli
->dispatch(cli
,
10412 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
10413 NDR_LSA_LSARREGISTERAUDITEVENT
,
10416 if (!NT_STATUS_IS_OK(status
)) {
10420 if (NT_STATUS_IS_ERR(status
)) {
10424 /* Return variables */
10426 /* Return result */
10427 return r
.out
.result
;
10430 struct rpccli_lsa_LSARGENAUDITEVENT_state
{
10431 struct lsa_LSARGENAUDITEVENT orig
;
10432 struct lsa_LSARGENAUDITEVENT tmp
;
10433 TALLOC_CTX
*out_mem_ctx
;
10434 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10437 static void rpccli_lsa_LSARGENAUDITEVENT_done(struct tevent_req
*subreq
);
10439 struct tevent_req
*rpccli_lsa_LSARGENAUDITEVENT_send(TALLOC_CTX
*mem_ctx
,
10440 struct tevent_context
*ev
,
10441 struct rpc_pipe_client
*cli
)
10443 struct tevent_req
*req
;
10444 struct rpccli_lsa_LSARGENAUDITEVENT_state
*state
;
10445 struct tevent_req
*subreq
;
10447 req
= tevent_req_create(mem_ctx
, &state
,
10448 struct rpccli_lsa_LSARGENAUDITEVENT_state
);
10452 state
->out_mem_ctx
= NULL
;
10453 state
->dispatch_recv
= cli
->dispatch_recv
;
10455 /* In parameters */
10457 /* Out parameters */
10460 ZERO_STRUCT(state
->orig
.out
.result
);
10462 /* make a temporary copy, that we pass to the dispatch function */
10463 state
->tmp
= state
->orig
;
10465 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10466 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
10467 NDR_LSA_LSARGENAUDITEVENT
,
10469 if (tevent_req_nomem(subreq
, req
)) {
10470 return tevent_req_post(req
, ev
);
10472 tevent_req_set_callback(subreq
, rpccli_lsa_LSARGENAUDITEVENT_done
, req
);
10476 static void rpccli_lsa_LSARGENAUDITEVENT_done(struct tevent_req
*subreq
)
10478 struct tevent_req
*req
= tevent_req_callback_data(
10479 subreq
, struct tevent_req
);
10480 struct rpccli_lsa_LSARGENAUDITEVENT_state
*state
= tevent_req_data(
10481 req
, struct rpccli_lsa_LSARGENAUDITEVENT_state
);
10483 TALLOC_CTX
*mem_ctx
;
10485 if (state
->out_mem_ctx
) {
10486 mem_ctx
= state
->out_mem_ctx
;
10491 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10492 TALLOC_FREE(subreq
);
10493 if (!NT_STATUS_IS_OK(status
)) {
10494 tevent_req_nterror(req
, status
);
10498 /* Copy out parameters */
10501 state
->orig
.out
.result
= state
->tmp
.out
.result
;
10503 /* Reset temporary structure */
10504 ZERO_STRUCT(state
->tmp
);
10506 tevent_req_done(req
);
10509 NTSTATUS
rpccli_lsa_LSARGENAUDITEVENT_recv(struct tevent_req
*req
,
10510 TALLOC_CTX
*mem_ctx
,
10513 struct rpccli_lsa_LSARGENAUDITEVENT_state
*state
= tevent_req_data(
10514 req
, struct rpccli_lsa_LSARGENAUDITEVENT_state
);
10517 if (tevent_req_is_nterror(req
, &status
)) {
10518 tevent_req_received(req
);
10522 /* Steal possbile out parameters to the callers context */
10523 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10525 /* Return result */
10526 *result
= state
->orig
.out
.result
;
10528 tevent_req_received(req
);
10529 return NT_STATUS_OK
;
10532 NTSTATUS
rpccli_lsa_LSARGENAUDITEVENT(struct rpc_pipe_client
*cli
,
10533 TALLOC_CTX
*mem_ctx
)
10535 struct lsa_LSARGENAUDITEVENT r
;
10538 /* In parameters */
10540 status
= cli
->dispatch(cli
,
10542 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
10543 NDR_LSA_LSARGENAUDITEVENT
,
10546 if (!NT_STATUS_IS_OK(status
)) {
10550 if (NT_STATUS_IS_ERR(status
)) {
10554 /* Return variables */
10556 /* Return result */
10557 return r
.out
.result
;
10560 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state
{
10561 struct lsa_LSARUNREGISTERAUDITEVENT orig
;
10562 struct lsa_LSARUNREGISTERAUDITEVENT tmp
;
10563 TALLOC_CTX
*out_mem_ctx
;
10564 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10567 static void rpccli_lsa_LSARUNREGISTERAUDITEVENT_done(struct tevent_req
*subreq
);
10569 struct tevent_req
*rpccli_lsa_LSARUNREGISTERAUDITEVENT_send(TALLOC_CTX
*mem_ctx
,
10570 struct tevent_context
*ev
,
10571 struct rpc_pipe_client
*cli
)
10573 struct tevent_req
*req
;
10574 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state
*state
;
10575 struct tevent_req
*subreq
;
10577 req
= tevent_req_create(mem_ctx
, &state
,
10578 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state
);
10582 state
->out_mem_ctx
= NULL
;
10583 state
->dispatch_recv
= cli
->dispatch_recv
;
10585 /* In parameters */
10587 /* Out parameters */
10590 ZERO_STRUCT(state
->orig
.out
.result
);
10592 /* make a temporary copy, that we pass to the dispatch function */
10593 state
->tmp
= state
->orig
;
10595 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10596 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
10597 NDR_LSA_LSARUNREGISTERAUDITEVENT
,
10599 if (tevent_req_nomem(subreq
, req
)) {
10600 return tevent_req_post(req
, ev
);
10602 tevent_req_set_callback(subreq
, rpccli_lsa_LSARUNREGISTERAUDITEVENT_done
, req
);
10606 static void rpccli_lsa_LSARUNREGISTERAUDITEVENT_done(struct tevent_req
*subreq
)
10608 struct tevent_req
*req
= tevent_req_callback_data(
10609 subreq
, struct tevent_req
);
10610 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state
*state
= tevent_req_data(
10611 req
, struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state
);
10613 TALLOC_CTX
*mem_ctx
;
10615 if (state
->out_mem_ctx
) {
10616 mem_ctx
= state
->out_mem_ctx
;
10621 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10622 TALLOC_FREE(subreq
);
10623 if (!NT_STATUS_IS_OK(status
)) {
10624 tevent_req_nterror(req
, status
);
10628 /* Copy out parameters */
10631 state
->orig
.out
.result
= state
->tmp
.out
.result
;
10633 /* Reset temporary structure */
10634 ZERO_STRUCT(state
->tmp
);
10636 tevent_req_done(req
);
10639 NTSTATUS
rpccli_lsa_LSARUNREGISTERAUDITEVENT_recv(struct tevent_req
*req
,
10640 TALLOC_CTX
*mem_ctx
,
10643 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state
*state
= tevent_req_data(
10644 req
, struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state
);
10647 if (tevent_req_is_nterror(req
, &status
)) {
10648 tevent_req_received(req
);
10652 /* Steal possbile out parameters to the callers context */
10653 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10655 /* Return result */
10656 *result
= state
->orig
.out
.result
;
10658 tevent_req_received(req
);
10659 return NT_STATUS_OK
;
10662 NTSTATUS
rpccli_lsa_LSARUNREGISTERAUDITEVENT(struct rpc_pipe_client
*cli
,
10663 TALLOC_CTX
*mem_ctx
)
10665 struct lsa_LSARUNREGISTERAUDITEVENT r
;
10668 /* In parameters */
10670 status
= cli
->dispatch(cli
,
10672 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
10673 NDR_LSA_LSARUNREGISTERAUDITEVENT
,
10676 if (!NT_STATUS_IS_OK(status
)) {
10680 if (NT_STATUS_IS_ERR(status
)) {
10684 /* Return variables */
10686 /* Return result */
10687 return r
.out
.result
;
10690 struct rpccli_lsa_lsaRQueryForestTrustInformation_state
{
10691 struct lsa_lsaRQueryForestTrustInformation orig
;
10692 struct lsa_lsaRQueryForestTrustInformation tmp
;
10693 TALLOC_CTX
*out_mem_ctx
;
10694 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10697 static void rpccli_lsa_lsaRQueryForestTrustInformation_done(struct tevent_req
*subreq
);
10699 struct tevent_req
*rpccli_lsa_lsaRQueryForestTrustInformation_send(TALLOC_CTX
*mem_ctx
,
10700 struct tevent_context
*ev
,
10701 struct rpc_pipe_client
*cli
,
10702 struct policy_handle
*_handle
/* [in] [ref] */,
10703 struct lsa_String
*_trusted_domain_name
/* [in] [ref] */,
10704 uint16_t _unknown
/* [in] */,
10705 struct lsa_ForestTrustInformation
**_forest_trust_info
/* [out] [ref] */)
10707 struct tevent_req
*req
;
10708 struct rpccli_lsa_lsaRQueryForestTrustInformation_state
*state
;
10709 struct tevent_req
*subreq
;
10711 req
= tevent_req_create(mem_ctx
, &state
,
10712 struct rpccli_lsa_lsaRQueryForestTrustInformation_state
);
10716 state
->out_mem_ctx
= NULL
;
10717 state
->dispatch_recv
= cli
->dispatch_recv
;
10719 /* In parameters */
10720 state
->orig
.in
.handle
= _handle
;
10721 state
->orig
.in
.trusted_domain_name
= _trusted_domain_name
;
10722 state
->orig
.in
.unknown
= _unknown
;
10724 /* Out parameters */
10725 state
->orig
.out
.forest_trust_info
= _forest_trust_info
;
10728 ZERO_STRUCT(state
->orig
.out
.result
);
10730 state
->out_mem_ctx
= talloc_named_const(state
, 0,
10731 "rpccli_lsa_lsaRQueryForestTrustInformation_out_memory");
10732 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
10733 return tevent_req_post(req
, ev
);
10736 /* make a temporary copy, that we pass to the dispatch function */
10737 state
->tmp
= state
->orig
;
10739 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10740 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
10741 NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION
,
10743 if (tevent_req_nomem(subreq
, req
)) {
10744 return tevent_req_post(req
, ev
);
10746 tevent_req_set_callback(subreq
, rpccli_lsa_lsaRQueryForestTrustInformation_done
, req
);
10750 static void rpccli_lsa_lsaRQueryForestTrustInformation_done(struct tevent_req
*subreq
)
10752 struct tevent_req
*req
= tevent_req_callback_data(
10753 subreq
, struct tevent_req
);
10754 struct rpccli_lsa_lsaRQueryForestTrustInformation_state
*state
= tevent_req_data(
10755 req
, struct rpccli_lsa_lsaRQueryForestTrustInformation_state
);
10757 TALLOC_CTX
*mem_ctx
;
10759 if (state
->out_mem_ctx
) {
10760 mem_ctx
= state
->out_mem_ctx
;
10765 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10766 TALLOC_FREE(subreq
);
10767 if (!NT_STATUS_IS_OK(status
)) {
10768 tevent_req_nterror(req
, status
);
10772 /* Copy out parameters */
10773 *state
->orig
.out
.forest_trust_info
= *state
->tmp
.out
.forest_trust_info
;
10776 state
->orig
.out
.result
= state
->tmp
.out
.result
;
10778 /* Reset temporary structure */
10779 ZERO_STRUCT(state
->tmp
);
10781 tevent_req_done(req
);
10784 NTSTATUS
rpccli_lsa_lsaRQueryForestTrustInformation_recv(struct tevent_req
*req
,
10785 TALLOC_CTX
*mem_ctx
,
10788 struct rpccli_lsa_lsaRQueryForestTrustInformation_state
*state
= tevent_req_data(
10789 req
, struct rpccli_lsa_lsaRQueryForestTrustInformation_state
);
10792 if (tevent_req_is_nterror(req
, &status
)) {
10793 tevent_req_received(req
);
10797 /* Steal possbile out parameters to the callers context */
10798 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10800 /* Return result */
10801 *result
= state
->orig
.out
.result
;
10803 tevent_req_received(req
);
10804 return NT_STATUS_OK
;
10807 NTSTATUS
rpccli_lsa_lsaRQueryForestTrustInformation(struct rpc_pipe_client
*cli
,
10808 TALLOC_CTX
*mem_ctx
,
10809 struct policy_handle
*handle
/* [in] [ref] */,
10810 struct lsa_String
*trusted_domain_name
/* [in] [ref] */,
10811 uint16_t unknown
/* [in] */,
10812 struct lsa_ForestTrustInformation
**forest_trust_info
/* [out] [ref] */)
10814 struct lsa_lsaRQueryForestTrustInformation r
;
10817 /* In parameters */
10818 r
.in
.handle
= handle
;
10819 r
.in
.trusted_domain_name
= trusted_domain_name
;
10820 r
.in
.unknown
= unknown
;
10822 status
= cli
->dispatch(cli
,
10824 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
10825 NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION
,
10828 if (!NT_STATUS_IS_OK(status
)) {
10832 if (NT_STATUS_IS_ERR(status
)) {
10836 /* Return variables */
10837 *forest_trust_info
= *r
.out
.forest_trust_info
;
10839 /* Return result */
10840 return r
.out
.result
;
10843 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state
{
10844 struct lsa_LSARSETFORESTTRUSTINFORMATION orig
;
10845 struct lsa_LSARSETFORESTTRUSTINFORMATION tmp
;
10846 TALLOC_CTX
*out_mem_ctx
;
10847 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10850 static void rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done(struct tevent_req
*subreq
);
10852 struct tevent_req
*rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_send(TALLOC_CTX
*mem_ctx
,
10853 struct tevent_context
*ev
,
10854 struct rpc_pipe_client
*cli
)
10856 struct tevent_req
*req
;
10857 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state
*state
;
10858 struct tevent_req
*subreq
;
10860 req
= tevent_req_create(mem_ctx
, &state
,
10861 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state
);
10865 state
->out_mem_ctx
= NULL
;
10866 state
->dispatch_recv
= cli
->dispatch_recv
;
10868 /* In parameters */
10870 /* Out parameters */
10873 ZERO_STRUCT(state
->orig
.out
.result
);
10875 /* make a temporary copy, that we pass to the dispatch function */
10876 state
->tmp
= state
->orig
;
10878 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10879 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
10880 NDR_LSA_LSARSETFORESTTRUSTINFORMATION
,
10882 if (tevent_req_nomem(subreq
, req
)) {
10883 return tevent_req_post(req
, ev
);
10885 tevent_req_set_callback(subreq
, rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done
, req
);
10889 static void rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done(struct tevent_req
*subreq
)
10891 struct tevent_req
*req
= tevent_req_callback_data(
10892 subreq
, struct tevent_req
);
10893 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state
*state
= tevent_req_data(
10894 req
, struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state
);
10896 TALLOC_CTX
*mem_ctx
;
10898 if (state
->out_mem_ctx
) {
10899 mem_ctx
= state
->out_mem_ctx
;
10904 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10905 TALLOC_FREE(subreq
);
10906 if (!NT_STATUS_IS_OK(status
)) {
10907 tevent_req_nterror(req
, status
);
10911 /* Copy out parameters */
10914 state
->orig
.out
.result
= state
->tmp
.out
.result
;
10916 /* Reset temporary structure */
10917 ZERO_STRUCT(state
->tmp
);
10919 tevent_req_done(req
);
10922 NTSTATUS
rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_recv(struct tevent_req
*req
,
10923 TALLOC_CTX
*mem_ctx
,
10926 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state
*state
= tevent_req_data(
10927 req
, struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state
);
10930 if (tevent_req_is_nterror(req
, &status
)) {
10931 tevent_req_received(req
);
10935 /* Steal possbile out parameters to the callers context */
10936 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10938 /* Return result */
10939 *result
= state
->orig
.out
.result
;
10941 tevent_req_received(req
);
10942 return NT_STATUS_OK
;
10945 NTSTATUS
rpccli_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client
*cli
,
10946 TALLOC_CTX
*mem_ctx
)
10948 struct lsa_LSARSETFORESTTRUSTINFORMATION r
;
10951 /* In parameters */
10953 status
= cli
->dispatch(cli
,
10955 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
10956 NDR_LSA_LSARSETFORESTTRUSTINFORMATION
,
10959 if (!NT_STATUS_IS_OK(status
)) {
10963 if (NT_STATUS_IS_ERR(status
)) {
10967 /* Return variables */
10969 /* Return result */
10970 return r
.out
.result
;
10973 struct rpccli_lsa_CREDRRENAME_state
{
10974 struct lsa_CREDRRENAME orig
;
10975 struct lsa_CREDRRENAME tmp
;
10976 TALLOC_CTX
*out_mem_ctx
;
10977 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10980 static void rpccli_lsa_CREDRRENAME_done(struct tevent_req
*subreq
);
10982 struct tevent_req
*rpccli_lsa_CREDRRENAME_send(TALLOC_CTX
*mem_ctx
,
10983 struct tevent_context
*ev
,
10984 struct rpc_pipe_client
*cli
)
10986 struct tevent_req
*req
;
10987 struct rpccli_lsa_CREDRRENAME_state
*state
;
10988 struct tevent_req
*subreq
;
10990 req
= tevent_req_create(mem_ctx
, &state
,
10991 struct rpccli_lsa_CREDRRENAME_state
);
10995 state
->out_mem_ctx
= NULL
;
10996 state
->dispatch_recv
= cli
->dispatch_recv
;
10998 /* In parameters */
11000 /* Out parameters */
11003 ZERO_STRUCT(state
->orig
.out
.result
);
11005 /* make a temporary copy, that we pass to the dispatch function */
11006 state
->tmp
= state
->orig
;
11008 subreq
= cli
->dispatch_send(state
, ev
, cli
,
11009 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
11010 NDR_LSA_CREDRRENAME
,
11012 if (tevent_req_nomem(subreq
, req
)) {
11013 return tevent_req_post(req
, ev
);
11015 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRRENAME_done
, req
);
11019 static void rpccli_lsa_CREDRRENAME_done(struct tevent_req
*subreq
)
11021 struct tevent_req
*req
= tevent_req_callback_data(
11022 subreq
, struct tevent_req
);
11023 struct rpccli_lsa_CREDRRENAME_state
*state
= tevent_req_data(
11024 req
, struct rpccli_lsa_CREDRRENAME_state
);
11026 TALLOC_CTX
*mem_ctx
;
11028 if (state
->out_mem_ctx
) {
11029 mem_ctx
= state
->out_mem_ctx
;
11034 status
= state
->dispatch_recv(subreq
, mem_ctx
);
11035 TALLOC_FREE(subreq
);
11036 if (!NT_STATUS_IS_OK(status
)) {
11037 tevent_req_nterror(req
, status
);
11041 /* Copy out parameters */
11044 state
->orig
.out
.result
= state
->tmp
.out
.result
;
11046 /* Reset temporary structure */
11047 ZERO_STRUCT(state
->tmp
);
11049 tevent_req_done(req
);
11052 NTSTATUS
rpccli_lsa_CREDRRENAME_recv(struct tevent_req
*req
,
11053 TALLOC_CTX
*mem_ctx
,
11056 struct rpccli_lsa_CREDRRENAME_state
*state
= tevent_req_data(
11057 req
, struct rpccli_lsa_CREDRRENAME_state
);
11060 if (tevent_req_is_nterror(req
, &status
)) {
11061 tevent_req_received(req
);
11065 /* Steal possbile out parameters to the callers context */
11066 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
11068 /* Return result */
11069 *result
= state
->orig
.out
.result
;
11071 tevent_req_received(req
);
11072 return NT_STATUS_OK
;
11075 NTSTATUS
rpccli_lsa_CREDRRENAME(struct rpc_pipe_client
*cli
,
11076 TALLOC_CTX
*mem_ctx
)
11078 struct lsa_CREDRRENAME r
;
11081 /* In parameters */
11083 status
= cli
->dispatch(cli
,
11085 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
11086 NDR_LSA_CREDRRENAME
,
11089 if (!NT_STATUS_IS_OK(status
)) {
11093 if (NT_STATUS_IS_ERR(status
)) {
11097 /* Return variables */
11099 /* Return result */
11100 return r
.out
.result
;
11103 struct rpccli_lsa_LookupSids3_state
{
11104 struct lsa_LookupSids3 orig
;
11105 struct lsa_LookupSids3 tmp
;
11106 TALLOC_CTX
*out_mem_ctx
;
11107 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
11110 static void rpccli_lsa_LookupSids3_done(struct tevent_req
*subreq
);
11112 struct tevent_req
*rpccli_lsa_LookupSids3_send(TALLOC_CTX
*mem_ctx
,
11113 struct tevent_context
*ev
,
11114 struct rpc_pipe_client
*cli
,
11115 struct lsa_SidArray
*_sids
/* [in] [ref] */,
11116 struct lsa_RefDomainList
**_domains
/* [out] [ref] */,
11117 struct lsa_TransNameArray2
*_names
/* [in,out] [ref] */,
11118 enum lsa_LookupNamesLevel _level
/* [in] */,
11119 uint32_t *_count
/* [in,out] [ref] */,
11120 enum lsa_LookupOptions _lookup_options
/* [in] */,
11121 enum lsa_ClientRevision _client_revision
/* [in] */)
11123 struct tevent_req
*req
;
11124 struct rpccli_lsa_LookupSids3_state
*state
;
11125 struct tevent_req
*subreq
;
11127 req
= tevent_req_create(mem_ctx
, &state
,
11128 struct rpccli_lsa_LookupSids3_state
);
11132 state
->out_mem_ctx
= NULL
;
11133 state
->dispatch_recv
= cli
->dispatch_recv
;
11135 /* In parameters */
11136 state
->orig
.in
.sids
= _sids
;
11137 state
->orig
.in
.names
= _names
;
11138 state
->orig
.in
.level
= _level
;
11139 state
->orig
.in
.count
= _count
;
11140 state
->orig
.in
.lookup_options
= _lookup_options
;
11141 state
->orig
.in
.client_revision
= _client_revision
;
11143 /* Out parameters */
11144 state
->orig
.out
.domains
= _domains
;
11145 state
->orig
.out
.names
= _names
;
11146 state
->orig
.out
.count
= _count
;
11149 ZERO_STRUCT(state
->orig
.out
.result
);
11151 state
->out_mem_ctx
= talloc_named_const(state
, 0,
11152 "rpccli_lsa_LookupSids3_out_memory");
11153 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
11154 return tevent_req_post(req
, ev
);
11157 /* make a temporary copy, that we pass to the dispatch function */
11158 state
->tmp
= state
->orig
;
11160 subreq
= cli
->dispatch_send(state
, ev
, cli
,
11161 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
11162 NDR_LSA_LOOKUPSIDS3
,
11164 if (tevent_req_nomem(subreq
, req
)) {
11165 return tevent_req_post(req
, ev
);
11167 tevent_req_set_callback(subreq
, rpccli_lsa_LookupSids3_done
, req
);
11171 static void rpccli_lsa_LookupSids3_done(struct tevent_req
*subreq
)
11173 struct tevent_req
*req
= tevent_req_callback_data(
11174 subreq
, struct tevent_req
);
11175 struct rpccli_lsa_LookupSids3_state
*state
= tevent_req_data(
11176 req
, struct rpccli_lsa_LookupSids3_state
);
11178 TALLOC_CTX
*mem_ctx
;
11180 if (state
->out_mem_ctx
) {
11181 mem_ctx
= state
->out_mem_ctx
;
11186 status
= state
->dispatch_recv(subreq
, mem_ctx
);
11187 TALLOC_FREE(subreq
);
11188 if (!NT_STATUS_IS_OK(status
)) {
11189 tevent_req_nterror(req
, status
);
11193 /* Copy out parameters */
11194 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
11195 *state
->orig
.out
.names
= *state
->tmp
.out
.names
;
11196 *state
->orig
.out
.count
= *state
->tmp
.out
.count
;
11199 state
->orig
.out
.result
= state
->tmp
.out
.result
;
11201 /* Reset temporary structure */
11202 ZERO_STRUCT(state
->tmp
);
11204 tevent_req_done(req
);
11207 NTSTATUS
rpccli_lsa_LookupSids3_recv(struct tevent_req
*req
,
11208 TALLOC_CTX
*mem_ctx
,
11211 struct rpccli_lsa_LookupSids3_state
*state
= tevent_req_data(
11212 req
, struct rpccli_lsa_LookupSids3_state
);
11215 if (tevent_req_is_nterror(req
, &status
)) {
11216 tevent_req_received(req
);
11220 /* Steal possbile out parameters to the callers context */
11221 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
11223 /* Return result */
11224 *result
= state
->orig
.out
.result
;
11226 tevent_req_received(req
);
11227 return NT_STATUS_OK
;
11230 NTSTATUS
rpccli_lsa_LookupSids3(struct rpc_pipe_client
*cli
,
11231 TALLOC_CTX
*mem_ctx
,
11232 struct lsa_SidArray
*sids
/* [in] [ref] */,
11233 struct lsa_RefDomainList
**domains
/* [out] [ref] */,
11234 struct lsa_TransNameArray2
*names
/* [in,out] [ref] */,
11235 enum lsa_LookupNamesLevel level
/* [in] */,
11236 uint32_t *count
/* [in,out] [ref] */,
11237 enum lsa_LookupOptions lookup_options
/* [in] */,
11238 enum lsa_ClientRevision client_revision
/* [in] */)
11240 struct lsa_LookupSids3 r
;
11243 /* In parameters */
11245 r
.in
.names
= names
;
11246 r
.in
.level
= level
;
11247 r
.in
.count
= count
;
11248 r
.in
.lookup_options
= lookup_options
;
11249 r
.in
.client_revision
= client_revision
;
11251 status
= cli
->dispatch(cli
,
11253 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
11254 NDR_LSA_LOOKUPSIDS3
,
11257 if (!NT_STATUS_IS_OK(status
)) {
11261 if (NT_STATUS_IS_ERR(status
)) {
11265 /* Return variables */
11266 *domains
= *r
.out
.domains
;
11267 *names
= *r
.out
.names
;
11268 *count
= *r
.out
.count
;
11270 /* Return result */
11271 return r
.out
.result
;
11274 struct rpccli_lsa_LookupNames4_state
{
11275 struct lsa_LookupNames4 orig
;
11276 struct lsa_LookupNames4 tmp
;
11277 TALLOC_CTX
*out_mem_ctx
;
11278 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
11281 static void rpccli_lsa_LookupNames4_done(struct tevent_req
*subreq
);
11283 struct tevent_req
*rpccli_lsa_LookupNames4_send(TALLOC_CTX
*mem_ctx
,
11284 struct tevent_context
*ev
,
11285 struct rpc_pipe_client
*cli
,
11286 uint32_t _num_names
/* [in] [range(0,1000)] */,
11287 struct lsa_String
*_names
/* [in] [size_is(num_names)] */,
11288 struct lsa_RefDomainList
**_domains
/* [out] [ref] */,
11289 struct lsa_TransSidArray3
*_sids
/* [in,out] [ref] */,
11290 enum lsa_LookupNamesLevel _level
/* [in] */,
11291 uint32_t *_count
/* [in,out] [ref] */,
11292 enum lsa_LookupOptions _lookup_options
/* [in] */,
11293 enum lsa_ClientRevision _client_revision
/* [in] */)
11295 struct tevent_req
*req
;
11296 struct rpccli_lsa_LookupNames4_state
*state
;
11297 struct tevent_req
*subreq
;
11299 req
= tevent_req_create(mem_ctx
, &state
,
11300 struct rpccli_lsa_LookupNames4_state
);
11304 state
->out_mem_ctx
= NULL
;
11305 state
->dispatch_recv
= cli
->dispatch_recv
;
11307 /* In parameters */
11308 state
->orig
.in
.num_names
= _num_names
;
11309 state
->orig
.in
.names
= _names
;
11310 state
->orig
.in
.sids
= _sids
;
11311 state
->orig
.in
.level
= _level
;
11312 state
->orig
.in
.count
= _count
;
11313 state
->orig
.in
.lookup_options
= _lookup_options
;
11314 state
->orig
.in
.client_revision
= _client_revision
;
11316 /* Out parameters */
11317 state
->orig
.out
.domains
= _domains
;
11318 state
->orig
.out
.sids
= _sids
;
11319 state
->orig
.out
.count
= _count
;
11322 ZERO_STRUCT(state
->orig
.out
.result
);
11324 state
->out_mem_ctx
= talloc_named_const(state
, 0,
11325 "rpccli_lsa_LookupNames4_out_memory");
11326 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
11327 return tevent_req_post(req
, ev
);
11330 /* make a temporary copy, that we pass to the dispatch function */
11331 state
->tmp
= state
->orig
;
11333 subreq
= cli
->dispatch_send(state
, ev
, cli
,
11334 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
11335 NDR_LSA_LOOKUPNAMES4
,
11337 if (tevent_req_nomem(subreq
, req
)) {
11338 return tevent_req_post(req
, ev
);
11340 tevent_req_set_callback(subreq
, rpccli_lsa_LookupNames4_done
, req
);
11344 static void rpccli_lsa_LookupNames4_done(struct tevent_req
*subreq
)
11346 struct tevent_req
*req
= tevent_req_callback_data(
11347 subreq
, struct tevent_req
);
11348 struct rpccli_lsa_LookupNames4_state
*state
= tevent_req_data(
11349 req
, struct rpccli_lsa_LookupNames4_state
);
11351 TALLOC_CTX
*mem_ctx
;
11353 if (state
->out_mem_ctx
) {
11354 mem_ctx
= state
->out_mem_ctx
;
11359 status
= state
->dispatch_recv(subreq
, mem_ctx
);
11360 TALLOC_FREE(subreq
);
11361 if (!NT_STATUS_IS_OK(status
)) {
11362 tevent_req_nterror(req
, status
);
11366 /* Copy out parameters */
11367 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
11368 *state
->orig
.out
.sids
= *state
->tmp
.out
.sids
;
11369 *state
->orig
.out
.count
= *state
->tmp
.out
.count
;
11372 state
->orig
.out
.result
= state
->tmp
.out
.result
;
11374 /* Reset temporary structure */
11375 ZERO_STRUCT(state
->tmp
);
11377 tevent_req_done(req
);
11380 NTSTATUS
rpccli_lsa_LookupNames4_recv(struct tevent_req
*req
,
11381 TALLOC_CTX
*mem_ctx
,
11384 struct rpccli_lsa_LookupNames4_state
*state
= tevent_req_data(
11385 req
, struct rpccli_lsa_LookupNames4_state
);
11388 if (tevent_req_is_nterror(req
, &status
)) {
11389 tevent_req_received(req
);
11393 /* Steal possbile out parameters to the callers context */
11394 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
11396 /* Return result */
11397 *result
= state
->orig
.out
.result
;
11399 tevent_req_received(req
);
11400 return NT_STATUS_OK
;
11403 NTSTATUS
rpccli_lsa_LookupNames4(struct rpc_pipe_client
*cli
,
11404 TALLOC_CTX
*mem_ctx
,
11405 uint32_t num_names
/* [in] [range(0,1000)] */,
11406 struct lsa_String
*names
/* [in] [size_is(num_names)] */,
11407 struct lsa_RefDomainList
**domains
/* [out] [ref] */,
11408 struct lsa_TransSidArray3
*sids
/* [in,out] [ref] */,
11409 enum lsa_LookupNamesLevel level
/* [in] */,
11410 uint32_t *count
/* [in,out] [ref] */,
11411 enum lsa_LookupOptions lookup_options
/* [in] */,
11412 enum lsa_ClientRevision client_revision
/* [in] */)
11414 struct lsa_LookupNames4 r
;
11417 /* In parameters */
11418 r
.in
.num_names
= num_names
;
11419 r
.in
.names
= names
;
11421 r
.in
.level
= level
;
11422 r
.in
.count
= count
;
11423 r
.in
.lookup_options
= lookup_options
;
11424 r
.in
.client_revision
= client_revision
;
11426 status
= cli
->dispatch(cli
,
11428 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
11429 NDR_LSA_LOOKUPNAMES4
,
11432 if (!NT_STATUS_IS_OK(status
)) {
11436 if (NT_STATUS_IS_ERR(status
)) {
11440 /* Return variables */
11441 *domains
= *r
.out
.domains
;
11442 *sids
= *r
.out
.sids
;
11443 *count
= *r
.out
.count
;
11445 /* Return result */
11446 return r
.out
.result
;
11449 struct rpccli_lsa_LSAROPENPOLICYSCE_state
{
11450 struct lsa_LSAROPENPOLICYSCE orig
;
11451 struct lsa_LSAROPENPOLICYSCE tmp
;
11452 TALLOC_CTX
*out_mem_ctx
;
11453 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
11456 static void rpccli_lsa_LSAROPENPOLICYSCE_done(struct tevent_req
*subreq
);
11458 struct tevent_req
*rpccli_lsa_LSAROPENPOLICYSCE_send(TALLOC_CTX
*mem_ctx
,
11459 struct tevent_context
*ev
,
11460 struct rpc_pipe_client
*cli
)
11462 struct tevent_req
*req
;
11463 struct rpccli_lsa_LSAROPENPOLICYSCE_state
*state
;
11464 struct tevent_req
*subreq
;
11466 req
= tevent_req_create(mem_ctx
, &state
,
11467 struct rpccli_lsa_LSAROPENPOLICYSCE_state
);
11471 state
->out_mem_ctx
= NULL
;
11472 state
->dispatch_recv
= cli
->dispatch_recv
;
11474 /* In parameters */
11476 /* Out parameters */
11479 ZERO_STRUCT(state
->orig
.out
.result
);
11481 /* make a temporary copy, that we pass to the dispatch function */
11482 state
->tmp
= state
->orig
;
11484 subreq
= cli
->dispatch_send(state
, ev
, cli
,
11485 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
11486 NDR_LSA_LSAROPENPOLICYSCE
,
11488 if (tevent_req_nomem(subreq
, req
)) {
11489 return tevent_req_post(req
, ev
);
11491 tevent_req_set_callback(subreq
, rpccli_lsa_LSAROPENPOLICYSCE_done
, req
);
11495 static void rpccli_lsa_LSAROPENPOLICYSCE_done(struct tevent_req
*subreq
)
11497 struct tevent_req
*req
= tevent_req_callback_data(
11498 subreq
, struct tevent_req
);
11499 struct rpccli_lsa_LSAROPENPOLICYSCE_state
*state
= tevent_req_data(
11500 req
, struct rpccli_lsa_LSAROPENPOLICYSCE_state
);
11502 TALLOC_CTX
*mem_ctx
;
11504 if (state
->out_mem_ctx
) {
11505 mem_ctx
= state
->out_mem_ctx
;
11510 status
= state
->dispatch_recv(subreq
, mem_ctx
);
11511 TALLOC_FREE(subreq
);
11512 if (!NT_STATUS_IS_OK(status
)) {
11513 tevent_req_nterror(req
, status
);
11517 /* Copy out parameters */
11520 state
->orig
.out
.result
= state
->tmp
.out
.result
;
11522 /* Reset temporary structure */
11523 ZERO_STRUCT(state
->tmp
);
11525 tevent_req_done(req
);
11528 NTSTATUS
rpccli_lsa_LSAROPENPOLICYSCE_recv(struct tevent_req
*req
,
11529 TALLOC_CTX
*mem_ctx
,
11532 struct rpccli_lsa_LSAROPENPOLICYSCE_state
*state
= tevent_req_data(
11533 req
, struct rpccli_lsa_LSAROPENPOLICYSCE_state
);
11536 if (tevent_req_is_nterror(req
, &status
)) {
11537 tevent_req_received(req
);
11541 /* Steal possbile out parameters to the callers context */
11542 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
11544 /* Return result */
11545 *result
= state
->orig
.out
.result
;
11547 tevent_req_received(req
);
11548 return NT_STATUS_OK
;
11551 NTSTATUS
rpccli_lsa_LSAROPENPOLICYSCE(struct rpc_pipe_client
*cli
,
11552 TALLOC_CTX
*mem_ctx
)
11554 struct lsa_LSAROPENPOLICYSCE r
;
11557 /* In parameters */
11559 status
= cli
->dispatch(cli
,
11561 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
11562 NDR_LSA_LSAROPENPOLICYSCE
,
11565 if (!NT_STATUS_IS_OK(status
)) {
11569 if (NT_STATUS_IS_ERR(status
)) {
11573 /* Return variables */
11575 /* Return result */
11576 return r
.out
.result
;
11579 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state
{
11580 struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE orig
;
11581 struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE tmp
;
11582 TALLOC_CTX
*out_mem_ctx
;
11583 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
11586 static void rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_done(struct tevent_req
*subreq
);
11588 struct tevent_req
*rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_send(TALLOC_CTX
*mem_ctx
,
11589 struct tevent_context
*ev
,
11590 struct rpc_pipe_client
*cli
)
11592 struct tevent_req
*req
;
11593 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state
*state
;
11594 struct tevent_req
*subreq
;
11596 req
= tevent_req_create(mem_ctx
, &state
,
11597 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state
);
11601 state
->out_mem_ctx
= NULL
;
11602 state
->dispatch_recv
= cli
->dispatch_recv
;
11604 /* In parameters */
11606 /* Out parameters */
11609 ZERO_STRUCT(state
->orig
.out
.result
);
11611 /* make a temporary copy, that we pass to the dispatch function */
11612 state
->tmp
= state
->orig
;
11614 subreq
= cli
->dispatch_send(state
, ev
, cli
,
11615 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
11616 NDR_LSA_LSARADTREGISTERSECURITYEVENTSOURCE
,
11618 if (tevent_req_nomem(subreq
, req
)) {
11619 return tevent_req_post(req
, ev
);
11621 tevent_req_set_callback(subreq
, rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_done
, req
);
11625 static void rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_done(struct tevent_req
*subreq
)
11627 struct tevent_req
*req
= tevent_req_callback_data(
11628 subreq
, struct tevent_req
);
11629 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state
*state
= tevent_req_data(
11630 req
, struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state
);
11632 TALLOC_CTX
*mem_ctx
;
11634 if (state
->out_mem_ctx
) {
11635 mem_ctx
= state
->out_mem_ctx
;
11640 status
= state
->dispatch_recv(subreq
, mem_ctx
);
11641 TALLOC_FREE(subreq
);
11642 if (!NT_STATUS_IS_OK(status
)) {
11643 tevent_req_nterror(req
, status
);
11647 /* Copy out parameters */
11650 state
->orig
.out
.result
= state
->tmp
.out
.result
;
11652 /* Reset temporary structure */
11653 ZERO_STRUCT(state
->tmp
);
11655 tevent_req_done(req
);
11658 NTSTATUS
rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_recv(struct tevent_req
*req
,
11659 TALLOC_CTX
*mem_ctx
,
11662 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state
*state
= tevent_req_data(
11663 req
, struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state
);
11666 if (tevent_req_is_nterror(req
, &status
)) {
11667 tevent_req_received(req
);
11671 /* Steal possbile out parameters to the callers context */
11672 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
11674 /* Return result */
11675 *result
= state
->orig
.out
.result
;
11677 tevent_req_received(req
);
11678 return NT_STATUS_OK
;
11681 NTSTATUS
rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client
*cli
,
11682 TALLOC_CTX
*mem_ctx
)
11684 struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE r
;
11687 /* In parameters */
11689 status
= cli
->dispatch(cli
,
11691 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
11692 NDR_LSA_LSARADTREGISTERSECURITYEVENTSOURCE
,
11695 if (!NT_STATUS_IS_OK(status
)) {
11699 if (NT_STATUS_IS_ERR(status
)) {
11703 /* Return variables */
11705 /* Return result */
11706 return r
.out
.result
;
11709 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state
{
11710 struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE orig
;
11711 struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE tmp
;
11712 TALLOC_CTX
*out_mem_ctx
;
11713 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
11716 static void rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_done(struct tevent_req
*subreq
);
11718 struct tevent_req
*rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_send(TALLOC_CTX
*mem_ctx
,
11719 struct tevent_context
*ev
,
11720 struct rpc_pipe_client
*cli
)
11722 struct tevent_req
*req
;
11723 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state
*state
;
11724 struct tevent_req
*subreq
;
11726 req
= tevent_req_create(mem_ctx
, &state
,
11727 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state
);
11731 state
->out_mem_ctx
= NULL
;
11732 state
->dispatch_recv
= cli
->dispatch_recv
;
11734 /* In parameters */
11736 /* Out parameters */
11739 ZERO_STRUCT(state
->orig
.out
.result
);
11741 /* make a temporary copy, that we pass to the dispatch function */
11742 state
->tmp
= state
->orig
;
11744 subreq
= cli
->dispatch_send(state
, ev
, cli
,
11745 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
11746 NDR_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
11748 if (tevent_req_nomem(subreq
, req
)) {
11749 return tevent_req_post(req
, ev
);
11751 tevent_req_set_callback(subreq
, rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_done
, req
);
11755 static void rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_done(struct tevent_req
*subreq
)
11757 struct tevent_req
*req
= tevent_req_callback_data(
11758 subreq
, struct tevent_req
);
11759 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state
*state
= tevent_req_data(
11760 req
, struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state
);
11762 TALLOC_CTX
*mem_ctx
;
11764 if (state
->out_mem_ctx
) {
11765 mem_ctx
= state
->out_mem_ctx
;
11770 status
= state
->dispatch_recv(subreq
, mem_ctx
);
11771 TALLOC_FREE(subreq
);
11772 if (!NT_STATUS_IS_OK(status
)) {
11773 tevent_req_nterror(req
, status
);
11777 /* Copy out parameters */
11780 state
->orig
.out
.result
= state
->tmp
.out
.result
;
11782 /* Reset temporary structure */
11783 ZERO_STRUCT(state
->tmp
);
11785 tevent_req_done(req
);
11788 NTSTATUS
rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_recv(struct tevent_req
*req
,
11789 TALLOC_CTX
*mem_ctx
,
11792 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state
*state
= tevent_req_data(
11793 req
, struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state
);
11796 if (tevent_req_is_nterror(req
, &status
)) {
11797 tevent_req_received(req
);
11801 /* Steal possbile out parameters to the callers context */
11802 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
11804 /* Return result */
11805 *result
= state
->orig
.out
.result
;
11807 tevent_req_received(req
);
11808 return NT_STATUS_OK
;
11811 NTSTATUS
rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client
*cli
,
11812 TALLOC_CTX
*mem_ctx
)
11814 struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE r
;
11817 /* In parameters */
11819 status
= cli
->dispatch(cli
,
11821 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
11822 NDR_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
11825 if (!NT_STATUS_IS_OK(status
)) {
11829 if (NT_STATUS_IS_ERR(status
)) {
11833 /* Return variables */
11835 /* Return result */
11836 return r
.out
.result
;
11839 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state
{
11840 struct lsa_LSARADTREPORTSECURITYEVENT orig
;
11841 struct lsa_LSARADTREPORTSECURITYEVENT tmp
;
11842 TALLOC_CTX
*out_mem_ctx
;
11843 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
11846 static void rpccli_lsa_LSARADTREPORTSECURITYEVENT_done(struct tevent_req
*subreq
);
11848 struct tevent_req
*rpccli_lsa_LSARADTREPORTSECURITYEVENT_send(TALLOC_CTX
*mem_ctx
,
11849 struct tevent_context
*ev
,
11850 struct rpc_pipe_client
*cli
)
11852 struct tevent_req
*req
;
11853 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state
*state
;
11854 struct tevent_req
*subreq
;
11856 req
= tevent_req_create(mem_ctx
, &state
,
11857 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state
);
11861 state
->out_mem_ctx
= NULL
;
11862 state
->dispatch_recv
= cli
->dispatch_recv
;
11864 /* In parameters */
11866 /* Out parameters */
11869 ZERO_STRUCT(state
->orig
.out
.result
);
11871 /* make a temporary copy, that we pass to the dispatch function */
11872 state
->tmp
= state
->orig
;
11874 subreq
= cli
->dispatch_send(state
, ev
, cli
,
11875 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
11876 NDR_LSA_LSARADTREPORTSECURITYEVENT
,
11878 if (tevent_req_nomem(subreq
, req
)) {
11879 return tevent_req_post(req
, ev
);
11881 tevent_req_set_callback(subreq
, rpccli_lsa_LSARADTREPORTSECURITYEVENT_done
, req
);
11885 static void rpccli_lsa_LSARADTREPORTSECURITYEVENT_done(struct tevent_req
*subreq
)
11887 struct tevent_req
*req
= tevent_req_callback_data(
11888 subreq
, struct tevent_req
);
11889 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state
*state
= tevent_req_data(
11890 req
, struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state
);
11892 TALLOC_CTX
*mem_ctx
;
11894 if (state
->out_mem_ctx
) {
11895 mem_ctx
= state
->out_mem_ctx
;
11900 status
= state
->dispatch_recv(subreq
, mem_ctx
);
11901 TALLOC_FREE(subreq
);
11902 if (!NT_STATUS_IS_OK(status
)) {
11903 tevent_req_nterror(req
, status
);
11907 /* Copy out parameters */
11910 state
->orig
.out
.result
= state
->tmp
.out
.result
;
11912 /* Reset temporary structure */
11913 ZERO_STRUCT(state
->tmp
);
11915 tevent_req_done(req
);
11918 NTSTATUS
rpccli_lsa_LSARADTREPORTSECURITYEVENT_recv(struct tevent_req
*req
,
11919 TALLOC_CTX
*mem_ctx
,
11922 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state
*state
= tevent_req_data(
11923 req
, struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state
);
11926 if (tevent_req_is_nterror(req
, &status
)) {
11927 tevent_req_received(req
);
11931 /* Steal possbile out parameters to the callers context */
11932 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
11934 /* Return result */
11935 *result
= state
->orig
.out
.result
;
11937 tevent_req_received(req
);
11938 return NT_STATUS_OK
;
11941 NTSTATUS
rpccli_lsa_LSARADTREPORTSECURITYEVENT(struct rpc_pipe_client
*cli
,
11942 TALLOC_CTX
*mem_ctx
)
11944 struct lsa_LSARADTREPORTSECURITYEVENT r
;
11947 /* In parameters */
11949 status
= cli
->dispatch(cli
,
11951 NDR_LSARPC_UUID
, NDR_LSARPC_VERSION
,
11952 NDR_LSA_LSARADTREPORTSECURITYEVENT
,
11955 if (!NT_STATUS_IS_OK(status
)) {
11959 if (NT_STATUS_IS_ERR(status
)) {
11963 /* Return variables */
11965 /* Return result */
11966 return r
.out
.result
;