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 if (DEBUGLEVEL
>= 10) {
45 NDR_PRINT_IN_DEBUG(lsa_Close
, &state
->orig
);
48 state
->out_mem_ctx
= talloc_named_const(state
, 0,
49 "rpccli_lsa_Close_out_memory");
50 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
51 return tevent_req_post(req
, ev
);
54 /* make a temporary copy, that we pass to the dispatch function */
55 state
->tmp
= state
->orig
;
57 subreq
= cli
->dispatch_send(state
, ev
, cli
,
61 if (tevent_req_nomem(subreq
, req
)) {
62 return tevent_req_post(req
, ev
);
64 tevent_req_set_callback(subreq
, rpccli_lsa_Close_done
, req
);
68 static void rpccli_lsa_Close_done(struct tevent_req
*subreq
)
70 struct tevent_req
*req
= tevent_req_callback_data(
71 subreq
, struct tevent_req
);
72 struct rpccli_lsa_Close_state
*state
= tevent_req_data(
73 req
, struct rpccli_lsa_Close_state
);
77 if (state
->out_mem_ctx
) {
78 mem_ctx
= state
->out_mem_ctx
;
83 status
= state
->dispatch_recv(subreq
, mem_ctx
);
85 if (!NT_STATUS_IS_OK(status
)) {
86 tevent_req_nterror(req
, status
);
90 /* Copy out parameters */
91 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
94 state
->orig
.out
.result
= state
->tmp
.out
.result
;
96 /* Reset temporary structure */
97 ZERO_STRUCT(state
->tmp
);
99 if (DEBUGLEVEL
>= 10) {
100 NDR_PRINT_OUT_DEBUG(lsa_Close
, &state
->orig
);
103 tevent_req_done(req
);
106 NTSTATUS
rpccli_lsa_Close_recv(struct tevent_req
*req
,
110 struct rpccli_lsa_Close_state
*state
= tevent_req_data(
111 req
, struct rpccli_lsa_Close_state
);
114 if (tevent_req_is_nterror(req
, &status
)) {
115 tevent_req_received(req
);
119 /* Steal possbile out parameters to the callers context */
120 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
123 *result
= state
->orig
.out
.result
;
125 tevent_req_received(req
);
129 NTSTATUS
rpccli_lsa_Close(struct rpc_pipe_client
*cli
,
131 struct policy_handle
*handle
/* [in,out] [ref] */)
137 r
.in
.handle
= handle
;
139 if (DEBUGLEVEL
>= 10) {
140 NDR_PRINT_IN_DEBUG(lsa_Close
, &r
);
143 status
= cli
->dispatch(cli
,
149 if (!NT_STATUS_IS_OK(status
)) {
153 if (DEBUGLEVEL
>= 10) {
154 NDR_PRINT_OUT_DEBUG(lsa_Close
, &r
);
157 if (NT_STATUS_IS_ERR(status
)) {
161 /* Return variables */
162 *handle
= *r
.out
.handle
;
168 struct rpccli_lsa_Delete_state
{
169 struct lsa_Delete orig
;
170 struct lsa_Delete tmp
;
171 TALLOC_CTX
*out_mem_ctx
;
172 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
175 static void rpccli_lsa_Delete_done(struct tevent_req
*subreq
);
177 struct tevent_req
*rpccli_lsa_Delete_send(TALLOC_CTX
*mem_ctx
,
178 struct tevent_context
*ev
,
179 struct rpc_pipe_client
*cli
,
180 struct policy_handle
*_handle
/* [in] [ref] */)
182 struct tevent_req
*req
;
183 struct rpccli_lsa_Delete_state
*state
;
184 struct tevent_req
*subreq
;
186 req
= tevent_req_create(mem_ctx
, &state
,
187 struct rpccli_lsa_Delete_state
);
191 state
->out_mem_ctx
= NULL
;
192 state
->dispatch_recv
= cli
->dispatch_recv
;
195 state
->orig
.in
.handle
= _handle
;
200 ZERO_STRUCT(state
->orig
.out
.result
);
202 if (DEBUGLEVEL
>= 10) {
203 NDR_PRINT_IN_DEBUG(lsa_Delete
, &state
->orig
);
206 /* make a temporary copy, that we pass to the dispatch function */
207 state
->tmp
= state
->orig
;
209 subreq
= cli
->dispatch_send(state
, ev
, cli
,
213 if (tevent_req_nomem(subreq
, req
)) {
214 return tevent_req_post(req
, ev
);
216 tevent_req_set_callback(subreq
, rpccli_lsa_Delete_done
, req
);
220 static void rpccli_lsa_Delete_done(struct tevent_req
*subreq
)
222 struct tevent_req
*req
= tevent_req_callback_data(
223 subreq
, struct tevent_req
);
224 struct rpccli_lsa_Delete_state
*state
= tevent_req_data(
225 req
, struct rpccli_lsa_Delete_state
);
229 if (state
->out_mem_ctx
) {
230 mem_ctx
= state
->out_mem_ctx
;
235 status
= state
->dispatch_recv(subreq
, mem_ctx
);
237 if (!NT_STATUS_IS_OK(status
)) {
238 tevent_req_nterror(req
, status
);
242 /* Copy out parameters */
245 state
->orig
.out
.result
= state
->tmp
.out
.result
;
247 /* Reset temporary structure */
248 ZERO_STRUCT(state
->tmp
);
250 if (DEBUGLEVEL
>= 10) {
251 NDR_PRINT_OUT_DEBUG(lsa_Delete
, &state
->orig
);
254 tevent_req_done(req
);
257 NTSTATUS
rpccli_lsa_Delete_recv(struct tevent_req
*req
,
261 struct rpccli_lsa_Delete_state
*state
= tevent_req_data(
262 req
, struct rpccli_lsa_Delete_state
);
265 if (tevent_req_is_nterror(req
, &status
)) {
266 tevent_req_received(req
);
270 /* Steal possbile out parameters to the callers context */
271 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
274 *result
= state
->orig
.out
.result
;
276 tevent_req_received(req
);
280 NTSTATUS
rpccli_lsa_Delete(struct rpc_pipe_client
*cli
,
282 struct policy_handle
*handle
/* [in] [ref] */)
288 r
.in
.handle
= handle
;
290 if (DEBUGLEVEL
>= 10) {
291 NDR_PRINT_IN_DEBUG(lsa_Delete
, &r
);
294 status
= cli
->dispatch(cli
,
300 if (!NT_STATUS_IS_OK(status
)) {
304 if (DEBUGLEVEL
>= 10) {
305 NDR_PRINT_OUT_DEBUG(lsa_Delete
, &r
);
308 if (NT_STATUS_IS_ERR(status
)) {
312 /* Return variables */
318 struct rpccli_lsa_EnumPrivs_state
{
319 struct lsa_EnumPrivs orig
;
320 struct lsa_EnumPrivs tmp
;
321 TALLOC_CTX
*out_mem_ctx
;
322 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
325 static void rpccli_lsa_EnumPrivs_done(struct tevent_req
*subreq
);
327 struct tevent_req
*rpccli_lsa_EnumPrivs_send(TALLOC_CTX
*mem_ctx
,
328 struct tevent_context
*ev
,
329 struct rpc_pipe_client
*cli
,
330 struct policy_handle
*_handle
/* [in] [ref] */,
331 uint32_t *_resume_handle
/* [in,out] [ref] */,
332 struct lsa_PrivArray
*_privs
/* [out] [ref] */,
333 uint32_t _max_count
/* [in] */)
335 struct tevent_req
*req
;
336 struct rpccli_lsa_EnumPrivs_state
*state
;
337 struct tevent_req
*subreq
;
339 req
= tevent_req_create(mem_ctx
, &state
,
340 struct rpccli_lsa_EnumPrivs_state
);
344 state
->out_mem_ctx
= NULL
;
345 state
->dispatch_recv
= cli
->dispatch_recv
;
348 state
->orig
.in
.handle
= _handle
;
349 state
->orig
.in
.resume_handle
= _resume_handle
;
350 state
->orig
.in
.max_count
= _max_count
;
353 state
->orig
.out
.resume_handle
= _resume_handle
;
354 state
->orig
.out
.privs
= _privs
;
357 ZERO_STRUCT(state
->orig
.out
.result
);
359 if (DEBUGLEVEL
>= 10) {
360 NDR_PRINT_IN_DEBUG(lsa_EnumPrivs
, &state
->orig
);
363 state
->out_mem_ctx
= talloc_named_const(state
, 0,
364 "rpccli_lsa_EnumPrivs_out_memory");
365 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
366 return tevent_req_post(req
, ev
);
369 /* make a temporary copy, that we pass to the dispatch function */
370 state
->tmp
= state
->orig
;
372 subreq
= cli
->dispatch_send(state
, ev
, cli
,
376 if (tevent_req_nomem(subreq
, req
)) {
377 return tevent_req_post(req
, ev
);
379 tevent_req_set_callback(subreq
, rpccli_lsa_EnumPrivs_done
, req
);
383 static void rpccli_lsa_EnumPrivs_done(struct tevent_req
*subreq
)
385 struct tevent_req
*req
= tevent_req_callback_data(
386 subreq
, struct tevent_req
);
387 struct rpccli_lsa_EnumPrivs_state
*state
= tevent_req_data(
388 req
, struct rpccli_lsa_EnumPrivs_state
);
392 if (state
->out_mem_ctx
) {
393 mem_ctx
= state
->out_mem_ctx
;
398 status
= state
->dispatch_recv(subreq
, mem_ctx
);
400 if (!NT_STATUS_IS_OK(status
)) {
401 tevent_req_nterror(req
, status
);
405 /* Copy out parameters */
406 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
407 *state
->orig
.out
.privs
= *state
->tmp
.out
.privs
;
410 state
->orig
.out
.result
= state
->tmp
.out
.result
;
412 /* Reset temporary structure */
413 ZERO_STRUCT(state
->tmp
);
415 if (DEBUGLEVEL
>= 10) {
416 NDR_PRINT_OUT_DEBUG(lsa_EnumPrivs
, &state
->orig
);
419 tevent_req_done(req
);
422 NTSTATUS
rpccli_lsa_EnumPrivs_recv(struct tevent_req
*req
,
426 struct rpccli_lsa_EnumPrivs_state
*state
= tevent_req_data(
427 req
, struct rpccli_lsa_EnumPrivs_state
);
430 if (tevent_req_is_nterror(req
, &status
)) {
431 tevent_req_received(req
);
435 /* Steal possbile out parameters to the callers context */
436 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
439 *result
= state
->orig
.out
.result
;
441 tevent_req_received(req
);
445 NTSTATUS
rpccli_lsa_EnumPrivs(struct rpc_pipe_client
*cli
,
447 struct policy_handle
*handle
/* [in] [ref] */,
448 uint32_t *resume_handle
/* [in,out] [ref] */,
449 struct lsa_PrivArray
*privs
/* [out] [ref] */,
450 uint32_t max_count
/* [in] */)
452 struct lsa_EnumPrivs r
;
456 r
.in
.handle
= handle
;
457 r
.in
.resume_handle
= resume_handle
;
458 r
.in
.max_count
= max_count
;
460 if (DEBUGLEVEL
>= 10) {
461 NDR_PRINT_IN_DEBUG(lsa_EnumPrivs
, &r
);
464 status
= cli
->dispatch(cli
,
470 if (!NT_STATUS_IS_OK(status
)) {
474 if (DEBUGLEVEL
>= 10) {
475 NDR_PRINT_OUT_DEBUG(lsa_EnumPrivs
, &r
);
478 if (NT_STATUS_IS_ERR(status
)) {
482 /* Return variables */
483 *resume_handle
= *r
.out
.resume_handle
;
484 *privs
= *r
.out
.privs
;
490 struct rpccli_lsa_QuerySecurity_state
{
491 struct lsa_QuerySecurity orig
;
492 struct lsa_QuerySecurity tmp
;
493 TALLOC_CTX
*out_mem_ctx
;
494 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
497 static void rpccli_lsa_QuerySecurity_done(struct tevent_req
*subreq
);
499 struct tevent_req
*rpccli_lsa_QuerySecurity_send(TALLOC_CTX
*mem_ctx
,
500 struct tevent_context
*ev
,
501 struct rpc_pipe_client
*cli
,
502 struct policy_handle
*_handle
/* [in] [ref] */,
503 uint32_t _sec_info
/* [in] */,
504 struct sec_desc_buf
**_sdbuf
/* [out] [ref] */)
506 struct tevent_req
*req
;
507 struct rpccli_lsa_QuerySecurity_state
*state
;
508 struct tevent_req
*subreq
;
510 req
= tevent_req_create(mem_ctx
, &state
,
511 struct rpccli_lsa_QuerySecurity_state
);
515 state
->out_mem_ctx
= NULL
;
516 state
->dispatch_recv
= cli
->dispatch_recv
;
519 state
->orig
.in
.handle
= _handle
;
520 state
->orig
.in
.sec_info
= _sec_info
;
523 state
->orig
.out
.sdbuf
= _sdbuf
;
526 ZERO_STRUCT(state
->orig
.out
.result
);
528 if (DEBUGLEVEL
>= 10) {
529 NDR_PRINT_IN_DEBUG(lsa_QuerySecurity
, &state
->orig
);
532 state
->out_mem_ctx
= talloc_named_const(state
, 0,
533 "rpccli_lsa_QuerySecurity_out_memory");
534 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
535 return tevent_req_post(req
, ev
);
538 /* make a temporary copy, that we pass to the dispatch function */
539 state
->tmp
= state
->orig
;
541 subreq
= cli
->dispatch_send(state
, ev
, cli
,
543 NDR_LSA_QUERYSECURITY
,
545 if (tevent_req_nomem(subreq
, req
)) {
546 return tevent_req_post(req
, ev
);
548 tevent_req_set_callback(subreq
, rpccli_lsa_QuerySecurity_done
, req
);
552 static void rpccli_lsa_QuerySecurity_done(struct tevent_req
*subreq
)
554 struct tevent_req
*req
= tevent_req_callback_data(
555 subreq
, struct tevent_req
);
556 struct rpccli_lsa_QuerySecurity_state
*state
= tevent_req_data(
557 req
, struct rpccli_lsa_QuerySecurity_state
);
561 if (state
->out_mem_ctx
) {
562 mem_ctx
= state
->out_mem_ctx
;
567 status
= state
->dispatch_recv(subreq
, mem_ctx
);
569 if (!NT_STATUS_IS_OK(status
)) {
570 tevent_req_nterror(req
, status
);
574 /* Copy out parameters */
575 *state
->orig
.out
.sdbuf
= *state
->tmp
.out
.sdbuf
;
578 state
->orig
.out
.result
= state
->tmp
.out
.result
;
580 /* Reset temporary structure */
581 ZERO_STRUCT(state
->tmp
);
583 if (DEBUGLEVEL
>= 10) {
584 NDR_PRINT_OUT_DEBUG(lsa_QuerySecurity
, &state
->orig
);
587 tevent_req_done(req
);
590 NTSTATUS
rpccli_lsa_QuerySecurity_recv(struct tevent_req
*req
,
594 struct rpccli_lsa_QuerySecurity_state
*state
= tevent_req_data(
595 req
, struct rpccli_lsa_QuerySecurity_state
);
598 if (tevent_req_is_nterror(req
, &status
)) {
599 tevent_req_received(req
);
603 /* Steal possbile out parameters to the callers context */
604 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
607 *result
= state
->orig
.out
.result
;
609 tevent_req_received(req
);
613 NTSTATUS
rpccli_lsa_QuerySecurity(struct rpc_pipe_client
*cli
,
615 struct policy_handle
*handle
/* [in] [ref] */,
616 uint32_t sec_info
/* [in] */,
617 struct sec_desc_buf
**sdbuf
/* [out] [ref] */)
619 struct lsa_QuerySecurity r
;
623 r
.in
.handle
= handle
;
624 r
.in
.sec_info
= sec_info
;
626 if (DEBUGLEVEL
>= 10) {
627 NDR_PRINT_IN_DEBUG(lsa_QuerySecurity
, &r
);
630 status
= cli
->dispatch(cli
,
633 NDR_LSA_QUERYSECURITY
,
636 if (!NT_STATUS_IS_OK(status
)) {
640 if (DEBUGLEVEL
>= 10) {
641 NDR_PRINT_OUT_DEBUG(lsa_QuerySecurity
, &r
);
644 if (NT_STATUS_IS_ERR(status
)) {
648 /* Return variables */
649 *sdbuf
= *r
.out
.sdbuf
;
655 struct rpccli_lsa_SetSecObj_state
{
656 struct lsa_SetSecObj orig
;
657 struct lsa_SetSecObj tmp
;
658 TALLOC_CTX
*out_mem_ctx
;
659 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
662 static void rpccli_lsa_SetSecObj_done(struct tevent_req
*subreq
);
664 struct tevent_req
*rpccli_lsa_SetSecObj_send(TALLOC_CTX
*mem_ctx
,
665 struct tevent_context
*ev
,
666 struct rpc_pipe_client
*cli
,
667 struct policy_handle
*_handle
/* [in] [ref] */,
668 uint32_t _sec_info
/* [in] */,
669 struct sec_desc_buf
*_sdbuf
/* [in] [ref] */)
671 struct tevent_req
*req
;
672 struct rpccli_lsa_SetSecObj_state
*state
;
673 struct tevent_req
*subreq
;
675 req
= tevent_req_create(mem_ctx
, &state
,
676 struct rpccli_lsa_SetSecObj_state
);
680 state
->out_mem_ctx
= NULL
;
681 state
->dispatch_recv
= cli
->dispatch_recv
;
684 state
->orig
.in
.handle
= _handle
;
685 state
->orig
.in
.sec_info
= _sec_info
;
686 state
->orig
.in
.sdbuf
= _sdbuf
;
691 ZERO_STRUCT(state
->orig
.out
.result
);
693 if (DEBUGLEVEL
>= 10) {
694 NDR_PRINT_IN_DEBUG(lsa_SetSecObj
, &state
->orig
);
697 /* make a temporary copy, that we pass to the dispatch function */
698 state
->tmp
= state
->orig
;
700 subreq
= cli
->dispatch_send(state
, ev
, cli
,
704 if (tevent_req_nomem(subreq
, req
)) {
705 return tevent_req_post(req
, ev
);
707 tevent_req_set_callback(subreq
, rpccli_lsa_SetSecObj_done
, req
);
711 static void rpccli_lsa_SetSecObj_done(struct tevent_req
*subreq
)
713 struct tevent_req
*req
= tevent_req_callback_data(
714 subreq
, struct tevent_req
);
715 struct rpccli_lsa_SetSecObj_state
*state
= tevent_req_data(
716 req
, struct rpccli_lsa_SetSecObj_state
);
720 if (state
->out_mem_ctx
) {
721 mem_ctx
= state
->out_mem_ctx
;
726 status
= state
->dispatch_recv(subreq
, mem_ctx
);
728 if (!NT_STATUS_IS_OK(status
)) {
729 tevent_req_nterror(req
, status
);
733 /* Copy out parameters */
736 state
->orig
.out
.result
= state
->tmp
.out
.result
;
738 /* Reset temporary structure */
739 ZERO_STRUCT(state
->tmp
);
741 if (DEBUGLEVEL
>= 10) {
742 NDR_PRINT_OUT_DEBUG(lsa_SetSecObj
, &state
->orig
);
745 tevent_req_done(req
);
748 NTSTATUS
rpccli_lsa_SetSecObj_recv(struct tevent_req
*req
,
752 struct rpccli_lsa_SetSecObj_state
*state
= tevent_req_data(
753 req
, struct rpccli_lsa_SetSecObj_state
);
756 if (tevent_req_is_nterror(req
, &status
)) {
757 tevent_req_received(req
);
761 /* Steal possbile out parameters to the callers context */
762 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
765 *result
= state
->orig
.out
.result
;
767 tevent_req_received(req
);
771 NTSTATUS
rpccli_lsa_SetSecObj(struct rpc_pipe_client
*cli
,
773 struct policy_handle
*handle
/* [in] [ref] */,
774 uint32_t sec_info
/* [in] */,
775 struct sec_desc_buf
*sdbuf
/* [in] [ref] */)
777 struct lsa_SetSecObj r
;
781 r
.in
.handle
= handle
;
782 r
.in
.sec_info
= sec_info
;
785 if (DEBUGLEVEL
>= 10) {
786 NDR_PRINT_IN_DEBUG(lsa_SetSecObj
, &r
);
789 status
= cli
->dispatch(cli
,
795 if (!NT_STATUS_IS_OK(status
)) {
799 if (DEBUGLEVEL
>= 10) {
800 NDR_PRINT_OUT_DEBUG(lsa_SetSecObj
, &r
);
803 if (NT_STATUS_IS_ERR(status
)) {
807 /* Return variables */
813 struct rpccli_lsa_ChangePassword_state
{
814 struct lsa_ChangePassword orig
;
815 struct lsa_ChangePassword tmp
;
816 TALLOC_CTX
*out_mem_ctx
;
817 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
820 static void rpccli_lsa_ChangePassword_done(struct tevent_req
*subreq
);
822 struct tevent_req
*rpccli_lsa_ChangePassword_send(TALLOC_CTX
*mem_ctx
,
823 struct tevent_context
*ev
,
824 struct rpc_pipe_client
*cli
)
826 struct tevent_req
*req
;
827 struct rpccli_lsa_ChangePassword_state
*state
;
828 struct tevent_req
*subreq
;
830 req
= tevent_req_create(mem_ctx
, &state
,
831 struct rpccli_lsa_ChangePassword_state
);
835 state
->out_mem_ctx
= NULL
;
836 state
->dispatch_recv
= cli
->dispatch_recv
;
843 ZERO_STRUCT(state
->orig
.out
.result
);
845 if (DEBUGLEVEL
>= 10) {
846 NDR_PRINT_IN_DEBUG(lsa_ChangePassword
, &state
->orig
);
849 /* make a temporary copy, that we pass to the dispatch function */
850 state
->tmp
= state
->orig
;
852 subreq
= cli
->dispatch_send(state
, ev
, cli
,
854 NDR_LSA_CHANGEPASSWORD
,
856 if (tevent_req_nomem(subreq
, req
)) {
857 return tevent_req_post(req
, ev
);
859 tevent_req_set_callback(subreq
, rpccli_lsa_ChangePassword_done
, req
);
863 static void rpccli_lsa_ChangePassword_done(struct tevent_req
*subreq
)
865 struct tevent_req
*req
= tevent_req_callback_data(
866 subreq
, struct tevent_req
);
867 struct rpccli_lsa_ChangePassword_state
*state
= tevent_req_data(
868 req
, struct rpccli_lsa_ChangePassword_state
);
872 if (state
->out_mem_ctx
) {
873 mem_ctx
= state
->out_mem_ctx
;
878 status
= state
->dispatch_recv(subreq
, mem_ctx
);
880 if (!NT_STATUS_IS_OK(status
)) {
881 tevent_req_nterror(req
, status
);
885 /* Copy out parameters */
888 state
->orig
.out
.result
= state
->tmp
.out
.result
;
890 /* Reset temporary structure */
891 ZERO_STRUCT(state
->tmp
);
893 if (DEBUGLEVEL
>= 10) {
894 NDR_PRINT_OUT_DEBUG(lsa_ChangePassword
, &state
->orig
);
897 tevent_req_done(req
);
900 NTSTATUS
rpccli_lsa_ChangePassword_recv(struct tevent_req
*req
,
904 struct rpccli_lsa_ChangePassword_state
*state
= tevent_req_data(
905 req
, struct rpccli_lsa_ChangePassword_state
);
908 if (tevent_req_is_nterror(req
, &status
)) {
909 tevent_req_received(req
);
913 /* Steal possbile out parameters to the callers context */
914 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
917 *result
= state
->orig
.out
.result
;
919 tevent_req_received(req
);
923 NTSTATUS
rpccli_lsa_ChangePassword(struct rpc_pipe_client
*cli
,
926 struct lsa_ChangePassword r
;
931 if (DEBUGLEVEL
>= 10) {
932 NDR_PRINT_IN_DEBUG(lsa_ChangePassword
, &r
);
935 status
= cli
->dispatch(cli
,
938 NDR_LSA_CHANGEPASSWORD
,
941 if (!NT_STATUS_IS_OK(status
)) {
945 if (DEBUGLEVEL
>= 10) {
946 NDR_PRINT_OUT_DEBUG(lsa_ChangePassword
, &r
);
949 if (NT_STATUS_IS_ERR(status
)) {
953 /* Return variables */
959 struct rpccli_lsa_OpenPolicy_state
{
960 struct lsa_OpenPolicy orig
;
961 struct lsa_OpenPolicy tmp
;
962 TALLOC_CTX
*out_mem_ctx
;
963 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
966 static void rpccli_lsa_OpenPolicy_done(struct tevent_req
*subreq
);
968 struct tevent_req
*rpccli_lsa_OpenPolicy_send(TALLOC_CTX
*mem_ctx
,
969 struct tevent_context
*ev
,
970 struct rpc_pipe_client
*cli
,
971 uint16_t *_system_name
/* [in] [unique] */,
972 struct lsa_ObjectAttribute
*_attr
/* [in] [ref] */,
973 uint32_t _access_mask
/* [in] */,
974 struct policy_handle
*_handle
/* [out] [ref] */)
976 struct tevent_req
*req
;
977 struct rpccli_lsa_OpenPolicy_state
*state
;
978 struct tevent_req
*subreq
;
980 req
= tevent_req_create(mem_ctx
, &state
,
981 struct rpccli_lsa_OpenPolicy_state
);
985 state
->out_mem_ctx
= NULL
;
986 state
->dispatch_recv
= cli
->dispatch_recv
;
989 state
->orig
.in
.system_name
= _system_name
;
990 state
->orig
.in
.attr
= _attr
;
991 state
->orig
.in
.access_mask
= _access_mask
;
994 state
->orig
.out
.handle
= _handle
;
997 ZERO_STRUCT(state
->orig
.out
.result
);
999 if (DEBUGLEVEL
>= 10) {
1000 NDR_PRINT_IN_DEBUG(lsa_OpenPolicy
, &state
->orig
);
1003 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1004 "rpccli_lsa_OpenPolicy_out_memory");
1005 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1006 return tevent_req_post(req
, ev
);
1009 /* make a temporary copy, that we pass to the dispatch function */
1010 state
->tmp
= state
->orig
;
1012 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1016 if (tevent_req_nomem(subreq
, req
)) {
1017 return tevent_req_post(req
, ev
);
1019 tevent_req_set_callback(subreq
, rpccli_lsa_OpenPolicy_done
, req
);
1023 static void rpccli_lsa_OpenPolicy_done(struct tevent_req
*subreq
)
1025 struct tevent_req
*req
= tevent_req_callback_data(
1026 subreq
, struct tevent_req
);
1027 struct rpccli_lsa_OpenPolicy_state
*state
= tevent_req_data(
1028 req
, struct rpccli_lsa_OpenPolicy_state
);
1030 TALLOC_CTX
*mem_ctx
;
1032 if (state
->out_mem_ctx
) {
1033 mem_ctx
= state
->out_mem_ctx
;
1038 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1039 TALLOC_FREE(subreq
);
1040 if (!NT_STATUS_IS_OK(status
)) {
1041 tevent_req_nterror(req
, status
);
1045 /* Copy out parameters */
1046 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
1049 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1051 /* Reset temporary structure */
1052 ZERO_STRUCT(state
->tmp
);
1054 if (DEBUGLEVEL
>= 10) {
1055 NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy
, &state
->orig
);
1058 tevent_req_done(req
);
1061 NTSTATUS
rpccli_lsa_OpenPolicy_recv(struct tevent_req
*req
,
1062 TALLOC_CTX
*mem_ctx
,
1065 struct rpccli_lsa_OpenPolicy_state
*state
= tevent_req_data(
1066 req
, struct rpccli_lsa_OpenPolicy_state
);
1069 if (tevent_req_is_nterror(req
, &status
)) {
1070 tevent_req_received(req
);
1074 /* Steal possbile out parameters to the callers context */
1075 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1078 *result
= state
->orig
.out
.result
;
1080 tevent_req_received(req
);
1081 return NT_STATUS_OK
;
1084 NTSTATUS
rpccli_lsa_OpenPolicy(struct rpc_pipe_client
*cli
,
1085 TALLOC_CTX
*mem_ctx
,
1086 uint16_t *system_name
/* [in] [unique] */,
1087 struct lsa_ObjectAttribute
*attr
/* [in] [ref] */,
1088 uint32_t access_mask
/* [in] */,
1089 struct policy_handle
*handle
/* [out] [ref] */)
1091 struct lsa_OpenPolicy r
;
1095 r
.in
.system_name
= system_name
;
1097 r
.in
.access_mask
= access_mask
;
1099 if (DEBUGLEVEL
>= 10) {
1100 NDR_PRINT_IN_DEBUG(lsa_OpenPolicy
, &r
);
1103 status
= cli
->dispatch(cli
,
1109 if (!NT_STATUS_IS_OK(status
)) {
1113 if (DEBUGLEVEL
>= 10) {
1114 NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy
, &r
);
1117 if (NT_STATUS_IS_ERR(status
)) {
1121 /* Return variables */
1122 *handle
= *r
.out
.handle
;
1125 return r
.out
.result
;
1128 struct rpccli_lsa_QueryInfoPolicy_state
{
1129 struct lsa_QueryInfoPolicy orig
;
1130 struct lsa_QueryInfoPolicy tmp
;
1131 TALLOC_CTX
*out_mem_ctx
;
1132 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1135 static void rpccli_lsa_QueryInfoPolicy_done(struct tevent_req
*subreq
);
1137 struct tevent_req
*rpccli_lsa_QueryInfoPolicy_send(TALLOC_CTX
*mem_ctx
,
1138 struct tevent_context
*ev
,
1139 struct rpc_pipe_client
*cli
,
1140 struct policy_handle
*_handle
/* [in] [ref] */,
1141 enum lsa_PolicyInfo _level
/* [in] */,
1142 union lsa_PolicyInformation
**_info
/* [out] [ref,switch_is(level)] */)
1144 struct tevent_req
*req
;
1145 struct rpccli_lsa_QueryInfoPolicy_state
*state
;
1146 struct tevent_req
*subreq
;
1148 req
= tevent_req_create(mem_ctx
, &state
,
1149 struct rpccli_lsa_QueryInfoPolicy_state
);
1153 state
->out_mem_ctx
= NULL
;
1154 state
->dispatch_recv
= cli
->dispatch_recv
;
1157 state
->orig
.in
.handle
= _handle
;
1158 state
->orig
.in
.level
= _level
;
1160 /* Out parameters */
1161 state
->orig
.out
.info
= _info
;
1164 ZERO_STRUCT(state
->orig
.out
.result
);
1166 if (DEBUGLEVEL
>= 10) {
1167 NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy
, &state
->orig
);
1170 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1171 "rpccli_lsa_QueryInfoPolicy_out_memory");
1172 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1173 return tevent_req_post(req
, ev
);
1176 /* make a temporary copy, that we pass to the dispatch function */
1177 state
->tmp
= state
->orig
;
1179 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1181 NDR_LSA_QUERYINFOPOLICY
,
1183 if (tevent_req_nomem(subreq
, req
)) {
1184 return tevent_req_post(req
, ev
);
1186 tevent_req_set_callback(subreq
, rpccli_lsa_QueryInfoPolicy_done
, req
);
1190 static void rpccli_lsa_QueryInfoPolicy_done(struct tevent_req
*subreq
)
1192 struct tevent_req
*req
= tevent_req_callback_data(
1193 subreq
, struct tevent_req
);
1194 struct rpccli_lsa_QueryInfoPolicy_state
*state
= tevent_req_data(
1195 req
, struct rpccli_lsa_QueryInfoPolicy_state
);
1197 TALLOC_CTX
*mem_ctx
;
1199 if (state
->out_mem_ctx
) {
1200 mem_ctx
= state
->out_mem_ctx
;
1205 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1206 TALLOC_FREE(subreq
);
1207 if (!NT_STATUS_IS_OK(status
)) {
1208 tevent_req_nterror(req
, status
);
1212 /* Copy out parameters */
1213 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
1216 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1218 /* Reset temporary structure */
1219 ZERO_STRUCT(state
->tmp
);
1221 if (DEBUGLEVEL
>= 10) {
1222 NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy
, &state
->orig
);
1225 tevent_req_done(req
);
1228 NTSTATUS
rpccli_lsa_QueryInfoPolicy_recv(struct tevent_req
*req
,
1229 TALLOC_CTX
*mem_ctx
,
1232 struct rpccli_lsa_QueryInfoPolicy_state
*state
= tevent_req_data(
1233 req
, struct rpccli_lsa_QueryInfoPolicy_state
);
1236 if (tevent_req_is_nterror(req
, &status
)) {
1237 tevent_req_received(req
);
1241 /* Steal possbile out parameters to the callers context */
1242 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1245 *result
= state
->orig
.out
.result
;
1247 tevent_req_received(req
);
1248 return NT_STATUS_OK
;
1251 NTSTATUS
rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client
*cli
,
1252 TALLOC_CTX
*mem_ctx
,
1253 struct policy_handle
*handle
/* [in] [ref] */,
1254 enum lsa_PolicyInfo level
/* [in] */,
1255 union lsa_PolicyInformation
**info
/* [out] [ref,switch_is(level)] */)
1257 struct lsa_QueryInfoPolicy r
;
1261 r
.in
.handle
= handle
;
1264 if (DEBUGLEVEL
>= 10) {
1265 NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy
, &r
);
1268 status
= cli
->dispatch(cli
,
1271 NDR_LSA_QUERYINFOPOLICY
,
1274 if (!NT_STATUS_IS_OK(status
)) {
1278 if (DEBUGLEVEL
>= 10) {
1279 NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy
, &r
);
1282 if (NT_STATUS_IS_ERR(status
)) {
1286 /* Return variables */
1287 *info
= *r
.out
.info
;
1290 return r
.out
.result
;
1293 struct rpccli_lsa_SetInfoPolicy_state
{
1294 struct lsa_SetInfoPolicy orig
;
1295 struct lsa_SetInfoPolicy tmp
;
1296 TALLOC_CTX
*out_mem_ctx
;
1297 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1300 static void rpccli_lsa_SetInfoPolicy_done(struct tevent_req
*subreq
);
1302 struct tevent_req
*rpccli_lsa_SetInfoPolicy_send(TALLOC_CTX
*mem_ctx
,
1303 struct tevent_context
*ev
,
1304 struct rpc_pipe_client
*cli
,
1305 struct policy_handle
*_handle
/* [in] [ref] */,
1306 enum lsa_PolicyInfo _level
/* [in] */,
1307 union lsa_PolicyInformation
*_info
/* [in] [ref,switch_is(level)] */)
1309 struct tevent_req
*req
;
1310 struct rpccli_lsa_SetInfoPolicy_state
*state
;
1311 struct tevent_req
*subreq
;
1313 req
= tevent_req_create(mem_ctx
, &state
,
1314 struct rpccli_lsa_SetInfoPolicy_state
);
1318 state
->out_mem_ctx
= NULL
;
1319 state
->dispatch_recv
= cli
->dispatch_recv
;
1322 state
->orig
.in
.handle
= _handle
;
1323 state
->orig
.in
.level
= _level
;
1324 state
->orig
.in
.info
= _info
;
1326 /* Out parameters */
1329 ZERO_STRUCT(state
->orig
.out
.result
);
1331 if (DEBUGLEVEL
>= 10) {
1332 NDR_PRINT_IN_DEBUG(lsa_SetInfoPolicy
, &state
->orig
);
1335 /* make a temporary copy, that we pass to the dispatch function */
1336 state
->tmp
= state
->orig
;
1338 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1340 NDR_LSA_SETINFOPOLICY
,
1342 if (tevent_req_nomem(subreq
, req
)) {
1343 return tevent_req_post(req
, ev
);
1345 tevent_req_set_callback(subreq
, rpccli_lsa_SetInfoPolicy_done
, req
);
1349 static void rpccli_lsa_SetInfoPolicy_done(struct tevent_req
*subreq
)
1351 struct tevent_req
*req
= tevent_req_callback_data(
1352 subreq
, struct tevent_req
);
1353 struct rpccli_lsa_SetInfoPolicy_state
*state
= tevent_req_data(
1354 req
, struct rpccli_lsa_SetInfoPolicy_state
);
1356 TALLOC_CTX
*mem_ctx
;
1358 if (state
->out_mem_ctx
) {
1359 mem_ctx
= state
->out_mem_ctx
;
1364 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1365 TALLOC_FREE(subreq
);
1366 if (!NT_STATUS_IS_OK(status
)) {
1367 tevent_req_nterror(req
, status
);
1371 /* Copy out parameters */
1374 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1376 /* Reset temporary structure */
1377 ZERO_STRUCT(state
->tmp
);
1379 if (DEBUGLEVEL
>= 10) {
1380 NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy
, &state
->orig
);
1383 tevent_req_done(req
);
1386 NTSTATUS
rpccli_lsa_SetInfoPolicy_recv(struct tevent_req
*req
,
1387 TALLOC_CTX
*mem_ctx
,
1390 struct rpccli_lsa_SetInfoPolicy_state
*state
= tevent_req_data(
1391 req
, struct rpccli_lsa_SetInfoPolicy_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_SetInfoPolicy(struct rpc_pipe_client
*cli
,
1410 TALLOC_CTX
*mem_ctx
,
1411 struct policy_handle
*handle
/* [in] [ref] */,
1412 enum lsa_PolicyInfo level
/* [in] */,
1413 union lsa_PolicyInformation
*info
/* [in] [ref,switch_is(level)] */)
1415 struct lsa_SetInfoPolicy r
;
1419 r
.in
.handle
= handle
;
1423 if (DEBUGLEVEL
>= 10) {
1424 NDR_PRINT_IN_DEBUG(lsa_SetInfoPolicy
, &r
);
1427 status
= cli
->dispatch(cli
,
1430 NDR_LSA_SETINFOPOLICY
,
1433 if (!NT_STATUS_IS_OK(status
)) {
1437 if (DEBUGLEVEL
>= 10) {
1438 NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy
, &r
);
1441 if (NT_STATUS_IS_ERR(status
)) {
1445 /* Return variables */
1448 return r
.out
.result
;
1451 struct rpccli_lsa_ClearAuditLog_state
{
1452 struct lsa_ClearAuditLog orig
;
1453 struct lsa_ClearAuditLog tmp
;
1454 TALLOC_CTX
*out_mem_ctx
;
1455 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1458 static void rpccli_lsa_ClearAuditLog_done(struct tevent_req
*subreq
);
1460 struct tevent_req
*rpccli_lsa_ClearAuditLog_send(TALLOC_CTX
*mem_ctx
,
1461 struct tevent_context
*ev
,
1462 struct rpc_pipe_client
*cli
)
1464 struct tevent_req
*req
;
1465 struct rpccli_lsa_ClearAuditLog_state
*state
;
1466 struct tevent_req
*subreq
;
1468 req
= tevent_req_create(mem_ctx
, &state
,
1469 struct rpccli_lsa_ClearAuditLog_state
);
1473 state
->out_mem_ctx
= NULL
;
1474 state
->dispatch_recv
= cli
->dispatch_recv
;
1478 /* Out parameters */
1481 ZERO_STRUCT(state
->orig
.out
.result
);
1483 if (DEBUGLEVEL
>= 10) {
1484 NDR_PRINT_IN_DEBUG(lsa_ClearAuditLog
, &state
->orig
);
1487 /* make a temporary copy, that we pass to the dispatch function */
1488 state
->tmp
= state
->orig
;
1490 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1492 NDR_LSA_CLEARAUDITLOG
,
1494 if (tevent_req_nomem(subreq
, req
)) {
1495 return tevent_req_post(req
, ev
);
1497 tevent_req_set_callback(subreq
, rpccli_lsa_ClearAuditLog_done
, req
);
1501 static void rpccli_lsa_ClearAuditLog_done(struct tevent_req
*subreq
)
1503 struct tevent_req
*req
= tevent_req_callback_data(
1504 subreq
, struct tevent_req
);
1505 struct rpccli_lsa_ClearAuditLog_state
*state
= tevent_req_data(
1506 req
, struct rpccli_lsa_ClearAuditLog_state
);
1508 TALLOC_CTX
*mem_ctx
;
1510 if (state
->out_mem_ctx
) {
1511 mem_ctx
= state
->out_mem_ctx
;
1516 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1517 TALLOC_FREE(subreq
);
1518 if (!NT_STATUS_IS_OK(status
)) {
1519 tevent_req_nterror(req
, status
);
1523 /* Copy out parameters */
1526 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1528 /* Reset temporary structure */
1529 ZERO_STRUCT(state
->tmp
);
1531 if (DEBUGLEVEL
>= 10) {
1532 NDR_PRINT_OUT_DEBUG(lsa_ClearAuditLog
, &state
->orig
);
1535 tevent_req_done(req
);
1538 NTSTATUS
rpccli_lsa_ClearAuditLog_recv(struct tevent_req
*req
,
1539 TALLOC_CTX
*mem_ctx
,
1542 struct rpccli_lsa_ClearAuditLog_state
*state
= tevent_req_data(
1543 req
, struct rpccli_lsa_ClearAuditLog_state
);
1546 if (tevent_req_is_nterror(req
, &status
)) {
1547 tevent_req_received(req
);
1551 /* Steal possbile out parameters to the callers context */
1552 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1555 *result
= state
->orig
.out
.result
;
1557 tevent_req_received(req
);
1558 return NT_STATUS_OK
;
1561 NTSTATUS
rpccli_lsa_ClearAuditLog(struct rpc_pipe_client
*cli
,
1562 TALLOC_CTX
*mem_ctx
)
1564 struct lsa_ClearAuditLog r
;
1569 if (DEBUGLEVEL
>= 10) {
1570 NDR_PRINT_IN_DEBUG(lsa_ClearAuditLog
, &r
);
1573 status
= cli
->dispatch(cli
,
1576 NDR_LSA_CLEARAUDITLOG
,
1579 if (!NT_STATUS_IS_OK(status
)) {
1583 if (DEBUGLEVEL
>= 10) {
1584 NDR_PRINT_OUT_DEBUG(lsa_ClearAuditLog
, &r
);
1587 if (NT_STATUS_IS_ERR(status
)) {
1591 /* Return variables */
1594 return r
.out
.result
;
1597 struct rpccli_lsa_CreateAccount_state
{
1598 struct lsa_CreateAccount orig
;
1599 struct lsa_CreateAccount tmp
;
1600 TALLOC_CTX
*out_mem_ctx
;
1601 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1604 static void rpccli_lsa_CreateAccount_done(struct tevent_req
*subreq
);
1606 struct tevent_req
*rpccli_lsa_CreateAccount_send(TALLOC_CTX
*mem_ctx
,
1607 struct tevent_context
*ev
,
1608 struct rpc_pipe_client
*cli
,
1609 struct policy_handle
*_handle
/* [in] [ref] */,
1610 struct dom_sid2
*_sid
/* [in] [ref] */,
1611 uint32_t _access_mask
/* [in] */,
1612 struct policy_handle
*_acct_handle
/* [out] [ref] */)
1614 struct tevent_req
*req
;
1615 struct rpccli_lsa_CreateAccount_state
*state
;
1616 struct tevent_req
*subreq
;
1618 req
= tevent_req_create(mem_ctx
, &state
,
1619 struct rpccli_lsa_CreateAccount_state
);
1623 state
->out_mem_ctx
= NULL
;
1624 state
->dispatch_recv
= cli
->dispatch_recv
;
1627 state
->orig
.in
.handle
= _handle
;
1628 state
->orig
.in
.sid
= _sid
;
1629 state
->orig
.in
.access_mask
= _access_mask
;
1631 /* Out parameters */
1632 state
->orig
.out
.acct_handle
= _acct_handle
;
1635 ZERO_STRUCT(state
->orig
.out
.result
);
1637 if (DEBUGLEVEL
>= 10) {
1638 NDR_PRINT_IN_DEBUG(lsa_CreateAccount
, &state
->orig
);
1641 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1642 "rpccli_lsa_CreateAccount_out_memory");
1643 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1644 return tevent_req_post(req
, ev
);
1647 /* make a temporary copy, that we pass to the dispatch function */
1648 state
->tmp
= state
->orig
;
1650 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1652 NDR_LSA_CREATEACCOUNT
,
1654 if (tevent_req_nomem(subreq
, req
)) {
1655 return tevent_req_post(req
, ev
);
1657 tevent_req_set_callback(subreq
, rpccli_lsa_CreateAccount_done
, req
);
1661 static void rpccli_lsa_CreateAccount_done(struct tevent_req
*subreq
)
1663 struct tevent_req
*req
= tevent_req_callback_data(
1664 subreq
, struct tevent_req
);
1665 struct rpccli_lsa_CreateAccount_state
*state
= tevent_req_data(
1666 req
, struct rpccli_lsa_CreateAccount_state
);
1668 TALLOC_CTX
*mem_ctx
;
1670 if (state
->out_mem_ctx
) {
1671 mem_ctx
= state
->out_mem_ctx
;
1676 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1677 TALLOC_FREE(subreq
);
1678 if (!NT_STATUS_IS_OK(status
)) {
1679 tevent_req_nterror(req
, status
);
1683 /* Copy out parameters */
1684 *state
->orig
.out
.acct_handle
= *state
->tmp
.out
.acct_handle
;
1687 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1689 /* Reset temporary structure */
1690 ZERO_STRUCT(state
->tmp
);
1692 if (DEBUGLEVEL
>= 10) {
1693 NDR_PRINT_OUT_DEBUG(lsa_CreateAccount
, &state
->orig
);
1696 tevent_req_done(req
);
1699 NTSTATUS
rpccli_lsa_CreateAccount_recv(struct tevent_req
*req
,
1700 TALLOC_CTX
*mem_ctx
,
1703 struct rpccli_lsa_CreateAccount_state
*state
= tevent_req_data(
1704 req
, struct rpccli_lsa_CreateAccount_state
);
1707 if (tevent_req_is_nterror(req
, &status
)) {
1708 tevent_req_received(req
);
1712 /* Steal possbile out parameters to the callers context */
1713 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1716 *result
= state
->orig
.out
.result
;
1718 tevent_req_received(req
);
1719 return NT_STATUS_OK
;
1722 NTSTATUS
rpccli_lsa_CreateAccount(struct rpc_pipe_client
*cli
,
1723 TALLOC_CTX
*mem_ctx
,
1724 struct policy_handle
*handle
/* [in] [ref] */,
1725 struct dom_sid2
*sid
/* [in] [ref] */,
1726 uint32_t access_mask
/* [in] */,
1727 struct policy_handle
*acct_handle
/* [out] [ref] */)
1729 struct lsa_CreateAccount r
;
1733 r
.in
.handle
= handle
;
1735 r
.in
.access_mask
= access_mask
;
1737 if (DEBUGLEVEL
>= 10) {
1738 NDR_PRINT_IN_DEBUG(lsa_CreateAccount
, &r
);
1741 status
= cli
->dispatch(cli
,
1744 NDR_LSA_CREATEACCOUNT
,
1747 if (!NT_STATUS_IS_OK(status
)) {
1751 if (DEBUGLEVEL
>= 10) {
1752 NDR_PRINT_OUT_DEBUG(lsa_CreateAccount
, &r
);
1755 if (NT_STATUS_IS_ERR(status
)) {
1759 /* Return variables */
1760 *acct_handle
= *r
.out
.acct_handle
;
1763 return r
.out
.result
;
1766 struct rpccli_lsa_EnumAccounts_state
{
1767 struct lsa_EnumAccounts orig
;
1768 struct lsa_EnumAccounts tmp
;
1769 TALLOC_CTX
*out_mem_ctx
;
1770 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1773 static void rpccli_lsa_EnumAccounts_done(struct tevent_req
*subreq
);
1775 struct tevent_req
*rpccli_lsa_EnumAccounts_send(TALLOC_CTX
*mem_ctx
,
1776 struct tevent_context
*ev
,
1777 struct rpc_pipe_client
*cli
,
1778 struct policy_handle
*_handle
/* [in] [ref] */,
1779 uint32_t *_resume_handle
/* [in,out] [ref] */,
1780 struct lsa_SidArray
*_sids
/* [out] [ref] */,
1781 uint32_t _num_entries
/* [in] [range(0,8192)] */)
1783 struct tevent_req
*req
;
1784 struct rpccli_lsa_EnumAccounts_state
*state
;
1785 struct tevent_req
*subreq
;
1787 req
= tevent_req_create(mem_ctx
, &state
,
1788 struct rpccli_lsa_EnumAccounts_state
);
1792 state
->out_mem_ctx
= NULL
;
1793 state
->dispatch_recv
= cli
->dispatch_recv
;
1796 state
->orig
.in
.handle
= _handle
;
1797 state
->orig
.in
.resume_handle
= _resume_handle
;
1798 state
->orig
.in
.num_entries
= _num_entries
;
1800 /* Out parameters */
1801 state
->orig
.out
.resume_handle
= _resume_handle
;
1802 state
->orig
.out
.sids
= _sids
;
1805 ZERO_STRUCT(state
->orig
.out
.result
);
1807 if (DEBUGLEVEL
>= 10) {
1808 NDR_PRINT_IN_DEBUG(lsa_EnumAccounts
, &state
->orig
);
1811 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1812 "rpccli_lsa_EnumAccounts_out_memory");
1813 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1814 return tevent_req_post(req
, ev
);
1817 /* make a temporary copy, that we pass to the dispatch function */
1818 state
->tmp
= state
->orig
;
1820 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1822 NDR_LSA_ENUMACCOUNTS
,
1824 if (tevent_req_nomem(subreq
, req
)) {
1825 return tevent_req_post(req
, ev
);
1827 tevent_req_set_callback(subreq
, rpccli_lsa_EnumAccounts_done
, req
);
1831 static void rpccli_lsa_EnumAccounts_done(struct tevent_req
*subreq
)
1833 struct tevent_req
*req
= tevent_req_callback_data(
1834 subreq
, struct tevent_req
);
1835 struct rpccli_lsa_EnumAccounts_state
*state
= tevent_req_data(
1836 req
, struct rpccli_lsa_EnumAccounts_state
);
1838 TALLOC_CTX
*mem_ctx
;
1840 if (state
->out_mem_ctx
) {
1841 mem_ctx
= state
->out_mem_ctx
;
1846 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1847 TALLOC_FREE(subreq
);
1848 if (!NT_STATUS_IS_OK(status
)) {
1849 tevent_req_nterror(req
, status
);
1853 /* Copy out parameters */
1854 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
1855 *state
->orig
.out
.sids
= *state
->tmp
.out
.sids
;
1858 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1860 /* Reset temporary structure */
1861 ZERO_STRUCT(state
->tmp
);
1863 if (DEBUGLEVEL
>= 10) {
1864 NDR_PRINT_OUT_DEBUG(lsa_EnumAccounts
, &state
->orig
);
1867 tevent_req_done(req
);
1870 NTSTATUS
rpccli_lsa_EnumAccounts_recv(struct tevent_req
*req
,
1871 TALLOC_CTX
*mem_ctx
,
1874 struct rpccli_lsa_EnumAccounts_state
*state
= tevent_req_data(
1875 req
, struct rpccli_lsa_EnumAccounts_state
);
1878 if (tevent_req_is_nterror(req
, &status
)) {
1879 tevent_req_received(req
);
1883 /* Steal possbile out parameters to the callers context */
1884 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1887 *result
= state
->orig
.out
.result
;
1889 tevent_req_received(req
);
1890 return NT_STATUS_OK
;
1893 NTSTATUS
rpccli_lsa_EnumAccounts(struct rpc_pipe_client
*cli
,
1894 TALLOC_CTX
*mem_ctx
,
1895 struct policy_handle
*handle
/* [in] [ref] */,
1896 uint32_t *resume_handle
/* [in,out] [ref] */,
1897 struct lsa_SidArray
*sids
/* [out] [ref] */,
1898 uint32_t num_entries
/* [in] [range(0,8192)] */)
1900 struct lsa_EnumAccounts r
;
1904 r
.in
.handle
= handle
;
1905 r
.in
.resume_handle
= resume_handle
;
1906 r
.in
.num_entries
= num_entries
;
1908 if (DEBUGLEVEL
>= 10) {
1909 NDR_PRINT_IN_DEBUG(lsa_EnumAccounts
, &r
);
1912 status
= cli
->dispatch(cli
,
1915 NDR_LSA_ENUMACCOUNTS
,
1918 if (!NT_STATUS_IS_OK(status
)) {
1922 if (DEBUGLEVEL
>= 10) {
1923 NDR_PRINT_OUT_DEBUG(lsa_EnumAccounts
, &r
);
1926 if (NT_STATUS_IS_ERR(status
)) {
1930 /* Return variables */
1931 *resume_handle
= *r
.out
.resume_handle
;
1932 *sids
= *r
.out
.sids
;
1935 return r
.out
.result
;
1938 struct rpccli_lsa_CreateTrustedDomain_state
{
1939 struct lsa_CreateTrustedDomain orig
;
1940 struct lsa_CreateTrustedDomain tmp
;
1941 TALLOC_CTX
*out_mem_ctx
;
1942 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1945 static void rpccli_lsa_CreateTrustedDomain_done(struct tevent_req
*subreq
);
1947 struct tevent_req
*rpccli_lsa_CreateTrustedDomain_send(TALLOC_CTX
*mem_ctx
,
1948 struct tevent_context
*ev
,
1949 struct rpc_pipe_client
*cli
,
1950 struct policy_handle
*_policy_handle
/* [in] [ref] */,
1951 struct lsa_DomainInfo
*_info
/* [in] [ref] */,
1952 uint32_t _access_mask
/* [in] */,
1953 struct policy_handle
*_trustdom_handle
/* [out] [ref] */)
1955 struct tevent_req
*req
;
1956 struct rpccli_lsa_CreateTrustedDomain_state
*state
;
1957 struct tevent_req
*subreq
;
1959 req
= tevent_req_create(mem_ctx
, &state
,
1960 struct rpccli_lsa_CreateTrustedDomain_state
);
1964 state
->out_mem_ctx
= NULL
;
1965 state
->dispatch_recv
= cli
->dispatch_recv
;
1968 state
->orig
.in
.policy_handle
= _policy_handle
;
1969 state
->orig
.in
.info
= _info
;
1970 state
->orig
.in
.access_mask
= _access_mask
;
1972 /* Out parameters */
1973 state
->orig
.out
.trustdom_handle
= _trustdom_handle
;
1976 ZERO_STRUCT(state
->orig
.out
.result
);
1978 if (DEBUGLEVEL
>= 10) {
1979 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomain
, &state
->orig
);
1982 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1983 "rpccli_lsa_CreateTrustedDomain_out_memory");
1984 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1985 return tevent_req_post(req
, ev
);
1988 /* make a temporary copy, that we pass to the dispatch function */
1989 state
->tmp
= state
->orig
;
1991 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1993 NDR_LSA_CREATETRUSTEDDOMAIN
,
1995 if (tevent_req_nomem(subreq
, req
)) {
1996 return tevent_req_post(req
, ev
);
1998 tevent_req_set_callback(subreq
, rpccli_lsa_CreateTrustedDomain_done
, req
);
2002 static void rpccli_lsa_CreateTrustedDomain_done(struct tevent_req
*subreq
)
2004 struct tevent_req
*req
= tevent_req_callback_data(
2005 subreq
, struct tevent_req
);
2006 struct rpccli_lsa_CreateTrustedDomain_state
*state
= tevent_req_data(
2007 req
, struct rpccli_lsa_CreateTrustedDomain_state
);
2009 TALLOC_CTX
*mem_ctx
;
2011 if (state
->out_mem_ctx
) {
2012 mem_ctx
= state
->out_mem_ctx
;
2017 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2018 TALLOC_FREE(subreq
);
2019 if (!NT_STATUS_IS_OK(status
)) {
2020 tevent_req_nterror(req
, status
);
2024 /* Copy out parameters */
2025 *state
->orig
.out
.trustdom_handle
= *state
->tmp
.out
.trustdom_handle
;
2028 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2030 /* Reset temporary structure */
2031 ZERO_STRUCT(state
->tmp
);
2033 if (DEBUGLEVEL
>= 10) {
2034 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomain
, &state
->orig
);
2037 tevent_req_done(req
);
2040 NTSTATUS
rpccli_lsa_CreateTrustedDomain_recv(struct tevent_req
*req
,
2041 TALLOC_CTX
*mem_ctx
,
2044 struct rpccli_lsa_CreateTrustedDomain_state
*state
= tevent_req_data(
2045 req
, struct rpccli_lsa_CreateTrustedDomain_state
);
2048 if (tevent_req_is_nterror(req
, &status
)) {
2049 tevent_req_received(req
);
2053 /* Steal possbile out parameters to the callers context */
2054 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2057 *result
= state
->orig
.out
.result
;
2059 tevent_req_received(req
);
2060 return NT_STATUS_OK
;
2063 NTSTATUS
rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client
*cli
,
2064 TALLOC_CTX
*mem_ctx
,
2065 struct policy_handle
*policy_handle
/* [in] [ref] */,
2066 struct lsa_DomainInfo
*info
/* [in] [ref] */,
2067 uint32_t access_mask
/* [in] */,
2068 struct policy_handle
*trustdom_handle
/* [out] [ref] */)
2070 struct lsa_CreateTrustedDomain r
;
2074 r
.in
.policy_handle
= policy_handle
;
2076 r
.in
.access_mask
= access_mask
;
2078 if (DEBUGLEVEL
>= 10) {
2079 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomain
, &r
);
2082 status
= cli
->dispatch(cli
,
2085 NDR_LSA_CREATETRUSTEDDOMAIN
,
2088 if (!NT_STATUS_IS_OK(status
)) {
2092 if (DEBUGLEVEL
>= 10) {
2093 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomain
, &r
);
2096 if (NT_STATUS_IS_ERR(status
)) {
2100 /* Return variables */
2101 *trustdom_handle
= *r
.out
.trustdom_handle
;
2104 return r
.out
.result
;
2107 struct rpccli_lsa_EnumTrustDom_state
{
2108 struct lsa_EnumTrustDom orig
;
2109 struct lsa_EnumTrustDom tmp
;
2110 TALLOC_CTX
*out_mem_ctx
;
2111 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2114 static void rpccli_lsa_EnumTrustDom_done(struct tevent_req
*subreq
);
2116 struct tevent_req
*rpccli_lsa_EnumTrustDom_send(TALLOC_CTX
*mem_ctx
,
2117 struct tevent_context
*ev
,
2118 struct rpc_pipe_client
*cli
,
2119 struct policy_handle
*_handle
/* [in] [ref] */,
2120 uint32_t *_resume_handle
/* [in,out] [ref] */,
2121 struct lsa_DomainList
*_domains
/* [out] [ref] */,
2122 uint32_t _max_size
/* [in] */)
2124 struct tevent_req
*req
;
2125 struct rpccli_lsa_EnumTrustDom_state
*state
;
2126 struct tevent_req
*subreq
;
2128 req
= tevent_req_create(mem_ctx
, &state
,
2129 struct rpccli_lsa_EnumTrustDom_state
);
2133 state
->out_mem_ctx
= NULL
;
2134 state
->dispatch_recv
= cli
->dispatch_recv
;
2137 state
->orig
.in
.handle
= _handle
;
2138 state
->orig
.in
.resume_handle
= _resume_handle
;
2139 state
->orig
.in
.max_size
= _max_size
;
2141 /* Out parameters */
2142 state
->orig
.out
.resume_handle
= _resume_handle
;
2143 state
->orig
.out
.domains
= _domains
;
2146 ZERO_STRUCT(state
->orig
.out
.result
);
2148 if (DEBUGLEVEL
>= 10) {
2149 NDR_PRINT_IN_DEBUG(lsa_EnumTrustDom
, &state
->orig
);
2152 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2153 "rpccli_lsa_EnumTrustDom_out_memory");
2154 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2155 return tevent_req_post(req
, ev
);
2158 /* make a temporary copy, that we pass to the dispatch function */
2159 state
->tmp
= state
->orig
;
2161 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2163 NDR_LSA_ENUMTRUSTDOM
,
2165 if (tevent_req_nomem(subreq
, req
)) {
2166 return tevent_req_post(req
, ev
);
2168 tevent_req_set_callback(subreq
, rpccli_lsa_EnumTrustDom_done
, req
);
2172 static void rpccli_lsa_EnumTrustDom_done(struct tevent_req
*subreq
)
2174 struct tevent_req
*req
= tevent_req_callback_data(
2175 subreq
, struct tevent_req
);
2176 struct rpccli_lsa_EnumTrustDom_state
*state
= tevent_req_data(
2177 req
, struct rpccli_lsa_EnumTrustDom_state
);
2179 TALLOC_CTX
*mem_ctx
;
2181 if (state
->out_mem_ctx
) {
2182 mem_ctx
= state
->out_mem_ctx
;
2187 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2188 TALLOC_FREE(subreq
);
2189 if (!NT_STATUS_IS_OK(status
)) {
2190 tevent_req_nterror(req
, status
);
2194 /* Copy out parameters */
2195 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
2196 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
2199 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2201 /* Reset temporary structure */
2202 ZERO_STRUCT(state
->tmp
);
2204 if (DEBUGLEVEL
>= 10) {
2205 NDR_PRINT_OUT_DEBUG(lsa_EnumTrustDom
, &state
->orig
);
2208 tevent_req_done(req
);
2211 NTSTATUS
rpccli_lsa_EnumTrustDom_recv(struct tevent_req
*req
,
2212 TALLOC_CTX
*mem_ctx
,
2215 struct rpccli_lsa_EnumTrustDom_state
*state
= tevent_req_data(
2216 req
, struct rpccli_lsa_EnumTrustDom_state
);
2219 if (tevent_req_is_nterror(req
, &status
)) {
2220 tevent_req_received(req
);
2224 /* Steal possbile out parameters to the callers context */
2225 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2228 *result
= state
->orig
.out
.result
;
2230 tevent_req_received(req
);
2231 return NT_STATUS_OK
;
2234 NTSTATUS
rpccli_lsa_EnumTrustDom(struct rpc_pipe_client
*cli
,
2235 TALLOC_CTX
*mem_ctx
,
2236 struct policy_handle
*handle
/* [in] [ref] */,
2237 uint32_t *resume_handle
/* [in,out] [ref] */,
2238 struct lsa_DomainList
*domains
/* [out] [ref] */,
2239 uint32_t max_size
/* [in] */)
2241 struct lsa_EnumTrustDom r
;
2245 r
.in
.handle
= handle
;
2246 r
.in
.resume_handle
= resume_handle
;
2247 r
.in
.max_size
= max_size
;
2249 if (DEBUGLEVEL
>= 10) {
2250 NDR_PRINT_IN_DEBUG(lsa_EnumTrustDom
, &r
);
2253 status
= cli
->dispatch(cli
,
2256 NDR_LSA_ENUMTRUSTDOM
,
2259 if (!NT_STATUS_IS_OK(status
)) {
2263 if (DEBUGLEVEL
>= 10) {
2264 NDR_PRINT_OUT_DEBUG(lsa_EnumTrustDom
, &r
);
2267 if (NT_STATUS_IS_ERR(status
)) {
2271 /* Return variables */
2272 *resume_handle
= *r
.out
.resume_handle
;
2273 *domains
= *r
.out
.domains
;
2276 return r
.out
.result
;
2279 struct rpccli_lsa_LookupNames_state
{
2280 struct lsa_LookupNames orig
;
2281 struct lsa_LookupNames tmp
;
2282 TALLOC_CTX
*out_mem_ctx
;
2283 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2286 static void rpccli_lsa_LookupNames_done(struct tevent_req
*subreq
);
2288 struct tevent_req
*rpccli_lsa_LookupNames_send(TALLOC_CTX
*mem_ctx
,
2289 struct tevent_context
*ev
,
2290 struct rpc_pipe_client
*cli
,
2291 struct policy_handle
*_handle
/* [in] [ref] */,
2292 uint32_t _num_names
/* [in] [range(0,1000)] */,
2293 struct lsa_String
*_names
/* [in] [size_is(num_names)] */,
2294 struct lsa_RefDomainList
**_domains
/* [out] [ref] */,
2295 struct lsa_TransSidArray
*_sids
/* [in,out] [ref] */,
2296 enum lsa_LookupNamesLevel _level
/* [in] */,
2297 uint32_t *_count
/* [in,out] [ref] */)
2299 struct tevent_req
*req
;
2300 struct rpccli_lsa_LookupNames_state
*state
;
2301 struct tevent_req
*subreq
;
2303 req
= tevent_req_create(mem_ctx
, &state
,
2304 struct rpccli_lsa_LookupNames_state
);
2308 state
->out_mem_ctx
= NULL
;
2309 state
->dispatch_recv
= cli
->dispatch_recv
;
2312 state
->orig
.in
.handle
= _handle
;
2313 state
->orig
.in
.num_names
= _num_names
;
2314 state
->orig
.in
.names
= _names
;
2315 state
->orig
.in
.sids
= _sids
;
2316 state
->orig
.in
.level
= _level
;
2317 state
->orig
.in
.count
= _count
;
2319 /* Out parameters */
2320 state
->orig
.out
.domains
= _domains
;
2321 state
->orig
.out
.sids
= _sids
;
2322 state
->orig
.out
.count
= _count
;
2325 ZERO_STRUCT(state
->orig
.out
.result
);
2327 if (DEBUGLEVEL
>= 10) {
2328 NDR_PRINT_IN_DEBUG(lsa_LookupNames
, &state
->orig
);
2331 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2332 "rpccli_lsa_LookupNames_out_memory");
2333 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2334 return tevent_req_post(req
, ev
);
2337 /* make a temporary copy, that we pass to the dispatch function */
2338 state
->tmp
= state
->orig
;
2340 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2342 NDR_LSA_LOOKUPNAMES
,
2344 if (tevent_req_nomem(subreq
, req
)) {
2345 return tevent_req_post(req
, ev
);
2347 tevent_req_set_callback(subreq
, rpccli_lsa_LookupNames_done
, req
);
2351 static void rpccli_lsa_LookupNames_done(struct tevent_req
*subreq
)
2353 struct tevent_req
*req
= tevent_req_callback_data(
2354 subreq
, struct tevent_req
);
2355 struct rpccli_lsa_LookupNames_state
*state
= tevent_req_data(
2356 req
, struct rpccli_lsa_LookupNames_state
);
2358 TALLOC_CTX
*mem_ctx
;
2360 if (state
->out_mem_ctx
) {
2361 mem_ctx
= state
->out_mem_ctx
;
2366 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2367 TALLOC_FREE(subreq
);
2368 if (!NT_STATUS_IS_OK(status
)) {
2369 tevent_req_nterror(req
, status
);
2373 /* Copy out parameters */
2374 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
2375 *state
->orig
.out
.sids
= *state
->tmp
.out
.sids
;
2376 *state
->orig
.out
.count
= *state
->tmp
.out
.count
;
2379 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2381 /* Reset temporary structure */
2382 ZERO_STRUCT(state
->tmp
);
2384 if (DEBUGLEVEL
>= 10) {
2385 NDR_PRINT_OUT_DEBUG(lsa_LookupNames
, &state
->orig
);
2388 tevent_req_done(req
);
2391 NTSTATUS
rpccli_lsa_LookupNames_recv(struct tevent_req
*req
,
2392 TALLOC_CTX
*mem_ctx
,
2395 struct rpccli_lsa_LookupNames_state
*state
= tevent_req_data(
2396 req
, struct rpccli_lsa_LookupNames_state
);
2399 if (tevent_req_is_nterror(req
, &status
)) {
2400 tevent_req_received(req
);
2404 /* Steal possbile out parameters to the callers context */
2405 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2408 *result
= state
->orig
.out
.result
;
2410 tevent_req_received(req
);
2411 return NT_STATUS_OK
;
2414 NTSTATUS
rpccli_lsa_LookupNames(struct rpc_pipe_client
*cli
,
2415 TALLOC_CTX
*mem_ctx
,
2416 struct policy_handle
*handle
/* [in] [ref] */,
2417 uint32_t num_names
/* [in] [range(0,1000)] */,
2418 struct lsa_String
*names
/* [in] [size_is(num_names)] */,
2419 struct lsa_RefDomainList
**domains
/* [out] [ref] */,
2420 struct lsa_TransSidArray
*sids
/* [in,out] [ref] */,
2421 enum lsa_LookupNamesLevel level
/* [in] */,
2422 uint32_t *count
/* [in,out] [ref] */)
2424 struct lsa_LookupNames r
;
2428 r
.in
.handle
= handle
;
2429 r
.in
.num_names
= num_names
;
2435 if (DEBUGLEVEL
>= 10) {
2436 NDR_PRINT_IN_DEBUG(lsa_LookupNames
, &r
);
2439 status
= cli
->dispatch(cli
,
2442 NDR_LSA_LOOKUPNAMES
,
2445 if (!NT_STATUS_IS_OK(status
)) {
2449 if (DEBUGLEVEL
>= 10) {
2450 NDR_PRINT_OUT_DEBUG(lsa_LookupNames
, &r
);
2453 if (NT_STATUS_IS_ERR(status
)) {
2457 /* Return variables */
2458 *domains
= *r
.out
.domains
;
2459 *sids
= *r
.out
.sids
;
2460 *count
= *r
.out
.count
;
2463 return r
.out
.result
;
2466 struct rpccli_lsa_LookupSids_state
{
2467 struct lsa_LookupSids orig
;
2468 struct lsa_LookupSids tmp
;
2469 TALLOC_CTX
*out_mem_ctx
;
2470 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2473 static void rpccli_lsa_LookupSids_done(struct tevent_req
*subreq
);
2475 struct tevent_req
*rpccli_lsa_LookupSids_send(TALLOC_CTX
*mem_ctx
,
2476 struct tevent_context
*ev
,
2477 struct rpc_pipe_client
*cli
,
2478 struct policy_handle
*_handle
/* [in] [ref] */,
2479 struct lsa_SidArray
*_sids
/* [in] [ref] */,
2480 struct lsa_RefDomainList
**_domains
/* [out] [ref] */,
2481 struct lsa_TransNameArray
*_names
/* [in,out] [ref] */,
2482 uint16_t _level
/* [in] */,
2483 uint32_t *_count
/* [in,out] [ref] */)
2485 struct tevent_req
*req
;
2486 struct rpccli_lsa_LookupSids_state
*state
;
2487 struct tevent_req
*subreq
;
2489 req
= tevent_req_create(mem_ctx
, &state
,
2490 struct rpccli_lsa_LookupSids_state
);
2494 state
->out_mem_ctx
= NULL
;
2495 state
->dispatch_recv
= cli
->dispatch_recv
;
2498 state
->orig
.in
.handle
= _handle
;
2499 state
->orig
.in
.sids
= _sids
;
2500 state
->orig
.in
.names
= _names
;
2501 state
->orig
.in
.level
= _level
;
2502 state
->orig
.in
.count
= _count
;
2504 /* Out parameters */
2505 state
->orig
.out
.domains
= _domains
;
2506 state
->orig
.out
.names
= _names
;
2507 state
->orig
.out
.count
= _count
;
2510 ZERO_STRUCT(state
->orig
.out
.result
);
2512 if (DEBUGLEVEL
>= 10) {
2513 NDR_PRINT_IN_DEBUG(lsa_LookupSids
, &state
->orig
);
2516 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2517 "rpccli_lsa_LookupSids_out_memory");
2518 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2519 return tevent_req_post(req
, ev
);
2522 /* make a temporary copy, that we pass to the dispatch function */
2523 state
->tmp
= state
->orig
;
2525 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2529 if (tevent_req_nomem(subreq
, req
)) {
2530 return tevent_req_post(req
, ev
);
2532 tevent_req_set_callback(subreq
, rpccli_lsa_LookupSids_done
, req
);
2536 static void rpccli_lsa_LookupSids_done(struct tevent_req
*subreq
)
2538 struct tevent_req
*req
= tevent_req_callback_data(
2539 subreq
, struct tevent_req
);
2540 struct rpccli_lsa_LookupSids_state
*state
= tevent_req_data(
2541 req
, struct rpccli_lsa_LookupSids_state
);
2543 TALLOC_CTX
*mem_ctx
;
2545 if (state
->out_mem_ctx
) {
2546 mem_ctx
= state
->out_mem_ctx
;
2551 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2552 TALLOC_FREE(subreq
);
2553 if (!NT_STATUS_IS_OK(status
)) {
2554 tevent_req_nterror(req
, status
);
2558 /* Copy out parameters */
2559 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
2560 *state
->orig
.out
.names
= *state
->tmp
.out
.names
;
2561 *state
->orig
.out
.count
= *state
->tmp
.out
.count
;
2564 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2566 /* Reset temporary structure */
2567 ZERO_STRUCT(state
->tmp
);
2569 if (DEBUGLEVEL
>= 10) {
2570 NDR_PRINT_OUT_DEBUG(lsa_LookupSids
, &state
->orig
);
2573 tevent_req_done(req
);
2576 NTSTATUS
rpccli_lsa_LookupSids_recv(struct tevent_req
*req
,
2577 TALLOC_CTX
*mem_ctx
,
2580 struct rpccli_lsa_LookupSids_state
*state
= tevent_req_data(
2581 req
, struct rpccli_lsa_LookupSids_state
);
2584 if (tevent_req_is_nterror(req
, &status
)) {
2585 tevent_req_received(req
);
2589 /* Steal possbile out parameters to the callers context */
2590 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2593 *result
= state
->orig
.out
.result
;
2595 tevent_req_received(req
);
2596 return NT_STATUS_OK
;
2599 NTSTATUS
rpccli_lsa_LookupSids(struct rpc_pipe_client
*cli
,
2600 TALLOC_CTX
*mem_ctx
,
2601 struct policy_handle
*handle
/* [in] [ref] */,
2602 struct lsa_SidArray
*sids
/* [in] [ref] */,
2603 struct lsa_RefDomainList
**domains
/* [out] [ref] */,
2604 struct lsa_TransNameArray
*names
/* [in,out] [ref] */,
2605 uint16_t level
/* [in] */,
2606 uint32_t *count
/* [in,out] [ref] */)
2608 struct lsa_LookupSids r
;
2612 r
.in
.handle
= handle
;
2618 if (DEBUGLEVEL
>= 10) {
2619 NDR_PRINT_IN_DEBUG(lsa_LookupSids
, &r
);
2622 status
= cli
->dispatch(cli
,
2628 if (!NT_STATUS_IS_OK(status
)) {
2632 if (DEBUGLEVEL
>= 10) {
2633 NDR_PRINT_OUT_DEBUG(lsa_LookupSids
, &r
);
2636 if (NT_STATUS_IS_ERR(status
)) {
2640 /* Return variables */
2641 *domains
= *r
.out
.domains
;
2642 *names
= *r
.out
.names
;
2643 *count
= *r
.out
.count
;
2646 return r
.out
.result
;
2649 struct rpccli_lsa_CreateSecret_state
{
2650 struct lsa_CreateSecret orig
;
2651 struct lsa_CreateSecret tmp
;
2652 TALLOC_CTX
*out_mem_ctx
;
2653 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2656 static void rpccli_lsa_CreateSecret_done(struct tevent_req
*subreq
);
2658 struct tevent_req
*rpccli_lsa_CreateSecret_send(TALLOC_CTX
*mem_ctx
,
2659 struct tevent_context
*ev
,
2660 struct rpc_pipe_client
*cli
,
2661 struct policy_handle
*_handle
/* [in] [ref] */,
2662 struct lsa_String _name
/* [in] */,
2663 uint32_t _access_mask
/* [in] */,
2664 struct policy_handle
*_sec_handle
/* [out] [ref] */)
2666 struct tevent_req
*req
;
2667 struct rpccli_lsa_CreateSecret_state
*state
;
2668 struct tevent_req
*subreq
;
2670 req
= tevent_req_create(mem_ctx
, &state
,
2671 struct rpccli_lsa_CreateSecret_state
);
2675 state
->out_mem_ctx
= NULL
;
2676 state
->dispatch_recv
= cli
->dispatch_recv
;
2679 state
->orig
.in
.handle
= _handle
;
2680 state
->orig
.in
.name
= _name
;
2681 state
->orig
.in
.access_mask
= _access_mask
;
2683 /* Out parameters */
2684 state
->orig
.out
.sec_handle
= _sec_handle
;
2687 ZERO_STRUCT(state
->orig
.out
.result
);
2689 if (DEBUGLEVEL
>= 10) {
2690 NDR_PRINT_IN_DEBUG(lsa_CreateSecret
, &state
->orig
);
2693 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2694 "rpccli_lsa_CreateSecret_out_memory");
2695 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2696 return tevent_req_post(req
, ev
);
2699 /* make a temporary copy, that we pass to the dispatch function */
2700 state
->tmp
= state
->orig
;
2702 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2704 NDR_LSA_CREATESECRET
,
2706 if (tevent_req_nomem(subreq
, req
)) {
2707 return tevent_req_post(req
, ev
);
2709 tevent_req_set_callback(subreq
, rpccli_lsa_CreateSecret_done
, req
);
2713 static void rpccli_lsa_CreateSecret_done(struct tevent_req
*subreq
)
2715 struct tevent_req
*req
= tevent_req_callback_data(
2716 subreq
, struct tevent_req
);
2717 struct rpccli_lsa_CreateSecret_state
*state
= tevent_req_data(
2718 req
, struct rpccli_lsa_CreateSecret_state
);
2720 TALLOC_CTX
*mem_ctx
;
2722 if (state
->out_mem_ctx
) {
2723 mem_ctx
= state
->out_mem_ctx
;
2728 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2729 TALLOC_FREE(subreq
);
2730 if (!NT_STATUS_IS_OK(status
)) {
2731 tevent_req_nterror(req
, status
);
2735 /* Copy out parameters */
2736 *state
->orig
.out
.sec_handle
= *state
->tmp
.out
.sec_handle
;
2739 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2741 /* Reset temporary structure */
2742 ZERO_STRUCT(state
->tmp
);
2744 if (DEBUGLEVEL
>= 10) {
2745 NDR_PRINT_OUT_DEBUG(lsa_CreateSecret
, &state
->orig
);
2748 tevent_req_done(req
);
2751 NTSTATUS
rpccli_lsa_CreateSecret_recv(struct tevent_req
*req
,
2752 TALLOC_CTX
*mem_ctx
,
2755 struct rpccli_lsa_CreateSecret_state
*state
= tevent_req_data(
2756 req
, struct rpccli_lsa_CreateSecret_state
);
2759 if (tevent_req_is_nterror(req
, &status
)) {
2760 tevent_req_received(req
);
2764 /* Steal possbile out parameters to the callers context */
2765 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2768 *result
= state
->orig
.out
.result
;
2770 tevent_req_received(req
);
2771 return NT_STATUS_OK
;
2774 NTSTATUS
rpccli_lsa_CreateSecret(struct rpc_pipe_client
*cli
,
2775 TALLOC_CTX
*mem_ctx
,
2776 struct policy_handle
*handle
/* [in] [ref] */,
2777 struct lsa_String name
/* [in] */,
2778 uint32_t access_mask
/* [in] */,
2779 struct policy_handle
*sec_handle
/* [out] [ref] */)
2781 struct lsa_CreateSecret r
;
2785 r
.in
.handle
= handle
;
2787 r
.in
.access_mask
= access_mask
;
2789 if (DEBUGLEVEL
>= 10) {
2790 NDR_PRINT_IN_DEBUG(lsa_CreateSecret
, &r
);
2793 status
= cli
->dispatch(cli
,
2796 NDR_LSA_CREATESECRET
,
2799 if (!NT_STATUS_IS_OK(status
)) {
2803 if (DEBUGLEVEL
>= 10) {
2804 NDR_PRINT_OUT_DEBUG(lsa_CreateSecret
, &r
);
2807 if (NT_STATUS_IS_ERR(status
)) {
2811 /* Return variables */
2812 *sec_handle
= *r
.out
.sec_handle
;
2815 return r
.out
.result
;
2818 struct rpccli_lsa_OpenAccount_state
{
2819 struct lsa_OpenAccount orig
;
2820 struct lsa_OpenAccount tmp
;
2821 TALLOC_CTX
*out_mem_ctx
;
2822 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2825 static void rpccli_lsa_OpenAccount_done(struct tevent_req
*subreq
);
2827 struct tevent_req
*rpccli_lsa_OpenAccount_send(TALLOC_CTX
*mem_ctx
,
2828 struct tevent_context
*ev
,
2829 struct rpc_pipe_client
*cli
,
2830 struct policy_handle
*_handle
/* [in] [ref] */,
2831 struct dom_sid2
*_sid
/* [in] [ref] */,
2832 uint32_t _access_mask
/* [in] */,
2833 struct policy_handle
*_acct_handle
/* [out] [ref] */)
2835 struct tevent_req
*req
;
2836 struct rpccli_lsa_OpenAccount_state
*state
;
2837 struct tevent_req
*subreq
;
2839 req
= tevent_req_create(mem_ctx
, &state
,
2840 struct rpccli_lsa_OpenAccount_state
);
2844 state
->out_mem_ctx
= NULL
;
2845 state
->dispatch_recv
= cli
->dispatch_recv
;
2848 state
->orig
.in
.handle
= _handle
;
2849 state
->orig
.in
.sid
= _sid
;
2850 state
->orig
.in
.access_mask
= _access_mask
;
2852 /* Out parameters */
2853 state
->orig
.out
.acct_handle
= _acct_handle
;
2856 ZERO_STRUCT(state
->orig
.out
.result
);
2858 if (DEBUGLEVEL
>= 10) {
2859 NDR_PRINT_IN_DEBUG(lsa_OpenAccount
, &state
->orig
);
2862 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2863 "rpccli_lsa_OpenAccount_out_memory");
2864 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2865 return tevent_req_post(req
, ev
);
2868 /* make a temporary copy, that we pass to the dispatch function */
2869 state
->tmp
= state
->orig
;
2871 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2873 NDR_LSA_OPENACCOUNT
,
2875 if (tevent_req_nomem(subreq
, req
)) {
2876 return tevent_req_post(req
, ev
);
2878 tevent_req_set_callback(subreq
, rpccli_lsa_OpenAccount_done
, req
);
2882 static void rpccli_lsa_OpenAccount_done(struct tevent_req
*subreq
)
2884 struct tevent_req
*req
= tevent_req_callback_data(
2885 subreq
, struct tevent_req
);
2886 struct rpccli_lsa_OpenAccount_state
*state
= tevent_req_data(
2887 req
, struct rpccli_lsa_OpenAccount_state
);
2889 TALLOC_CTX
*mem_ctx
;
2891 if (state
->out_mem_ctx
) {
2892 mem_ctx
= state
->out_mem_ctx
;
2897 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2898 TALLOC_FREE(subreq
);
2899 if (!NT_STATUS_IS_OK(status
)) {
2900 tevent_req_nterror(req
, status
);
2904 /* Copy out parameters */
2905 *state
->orig
.out
.acct_handle
= *state
->tmp
.out
.acct_handle
;
2908 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2910 /* Reset temporary structure */
2911 ZERO_STRUCT(state
->tmp
);
2913 if (DEBUGLEVEL
>= 10) {
2914 NDR_PRINT_OUT_DEBUG(lsa_OpenAccount
, &state
->orig
);
2917 tevent_req_done(req
);
2920 NTSTATUS
rpccli_lsa_OpenAccount_recv(struct tevent_req
*req
,
2921 TALLOC_CTX
*mem_ctx
,
2924 struct rpccli_lsa_OpenAccount_state
*state
= tevent_req_data(
2925 req
, struct rpccli_lsa_OpenAccount_state
);
2928 if (tevent_req_is_nterror(req
, &status
)) {
2929 tevent_req_received(req
);
2933 /* Steal possbile out parameters to the callers context */
2934 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2937 *result
= state
->orig
.out
.result
;
2939 tevent_req_received(req
);
2940 return NT_STATUS_OK
;
2943 NTSTATUS
rpccli_lsa_OpenAccount(struct rpc_pipe_client
*cli
,
2944 TALLOC_CTX
*mem_ctx
,
2945 struct policy_handle
*handle
/* [in] [ref] */,
2946 struct dom_sid2
*sid
/* [in] [ref] */,
2947 uint32_t access_mask
/* [in] */,
2948 struct policy_handle
*acct_handle
/* [out] [ref] */)
2950 struct lsa_OpenAccount r
;
2954 r
.in
.handle
= handle
;
2956 r
.in
.access_mask
= access_mask
;
2958 if (DEBUGLEVEL
>= 10) {
2959 NDR_PRINT_IN_DEBUG(lsa_OpenAccount
, &r
);
2962 status
= cli
->dispatch(cli
,
2965 NDR_LSA_OPENACCOUNT
,
2968 if (!NT_STATUS_IS_OK(status
)) {
2972 if (DEBUGLEVEL
>= 10) {
2973 NDR_PRINT_OUT_DEBUG(lsa_OpenAccount
, &r
);
2976 if (NT_STATUS_IS_ERR(status
)) {
2980 /* Return variables */
2981 *acct_handle
= *r
.out
.acct_handle
;
2984 return r
.out
.result
;
2987 struct rpccli_lsa_EnumPrivsAccount_state
{
2988 struct lsa_EnumPrivsAccount orig
;
2989 struct lsa_EnumPrivsAccount tmp
;
2990 TALLOC_CTX
*out_mem_ctx
;
2991 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2994 static void rpccli_lsa_EnumPrivsAccount_done(struct tevent_req
*subreq
);
2996 struct tevent_req
*rpccli_lsa_EnumPrivsAccount_send(TALLOC_CTX
*mem_ctx
,
2997 struct tevent_context
*ev
,
2998 struct rpc_pipe_client
*cli
,
2999 struct policy_handle
*_handle
/* [in] [ref] */,
3000 struct lsa_PrivilegeSet
**_privs
/* [out] [ref] */)
3002 struct tevent_req
*req
;
3003 struct rpccli_lsa_EnumPrivsAccount_state
*state
;
3004 struct tevent_req
*subreq
;
3006 req
= tevent_req_create(mem_ctx
, &state
,
3007 struct rpccli_lsa_EnumPrivsAccount_state
);
3011 state
->out_mem_ctx
= NULL
;
3012 state
->dispatch_recv
= cli
->dispatch_recv
;
3015 state
->orig
.in
.handle
= _handle
;
3017 /* Out parameters */
3018 state
->orig
.out
.privs
= _privs
;
3021 ZERO_STRUCT(state
->orig
.out
.result
);
3023 if (DEBUGLEVEL
>= 10) {
3024 NDR_PRINT_IN_DEBUG(lsa_EnumPrivsAccount
, &state
->orig
);
3027 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3028 "rpccli_lsa_EnumPrivsAccount_out_memory");
3029 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3030 return tevent_req_post(req
, ev
);
3033 /* make a temporary copy, that we pass to the dispatch function */
3034 state
->tmp
= state
->orig
;
3036 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3038 NDR_LSA_ENUMPRIVSACCOUNT
,
3040 if (tevent_req_nomem(subreq
, req
)) {
3041 return tevent_req_post(req
, ev
);
3043 tevent_req_set_callback(subreq
, rpccli_lsa_EnumPrivsAccount_done
, req
);
3047 static void rpccli_lsa_EnumPrivsAccount_done(struct tevent_req
*subreq
)
3049 struct tevent_req
*req
= tevent_req_callback_data(
3050 subreq
, struct tevent_req
);
3051 struct rpccli_lsa_EnumPrivsAccount_state
*state
= tevent_req_data(
3052 req
, struct rpccli_lsa_EnumPrivsAccount_state
);
3054 TALLOC_CTX
*mem_ctx
;
3056 if (state
->out_mem_ctx
) {
3057 mem_ctx
= state
->out_mem_ctx
;
3062 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3063 TALLOC_FREE(subreq
);
3064 if (!NT_STATUS_IS_OK(status
)) {
3065 tevent_req_nterror(req
, status
);
3069 /* Copy out parameters */
3070 *state
->orig
.out
.privs
= *state
->tmp
.out
.privs
;
3073 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3075 /* Reset temporary structure */
3076 ZERO_STRUCT(state
->tmp
);
3078 if (DEBUGLEVEL
>= 10) {
3079 NDR_PRINT_OUT_DEBUG(lsa_EnumPrivsAccount
, &state
->orig
);
3082 tevent_req_done(req
);
3085 NTSTATUS
rpccli_lsa_EnumPrivsAccount_recv(struct tevent_req
*req
,
3086 TALLOC_CTX
*mem_ctx
,
3089 struct rpccli_lsa_EnumPrivsAccount_state
*state
= tevent_req_data(
3090 req
, struct rpccli_lsa_EnumPrivsAccount_state
);
3093 if (tevent_req_is_nterror(req
, &status
)) {
3094 tevent_req_received(req
);
3098 /* Steal possbile out parameters to the callers context */
3099 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3102 *result
= state
->orig
.out
.result
;
3104 tevent_req_received(req
);
3105 return NT_STATUS_OK
;
3108 NTSTATUS
rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client
*cli
,
3109 TALLOC_CTX
*mem_ctx
,
3110 struct policy_handle
*handle
/* [in] [ref] */,
3111 struct lsa_PrivilegeSet
**privs
/* [out] [ref] */)
3113 struct lsa_EnumPrivsAccount r
;
3117 r
.in
.handle
= handle
;
3119 if (DEBUGLEVEL
>= 10) {
3120 NDR_PRINT_IN_DEBUG(lsa_EnumPrivsAccount
, &r
);
3123 status
= cli
->dispatch(cli
,
3126 NDR_LSA_ENUMPRIVSACCOUNT
,
3129 if (!NT_STATUS_IS_OK(status
)) {
3133 if (DEBUGLEVEL
>= 10) {
3134 NDR_PRINT_OUT_DEBUG(lsa_EnumPrivsAccount
, &r
);
3137 if (NT_STATUS_IS_ERR(status
)) {
3141 /* Return variables */
3142 *privs
= *r
.out
.privs
;
3145 return r
.out
.result
;
3148 struct rpccli_lsa_AddPrivilegesToAccount_state
{
3149 struct lsa_AddPrivilegesToAccount orig
;
3150 struct lsa_AddPrivilegesToAccount tmp
;
3151 TALLOC_CTX
*out_mem_ctx
;
3152 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3155 static void rpccli_lsa_AddPrivilegesToAccount_done(struct tevent_req
*subreq
);
3157 struct tevent_req
*rpccli_lsa_AddPrivilegesToAccount_send(TALLOC_CTX
*mem_ctx
,
3158 struct tevent_context
*ev
,
3159 struct rpc_pipe_client
*cli
,
3160 struct policy_handle
*_handle
/* [in] [ref] */,
3161 struct lsa_PrivilegeSet
*_privs
/* [in] [ref] */)
3163 struct tevent_req
*req
;
3164 struct rpccli_lsa_AddPrivilegesToAccount_state
*state
;
3165 struct tevent_req
*subreq
;
3167 req
= tevent_req_create(mem_ctx
, &state
,
3168 struct rpccli_lsa_AddPrivilegesToAccount_state
);
3172 state
->out_mem_ctx
= NULL
;
3173 state
->dispatch_recv
= cli
->dispatch_recv
;
3176 state
->orig
.in
.handle
= _handle
;
3177 state
->orig
.in
.privs
= _privs
;
3179 /* Out parameters */
3182 ZERO_STRUCT(state
->orig
.out
.result
);
3184 if (DEBUGLEVEL
>= 10) {
3185 NDR_PRINT_IN_DEBUG(lsa_AddPrivilegesToAccount
, &state
->orig
);
3188 /* make a temporary copy, that we pass to the dispatch function */
3189 state
->tmp
= state
->orig
;
3191 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3193 NDR_LSA_ADDPRIVILEGESTOACCOUNT
,
3195 if (tevent_req_nomem(subreq
, req
)) {
3196 return tevent_req_post(req
, ev
);
3198 tevent_req_set_callback(subreq
, rpccli_lsa_AddPrivilegesToAccount_done
, req
);
3202 static void rpccli_lsa_AddPrivilegesToAccount_done(struct tevent_req
*subreq
)
3204 struct tevent_req
*req
= tevent_req_callback_data(
3205 subreq
, struct tevent_req
);
3206 struct rpccli_lsa_AddPrivilegesToAccount_state
*state
= tevent_req_data(
3207 req
, struct rpccli_lsa_AddPrivilegesToAccount_state
);
3209 TALLOC_CTX
*mem_ctx
;
3211 if (state
->out_mem_ctx
) {
3212 mem_ctx
= state
->out_mem_ctx
;
3217 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3218 TALLOC_FREE(subreq
);
3219 if (!NT_STATUS_IS_OK(status
)) {
3220 tevent_req_nterror(req
, status
);
3224 /* Copy out parameters */
3227 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3229 /* Reset temporary structure */
3230 ZERO_STRUCT(state
->tmp
);
3232 if (DEBUGLEVEL
>= 10) {
3233 NDR_PRINT_OUT_DEBUG(lsa_AddPrivilegesToAccount
, &state
->orig
);
3236 tevent_req_done(req
);
3239 NTSTATUS
rpccli_lsa_AddPrivilegesToAccount_recv(struct tevent_req
*req
,
3240 TALLOC_CTX
*mem_ctx
,
3243 struct rpccli_lsa_AddPrivilegesToAccount_state
*state
= tevent_req_data(
3244 req
, struct rpccli_lsa_AddPrivilegesToAccount_state
);
3247 if (tevent_req_is_nterror(req
, &status
)) {
3248 tevent_req_received(req
);
3252 /* Steal possbile out parameters to the callers context */
3253 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3256 *result
= state
->orig
.out
.result
;
3258 tevent_req_received(req
);
3259 return NT_STATUS_OK
;
3262 NTSTATUS
rpccli_lsa_AddPrivilegesToAccount(struct rpc_pipe_client
*cli
,
3263 TALLOC_CTX
*mem_ctx
,
3264 struct policy_handle
*handle
/* [in] [ref] */,
3265 struct lsa_PrivilegeSet
*privs
/* [in] [ref] */)
3267 struct lsa_AddPrivilegesToAccount r
;
3271 r
.in
.handle
= handle
;
3274 if (DEBUGLEVEL
>= 10) {
3275 NDR_PRINT_IN_DEBUG(lsa_AddPrivilegesToAccount
, &r
);
3278 status
= cli
->dispatch(cli
,
3281 NDR_LSA_ADDPRIVILEGESTOACCOUNT
,
3284 if (!NT_STATUS_IS_OK(status
)) {
3288 if (DEBUGLEVEL
>= 10) {
3289 NDR_PRINT_OUT_DEBUG(lsa_AddPrivilegesToAccount
, &r
);
3292 if (NT_STATUS_IS_ERR(status
)) {
3296 /* Return variables */
3299 return r
.out
.result
;
3302 struct rpccli_lsa_RemovePrivilegesFromAccount_state
{
3303 struct lsa_RemovePrivilegesFromAccount orig
;
3304 struct lsa_RemovePrivilegesFromAccount tmp
;
3305 TALLOC_CTX
*out_mem_ctx
;
3306 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3309 static void rpccli_lsa_RemovePrivilegesFromAccount_done(struct tevent_req
*subreq
);
3311 struct tevent_req
*rpccli_lsa_RemovePrivilegesFromAccount_send(TALLOC_CTX
*mem_ctx
,
3312 struct tevent_context
*ev
,
3313 struct rpc_pipe_client
*cli
,
3314 struct policy_handle
*_handle
/* [in] [ref] */,
3315 uint8_t _remove_all
/* [in] */,
3316 struct lsa_PrivilegeSet
*_privs
/* [in] [unique] */)
3318 struct tevent_req
*req
;
3319 struct rpccli_lsa_RemovePrivilegesFromAccount_state
*state
;
3320 struct tevent_req
*subreq
;
3322 req
= tevent_req_create(mem_ctx
, &state
,
3323 struct rpccli_lsa_RemovePrivilegesFromAccount_state
);
3327 state
->out_mem_ctx
= NULL
;
3328 state
->dispatch_recv
= cli
->dispatch_recv
;
3331 state
->orig
.in
.handle
= _handle
;
3332 state
->orig
.in
.remove_all
= _remove_all
;
3333 state
->orig
.in
.privs
= _privs
;
3335 /* Out parameters */
3338 ZERO_STRUCT(state
->orig
.out
.result
);
3340 if (DEBUGLEVEL
>= 10) {
3341 NDR_PRINT_IN_DEBUG(lsa_RemovePrivilegesFromAccount
, &state
->orig
);
3344 /* make a temporary copy, that we pass to the dispatch function */
3345 state
->tmp
= state
->orig
;
3347 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3349 NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT
,
3351 if (tevent_req_nomem(subreq
, req
)) {
3352 return tevent_req_post(req
, ev
);
3354 tevent_req_set_callback(subreq
, rpccli_lsa_RemovePrivilegesFromAccount_done
, req
);
3358 static void rpccli_lsa_RemovePrivilegesFromAccount_done(struct tevent_req
*subreq
)
3360 struct tevent_req
*req
= tevent_req_callback_data(
3361 subreq
, struct tevent_req
);
3362 struct rpccli_lsa_RemovePrivilegesFromAccount_state
*state
= tevent_req_data(
3363 req
, struct rpccli_lsa_RemovePrivilegesFromAccount_state
);
3365 TALLOC_CTX
*mem_ctx
;
3367 if (state
->out_mem_ctx
) {
3368 mem_ctx
= state
->out_mem_ctx
;
3373 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3374 TALLOC_FREE(subreq
);
3375 if (!NT_STATUS_IS_OK(status
)) {
3376 tevent_req_nterror(req
, status
);
3380 /* Copy out parameters */
3383 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3385 /* Reset temporary structure */
3386 ZERO_STRUCT(state
->tmp
);
3388 if (DEBUGLEVEL
>= 10) {
3389 NDR_PRINT_OUT_DEBUG(lsa_RemovePrivilegesFromAccount
, &state
->orig
);
3392 tevent_req_done(req
);
3395 NTSTATUS
rpccli_lsa_RemovePrivilegesFromAccount_recv(struct tevent_req
*req
,
3396 TALLOC_CTX
*mem_ctx
,
3399 struct rpccli_lsa_RemovePrivilegesFromAccount_state
*state
= tevent_req_data(
3400 req
, struct rpccli_lsa_RemovePrivilegesFromAccount_state
);
3403 if (tevent_req_is_nterror(req
, &status
)) {
3404 tevent_req_received(req
);
3408 /* Steal possbile out parameters to the callers context */
3409 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3412 *result
= state
->orig
.out
.result
;
3414 tevent_req_received(req
);
3415 return NT_STATUS_OK
;
3418 NTSTATUS
rpccli_lsa_RemovePrivilegesFromAccount(struct rpc_pipe_client
*cli
,
3419 TALLOC_CTX
*mem_ctx
,
3420 struct policy_handle
*handle
/* [in] [ref] */,
3421 uint8_t remove_all
/* [in] */,
3422 struct lsa_PrivilegeSet
*privs
/* [in] [unique] */)
3424 struct lsa_RemovePrivilegesFromAccount r
;
3428 r
.in
.handle
= handle
;
3429 r
.in
.remove_all
= remove_all
;
3432 if (DEBUGLEVEL
>= 10) {
3433 NDR_PRINT_IN_DEBUG(lsa_RemovePrivilegesFromAccount
, &r
);
3436 status
= cli
->dispatch(cli
,
3439 NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT
,
3442 if (!NT_STATUS_IS_OK(status
)) {
3446 if (DEBUGLEVEL
>= 10) {
3447 NDR_PRINT_OUT_DEBUG(lsa_RemovePrivilegesFromAccount
, &r
);
3450 if (NT_STATUS_IS_ERR(status
)) {
3454 /* Return variables */
3457 return r
.out
.result
;
3460 struct rpccli_lsa_GetQuotasForAccount_state
{
3461 struct lsa_GetQuotasForAccount orig
;
3462 struct lsa_GetQuotasForAccount tmp
;
3463 TALLOC_CTX
*out_mem_ctx
;
3464 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3467 static void rpccli_lsa_GetQuotasForAccount_done(struct tevent_req
*subreq
);
3469 struct tevent_req
*rpccli_lsa_GetQuotasForAccount_send(TALLOC_CTX
*mem_ctx
,
3470 struct tevent_context
*ev
,
3471 struct rpc_pipe_client
*cli
)
3473 struct tevent_req
*req
;
3474 struct rpccli_lsa_GetQuotasForAccount_state
*state
;
3475 struct tevent_req
*subreq
;
3477 req
= tevent_req_create(mem_ctx
, &state
,
3478 struct rpccli_lsa_GetQuotasForAccount_state
);
3482 state
->out_mem_ctx
= NULL
;
3483 state
->dispatch_recv
= cli
->dispatch_recv
;
3487 /* Out parameters */
3490 ZERO_STRUCT(state
->orig
.out
.result
);
3492 if (DEBUGLEVEL
>= 10) {
3493 NDR_PRINT_IN_DEBUG(lsa_GetQuotasForAccount
, &state
->orig
);
3496 /* make a temporary copy, that we pass to the dispatch function */
3497 state
->tmp
= state
->orig
;
3499 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3501 NDR_LSA_GETQUOTASFORACCOUNT
,
3503 if (tevent_req_nomem(subreq
, req
)) {
3504 return tevent_req_post(req
, ev
);
3506 tevent_req_set_callback(subreq
, rpccli_lsa_GetQuotasForAccount_done
, req
);
3510 static void rpccli_lsa_GetQuotasForAccount_done(struct tevent_req
*subreq
)
3512 struct tevent_req
*req
= tevent_req_callback_data(
3513 subreq
, struct tevent_req
);
3514 struct rpccli_lsa_GetQuotasForAccount_state
*state
= tevent_req_data(
3515 req
, struct rpccli_lsa_GetQuotasForAccount_state
);
3517 TALLOC_CTX
*mem_ctx
;
3519 if (state
->out_mem_ctx
) {
3520 mem_ctx
= state
->out_mem_ctx
;
3525 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3526 TALLOC_FREE(subreq
);
3527 if (!NT_STATUS_IS_OK(status
)) {
3528 tevent_req_nterror(req
, status
);
3532 /* Copy out parameters */
3535 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3537 /* Reset temporary structure */
3538 ZERO_STRUCT(state
->tmp
);
3540 if (DEBUGLEVEL
>= 10) {
3541 NDR_PRINT_OUT_DEBUG(lsa_GetQuotasForAccount
, &state
->orig
);
3544 tevent_req_done(req
);
3547 NTSTATUS
rpccli_lsa_GetQuotasForAccount_recv(struct tevent_req
*req
,
3548 TALLOC_CTX
*mem_ctx
,
3551 struct rpccli_lsa_GetQuotasForAccount_state
*state
= tevent_req_data(
3552 req
, struct rpccli_lsa_GetQuotasForAccount_state
);
3555 if (tevent_req_is_nterror(req
, &status
)) {
3556 tevent_req_received(req
);
3560 /* Steal possbile out parameters to the callers context */
3561 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3564 *result
= state
->orig
.out
.result
;
3566 tevent_req_received(req
);
3567 return NT_STATUS_OK
;
3570 NTSTATUS
rpccli_lsa_GetQuotasForAccount(struct rpc_pipe_client
*cli
,
3571 TALLOC_CTX
*mem_ctx
)
3573 struct lsa_GetQuotasForAccount r
;
3578 if (DEBUGLEVEL
>= 10) {
3579 NDR_PRINT_IN_DEBUG(lsa_GetQuotasForAccount
, &r
);
3582 status
= cli
->dispatch(cli
,
3585 NDR_LSA_GETQUOTASFORACCOUNT
,
3588 if (!NT_STATUS_IS_OK(status
)) {
3592 if (DEBUGLEVEL
>= 10) {
3593 NDR_PRINT_OUT_DEBUG(lsa_GetQuotasForAccount
, &r
);
3596 if (NT_STATUS_IS_ERR(status
)) {
3600 /* Return variables */
3603 return r
.out
.result
;
3606 struct rpccli_lsa_SetQuotasForAccount_state
{
3607 struct lsa_SetQuotasForAccount orig
;
3608 struct lsa_SetQuotasForAccount tmp
;
3609 TALLOC_CTX
*out_mem_ctx
;
3610 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3613 static void rpccli_lsa_SetQuotasForAccount_done(struct tevent_req
*subreq
);
3615 struct tevent_req
*rpccli_lsa_SetQuotasForAccount_send(TALLOC_CTX
*mem_ctx
,
3616 struct tevent_context
*ev
,
3617 struct rpc_pipe_client
*cli
)
3619 struct tevent_req
*req
;
3620 struct rpccli_lsa_SetQuotasForAccount_state
*state
;
3621 struct tevent_req
*subreq
;
3623 req
= tevent_req_create(mem_ctx
, &state
,
3624 struct rpccli_lsa_SetQuotasForAccount_state
);
3628 state
->out_mem_ctx
= NULL
;
3629 state
->dispatch_recv
= cli
->dispatch_recv
;
3633 /* Out parameters */
3636 ZERO_STRUCT(state
->orig
.out
.result
);
3638 if (DEBUGLEVEL
>= 10) {
3639 NDR_PRINT_IN_DEBUG(lsa_SetQuotasForAccount
, &state
->orig
);
3642 /* make a temporary copy, that we pass to the dispatch function */
3643 state
->tmp
= state
->orig
;
3645 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3647 NDR_LSA_SETQUOTASFORACCOUNT
,
3649 if (tevent_req_nomem(subreq
, req
)) {
3650 return tevent_req_post(req
, ev
);
3652 tevent_req_set_callback(subreq
, rpccli_lsa_SetQuotasForAccount_done
, req
);
3656 static void rpccli_lsa_SetQuotasForAccount_done(struct tevent_req
*subreq
)
3658 struct tevent_req
*req
= tevent_req_callback_data(
3659 subreq
, struct tevent_req
);
3660 struct rpccli_lsa_SetQuotasForAccount_state
*state
= tevent_req_data(
3661 req
, struct rpccli_lsa_SetQuotasForAccount_state
);
3663 TALLOC_CTX
*mem_ctx
;
3665 if (state
->out_mem_ctx
) {
3666 mem_ctx
= state
->out_mem_ctx
;
3671 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3672 TALLOC_FREE(subreq
);
3673 if (!NT_STATUS_IS_OK(status
)) {
3674 tevent_req_nterror(req
, status
);
3678 /* Copy out parameters */
3681 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3683 /* Reset temporary structure */
3684 ZERO_STRUCT(state
->tmp
);
3686 if (DEBUGLEVEL
>= 10) {
3687 NDR_PRINT_OUT_DEBUG(lsa_SetQuotasForAccount
, &state
->orig
);
3690 tevent_req_done(req
);
3693 NTSTATUS
rpccli_lsa_SetQuotasForAccount_recv(struct tevent_req
*req
,
3694 TALLOC_CTX
*mem_ctx
,
3697 struct rpccli_lsa_SetQuotasForAccount_state
*state
= tevent_req_data(
3698 req
, struct rpccli_lsa_SetQuotasForAccount_state
);
3701 if (tevent_req_is_nterror(req
, &status
)) {
3702 tevent_req_received(req
);
3706 /* Steal possbile out parameters to the callers context */
3707 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3710 *result
= state
->orig
.out
.result
;
3712 tevent_req_received(req
);
3713 return NT_STATUS_OK
;
3716 NTSTATUS
rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client
*cli
,
3717 TALLOC_CTX
*mem_ctx
)
3719 struct lsa_SetQuotasForAccount r
;
3724 if (DEBUGLEVEL
>= 10) {
3725 NDR_PRINT_IN_DEBUG(lsa_SetQuotasForAccount
, &r
);
3728 status
= cli
->dispatch(cli
,
3731 NDR_LSA_SETQUOTASFORACCOUNT
,
3734 if (!NT_STATUS_IS_OK(status
)) {
3738 if (DEBUGLEVEL
>= 10) {
3739 NDR_PRINT_OUT_DEBUG(lsa_SetQuotasForAccount
, &r
);
3742 if (NT_STATUS_IS_ERR(status
)) {
3746 /* Return variables */
3749 return r
.out
.result
;
3752 struct rpccli_lsa_GetSystemAccessAccount_state
{
3753 struct lsa_GetSystemAccessAccount orig
;
3754 struct lsa_GetSystemAccessAccount tmp
;
3755 TALLOC_CTX
*out_mem_ctx
;
3756 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3759 static void rpccli_lsa_GetSystemAccessAccount_done(struct tevent_req
*subreq
);
3761 struct tevent_req
*rpccli_lsa_GetSystemAccessAccount_send(TALLOC_CTX
*mem_ctx
,
3762 struct tevent_context
*ev
,
3763 struct rpc_pipe_client
*cli
,
3764 struct policy_handle
*_handle
/* [in] [ref] */,
3765 uint32_t *_access_mask
/* [out] [ref] */)
3767 struct tevent_req
*req
;
3768 struct rpccli_lsa_GetSystemAccessAccount_state
*state
;
3769 struct tevent_req
*subreq
;
3771 req
= tevent_req_create(mem_ctx
, &state
,
3772 struct rpccli_lsa_GetSystemAccessAccount_state
);
3776 state
->out_mem_ctx
= NULL
;
3777 state
->dispatch_recv
= cli
->dispatch_recv
;
3780 state
->orig
.in
.handle
= _handle
;
3782 /* Out parameters */
3783 state
->orig
.out
.access_mask
= _access_mask
;
3786 ZERO_STRUCT(state
->orig
.out
.result
);
3788 if (DEBUGLEVEL
>= 10) {
3789 NDR_PRINT_IN_DEBUG(lsa_GetSystemAccessAccount
, &state
->orig
);
3792 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3793 "rpccli_lsa_GetSystemAccessAccount_out_memory");
3794 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3795 return tevent_req_post(req
, ev
);
3798 /* make a temporary copy, that we pass to the dispatch function */
3799 state
->tmp
= state
->orig
;
3801 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3803 NDR_LSA_GETSYSTEMACCESSACCOUNT
,
3805 if (tevent_req_nomem(subreq
, req
)) {
3806 return tevent_req_post(req
, ev
);
3808 tevent_req_set_callback(subreq
, rpccli_lsa_GetSystemAccessAccount_done
, req
);
3812 static void rpccli_lsa_GetSystemAccessAccount_done(struct tevent_req
*subreq
)
3814 struct tevent_req
*req
= tevent_req_callback_data(
3815 subreq
, struct tevent_req
);
3816 struct rpccli_lsa_GetSystemAccessAccount_state
*state
= tevent_req_data(
3817 req
, struct rpccli_lsa_GetSystemAccessAccount_state
);
3819 TALLOC_CTX
*mem_ctx
;
3821 if (state
->out_mem_ctx
) {
3822 mem_ctx
= state
->out_mem_ctx
;
3827 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3828 TALLOC_FREE(subreq
);
3829 if (!NT_STATUS_IS_OK(status
)) {
3830 tevent_req_nterror(req
, status
);
3834 /* Copy out parameters */
3835 *state
->orig
.out
.access_mask
= *state
->tmp
.out
.access_mask
;
3838 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3840 /* Reset temporary structure */
3841 ZERO_STRUCT(state
->tmp
);
3843 if (DEBUGLEVEL
>= 10) {
3844 NDR_PRINT_OUT_DEBUG(lsa_GetSystemAccessAccount
, &state
->orig
);
3847 tevent_req_done(req
);
3850 NTSTATUS
rpccli_lsa_GetSystemAccessAccount_recv(struct tevent_req
*req
,
3851 TALLOC_CTX
*mem_ctx
,
3854 struct rpccli_lsa_GetSystemAccessAccount_state
*state
= tevent_req_data(
3855 req
, struct rpccli_lsa_GetSystemAccessAccount_state
);
3858 if (tevent_req_is_nterror(req
, &status
)) {
3859 tevent_req_received(req
);
3863 /* Steal possbile out parameters to the callers context */
3864 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3867 *result
= state
->orig
.out
.result
;
3869 tevent_req_received(req
);
3870 return NT_STATUS_OK
;
3873 NTSTATUS
rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client
*cli
,
3874 TALLOC_CTX
*mem_ctx
,
3875 struct policy_handle
*handle
/* [in] [ref] */,
3876 uint32_t *access_mask
/* [out] [ref] */)
3878 struct lsa_GetSystemAccessAccount r
;
3882 r
.in
.handle
= handle
;
3884 if (DEBUGLEVEL
>= 10) {
3885 NDR_PRINT_IN_DEBUG(lsa_GetSystemAccessAccount
, &r
);
3888 status
= cli
->dispatch(cli
,
3891 NDR_LSA_GETSYSTEMACCESSACCOUNT
,
3894 if (!NT_STATUS_IS_OK(status
)) {
3898 if (DEBUGLEVEL
>= 10) {
3899 NDR_PRINT_OUT_DEBUG(lsa_GetSystemAccessAccount
, &r
);
3902 if (NT_STATUS_IS_ERR(status
)) {
3906 /* Return variables */
3907 *access_mask
= *r
.out
.access_mask
;
3910 return r
.out
.result
;
3913 struct rpccli_lsa_SetSystemAccessAccount_state
{
3914 struct lsa_SetSystemAccessAccount orig
;
3915 struct lsa_SetSystemAccessAccount tmp
;
3916 TALLOC_CTX
*out_mem_ctx
;
3917 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3920 static void rpccli_lsa_SetSystemAccessAccount_done(struct tevent_req
*subreq
);
3922 struct tevent_req
*rpccli_lsa_SetSystemAccessAccount_send(TALLOC_CTX
*mem_ctx
,
3923 struct tevent_context
*ev
,
3924 struct rpc_pipe_client
*cli
,
3925 struct policy_handle
*_handle
/* [in] [ref] */,
3926 uint32_t _access_mask
/* [in] */)
3928 struct tevent_req
*req
;
3929 struct rpccli_lsa_SetSystemAccessAccount_state
*state
;
3930 struct tevent_req
*subreq
;
3932 req
= tevent_req_create(mem_ctx
, &state
,
3933 struct rpccli_lsa_SetSystemAccessAccount_state
);
3937 state
->out_mem_ctx
= NULL
;
3938 state
->dispatch_recv
= cli
->dispatch_recv
;
3941 state
->orig
.in
.handle
= _handle
;
3942 state
->orig
.in
.access_mask
= _access_mask
;
3944 /* Out parameters */
3947 ZERO_STRUCT(state
->orig
.out
.result
);
3949 if (DEBUGLEVEL
>= 10) {
3950 NDR_PRINT_IN_DEBUG(lsa_SetSystemAccessAccount
, &state
->orig
);
3953 /* make a temporary copy, that we pass to the dispatch function */
3954 state
->tmp
= state
->orig
;
3956 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3958 NDR_LSA_SETSYSTEMACCESSACCOUNT
,
3960 if (tevent_req_nomem(subreq
, req
)) {
3961 return tevent_req_post(req
, ev
);
3963 tevent_req_set_callback(subreq
, rpccli_lsa_SetSystemAccessAccount_done
, req
);
3967 static void rpccli_lsa_SetSystemAccessAccount_done(struct tevent_req
*subreq
)
3969 struct tevent_req
*req
= tevent_req_callback_data(
3970 subreq
, struct tevent_req
);
3971 struct rpccli_lsa_SetSystemAccessAccount_state
*state
= tevent_req_data(
3972 req
, struct rpccli_lsa_SetSystemAccessAccount_state
);
3974 TALLOC_CTX
*mem_ctx
;
3976 if (state
->out_mem_ctx
) {
3977 mem_ctx
= state
->out_mem_ctx
;
3982 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3983 TALLOC_FREE(subreq
);
3984 if (!NT_STATUS_IS_OK(status
)) {
3985 tevent_req_nterror(req
, status
);
3989 /* Copy out parameters */
3992 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3994 /* Reset temporary structure */
3995 ZERO_STRUCT(state
->tmp
);
3997 if (DEBUGLEVEL
>= 10) {
3998 NDR_PRINT_OUT_DEBUG(lsa_SetSystemAccessAccount
, &state
->orig
);
4001 tevent_req_done(req
);
4004 NTSTATUS
rpccli_lsa_SetSystemAccessAccount_recv(struct tevent_req
*req
,
4005 TALLOC_CTX
*mem_ctx
,
4008 struct rpccli_lsa_SetSystemAccessAccount_state
*state
= tevent_req_data(
4009 req
, struct rpccli_lsa_SetSystemAccessAccount_state
);
4012 if (tevent_req_is_nterror(req
, &status
)) {
4013 tevent_req_received(req
);
4017 /* Steal possbile out parameters to the callers context */
4018 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4021 *result
= state
->orig
.out
.result
;
4023 tevent_req_received(req
);
4024 return NT_STATUS_OK
;
4027 NTSTATUS
rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client
*cli
,
4028 TALLOC_CTX
*mem_ctx
,
4029 struct policy_handle
*handle
/* [in] [ref] */,
4030 uint32_t access_mask
/* [in] */)
4032 struct lsa_SetSystemAccessAccount r
;
4036 r
.in
.handle
= handle
;
4037 r
.in
.access_mask
= access_mask
;
4039 if (DEBUGLEVEL
>= 10) {
4040 NDR_PRINT_IN_DEBUG(lsa_SetSystemAccessAccount
, &r
);
4043 status
= cli
->dispatch(cli
,
4046 NDR_LSA_SETSYSTEMACCESSACCOUNT
,
4049 if (!NT_STATUS_IS_OK(status
)) {
4053 if (DEBUGLEVEL
>= 10) {
4054 NDR_PRINT_OUT_DEBUG(lsa_SetSystemAccessAccount
, &r
);
4057 if (NT_STATUS_IS_ERR(status
)) {
4061 /* Return variables */
4064 return r
.out
.result
;
4067 struct rpccli_lsa_OpenTrustedDomain_state
{
4068 struct lsa_OpenTrustedDomain orig
;
4069 struct lsa_OpenTrustedDomain tmp
;
4070 TALLOC_CTX
*out_mem_ctx
;
4071 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4074 static void rpccli_lsa_OpenTrustedDomain_done(struct tevent_req
*subreq
);
4076 struct tevent_req
*rpccli_lsa_OpenTrustedDomain_send(TALLOC_CTX
*mem_ctx
,
4077 struct tevent_context
*ev
,
4078 struct rpc_pipe_client
*cli
,
4079 struct policy_handle
*_handle
/* [in] [ref] */,
4080 struct dom_sid2
*_sid
/* [in] [ref] */,
4081 uint32_t _access_mask
/* [in] */,
4082 struct policy_handle
*_trustdom_handle
/* [out] [ref] */)
4084 struct tevent_req
*req
;
4085 struct rpccli_lsa_OpenTrustedDomain_state
*state
;
4086 struct tevent_req
*subreq
;
4088 req
= tevent_req_create(mem_ctx
, &state
,
4089 struct rpccli_lsa_OpenTrustedDomain_state
);
4093 state
->out_mem_ctx
= NULL
;
4094 state
->dispatch_recv
= cli
->dispatch_recv
;
4097 state
->orig
.in
.handle
= _handle
;
4098 state
->orig
.in
.sid
= _sid
;
4099 state
->orig
.in
.access_mask
= _access_mask
;
4101 /* Out parameters */
4102 state
->orig
.out
.trustdom_handle
= _trustdom_handle
;
4105 ZERO_STRUCT(state
->orig
.out
.result
);
4107 if (DEBUGLEVEL
>= 10) {
4108 NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomain
, &state
->orig
);
4111 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4112 "rpccli_lsa_OpenTrustedDomain_out_memory");
4113 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4114 return tevent_req_post(req
, ev
);
4117 /* make a temporary copy, that we pass to the dispatch function */
4118 state
->tmp
= state
->orig
;
4120 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4122 NDR_LSA_OPENTRUSTEDDOMAIN
,
4124 if (tevent_req_nomem(subreq
, req
)) {
4125 return tevent_req_post(req
, ev
);
4127 tevent_req_set_callback(subreq
, rpccli_lsa_OpenTrustedDomain_done
, req
);
4131 static void rpccli_lsa_OpenTrustedDomain_done(struct tevent_req
*subreq
)
4133 struct tevent_req
*req
= tevent_req_callback_data(
4134 subreq
, struct tevent_req
);
4135 struct rpccli_lsa_OpenTrustedDomain_state
*state
= tevent_req_data(
4136 req
, struct rpccli_lsa_OpenTrustedDomain_state
);
4138 TALLOC_CTX
*mem_ctx
;
4140 if (state
->out_mem_ctx
) {
4141 mem_ctx
= state
->out_mem_ctx
;
4146 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4147 TALLOC_FREE(subreq
);
4148 if (!NT_STATUS_IS_OK(status
)) {
4149 tevent_req_nterror(req
, status
);
4153 /* Copy out parameters */
4154 *state
->orig
.out
.trustdom_handle
= *state
->tmp
.out
.trustdom_handle
;
4157 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4159 /* Reset temporary structure */
4160 ZERO_STRUCT(state
->tmp
);
4162 if (DEBUGLEVEL
>= 10) {
4163 NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomain
, &state
->orig
);
4166 tevent_req_done(req
);
4169 NTSTATUS
rpccli_lsa_OpenTrustedDomain_recv(struct tevent_req
*req
,
4170 TALLOC_CTX
*mem_ctx
,
4173 struct rpccli_lsa_OpenTrustedDomain_state
*state
= tevent_req_data(
4174 req
, struct rpccli_lsa_OpenTrustedDomain_state
);
4177 if (tevent_req_is_nterror(req
, &status
)) {
4178 tevent_req_received(req
);
4182 /* Steal possbile out parameters to the callers context */
4183 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4186 *result
= state
->orig
.out
.result
;
4188 tevent_req_received(req
);
4189 return NT_STATUS_OK
;
4192 NTSTATUS
rpccli_lsa_OpenTrustedDomain(struct rpc_pipe_client
*cli
,
4193 TALLOC_CTX
*mem_ctx
,
4194 struct policy_handle
*handle
/* [in] [ref] */,
4195 struct dom_sid2
*sid
/* [in] [ref] */,
4196 uint32_t access_mask
/* [in] */,
4197 struct policy_handle
*trustdom_handle
/* [out] [ref] */)
4199 struct lsa_OpenTrustedDomain r
;
4203 r
.in
.handle
= handle
;
4205 r
.in
.access_mask
= access_mask
;
4207 if (DEBUGLEVEL
>= 10) {
4208 NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomain
, &r
);
4211 status
= cli
->dispatch(cli
,
4214 NDR_LSA_OPENTRUSTEDDOMAIN
,
4217 if (!NT_STATUS_IS_OK(status
)) {
4221 if (DEBUGLEVEL
>= 10) {
4222 NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomain
, &r
);
4225 if (NT_STATUS_IS_ERR(status
)) {
4229 /* Return variables */
4230 *trustdom_handle
= *r
.out
.trustdom_handle
;
4233 return r
.out
.result
;
4236 struct rpccli_lsa_QueryTrustedDomainInfo_state
{
4237 struct lsa_QueryTrustedDomainInfo orig
;
4238 struct lsa_QueryTrustedDomainInfo tmp
;
4239 TALLOC_CTX
*out_mem_ctx
;
4240 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4243 static void rpccli_lsa_QueryTrustedDomainInfo_done(struct tevent_req
*subreq
);
4245 struct tevent_req
*rpccli_lsa_QueryTrustedDomainInfo_send(TALLOC_CTX
*mem_ctx
,
4246 struct tevent_context
*ev
,
4247 struct rpc_pipe_client
*cli
,
4248 struct policy_handle
*_trustdom_handle
/* [in] [ref] */,
4249 enum lsa_TrustDomInfoEnum _level
/* [in] */,
4250 union lsa_TrustedDomainInfo
**_info
/* [out] [ref,switch_is(level)] */)
4252 struct tevent_req
*req
;
4253 struct rpccli_lsa_QueryTrustedDomainInfo_state
*state
;
4254 struct tevent_req
*subreq
;
4256 req
= tevent_req_create(mem_ctx
, &state
,
4257 struct rpccli_lsa_QueryTrustedDomainInfo_state
);
4261 state
->out_mem_ctx
= NULL
;
4262 state
->dispatch_recv
= cli
->dispatch_recv
;
4265 state
->orig
.in
.trustdom_handle
= _trustdom_handle
;
4266 state
->orig
.in
.level
= _level
;
4268 /* Out parameters */
4269 state
->orig
.out
.info
= _info
;
4272 ZERO_STRUCT(state
->orig
.out
.result
);
4274 if (DEBUGLEVEL
>= 10) {
4275 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfo
, &state
->orig
);
4278 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4279 "rpccli_lsa_QueryTrustedDomainInfo_out_memory");
4280 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4281 return tevent_req_post(req
, ev
);
4284 /* make a temporary copy, that we pass to the dispatch function */
4285 state
->tmp
= state
->orig
;
4287 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4289 NDR_LSA_QUERYTRUSTEDDOMAININFO
,
4291 if (tevent_req_nomem(subreq
, req
)) {
4292 return tevent_req_post(req
, ev
);
4294 tevent_req_set_callback(subreq
, rpccli_lsa_QueryTrustedDomainInfo_done
, req
);
4298 static void rpccli_lsa_QueryTrustedDomainInfo_done(struct tevent_req
*subreq
)
4300 struct tevent_req
*req
= tevent_req_callback_data(
4301 subreq
, struct tevent_req
);
4302 struct rpccli_lsa_QueryTrustedDomainInfo_state
*state
= tevent_req_data(
4303 req
, struct rpccli_lsa_QueryTrustedDomainInfo_state
);
4305 TALLOC_CTX
*mem_ctx
;
4307 if (state
->out_mem_ctx
) {
4308 mem_ctx
= state
->out_mem_ctx
;
4313 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4314 TALLOC_FREE(subreq
);
4315 if (!NT_STATUS_IS_OK(status
)) {
4316 tevent_req_nterror(req
, status
);
4320 /* Copy out parameters */
4321 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
4324 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4326 /* Reset temporary structure */
4327 ZERO_STRUCT(state
->tmp
);
4329 if (DEBUGLEVEL
>= 10) {
4330 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfo
, &state
->orig
);
4333 tevent_req_done(req
);
4336 NTSTATUS
rpccli_lsa_QueryTrustedDomainInfo_recv(struct tevent_req
*req
,
4337 TALLOC_CTX
*mem_ctx
,
4340 struct rpccli_lsa_QueryTrustedDomainInfo_state
*state
= tevent_req_data(
4341 req
, struct rpccli_lsa_QueryTrustedDomainInfo_state
);
4344 if (tevent_req_is_nterror(req
, &status
)) {
4345 tevent_req_received(req
);
4349 /* Steal possbile out parameters to the callers context */
4350 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4353 *result
= state
->orig
.out
.result
;
4355 tevent_req_received(req
);
4356 return NT_STATUS_OK
;
4359 NTSTATUS
rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client
*cli
,
4360 TALLOC_CTX
*mem_ctx
,
4361 struct policy_handle
*trustdom_handle
/* [in] [ref] */,
4362 enum lsa_TrustDomInfoEnum level
/* [in] */,
4363 union lsa_TrustedDomainInfo
**info
/* [out] [ref,switch_is(level)] */)
4365 struct lsa_QueryTrustedDomainInfo r
;
4369 r
.in
.trustdom_handle
= trustdom_handle
;
4372 if (DEBUGLEVEL
>= 10) {
4373 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfo
, &r
);
4376 status
= cli
->dispatch(cli
,
4379 NDR_LSA_QUERYTRUSTEDDOMAININFO
,
4382 if (!NT_STATUS_IS_OK(status
)) {
4386 if (DEBUGLEVEL
>= 10) {
4387 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfo
, &r
);
4390 if (NT_STATUS_IS_ERR(status
)) {
4394 /* Return variables */
4395 *info
= *r
.out
.info
;
4398 return r
.out
.result
;
4401 struct rpccli_lsa_SetInformationTrustedDomain_state
{
4402 struct lsa_SetInformationTrustedDomain orig
;
4403 struct lsa_SetInformationTrustedDomain tmp
;
4404 TALLOC_CTX
*out_mem_ctx
;
4405 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4408 static void rpccli_lsa_SetInformationTrustedDomain_done(struct tevent_req
*subreq
);
4410 struct tevent_req
*rpccli_lsa_SetInformationTrustedDomain_send(TALLOC_CTX
*mem_ctx
,
4411 struct tevent_context
*ev
,
4412 struct rpc_pipe_client
*cli
,
4413 struct policy_handle
*_trustdom_handle
/* [in] [ref] */,
4414 enum lsa_TrustDomInfoEnum _level
/* [in] */,
4415 union lsa_TrustedDomainInfo
*_info
/* [in] [ref,switch_is(level)] */)
4417 struct tevent_req
*req
;
4418 struct rpccli_lsa_SetInformationTrustedDomain_state
*state
;
4419 struct tevent_req
*subreq
;
4421 req
= tevent_req_create(mem_ctx
, &state
,
4422 struct rpccli_lsa_SetInformationTrustedDomain_state
);
4426 state
->out_mem_ctx
= NULL
;
4427 state
->dispatch_recv
= cli
->dispatch_recv
;
4430 state
->orig
.in
.trustdom_handle
= _trustdom_handle
;
4431 state
->orig
.in
.level
= _level
;
4432 state
->orig
.in
.info
= _info
;
4434 /* Out parameters */
4437 ZERO_STRUCT(state
->orig
.out
.result
);
4439 if (DEBUGLEVEL
>= 10) {
4440 NDR_PRINT_IN_DEBUG(lsa_SetInformationTrustedDomain
, &state
->orig
);
4443 /* make a temporary copy, that we pass to the dispatch function */
4444 state
->tmp
= state
->orig
;
4446 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4448 NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN
,
4450 if (tevent_req_nomem(subreq
, req
)) {
4451 return tevent_req_post(req
, ev
);
4453 tevent_req_set_callback(subreq
, rpccli_lsa_SetInformationTrustedDomain_done
, req
);
4457 static void rpccli_lsa_SetInformationTrustedDomain_done(struct tevent_req
*subreq
)
4459 struct tevent_req
*req
= tevent_req_callback_data(
4460 subreq
, struct tevent_req
);
4461 struct rpccli_lsa_SetInformationTrustedDomain_state
*state
= tevent_req_data(
4462 req
, struct rpccli_lsa_SetInformationTrustedDomain_state
);
4464 TALLOC_CTX
*mem_ctx
;
4466 if (state
->out_mem_ctx
) {
4467 mem_ctx
= state
->out_mem_ctx
;
4472 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4473 TALLOC_FREE(subreq
);
4474 if (!NT_STATUS_IS_OK(status
)) {
4475 tevent_req_nterror(req
, status
);
4479 /* Copy out parameters */
4482 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4484 /* Reset temporary structure */
4485 ZERO_STRUCT(state
->tmp
);
4487 if (DEBUGLEVEL
>= 10) {
4488 NDR_PRINT_OUT_DEBUG(lsa_SetInformationTrustedDomain
, &state
->orig
);
4491 tevent_req_done(req
);
4494 NTSTATUS
rpccli_lsa_SetInformationTrustedDomain_recv(struct tevent_req
*req
,
4495 TALLOC_CTX
*mem_ctx
,
4498 struct rpccli_lsa_SetInformationTrustedDomain_state
*state
= tevent_req_data(
4499 req
, struct rpccli_lsa_SetInformationTrustedDomain_state
);
4502 if (tevent_req_is_nterror(req
, &status
)) {
4503 tevent_req_received(req
);
4507 /* Steal possbile out parameters to the callers context */
4508 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4511 *result
= state
->orig
.out
.result
;
4513 tevent_req_received(req
);
4514 return NT_STATUS_OK
;
4517 NTSTATUS
rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client
*cli
,
4518 TALLOC_CTX
*mem_ctx
,
4519 struct policy_handle
*trustdom_handle
/* [in] [ref] */,
4520 enum lsa_TrustDomInfoEnum level
/* [in] */,
4521 union lsa_TrustedDomainInfo
*info
/* [in] [ref,switch_is(level)] */)
4523 struct lsa_SetInformationTrustedDomain r
;
4527 r
.in
.trustdom_handle
= trustdom_handle
;
4531 if (DEBUGLEVEL
>= 10) {
4532 NDR_PRINT_IN_DEBUG(lsa_SetInformationTrustedDomain
, &r
);
4535 status
= cli
->dispatch(cli
,
4538 NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN
,
4541 if (!NT_STATUS_IS_OK(status
)) {
4545 if (DEBUGLEVEL
>= 10) {
4546 NDR_PRINT_OUT_DEBUG(lsa_SetInformationTrustedDomain
, &r
);
4549 if (NT_STATUS_IS_ERR(status
)) {
4553 /* Return variables */
4556 return r
.out
.result
;
4559 struct rpccli_lsa_OpenSecret_state
{
4560 struct lsa_OpenSecret orig
;
4561 struct lsa_OpenSecret tmp
;
4562 TALLOC_CTX
*out_mem_ctx
;
4563 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4566 static void rpccli_lsa_OpenSecret_done(struct tevent_req
*subreq
);
4568 struct tevent_req
*rpccli_lsa_OpenSecret_send(TALLOC_CTX
*mem_ctx
,
4569 struct tevent_context
*ev
,
4570 struct rpc_pipe_client
*cli
,
4571 struct policy_handle
*_handle
/* [in] [ref] */,
4572 struct lsa_String _name
/* [in] */,
4573 uint32_t _access_mask
/* [in] */,
4574 struct policy_handle
*_sec_handle
/* [out] [ref] */)
4576 struct tevent_req
*req
;
4577 struct rpccli_lsa_OpenSecret_state
*state
;
4578 struct tevent_req
*subreq
;
4580 req
= tevent_req_create(mem_ctx
, &state
,
4581 struct rpccli_lsa_OpenSecret_state
);
4585 state
->out_mem_ctx
= NULL
;
4586 state
->dispatch_recv
= cli
->dispatch_recv
;
4589 state
->orig
.in
.handle
= _handle
;
4590 state
->orig
.in
.name
= _name
;
4591 state
->orig
.in
.access_mask
= _access_mask
;
4593 /* Out parameters */
4594 state
->orig
.out
.sec_handle
= _sec_handle
;
4597 ZERO_STRUCT(state
->orig
.out
.result
);
4599 if (DEBUGLEVEL
>= 10) {
4600 NDR_PRINT_IN_DEBUG(lsa_OpenSecret
, &state
->orig
);
4603 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4604 "rpccli_lsa_OpenSecret_out_memory");
4605 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4606 return tevent_req_post(req
, ev
);
4609 /* make a temporary copy, that we pass to the dispatch function */
4610 state
->tmp
= state
->orig
;
4612 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4616 if (tevent_req_nomem(subreq
, req
)) {
4617 return tevent_req_post(req
, ev
);
4619 tevent_req_set_callback(subreq
, rpccli_lsa_OpenSecret_done
, req
);
4623 static void rpccli_lsa_OpenSecret_done(struct tevent_req
*subreq
)
4625 struct tevent_req
*req
= tevent_req_callback_data(
4626 subreq
, struct tevent_req
);
4627 struct rpccli_lsa_OpenSecret_state
*state
= tevent_req_data(
4628 req
, struct rpccli_lsa_OpenSecret_state
);
4630 TALLOC_CTX
*mem_ctx
;
4632 if (state
->out_mem_ctx
) {
4633 mem_ctx
= state
->out_mem_ctx
;
4638 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4639 TALLOC_FREE(subreq
);
4640 if (!NT_STATUS_IS_OK(status
)) {
4641 tevent_req_nterror(req
, status
);
4645 /* Copy out parameters */
4646 *state
->orig
.out
.sec_handle
= *state
->tmp
.out
.sec_handle
;
4649 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4651 /* Reset temporary structure */
4652 ZERO_STRUCT(state
->tmp
);
4654 if (DEBUGLEVEL
>= 10) {
4655 NDR_PRINT_OUT_DEBUG(lsa_OpenSecret
, &state
->orig
);
4658 tevent_req_done(req
);
4661 NTSTATUS
rpccli_lsa_OpenSecret_recv(struct tevent_req
*req
,
4662 TALLOC_CTX
*mem_ctx
,
4665 struct rpccli_lsa_OpenSecret_state
*state
= tevent_req_data(
4666 req
, struct rpccli_lsa_OpenSecret_state
);
4669 if (tevent_req_is_nterror(req
, &status
)) {
4670 tevent_req_received(req
);
4674 /* Steal possbile out parameters to the callers context */
4675 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4678 *result
= state
->orig
.out
.result
;
4680 tevent_req_received(req
);
4681 return NT_STATUS_OK
;
4684 NTSTATUS
rpccli_lsa_OpenSecret(struct rpc_pipe_client
*cli
,
4685 TALLOC_CTX
*mem_ctx
,
4686 struct policy_handle
*handle
/* [in] [ref] */,
4687 struct lsa_String name
/* [in] */,
4688 uint32_t access_mask
/* [in] */,
4689 struct policy_handle
*sec_handle
/* [out] [ref] */)
4691 struct lsa_OpenSecret r
;
4695 r
.in
.handle
= handle
;
4697 r
.in
.access_mask
= access_mask
;
4699 if (DEBUGLEVEL
>= 10) {
4700 NDR_PRINT_IN_DEBUG(lsa_OpenSecret
, &r
);
4703 status
= cli
->dispatch(cli
,
4709 if (!NT_STATUS_IS_OK(status
)) {
4713 if (DEBUGLEVEL
>= 10) {
4714 NDR_PRINT_OUT_DEBUG(lsa_OpenSecret
, &r
);
4717 if (NT_STATUS_IS_ERR(status
)) {
4721 /* Return variables */
4722 *sec_handle
= *r
.out
.sec_handle
;
4725 return r
.out
.result
;
4728 struct rpccli_lsa_SetSecret_state
{
4729 struct lsa_SetSecret orig
;
4730 struct lsa_SetSecret tmp
;
4731 TALLOC_CTX
*out_mem_ctx
;
4732 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4735 static void rpccli_lsa_SetSecret_done(struct tevent_req
*subreq
);
4737 struct tevent_req
*rpccli_lsa_SetSecret_send(TALLOC_CTX
*mem_ctx
,
4738 struct tevent_context
*ev
,
4739 struct rpc_pipe_client
*cli
,
4740 struct policy_handle
*_sec_handle
/* [in] [ref] */,
4741 struct lsa_DATA_BUF
*_new_val
/* [in] [unique] */,
4742 struct lsa_DATA_BUF
*_old_val
/* [in] [unique] */)
4744 struct tevent_req
*req
;
4745 struct rpccli_lsa_SetSecret_state
*state
;
4746 struct tevent_req
*subreq
;
4748 req
= tevent_req_create(mem_ctx
, &state
,
4749 struct rpccli_lsa_SetSecret_state
);
4753 state
->out_mem_ctx
= NULL
;
4754 state
->dispatch_recv
= cli
->dispatch_recv
;
4757 state
->orig
.in
.sec_handle
= _sec_handle
;
4758 state
->orig
.in
.new_val
= _new_val
;
4759 state
->orig
.in
.old_val
= _old_val
;
4761 /* Out parameters */
4764 ZERO_STRUCT(state
->orig
.out
.result
);
4766 if (DEBUGLEVEL
>= 10) {
4767 NDR_PRINT_IN_DEBUG(lsa_SetSecret
, &state
->orig
);
4770 /* make a temporary copy, that we pass to the dispatch function */
4771 state
->tmp
= state
->orig
;
4773 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4777 if (tevent_req_nomem(subreq
, req
)) {
4778 return tevent_req_post(req
, ev
);
4780 tevent_req_set_callback(subreq
, rpccli_lsa_SetSecret_done
, req
);
4784 static void rpccli_lsa_SetSecret_done(struct tevent_req
*subreq
)
4786 struct tevent_req
*req
= tevent_req_callback_data(
4787 subreq
, struct tevent_req
);
4788 struct rpccli_lsa_SetSecret_state
*state
= tevent_req_data(
4789 req
, struct rpccli_lsa_SetSecret_state
);
4791 TALLOC_CTX
*mem_ctx
;
4793 if (state
->out_mem_ctx
) {
4794 mem_ctx
= state
->out_mem_ctx
;
4799 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4800 TALLOC_FREE(subreq
);
4801 if (!NT_STATUS_IS_OK(status
)) {
4802 tevent_req_nterror(req
, status
);
4806 /* Copy out parameters */
4809 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4811 /* Reset temporary structure */
4812 ZERO_STRUCT(state
->tmp
);
4814 if (DEBUGLEVEL
>= 10) {
4815 NDR_PRINT_OUT_DEBUG(lsa_SetSecret
, &state
->orig
);
4818 tevent_req_done(req
);
4821 NTSTATUS
rpccli_lsa_SetSecret_recv(struct tevent_req
*req
,
4822 TALLOC_CTX
*mem_ctx
,
4825 struct rpccli_lsa_SetSecret_state
*state
= tevent_req_data(
4826 req
, struct rpccli_lsa_SetSecret_state
);
4829 if (tevent_req_is_nterror(req
, &status
)) {
4830 tevent_req_received(req
);
4834 /* Steal possbile out parameters to the callers context */
4835 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4838 *result
= state
->orig
.out
.result
;
4840 tevent_req_received(req
);
4841 return NT_STATUS_OK
;
4844 NTSTATUS
rpccli_lsa_SetSecret(struct rpc_pipe_client
*cli
,
4845 TALLOC_CTX
*mem_ctx
,
4846 struct policy_handle
*sec_handle
/* [in] [ref] */,
4847 struct lsa_DATA_BUF
*new_val
/* [in] [unique] */,
4848 struct lsa_DATA_BUF
*old_val
/* [in] [unique] */)
4850 struct lsa_SetSecret r
;
4854 r
.in
.sec_handle
= sec_handle
;
4855 r
.in
.new_val
= new_val
;
4856 r
.in
.old_val
= old_val
;
4858 if (DEBUGLEVEL
>= 10) {
4859 NDR_PRINT_IN_DEBUG(lsa_SetSecret
, &r
);
4862 status
= cli
->dispatch(cli
,
4868 if (!NT_STATUS_IS_OK(status
)) {
4872 if (DEBUGLEVEL
>= 10) {
4873 NDR_PRINT_OUT_DEBUG(lsa_SetSecret
, &r
);
4876 if (NT_STATUS_IS_ERR(status
)) {
4880 /* Return variables */
4883 return r
.out
.result
;
4886 struct rpccli_lsa_QuerySecret_state
{
4887 struct lsa_QuerySecret orig
;
4888 struct lsa_QuerySecret tmp
;
4889 TALLOC_CTX
*out_mem_ctx
;
4890 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4893 static void rpccli_lsa_QuerySecret_done(struct tevent_req
*subreq
);
4895 struct tevent_req
*rpccli_lsa_QuerySecret_send(TALLOC_CTX
*mem_ctx
,
4896 struct tevent_context
*ev
,
4897 struct rpc_pipe_client
*cli
,
4898 struct policy_handle
*_sec_handle
/* [in] [ref] */,
4899 struct lsa_DATA_BUF_PTR
*_new_val
/* [in,out] [unique] */,
4900 NTTIME
*_new_mtime
/* [in,out] [unique] */,
4901 struct lsa_DATA_BUF_PTR
*_old_val
/* [in,out] [unique] */,
4902 NTTIME
*_old_mtime
/* [in,out] [unique] */)
4904 struct tevent_req
*req
;
4905 struct rpccli_lsa_QuerySecret_state
*state
;
4906 struct tevent_req
*subreq
;
4908 req
= tevent_req_create(mem_ctx
, &state
,
4909 struct rpccli_lsa_QuerySecret_state
);
4913 state
->out_mem_ctx
= NULL
;
4914 state
->dispatch_recv
= cli
->dispatch_recv
;
4917 state
->orig
.in
.sec_handle
= _sec_handle
;
4918 state
->orig
.in
.new_val
= _new_val
;
4919 state
->orig
.in
.new_mtime
= _new_mtime
;
4920 state
->orig
.in
.old_val
= _old_val
;
4921 state
->orig
.in
.old_mtime
= _old_mtime
;
4923 /* Out parameters */
4924 state
->orig
.out
.new_val
= _new_val
;
4925 state
->orig
.out
.new_mtime
= _new_mtime
;
4926 state
->orig
.out
.old_val
= _old_val
;
4927 state
->orig
.out
.old_mtime
= _old_mtime
;
4930 ZERO_STRUCT(state
->orig
.out
.result
);
4932 if (DEBUGLEVEL
>= 10) {
4933 NDR_PRINT_IN_DEBUG(lsa_QuerySecret
, &state
->orig
);
4936 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4937 "rpccli_lsa_QuerySecret_out_memory");
4938 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4939 return tevent_req_post(req
, ev
);
4942 /* make a temporary copy, that we pass to the dispatch function */
4943 state
->tmp
= state
->orig
;
4945 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4947 NDR_LSA_QUERYSECRET
,
4949 if (tevent_req_nomem(subreq
, req
)) {
4950 return tevent_req_post(req
, ev
);
4952 tevent_req_set_callback(subreq
, rpccli_lsa_QuerySecret_done
, req
);
4956 static void rpccli_lsa_QuerySecret_done(struct tevent_req
*subreq
)
4958 struct tevent_req
*req
= tevent_req_callback_data(
4959 subreq
, struct tevent_req
);
4960 struct rpccli_lsa_QuerySecret_state
*state
= tevent_req_data(
4961 req
, struct rpccli_lsa_QuerySecret_state
);
4963 TALLOC_CTX
*mem_ctx
;
4965 if (state
->out_mem_ctx
) {
4966 mem_ctx
= state
->out_mem_ctx
;
4971 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4972 TALLOC_FREE(subreq
);
4973 if (!NT_STATUS_IS_OK(status
)) {
4974 tevent_req_nterror(req
, status
);
4978 /* Copy out parameters */
4979 if (state
->orig
.out
.new_val
&& state
->tmp
.out
.new_val
) {
4980 *state
->orig
.out
.new_val
= *state
->tmp
.out
.new_val
;
4982 if (state
->orig
.out
.new_mtime
&& state
->tmp
.out
.new_mtime
) {
4983 *state
->orig
.out
.new_mtime
= *state
->tmp
.out
.new_mtime
;
4985 if (state
->orig
.out
.old_val
&& state
->tmp
.out
.old_val
) {
4986 *state
->orig
.out
.old_val
= *state
->tmp
.out
.old_val
;
4988 if (state
->orig
.out
.old_mtime
&& state
->tmp
.out
.old_mtime
) {
4989 *state
->orig
.out
.old_mtime
= *state
->tmp
.out
.old_mtime
;
4993 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4995 /* Reset temporary structure */
4996 ZERO_STRUCT(state
->tmp
);
4998 if (DEBUGLEVEL
>= 10) {
4999 NDR_PRINT_OUT_DEBUG(lsa_QuerySecret
, &state
->orig
);
5002 tevent_req_done(req
);
5005 NTSTATUS
rpccli_lsa_QuerySecret_recv(struct tevent_req
*req
,
5006 TALLOC_CTX
*mem_ctx
,
5009 struct rpccli_lsa_QuerySecret_state
*state
= tevent_req_data(
5010 req
, struct rpccli_lsa_QuerySecret_state
);
5013 if (tevent_req_is_nterror(req
, &status
)) {
5014 tevent_req_received(req
);
5018 /* Steal possbile out parameters to the callers context */
5019 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5022 *result
= state
->orig
.out
.result
;
5024 tevent_req_received(req
);
5025 return NT_STATUS_OK
;
5028 NTSTATUS
rpccli_lsa_QuerySecret(struct rpc_pipe_client
*cli
,
5029 TALLOC_CTX
*mem_ctx
,
5030 struct policy_handle
*sec_handle
/* [in] [ref] */,
5031 struct lsa_DATA_BUF_PTR
*new_val
/* [in,out] [unique] */,
5032 NTTIME
*new_mtime
/* [in,out] [unique] */,
5033 struct lsa_DATA_BUF_PTR
*old_val
/* [in,out] [unique] */,
5034 NTTIME
*old_mtime
/* [in,out] [unique] */)
5036 struct lsa_QuerySecret r
;
5040 r
.in
.sec_handle
= sec_handle
;
5041 r
.in
.new_val
= new_val
;
5042 r
.in
.new_mtime
= new_mtime
;
5043 r
.in
.old_val
= old_val
;
5044 r
.in
.old_mtime
= old_mtime
;
5046 if (DEBUGLEVEL
>= 10) {
5047 NDR_PRINT_IN_DEBUG(lsa_QuerySecret
, &r
);
5050 status
= cli
->dispatch(cli
,
5053 NDR_LSA_QUERYSECRET
,
5056 if (!NT_STATUS_IS_OK(status
)) {
5060 if (DEBUGLEVEL
>= 10) {
5061 NDR_PRINT_OUT_DEBUG(lsa_QuerySecret
, &r
);
5064 if (NT_STATUS_IS_ERR(status
)) {
5068 /* Return variables */
5069 if (new_val
&& r
.out
.new_val
) {
5070 *new_val
= *r
.out
.new_val
;
5072 if (new_mtime
&& r
.out
.new_mtime
) {
5073 *new_mtime
= *r
.out
.new_mtime
;
5075 if (old_val
&& r
.out
.old_val
) {
5076 *old_val
= *r
.out
.old_val
;
5078 if (old_mtime
&& r
.out
.old_mtime
) {
5079 *old_mtime
= *r
.out
.old_mtime
;
5083 return r
.out
.result
;
5086 struct rpccli_lsa_LookupPrivValue_state
{
5087 struct lsa_LookupPrivValue orig
;
5088 struct lsa_LookupPrivValue tmp
;
5089 TALLOC_CTX
*out_mem_ctx
;
5090 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5093 static void rpccli_lsa_LookupPrivValue_done(struct tevent_req
*subreq
);
5095 struct tevent_req
*rpccli_lsa_LookupPrivValue_send(TALLOC_CTX
*mem_ctx
,
5096 struct tevent_context
*ev
,
5097 struct rpc_pipe_client
*cli
,
5098 struct policy_handle
*_handle
/* [in] [ref] */,
5099 struct lsa_String
*_name
/* [in] [ref] */,
5100 struct lsa_LUID
*_luid
/* [out] [ref] */)
5102 struct tevent_req
*req
;
5103 struct rpccli_lsa_LookupPrivValue_state
*state
;
5104 struct tevent_req
*subreq
;
5106 req
= tevent_req_create(mem_ctx
, &state
,
5107 struct rpccli_lsa_LookupPrivValue_state
);
5111 state
->out_mem_ctx
= NULL
;
5112 state
->dispatch_recv
= cli
->dispatch_recv
;
5115 state
->orig
.in
.handle
= _handle
;
5116 state
->orig
.in
.name
= _name
;
5118 /* Out parameters */
5119 state
->orig
.out
.luid
= _luid
;
5122 ZERO_STRUCT(state
->orig
.out
.result
);
5124 if (DEBUGLEVEL
>= 10) {
5125 NDR_PRINT_IN_DEBUG(lsa_LookupPrivValue
, &state
->orig
);
5128 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5129 "rpccli_lsa_LookupPrivValue_out_memory");
5130 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5131 return tevent_req_post(req
, ev
);
5134 /* make a temporary copy, that we pass to the dispatch function */
5135 state
->tmp
= state
->orig
;
5137 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5139 NDR_LSA_LOOKUPPRIVVALUE
,
5141 if (tevent_req_nomem(subreq
, req
)) {
5142 return tevent_req_post(req
, ev
);
5144 tevent_req_set_callback(subreq
, rpccli_lsa_LookupPrivValue_done
, req
);
5148 static void rpccli_lsa_LookupPrivValue_done(struct tevent_req
*subreq
)
5150 struct tevent_req
*req
= tevent_req_callback_data(
5151 subreq
, struct tevent_req
);
5152 struct rpccli_lsa_LookupPrivValue_state
*state
= tevent_req_data(
5153 req
, struct rpccli_lsa_LookupPrivValue_state
);
5155 TALLOC_CTX
*mem_ctx
;
5157 if (state
->out_mem_ctx
) {
5158 mem_ctx
= state
->out_mem_ctx
;
5163 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5164 TALLOC_FREE(subreq
);
5165 if (!NT_STATUS_IS_OK(status
)) {
5166 tevent_req_nterror(req
, status
);
5170 /* Copy out parameters */
5171 *state
->orig
.out
.luid
= *state
->tmp
.out
.luid
;
5174 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5176 /* Reset temporary structure */
5177 ZERO_STRUCT(state
->tmp
);
5179 if (DEBUGLEVEL
>= 10) {
5180 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivValue
, &state
->orig
);
5183 tevent_req_done(req
);
5186 NTSTATUS
rpccli_lsa_LookupPrivValue_recv(struct tevent_req
*req
,
5187 TALLOC_CTX
*mem_ctx
,
5190 struct rpccli_lsa_LookupPrivValue_state
*state
= tevent_req_data(
5191 req
, struct rpccli_lsa_LookupPrivValue_state
);
5194 if (tevent_req_is_nterror(req
, &status
)) {
5195 tevent_req_received(req
);
5199 /* Steal possbile out parameters to the callers context */
5200 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5203 *result
= state
->orig
.out
.result
;
5205 tevent_req_received(req
);
5206 return NT_STATUS_OK
;
5209 NTSTATUS
rpccli_lsa_LookupPrivValue(struct rpc_pipe_client
*cli
,
5210 TALLOC_CTX
*mem_ctx
,
5211 struct policy_handle
*handle
/* [in] [ref] */,
5212 struct lsa_String
*name
/* [in] [ref] */,
5213 struct lsa_LUID
*luid
/* [out] [ref] */)
5215 struct lsa_LookupPrivValue r
;
5219 r
.in
.handle
= handle
;
5222 if (DEBUGLEVEL
>= 10) {
5223 NDR_PRINT_IN_DEBUG(lsa_LookupPrivValue
, &r
);
5226 status
= cli
->dispatch(cli
,
5229 NDR_LSA_LOOKUPPRIVVALUE
,
5232 if (!NT_STATUS_IS_OK(status
)) {
5236 if (DEBUGLEVEL
>= 10) {
5237 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivValue
, &r
);
5240 if (NT_STATUS_IS_ERR(status
)) {
5244 /* Return variables */
5245 *luid
= *r
.out
.luid
;
5248 return r
.out
.result
;
5251 struct rpccli_lsa_LookupPrivName_state
{
5252 struct lsa_LookupPrivName orig
;
5253 struct lsa_LookupPrivName tmp
;
5254 TALLOC_CTX
*out_mem_ctx
;
5255 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5258 static void rpccli_lsa_LookupPrivName_done(struct tevent_req
*subreq
);
5260 struct tevent_req
*rpccli_lsa_LookupPrivName_send(TALLOC_CTX
*mem_ctx
,
5261 struct tevent_context
*ev
,
5262 struct rpc_pipe_client
*cli
,
5263 struct policy_handle
*_handle
/* [in] [ref] */,
5264 struct lsa_LUID
*_luid
/* [in] [ref] */,
5265 struct lsa_StringLarge
**_name
/* [out] [ref] */)
5267 struct tevent_req
*req
;
5268 struct rpccli_lsa_LookupPrivName_state
*state
;
5269 struct tevent_req
*subreq
;
5271 req
= tevent_req_create(mem_ctx
, &state
,
5272 struct rpccli_lsa_LookupPrivName_state
);
5276 state
->out_mem_ctx
= NULL
;
5277 state
->dispatch_recv
= cli
->dispatch_recv
;
5280 state
->orig
.in
.handle
= _handle
;
5281 state
->orig
.in
.luid
= _luid
;
5283 /* Out parameters */
5284 state
->orig
.out
.name
= _name
;
5287 ZERO_STRUCT(state
->orig
.out
.result
);
5289 if (DEBUGLEVEL
>= 10) {
5290 NDR_PRINT_IN_DEBUG(lsa_LookupPrivName
, &state
->orig
);
5293 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5294 "rpccli_lsa_LookupPrivName_out_memory");
5295 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5296 return tevent_req_post(req
, ev
);
5299 /* make a temporary copy, that we pass to the dispatch function */
5300 state
->tmp
= state
->orig
;
5302 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5304 NDR_LSA_LOOKUPPRIVNAME
,
5306 if (tevent_req_nomem(subreq
, req
)) {
5307 return tevent_req_post(req
, ev
);
5309 tevent_req_set_callback(subreq
, rpccli_lsa_LookupPrivName_done
, req
);
5313 static void rpccli_lsa_LookupPrivName_done(struct tevent_req
*subreq
)
5315 struct tevent_req
*req
= tevent_req_callback_data(
5316 subreq
, struct tevent_req
);
5317 struct rpccli_lsa_LookupPrivName_state
*state
= tevent_req_data(
5318 req
, struct rpccli_lsa_LookupPrivName_state
);
5320 TALLOC_CTX
*mem_ctx
;
5322 if (state
->out_mem_ctx
) {
5323 mem_ctx
= state
->out_mem_ctx
;
5328 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5329 TALLOC_FREE(subreq
);
5330 if (!NT_STATUS_IS_OK(status
)) {
5331 tevent_req_nterror(req
, status
);
5335 /* Copy out parameters */
5336 *state
->orig
.out
.name
= *state
->tmp
.out
.name
;
5339 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5341 /* Reset temporary structure */
5342 ZERO_STRUCT(state
->tmp
);
5344 if (DEBUGLEVEL
>= 10) {
5345 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivName
, &state
->orig
);
5348 tevent_req_done(req
);
5351 NTSTATUS
rpccli_lsa_LookupPrivName_recv(struct tevent_req
*req
,
5352 TALLOC_CTX
*mem_ctx
,
5355 struct rpccli_lsa_LookupPrivName_state
*state
= tevent_req_data(
5356 req
, struct rpccli_lsa_LookupPrivName_state
);
5359 if (tevent_req_is_nterror(req
, &status
)) {
5360 tevent_req_received(req
);
5364 /* Steal possbile out parameters to the callers context */
5365 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5368 *result
= state
->orig
.out
.result
;
5370 tevent_req_received(req
);
5371 return NT_STATUS_OK
;
5374 NTSTATUS
rpccli_lsa_LookupPrivName(struct rpc_pipe_client
*cli
,
5375 TALLOC_CTX
*mem_ctx
,
5376 struct policy_handle
*handle
/* [in] [ref] */,
5377 struct lsa_LUID
*luid
/* [in] [ref] */,
5378 struct lsa_StringLarge
**name
/* [out] [ref] */)
5380 struct lsa_LookupPrivName r
;
5384 r
.in
.handle
= handle
;
5387 if (DEBUGLEVEL
>= 10) {
5388 NDR_PRINT_IN_DEBUG(lsa_LookupPrivName
, &r
);
5391 status
= cli
->dispatch(cli
,
5394 NDR_LSA_LOOKUPPRIVNAME
,
5397 if (!NT_STATUS_IS_OK(status
)) {
5401 if (DEBUGLEVEL
>= 10) {
5402 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivName
, &r
);
5405 if (NT_STATUS_IS_ERR(status
)) {
5409 /* Return variables */
5410 *name
= *r
.out
.name
;
5413 return r
.out
.result
;
5416 struct rpccli_lsa_LookupPrivDisplayName_state
{
5417 struct lsa_LookupPrivDisplayName orig
;
5418 struct lsa_LookupPrivDisplayName tmp
;
5419 TALLOC_CTX
*out_mem_ctx
;
5420 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5423 static void rpccli_lsa_LookupPrivDisplayName_done(struct tevent_req
*subreq
);
5425 struct tevent_req
*rpccli_lsa_LookupPrivDisplayName_send(TALLOC_CTX
*mem_ctx
,
5426 struct tevent_context
*ev
,
5427 struct rpc_pipe_client
*cli
,
5428 struct policy_handle
*_handle
/* [in] [ref] */,
5429 struct lsa_String
*_name
/* [in] [ref] */,
5430 uint16_t _language_id
/* [in] */,
5431 uint16_t _language_id_sys
/* [in] */,
5432 struct lsa_StringLarge
**_disp_name
/* [out] [ref] */,
5433 uint16_t *_returned_language_id
/* [out] [ref] */)
5435 struct tevent_req
*req
;
5436 struct rpccli_lsa_LookupPrivDisplayName_state
*state
;
5437 struct tevent_req
*subreq
;
5439 req
= tevent_req_create(mem_ctx
, &state
,
5440 struct rpccli_lsa_LookupPrivDisplayName_state
);
5444 state
->out_mem_ctx
= NULL
;
5445 state
->dispatch_recv
= cli
->dispatch_recv
;
5448 state
->orig
.in
.handle
= _handle
;
5449 state
->orig
.in
.name
= _name
;
5450 state
->orig
.in
.language_id
= _language_id
;
5451 state
->orig
.in
.language_id_sys
= _language_id_sys
;
5453 /* Out parameters */
5454 state
->orig
.out
.disp_name
= _disp_name
;
5455 state
->orig
.out
.returned_language_id
= _returned_language_id
;
5458 ZERO_STRUCT(state
->orig
.out
.result
);
5460 if (DEBUGLEVEL
>= 10) {
5461 NDR_PRINT_IN_DEBUG(lsa_LookupPrivDisplayName
, &state
->orig
);
5464 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5465 "rpccli_lsa_LookupPrivDisplayName_out_memory");
5466 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5467 return tevent_req_post(req
, ev
);
5470 /* make a temporary copy, that we pass to the dispatch function */
5471 state
->tmp
= state
->orig
;
5473 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5475 NDR_LSA_LOOKUPPRIVDISPLAYNAME
,
5477 if (tevent_req_nomem(subreq
, req
)) {
5478 return tevent_req_post(req
, ev
);
5480 tevent_req_set_callback(subreq
, rpccli_lsa_LookupPrivDisplayName_done
, req
);
5484 static void rpccli_lsa_LookupPrivDisplayName_done(struct tevent_req
*subreq
)
5486 struct tevent_req
*req
= tevent_req_callback_data(
5487 subreq
, struct tevent_req
);
5488 struct rpccli_lsa_LookupPrivDisplayName_state
*state
= tevent_req_data(
5489 req
, struct rpccli_lsa_LookupPrivDisplayName_state
);
5491 TALLOC_CTX
*mem_ctx
;
5493 if (state
->out_mem_ctx
) {
5494 mem_ctx
= state
->out_mem_ctx
;
5499 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5500 TALLOC_FREE(subreq
);
5501 if (!NT_STATUS_IS_OK(status
)) {
5502 tevent_req_nterror(req
, status
);
5506 /* Copy out parameters */
5507 *state
->orig
.out
.disp_name
= *state
->tmp
.out
.disp_name
;
5508 *state
->orig
.out
.returned_language_id
= *state
->tmp
.out
.returned_language_id
;
5511 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5513 /* Reset temporary structure */
5514 ZERO_STRUCT(state
->tmp
);
5516 if (DEBUGLEVEL
>= 10) {
5517 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivDisplayName
, &state
->orig
);
5520 tevent_req_done(req
);
5523 NTSTATUS
rpccli_lsa_LookupPrivDisplayName_recv(struct tevent_req
*req
,
5524 TALLOC_CTX
*mem_ctx
,
5527 struct rpccli_lsa_LookupPrivDisplayName_state
*state
= tevent_req_data(
5528 req
, struct rpccli_lsa_LookupPrivDisplayName_state
);
5531 if (tevent_req_is_nterror(req
, &status
)) {
5532 tevent_req_received(req
);
5536 /* Steal possbile out parameters to the callers context */
5537 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5540 *result
= state
->orig
.out
.result
;
5542 tevent_req_received(req
);
5543 return NT_STATUS_OK
;
5546 NTSTATUS
rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client
*cli
,
5547 TALLOC_CTX
*mem_ctx
,
5548 struct policy_handle
*handle
/* [in] [ref] */,
5549 struct lsa_String
*name
/* [in] [ref] */,
5550 uint16_t language_id
/* [in] */,
5551 uint16_t language_id_sys
/* [in] */,
5552 struct lsa_StringLarge
**disp_name
/* [out] [ref] */,
5553 uint16_t *returned_language_id
/* [out] [ref] */)
5555 struct lsa_LookupPrivDisplayName r
;
5559 r
.in
.handle
= handle
;
5561 r
.in
.language_id
= language_id
;
5562 r
.in
.language_id_sys
= language_id_sys
;
5564 if (DEBUGLEVEL
>= 10) {
5565 NDR_PRINT_IN_DEBUG(lsa_LookupPrivDisplayName
, &r
);
5568 status
= cli
->dispatch(cli
,
5571 NDR_LSA_LOOKUPPRIVDISPLAYNAME
,
5574 if (!NT_STATUS_IS_OK(status
)) {
5578 if (DEBUGLEVEL
>= 10) {
5579 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivDisplayName
, &r
);
5582 if (NT_STATUS_IS_ERR(status
)) {
5586 /* Return variables */
5587 *disp_name
= *r
.out
.disp_name
;
5588 *returned_language_id
= *r
.out
.returned_language_id
;
5591 return r
.out
.result
;
5594 struct rpccli_lsa_DeleteObject_state
{
5595 struct lsa_DeleteObject orig
;
5596 struct lsa_DeleteObject tmp
;
5597 TALLOC_CTX
*out_mem_ctx
;
5598 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5601 static void rpccli_lsa_DeleteObject_done(struct tevent_req
*subreq
);
5603 struct tevent_req
*rpccli_lsa_DeleteObject_send(TALLOC_CTX
*mem_ctx
,
5604 struct tevent_context
*ev
,
5605 struct rpc_pipe_client
*cli
,
5606 struct policy_handle
*_handle
/* [in,out] [ref] */)
5608 struct tevent_req
*req
;
5609 struct rpccli_lsa_DeleteObject_state
*state
;
5610 struct tevent_req
*subreq
;
5612 req
= tevent_req_create(mem_ctx
, &state
,
5613 struct rpccli_lsa_DeleteObject_state
);
5617 state
->out_mem_ctx
= NULL
;
5618 state
->dispatch_recv
= cli
->dispatch_recv
;
5621 state
->orig
.in
.handle
= _handle
;
5623 /* Out parameters */
5624 state
->orig
.out
.handle
= _handle
;
5627 ZERO_STRUCT(state
->orig
.out
.result
);
5629 if (DEBUGLEVEL
>= 10) {
5630 NDR_PRINT_IN_DEBUG(lsa_DeleteObject
, &state
->orig
);
5633 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5634 "rpccli_lsa_DeleteObject_out_memory");
5635 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5636 return tevent_req_post(req
, ev
);
5639 /* make a temporary copy, that we pass to the dispatch function */
5640 state
->tmp
= state
->orig
;
5642 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5644 NDR_LSA_DELETEOBJECT
,
5646 if (tevent_req_nomem(subreq
, req
)) {
5647 return tevent_req_post(req
, ev
);
5649 tevent_req_set_callback(subreq
, rpccli_lsa_DeleteObject_done
, req
);
5653 static void rpccli_lsa_DeleteObject_done(struct tevent_req
*subreq
)
5655 struct tevent_req
*req
= tevent_req_callback_data(
5656 subreq
, struct tevent_req
);
5657 struct rpccli_lsa_DeleteObject_state
*state
= tevent_req_data(
5658 req
, struct rpccli_lsa_DeleteObject_state
);
5660 TALLOC_CTX
*mem_ctx
;
5662 if (state
->out_mem_ctx
) {
5663 mem_ctx
= state
->out_mem_ctx
;
5668 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5669 TALLOC_FREE(subreq
);
5670 if (!NT_STATUS_IS_OK(status
)) {
5671 tevent_req_nterror(req
, status
);
5675 /* Copy out parameters */
5676 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
5679 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5681 /* Reset temporary structure */
5682 ZERO_STRUCT(state
->tmp
);
5684 if (DEBUGLEVEL
>= 10) {
5685 NDR_PRINT_OUT_DEBUG(lsa_DeleteObject
, &state
->orig
);
5688 tevent_req_done(req
);
5691 NTSTATUS
rpccli_lsa_DeleteObject_recv(struct tevent_req
*req
,
5692 TALLOC_CTX
*mem_ctx
,
5695 struct rpccli_lsa_DeleteObject_state
*state
= tevent_req_data(
5696 req
, struct rpccli_lsa_DeleteObject_state
);
5699 if (tevent_req_is_nterror(req
, &status
)) {
5700 tevent_req_received(req
);
5704 /* Steal possbile out parameters to the callers context */
5705 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5708 *result
= state
->orig
.out
.result
;
5710 tevent_req_received(req
);
5711 return NT_STATUS_OK
;
5714 NTSTATUS
rpccli_lsa_DeleteObject(struct rpc_pipe_client
*cli
,
5715 TALLOC_CTX
*mem_ctx
,
5716 struct policy_handle
*handle
/* [in,out] [ref] */)
5718 struct lsa_DeleteObject r
;
5722 r
.in
.handle
= handle
;
5724 if (DEBUGLEVEL
>= 10) {
5725 NDR_PRINT_IN_DEBUG(lsa_DeleteObject
, &r
);
5728 status
= cli
->dispatch(cli
,
5731 NDR_LSA_DELETEOBJECT
,
5734 if (!NT_STATUS_IS_OK(status
)) {
5738 if (DEBUGLEVEL
>= 10) {
5739 NDR_PRINT_OUT_DEBUG(lsa_DeleteObject
, &r
);
5742 if (NT_STATUS_IS_ERR(status
)) {
5746 /* Return variables */
5747 *handle
= *r
.out
.handle
;
5750 return r
.out
.result
;
5753 struct rpccli_lsa_EnumAccountsWithUserRight_state
{
5754 struct lsa_EnumAccountsWithUserRight orig
;
5755 struct lsa_EnumAccountsWithUserRight tmp
;
5756 TALLOC_CTX
*out_mem_ctx
;
5757 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5760 static void rpccli_lsa_EnumAccountsWithUserRight_done(struct tevent_req
*subreq
);
5762 struct tevent_req
*rpccli_lsa_EnumAccountsWithUserRight_send(TALLOC_CTX
*mem_ctx
,
5763 struct tevent_context
*ev
,
5764 struct rpc_pipe_client
*cli
,
5765 struct policy_handle
*_handle
/* [in] [ref] */,
5766 struct lsa_String
*_name
/* [in] [unique] */,
5767 struct lsa_SidArray
*_sids
/* [out] [ref] */)
5769 struct tevent_req
*req
;
5770 struct rpccli_lsa_EnumAccountsWithUserRight_state
*state
;
5771 struct tevent_req
*subreq
;
5773 req
= tevent_req_create(mem_ctx
, &state
,
5774 struct rpccli_lsa_EnumAccountsWithUserRight_state
);
5778 state
->out_mem_ctx
= NULL
;
5779 state
->dispatch_recv
= cli
->dispatch_recv
;
5782 state
->orig
.in
.handle
= _handle
;
5783 state
->orig
.in
.name
= _name
;
5785 /* Out parameters */
5786 state
->orig
.out
.sids
= _sids
;
5789 ZERO_STRUCT(state
->orig
.out
.result
);
5791 if (DEBUGLEVEL
>= 10) {
5792 NDR_PRINT_IN_DEBUG(lsa_EnumAccountsWithUserRight
, &state
->orig
);
5795 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5796 "rpccli_lsa_EnumAccountsWithUserRight_out_memory");
5797 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5798 return tevent_req_post(req
, ev
);
5801 /* make a temporary copy, that we pass to the dispatch function */
5802 state
->tmp
= state
->orig
;
5804 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5806 NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT
,
5808 if (tevent_req_nomem(subreq
, req
)) {
5809 return tevent_req_post(req
, ev
);
5811 tevent_req_set_callback(subreq
, rpccli_lsa_EnumAccountsWithUserRight_done
, req
);
5815 static void rpccli_lsa_EnumAccountsWithUserRight_done(struct tevent_req
*subreq
)
5817 struct tevent_req
*req
= tevent_req_callback_data(
5818 subreq
, struct tevent_req
);
5819 struct rpccli_lsa_EnumAccountsWithUserRight_state
*state
= tevent_req_data(
5820 req
, struct rpccli_lsa_EnumAccountsWithUserRight_state
);
5822 TALLOC_CTX
*mem_ctx
;
5824 if (state
->out_mem_ctx
) {
5825 mem_ctx
= state
->out_mem_ctx
;
5830 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5831 TALLOC_FREE(subreq
);
5832 if (!NT_STATUS_IS_OK(status
)) {
5833 tevent_req_nterror(req
, status
);
5837 /* Copy out parameters */
5838 *state
->orig
.out
.sids
= *state
->tmp
.out
.sids
;
5841 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5843 /* Reset temporary structure */
5844 ZERO_STRUCT(state
->tmp
);
5846 if (DEBUGLEVEL
>= 10) {
5847 NDR_PRINT_OUT_DEBUG(lsa_EnumAccountsWithUserRight
, &state
->orig
);
5850 tevent_req_done(req
);
5853 NTSTATUS
rpccli_lsa_EnumAccountsWithUserRight_recv(struct tevent_req
*req
,
5854 TALLOC_CTX
*mem_ctx
,
5857 struct rpccli_lsa_EnumAccountsWithUserRight_state
*state
= tevent_req_data(
5858 req
, struct rpccli_lsa_EnumAccountsWithUserRight_state
);
5861 if (tevent_req_is_nterror(req
, &status
)) {
5862 tevent_req_received(req
);
5866 /* Steal possbile out parameters to the callers context */
5867 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5870 *result
= state
->orig
.out
.result
;
5872 tevent_req_received(req
);
5873 return NT_STATUS_OK
;
5876 NTSTATUS
rpccli_lsa_EnumAccountsWithUserRight(struct rpc_pipe_client
*cli
,
5877 TALLOC_CTX
*mem_ctx
,
5878 struct policy_handle
*handle
/* [in] [ref] */,
5879 struct lsa_String
*name
/* [in] [unique] */,
5880 struct lsa_SidArray
*sids
/* [out] [ref] */)
5882 struct lsa_EnumAccountsWithUserRight r
;
5886 r
.in
.handle
= handle
;
5889 if (DEBUGLEVEL
>= 10) {
5890 NDR_PRINT_IN_DEBUG(lsa_EnumAccountsWithUserRight
, &r
);
5893 status
= cli
->dispatch(cli
,
5896 NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT
,
5899 if (!NT_STATUS_IS_OK(status
)) {
5903 if (DEBUGLEVEL
>= 10) {
5904 NDR_PRINT_OUT_DEBUG(lsa_EnumAccountsWithUserRight
, &r
);
5907 if (NT_STATUS_IS_ERR(status
)) {
5911 /* Return variables */
5912 *sids
= *r
.out
.sids
;
5915 return r
.out
.result
;
5918 struct rpccli_lsa_EnumAccountRights_state
{
5919 struct lsa_EnumAccountRights orig
;
5920 struct lsa_EnumAccountRights tmp
;
5921 TALLOC_CTX
*out_mem_ctx
;
5922 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5925 static void rpccli_lsa_EnumAccountRights_done(struct tevent_req
*subreq
);
5927 struct tevent_req
*rpccli_lsa_EnumAccountRights_send(TALLOC_CTX
*mem_ctx
,
5928 struct tevent_context
*ev
,
5929 struct rpc_pipe_client
*cli
,
5930 struct policy_handle
*_handle
/* [in] [ref] */,
5931 struct dom_sid2
*_sid
/* [in] [ref] */,
5932 struct lsa_RightSet
*_rights
/* [out] [ref] */)
5934 struct tevent_req
*req
;
5935 struct rpccli_lsa_EnumAccountRights_state
*state
;
5936 struct tevent_req
*subreq
;
5938 req
= tevent_req_create(mem_ctx
, &state
,
5939 struct rpccli_lsa_EnumAccountRights_state
);
5943 state
->out_mem_ctx
= NULL
;
5944 state
->dispatch_recv
= cli
->dispatch_recv
;
5947 state
->orig
.in
.handle
= _handle
;
5948 state
->orig
.in
.sid
= _sid
;
5950 /* Out parameters */
5951 state
->orig
.out
.rights
= _rights
;
5954 ZERO_STRUCT(state
->orig
.out
.result
);
5956 if (DEBUGLEVEL
>= 10) {
5957 NDR_PRINT_IN_DEBUG(lsa_EnumAccountRights
, &state
->orig
);
5960 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5961 "rpccli_lsa_EnumAccountRights_out_memory");
5962 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5963 return tevent_req_post(req
, ev
);
5966 /* make a temporary copy, that we pass to the dispatch function */
5967 state
->tmp
= state
->orig
;
5969 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5971 NDR_LSA_ENUMACCOUNTRIGHTS
,
5973 if (tevent_req_nomem(subreq
, req
)) {
5974 return tevent_req_post(req
, ev
);
5976 tevent_req_set_callback(subreq
, rpccli_lsa_EnumAccountRights_done
, req
);
5980 static void rpccli_lsa_EnumAccountRights_done(struct tevent_req
*subreq
)
5982 struct tevent_req
*req
= tevent_req_callback_data(
5983 subreq
, struct tevent_req
);
5984 struct rpccli_lsa_EnumAccountRights_state
*state
= tevent_req_data(
5985 req
, struct rpccli_lsa_EnumAccountRights_state
);
5987 TALLOC_CTX
*mem_ctx
;
5989 if (state
->out_mem_ctx
) {
5990 mem_ctx
= state
->out_mem_ctx
;
5995 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5996 TALLOC_FREE(subreq
);
5997 if (!NT_STATUS_IS_OK(status
)) {
5998 tevent_req_nterror(req
, status
);
6002 /* Copy out parameters */
6003 *state
->orig
.out
.rights
= *state
->tmp
.out
.rights
;
6006 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6008 /* Reset temporary structure */
6009 ZERO_STRUCT(state
->tmp
);
6011 if (DEBUGLEVEL
>= 10) {
6012 NDR_PRINT_OUT_DEBUG(lsa_EnumAccountRights
, &state
->orig
);
6015 tevent_req_done(req
);
6018 NTSTATUS
rpccli_lsa_EnumAccountRights_recv(struct tevent_req
*req
,
6019 TALLOC_CTX
*mem_ctx
,
6022 struct rpccli_lsa_EnumAccountRights_state
*state
= tevent_req_data(
6023 req
, struct rpccli_lsa_EnumAccountRights_state
);
6026 if (tevent_req_is_nterror(req
, &status
)) {
6027 tevent_req_received(req
);
6031 /* Steal possbile out parameters to the callers context */
6032 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6035 *result
= state
->orig
.out
.result
;
6037 tevent_req_received(req
);
6038 return NT_STATUS_OK
;
6041 NTSTATUS
rpccli_lsa_EnumAccountRights(struct rpc_pipe_client
*cli
,
6042 TALLOC_CTX
*mem_ctx
,
6043 struct policy_handle
*handle
/* [in] [ref] */,
6044 struct dom_sid2
*sid
/* [in] [ref] */,
6045 struct lsa_RightSet
*rights
/* [out] [ref] */)
6047 struct lsa_EnumAccountRights r
;
6051 r
.in
.handle
= handle
;
6054 if (DEBUGLEVEL
>= 10) {
6055 NDR_PRINT_IN_DEBUG(lsa_EnumAccountRights
, &r
);
6058 status
= cli
->dispatch(cli
,
6061 NDR_LSA_ENUMACCOUNTRIGHTS
,
6064 if (!NT_STATUS_IS_OK(status
)) {
6068 if (DEBUGLEVEL
>= 10) {
6069 NDR_PRINT_OUT_DEBUG(lsa_EnumAccountRights
, &r
);
6072 if (NT_STATUS_IS_ERR(status
)) {
6076 /* Return variables */
6077 *rights
= *r
.out
.rights
;
6080 return r
.out
.result
;
6083 struct rpccli_lsa_AddAccountRights_state
{
6084 struct lsa_AddAccountRights orig
;
6085 struct lsa_AddAccountRights tmp
;
6086 TALLOC_CTX
*out_mem_ctx
;
6087 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6090 static void rpccli_lsa_AddAccountRights_done(struct tevent_req
*subreq
);
6092 struct tevent_req
*rpccli_lsa_AddAccountRights_send(TALLOC_CTX
*mem_ctx
,
6093 struct tevent_context
*ev
,
6094 struct rpc_pipe_client
*cli
,
6095 struct policy_handle
*_handle
/* [in] [ref] */,
6096 struct dom_sid2
*_sid
/* [in] [ref] */,
6097 struct lsa_RightSet
*_rights
/* [in] [ref] */)
6099 struct tevent_req
*req
;
6100 struct rpccli_lsa_AddAccountRights_state
*state
;
6101 struct tevent_req
*subreq
;
6103 req
= tevent_req_create(mem_ctx
, &state
,
6104 struct rpccli_lsa_AddAccountRights_state
);
6108 state
->out_mem_ctx
= NULL
;
6109 state
->dispatch_recv
= cli
->dispatch_recv
;
6112 state
->orig
.in
.handle
= _handle
;
6113 state
->orig
.in
.sid
= _sid
;
6114 state
->orig
.in
.rights
= _rights
;
6116 /* Out parameters */
6119 ZERO_STRUCT(state
->orig
.out
.result
);
6121 if (DEBUGLEVEL
>= 10) {
6122 NDR_PRINT_IN_DEBUG(lsa_AddAccountRights
, &state
->orig
);
6125 /* make a temporary copy, that we pass to the dispatch function */
6126 state
->tmp
= state
->orig
;
6128 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6130 NDR_LSA_ADDACCOUNTRIGHTS
,
6132 if (tevent_req_nomem(subreq
, req
)) {
6133 return tevent_req_post(req
, ev
);
6135 tevent_req_set_callback(subreq
, rpccli_lsa_AddAccountRights_done
, req
);
6139 static void rpccli_lsa_AddAccountRights_done(struct tevent_req
*subreq
)
6141 struct tevent_req
*req
= tevent_req_callback_data(
6142 subreq
, struct tevent_req
);
6143 struct rpccli_lsa_AddAccountRights_state
*state
= tevent_req_data(
6144 req
, struct rpccli_lsa_AddAccountRights_state
);
6146 TALLOC_CTX
*mem_ctx
;
6148 if (state
->out_mem_ctx
) {
6149 mem_ctx
= state
->out_mem_ctx
;
6154 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6155 TALLOC_FREE(subreq
);
6156 if (!NT_STATUS_IS_OK(status
)) {
6157 tevent_req_nterror(req
, status
);
6161 /* Copy out parameters */
6164 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6166 /* Reset temporary structure */
6167 ZERO_STRUCT(state
->tmp
);
6169 if (DEBUGLEVEL
>= 10) {
6170 NDR_PRINT_OUT_DEBUG(lsa_AddAccountRights
, &state
->orig
);
6173 tevent_req_done(req
);
6176 NTSTATUS
rpccli_lsa_AddAccountRights_recv(struct tevent_req
*req
,
6177 TALLOC_CTX
*mem_ctx
,
6180 struct rpccli_lsa_AddAccountRights_state
*state
= tevent_req_data(
6181 req
, struct rpccli_lsa_AddAccountRights_state
);
6184 if (tevent_req_is_nterror(req
, &status
)) {
6185 tevent_req_received(req
);
6189 /* Steal possbile out parameters to the callers context */
6190 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6193 *result
= state
->orig
.out
.result
;
6195 tevent_req_received(req
);
6196 return NT_STATUS_OK
;
6199 NTSTATUS
rpccli_lsa_AddAccountRights(struct rpc_pipe_client
*cli
,
6200 TALLOC_CTX
*mem_ctx
,
6201 struct policy_handle
*handle
/* [in] [ref] */,
6202 struct dom_sid2
*sid
/* [in] [ref] */,
6203 struct lsa_RightSet
*rights
/* [in] [ref] */)
6205 struct lsa_AddAccountRights r
;
6209 r
.in
.handle
= handle
;
6211 r
.in
.rights
= rights
;
6213 if (DEBUGLEVEL
>= 10) {
6214 NDR_PRINT_IN_DEBUG(lsa_AddAccountRights
, &r
);
6217 status
= cli
->dispatch(cli
,
6220 NDR_LSA_ADDACCOUNTRIGHTS
,
6223 if (!NT_STATUS_IS_OK(status
)) {
6227 if (DEBUGLEVEL
>= 10) {
6228 NDR_PRINT_OUT_DEBUG(lsa_AddAccountRights
, &r
);
6231 if (NT_STATUS_IS_ERR(status
)) {
6235 /* Return variables */
6238 return r
.out
.result
;
6241 struct rpccli_lsa_RemoveAccountRights_state
{
6242 struct lsa_RemoveAccountRights orig
;
6243 struct lsa_RemoveAccountRights tmp
;
6244 TALLOC_CTX
*out_mem_ctx
;
6245 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6248 static void rpccli_lsa_RemoveAccountRights_done(struct tevent_req
*subreq
);
6250 struct tevent_req
*rpccli_lsa_RemoveAccountRights_send(TALLOC_CTX
*mem_ctx
,
6251 struct tevent_context
*ev
,
6252 struct rpc_pipe_client
*cli
,
6253 struct policy_handle
*_handle
/* [in] [ref] */,
6254 struct dom_sid2
*_sid
/* [in] [ref] */,
6255 uint8_t _remove_all
/* [in] */,
6256 struct lsa_RightSet
*_rights
/* [in] [ref] */)
6258 struct tevent_req
*req
;
6259 struct rpccli_lsa_RemoveAccountRights_state
*state
;
6260 struct tevent_req
*subreq
;
6262 req
= tevent_req_create(mem_ctx
, &state
,
6263 struct rpccli_lsa_RemoveAccountRights_state
);
6267 state
->out_mem_ctx
= NULL
;
6268 state
->dispatch_recv
= cli
->dispatch_recv
;
6271 state
->orig
.in
.handle
= _handle
;
6272 state
->orig
.in
.sid
= _sid
;
6273 state
->orig
.in
.remove_all
= _remove_all
;
6274 state
->orig
.in
.rights
= _rights
;
6276 /* Out parameters */
6279 ZERO_STRUCT(state
->orig
.out
.result
);
6281 if (DEBUGLEVEL
>= 10) {
6282 NDR_PRINT_IN_DEBUG(lsa_RemoveAccountRights
, &state
->orig
);
6285 /* make a temporary copy, that we pass to the dispatch function */
6286 state
->tmp
= state
->orig
;
6288 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6290 NDR_LSA_REMOVEACCOUNTRIGHTS
,
6292 if (tevent_req_nomem(subreq
, req
)) {
6293 return tevent_req_post(req
, ev
);
6295 tevent_req_set_callback(subreq
, rpccli_lsa_RemoveAccountRights_done
, req
);
6299 static void rpccli_lsa_RemoveAccountRights_done(struct tevent_req
*subreq
)
6301 struct tevent_req
*req
= tevent_req_callback_data(
6302 subreq
, struct tevent_req
);
6303 struct rpccli_lsa_RemoveAccountRights_state
*state
= tevent_req_data(
6304 req
, struct rpccli_lsa_RemoveAccountRights_state
);
6306 TALLOC_CTX
*mem_ctx
;
6308 if (state
->out_mem_ctx
) {
6309 mem_ctx
= state
->out_mem_ctx
;
6314 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6315 TALLOC_FREE(subreq
);
6316 if (!NT_STATUS_IS_OK(status
)) {
6317 tevent_req_nterror(req
, status
);
6321 /* Copy out parameters */
6324 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6326 /* Reset temporary structure */
6327 ZERO_STRUCT(state
->tmp
);
6329 if (DEBUGLEVEL
>= 10) {
6330 NDR_PRINT_OUT_DEBUG(lsa_RemoveAccountRights
, &state
->orig
);
6333 tevent_req_done(req
);
6336 NTSTATUS
rpccli_lsa_RemoveAccountRights_recv(struct tevent_req
*req
,
6337 TALLOC_CTX
*mem_ctx
,
6340 struct rpccli_lsa_RemoveAccountRights_state
*state
= tevent_req_data(
6341 req
, struct rpccli_lsa_RemoveAccountRights_state
);
6344 if (tevent_req_is_nterror(req
, &status
)) {
6345 tevent_req_received(req
);
6349 /* Steal possbile out parameters to the callers context */
6350 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6353 *result
= state
->orig
.out
.result
;
6355 tevent_req_received(req
);
6356 return NT_STATUS_OK
;
6359 NTSTATUS
rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client
*cli
,
6360 TALLOC_CTX
*mem_ctx
,
6361 struct policy_handle
*handle
/* [in] [ref] */,
6362 struct dom_sid2
*sid
/* [in] [ref] */,
6363 uint8_t remove_all
/* [in] */,
6364 struct lsa_RightSet
*rights
/* [in] [ref] */)
6366 struct lsa_RemoveAccountRights r
;
6370 r
.in
.handle
= handle
;
6372 r
.in
.remove_all
= remove_all
;
6373 r
.in
.rights
= rights
;
6375 if (DEBUGLEVEL
>= 10) {
6376 NDR_PRINT_IN_DEBUG(lsa_RemoveAccountRights
, &r
);
6379 status
= cli
->dispatch(cli
,
6382 NDR_LSA_REMOVEACCOUNTRIGHTS
,
6385 if (!NT_STATUS_IS_OK(status
)) {
6389 if (DEBUGLEVEL
>= 10) {
6390 NDR_PRINT_OUT_DEBUG(lsa_RemoveAccountRights
, &r
);
6393 if (NT_STATUS_IS_ERR(status
)) {
6397 /* Return variables */
6400 return r
.out
.result
;
6403 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state
{
6404 struct lsa_QueryTrustedDomainInfoBySid orig
;
6405 struct lsa_QueryTrustedDomainInfoBySid tmp
;
6406 TALLOC_CTX
*out_mem_ctx
;
6407 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6410 static void rpccli_lsa_QueryTrustedDomainInfoBySid_done(struct tevent_req
*subreq
);
6412 struct tevent_req
*rpccli_lsa_QueryTrustedDomainInfoBySid_send(TALLOC_CTX
*mem_ctx
,
6413 struct tevent_context
*ev
,
6414 struct rpc_pipe_client
*cli
,
6415 struct policy_handle
*_handle
/* [in] [ref] */,
6416 struct dom_sid2
*_dom_sid
/* [in] [ref] */,
6417 enum lsa_TrustDomInfoEnum _level
/* [in] */,
6418 union lsa_TrustedDomainInfo
**_info
/* [out] [ref,switch_is(level)] */)
6420 struct tevent_req
*req
;
6421 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state
*state
;
6422 struct tevent_req
*subreq
;
6424 req
= tevent_req_create(mem_ctx
, &state
,
6425 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state
);
6429 state
->out_mem_ctx
= NULL
;
6430 state
->dispatch_recv
= cli
->dispatch_recv
;
6433 state
->orig
.in
.handle
= _handle
;
6434 state
->orig
.in
.dom_sid
= _dom_sid
;
6435 state
->orig
.in
.level
= _level
;
6437 /* Out parameters */
6438 state
->orig
.out
.info
= _info
;
6441 ZERO_STRUCT(state
->orig
.out
.result
);
6443 if (DEBUGLEVEL
>= 10) {
6444 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoBySid
, &state
->orig
);
6447 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6448 "rpccli_lsa_QueryTrustedDomainInfoBySid_out_memory");
6449 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6450 return tevent_req_post(req
, ev
);
6453 /* make a temporary copy, that we pass to the dispatch function */
6454 state
->tmp
= state
->orig
;
6456 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6458 NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID
,
6460 if (tevent_req_nomem(subreq
, req
)) {
6461 return tevent_req_post(req
, ev
);
6463 tevent_req_set_callback(subreq
, rpccli_lsa_QueryTrustedDomainInfoBySid_done
, req
);
6467 static void rpccli_lsa_QueryTrustedDomainInfoBySid_done(struct tevent_req
*subreq
)
6469 struct tevent_req
*req
= tevent_req_callback_data(
6470 subreq
, struct tevent_req
);
6471 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state
*state
= tevent_req_data(
6472 req
, struct rpccli_lsa_QueryTrustedDomainInfoBySid_state
);
6474 TALLOC_CTX
*mem_ctx
;
6476 if (state
->out_mem_ctx
) {
6477 mem_ctx
= state
->out_mem_ctx
;
6482 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6483 TALLOC_FREE(subreq
);
6484 if (!NT_STATUS_IS_OK(status
)) {
6485 tevent_req_nterror(req
, status
);
6489 /* Copy out parameters */
6490 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
6493 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6495 /* Reset temporary structure */
6496 ZERO_STRUCT(state
->tmp
);
6498 if (DEBUGLEVEL
>= 10) {
6499 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoBySid
, &state
->orig
);
6502 tevent_req_done(req
);
6505 NTSTATUS
rpccli_lsa_QueryTrustedDomainInfoBySid_recv(struct tevent_req
*req
,
6506 TALLOC_CTX
*mem_ctx
,
6509 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state
*state
= tevent_req_data(
6510 req
, struct rpccli_lsa_QueryTrustedDomainInfoBySid_state
);
6513 if (tevent_req_is_nterror(req
, &status
)) {
6514 tevent_req_received(req
);
6518 /* Steal possbile out parameters to the callers context */
6519 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6522 *result
= state
->orig
.out
.result
;
6524 tevent_req_received(req
);
6525 return NT_STATUS_OK
;
6528 NTSTATUS
rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client
*cli
,
6529 TALLOC_CTX
*mem_ctx
,
6530 struct policy_handle
*handle
/* [in] [ref] */,
6531 struct dom_sid2
*dom_sid
/* [in] [ref] */,
6532 enum lsa_TrustDomInfoEnum level
/* [in] */,
6533 union lsa_TrustedDomainInfo
**info
/* [out] [ref,switch_is(level)] */)
6535 struct lsa_QueryTrustedDomainInfoBySid r
;
6539 r
.in
.handle
= handle
;
6540 r
.in
.dom_sid
= dom_sid
;
6543 if (DEBUGLEVEL
>= 10) {
6544 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoBySid
, &r
);
6547 status
= cli
->dispatch(cli
,
6550 NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID
,
6553 if (!NT_STATUS_IS_OK(status
)) {
6557 if (DEBUGLEVEL
>= 10) {
6558 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoBySid
, &r
);
6561 if (NT_STATUS_IS_ERR(status
)) {
6565 /* Return variables */
6566 *info
= *r
.out
.info
;
6569 return r
.out
.result
;
6572 struct rpccli_lsa_SetTrustedDomainInfo_state
{
6573 struct lsa_SetTrustedDomainInfo orig
;
6574 struct lsa_SetTrustedDomainInfo tmp
;
6575 TALLOC_CTX
*out_mem_ctx
;
6576 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6579 static void rpccli_lsa_SetTrustedDomainInfo_done(struct tevent_req
*subreq
);
6581 struct tevent_req
*rpccli_lsa_SetTrustedDomainInfo_send(TALLOC_CTX
*mem_ctx
,
6582 struct tevent_context
*ev
,
6583 struct rpc_pipe_client
*cli
,
6584 struct policy_handle
*_handle
/* [in] [ref] */,
6585 struct dom_sid2
*_dom_sid
/* [in] [ref] */,
6586 enum lsa_TrustDomInfoEnum _level
/* [in] */,
6587 union lsa_TrustedDomainInfo
*_info
/* [in] [ref,switch_is(level)] */)
6589 struct tevent_req
*req
;
6590 struct rpccli_lsa_SetTrustedDomainInfo_state
*state
;
6591 struct tevent_req
*subreq
;
6593 req
= tevent_req_create(mem_ctx
, &state
,
6594 struct rpccli_lsa_SetTrustedDomainInfo_state
);
6598 state
->out_mem_ctx
= NULL
;
6599 state
->dispatch_recv
= cli
->dispatch_recv
;
6602 state
->orig
.in
.handle
= _handle
;
6603 state
->orig
.in
.dom_sid
= _dom_sid
;
6604 state
->orig
.in
.level
= _level
;
6605 state
->orig
.in
.info
= _info
;
6607 /* Out parameters */
6610 ZERO_STRUCT(state
->orig
.out
.result
);
6612 if (DEBUGLEVEL
>= 10) {
6613 NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfo
, &state
->orig
);
6616 /* make a temporary copy, that we pass to the dispatch function */
6617 state
->tmp
= state
->orig
;
6619 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6621 NDR_LSA_SETTRUSTEDDOMAININFO
,
6623 if (tevent_req_nomem(subreq
, req
)) {
6624 return tevent_req_post(req
, ev
);
6626 tevent_req_set_callback(subreq
, rpccli_lsa_SetTrustedDomainInfo_done
, req
);
6630 static void rpccli_lsa_SetTrustedDomainInfo_done(struct tevent_req
*subreq
)
6632 struct tevent_req
*req
= tevent_req_callback_data(
6633 subreq
, struct tevent_req
);
6634 struct rpccli_lsa_SetTrustedDomainInfo_state
*state
= tevent_req_data(
6635 req
, struct rpccli_lsa_SetTrustedDomainInfo_state
);
6637 TALLOC_CTX
*mem_ctx
;
6639 if (state
->out_mem_ctx
) {
6640 mem_ctx
= state
->out_mem_ctx
;
6645 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6646 TALLOC_FREE(subreq
);
6647 if (!NT_STATUS_IS_OK(status
)) {
6648 tevent_req_nterror(req
, status
);
6652 /* Copy out parameters */
6655 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6657 /* Reset temporary structure */
6658 ZERO_STRUCT(state
->tmp
);
6660 if (DEBUGLEVEL
>= 10) {
6661 NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfo
, &state
->orig
);
6664 tevent_req_done(req
);
6667 NTSTATUS
rpccli_lsa_SetTrustedDomainInfo_recv(struct tevent_req
*req
,
6668 TALLOC_CTX
*mem_ctx
,
6671 struct rpccli_lsa_SetTrustedDomainInfo_state
*state
= tevent_req_data(
6672 req
, struct rpccli_lsa_SetTrustedDomainInfo_state
);
6675 if (tevent_req_is_nterror(req
, &status
)) {
6676 tevent_req_received(req
);
6680 /* Steal possbile out parameters to the callers context */
6681 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6684 *result
= state
->orig
.out
.result
;
6686 tevent_req_received(req
);
6687 return NT_STATUS_OK
;
6690 NTSTATUS
rpccli_lsa_SetTrustedDomainInfo(struct rpc_pipe_client
*cli
,
6691 TALLOC_CTX
*mem_ctx
,
6692 struct policy_handle
*handle
/* [in] [ref] */,
6693 struct dom_sid2
*dom_sid
/* [in] [ref] */,
6694 enum lsa_TrustDomInfoEnum level
/* [in] */,
6695 union lsa_TrustedDomainInfo
*info
/* [in] [ref,switch_is(level)] */)
6697 struct lsa_SetTrustedDomainInfo r
;
6701 r
.in
.handle
= handle
;
6702 r
.in
.dom_sid
= dom_sid
;
6706 if (DEBUGLEVEL
>= 10) {
6707 NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfo
, &r
);
6710 status
= cli
->dispatch(cli
,
6713 NDR_LSA_SETTRUSTEDDOMAININFO
,
6716 if (!NT_STATUS_IS_OK(status
)) {
6720 if (DEBUGLEVEL
>= 10) {
6721 NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfo
, &r
);
6724 if (NT_STATUS_IS_ERR(status
)) {
6728 /* Return variables */
6731 return r
.out
.result
;
6734 struct rpccli_lsa_DeleteTrustedDomain_state
{
6735 struct lsa_DeleteTrustedDomain orig
;
6736 struct lsa_DeleteTrustedDomain tmp
;
6737 TALLOC_CTX
*out_mem_ctx
;
6738 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6741 static void rpccli_lsa_DeleteTrustedDomain_done(struct tevent_req
*subreq
);
6743 struct tevent_req
*rpccli_lsa_DeleteTrustedDomain_send(TALLOC_CTX
*mem_ctx
,
6744 struct tevent_context
*ev
,
6745 struct rpc_pipe_client
*cli
,
6746 struct policy_handle
*_handle
/* [in] [ref] */,
6747 struct dom_sid2
*_dom_sid
/* [in] [ref] */)
6749 struct tevent_req
*req
;
6750 struct rpccli_lsa_DeleteTrustedDomain_state
*state
;
6751 struct tevent_req
*subreq
;
6753 req
= tevent_req_create(mem_ctx
, &state
,
6754 struct rpccli_lsa_DeleteTrustedDomain_state
);
6758 state
->out_mem_ctx
= NULL
;
6759 state
->dispatch_recv
= cli
->dispatch_recv
;
6762 state
->orig
.in
.handle
= _handle
;
6763 state
->orig
.in
.dom_sid
= _dom_sid
;
6765 /* Out parameters */
6768 ZERO_STRUCT(state
->orig
.out
.result
);
6770 if (DEBUGLEVEL
>= 10) {
6771 NDR_PRINT_IN_DEBUG(lsa_DeleteTrustedDomain
, &state
->orig
);
6774 /* make a temporary copy, that we pass to the dispatch function */
6775 state
->tmp
= state
->orig
;
6777 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6779 NDR_LSA_DELETETRUSTEDDOMAIN
,
6781 if (tevent_req_nomem(subreq
, req
)) {
6782 return tevent_req_post(req
, ev
);
6784 tevent_req_set_callback(subreq
, rpccli_lsa_DeleteTrustedDomain_done
, req
);
6788 static void rpccli_lsa_DeleteTrustedDomain_done(struct tevent_req
*subreq
)
6790 struct tevent_req
*req
= tevent_req_callback_data(
6791 subreq
, struct tevent_req
);
6792 struct rpccli_lsa_DeleteTrustedDomain_state
*state
= tevent_req_data(
6793 req
, struct rpccli_lsa_DeleteTrustedDomain_state
);
6795 TALLOC_CTX
*mem_ctx
;
6797 if (state
->out_mem_ctx
) {
6798 mem_ctx
= state
->out_mem_ctx
;
6803 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6804 TALLOC_FREE(subreq
);
6805 if (!NT_STATUS_IS_OK(status
)) {
6806 tevent_req_nterror(req
, status
);
6810 /* Copy out parameters */
6813 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6815 /* Reset temporary structure */
6816 ZERO_STRUCT(state
->tmp
);
6818 if (DEBUGLEVEL
>= 10) {
6819 NDR_PRINT_OUT_DEBUG(lsa_DeleteTrustedDomain
, &state
->orig
);
6822 tevent_req_done(req
);
6825 NTSTATUS
rpccli_lsa_DeleteTrustedDomain_recv(struct tevent_req
*req
,
6826 TALLOC_CTX
*mem_ctx
,
6829 struct rpccli_lsa_DeleteTrustedDomain_state
*state
= tevent_req_data(
6830 req
, struct rpccli_lsa_DeleteTrustedDomain_state
);
6833 if (tevent_req_is_nterror(req
, &status
)) {
6834 tevent_req_received(req
);
6838 /* Steal possbile out parameters to the callers context */
6839 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6842 *result
= state
->orig
.out
.result
;
6844 tevent_req_received(req
);
6845 return NT_STATUS_OK
;
6848 NTSTATUS
rpccli_lsa_DeleteTrustedDomain(struct rpc_pipe_client
*cli
,
6849 TALLOC_CTX
*mem_ctx
,
6850 struct policy_handle
*handle
/* [in] [ref] */,
6851 struct dom_sid2
*dom_sid
/* [in] [ref] */)
6853 struct lsa_DeleteTrustedDomain r
;
6857 r
.in
.handle
= handle
;
6858 r
.in
.dom_sid
= dom_sid
;
6860 if (DEBUGLEVEL
>= 10) {
6861 NDR_PRINT_IN_DEBUG(lsa_DeleteTrustedDomain
, &r
);
6864 status
= cli
->dispatch(cli
,
6867 NDR_LSA_DELETETRUSTEDDOMAIN
,
6870 if (!NT_STATUS_IS_OK(status
)) {
6874 if (DEBUGLEVEL
>= 10) {
6875 NDR_PRINT_OUT_DEBUG(lsa_DeleteTrustedDomain
, &r
);
6878 if (NT_STATUS_IS_ERR(status
)) {
6882 /* Return variables */
6885 return r
.out
.result
;
6888 struct rpccli_lsa_StorePrivateData_state
{
6889 struct lsa_StorePrivateData orig
;
6890 struct lsa_StorePrivateData tmp
;
6891 TALLOC_CTX
*out_mem_ctx
;
6892 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6895 static void rpccli_lsa_StorePrivateData_done(struct tevent_req
*subreq
);
6897 struct tevent_req
*rpccli_lsa_StorePrivateData_send(TALLOC_CTX
*mem_ctx
,
6898 struct tevent_context
*ev
,
6899 struct rpc_pipe_client
*cli
,
6900 struct policy_handle
*_handle
/* [in] [ref] */,
6901 struct lsa_String
*_name
/* [in] [ref] */,
6902 struct lsa_DATA_BUF
*_val
/* [in] [unique] */)
6904 struct tevent_req
*req
;
6905 struct rpccli_lsa_StorePrivateData_state
*state
;
6906 struct tevent_req
*subreq
;
6908 req
= tevent_req_create(mem_ctx
, &state
,
6909 struct rpccli_lsa_StorePrivateData_state
);
6913 state
->out_mem_ctx
= NULL
;
6914 state
->dispatch_recv
= cli
->dispatch_recv
;
6917 state
->orig
.in
.handle
= _handle
;
6918 state
->orig
.in
.name
= _name
;
6919 state
->orig
.in
.val
= _val
;
6921 /* Out parameters */
6924 ZERO_STRUCT(state
->orig
.out
.result
);
6926 if (DEBUGLEVEL
>= 10) {
6927 NDR_PRINT_IN_DEBUG(lsa_StorePrivateData
, &state
->orig
);
6930 /* make a temporary copy, that we pass to the dispatch function */
6931 state
->tmp
= state
->orig
;
6933 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6935 NDR_LSA_STOREPRIVATEDATA
,
6937 if (tevent_req_nomem(subreq
, req
)) {
6938 return tevent_req_post(req
, ev
);
6940 tevent_req_set_callback(subreq
, rpccli_lsa_StorePrivateData_done
, req
);
6944 static void rpccli_lsa_StorePrivateData_done(struct tevent_req
*subreq
)
6946 struct tevent_req
*req
= tevent_req_callback_data(
6947 subreq
, struct tevent_req
);
6948 struct rpccli_lsa_StorePrivateData_state
*state
= tevent_req_data(
6949 req
, struct rpccli_lsa_StorePrivateData_state
);
6951 TALLOC_CTX
*mem_ctx
;
6953 if (state
->out_mem_ctx
) {
6954 mem_ctx
= state
->out_mem_ctx
;
6959 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6960 TALLOC_FREE(subreq
);
6961 if (!NT_STATUS_IS_OK(status
)) {
6962 tevent_req_nterror(req
, status
);
6966 /* Copy out parameters */
6969 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6971 /* Reset temporary structure */
6972 ZERO_STRUCT(state
->tmp
);
6974 if (DEBUGLEVEL
>= 10) {
6975 NDR_PRINT_OUT_DEBUG(lsa_StorePrivateData
, &state
->orig
);
6978 tevent_req_done(req
);
6981 NTSTATUS
rpccli_lsa_StorePrivateData_recv(struct tevent_req
*req
,
6982 TALLOC_CTX
*mem_ctx
,
6985 struct rpccli_lsa_StorePrivateData_state
*state
= tevent_req_data(
6986 req
, struct rpccli_lsa_StorePrivateData_state
);
6989 if (tevent_req_is_nterror(req
, &status
)) {
6990 tevent_req_received(req
);
6994 /* Steal possbile out parameters to the callers context */
6995 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6998 *result
= state
->orig
.out
.result
;
7000 tevent_req_received(req
);
7001 return NT_STATUS_OK
;
7004 NTSTATUS
rpccli_lsa_StorePrivateData(struct rpc_pipe_client
*cli
,
7005 TALLOC_CTX
*mem_ctx
,
7006 struct policy_handle
*handle
/* [in] [ref] */,
7007 struct lsa_String
*name
/* [in] [ref] */,
7008 struct lsa_DATA_BUF
*val
/* [in] [unique] */)
7010 struct lsa_StorePrivateData r
;
7014 r
.in
.handle
= handle
;
7018 if (DEBUGLEVEL
>= 10) {
7019 NDR_PRINT_IN_DEBUG(lsa_StorePrivateData
, &r
);
7022 status
= cli
->dispatch(cli
,
7025 NDR_LSA_STOREPRIVATEDATA
,
7028 if (!NT_STATUS_IS_OK(status
)) {
7032 if (DEBUGLEVEL
>= 10) {
7033 NDR_PRINT_OUT_DEBUG(lsa_StorePrivateData
, &r
);
7036 if (NT_STATUS_IS_ERR(status
)) {
7040 /* Return variables */
7043 return r
.out
.result
;
7046 struct rpccli_lsa_RetrievePrivateData_state
{
7047 struct lsa_RetrievePrivateData orig
;
7048 struct lsa_RetrievePrivateData tmp
;
7049 TALLOC_CTX
*out_mem_ctx
;
7050 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7053 static void rpccli_lsa_RetrievePrivateData_done(struct tevent_req
*subreq
);
7055 struct tevent_req
*rpccli_lsa_RetrievePrivateData_send(TALLOC_CTX
*mem_ctx
,
7056 struct tevent_context
*ev
,
7057 struct rpc_pipe_client
*cli
,
7058 struct policy_handle
*_handle
/* [in] [ref] */,
7059 struct lsa_String
*_name
/* [in] [ref] */,
7060 struct lsa_DATA_BUF
**_val
/* [in,out] [ref] */)
7062 struct tevent_req
*req
;
7063 struct rpccli_lsa_RetrievePrivateData_state
*state
;
7064 struct tevent_req
*subreq
;
7066 req
= tevent_req_create(mem_ctx
, &state
,
7067 struct rpccli_lsa_RetrievePrivateData_state
);
7071 state
->out_mem_ctx
= NULL
;
7072 state
->dispatch_recv
= cli
->dispatch_recv
;
7075 state
->orig
.in
.handle
= _handle
;
7076 state
->orig
.in
.name
= _name
;
7077 state
->orig
.in
.val
= _val
;
7079 /* Out parameters */
7080 state
->orig
.out
.val
= _val
;
7083 ZERO_STRUCT(state
->orig
.out
.result
);
7085 if (DEBUGLEVEL
>= 10) {
7086 NDR_PRINT_IN_DEBUG(lsa_RetrievePrivateData
, &state
->orig
);
7089 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7090 "rpccli_lsa_RetrievePrivateData_out_memory");
7091 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7092 return tevent_req_post(req
, ev
);
7095 /* make a temporary copy, that we pass to the dispatch function */
7096 state
->tmp
= state
->orig
;
7098 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7100 NDR_LSA_RETRIEVEPRIVATEDATA
,
7102 if (tevent_req_nomem(subreq
, req
)) {
7103 return tevent_req_post(req
, ev
);
7105 tevent_req_set_callback(subreq
, rpccli_lsa_RetrievePrivateData_done
, req
);
7109 static void rpccli_lsa_RetrievePrivateData_done(struct tevent_req
*subreq
)
7111 struct tevent_req
*req
= tevent_req_callback_data(
7112 subreq
, struct tevent_req
);
7113 struct rpccli_lsa_RetrievePrivateData_state
*state
= tevent_req_data(
7114 req
, struct rpccli_lsa_RetrievePrivateData_state
);
7116 TALLOC_CTX
*mem_ctx
;
7118 if (state
->out_mem_ctx
) {
7119 mem_ctx
= state
->out_mem_ctx
;
7124 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7125 TALLOC_FREE(subreq
);
7126 if (!NT_STATUS_IS_OK(status
)) {
7127 tevent_req_nterror(req
, status
);
7131 /* Copy out parameters */
7132 *state
->orig
.out
.val
= *state
->tmp
.out
.val
;
7135 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7137 /* Reset temporary structure */
7138 ZERO_STRUCT(state
->tmp
);
7140 if (DEBUGLEVEL
>= 10) {
7141 NDR_PRINT_OUT_DEBUG(lsa_RetrievePrivateData
, &state
->orig
);
7144 tevent_req_done(req
);
7147 NTSTATUS
rpccli_lsa_RetrievePrivateData_recv(struct tevent_req
*req
,
7148 TALLOC_CTX
*mem_ctx
,
7151 struct rpccli_lsa_RetrievePrivateData_state
*state
= tevent_req_data(
7152 req
, struct rpccli_lsa_RetrievePrivateData_state
);
7155 if (tevent_req_is_nterror(req
, &status
)) {
7156 tevent_req_received(req
);
7160 /* Steal possbile out parameters to the callers context */
7161 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7164 *result
= state
->orig
.out
.result
;
7166 tevent_req_received(req
);
7167 return NT_STATUS_OK
;
7170 NTSTATUS
rpccli_lsa_RetrievePrivateData(struct rpc_pipe_client
*cli
,
7171 TALLOC_CTX
*mem_ctx
,
7172 struct policy_handle
*handle
/* [in] [ref] */,
7173 struct lsa_String
*name
/* [in] [ref] */,
7174 struct lsa_DATA_BUF
**val
/* [in,out] [ref] */)
7176 struct lsa_RetrievePrivateData r
;
7180 r
.in
.handle
= handle
;
7184 if (DEBUGLEVEL
>= 10) {
7185 NDR_PRINT_IN_DEBUG(lsa_RetrievePrivateData
, &r
);
7188 status
= cli
->dispatch(cli
,
7191 NDR_LSA_RETRIEVEPRIVATEDATA
,
7194 if (!NT_STATUS_IS_OK(status
)) {
7198 if (DEBUGLEVEL
>= 10) {
7199 NDR_PRINT_OUT_DEBUG(lsa_RetrievePrivateData
, &r
);
7202 if (NT_STATUS_IS_ERR(status
)) {
7206 /* Return variables */
7210 return r
.out
.result
;
7213 struct rpccli_lsa_OpenPolicy2_state
{
7214 struct lsa_OpenPolicy2 orig
;
7215 struct lsa_OpenPolicy2 tmp
;
7216 TALLOC_CTX
*out_mem_ctx
;
7217 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7220 static void rpccli_lsa_OpenPolicy2_done(struct tevent_req
*subreq
);
7222 struct tevent_req
*rpccli_lsa_OpenPolicy2_send(TALLOC_CTX
*mem_ctx
,
7223 struct tevent_context
*ev
,
7224 struct rpc_pipe_client
*cli
,
7225 const char *_system_name
/* [in] [unique,charset(UTF16)] */,
7226 struct lsa_ObjectAttribute
*_attr
/* [in] [ref] */,
7227 uint32_t _access_mask
/* [in] */,
7228 struct policy_handle
*_handle
/* [out] [ref] */)
7230 struct tevent_req
*req
;
7231 struct rpccli_lsa_OpenPolicy2_state
*state
;
7232 struct tevent_req
*subreq
;
7234 req
= tevent_req_create(mem_ctx
, &state
,
7235 struct rpccli_lsa_OpenPolicy2_state
);
7239 state
->out_mem_ctx
= NULL
;
7240 state
->dispatch_recv
= cli
->dispatch_recv
;
7243 state
->orig
.in
.system_name
= _system_name
;
7244 state
->orig
.in
.attr
= _attr
;
7245 state
->orig
.in
.access_mask
= _access_mask
;
7247 /* Out parameters */
7248 state
->orig
.out
.handle
= _handle
;
7251 ZERO_STRUCT(state
->orig
.out
.result
);
7253 if (DEBUGLEVEL
>= 10) {
7254 NDR_PRINT_IN_DEBUG(lsa_OpenPolicy2
, &state
->orig
);
7257 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7258 "rpccli_lsa_OpenPolicy2_out_memory");
7259 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7260 return tevent_req_post(req
, ev
);
7263 /* make a temporary copy, that we pass to the dispatch function */
7264 state
->tmp
= state
->orig
;
7266 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7268 NDR_LSA_OPENPOLICY2
,
7270 if (tevent_req_nomem(subreq
, req
)) {
7271 return tevent_req_post(req
, ev
);
7273 tevent_req_set_callback(subreq
, rpccli_lsa_OpenPolicy2_done
, req
);
7277 static void rpccli_lsa_OpenPolicy2_done(struct tevent_req
*subreq
)
7279 struct tevent_req
*req
= tevent_req_callback_data(
7280 subreq
, struct tevent_req
);
7281 struct rpccli_lsa_OpenPolicy2_state
*state
= tevent_req_data(
7282 req
, struct rpccli_lsa_OpenPolicy2_state
);
7284 TALLOC_CTX
*mem_ctx
;
7286 if (state
->out_mem_ctx
) {
7287 mem_ctx
= state
->out_mem_ctx
;
7292 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7293 TALLOC_FREE(subreq
);
7294 if (!NT_STATUS_IS_OK(status
)) {
7295 tevent_req_nterror(req
, status
);
7299 /* Copy out parameters */
7300 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
7303 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7305 /* Reset temporary structure */
7306 ZERO_STRUCT(state
->tmp
);
7308 if (DEBUGLEVEL
>= 10) {
7309 NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy2
, &state
->orig
);
7312 tevent_req_done(req
);
7315 NTSTATUS
rpccli_lsa_OpenPolicy2_recv(struct tevent_req
*req
,
7316 TALLOC_CTX
*mem_ctx
,
7319 struct rpccli_lsa_OpenPolicy2_state
*state
= tevent_req_data(
7320 req
, struct rpccli_lsa_OpenPolicy2_state
);
7323 if (tevent_req_is_nterror(req
, &status
)) {
7324 tevent_req_received(req
);
7328 /* Steal possbile out parameters to the callers context */
7329 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7332 *result
= state
->orig
.out
.result
;
7334 tevent_req_received(req
);
7335 return NT_STATUS_OK
;
7338 NTSTATUS
rpccli_lsa_OpenPolicy2(struct rpc_pipe_client
*cli
,
7339 TALLOC_CTX
*mem_ctx
,
7340 const char *system_name
/* [in] [unique,charset(UTF16)] */,
7341 struct lsa_ObjectAttribute
*attr
/* [in] [ref] */,
7342 uint32_t access_mask
/* [in] */,
7343 struct policy_handle
*handle
/* [out] [ref] */)
7345 struct lsa_OpenPolicy2 r
;
7349 r
.in
.system_name
= system_name
;
7351 r
.in
.access_mask
= access_mask
;
7353 if (DEBUGLEVEL
>= 10) {
7354 NDR_PRINT_IN_DEBUG(lsa_OpenPolicy2
, &r
);
7357 status
= cli
->dispatch(cli
,
7360 NDR_LSA_OPENPOLICY2
,
7363 if (!NT_STATUS_IS_OK(status
)) {
7367 if (DEBUGLEVEL
>= 10) {
7368 NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy2
, &r
);
7371 if (NT_STATUS_IS_ERR(status
)) {
7375 /* Return variables */
7376 *handle
= *r
.out
.handle
;
7379 return r
.out
.result
;
7382 struct rpccli_lsa_GetUserName_state
{
7383 struct lsa_GetUserName orig
;
7384 struct lsa_GetUserName tmp
;
7385 TALLOC_CTX
*out_mem_ctx
;
7386 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7389 static void rpccli_lsa_GetUserName_done(struct tevent_req
*subreq
);
7391 struct tevent_req
*rpccli_lsa_GetUserName_send(TALLOC_CTX
*mem_ctx
,
7392 struct tevent_context
*ev
,
7393 struct rpc_pipe_client
*cli
,
7394 const char *_system_name
/* [in] [unique,charset(UTF16)] */,
7395 struct lsa_String
**_account_name
/* [in,out] [ref] */,
7396 struct lsa_String
**_authority_name
/* [in,out] [unique] */)
7398 struct tevent_req
*req
;
7399 struct rpccli_lsa_GetUserName_state
*state
;
7400 struct tevent_req
*subreq
;
7402 req
= tevent_req_create(mem_ctx
, &state
,
7403 struct rpccli_lsa_GetUserName_state
);
7407 state
->out_mem_ctx
= NULL
;
7408 state
->dispatch_recv
= cli
->dispatch_recv
;
7411 state
->orig
.in
.system_name
= _system_name
;
7412 state
->orig
.in
.account_name
= _account_name
;
7413 state
->orig
.in
.authority_name
= _authority_name
;
7415 /* Out parameters */
7416 state
->orig
.out
.account_name
= _account_name
;
7417 state
->orig
.out
.authority_name
= _authority_name
;
7420 ZERO_STRUCT(state
->orig
.out
.result
);
7422 if (DEBUGLEVEL
>= 10) {
7423 NDR_PRINT_IN_DEBUG(lsa_GetUserName
, &state
->orig
);
7426 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7427 "rpccli_lsa_GetUserName_out_memory");
7428 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7429 return tevent_req_post(req
, ev
);
7432 /* make a temporary copy, that we pass to the dispatch function */
7433 state
->tmp
= state
->orig
;
7435 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7437 NDR_LSA_GETUSERNAME
,
7439 if (tevent_req_nomem(subreq
, req
)) {
7440 return tevent_req_post(req
, ev
);
7442 tevent_req_set_callback(subreq
, rpccli_lsa_GetUserName_done
, req
);
7446 static void rpccli_lsa_GetUserName_done(struct tevent_req
*subreq
)
7448 struct tevent_req
*req
= tevent_req_callback_data(
7449 subreq
, struct tevent_req
);
7450 struct rpccli_lsa_GetUserName_state
*state
= tevent_req_data(
7451 req
, struct rpccli_lsa_GetUserName_state
);
7453 TALLOC_CTX
*mem_ctx
;
7455 if (state
->out_mem_ctx
) {
7456 mem_ctx
= state
->out_mem_ctx
;
7461 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7462 TALLOC_FREE(subreq
);
7463 if (!NT_STATUS_IS_OK(status
)) {
7464 tevent_req_nterror(req
, status
);
7468 /* Copy out parameters */
7469 *state
->orig
.out
.account_name
= *state
->tmp
.out
.account_name
;
7470 if (state
->orig
.out
.authority_name
&& state
->tmp
.out
.authority_name
) {
7471 *state
->orig
.out
.authority_name
= *state
->tmp
.out
.authority_name
;
7475 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7477 /* Reset temporary structure */
7478 ZERO_STRUCT(state
->tmp
);
7480 if (DEBUGLEVEL
>= 10) {
7481 NDR_PRINT_OUT_DEBUG(lsa_GetUserName
, &state
->orig
);
7484 tevent_req_done(req
);
7487 NTSTATUS
rpccli_lsa_GetUserName_recv(struct tevent_req
*req
,
7488 TALLOC_CTX
*mem_ctx
,
7491 struct rpccli_lsa_GetUserName_state
*state
= tevent_req_data(
7492 req
, struct rpccli_lsa_GetUserName_state
);
7495 if (tevent_req_is_nterror(req
, &status
)) {
7496 tevent_req_received(req
);
7500 /* Steal possbile out parameters to the callers context */
7501 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7504 *result
= state
->orig
.out
.result
;
7506 tevent_req_received(req
);
7507 return NT_STATUS_OK
;
7510 NTSTATUS
rpccli_lsa_GetUserName(struct rpc_pipe_client
*cli
,
7511 TALLOC_CTX
*mem_ctx
,
7512 const char *system_name
/* [in] [unique,charset(UTF16)] */,
7513 struct lsa_String
**account_name
/* [in,out] [ref] */,
7514 struct lsa_String
**authority_name
/* [in,out] [unique] */)
7516 struct lsa_GetUserName r
;
7520 r
.in
.system_name
= system_name
;
7521 r
.in
.account_name
= account_name
;
7522 r
.in
.authority_name
= authority_name
;
7524 if (DEBUGLEVEL
>= 10) {
7525 NDR_PRINT_IN_DEBUG(lsa_GetUserName
, &r
);
7528 status
= cli
->dispatch(cli
,
7531 NDR_LSA_GETUSERNAME
,
7534 if (!NT_STATUS_IS_OK(status
)) {
7538 if (DEBUGLEVEL
>= 10) {
7539 NDR_PRINT_OUT_DEBUG(lsa_GetUserName
, &r
);
7542 if (NT_STATUS_IS_ERR(status
)) {
7546 /* Return variables */
7547 *account_name
= *r
.out
.account_name
;
7548 if (authority_name
&& r
.out
.authority_name
) {
7549 *authority_name
= *r
.out
.authority_name
;
7553 return r
.out
.result
;
7556 struct rpccli_lsa_QueryInfoPolicy2_state
{
7557 struct lsa_QueryInfoPolicy2 orig
;
7558 struct lsa_QueryInfoPolicy2 tmp
;
7559 TALLOC_CTX
*out_mem_ctx
;
7560 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7563 static void rpccli_lsa_QueryInfoPolicy2_done(struct tevent_req
*subreq
);
7565 struct tevent_req
*rpccli_lsa_QueryInfoPolicy2_send(TALLOC_CTX
*mem_ctx
,
7566 struct tevent_context
*ev
,
7567 struct rpc_pipe_client
*cli
,
7568 struct policy_handle
*_handle
/* [in] [ref] */,
7569 enum lsa_PolicyInfo _level
/* [in] */,
7570 union lsa_PolicyInformation
**_info
/* [out] [ref,switch_is(level)] */)
7572 struct tevent_req
*req
;
7573 struct rpccli_lsa_QueryInfoPolicy2_state
*state
;
7574 struct tevent_req
*subreq
;
7576 req
= tevent_req_create(mem_ctx
, &state
,
7577 struct rpccli_lsa_QueryInfoPolicy2_state
);
7581 state
->out_mem_ctx
= NULL
;
7582 state
->dispatch_recv
= cli
->dispatch_recv
;
7585 state
->orig
.in
.handle
= _handle
;
7586 state
->orig
.in
.level
= _level
;
7588 /* Out parameters */
7589 state
->orig
.out
.info
= _info
;
7592 ZERO_STRUCT(state
->orig
.out
.result
);
7594 if (DEBUGLEVEL
>= 10) {
7595 NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy2
, &state
->orig
);
7598 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7599 "rpccli_lsa_QueryInfoPolicy2_out_memory");
7600 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7601 return tevent_req_post(req
, ev
);
7604 /* make a temporary copy, that we pass to the dispatch function */
7605 state
->tmp
= state
->orig
;
7607 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7609 NDR_LSA_QUERYINFOPOLICY2
,
7611 if (tevent_req_nomem(subreq
, req
)) {
7612 return tevent_req_post(req
, ev
);
7614 tevent_req_set_callback(subreq
, rpccli_lsa_QueryInfoPolicy2_done
, req
);
7618 static void rpccli_lsa_QueryInfoPolicy2_done(struct tevent_req
*subreq
)
7620 struct tevent_req
*req
= tevent_req_callback_data(
7621 subreq
, struct tevent_req
);
7622 struct rpccli_lsa_QueryInfoPolicy2_state
*state
= tevent_req_data(
7623 req
, struct rpccli_lsa_QueryInfoPolicy2_state
);
7625 TALLOC_CTX
*mem_ctx
;
7627 if (state
->out_mem_ctx
) {
7628 mem_ctx
= state
->out_mem_ctx
;
7633 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7634 TALLOC_FREE(subreq
);
7635 if (!NT_STATUS_IS_OK(status
)) {
7636 tevent_req_nterror(req
, status
);
7640 /* Copy out parameters */
7641 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
7644 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7646 /* Reset temporary structure */
7647 ZERO_STRUCT(state
->tmp
);
7649 if (DEBUGLEVEL
>= 10) {
7650 NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy2
, &state
->orig
);
7653 tevent_req_done(req
);
7656 NTSTATUS
rpccli_lsa_QueryInfoPolicy2_recv(struct tevent_req
*req
,
7657 TALLOC_CTX
*mem_ctx
,
7660 struct rpccli_lsa_QueryInfoPolicy2_state
*state
= tevent_req_data(
7661 req
, struct rpccli_lsa_QueryInfoPolicy2_state
);
7664 if (tevent_req_is_nterror(req
, &status
)) {
7665 tevent_req_received(req
);
7669 /* Steal possbile out parameters to the callers context */
7670 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7673 *result
= state
->orig
.out
.result
;
7675 tevent_req_received(req
);
7676 return NT_STATUS_OK
;
7679 NTSTATUS
rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client
*cli
,
7680 TALLOC_CTX
*mem_ctx
,
7681 struct policy_handle
*handle
/* [in] [ref] */,
7682 enum lsa_PolicyInfo level
/* [in] */,
7683 union lsa_PolicyInformation
**info
/* [out] [ref,switch_is(level)] */)
7685 struct lsa_QueryInfoPolicy2 r
;
7689 r
.in
.handle
= handle
;
7692 if (DEBUGLEVEL
>= 10) {
7693 NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy2
, &r
);
7696 status
= cli
->dispatch(cli
,
7699 NDR_LSA_QUERYINFOPOLICY2
,
7702 if (!NT_STATUS_IS_OK(status
)) {
7706 if (DEBUGLEVEL
>= 10) {
7707 NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy2
, &r
);
7710 if (NT_STATUS_IS_ERR(status
)) {
7714 /* Return variables */
7715 *info
= *r
.out
.info
;
7718 return r
.out
.result
;
7721 struct rpccli_lsa_SetInfoPolicy2_state
{
7722 struct lsa_SetInfoPolicy2 orig
;
7723 struct lsa_SetInfoPolicy2 tmp
;
7724 TALLOC_CTX
*out_mem_ctx
;
7725 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7728 static void rpccli_lsa_SetInfoPolicy2_done(struct tevent_req
*subreq
);
7730 struct tevent_req
*rpccli_lsa_SetInfoPolicy2_send(TALLOC_CTX
*mem_ctx
,
7731 struct tevent_context
*ev
,
7732 struct rpc_pipe_client
*cli
,
7733 struct policy_handle
*_handle
/* [in] [ref] */,
7734 enum lsa_PolicyInfo _level
/* [in] */,
7735 union lsa_PolicyInformation
*_info
/* [in] [ref,switch_is(level)] */)
7737 struct tevent_req
*req
;
7738 struct rpccli_lsa_SetInfoPolicy2_state
*state
;
7739 struct tevent_req
*subreq
;
7741 req
= tevent_req_create(mem_ctx
, &state
,
7742 struct rpccli_lsa_SetInfoPolicy2_state
);
7746 state
->out_mem_ctx
= NULL
;
7747 state
->dispatch_recv
= cli
->dispatch_recv
;
7750 state
->orig
.in
.handle
= _handle
;
7751 state
->orig
.in
.level
= _level
;
7752 state
->orig
.in
.info
= _info
;
7754 /* Out parameters */
7757 ZERO_STRUCT(state
->orig
.out
.result
);
7759 if (DEBUGLEVEL
>= 10) {
7760 NDR_PRINT_IN_DEBUG(lsa_SetInfoPolicy2
, &state
->orig
);
7763 /* make a temporary copy, that we pass to the dispatch function */
7764 state
->tmp
= state
->orig
;
7766 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7768 NDR_LSA_SETINFOPOLICY2
,
7770 if (tevent_req_nomem(subreq
, req
)) {
7771 return tevent_req_post(req
, ev
);
7773 tevent_req_set_callback(subreq
, rpccli_lsa_SetInfoPolicy2_done
, req
);
7777 static void rpccli_lsa_SetInfoPolicy2_done(struct tevent_req
*subreq
)
7779 struct tevent_req
*req
= tevent_req_callback_data(
7780 subreq
, struct tevent_req
);
7781 struct rpccli_lsa_SetInfoPolicy2_state
*state
= tevent_req_data(
7782 req
, struct rpccli_lsa_SetInfoPolicy2_state
);
7784 TALLOC_CTX
*mem_ctx
;
7786 if (state
->out_mem_ctx
) {
7787 mem_ctx
= state
->out_mem_ctx
;
7792 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7793 TALLOC_FREE(subreq
);
7794 if (!NT_STATUS_IS_OK(status
)) {
7795 tevent_req_nterror(req
, status
);
7799 /* Copy out parameters */
7802 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7804 /* Reset temporary structure */
7805 ZERO_STRUCT(state
->tmp
);
7807 if (DEBUGLEVEL
>= 10) {
7808 NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy2
, &state
->orig
);
7811 tevent_req_done(req
);
7814 NTSTATUS
rpccli_lsa_SetInfoPolicy2_recv(struct tevent_req
*req
,
7815 TALLOC_CTX
*mem_ctx
,
7818 struct rpccli_lsa_SetInfoPolicy2_state
*state
= tevent_req_data(
7819 req
, struct rpccli_lsa_SetInfoPolicy2_state
);
7822 if (tevent_req_is_nterror(req
, &status
)) {
7823 tevent_req_received(req
);
7827 /* Steal possbile out parameters to the callers context */
7828 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7831 *result
= state
->orig
.out
.result
;
7833 tevent_req_received(req
);
7834 return NT_STATUS_OK
;
7837 NTSTATUS
rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client
*cli
,
7838 TALLOC_CTX
*mem_ctx
,
7839 struct policy_handle
*handle
/* [in] [ref] */,
7840 enum lsa_PolicyInfo level
/* [in] */,
7841 union lsa_PolicyInformation
*info
/* [in] [ref,switch_is(level)] */)
7843 struct lsa_SetInfoPolicy2 r
;
7847 r
.in
.handle
= handle
;
7851 if (DEBUGLEVEL
>= 10) {
7852 NDR_PRINT_IN_DEBUG(lsa_SetInfoPolicy2
, &r
);
7855 status
= cli
->dispatch(cli
,
7858 NDR_LSA_SETINFOPOLICY2
,
7861 if (!NT_STATUS_IS_OK(status
)) {
7865 if (DEBUGLEVEL
>= 10) {
7866 NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy2
, &r
);
7869 if (NT_STATUS_IS_ERR(status
)) {
7873 /* Return variables */
7876 return r
.out
.result
;
7879 struct rpccli_lsa_QueryTrustedDomainInfoByName_state
{
7880 struct lsa_QueryTrustedDomainInfoByName orig
;
7881 struct lsa_QueryTrustedDomainInfoByName tmp
;
7882 TALLOC_CTX
*out_mem_ctx
;
7883 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7886 static void rpccli_lsa_QueryTrustedDomainInfoByName_done(struct tevent_req
*subreq
);
7888 struct tevent_req
*rpccli_lsa_QueryTrustedDomainInfoByName_send(TALLOC_CTX
*mem_ctx
,
7889 struct tevent_context
*ev
,
7890 struct rpc_pipe_client
*cli
,
7891 struct policy_handle
*_handle
/* [in] [ref] */,
7892 struct lsa_String
*_trusted_domain
/* [in] [ref] */,
7893 enum lsa_TrustDomInfoEnum _level
/* [in] */,
7894 union lsa_TrustedDomainInfo
**_info
/* [out] [ref,switch_is(level)] */)
7896 struct tevent_req
*req
;
7897 struct rpccli_lsa_QueryTrustedDomainInfoByName_state
*state
;
7898 struct tevent_req
*subreq
;
7900 req
= tevent_req_create(mem_ctx
, &state
,
7901 struct rpccli_lsa_QueryTrustedDomainInfoByName_state
);
7905 state
->out_mem_ctx
= NULL
;
7906 state
->dispatch_recv
= cli
->dispatch_recv
;
7909 state
->orig
.in
.handle
= _handle
;
7910 state
->orig
.in
.trusted_domain
= _trusted_domain
;
7911 state
->orig
.in
.level
= _level
;
7913 /* Out parameters */
7914 state
->orig
.out
.info
= _info
;
7917 ZERO_STRUCT(state
->orig
.out
.result
);
7919 if (DEBUGLEVEL
>= 10) {
7920 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoByName
, &state
->orig
);
7923 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7924 "rpccli_lsa_QueryTrustedDomainInfoByName_out_memory");
7925 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7926 return tevent_req_post(req
, ev
);
7929 /* make a temporary copy, that we pass to the dispatch function */
7930 state
->tmp
= state
->orig
;
7932 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7934 NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME
,
7936 if (tevent_req_nomem(subreq
, req
)) {
7937 return tevent_req_post(req
, ev
);
7939 tevent_req_set_callback(subreq
, rpccli_lsa_QueryTrustedDomainInfoByName_done
, req
);
7943 static void rpccli_lsa_QueryTrustedDomainInfoByName_done(struct tevent_req
*subreq
)
7945 struct tevent_req
*req
= tevent_req_callback_data(
7946 subreq
, struct tevent_req
);
7947 struct rpccli_lsa_QueryTrustedDomainInfoByName_state
*state
= tevent_req_data(
7948 req
, struct rpccli_lsa_QueryTrustedDomainInfoByName_state
);
7950 TALLOC_CTX
*mem_ctx
;
7952 if (state
->out_mem_ctx
) {
7953 mem_ctx
= state
->out_mem_ctx
;
7958 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7959 TALLOC_FREE(subreq
);
7960 if (!NT_STATUS_IS_OK(status
)) {
7961 tevent_req_nterror(req
, status
);
7965 /* Copy out parameters */
7966 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
7969 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7971 /* Reset temporary structure */
7972 ZERO_STRUCT(state
->tmp
);
7974 if (DEBUGLEVEL
>= 10) {
7975 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoByName
, &state
->orig
);
7978 tevent_req_done(req
);
7981 NTSTATUS
rpccli_lsa_QueryTrustedDomainInfoByName_recv(struct tevent_req
*req
,
7982 TALLOC_CTX
*mem_ctx
,
7985 struct rpccli_lsa_QueryTrustedDomainInfoByName_state
*state
= tevent_req_data(
7986 req
, struct rpccli_lsa_QueryTrustedDomainInfoByName_state
);
7989 if (tevent_req_is_nterror(req
, &status
)) {
7990 tevent_req_received(req
);
7994 /* Steal possbile out parameters to the callers context */
7995 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7998 *result
= state
->orig
.out
.result
;
8000 tevent_req_received(req
);
8001 return NT_STATUS_OK
;
8004 NTSTATUS
rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client
*cli
,
8005 TALLOC_CTX
*mem_ctx
,
8006 struct policy_handle
*handle
/* [in] [ref] */,
8007 struct lsa_String
*trusted_domain
/* [in] [ref] */,
8008 enum lsa_TrustDomInfoEnum level
/* [in] */,
8009 union lsa_TrustedDomainInfo
**info
/* [out] [ref,switch_is(level)] */)
8011 struct lsa_QueryTrustedDomainInfoByName r
;
8015 r
.in
.handle
= handle
;
8016 r
.in
.trusted_domain
= trusted_domain
;
8019 if (DEBUGLEVEL
>= 10) {
8020 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoByName
, &r
);
8023 status
= cli
->dispatch(cli
,
8026 NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME
,
8029 if (!NT_STATUS_IS_OK(status
)) {
8033 if (DEBUGLEVEL
>= 10) {
8034 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoByName
, &r
);
8037 if (NT_STATUS_IS_ERR(status
)) {
8041 /* Return variables */
8042 *info
= *r
.out
.info
;
8045 return r
.out
.result
;
8048 struct rpccli_lsa_SetTrustedDomainInfoByName_state
{
8049 struct lsa_SetTrustedDomainInfoByName orig
;
8050 struct lsa_SetTrustedDomainInfoByName tmp
;
8051 TALLOC_CTX
*out_mem_ctx
;
8052 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8055 static void rpccli_lsa_SetTrustedDomainInfoByName_done(struct tevent_req
*subreq
);
8057 struct tevent_req
*rpccli_lsa_SetTrustedDomainInfoByName_send(TALLOC_CTX
*mem_ctx
,
8058 struct tevent_context
*ev
,
8059 struct rpc_pipe_client
*cli
,
8060 struct policy_handle
*_handle
/* [in] [ref] */,
8061 struct lsa_String _trusted_domain
/* [in] */,
8062 enum lsa_TrustDomInfoEnum _level
/* [in] */,
8063 union lsa_TrustedDomainInfo
*_info
/* [in] [unique,switch_is(level)] */)
8065 struct tevent_req
*req
;
8066 struct rpccli_lsa_SetTrustedDomainInfoByName_state
*state
;
8067 struct tevent_req
*subreq
;
8069 req
= tevent_req_create(mem_ctx
, &state
,
8070 struct rpccli_lsa_SetTrustedDomainInfoByName_state
);
8074 state
->out_mem_ctx
= NULL
;
8075 state
->dispatch_recv
= cli
->dispatch_recv
;
8078 state
->orig
.in
.handle
= _handle
;
8079 state
->orig
.in
.trusted_domain
= _trusted_domain
;
8080 state
->orig
.in
.level
= _level
;
8081 state
->orig
.in
.info
= _info
;
8083 /* Out parameters */
8086 ZERO_STRUCT(state
->orig
.out
.result
);
8088 if (DEBUGLEVEL
>= 10) {
8089 NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfoByName
, &state
->orig
);
8092 /* make a temporary copy, that we pass to the dispatch function */
8093 state
->tmp
= state
->orig
;
8095 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8097 NDR_LSA_SETTRUSTEDDOMAININFOBYNAME
,
8099 if (tevent_req_nomem(subreq
, req
)) {
8100 return tevent_req_post(req
, ev
);
8102 tevent_req_set_callback(subreq
, rpccli_lsa_SetTrustedDomainInfoByName_done
, req
);
8106 static void rpccli_lsa_SetTrustedDomainInfoByName_done(struct tevent_req
*subreq
)
8108 struct tevent_req
*req
= tevent_req_callback_data(
8109 subreq
, struct tevent_req
);
8110 struct rpccli_lsa_SetTrustedDomainInfoByName_state
*state
= tevent_req_data(
8111 req
, struct rpccli_lsa_SetTrustedDomainInfoByName_state
);
8113 TALLOC_CTX
*mem_ctx
;
8115 if (state
->out_mem_ctx
) {
8116 mem_ctx
= state
->out_mem_ctx
;
8121 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8122 TALLOC_FREE(subreq
);
8123 if (!NT_STATUS_IS_OK(status
)) {
8124 tevent_req_nterror(req
, status
);
8128 /* Copy out parameters */
8131 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8133 /* Reset temporary structure */
8134 ZERO_STRUCT(state
->tmp
);
8136 if (DEBUGLEVEL
>= 10) {
8137 NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfoByName
, &state
->orig
);
8140 tevent_req_done(req
);
8143 NTSTATUS
rpccli_lsa_SetTrustedDomainInfoByName_recv(struct tevent_req
*req
,
8144 TALLOC_CTX
*mem_ctx
,
8147 struct rpccli_lsa_SetTrustedDomainInfoByName_state
*state
= tevent_req_data(
8148 req
, struct rpccli_lsa_SetTrustedDomainInfoByName_state
);
8151 if (tevent_req_is_nterror(req
, &status
)) {
8152 tevent_req_received(req
);
8156 /* Steal possbile out parameters to the callers context */
8157 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8160 *result
= state
->orig
.out
.result
;
8162 tevent_req_received(req
);
8163 return NT_STATUS_OK
;
8166 NTSTATUS
rpccli_lsa_SetTrustedDomainInfoByName(struct rpc_pipe_client
*cli
,
8167 TALLOC_CTX
*mem_ctx
,
8168 struct policy_handle
*handle
/* [in] [ref] */,
8169 struct lsa_String trusted_domain
/* [in] */,
8170 enum lsa_TrustDomInfoEnum level
/* [in] */,
8171 union lsa_TrustedDomainInfo
*info
/* [in] [unique,switch_is(level)] */)
8173 struct lsa_SetTrustedDomainInfoByName r
;
8177 r
.in
.handle
= handle
;
8178 r
.in
.trusted_domain
= trusted_domain
;
8182 if (DEBUGLEVEL
>= 10) {
8183 NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfoByName
, &r
);
8186 status
= cli
->dispatch(cli
,
8189 NDR_LSA_SETTRUSTEDDOMAININFOBYNAME
,
8192 if (!NT_STATUS_IS_OK(status
)) {
8196 if (DEBUGLEVEL
>= 10) {
8197 NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfoByName
, &r
);
8200 if (NT_STATUS_IS_ERR(status
)) {
8204 /* Return variables */
8207 return r
.out
.result
;
8210 struct rpccli_lsa_EnumTrustedDomainsEx_state
{
8211 struct lsa_EnumTrustedDomainsEx orig
;
8212 struct lsa_EnumTrustedDomainsEx tmp
;
8213 TALLOC_CTX
*out_mem_ctx
;
8214 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8217 static void rpccli_lsa_EnumTrustedDomainsEx_done(struct tevent_req
*subreq
);
8219 struct tevent_req
*rpccli_lsa_EnumTrustedDomainsEx_send(TALLOC_CTX
*mem_ctx
,
8220 struct tevent_context
*ev
,
8221 struct rpc_pipe_client
*cli
,
8222 struct policy_handle
*_handle
/* [in] [ref] */,
8223 uint32_t *_resume_handle
/* [in,out] [ref] */,
8224 struct lsa_DomainListEx
*_domains
/* [out] [ref] */,
8225 uint32_t _max_size
/* [in] */)
8227 struct tevent_req
*req
;
8228 struct rpccli_lsa_EnumTrustedDomainsEx_state
*state
;
8229 struct tevent_req
*subreq
;
8231 req
= tevent_req_create(mem_ctx
, &state
,
8232 struct rpccli_lsa_EnumTrustedDomainsEx_state
);
8236 state
->out_mem_ctx
= NULL
;
8237 state
->dispatch_recv
= cli
->dispatch_recv
;
8240 state
->orig
.in
.handle
= _handle
;
8241 state
->orig
.in
.resume_handle
= _resume_handle
;
8242 state
->orig
.in
.max_size
= _max_size
;
8244 /* Out parameters */
8245 state
->orig
.out
.resume_handle
= _resume_handle
;
8246 state
->orig
.out
.domains
= _domains
;
8249 ZERO_STRUCT(state
->orig
.out
.result
);
8251 if (DEBUGLEVEL
>= 10) {
8252 NDR_PRINT_IN_DEBUG(lsa_EnumTrustedDomainsEx
, &state
->orig
);
8255 state
->out_mem_ctx
= talloc_named_const(state
, 0,
8256 "rpccli_lsa_EnumTrustedDomainsEx_out_memory");
8257 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
8258 return tevent_req_post(req
, ev
);
8261 /* make a temporary copy, that we pass to the dispatch function */
8262 state
->tmp
= state
->orig
;
8264 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8266 NDR_LSA_ENUMTRUSTEDDOMAINSEX
,
8268 if (tevent_req_nomem(subreq
, req
)) {
8269 return tevent_req_post(req
, ev
);
8271 tevent_req_set_callback(subreq
, rpccli_lsa_EnumTrustedDomainsEx_done
, req
);
8275 static void rpccli_lsa_EnumTrustedDomainsEx_done(struct tevent_req
*subreq
)
8277 struct tevent_req
*req
= tevent_req_callback_data(
8278 subreq
, struct tevent_req
);
8279 struct rpccli_lsa_EnumTrustedDomainsEx_state
*state
= tevent_req_data(
8280 req
, struct rpccli_lsa_EnumTrustedDomainsEx_state
);
8282 TALLOC_CTX
*mem_ctx
;
8284 if (state
->out_mem_ctx
) {
8285 mem_ctx
= state
->out_mem_ctx
;
8290 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8291 TALLOC_FREE(subreq
);
8292 if (!NT_STATUS_IS_OK(status
)) {
8293 tevent_req_nterror(req
, status
);
8297 /* Copy out parameters */
8298 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
8299 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
8302 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8304 /* Reset temporary structure */
8305 ZERO_STRUCT(state
->tmp
);
8307 if (DEBUGLEVEL
>= 10) {
8308 NDR_PRINT_OUT_DEBUG(lsa_EnumTrustedDomainsEx
, &state
->orig
);
8311 tevent_req_done(req
);
8314 NTSTATUS
rpccli_lsa_EnumTrustedDomainsEx_recv(struct tevent_req
*req
,
8315 TALLOC_CTX
*mem_ctx
,
8318 struct rpccli_lsa_EnumTrustedDomainsEx_state
*state
= tevent_req_data(
8319 req
, struct rpccli_lsa_EnumTrustedDomainsEx_state
);
8322 if (tevent_req_is_nterror(req
, &status
)) {
8323 tevent_req_received(req
);
8327 /* Steal possbile out parameters to the callers context */
8328 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8331 *result
= state
->orig
.out
.result
;
8333 tevent_req_received(req
);
8334 return NT_STATUS_OK
;
8337 NTSTATUS
rpccli_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client
*cli
,
8338 TALLOC_CTX
*mem_ctx
,
8339 struct policy_handle
*handle
/* [in] [ref] */,
8340 uint32_t *resume_handle
/* [in,out] [ref] */,
8341 struct lsa_DomainListEx
*domains
/* [out] [ref] */,
8342 uint32_t max_size
/* [in] */)
8344 struct lsa_EnumTrustedDomainsEx r
;
8348 r
.in
.handle
= handle
;
8349 r
.in
.resume_handle
= resume_handle
;
8350 r
.in
.max_size
= max_size
;
8352 if (DEBUGLEVEL
>= 10) {
8353 NDR_PRINT_IN_DEBUG(lsa_EnumTrustedDomainsEx
, &r
);
8356 status
= cli
->dispatch(cli
,
8359 NDR_LSA_ENUMTRUSTEDDOMAINSEX
,
8362 if (!NT_STATUS_IS_OK(status
)) {
8366 if (DEBUGLEVEL
>= 10) {
8367 NDR_PRINT_OUT_DEBUG(lsa_EnumTrustedDomainsEx
, &r
);
8370 if (NT_STATUS_IS_ERR(status
)) {
8374 /* Return variables */
8375 *resume_handle
= *r
.out
.resume_handle
;
8376 *domains
= *r
.out
.domains
;
8379 return r
.out
.result
;
8382 struct rpccli_lsa_CreateTrustedDomainEx_state
{
8383 struct lsa_CreateTrustedDomainEx orig
;
8384 struct lsa_CreateTrustedDomainEx tmp
;
8385 TALLOC_CTX
*out_mem_ctx
;
8386 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8389 static void rpccli_lsa_CreateTrustedDomainEx_done(struct tevent_req
*subreq
);
8391 struct tevent_req
*rpccli_lsa_CreateTrustedDomainEx_send(TALLOC_CTX
*mem_ctx
,
8392 struct tevent_context
*ev
,
8393 struct rpc_pipe_client
*cli
,
8394 struct policy_handle
*_policy_handle
/* [in] [ref] */,
8395 struct lsa_TrustDomainInfoInfoEx
*_info
/* [in] [ref] */,
8396 struct lsa_TrustDomainInfoAuthInfoInternal
*_auth_info
/* [in] [ref] */,
8397 uint32_t _access_mask
/* [in] */,
8398 struct policy_handle
*_trustdom_handle
/* [out] [ref] */)
8400 struct tevent_req
*req
;
8401 struct rpccli_lsa_CreateTrustedDomainEx_state
*state
;
8402 struct tevent_req
*subreq
;
8404 req
= tevent_req_create(mem_ctx
, &state
,
8405 struct rpccli_lsa_CreateTrustedDomainEx_state
);
8409 state
->out_mem_ctx
= NULL
;
8410 state
->dispatch_recv
= cli
->dispatch_recv
;
8413 state
->orig
.in
.policy_handle
= _policy_handle
;
8414 state
->orig
.in
.info
= _info
;
8415 state
->orig
.in
.auth_info
= _auth_info
;
8416 state
->orig
.in
.access_mask
= _access_mask
;
8418 /* Out parameters */
8419 state
->orig
.out
.trustdom_handle
= _trustdom_handle
;
8422 ZERO_STRUCT(state
->orig
.out
.result
);
8424 if (DEBUGLEVEL
>= 10) {
8425 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx
, &state
->orig
);
8428 state
->out_mem_ctx
= talloc_named_const(state
, 0,
8429 "rpccli_lsa_CreateTrustedDomainEx_out_memory");
8430 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
8431 return tevent_req_post(req
, ev
);
8434 /* make a temporary copy, that we pass to the dispatch function */
8435 state
->tmp
= state
->orig
;
8437 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8439 NDR_LSA_CREATETRUSTEDDOMAINEX
,
8441 if (tevent_req_nomem(subreq
, req
)) {
8442 return tevent_req_post(req
, ev
);
8444 tevent_req_set_callback(subreq
, rpccli_lsa_CreateTrustedDomainEx_done
, req
);
8448 static void rpccli_lsa_CreateTrustedDomainEx_done(struct tevent_req
*subreq
)
8450 struct tevent_req
*req
= tevent_req_callback_data(
8451 subreq
, struct tevent_req
);
8452 struct rpccli_lsa_CreateTrustedDomainEx_state
*state
= tevent_req_data(
8453 req
, struct rpccli_lsa_CreateTrustedDomainEx_state
);
8455 TALLOC_CTX
*mem_ctx
;
8457 if (state
->out_mem_ctx
) {
8458 mem_ctx
= state
->out_mem_ctx
;
8463 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8464 TALLOC_FREE(subreq
);
8465 if (!NT_STATUS_IS_OK(status
)) {
8466 tevent_req_nterror(req
, status
);
8470 /* Copy out parameters */
8471 *state
->orig
.out
.trustdom_handle
= *state
->tmp
.out
.trustdom_handle
;
8474 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8476 /* Reset temporary structure */
8477 ZERO_STRUCT(state
->tmp
);
8479 if (DEBUGLEVEL
>= 10) {
8480 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx
, &state
->orig
);
8483 tevent_req_done(req
);
8486 NTSTATUS
rpccli_lsa_CreateTrustedDomainEx_recv(struct tevent_req
*req
,
8487 TALLOC_CTX
*mem_ctx
,
8490 struct rpccli_lsa_CreateTrustedDomainEx_state
*state
= tevent_req_data(
8491 req
, struct rpccli_lsa_CreateTrustedDomainEx_state
);
8494 if (tevent_req_is_nterror(req
, &status
)) {
8495 tevent_req_received(req
);
8499 /* Steal possbile out parameters to the callers context */
8500 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8503 *result
= state
->orig
.out
.result
;
8505 tevent_req_received(req
);
8506 return NT_STATUS_OK
;
8509 NTSTATUS
rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client
*cli
,
8510 TALLOC_CTX
*mem_ctx
,
8511 struct policy_handle
*policy_handle
/* [in] [ref] */,
8512 struct lsa_TrustDomainInfoInfoEx
*info
/* [in] [ref] */,
8513 struct lsa_TrustDomainInfoAuthInfoInternal
*auth_info
/* [in] [ref] */,
8514 uint32_t access_mask
/* [in] */,
8515 struct policy_handle
*trustdom_handle
/* [out] [ref] */)
8517 struct lsa_CreateTrustedDomainEx r
;
8521 r
.in
.policy_handle
= policy_handle
;
8523 r
.in
.auth_info
= auth_info
;
8524 r
.in
.access_mask
= access_mask
;
8526 if (DEBUGLEVEL
>= 10) {
8527 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx
, &r
);
8530 status
= cli
->dispatch(cli
,
8533 NDR_LSA_CREATETRUSTEDDOMAINEX
,
8536 if (!NT_STATUS_IS_OK(status
)) {
8540 if (DEBUGLEVEL
>= 10) {
8541 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx
, &r
);
8544 if (NT_STATUS_IS_ERR(status
)) {
8548 /* Return variables */
8549 *trustdom_handle
= *r
.out
.trustdom_handle
;
8552 return r
.out
.result
;
8555 struct rpccli_lsa_CloseTrustedDomainEx_state
{
8556 struct lsa_CloseTrustedDomainEx orig
;
8557 struct lsa_CloseTrustedDomainEx tmp
;
8558 TALLOC_CTX
*out_mem_ctx
;
8559 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8562 static void rpccli_lsa_CloseTrustedDomainEx_done(struct tevent_req
*subreq
);
8564 struct tevent_req
*rpccli_lsa_CloseTrustedDomainEx_send(TALLOC_CTX
*mem_ctx
,
8565 struct tevent_context
*ev
,
8566 struct rpc_pipe_client
*cli
,
8567 struct policy_handle
*_handle
/* [in,out] [ref] */)
8569 struct tevent_req
*req
;
8570 struct rpccli_lsa_CloseTrustedDomainEx_state
*state
;
8571 struct tevent_req
*subreq
;
8573 req
= tevent_req_create(mem_ctx
, &state
,
8574 struct rpccli_lsa_CloseTrustedDomainEx_state
);
8578 state
->out_mem_ctx
= NULL
;
8579 state
->dispatch_recv
= cli
->dispatch_recv
;
8582 state
->orig
.in
.handle
= _handle
;
8584 /* Out parameters */
8585 state
->orig
.out
.handle
= _handle
;
8588 ZERO_STRUCT(state
->orig
.out
.result
);
8590 if (DEBUGLEVEL
>= 10) {
8591 NDR_PRINT_IN_DEBUG(lsa_CloseTrustedDomainEx
, &state
->orig
);
8594 state
->out_mem_ctx
= talloc_named_const(state
, 0,
8595 "rpccli_lsa_CloseTrustedDomainEx_out_memory");
8596 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
8597 return tevent_req_post(req
, ev
);
8600 /* make a temporary copy, that we pass to the dispatch function */
8601 state
->tmp
= state
->orig
;
8603 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8605 NDR_LSA_CLOSETRUSTEDDOMAINEX
,
8607 if (tevent_req_nomem(subreq
, req
)) {
8608 return tevent_req_post(req
, ev
);
8610 tevent_req_set_callback(subreq
, rpccli_lsa_CloseTrustedDomainEx_done
, req
);
8614 static void rpccli_lsa_CloseTrustedDomainEx_done(struct tevent_req
*subreq
)
8616 struct tevent_req
*req
= tevent_req_callback_data(
8617 subreq
, struct tevent_req
);
8618 struct rpccli_lsa_CloseTrustedDomainEx_state
*state
= tevent_req_data(
8619 req
, struct rpccli_lsa_CloseTrustedDomainEx_state
);
8621 TALLOC_CTX
*mem_ctx
;
8623 if (state
->out_mem_ctx
) {
8624 mem_ctx
= state
->out_mem_ctx
;
8629 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8630 TALLOC_FREE(subreq
);
8631 if (!NT_STATUS_IS_OK(status
)) {
8632 tevent_req_nterror(req
, status
);
8636 /* Copy out parameters */
8637 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
8640 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8642 /* Reset temporary structure */
8643 ZERO_STRUCT(state
->tmp
);
8645 if (DEBUGLEVEL
>= 10) {
8646 NDR_PRINT_OUT_DEBUG(lsa_CloseTrustedDomainEx
, &state
->orig
);
8649 tevent_req_done(req
);
8652 NTSTATUS
rpccli_lsa_CloseTrustedDomainEx_recv(struct tevent_req
*req
,
8653 TALLOC_CTX
*mem_ctx
,
8656 struct rpccli_lsa_CloseTrustedDomainEx_state
*state
= tevent_req_data(
8657 req
, struct rpccli_lsa_CloseTrustedDomainEx_state
);
8660 if (tevent_req_is_nterror(req
, &status
)) {
8661 tevent_req_received(req
);
8665 /* Steal possbile out parameters to the callers context */
8666 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8669 *result
= state
->orig
.out
.result
;
8671 tevent_req_received(req
);
8672 return NT_STATUS_OK
;
8675 NTSTATUS
rpccli_lsa_CloseTrustedDomainEx(struct rpc_pipe_client
*cli
,
8676 TALLOC_CTX
*mem_ctx
,
8677 struct policy_handle
*handle
/* [in,out] [ref] */)
8679 struct lsa_CloseTrustedDomainEx r
;
8683 r
.in
.handle
= handle
;
8685 if (DEBUGLEVEL
>= 10) {
8686 NDR_PRINT_IN_DEBUG(lsa_CloseTrustedDomainEx
, &r
);
8689 status
= cli
->dispatch(cli
,
8692 NDR_LSA_CLOSETRUSTEDDOMAINEX
,
8695 if (!NT_STATUS_IS_OK(status
)) {
8699 if (DEBUGLEVEL
>= 10) {
8700 NDR_PRINT_OUT_DEBUG(lsa_CloseTrustedDomainEx
, &r
);
8703 if (NT_STATUS_IS_ERR(status
)) {
8707 /* Return variables */
8708 *handle
= *r
.out
.handle
;
8711 return r
.out
.result
;
8714 struct rpccli_lsa_QueryDomainInformationPolicy_state
{
8715 struct lsa_QueryDomainInformationPolicy orig
;
8716 struct lsa_QueryDomainInformationPolicy tmp
;
8717 TALLOC_CTX
*out_mem_ctx
;
8718 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8721 static void rpccli_lsa_QueryDomainInformationPolicy_done(struct tevent_req
*subreq
);
8723 struct tevent_req
*rpccli_lsa_QueryDomainInformationPolicy_send(TALLOC_CTX
*mem_ctx
,
8724 struct tevent_context
*ev
,
8725 struct rpc_pipe_client
*cli
,
8726 struct policy_handle
*_handle
/* [in] [ref] */,
8727 uint16_t _level
/* [in] */,
8728 union lsa_DomainInformationPolicy
**_info
/* [out] [ref,switch_is(level)] */)
8730 struct tevent_req
*req
;
8731 struct rpccli_lsa_QueryDomainInformationPolicy_state
*state
;
8732 struct tevent_req
*subreq
;
8734 req
= tevent_req_create(mem_ctx
, &state
,
8735 struct rpccli_lsa_QueryDomainInformationPolicy_state
);
8739 state
->out_mem_ctx
= NULL
;
8740 state
->dispatch_recv
= cli
->dispatch_recv
;
8743 state
->orig
.in
.handle
= _handle
;
8744 state
->orig
.in
.level
= _level
;
8746 /* Out parameters */
8747 state
->orig
.out
.info
= _info
;
8750 ZERO_STRUCT(state
->orig
.out
.result
);
8752 if (DEBUGLEVEL
>= 10) {
8753 NDR_PRINT_IN_DEBUG(lsa_QueryDomainInformationPolicy
, &state
->orig
);
8756 state
->out_mem_ctx
= talloc_named_const(state
, 0,
8757 "rpccli_lsa_QueryDomainInformationPolicy_out_memory");
8758 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
8759 return tevent_req_post(req
, ev
);
8762 /* make a temporary copy, that we pass to the dispatch function */
8763 state
->tmp
= state
->orig
;
8765 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8767 NDR_LSA_QUERYDOMAININFORMATIONPOLICY
,
8769 if (tevent_req_nomem(subreq
, req
)) {
8770 return tevent_req_post(req
, ev
);
8772 tevent_req_set_callback(subreq
, rpccli_lsa_QueryDomainInformationPolicy_done
, req
);
8776 static void rpccli_lsa_QueryDomainInformationPolicy_done(struct tevent_req
*subreq
)
8778 struct tevent_req
*req
= tevent_req_callback_data(
8779 subreq
, struct tevent_req
);
8780 struct rpccli_lsa_QueryDomainInformationPolicy_state
*state
= tevent_req_data(
8781 req
, struct rpccli_lsa_QueryDomainInformationPolicy_state
);
8783 TALLOC_CTX
*mem_ctx
;
8785 if (state
->out_mem_ctx
) {
8786 mem_ctx
= state
->out_mem_ctx
;
8791 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8792 TALLOC_FREE(subreq
);
8793 if (!NT_STATUS_IS_OK(status
)) {
8794 tevent_req_nterror(req
, status
);
8798 /* Copy out parameters */
8799 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
8802 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8804 /* Reset temporary structure */
8805 ZERO_STRUCT(state
->tmp
);
8807 if (DEBUGLEVEL
>= 10) {
8808 NDR_PRINT_OUT_DEBUG(lsa_QueryDomainInformationPolicy
, &state
->orig
);
8811 tevent_req_done(req
);
8814 NTSTATUS
rpccli_lsa_QueryDomainInformationPolicy_recv(struct tevent_req
*req
,
8815 TALLOC_CTX
*mem_ctx
,
8818 struct rpccli_lsa_QueryDomainInformationPolicy_state
*state
= tevent_req_data(
8819 req
, struct rpccli_lsa_QueryDomainInformationPolicy_state
);
8822 if (tevent_req_is_nterror(req
, &status
)) {
8823 tevent_req_received(req
);
8827 /* Steal possbile out parameters to the callers context */
8828 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8831 *result
= state
->orig
.out
.result
;
8833 tevent_req_received(req
);
8834 return NT_STATUS_OK
;
8837 NTSTATUS
rpccli_lsa_QueryDomainInformationPolicy(struct rpc_pipe_client
*cli
,
8838 TALLOC_CTX
*mem_ctx
,
8839 struct policy_handle
*handle
/* [in] [ref] */,
8840 uint16_t level
/* [in] */,
8841 union lsa_DomainInformationPolicy
**info
/* [out] [ref,switch_is(level)] */)
8843 struct lsa_QueryDomainInformationPolicy r
;
8847 r
.in
.handle
= handle
;
8850 if (DEBUGLEVEL
>= 10) {
8851 NDR_PRINT_IN_DEBUG(lsa_QueryDomainInformationPolicy
, &r
);
8854 status
= cli
->dispatch(cli
,
8857 NDR_LSA_QUERYDOMAININFORMATIONPOLICY
,
8860 if (!NT_STATUS_IS_OK(status
)) {
8864 if (DEBUGLEVEL
>= 10) {
8865 NDR_PRINT_OUT_DEBUG(lsa_QueryDomainInformationPolicy
, &r
);
8868 if (NT_STATUS_IS_ERR(status
)) {
8872 /* Return variables */
8873 *info
= *r
.out
.info
;
8876 return r
.out
.result
;
8879 struct rpccli_lsa_SetDomainInformationPolicy_state
{
8880 struct lsa_SetDomainInformationPolicy orig
;
8881 struct lsa_SetDomainInformationPolicy tmp
;
8882 TALLOC_CTX
*out_mem_ctx
;
8883 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8886 static void rpccli_lsa_SetDomainInformationPolicy_done(struct tevent_req
*subreq
);
8888 struct tevent_req
*rpccli_lsa_SetDomainInformationPolicy_send(TALLOC_CTX
*mem_ctx
,
8889 struct tevent_context
*ev
,
8890 struct rpc_pipe_client
*cli
,
8891 struct policy_handle
*_handle
/* [in] [ref] */,
8892 uint16_t _level
/* [in] */,
8893 union lsa_DomainInformationPolicy
*_info
/* [in] [unique,switch_is(level)] */)
8895 struct tevent_req
*req
;
8896 struct rpccli_lsa_SetDomainInformationPolicy_state
*state
;
8897 struct tevent_req
*subreq
;
8899 req
= tevent_req_create(mem_ctx
, &state
,
8900 struct rpccli_lsa_SetDomainInformationPolicy_state
);
8904 state
->out_mem_ctx
= NULL
;
8905 state
->dispatch_recv
= cli
->dispatch_recv
;
8908 state
->orig
.in
.handle
= _handle
;
8909 state
->orig
.in
.level
= _level
;
8910 state
->orig
.in
.info
= _info
;
8912 /* Out parameters */
8915 ZERO_STRUCT(state
->orig
.out
.result
);
8917 if (DEBUGLEVEL
>= 10) {
8918 NDR_PRINT_IN_DEBUG(lsa_SetDomainInformationPolicy
, &state
->orig
);
8921 /* make a temporary copy, that we pass to the dispatch function */
8922 state
->tmp
= state
->orig
;
8924 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8926 NDR_LSA_SETDOMAININFORMATIONPOLICY
,
8928 if (tevent_req_nomem(subreq
, req
)) {
8929 return tevent_req_post(req
, ev
);
8931 tevent_req_set_callback(subreq
, rpccli_lsa_SetDomainInformationPolicy_done
, req
);
8935 static void rpccli_lsa_SetDomainInformationPolicy_done(struct tevent_req
*subreq
)
8937 struct tevent_req
*req
= tevent_req_callback_data(
8938 subreq
, struct tevent_req
);
8939 struct rpccli_lsa_SetDomainInformationPolicy_state
*state
= tevent_req_data(
8940 req
, struct rpccli_lsa_SetDomainInformationPolicy_state
);
8942 TALLOC_CTX
*mem_ctx
;
8944 if (state
->out_mem_ctx
) {
8945 mem_ctx
= state
->out_mem_ctx
;
8950 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8951 TALLOC_FREE(subreq
);
8952 if (!NT_STATUS_IS_OK(status
)) {
8953 tevent_req_nterror(req
, status
);
8957 /* Copy out parameters */
8960 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8962 /* Reset temporary structure */
8963 ZERO_STRUCT(state
->tmp
);
8965 if (DEBUGLEVEL
>= 10) {
8966 NDR_PRINT_OUT_DEBUG(lsa_SetDomainInformationPolicy
, &state
->orig
);
8969 tevent_req_done(req
);
8972 NTSTATUS
rpccli_lsa_SetDomainInformationPolicy_recv(struct tevent_req
*req
,
8973 TALLOC_CTX
*mem_ctx
,
8976 struct rpccli_lsa_SetDomainInformationPolicy_state
*state
= tevent_req_data(
8977 req
, struct rpccli_lsa_SetDomainInformationPolicy_state
);
8980 if (tevent_req_is_nterror(req
, &status
)) {
8981 tevent_req_received(req
);
8985 /* Steal possbile out parameters to the callers context */
8986 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8989 *result
= state
->orig
.out
.result
;
8991 tevent_req_received(req
);
8992 return NT_STATUS_OK
;
8995 NTSTATUS
rpccli_lsa_SetDomainInformationPolicy(struct rpc_pipe_client
*cli
,
8996 TALLOC_CTX
*mem_ctx
,
8997 struct policy_handle
*handle
/* [in] [ref] */,
8998 uint16_t level
/* [in] */,
8999 union lsa_DomainInformationPolicy
*info
/* [in] [unique,switch_is(level)] */)
9001 struct lsa_SetDomainInformationPolicy r
;
9005 r
.in
.handle
= handle
;
9009 if (DEBUGLEVEL
>= 10) {
9010 NDR_PRINT_IN_DEBUG(lsa_SetDomainInformationPolicy
, &r
);
9013 status
= cli
->dispatch(cli
,
9016 NDR_LSA_SETDOMAININFORMATIONPOLICY
,
9019 if (!NT_STATUS_IS_OK(status
)) {
9023 if (DEBUGLEVEL
>= 10) {
9024 NDR_PRINT_OUT_DEBUG(lsa_SetDomainInformationPolicy
, &r
);
9027 if (NT_STATUS_IS_ERR(status
)) {
9031 /* Return variables */
9034 return r
.out
.result
;
9037 struct rpccli_lsa_OpenTrustedDomainByName_state
{
9038 struct lsa_OpenTrustedDomainByName orig
;
9039 struct lsa_OpenTrustedDomainByName tmp
;
9040 TALLOC_CTX
*out_mem_ctx
;
9041 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9044 static void rpccli_lsa_OpenTrustedDomainByName_done(struct tevent_req
*subreq
);
9046 struct tevent_req
*rpccli_lsa_OpenTrustedDomainByName_send(TALLOC_CTX
*mem_ctx
,
9047 struct tevent_context
*ev
,
9048 struct rpc_pipe_client
*cli
,
9049 struct policy_handle
*_handle
/* [in] [ref] */,
9050 struct lsa_String _name
/* [in] */,
9051 uint32_t _access_mask
/* [in] */,
9052 struct policy_handle
*_trustdom_handle
/* [out] [ref] */)
9054 struct tevent_req
*req
;
9055 struct rpccli_lsa_OpenTrustedDomainByName_state
*state
;
9056 struct tevent_req
*subreq
;
9058 req
= tevent_req_create(mem_ctx
, &state
,
9059 struct rpccli_lsa_OpenTrustedDomainByName_state
);
9063 state
->out_mem_ctx
= NULL
;
9064 state
->dispatch_recv
= cli
->dispatch_recv
;
9067 state
->orig
.in
.handle
= _handle
;
9068 state
->orig
.in
.name
= _name
;
9069 state
->orig
.in
.access_mask
= _access_mask
;
9071 /* Out parameters */
9072 state
->orig
.out
.trustdom_handle
= _trustdom_handle
;
9075 ZERO_STRUCT(state
->orig
.out
.result
);
9077 if (DEBUGLEVEL
>= 10) {
9078 NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomainByName
, &state
->orig
);
9081 state
->out_mem_ctx
= talloc_named_const(state
, 0,
9082 "rpccli_lsa_OpenTrustedDomainByName_out_memory");
9083 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
9084 return tevent_req_post(req
, ev
);
9087 /* make a temporary copy, that we pass to the dispatch function */
9088 state
->tmp
= state
->orig
;
9090 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9092 NDR_LSA_OPENTRUSTEDDOMAINBYNAME
,
9094 if (tevent_req_nomem(subreq
, req
)) {
9095 return tevent_req_post(req
, ev
);
9097 tevent_req_set_callback(subreq
, rpccli_lsa_OpenTrustedDomainByName_done
, req
);
9101 static void rpccli_lsa_OpenTrustedDomainByName_done(struct tevent_req
*subreq
)
9103 struct tevent_req
*req
= tevent_req_callback_data(
9104 subreq
, struct tevent_req
);
9105 struct rpccli_lsa_OpenTrustedDomainByName_state
*state
= tevent_req_data(
9106 req
, struct rpccli_lsa_OpenTrustedDomainByName_state
);
9108 TALLOC_CTX
*mem_ctx
;
9110 if (state
->out_mem_ctx
) {
9111 mem_ctx
= state
->out_mem_ctx
;
9116 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9117 TALLOC_FREE(subreq
);
9118 if (!NT_STATUS_IS_OK(status
)) {
9119 tevent_req_nterror(req
, status
);
9123 /* Copy out parameters */
9124 *state
->orig
.out
.trustdom_handle
= *state
->tmp
.out
.trustdom_handle
;
9127 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9129 /* Reset temporary structure */
9130 ZERO_STRUCT(state
->tmp
);
9132 if (DEBUGLEVEL
>= 10) {
9133 NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomainByName
, &state
->orig
);
9136 tevent_req_done(req
);
9139 NTSTATUS
rpccli_lsa_OpenTrustedDomainByName_recv(struct tevent_req
*req
,
9140 TALLOC_CTX
*mem_ctx
,
9143 struct rpccli_lsa_OpenTrustedDomainByName_state
*state
= tevent_req_data(
9144 req
, struct rpccli_lsa_OpenTrustedDomainByName_state
);
9147 if (tevent_req_is_nterror(req
, &status
)) {
9148 tevent_req_received(req
);
9152 /* Steal possbile out parameters to the callers context */
9153 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9156 *result
= state
->orig
.out
.result
;
9158 tevent_req_received(req
);
9159 return NT_STATUS_OK
;
9162 NTSTATUS
rpccli_lsa_OpenTrustedDomainByName(struct rpc_pipe_client
*cli
,
9163 TALLOC_CTX
*mem_ctx
,
9164 struct policy_handle
*handle
/* [in] [ref] */,
9165 struct lsa_String name
/* [in] */,
9166 uint32_t access_mask
/* [in] */,
9167 struct policy_handle
*trustdom_handle
/* [out] [ref] */)
9169 struct lsa_OpenTrustedDomainByName r
;
9173 r
.in
.handle
= handle
;
9175 r
.in
.access_mask
= access_mask
;
9177 if (DEBUGLEVEL
>= 10) {
9178 NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomainByName
, &r
);
9181 status
= cli
->dispatch(cli
,
9184 NDR_LSA_OPENTRUSTEDDOMAINBYNAME
,
9187 if (!NT_STATUS_IS_OK(status
)) {
9191 if (DEBUGLEVEL
>= 10) {
9192 NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomainByName
, &r
);
9195 if (NT_STATUS_IS_ERR(status
)) {
9199 /* Return variables */
9200 *trustdom_handle
= *r
.out
.trustdom_handle
;
9203 return r
.out
.result
;
9206 struct rpccli_lsa_TestCall_state
{
9207 struct lsa_TestCall orig
;
9208 struct lsa_TestCall tmp
;
9209 TALLOC_CTX
*out_mem_ctx
;
9210 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9213 static void rpccli_lsa_TestCall_done(struct tevent_req
*subreq
);
9215 struct tevent_req
*rpccli_lsa_TestCall_send(TALLOC_CTX
*mem_ctx
,
9216 struct tevent_context
*ev
,
9217 struct rpc_pipe_client
*cli
)
9219 struct tevent_req
*req
;
9220 struct rpccli_lsa_TestCall_state
*state
;
9221 struct tevent_req
*subreq
;
9223 req
= tevent_req_create(mem_ctx
, &state
,
9224 struct rpccli_lsa_TestCall_state
);
9228 state
->out_mem_ctx
= NULL
;
9229 state
->dispatch_recv
= cli
->dispatch_recv
;
9233 /* Out parameters */
9236 ZERO_STRUCT(state
->orig
.out
.result
);
9238 if (DEBUGLEVEL
>= 10) {
9239 NDR_PRINT_IN_DEBUG(lsa_TestCall
, &state
->orig
);
9242 /* make a temporary copy, that we pass to the dispatch function */
9243 state
->tmp
= state
->orig
;
9245 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9249 if (tevent_req_nomem(subreq
, req
)) {
9250 return tevent_req_post(req
, ev
);
9252 tevent_req_set_callback(subreq
, rpccli_lsa_TestCall_done
, req
);
9256 static void rpccli_lsa_TestCall_done(struct tevent_req
*subreq
)
9258 struct tevent_req
*req
= tevent_req_callback_data(
9259 subreq
, struct tevent_req
);
9260 struct rpccli_lsa_TestCall_state
*state
= tevent_req_data(
9261 req
, struct rpccli_lsa_TestCall_state
);
9263 TALLOC_CTX
*mem_ctx
;
9265 if (state
->out_mem_ctx
) {
9266 mem_ctx
= state
->out_mem_ctx
;
9271 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9272 TALLOC_FREE(subreq
);
9273 if (!NT_STATUS_IS_OK(status
)) {
9274 tevent_req_nterror(req
, status
);
9278 /* Copy out parameters */
9281 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9283 /* Reset temporary structure */
9284 ZERO_STRUCT(state
->tmp
);
9286 if (DEBUGLEVEL
>= 10) {
9287 NDR_PRINT_OUT_DEBUG(lsa_TestCall
, &state
->orig
);
9290 tevent_req_done(req
);
9293 NTSTATUS
rpccli_lsa_TestCall_recv(struct tevent_req
*req
,
9294 TALLOC_CTX
*mem_ctx
,
9297 struct rpccli_lsa_TestCall_state
*state
= tevent_req_data(
9298 req
, struct rpccli_lsa_TestCall_state
);
9301 if (tevent_req_is_nterror(req
, &status
)) {
9302 tevent_req_received(req
);
9306 /* Steal possbile out parameters to the callers context */
9307 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9310 *result
= state
->orig
.out
.result
;
9312 tevent_req_received(req
);
9313 return NT_STATUS_OK
;
9316 NTSTATUS
rpccli_lsa_TestCall(struct rpc_pipe_client
*cli
,
9317 TALLOC_CTX
*mem_ctx
)
9319 struct lsa_TestCall r
;
9324 if (DEBUGLEVEL
>= 10) {
9325 NDR_PRINT_IN_DEBUG(lsa_TestCall
, &r
);
9328 status
= cli
->dispatch(cli
,
9334 if (!NT_STATUS_IS_OK(status
)) {
9338 if (DEBUGLEVEL
>= 10) {
9339 NDR_PRINT_OUT_DEBUG(lsa_TestCall
, &r
);
9342 if (NT_STATUS_IS_ERR(status
)) {
9346 /* Return variables */
9349 return r
.out
.result
;
9352 struct rpccli_lsa_LookupSids2_state
{
9353 struct lsa_LookupSids2 orig
;
9354 struct lsa_LookupSids2 tmp
;
9355 TALLOC_CTX
*out_mem_ctx
;
9356 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9359 static void rpccli_lsa_LookupSids2_done(struct tevent_req
*subreq
);
9361 struct tevent_req
*rpccli_lsa_LookupSids2_send(TALLOC_CTX
*mem_ctx
,
9362 struct tevent_context
*ev
,
9363 struct rpc_pipe_client
*cli
,
9364 struct policy_handle
*_handle
/* [in] [ref] */,
9365 struct lsa_SidArray
*_sids
/* [in] [ref] */,
9366 struct lsa_RefDomainList
**_domains
/* [out] [ref] */,
9367 struct lsa_TransNameArray2
*_names
/* [in,out] [ref] */,
9368 uint16_t _level
/* [in] */,
9369 uint32_t *_count
/* [in,out] [ref] */,
9370 uint32_t _unknown1
/* [in] */,
9371 uint32_t _unknown2
/* [in] */)
9373 struct tevent_req
*req
;
9374 struct rpccli_lsa_LookupSids2_state
*state
;
9375 struct tevent_req
*subreq
;
9377 req
= tevent_req_create(mem_ctx
, &state
,
9378 struct rpccli_lsa_LookupSids2_state
);
9382 state
->out_mem_ctx
= NULL
;
9383 state
->dispatch_recv
= cli
->dispatch_recv
;
9386 state
->orig
.in
.handle
= _handle
;
9387 state
->orig
.in
.sids
= _sids
;
9388 state
->orig
.in
.names
= _names
;
9389 state
->orig
.in
.level
= _level
;
9390 state
->orig
.in
.count
= _count
;
9391 state
->orig
.in
.unknown1
= _unknown1
;
9392 state
->orig
.in
.unknown2
= _unknown2
;
9394 /* Out parameters */
9395 state
->orig
.out
.domains
= _domains
;
9396 state
->orig
.out
.names
= _names
;
9397 state
->orig
.out
.count
= _count
;
9400 ZERO_STRUCT(state
->orig
.out
.result
);
9402 if (DEBUGLEVEL
>= 10) {
9403 NDR_PRINT_IN_DEBUG(lsa_LookupSids2
, &state
->orig
);
9406 state
->out_mem_ctx
= talloc_named_const(state
, 0,
9407 "rpccli_lsa_LookupSids2_out_memory");
9408 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
9409 return tevent_req_post(req
, ev
);
9412 /* make a temporary copy, that we pass to the dispatch function */
9413 state
->tmp
= state
->orig
;
9415 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9417 NDR_LSA_LOOKUPSIDS2
,
9419 if (tevent_req_nomem(subreq
, req
)) {
9420 return tevent_req_post(req
, ev
);
9422 tevent_req_set_callback(subreq
, rpccli_lsa_LookupSids2_done
, req
);
9426 static void rpccli_lsa_LookupSids2_done(struct tevent_req
*subreq
)
9428 struct tevent_req
*req
= tevent_req_callback_data(
9429 subreq
, struct tevent_req
);
9430 struct rpccli_lsa_LookupSids2_state
*state
= tevent_req_data(
9431 req
, struct rpccli_lsa_LookupSids2_state
);
9433 TALLOC_CTX
*mem_ctx
;
9435 if (state
->out_mem_ctx
) {
9436 mem_ctx
= state
->out_mem_ctx
;
9441 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9442 TALLOC_FREE(subreq
);
9443 if (!NT_STATUS_IS_OK(status
)) {
9444 tevent_req_nterror(req
, status
);
9448 /* Copy out parameters */
9449 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
9450 *state
->orig
.out
.names
= *state
->tmp
.out
.names
;
9451 *state
->orig
.out
.count
= *state
->tmp
.out
.count
;
9454 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9456 /* Reset temporary structure */
9457 ZERO_STRUCT(state
->tmp
);
9459 if (DEBUGLEVEL
>= 10) {
9460 NDR_PRINT_OUT_DEBUG(lsa_LookupSids2
, &state
->orig
);
9463 tevent_req_done(req
);
9466 NTSTATUS
rpccli_lsa_LookupSids2_recv(struct tevent_req
*req
,
9467 TALLOC_CTX
*mem_ctx
,
9470 struct rpccli_lsa_LookupSids2_state
*state
= tevent_req_data(
9471 req
, struct rpccli_lsa_LookupSids2_state
);
9474 if (tevent_req_is_nterror(req
, &status
)) {
9475 tevent_req_received(req
);
9479 /* Steal possbile out parameters to the callers context */
9480 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9483 *result
= state
->orig
.out
.result
;
9485 tevent_req_received(req
);
9486 return NT_STATUS_OK
;
9489 NTSTATUS
rpccli_lsa_LookupSids2(struct rpc_pipe_client
*cli
,
9490 TALLOC_CTX
*mem_ctx
,
9491 struct policy_handle
*handle
/* [in] [ref] */,
9492 struct lsa_SidArray
*sids
/* [in] [ref] */,
9493 struct lsa_RefDomainList
**domains
/* [out] [ref] */,
9494 struct lsa_TransNameArray2
*names
/* [in,out] [ref] */,
9495 uint16_t level
/* [in] */,
9496 uint32_t *count
/* [in,out] [ref] */,
9497 uint32_t unknown1
/* [in] */,
9498 uint32_t unknown2
/* [in] */)
9500 struct lsa_LookupSids2 r
;
9504 r
.in
.handle
= handle
;
9509 r
.in
.unknown1
= unknown1
;
9510 r
.in
.unknown2
= unknown2
;
9512 if (DEBUGLEVEL
>= 10) {
9513 NDR_PRINT_IN_DEBUG(lsa_LookupSids2
, &r
);
9516 status
= cli
->dispatch(cli
,
9519 NDR_LSA_LOOKUPSIDS2
,
9522 if (!NT_STATUS_IS_OK(status
)) {
9526 if (DEBUGLEVEL
>= 10) {
9527 NDR_PRINT_OUT_DEBUG(lsa_LookupSids2
, &r
);
9530 if (NT_STATUS_IS_ERR(status
)) {
9534 /* Return variables */
9535 *domains
= *r
.out
.domains
;
9536 *names
= *r
.out
.names
;
9537 *count
= *r
.out
.count
;
9540 return r
.out
.result
;
9543 struct rpccli_lsa_LookupNames2_state
{
9544 struct lsa_LookupNames2 orig
;
9545 struct lsa_LookupNames2 tmp
;
9546 TALLOC_CTX
*out_mem_ctx
;
9547 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9550 static void rpccli_lsa_LookupNames2_done(struct tevent_req
*subreq
);
9552 struct tevent_req
*rpccli_lsa_LookupNames2_send(TALLOC_CTX
*mem_ctx
,
9553 struct tevent_context
*ev
,
9554 struct rpc_pipe_client
*cli
,
9555 struct policy_handle
*_handle
/* [in] [ref] */,
9556 uint32_t _num_names
/* [in] [range(0,1000)] */,
9557 struct lsa_String
*_names
/* [in] [size_is(num_names)] */,
9558 struct lsa_RefDomainList
**_domains
/* [out] [ref] */,
9559 struct lsa_TransSidArray2
*_sids
/* [in,out] [ref] */,
9560 enum lsa_LookupNamesLevel _level
/* [in] */,
9561 uint32_t *_count
/* [in,out] [ref] */,
9562 uint32_t _lookup_options
/* [in] */,
9563 uint32_t _client_revision
/* [in] */)
9565 struct tevent_req
*req
;
9566 struct rpccli_lsa_LookupNames2_state
*state
;
9567 struct tevent_req
*subreq
;
9569 req
= tevent_req_create(mem_ctx
, &state
,
9570 struct rpccli_lsa_LookupNames2_state
);
9574 state
->out_mem_ctx
= NULL
;
9575 state
->dispatch_recv
= cli
->dispatch_recv
;
9578 state
->orig
.in
.handle
= _handle
;
9579 state
->orig
.in
.num_names
= _num_names
;
9580 state
->orig
.in
.names
= _names
;
9581 state
->orig
.in
.sids
= _sids
;
9582 state
->orig
.in
.level
= _level
;
9583 state
->orig
.in
.count
= _count
;
9584 state
->orig
.in
.lookup_options
= _lookup_options
;
9585 state
->orig
.in
.client_revision
= _client_revision
;
9587 /* Out parameters */
9588 state
->orig
.out
.domains
= _domains
;
9589 state
->orig
.out
.sids
= _sids
;
9590 state
->orig
.out
.count
= _count
;
9593 ZERO_STRUCT(state
->orig
.out
.result
);
9595 if (DEBUGLEVEL
>= 10) {
9596 NDR_PRINT_IN_DEBUG(lsa_LookupNames2
, &state
->orig
);
9599 state
->out_mem_ctx
= talloc_named_const(state
, 0,
9600 "rpccli_lsa_LookupNames2_out_memory");
9601 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
9602 return tevent_req_post(req
, ev
);
9605 /* make a temporary copy, that we pass to the dispatch function */
9606 state
->tmp
= state
->orig
;
9608 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9610 NDR_LSA_LOOKUPNAMES2
,
9612 if (tevent_req_nomem(subreq
, req
)) {
9613 return tevent_req_post(req
, ev
);
9615 tevent_req_set_callback(subreq
, rpccli_lsa_LookupNames2_done
, req
);
9619 static void rpccli_lsa_LookupNames2_done(struct tevent_req
*subreq
)
9621 struct tevent_req
*req
= tevent_req_callback_data(
9622 subreq
, struct tevent_req
);
9623 struct rpccli_lsa_LookupNames2_state
*state
= tevent_req_data(
9624 req
, struct rpccli_lsa_LookupNames2_state
);
9626 TALLOC_CTX
*mem_ctx
;
9628 if (state
->out_mem_ctx
) {
9629 mem_ctx
= state
->out_mem_ctx
;
9634 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9635 TALLOC_FREE(subreq
);
9636 if (!NT_STATUS_IS_OK(status
)) {
9637 tevent_req_nterror(req
, status
);
9641 /* Copy out parameters */
9642 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
9643 *state
->orig
.out
.sids
= *state
->tmp
.out
.sids
;
9644 *state
->orig
.out
.count
= *state
->tmp
.out
.count
;
9647 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9649 /* Reset temporary structure */
9650 ZERO_STRUCT(state
->tmp
);
9652 if (DEBUGLEVEL
>= 10) {
9653 NDR_PRINT_OUT_DEBUG(lsa_LookupNames2
, &state
->orig
);
9656 tevent_req_done(req
);
9659 NTSTATUS
rpccli_lsa_LookupNames2_recv(struct tevent_req
*req
,
9660 TALLOC_CTX
*mem_ctx
,
9663 struct rpccli_lsa_LookupNames2_state
*state
= tevent_req_data(
9664 req
, struct rpccli_lsa_LookupNames2_state
);
9667 if (tevent_req_is_nterror(req
, &status
)) {
9668 tevent_req_received(req
);
9672 /* Steal possbile out parameters to the callers context */
9673 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9676 *result
= state
->orig
.out
.result
;
9678 tevent_req_received(req
);
9679 return NT_STATUS_OK
;
9682 NTSTATUS
rpccli_lsa_LookupNames2(struct rpc_pipe_client
*cli
,
9683 TALLOC_CTX
*mem_ctx
,
9684 struct policy_handle
*handle
/* [in] [ref] */,
9685 uint32_t num_names
/* [in] [range(0,1000)] */,
9686 struct lsa_String
*names
/* [in] [size_is(num_names)] */,
9687 struct lsa_RefDomainList
**domains
/* [out] [ref] */,
9688 struct lsa_TransSidArray2
*sids
/* [in,out] [ref] */,
9689 enum lsa_LookupNamesLevel level
/* [in] */,
9690 uint32_t *count
/* [in,out] [ref] */,
9691 uint32_t lookup_options
/* [in] */,
9692 uint32_t client_revision
/* [in] */)
9694 struct lsa_LookupNames2 r
;
9698 r
.in
.handle
= handle
;
9699 r
.in
.num_names
= num_names
;
9704 r
.in
.lookup_options
= lookup_options
;
9705 r
.in
.client_revision
= client_revision
;
9707 if (DEBUGLEVEL
>= 10) {
9708 NDR_PRINT_IN_DEBUG(lsa_LookupNames2
, &r
);
9711 status
= cli
->dispatch(cli
,
9714 NDR_LSA_LOOKUPNAMES2
,
9717 if (!NT_STATUS_IS_OK(status
)) {
9721 if (DEBUGLEVEL
>= 10) {
9722 NDR_PRINT_OUT_DEBUG(lsa_LookupNames2
, &r
);
9725 if (NT_STATUS_IS_ERR(status
)) {
9729 /* Return variables */
9730 *domains
= *r
.out
.domains
;
9731 *sids
= *r
.out
.sids
;
9732 *count
= *r
.out
.count
;
9735 return r
.out
.result
;
9738 struct rpccli_lsa_CreateTrustedDomainEx2_state
{
9739 struct lsa_CreateTrustedDomainEx2 orig
;
9740 struct lsa_CreateTrustedDomainEx2 tmp
;
9741 TALLOC_CTX
*out_mem_ctx
;
9742 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9745 static void rpccli_lsa_CreateTrustedDomainEx2_done(struct tevent_req
*subreq
);
9747 struct tevent_req
*rpccli_lsa_CreateTrustedDomainEx2_send(TALLOC_CTX
*mem_ctx
,
9748 struct tevent_context
*ev
,
9749 struct rpc_pipe_client
*cli
,
9750 struct policy_handle
*_policy_handle
/* [in] [ref] */,
9751 struct lsa_TrustDomainInfoInfoEx
*_info
/* [in] [ref] */,
9752 struct lsa_TrustDomainInfoAuthInfoInternal
*_auth_info
/* [in] [ref] */,
9753 uint32_t _access_mask
/* [in] */,
9754 struct policy_handle
*_trustdom_handle
/* [out] [ref] */)
9756 struct tevent_req
*req
;
9757 struct rpccli_lsa_CreateTrustedDomainEx2_state
*state
;
9758 struct tevent_req
*subreq
;
9760 req
= tevent_req_create(mem_ctx
, &state
,
9761 struct rpccli_lsa_CreateTrustedDomainEx2_state
);
9765 state
->out_mem_ctx
= NULL
;
9766 state
->dispatch_recv
= cli
->dispatch_recv
;
9769 state
->orig
.in
.policy_handle
= _policy_handle
;
9770 state
->orig
.in
.info
= _info
;
9771 state
->orig
.in
.auth_info
= _auth_info
;
9772 state
->orig
.in
.access_mask
= _access_mask
;
9774 /* Out parameters */
9775 state
->orig
.out
.trustdom_handle
= _trustdom_handle
;
9778 ZERO_STRUCT(state
->orig
.out
.result
);
9780 if (DEBUGLEVEL
>= 10) {
9781 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx2
, &state
->orig
);
9784 state
->out_mem_ctx
= talloc_named_const(state
, 0,
9785 "rpccli_lsa_CreateTrustedDomainEx2_out_memory");
9786 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
9787 return tevent_req_post(req
, ev
);
9790 /* make a temporary copy, that we pass to the dispatch function */
9791 state
->tmp
= state
->orig
;
9793 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9795 NDR_LSA_CREATETRUSTEDDOMAINEX2
,
9797 if (tevent_req_nomem(subreq
, req
)) {
9798 return tevent_req_post(req
, ev
);
9800 tevent_req_set_callback(subreq
, rpccli_lsa_CreateTrustedDomainEx2_done
, req
);
9804 static void rpccli_lsa_CreateTrustedDomainEx2_done(struct tevent_req
*subreq
)
9806 struct tevent_req
*req
= tevent_req_callback_data(
9807 subreq
, struct tevent_req
);
9808 struct rpccli_lsa_CreateTrustedDomainEx2_state
*state
= tevent_req_data(
9809 req
, struct rpccli_lsa_CreateTrustedDomainEx2_state
);
9811 TALLOC_CTX
*mem_ctx
;
9813 if (state
->out_mem_ctx
) {
9814 mem_ctx
= state
->out_mem_ctx
;
9819 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9820 TALLOC_FREE(subreq
);
9821 if (!NT_STATUS_IS_OK(status
)) {
9822 tevent_req_nterror(req
, status
);
9826 /* Copy out parameters */
9827 *state
->orig
.out
.trustdom_handle
= *state
->tmp
.out
.trustdom_handle
;
9830 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9832 /* Reset temporary structure */
9833 ZERO_STRUCT(state
->tmp
);
9835 if (DEBUGLEVEL
>= 10) {
9836 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx2
, &state
->orig
);
9839 tevent_req_done(req
);
9842 NTSTATUS
rpccli_lsa_CreateTrustedDomainEx2_recv(struct tevent_req
*req
,
9843 TALLOC_CTX
*mem_ctx
,
9846 struct rpccli_lsa_CreateTrustedDomainEx2_state
*state
= tevent_req_data(
9847 req
, struct rpccli_lsa_CreateTrustedDomainEx2_state
);
9850 if (tevent_req_is_nterror(req
, &status
)) {
9851 tevent_req_received(req
);
9855 /* Steal possbile out parameters to the callers context */
9856 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9859 *result
= state
->orig
.out
.result
;
9861 tevent_req_received(req
);
9862 return NT_STATUS_OK
;
9865 NTSTATUS
rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client
*cli
,
9866 TALLOC_CTX
*mem_ctx
,
9867 struct policy_handle
*policy_handle
/* [in] [ref] */,
9868 struct lsa_TrustDomainInfoInfoEx
*info
/* [in] [ref] */,
9869 struct lsa_TrustDomainInfoAuthInfoInternal
*auth_info
/* [in] [ref] */,
9870 uint32_t access_mask
/* [in] */,
9871 struct policy_handle
*trustdom_handle
/* [out] [ref] */)
9873 struct lsa_CreateTrustedDomainEx2 r
;
9877 r
.in
.policy_handle
= policy_handle
;
9879 r
.in
.auth_info
= auth_info
;
9880 r
.in
.access_mask
= access_mask
;
9882 if (DEBUGLEVEL
>= 10) {
9883 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx2
, &r
);
9886 status
= cli
->dispatch(cli
,
9889 NDR_LSA_CREATETRUSTEDDOMAINEX2
,
9892 if (!NT_STATUS_IS_OK(status
)) {
9896 if (DEBUGLEVEL
>= 10) {
9897 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx2
, &r
);
9900 if (NT_STATUS_IS_ERR(status
)) {
9904 /* Return variables */
9905 *trustdom_handle
= *r
.out
.trustdom_handle
;
9908 return r
.out
.result
;
9911 struct rpccli_lsa_CREDRWRITE_state
{
9912 struct lsa_CREDRWRITE orig
;
9913 struct lsa_CREDRWRITE tmp
;
9914 TALLOC_CTX
*out_mem_ctx
;
9915 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9918 static void rpccli_lsa_CREDRWRITE_done(struct tevent_req
*subreq
);
9920 struct tevent_req
*rpccli_lsa_CREDRWRITE_send(TALLOC_CTX
*mem_ctx
,
9921 struct tevent_context
*ev
,
9922 struct rpc_pipe_client
*cli
)
9924 struct tevent_req
*req
;
9925 struct rpccli_lsa_CREDRWRITE_state
*state
;
9926 struct tevent_req
*subreq
;
9928 req
= tevent_req_create(mem_ctx
, &state
,
9929 struct rpccli_lsa_CREDRWRITE_state
);
9933 state
->out_mem_ctx
= NULL
;
9934 state
->dispatch_recv
= cli
->dispatch_recv
;
9938 /* Out parameters */
9941 ZERO_STRUCT(state
->orig
.out
.result
);
9943 if (DEBUGLEVEL
>= 10) {
9944 NDR_PRINT_IN_DEBUG(lsa_CREDRWRITE
, &state
->orig
);
9947 /* make a temporary copy, that we pass to the dispatch function */
9948 state
->tmp
= state
->orig
;
9950 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9954 if (tevent_req_nomem(subreq
, req
)) {
9955 return tevent_req_post(req
, ev
);
9957 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRWRITE_done
, req
);
9961 static void rpccli_lsa_CREDRWRITE_done(struct tevent_req
*subreq
)
9963 struct tevent_req
*req
= tevent_req_callback_data(
9964 subreq
, struct tevent_req
);
9965 struct rpccli_lsa_CREDRWRITE_state
*state
= tevent_req_data(
9966 req
, struct rpccli_lsa_CREDRWRITE_state
);
9968 TALLOC_CTX
*mem_ctx
;
9970 if (state
->out_mem_ctx
) {
9971 mem_ctx
= state
->out_mem_ctx
;
9976 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9977 TALLOC_FREE(subreq
);
9978 if (!NT_STATUS_IS_OK(status
)) {
9979 tevent_req_nterror(req
, status
);
9983 /* Copy out parameters */
9986 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9988 /* Reset temporary structure */
9989 ZERO_STRUCT(state
->tmp
);
9991 if (DEBUGLEVEL
>= 10) {
9992 NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITE
, &state
->orig
);
9995 tevent_req_done(req
);
9998 NTSTATUS
rpccli_lsa_CREDRWRITE_recv(struct tevent_req
*req
,
9999 TALLOC_CTX
*mem_ctx
,
10002 struct rpccli_lsa_CREDRWRITE_state
*state
= tevent_req_data(
10003 req
, struct rpccli_lsa_CREDRWRITE_state
);
10006 if (tevent_req_is_nterror(req
, &status
)) {
10007 tevent_req_received(req
);
10011 /* Steal possbile out parameters to the callers context */
10012 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10014 /* Return result */
10015 *result
= state
->orig
.out
.result
;
10017 tevent_req_received(req
);
10018 return NT_STATUS_OK
;
10021 NTSTATUS
rpccli_lsa_CREDRWRITE(struct rpc_pipe_client
*cli
,
10022 TALLOC_CTX
*mem_ctx
)
10024 struct lsa_CREDRWRITE r
;
10027 /* In parameters */
10029 if (DEBUGLEVEL
>= 10) {
10030 NDR_PRINT_IN_DEBUG(lsa_CREDRWRITE
, &r
);
10033 status
= cli
->dispatch(cli
,
10036 NDR_LSA_CREDRWRITE
,
10039 if (!NT_STATUS_IS_OK(status
)) {
10043 if (DEBUGLEVEL
>= 10) {
10044 NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITE
, &r
);
10047 if (NT_STATUS_IS_ERR(status
)) {
10051 /* Return variables */
10053 /* Return result */
10054 return r
.out
.result
;
10057 struct rpccli_lsa_CREDRREAD_state
{
10058 struct lsa_CREDRREAD orig
;
10059 struct lsa_CREDRREAD tmp
;
10060 TALLOC_CTX
*out_mem_ctx
;
10061 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10064 static void rpccli_lsa_CREDRREAD_done(struct tevent_req
*subreq
);
10066 struct tevent_req
*rpccli_lsa_CREDRREAD_send(TALLOC_CTX
*mem_ctx
,
10067 struct tevent_context
*ev
,
10068 struct rpc_pipe_client
*cli
)
10070 struct tevent_req
*req
;
10071 struct rpccli_lsa_CREDRREAD_state
*state
;
10072 struct tevent_req
*subreq
;
10074 req
= tevent_req_create(mem_ctx
, &state
,
10075 struct rpccli_lsa_CREDRREAD_state
);
10079 state
->out_mem_ctx
= NULL
;
10080 state
->dispatch_recv
= cli
->dispatch_recv
;
10082 /* In parameters */
10084 /* Out parameters */
10087 ZERO_STRUCT(state
->orig
.out
.result
);
10089 if (DEBUGLEVEL
>= 10) {
10090 NDR_PRINT_IN_DEBUG(lsa_CREDRREAD
, &state
->orig
);
10093 /* make a temporary copy, that we pass to the dispatch function */
10094 state
->tmp
= state
->orig
;
10096 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10100 if (tevent_req_nomem(subreq
, req
)) {
10101 return tevent_req_post(req
, ev
);
10103 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRREAD_done
, req
);
10107 static void rpccli_lsa_CREDRREAD_done(struct tevent_req
*subreq
)
10109 struct tevent_req
*req
= tevent_req_callback_data(
10110 subreq
, struct tevent_req
);
10111 struct rpccli_lsa_CREDRREAD_state
*state
= tevent_req_data(
10112 req
, struct rpccli_lsa_CREDRREAD_state
);
10114 TALLOC_CTX
*mem_ctx
;
10116 if (state
->out_mem_ctx
) {
10117 mem_ctx
= state
->out_mem_ctx
;
10122 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10123 TALLOC_FREE(subreq
);
10124 if (!NT_STATUS_IS_OK(status
)) {
10125 tevent_req_nterror(req
, status
);
10129 /* Copy out parameters */
10132 state
->orig
.out
.result
= state
->tmp
.out
.result
;
10134 /* Reset temporary structure */
10135 ZERO_STRUCT(state
->tmp
);
10137 if (DEBUGLEVEL
>= 10) {
10138 NDR_PRINT_OUT_DEBUG(lsa_CREDRREAD
, &state
->orig
);
10141 tevent_req_done(req
);
10144 NTSTATUS
rpccli_lsa_CREDRREAD_recv(struct tevent_req
*req
,
10145 TALLOC_CTX
*mem_ctx
,
10148 struct rpccli_lsa_CREDRREAD_state
*state
= tevent_req_data(
10149 req
, struct rpccli_lsa_CREDRREAD_state
);
10152 if (tevent_req_is_nterror(req
, &status
)) {
10153 tevent_req_received(req
);
10157 /* Steal possbile out parameters to the callers context */
10158 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10160 /* Return result */
10161 *result
= state
->orig
.out
.result
;
10163 tevent_req_received(req
);
10164 return NT_STATUS_OK
;
10167 NTSTATUS
rpccli_lsa_CREDRREAD(struct rpc_pipe_client
*cli
,
10168 TALLOC_CTX
*mem_ctx
)
10170 struct lsa_CREDRREAD r
;
10173 /* In parameters */
10175 if (DEBUGLEVEL
>= 10) {
10176 NDR_PRINT_IN_DEBUG(lsa_CREDRREAD
, &r
);
10179 status
= cli
->dispatch(cli
,
10185 if (!NT_STATUS_IS_OK(status
)) {
10189 if (DEBUGLEVEL
>= 10) {
10190 NDR_PRINT_OUT_DEBUG(lsa_CREDRREAD
, &r
);
10193 if (NT_STATUS_IS_ERR(status
)) {
10197 /* Return variables */
10199 /* Return result */
10200 return r
.out
.result
;
10203 struct rpccli_lsa_CREDRENUMERATE_state
{
10204 struct lsa_CREDRENUMERATE orig
;
10205 struct lsa_CREDRENUMERATE tmp
;
10206 TALLOC_CTX
*out_mem_ctx
;
10207 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10210 static void rpccli_lsa_CREDRENUMERATE_done(struct tevent_req
*subreq
);
10212 struct tevent_req
*rpccli_lsa_CREDRENUMERATE_send(TALLOC_CTX
*mem_ctx
,
10213 struct tevent_context
*ev
,
10214 struct rpc_pipe_client
*cli
)
10216 struct tevent_req
*req
;
10217 struct rpccli_lsa_CREDRENUMERATE_state
*state
;
10218 struct tevent_req
*subreq
;
10220 req
= tevent_req_create(mem_ctx
, &state
,
10221 struct rpccli_lsa_CREDRENUMERATE_state
);
10225 state
->out_mem_ctx
= NULL
;
10226 state
->dispatch_recv
= cli
->dispatch_recv
;
10228 /* In parameters */
10230 /* Out parameters */
10233 ZERO_STRUCT(state
->orig
.out
.result
);
10235 if (DEBUGLEVEL
>= 10) {
10236 NDR_PRINT_IN_DEBUG(lsa_CREDRENUMERATE
, &state
->orig
);
10239 /* make a temporary copy, that we pass to the dispatch function */
10240 state
->tmp
= state
->orig
;
10242 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10244 NDR_LSA_CREDRENUMERATE
,
10246 if (tevent_req_nomem(subreq
, req
)) {
10247 return tevent_req_post(req
, ev
);
10249 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRENUMERATE_done
, req
);
10253 static void rpccli_lsa_CREDRENUMERATE_done(struct tevent_req
*subreq
)
10255 struct tevent_req
*req
= tevent_req_callback_data(
10256 subreq
, struct tevent_req
);
10257 struct rpccli_lsa_CREDRENUMERATE_state
*state
= tevent_req_data(
10258 req
, struct rpccli_lsa_CREDRENUMERATE_state
);
10260 TALLOC_CTX
*mem_ctx
;
10262 if (state
->out_mem_ctx
) {
10263 mem_ctx
= state
->out_mem_ctx
;
10268 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10269 TALLOC_FREE(subreq
);
10270 if (!NT_STATUS_IS_OK(status
)) {
10271 tevent_req_nterror(req
, status
);
10275 /* Copy out parameters */
10278 state
->orig
.out
.result
= state
->tmp
.out
.result
;
10280 /* Reset temporary structure */
10281 ZERO_STRUCT(state
->tmp
);
10283 if (DEBUGLEVEL
>= 10) {
10284 NDR_PRINT_OUT_DEBUG(lsa_CREDRENUMERATE
, &state
->orig
);
10287 tevent_req_done(req
);
10290 NTSTATUS
rpccli_lsa_CREDRENUMERATE_recv(struct tevent_req
*req
,
10291 TALLOC_CTX
*mem_ctx
,
10294 struct rpccli_lsa_CREDRENUMERATE_state
*state
= tevent_req_data(
10295 req
, struct rpccli_lsa_CREDRENUMERATE_state
);
10298 if (tevent_req_is_nterror(req
, &status
)) {
10299 tevent_req_received(req
);
10303 /* Steal possbile out parameters to the callers context */
10304 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10306 /* Return result */
10307 *result
= state
->orig
.out
.result
;
10309 tevent_req_received(req
);
10310 return NT_STATUS_OK
;
10313 NTSTATUS
rpccli_lsa_CREDRENUMERATE(struct rpc_pipe_client
*cli
,
10314 TALLOC_CTX
*mem_ctx
)
10316 struct lsa_CREDRENUMERATE r
;
10319 /* In parameters */
10321 if (DEBUGLEVEL
>= 10) {
10322 NDR_PRINT_IN_DEBUG(lsa_CREDRENUMERATE
, &r
);
10325 status
= cli
->dispatch(cli
,
10328 NDR_LSA_CREDRENUMERATE
,
10331 if (!NT_STATUS_IS_OK(status
)) {
10335 if (DEBUGLEVEL
>= 10) {
10336 NDR_PRINT_OUT_DEBUG(lsa_CREDRENUMERATE
, &r
);
10339 if (NT_STATUS_IS_ERR(status
)) {
10343 /* Return variables */
10345 /* Return result */
10346 return r
.out
.result
;
10349 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state
{
10350 struct lsa_CREDRWRITEDOMAINCREDENTIALS orig
;
10351 struct lsa_CREDRWRITEDOMAINCREDENTIALS tmp
;
10352 TALLOC_CTX
*out_mem_ctx
;
10353 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10356 static void rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_done(struct tevent_req
*subreq
);
10358 struct tevent_req
*rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_send(TALLOC_CTX
*mem_ctx
,
10359 struct tevent_context
*ev
,
10360 struct rpc_pipe_client
*cli
)
10362 struct tevent_req
*req
;
10363 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state
*state
;
10364 struct tevent_req
*subreq
;
10366 req
= tevent_req_create(mem_ctx
, &state
,
10367 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state
);
10371 state
->out_mem_ctx
= NULL
;
10372 state
->dispatch_recv
= cli
->dispatch_recv
;
10374 /* In parameters */
10376 /* Out parameters */
10379 ZERO_STRUCT(state
->orig
.out
.result
);
10381 if (DEBUGLEVEL
>= 10) {
10382 NDR_PRINT_IN_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS
, &state
->orig
);
10385 /* make a temporary copy, that we pass to the dispatch function */
10386 state
->tmp
= state
->orig
;
10388 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10390 NDR_LSA_CREDRWRITEDOMAINCREDENTIALS
,
10392 if (tevent_req_nomem(subreq
, req
)) {
10393 return tevent_req_post(req
, ev
);
10395 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_done
, req
);
10399 static void rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_done(struct tevent_req
*subreq
)
10401 struct tevent_req
*req
= tevent_req_callback_data(
10402 subreq
, struct tevent_req
);
10403 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state
*state
= tevent_req_data(
10404 req
, struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state
);
10406 TALLOC_CTX
*mem_ctx
;
10408 if (state
->out_mem_ctx
) {
10409 mem_ctx
= state
->out_mem_ctx
;
10414 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10415 TALLOC_FREE(subreq
);
10416 if (!NT_STATUS_IS_OK(status
)) {
10417 tevent_req_nterror(req
, status
);
10421 /* Copy out parameters */
10424 state
->orig
.out
.result
= state
->tmp
.out
.result
;
10426 /* Reset temporary structure */
10427 ZERO_STRUCT(state
->tmp
);
10429 if (DEBUGLEVEL
>= 10) {
10430 NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS
, &state
->orig
);
10433 tevent_req_done(req
);
10436 NTSTATUS
rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_recv(struct tevent_req
*req
,
10437 TALLOC_CTX
*mem_ctx
,
10440 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state
*state
= tevent_req_data(
10441 req
, struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state
);
10444 if (tevent_req_is_nterror(req
, &status
)) {
10445 tevent_req_received(req
);
10449 /* Steal possbile out parameters to the callers context */
10450 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10452 /* Return result */
10453 *result
= state
->orig
.out
.result
;
10455 tevent_req_received(req
);
10456 return NT_STATUS_OK
;
10459 NTSTATUS
rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS(struct rpc_pipe_client
*cli
,
10460 TALLOC_CTX
*mem_ctx
)
10462 struct lsa_CREDRWRITEDOMAINCREDENTIALS r
;
10465 /* In parameters */
10467 if (DEBUGLEVEL
>= 10) {
10468 NDR_PRINT_IN_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS
, &r
);
10471 status
= cli
->dispatch(cli
,
10474 NDR_LSA_CREDRWRITEDOMAINCREDENTIALS
,
10477 if (!NT_STATUS_IS_OK(status
)) {
10481 if (DEBUGLEVEL
>= 10) {
10482 NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS
, &r
);
10485 if (NT_STATUS_IS_ERR(status
)) {
10489 /* Return variables */
10491 /* Return result */
10492 return r
.out
.result
;
10495 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state
{
10496 struct lsa_CREDRREADDOMAINCREDENTIALS orig
;
10497 struct lsa_CREDRREADDOMAINCREDENTIALS tmp
;
10498 TALLOC_CTX
*out_mem_ctx
;
10499 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10502 static void rpccli_lsa_CREDRREADDOMAINCREDENTIALS_done(struct tevent_req
*subreq
);
10504 struct tevent_req
*rpccli_lsa_CREDRREADDOMAINCREDENTIALS_send(TALLOC_CTX
*mem_ctx
,
10505 struct tevent_context
*ev
,
10506 struct rpc_pipe_client
*cli
)
10508 struct tevent_req
*req
;
10509 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state
*state
;
10510 struct tevent_req
*subreq
;
10512 req
= tevent_req_create(mem_ctx
, &state
,
10513 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state
);
10517 state
->out_mem_ctx
= NULL
;
10518 state
->dispatch_recv
= cli
->dispatch_recv
;
10520 /* In parameters */
10522 /* Out parameters */
10525 ZERO_STRUCT(state
->orig
.out
.result
);
10527 if (DEBUGLEVEL
>= 10) {
10528 NDR_PRINT_IN_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS
, &state
->orig
);
10531 /* make a temporary copy, that we pass to the dispatch function */
10532 state
->tmp
= state
->orig
;
10534 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10536 NDR_LSA_CREDRREADDOMAINCREDENTIALS
,
10538 if (tevent_req_nomem(subreq
, req
)) {
10539 return tevent_req_post(req
, ev
);
10541 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRREADDOMAINCREDENTIALS_done
, req
);
10545 static void rpccli_lsa_CREDRREADDOMAINCREDENTIALS_done(struct tevent_req
*subreq
)
10547 struct tevent_req
*req
= tevent_req_callback_data(
10548 subreq
, struct tevent_req
);
10549 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state
*state
= tevent_req_data(
10550 req
, struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state
);
10552 TALLOC_CTX
*mem_ctx
;
10554 if (state
->out_mem_ctx
) {
10555 mem_ctx
= state
->out_mem_ctx
;
10560 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10561 TALLOC_FREE(subreq
);
10562 if (!NT_STATUS_IS_OK(status
)) {
10563 tevent_req_nterror(req
, status
);
10567 /* Copy out parameters */
10570 state
->orig
.out
.result
= state
->tmp
.out
.result
;
10572 /* Reset temporary structure */
10573 ZERO_STRUCT(state
->tmp
);
10575 if (DEBUGLEVEL
>= 10) {
10576 NDR_PRINT_OUT_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS
, &state
->orig
);
10579 tevent_req_done(req
);
10582 NTSTATUS
rpccli_lsa_CREDRREADDOMAINCREDENTIALS_recv(struct tevent_req
*req
,
10583 TALLOC_CTX
*mem_ctx
,
10586 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state
*state
= tevent_req_data(
10587 req
, struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state
);
10590 if (tevent_req_is_nterror(req
, &status
)) {
10591 tevent_req_received(req
);
10595 /* Steal possbile out parameters to the callers context */
10596 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10598 /* Return result */
10599 *result
= state
->orig
.out
.result
;
10601 tevent_req_received(req
);
10602 return NT_STATUS_OK
;
10605 NTSTATUS
rpccli_lsa_CREDRREADDOMAINCREDENTIALS(struct rpc_pipe_client
*cli
,
10606 TALLOC_CTX
*mem_ctx
)
10608 struct lsa_CREDRREADDOMAINCREDENTIALS r
;
10611 /* In parameters */
10613 if (DEBUGLEVEL
>= 10) {
10614 NDR_PRINT_IN_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS
, &r
);
10617 status
= cli
->dispatch(cli
,
10620 NDR_LSA_CREDRREADDOMAINCREDENTIALS
,
10623 if (!NT_STATUS_IS_OK(status
)) {
10627 if (DEBUGLEVEL
>= 10) {
10628 NDR_PRINT_OUT_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS
, &r
);
10631 if (NT_STATUS_IS_ERR(status
)) {
10635 /* Return variables */
10637 /* Return result */
10638 return r
.out
.result
;
10641 struct rpccli_lsa_CREDRDELETE_state
{
10642 struct lsa_CREDRDELETE orig
;
10643 struct lsa_CREDRDELETE tmp
;
10644 TALLOC_CTX
*out_mem_ctx
;
10645 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10648 static void rpccli_lsa_CREDRDELETE_done(struct tevent_req
*subreq
);
10650 struct tevent_req
*rpccli_lsa_CREDRDELETE_send(TALLOC_CTX
*mem_ctx
,
10651 struct tevent_context
*ev
,
10652 struct rpc_pipe_client
*cli
)
10654 struct tevent_req
*req
;
10655 struct rpccli_lsa_CREDRDELETE_state
*state
;
10656 struct tevent_req
*subreq
;
10658 req
= tevent_req_create(mem_ctx
, &state
,
10659 struct rpccli_lsa_CREDRDELETE_state
);
10663 state
->out_mem_ctx
= NULL
;
10664 state
->dispatch_recv
= cli
->dispatch_recv
;
10666 /* In parameters */
10668 /* Out parameters */
10671 ZERO_STRUCT(state
->orig
.out
.result
);
10673 if (DEBUGLEVEL
>= 10) {
10674 NDR_PRINT_IN_DEBUG(lsa_CREDRDELETE
, &state
->orig
);
10677 /* make a temporary copy, that we pass to the dispatch function */
10678 state
->tmp
= state
->orig
;
10680 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10682 NDR_LSA_CREDRDELETE
,
10684 if (tevent_req_nomem(subreq
, req
)) {
10685 return tevent_req_post(req
, ev
);
10687 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRDELETE_done
, req
);
10691 static void rpccli_lsa_CREDRDELETE_done(struct tevent_req
*subreq
)
10693 struct tevent_req
*req
= tevent_req_callback_data(
10694 subreq
, struct tevent_req
);
10695 struct rpccli_lsa_CREDRDELETE_state
*state
= tevent_req_data(
10696 req
, struct rpccli_lsa_CREDRDELETE_state
);
10698 TALLOC_CTX
*mem_ctx
;
10700 if (state
->out_mem_ctx
) {
10701 mem_ctx
= state
->out_mem_ctx
;
10706 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10707 TALLOC_FREE(subreq
);
10708 if (!NT_STATUS_IS_OK(status
)) {
10709 tevent_req_nterror(req
, status
);
10713 /* Copy out parameters */
10716 state
->orig
.out
.result
= state
->tmp
.out
.result
;
10718 /* Reset temporary structure */
10719 ZERO_STRUCT(state
->tmp
);
10721 if (DEBUGLEVEL
>= 10) {
10722 NDR_PRINT_OUT_DEBUG(lsa_CREDRDELETE
, &state
->orig
);
10725 tevent_req_done(req
);
10728 NTSTATUS
rpccli_lsa_CREDRDELETE_recv(struct tevent_req
*req
,
10729 TALLOC_CTX
*mem_ctx
,
10732 struct rpccli_lsa_CREDRDELETE_state
*state
= tevent_req_data(
10733 req
, struct rpccli_lsa_CREDRDELETE_state
);
10736 if (tevent_req_is_nterror(req
, &status
)) {
10737 tevent_req_received(req
);
10741 /* Steal possbile out parameters to the callers context */
10742 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10744 /* Return result */
10745 *result
= state
->orig
.out
.result
;
10747 tevent_req_received(req
);
10748 return NT_STATUS_OK
;
10751 NTSTATUS
rpccli_lsa_CREDRDELETE(struct rpc_pipe_client
*cli
,
10752 TALLOC_CTX
*mem_ctx
)
10754 struct lsa_CREDRDELETE r
;
10757 /* In parameters */
10759 if (DEBUGLEVEL
>= 10) {
10760 NDR_PRINT_IN_DEBUG(lsa_CREDRDELETE
, &r
);
10763 status
= cli
->dispatch(cli
,
10766 NDR_LSA_CREDRDELETE
,
10769 if (!NT_STATUS_IS_OK(status
)) {
10773 if (DEBUGLEVEL
>= 10) {
10774 NDR_PRINT_OUT_DEBUG(lsa_CREDRDELETE
, &r
);
10777 if (NT_STATUS_IS_ERR(status
)) {
10781 /* Return variables */
10783 /* Return result */
10784 return r
.out
.result
;
10787 struct rpccli_lsa_CREDRGETTARGETINFO_state
{
10788 struct lsa_CREDRGETTARGETINFO orig
;
10789 struct lsa_CREDRGETTARGETINFO tmp
;
10790 TALLOC_CTX
*out_mem_ctx
;
10791 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10794 static void rpccli_lsa_CREDRGETTARGETINFO_done(struct tevent_req
*subreq
);
10796 struct tevent_req
*rpccli_lsa_CREDRGETTARGETINFO_send(TALLOC_CTX
*mem_ctx
,
10797 struct tevent_context
*ev
,
10798 struct rpc_pipe_client
*cli
)
10800 struct tevent_req
*req
;
10801 struct rpccli_lsa_CREDRGETTARGETINFO_state
*state
;
10802 struct tevent_req
*subreq
;
10804 req
= tevent_req_create(mem_ctx
, &state
,
10805 struct rpccli_lsa_CREDRGETTARGETINFO_state
);
10809 state
->out_mem_ctx
= NULL
;
10810 state
->dispatch_recv
= cli
->dispatch_recv
;
10812 /* In parameters */
10814 /* Out parameters */
10817 ZERO_STRUCT(state
->orig
.out
.result
);
10819 if (DEBUGLEVEL
>= 10) {
10820 NDR_PRINT_IN_DEBUG(lsa_CREDRGETTARGETINFO
, &state
->orig
);
10823 /* make a temporary copy, that we pass to the dispatch function */
10824 state
->tmp
= state
->orig
;
10826 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10828 NDR_LSA_CREDRGETTARGETINFO
,
10830 if (tevent_req_nomem(subreq
, req
)) {
10831 return tevent_req_post(req
, ev
);
10833 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRGETTARGETINFO_done
, req
);
10837 static void rpccli_lsa_CREDRGETTARGETINFO_done(struct tevent_req
*subreq
)
10839 struct tevent_req
*req
= tevent_req_callback_data(
10840 subreq
, struct tevent_req
);
10841 struct rpccli_lsa_CREDRGETTARGETINFO_state
*state
= tevent_req_data(
10842 req
, struct rpccli_lsa_CREDRGETTARGETINFO_state
);
10844 TALLOC_CTX
*mem_ctx
;
10846 if (state
->out_mem_ctx
) {
10847 mem_ctx
= state
->out_mem_ctx
;
10852 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10853 TALLOC_FREE(subreq
);
10854 if (!NT_STATUS_IS_OK(status
)) {
10855 tevent_req_nterror(req
, status
);
10859 /* Copy out parameters */
10862 state
->orig
.out
.result
= state
->tmp
.out
.result
;
10864 /* Reset temporary structure */
10865 ZERO_STRUCT(state
->tmp
);
10867 if (DEBUGLEVEL
>= 10) {
10868 NDR_PRINT_OUT_DEBUG(lsa_CREDRGETTARGETINFO
, &state
->orig
);
10871 tevent_req_done(req
);
10874 NTSTATUS
rpccli_lsa_CREDRGETTARGETINFO_recv(struct tevent_req
*req
,
10875 TALLOC_CTX
*mem_ctx
,
10878 struct rpccli_lsa_CREDRGETTARGETINFO_state
*state
= tevent_req_data(
10879 req
, struct rpccli_lsa_CREDRGETTARGETINFO_state
);
10882 if (tevent_req_is_nterror(req
, &status
)) {
10883 tevent_req_received(req
);
10887 /* Steal possbile out parameters to the callers context */
10888 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10890 /* Return result */
10891 *result
= state
->orig
.out
.result
;
10893 tevent_req_received(req
);
10894 return NT_STATUS_OK
;
10897 NTSTATUS
rpccli_lsa_CREDRGETTARGETINFO(struct rpc_pipe_client
*cli
,
10898 TALLOC_CTX
*mem_ctx
)
10900 struct lsa_CREDRGETTARGETINFO r
;
10903 /* In parameters */
10905 if (DEBUGLEVEL
>= 10) {
10906 NDR_PRINT_IN_DEBUG(lsa_CREDRGETTARGETINFO
, &r
);
10909 status
= cli
->dispatch(cli
,
10912 NDR_LSA_CREDRGETTARGETINFO
,
10915 if (!NT_STATUS_IS_OK(status
)) {
10919 if (DEBUGLEVEL
>= 10) {
10920 NDR_PRINT_OUT_DEBUG(lsa_CREDRGETTARGETINFO
, &r
);
10923 if (NT_STATUS_IS_ERR(status
)) {
10927 /* Return variables */
10929 /* Return result */
10930 return r
.out
.result
;
10933 struct rpccli_lsa_CREDRPROFILELOADED_state
{
10934 struct lsa_CREDRPROFILELOADED orig
;
10935 struct lsa_CREDRPROFILELOADED tmp
;
10936 TALLOC_CTX
*out_mem_ctx
;
10937 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10940 static void rpccli_lsa_CREDRPROFILELOADED_done(struct tevent_req
*subreq
);
10942 struct tevent_req
*rpccli_lsa_CREDRPROFILELOADED_send(TALLOC_CTX
*mem_ctx
,
10943 struct tevent_context
*ev
,
10944 struct rpc_pipe_client
*cli
)
10946 struct tevent_req
*req
;
10947 struct rpccli_lsa_CREDRPROFILELOADED_state
*state
;
10948 struct tevent_req
*subreq
;
10950 req
= tevent_req_create(mem_ctx
, &state
,
10951 struct rpccli_lsa_CREDRPROFILELOADED_state
);
10955 state
->out_mem_ctx
= NULL
;
10956 state
->dispatch_recv
= cli
->dispatch_recv
;
10958 /* In parameters */
10960 /* Out parameters */
10963 ZERO_STRUCT(state
->orig
.out
.result
);
10965 if (DEBUGLEVEL
>= 10) {
10966 NDR_PRINT_IN_DEBUG(lsa_CREDRPROFILELOADED
, &state
->orig
);
10969 /* make a temporary copy, that we pass to the dispatch function */
10970 state
->tmp
= state
->orig
;
10972 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10974 NDR_LSA_CREDRPROFILELOADED
,
10976 if (tevent_req_nomem(subreq
, req
)) {
10977 return tevent_req_post(req
, ev
);
10979 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRPROFILELOADED_done
, req
);
10983 static void rpccli_lsa_CREDRPROFILELOADED_done(struct tevent_req
*subreq
)
10985 struct tevent_req
*req
= tevent_req_callback_data(
10986 subreq
, struct tevent_req
);
10987 struct rpccli_lsa_CREDRPROFILELOADED_state
*state
= tevent_req_data(
10988 req
, struct rpccli_lsa_CREDRPROFILELOADED_state
);
10990 TALLOC_CTX
*mem_ctx
;
10992 if (state
->out_mem_ctx
) {
10993 mem_ctx
= state
->out_mem_ctx
;
10998 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10999 TALLOC_FREE(subreq
);
11000 if (!NT_STATUS_IS_OK(status
)) {
11001 tevent_req_nterror(req
, status
);
11005 /* Copy out parameters */
11008 state
->orig
.out
.result
= state
->tmp
.out
.result
;
11010 /* Reset temporary structure */
11011 ZERO_STRUCT(state
->tmp
);
11013 if (DEBUGLEVEL
>= 10) {
11014 NDR_PRINT_OUT_DEBUG(lsa_CREDRPROFILELOADED
, &state
->orig
);
11017 tevent_req_done(req
);
11020 NTSTATUS
rpccli_lsa_CREDRPROFILELOADED_recv(struct tevent_req
*req
,
11021 TALLOC_CTX
*mem_ctx
,
11024 struct rpccli_lsa_CREDRPROFILELOADED_state
*state
= tevent_req_data(
11025 req
, struct rpccli_lsa_CREDRPROFILELOADED_state
);
11028 if (tevent_req_is_nterror(req
, &status
)) {
11029 tevent_req_received(req
);
11033 /* Steal possbile out parameters to the callers context */
11034 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
11036 /* Return result */
11037 *result
= state
->orig
.out
.result
;
11039 tevent_req_received(req
);
11040 return NT_STATUS_OK
;
11043 NTSTATUS
rpccli_lsa_CREDRPROFILELOADED(struct rpc_pipe_client
*cli
,
11044 TALLOC_CTX
*mem_ctx
)
11046 struct lsa_CREDRPROFILELOADED r
;
11049 /* In parameters */
11051 if (DEBUGLEVEL
>= 10) {
11052 NDR_PRINT_IN_DEBUG(lsa_CREDRPROFILELOADED
, &r
);
11055 status
= cli
->dispatch(cli
,
11058 NDR_LSA_CREDRPROFILELOADED
,
11061 if (!NT_STATUS_IS_OK(status
)) {
11065 if (DEBUGLEVEL
>= 10) {
11066 NDR_PRINT_OUT_DEBUG(lsa_CREDRPROFILELOADED
, &r
);
11069 if (NT_STATUS_IS_ERR(status
)) {
11073 /* Return variables */
11075 /* Return result */
11076 return r
.out
.result
;
11079 struct rpccli_lsa_LookupNames3_state
{
11080 struct lsa_LookupNames3 orig
;
11081 struct lsa_LookupNames3 tmp
;
11082 TALLOC_CTX
*out_mem_ctx
;
11083 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
11086 static void rpccli_lsa_LookupNames3_done(struct tevent_req
*subreq
);
11088 struct tevent_req
*rpccli_lsa_LookupNames3_send(TALLOC_CTX
*mem_ctx
,
11089 struct tevent_context
*ev
,
11090 struct rpc_pipe_client
*cli
,
11091 struct policy_handle
*_handle
/* [in] [ref] */,
11092 uint32_t _num_names
/* [in] [range(0,1000)] */,
11093 struct lsa_String
*_names
/* [in] [size_is(num_names)] */,
11094 struct lsa_RefDomainList
**_domains
/* [out] [ref] */,
11095 struct lsa_TransSidArray3
*_sids
/* [in,out] [ref] */,
11096 enum lsa_LookupNamesLevel _level
/* [in] */,
11097 uint32_t *_count
/* [in,out] [ref] */,
11098 uint32_t _lookup_options
/* [in] */,
11099 uint32_t _client_revision
/* [in] */)
11101 struct tevent_req
*req
;
11102 struct rpccli_lsa_LookupNames3_state
*state
;
11103 struct tevent_req
*subreq
;
11105 req
= tevent_req_create(mem_ctx
, &state
,
11106 struct rpccli_lsa_LookupNames3_state
);
11110 state
->out_mem_ctx
= NULL
;
11111 state
->dispatch_recv
= cli
->dispatch_recv
;
11113 /* In parameters */
11114 state
->orig
.in
.handle
= _handle
;
11115 state
->orig
.in
.num_names
= _num_names
;
11116 state
->orig
.in
.names
= _names
;
11117 state
->orig
.in
.sids
= _sids
;
11118 state
->orig
.in
.level
= _level
;
11119 state
->orig
.in
.count
= _count
;
11120 state
->orig
.in
.lookup_options
= _lookup_options
;
11121 state
->orig
.in
.client_revision
= _client_revision
;
11123 /* Out parameters */
11124 state
->orig
.out
.domains
= _domains
;
11125 state
->orig
.out
.sids
= _sids
;
11126 state
->orig
.out
.count
= _count
;
11129 ZERO_STRUCT(state
->orig
.out
.result
);
11131 if (DEBUGLEVEL
>= 10) {
11132 NDR_PRINT_IN_DEBUG(lsa_LookupNames3
, &state
->orig
);
11135 state
->out_mem_ctx
= talloc_named_const(state
, 0,
11136 "rpccli_lsa_LookupNames3_out_memory");
11137 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
11138 return tevent_req_post(req
, ev
);
11141 /* make a temporary copy, that we pass to the dispatch function */
11142 state
->tmp
= state
->orig
;
11144 subreq
= cli
->dispatch_send(state
, ev
, cli
,
11146 NDR_LSA_LOOKUPNAMES3
,
11148 if (tevent_req_nomem(subreq
, req
)) {
11149 return tevent_req_post(req
, ev
);
11151 tevent_req_set_callback(subreq
, rpccli_lsa_LookupNames3_done
, req
);
11155 static void rpccli_lsa_LookupNames3_done(struct tevent_req
*subreq
)
11157 struct tevent_req
*req
= tevent_req_callback_data(
11158 subreq
, struct tevent_req
);
11159 struct rpccli_lsa_LookupNames3_state
*state
= tevent_req_data(
11160 req
, struct rpccli_lsa_LookupNames3_state
);
11162 TALLOC_CTX
*mem_ctx
;
11164 if (state
->out_mem_ctx
) {
11165 mem_ctx
= state
->out_mem_ctx
;
11170 status
= state
->dispatch_recv(subreq
, mem_ctx
);
11171 TALLOC_FREE(subreq
);
11172 if (!NT_STATUS_IS_OK(status
)) {
11173 tevent_req_nterror(req
, status
);
11177 /* Copy out parameters */
11178 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
11179 *state
->orig
.out
.sids
= *state
->tmp
.out
.sids
;
11180 *state
->orig
.out
.count
= *state
->tmp
.out
.count
;
11183 state
->orig
.out
.result
= state
->tmp
.out
.result
;
11185 /* Reset temporary structure */
11186 ZERO_STRUCT(state
->tmp
);
11188 if (DEBUGLEVEL
>= 10) {
11189 NDR_PRINT_OUT_DEBUG(lsa_LookupNames3
, &state
->orig
);
11192 tevent_req_done(req
);
11195 NTSTATUS
rpccli_lsa_LookupNames3_recv(struct tevent_req
*req
,
11196 TALLOC_CTX
*mem_ctx
,
11199 struct rpccli_lsa_LookupNames3_state
*state
= tevent_req_data(
11200 req
, struct rpccli_lsa_LookupNames3_state
);
11203 if (tevent_req_is_nterror(req
, &status
)) {
11204 tevent_req_received(req
);
11208 /* Steal possbile out parameters to the callers context */
11209 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
11211 /* Return result */
11212 *result
= state
->orig
.out
.result
;
11214 tevent_req_received(req
);
11215 return NT_STATUS_OK
;
11218 NTSTATUS
rpccli_lsa_LookupNames3(struct rpc_pipe_client
*cli
,
11219 TALLOC_CTX
*mem_ctx
,
11220 struct policy_handle
*handle
/* [in] [ref] */,
11221 uint32_t num_names
/* [in] [range(0,1000)] */,
11222 struct lsa_String
*names
/* [in] [size_is(num_names)] */,
11223 struct lsa_RefDomainList
**domains
/* [out] [ref] */,
11224 struct lsa_TransSidArray3
*sids
/* [in,out] [ref] */,
11225 enum lsa_LookupNamesLevel level
/* [in] */,
11226 uint32_t *count
/* [in,out] [ref] */,
11227 uint32_t lookup_options
/* [in] */,
11228 uint32_t client_revision
/* [in] */)
11230 struct lsa_LookupNames3 r
;
11233 /* In parameters */
11234 r
.in
.handle
= handle
;
11235 r
.in
.num_names
= num_names
;
11236 r
.in
.names
= names
;
11238 r
.in
.level
= level
;
11239 r
.in
.count
= count
;
11240 r
.in
.lookup_options
= lookup_options
;
11241 r
.in
.client_revision
= client_revision
;
11243 if (DEBUGLEVEL
>= 10) {
11244 NDR_PRINT_IN_DEBUG(lsa_LookupNames3
, &r
);
11247 status
= cli
->dispatch(cli
,
11250 NDR_LSA_LOOKUPNAMES3
,
11253 if (!NT_STATUS_IS_OK(status
)) {
11257 if (DEBUGLEVEL
>= 10) {
11258 NDR_PRINT_OUT_DEBUG(lsa_LookupNames3
, &r
);
11261 if (NT_STATUS_IS_ERR(status
)) {
11265 /* Return variables */
11266 *domains
= *r
.out
.domains
;
11267 *sids
= *r
.out
.sids
;
11268 *count
= *r
.out
.count
;
11270 /* Return result */
11271 return r
.out
.result
;
11274 struct rpccli_lsa_CREDRGETSESSIONTYPES_state
{
11275 struct lsa_CREDRGETSESSIONTYPES orig
;
11276 struct lsa_CREDRGETSESSIONTYPES tmp
;
11277 TALLOC_CTX
*out_mem_ctx
;
11278 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
11281 static void rpccli_lsa_CREDRGETSESSIONTYPES_done(struct tevent_req
*subreq
);
11283 struct tevent_req
*rpccli_lsa_CREDRGETSESSIONTYPES_send(TALLOC_CTX
*mem_ctx
,
11284 struct tevent_context
*ev
,
11285 struct rpc_pipe_client
*cli
)
11287 struct tevent_req
*req
;
11288 struct rpccli_lsa_CREDRGETSESSIONTYPES_state
*state
;
11289 struct tevent_req
*subreq
;
11291 req
= tevent_req_create(mem_ctx
, &state
,
11292 struct rpccli_lsa_CREDRGETSESSIONTYPES_state
);
11296 state
->out_mem_ctx
= NULL
;
11297 state
->dispatch_recv
= cli
->dispatch_recv
;
11299 /* In parameters */
11301 /* Out parameters */
11304 ZERO_STRUCT(state
->orig
.out
.result
);
11306 if (DEBUGLEVEL
>= 10) {
11307 NDR_PRINT_IN_DEBUG(lsa_CREDRGETSESSIONTYPES
, &state
->orig
);
11310 /* make a temporary copy, that we pass to the dispatch function */
11311 state
->tmp
= state
->orig
;
11313 subreq
= cli
->dispatch_send(state
, ev
, cli
,
11315 NDR_LSA_CREDRGETSESSIONTYPES
,
11317 if (tevent_req_nomem(subreq
, req
)) {
11318 return tevent_req_post(req
, ev
);
11320 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRGETSESSIONTYPES_done
, req
);
11324 static void rpccli_lsa_CREDRGETSESSIONTYPES_done(struct tevent_req
*subreq
)
11326 struct tevent_req
*req
= tevent_req_callback_data(
11327 subreq
, struct tevent_req
);
11328 struct rpccli_lsa_CREDRGETSESSIONTYPES_state
*state
= tevent_req_data(
11329 req
, struct rpccli_lsa_CREDRGETSESSIONTYPES_state
);
11331 TALLOC_CTX
*mem_ctx
;
11333 if (state
->out_mem_ctx
) {
11334 mem_ctx
= state
->out_mem_ctx
;
11339 status
= state
->dispatch_recv(subreq
, mem_ctx
);
11340 TALLOC_FREE(subreq
);
11341 if (!NT_STATUS_IS_OK(status
)) {
11342 tevent_req_nterror(req
, status
);
11346 /* Copy out parameters */
11349 state
->orig
.out
.result
= state
->tmp
.out
.result
;
11351 /* Reset temporary structure */
11352 ZERO_STRUCT(state
->tmp
);
11354 if (DEBUGLEVEL
>= 10) {
11355 NDR_PRINT_OUT_DEBUG(lsa_CREDRGETSESSIONTYPES
, &state
->orig
);
11358 tevent_req_done(req
);
11361 NTSTATUS
rpccli_lsa_CREDRGETSESSIONTYPES_recv(struct tevent_req
*req
,
11362 TALLOC_CTX
*mem_ctx
,
11365 struct rpccli_lsa_CREDRGETSESSIONTYPES_state
*state
= tevent_req_data(
11366 req
, struct rpccli_lsa_CREDRGETSESSIONTYPES_state
);
11369 if (tevent_req_is_nterror(req
, &status
)) {
11370 tevent_req_received(req
);
11374 /* Steal possbile out parameters to the callers context */
11375 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
11377 /* Return result */
11378 *result
= state
->orig
.out
.result
;
11380 tevent_req_received(req
);
11381 return NT_STATUS_OK
;
11384 NTSTATUS
rpccli_lsa_CREDRGETSESSIONTYPES(struct rpc_pipe_client
*cli
,
11385 TALLOC_CTX
*mem_ctx
)
11387 struct lsa_CREDRGETSESSIONTYPES r
;
11390 /* In parameters */
11392 if (DEBUGLEVEL
>= 10) {
11393 NDR_PRINT_IN_DEBUG(lsa_CREDRGETSESSIONTYPES
, &r
);
11396 status
= cli
->dispatch(cli
,
11399 NDR_LSA_CREDRGETSESSIONTYPES
,
11402 if (!NT_STATUS_IS_OK(status
)) {
11406 if (DEBUGLEVEL
>= 10) {
11407 NDR_PRINT_OUT_DEBUG(lsa_CREDRGETSESSIONTYPES
, &r
);
11410 if (NT_STATUS_IS_ERR(status
)) {
11414 /* Return variables */
11416 /* Return result */
11417 return r
.out
.result
;
11420 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state
{
11421 struct lsa_LSARREGISTERAUDITEVENT orig
;
11422 struct lsa_LSARREGISTERAUDITEVENT tmp
;
11423 TALLOC_CTX
*out_mem_ctx
;
11424 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
11427 static void rpccli_lsa_LSARREGISTERAUDITEVENT_done(struct tevent_req
*subreq
);
11429 struct tevent_req
*rpccli_lsa_LSARREGISTERAUDITEVENT_send(TALLOC_CTX
*mem_ctx
,
11430 struct tevent_context
*ev
,
11431 struct rpc_pipe_client
*cli
)
11433 struct tevent_req
*req
;
11434 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state
*state
;
11435 struct tevent_req
*subreq
;
11437 req
= tevent_req_create(mem_ctx
, &state
,
11438 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state
);
11442 state
->out_mem_ctx
= NULL
;
11443 state
->dispatch_recv
= cli
->dispatch_recv
;
11445 /* In parameters */
11447 /* Out parameters */
11450 ZERO_STRUCT(state
->orig
.out
.result
);
11452 if (DEBUGLEVEL
>= 10) {
11453 NDR_PRINT_IN_DEBUG(lsa_LSARREGISTERAUDITEVENT
, &state
->orig
);
11456 /* make a temporary copy, that we pass to the dispatch function */
11457 state
->tmp
= state
->orig
;
11459 subreq
= cli
->dispatch_send(state
, ev
, cli
,
11461 NDR_LSA_LSARREGISTERAUDITEVENT
,
11463 if (tevent_req_nomem(subreq
, req
)) {
11464 return tevent_req_post(req
, ev
);
11466 tevent_req_set_callback(subreq
, rpccli_lsa_LSARREGISTERAUDITEVENT_done
, req
);
11470 static void rpccli_lsa_LSARREGISTERAUDITEVENT_done(struct tevent_req
*subreq
)
11472 struct tevent_req
*req
= tevent_req_callback_data(
11473 subreq
, struct tevent_req
);
11474 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state
*state
= tevent_req_data(
11475 req
, struct rpccli_lsa_LSARREGISTERAUDITEVENT_state
);
11477 TALLOC_CTX
*mem_ctx
;
11479 if (state
->out_mem_ctx
) {
11480 mem_ctx
= state
->out_mem_ctx
;
11485 status
= state
->dispatch_recv(subreq
, mem_ctx
);
11486 TALLOC_FREE(subreq
);
11487 if (!NT_STATUS_IS_OK(status
)) {
11488 tevent_req_nterror(req
, status
);
11492 /* Copy out parameters */
11495 state
->orig
.out
.result
= state
->tmp
.out
.result
;
11497 /* Reset temporary structure */
11498 ZERO_STRUCT(state
->tmp
);
11500 if (DEBUGLEVEL
>= 10) {
11501 NDR_PRINT_OUT_DEBUG(lsa_LSARREGISTERAUDITEVENT
, &state
->orig
);
11504 tevent_req_done(req
);
11507 NTSTATUS
rpccli_lsa_LSARREGISTERAUDITEVENT_recv(struct tevent_req
*req
,
11508 TALLOC_CTX
*mem_ctx
,
11511 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state
*state
= tevent_req_data(
11512 req
, struct rpccli_lsa_LSARREGISTERAUDITEVENT_state
);
11515 if (tevent_req_is_nterror(req
, &status
)) {
11516 tevent_req_received(req
);
11520 /* Steal possbile out parameters to the callers context */
11521 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
11523 /* Return result */
11524 *result
= state
->orig
.out
.result
;
11526 tevent_req_received(req
);
11527 return NT_STATUS_OK
;
11530 NTSTATUS
rpccli_lsa_LSARREGISTERAUDITEVENT(struct rpc_pipe_client
*cli
,
11531 TALLOC_CTX
*mem_ctx
)
11533 struct lsa_LSARREGISTERAUDITEVENT r
;
11536 /* In parameters */
11538 if (DEBUGLEVEL
>= 10) {
11539 NDR_PRINT_IN_DEBUG(lsa_LSARREGISTERAUDITEVENT
, &r
);
11542 status
= cli
->dispatch(cli
,
11545 NDR_LSA_LSARREGISTERAUDITEVENT
,
11548 if (!NT_STATUS_IS_OK(status
)) {
11552 if (DEBUGLEVEL
>= 10) {
11553 NDR_PRINT_OUT_DEBUG(lsa_LSARREGISTERAUDITEVENT
, &r
);
11556 if (NT_STATUS_IS_ERR(status
)) {
11560 /* Return variables */
11562 /* Return result */
11563 return r
.out
.result
;
11566 struct rpccli_lsa_LSARGENAUDITEVENT_state
{
11567 struct lsa_LSARGENAUDITEVENT orig
;
11568 struct lsa_LSARGENAUDITEVENT tmp
;
11569 TALLOC_CTX
*out_mem_ctx
;
11570 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
11573 static void rpccli_lsa_LSARGENAUDITEVENT_done(struct tevent_req
*subreq
);
11575 struct tevent_req
*rpccli_lsa_LSARGENAUDITEVENT_send(TALLOC_CTX
*mem_ctx
,
11576 struct tevent_context
*ev
,
11577 struct rpc_pipe_client
*cli
)
11579 struct tevent_req
*req
;
11580 struct rpccli_lsa_LSARGENAUDITEVENT_state
*state
;
11581 struct tevent_req
*subreq
;
11583 req
= tevent_req_create(mem_ctx
, &state
,
11584 struct rpccli_lsa_LSARGENAUDITEVENT_state
);
11588 state
->out_mem_ctx
= NULL
;
11589 state
->dispatch_recv
= cli
->dispatch_recv
;
11591 /* In parameters */
11593 /* Out parameters */
11596 ZERO_STRUCT(state
->orig
.out
.result
);
11598 if (DEBUGLEVEL
>= 10) {
11599 NDR_PRINT_IN_DEBUG(lsa_LSARGENAUDITEVENT
, &state
->orig
);
11602 /* make a temporary copy, that we pass to the dispatch function */
11603 state
->tmp
= state
->orig
;
11605 subreq
= cli
->dispatch_send(state
, ev
, cli
,
11607 NDR_LSA_LSARGENAUDITEVENT
,
11609 if (tevent_req_nomem(subreq
, req
)) {
11610 return tevent_req_post(req
, ev
);
11612 tevent_req_set_callback(subreq
, rpccli_lsa_LSARGENAUDITEVENT_done
, req
);
11616 static void rpccli_lsa_LSARGENAUDITEVENT_done(struct tevent_req
*subreq
)
11618 struct tevent_req
*req
= tevent_req_callback_data(
11619 subreq
, struct tevent_req
);
11620 struct rpccli_lsa_LSARGENAUDITEVENT_state
*state
= tevent_req_data(
11621 req
, struct rpccli_lsa_LSARGENAUDITEVENT_state
);
11623 TALLOC_CTX
*mem_ctx
;
11625 if (state
->out_mem_ctx
) {
11626 mem_ctx
= state
->out_mem_ctx
;
11631 status
= state
->dispatch_recv(subreq
, mem_ctx
);
11632 TALLOC_FREE(subreq
);
11633 if (!NT_STATUS_IS_OK(status
)) {
11634 tevent_req_nterror(req
, status
);
11638 /* Copy out parameters */
11641 state
->orig
.out
.result
= state
->tmp
.out
.result
;
11643 /* Reset temporary structure */
11644 ZERO_STRUCT(state
->tmp
);
11646 if (DEBUGLEVEL
>= 10) {
11647 NDR_PRINT_OUT_DEBUG(lsa_LSARGENAUDITEVENT
, &state
->orig
);
11650 tevent_req_done(req
);
11653 NTSTATUS
rpccli_lsa_LSARGENAUDITEVENT_recv(struct tevent_req
*req
,
11654 TALLOC_CTX
*mem_ctx
,
11657 struct rpccli_lsa_LSARGENAUDITEVENT_state
*state
= tevent_req_data(
11658 req
, struct rpccli_lsa_LSARGENAUDITEVENT_state
);
11661 if (tevent_req_is_nterror(req
, &status
)) {
11662 tevent_req_received(req
);
11666 /* Steal possbile out parameters to the callers context */
11667 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
11669 /* Return result */
11670 *result
= state
->orig
.out
.result
;
11672 tevent_req_received(req
);
11673 return NT_STATUS_OK
;
11676 NTSTATUS
rpccli_lsa_LSARGENAUDITEVENT(struct rpc_pipe_client
*cli
,
11677 TALLOC_CTX
*mem_ctx
)
11679 struct lsa_LSARGENAUDITEVENT r
;
11682 /* In parameters */
11684 if (DEBUGLEVEL
>= 10) {
11685 NDR_PRINT_IN_DEBUG(lsa_LSARGENAUDITEVENT
, &r
);
11688 status
= cli
->dispatch(cli
,
11691 NDR_LSA_LSARGENAUDITEVENT
,
11694 if (!NT_STATUS_IS_OK(status
)) {
11698 if (DEBUGLEVEL
>= 10) {
11699 NDR_PRINT_OUT_DEBUG(lsa_LSARGENAUDITEVENT
, &r
);
11702 if (NT_STATUS_IS_ERR(status
)) {
11706 /* Return variables */
11708 /* Return result */
11709 return r
.out
.result
;
11712 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state
{
11713 struct lsa_LSARUNREGISTERAUDITEVENT orig
;
11714 struct lsa_LSARUNREGISTERAUDITEVENT tmp
;
11715 TALLOC_CTX
*out_mem_ctx
;
11716 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
11719 static void rpccli_lsa_LSARUNREGISTERAUDITEVENT_done(struct tevent_req
*subreq
);
11721 struct tevent_req
*rpccli_lsa_LSARUNREGISTERAUDITEVENT_send(TALLOC_CTX
*mem_ctx
,
11722 struct tevent_context
*ev
,
11723 struct rpc_pipe_client
*cli
)
11725 struct tevent_req
*req
;
11726 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state
*state
;
11727 struct tevent_req
*subreq
;
11729 req
= tevent_req_create(mem_ctx
, &state
,
11730 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state
);
11734 state
->out_mem_ctx
= NULL
;
11735 state
->dispatch_recv
= cli
->dispatch_recv
;
11737 /* In parameters */
11739 /* Out parameters */
11742 ZERO_STRUCT(state
->orig
.out
.result
);
11744 if (DEBUGLEVEL
>= 10) {
11745 NDR_PRINT_IN_DEBUG(lsa_LSARUNREGISTERAUDITEVENT
, &state
->orig
);
11748 /* make a temporary copy, that we pass to the dispatch function */
11749 state
->tmp
= state
->orig
;
11751 subreq
= cli
->dispatch_send(state
, ev
, cli
,
11753 NDR_LSA_LSARUNREGISTERAUDITEVENT
,
11755 if (tevent_req_nomem(subreq
, req
)) {
11756 return tevent_req_post(req
, ev
);
11758 tevent_req_set_callback(subreq
, rpccli_lsa_LSARUNREGISTERAUDITEVENT_done
, req
);
11762 static void rpccli_lsa_LSARUNREGISTERAUDITEVENT_done(struct tevent_req
*subreq
)
11764 struct tevent_req
*req
= tevent_req_callback_data(
11765 subreq
, struct tevent_req
);
11766 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state
*state
= tevent_req_data(
11767 req
, struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state
);
11769 TALLOC_CTX
*mem_ctx
;
11771 if (state
->out_mem_ctx
) {
11772 mem_ctx
= state
->out_mem_ctx
;
11777 status
= state
->dispatch_recv(subreq
, mem_ctx
);
11778 TALLOC_FREE(subreq
);
11779 if (!NT_STATUS_IS_OK(status
)) {
11780 tevent_req_nterror(req
, status
);
11784 /* Copy out parameters */
11787 state
->orig
.out
.result
= state
->tmp
.out
.result
;
11789 /* Reset temporary structure */
11790 ZERO_STRUCT(state
->tmp
);
11792 if (DEBUGLEVEL
>= 10) {
11793 NDR_PRINT_OUT_DEBUG(lsa_LSARUNREGISTERAUDITEVENT
, &state
->orig
);
11796 tevent_req_done(req
);
11799 NTSTATUS
rpccli_lsa_LSARUNREGISTERAUDITEVENT_recv(struct tevent_req
*req
,
11800 TALLOC_CTX
*mem_ctx
,
11803 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state
*state
= tevent_req_data(
11804 req
, struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state
);
11807 if (tevent_req_is_nterror(req
, &status
)) {
11808 tevent_req_received(req
);
11812 /* Steal possbile out parameters to the callers context */
11813 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
11815 /* Return result */
11816 *result
= state
->orig
.out
.result
;
11818 tevent_req_received(req
);
11819 return NT_STATUS_OK
;
11822 NTSTATUS
rpccli_lsa_LSARUNREGISTERAUDITEVENT(struct rpc_pipe_client
*cli
,
11823 TALLOC_CTX
*mem_ctx
)
11825 struct lsa_LSARUNREGISTERAUDITEVENT r
;
11828 /* In parameters */
11830 if (DEBUGLEVEL
>= 10) {
11831 NDR_PRINT_IN_DEBUG(lsa_LSARUNREGISTERAUDITEVENT
, &r
);
11834 status
= cli
->dispatch(cli
,
11837 NDR_LSA_LSARUNREGISTERAUDITEVENT
,
11840 if (!NT_STATUS_IS_OK(status
)) {
11844 if (DEBUGLEVEL
>= 10) {
11845 NDR_PRINT_OUT_DEBUG(lsa_LSARUNREGISTERAUDITEVENT
, &r
);
11848 if (NT_STATUS_IS_ERR(status
)) {
11852 /* Return variables */
11854 /* Return result */
11855 return r
.out
.result
;
11858 struct rpccli_lsa_lsaRQueryForestTrustInformation_state
{
11859 struct lsa_lsaRQueryForestTrustInformation orig
;
11860 struct lsa_lsaRQueryForestTrustInformation tmp
;
11861 TALLOC_CTX
*out_mem_ctx
;
11862 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
11865 static void rpccli_lsa_lsaRQueryForestTrustInformation_done(struct tevent_req
*subreq
);
11867 struct tevent_req
*rpccli_lsa_lsaRQueryForestTrustInformation_send(TALLOC_CTX
*mem_ctx
,
11868 struct tevent_context
*ev
,
11869 struct rpc_pipe_client
*cli
,
11870 struct policy_handle
*_handle
/* [in] [ref] */,
11871 struct lsa_String
*_trusted_domain_name
/* [in] [ref] */,
11872 uint16_t _unknown
/* [in] */,
11873 struct lsa_ForestTrustInformation
**_forest_trust_info
/* [out] [ref] */)
11875 struct tevent_req
*req
;
11876 struct rpccli_lsa_lsaRQueryForestTrustInformation_state
*state
;
11877 struct tevent_req
*subreq
;
11879 req
= tevent_req_create(mem_ctx
, &state
,
11880 struct rpccli_lsa_lsaRQueryForestTrustInformation_state
);
11884 state
->out_mem_ctx
= NULL
;
11885 state
->dispatch_recv
= cli
->dispatch_recv
;
11887 /* In parameters */
11888 state
->orig
.in
.handle
= _handle
;
11889 state
->orig
.in
.trusted_domain_name
= _trusted_domain_name
;
11890 state
->orig
.in
.unknown
= _unknown
;
11892 /* Out parameters */
11893 state
->orig
.out
.forest_trust_info
= _forest_trust_info
;
11896 ZERO_STRUCT(state
->orig
.out
.result
);
11898 if (DEBUGLEVEL
>= 10) {
11899 NDR_PRINT_IN_DEBUG(lsa_lsaRQueryForestTrustInformation
, &state
->orig
);
11902 state
->out_mem_ctx
= talloc_named_const(state
, 0,
11903 "rpccli_lsa_lsaRQueryForestTrustInformation_out_memory");
11904 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
11905 return tevent_req_post(req
, ev
);
11908 /* make a temporary copy, that we pass to the dispatch function */
11909 state
->tmp
= state
->orig
;
11911 subreq
= cli
->dispatch_send(state
, ev
, cli
,
11913 NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION
,
11915 if (tevent_req_nomem(subreq
, req
)) {
11916 return tevent_req_post(req
, ev
);
11918 tevent_req_set_callback(subreq
, rpccli_lsa_lsaRQueryForestTrustInformation_done
, req
);
11922 static void rpccli_lsa_lsaRQueryForestTrustInformation_done(struct tevent_req
*subreq
)
11924 struct tevent_req
*req
= tevent_req_callback_data(
11925 subreq
, struct tevent_req
);
11926 struct rpccli_lsa_lsaRQueryForestTrustInformation_state
*state
= tevent_req_data(
11927 req
, struct rpccli_lsa_lsaRQueryForestTrustInformation_state
);
11929 TALLOC_CTX
*mem_ctx
;
11931 if (state
->out_mem_ctx
) {
11932 mem_ctx
= state
->out_mem_ctx
;
11937 status
= state
->dispatch_recv(subreq
, mem_ctx
);
11938 TALLOC_FREE(subreq
);
11939 if (!NT_STATUS_IS_OK(status
)) {
11940 tevent_req_nterror(req
, status
);
11944 /* Copy out parameters */
11945 *state
->orig
.out
.forest_trust_info
= *state
->tmp
.out
.forest_trust_info
;
11948 state
->orig
.out
.result
= state
->tmp
.out
.result
;
11950 /* Reset temporary structure */
11951 ZERO_STRUCT(state
->tmp
);
11953 if (DEBUGLEVEL
>= 10) {
11954 NDR_PRINT_OUT_DEBUG(lsa_lsaRQueryForestTrustInformation
, &state
->orig
);
11957 tevent_req_done(req
);
11960 NTSTATUS
rpccli_lsa_lsaRQueryForestTrustInformation_recv(struct tevent_req
*req
,
11961 TALLOC_CTX
*mem_ctx
,
11964 struct rpccli_lsa_lsaRQueryForestTrustInformation_state
*state
= tevent_req_data(
11965 req
, struct rpccli_lsa_lsaRQueryForestTrustInformation_state
);
11968 if (tevent_req_is_nterror(req
, &status
)) {
11969 tevent_req_received(req
);
11973 /* Steal possbile out parameters to the callers context */
11974 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
11976 /* Return result */
11977 *result
= state
->orig
.out
.result
;
11979 tevent_req_received(req
);
11980 return NT_STATUS_OK
;
11983 NTSTATUS
rpccli_lsa_lsaRQueryForestTrustInformation(struct rpc_pipe_client
*cli
,
11984 TALLOC_CTX
*mem_ctx
,
11985 struct policy_handle
*handle
/* [in] [ref] */,
11986 struct lsa_String
*trusted_domain_name
/* [in] [ref] */,
11987 uint16_t unknown
/* [in] */,
11988 struct lsa_ForestTrustInformation
**forest_trust_info
/* [out] [ref] */)
11990 struct lsa_lsaRQueryForestTrustInformation r
;
11993 /* In parameters */
11994 r
.in
.handle
= handle
;
11995 r
.in
.trusted_domain_name
= trusted_domain_name
;
11996 r
.in
.unknown
= unknown
;
11998 if (DEBUGLEVEL
>= 10) {
11999 NDR_PRINT_IN_DEBUG(lsa_lsaRQueryForestTrustInformation
, &r
);
12002 status
= cli
->dispatch(cli
,
12005 NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION
,
12008 if (!NT_STATUS_IS_OK(status
)) {
12012 if (DEBUGLEVEL
>= 10) {
12013 NDR_PRINT_OUT_DEBUG(lsa_lsaRQueryForestTrustInformation
, &r
);
12016 if (NT_STATUS_IS_ERR(status
)) {
12020 /* Return variables */
12021 *forest_trust_info
= *r
.out
.forest_trust_info
;
12023 /* Return result */
12024 return r
.out
.result
;
12027 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state
{
12028 struct lsa_LSARSETFORESTTRUSTINFORMATION orig
;
12029 struct lsa_LSARSETFORESTTRUSTINFORMATION tmp
;
12030 TALLOC_CTX
*out_mem_ctx
;
12031 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
12034 static void rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done(struct tevent_req
*subreq
);
12036 struct tevent_req
*rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_send(TALLOC_CTX
*mem_ctx
,
12037 struct tevent_context
*ev
,
12038 struct rpc_pipe_client
*cli
)
12040 struct tevent_req
*req
;
12041 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state
*state
;
12042 struct tevent_req
*subreq
;
12044 req
= tevent_req_create(mem_ctx
, &state
,
12045 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state
);
12049 state
->out_mem_ctx
= NULL
;
12050 state
->dispatch_recv
= cli
->dispatch_recv
;
12052 /* In parameters */
12054 /* Out parameters */
12057 ZERO_STRUCT(state
->orig
.out
.result
);
12059 if (DEBUGLEVEL
>= 10) {
12060 NDR_PRINT_IN_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION
, &state
->orig
);
12063 /* make a temporary copy, that we pass to the dispatch function */
12064 state
->tmp
= state
->orig
;
12066 subreq
= cli
->dispatch_send(state
, ev
, cli
,
12068 NDR_LSA_LSARSETFORESTTRUSTINFORMATION
,
12070 if (tevent_req_nomem(subreq
, req
)) {
12071 return tevent_req_post(req
, ev
);
12073 tevent_req_set_callback(subreq
, rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done
, req
);
12077 static void rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done(struct tevent_req
*subreq
)
12079 struct tevent_req
*req
= tevent_req_callback_data(
12080 subreq
, struct tevent_req
);
12081 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state
*state
= tevent_req_data(
12082 req
, struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state
);
12084 TALLOC_CTX
*mem_ctx
;
12086 if (state
->out_mem_ctx
) {
12087 mem_ctx
= state
->out_mem_ctx
;
12092 status
= state
->dispatch_recv(subreq
, mem_ctx
);
12093 TALLOC_FREE(subreq
);
12094 if (!NT_STATUS_IS_OK(status
)) {
12095 tevent_req_nterror(req
, status
);
12099 /* Copy out parameters */
12102 state
->orig
.out
.result
= state
->tmp
.out
.result
;
12104 /* Reset temporary structure */
12105 ZERO_STRUCT(state
->tmp
);
12107 if (DEBUGLEVEL
>= 10) {
12108 NDR_PRINT_OUT_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION
, &state
->orig
);
12111 tevent_req_done(req
);
12114 NTSTATUS
rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_recv(struct tevent_req
*req
,
12115 TALLOC_CTX
*mem_ctx
,
12118 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state
*state
= tevent_req_data(
12119 req
, struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state
);
12122 if (tevent_req_is_nterror(req
, &status
)) {
12123 tevent_req_received(req
);
12127 /* Steal possbile out parameters to the callers context */
12128 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
12130 /* Return result */
12131 *result
= state
->orig
.out
.result
;
12133 tevent_req_received(req
);
12134 return NT_STATUS_OK
;
12137 NTSTATUS
rpccli_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client
*cli
,
12138 TALLOC_CTX
*mem_ctx
)
12140 struct lsa_LSARSETFORESTTRUSTINFORMATION r
;
12143 /* In parameters */
12145 if (DEBUGLEVEL
>= 10) {
12146 NDR_PRINT_IN_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION
, &r
);
12149 status
= cli
->dispatch(cli
,
12152 NDR_LSA_LSARSETFORESTTRUSTINFORMATION
,
12155 if (!NT_STATUS_IS_OK(status
)) {
12159 if (DEBUGLEVEL
>= 10) {
12160 NDR_PRINT_OUT_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION
, &r
);
12163 if (NT_STATUS_IS_ERR(status
)) {
12167 /* Return variables */
12169 /* Return result */
12170 return r
.out
.result
;
12173 struct rpccli_lsa_CREDRRENAME_state
{
12174 struct lsa_CREDRRENAME orig
;
12175 struct lsa_CREDRRENAME tmp
;
12176 TALLOC_CTX
*out_mem_ctx
;
12177 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
12180 static void rpccli_lsa_CREDRRENAME_done(struct tevent_req
*subreq
);
12182 struct tevent_req
*rpccli_lsa_CREDRRENAME_send(TALLOC_CTX
*mem_ctx
,
12183 struct tevent_context
*ev
,
12184 struct rpc_pipe_client
*cli
)
12186 struct tevent_req
*req
;
12187 struct rpccli_lsa_CREDRRENAME_state
*state
;
12188 struct tevent_req
*subreq
;
12190 req
= tevent_req_create(mem_ctx
, &state
,
12191 struct rpccli_lsa_CREDRRENAME_state
);
12195 state
->out_mem_ctx
= NULL
;
12196 state
->dispatch_recv
= cli
->dispatch_recv
;
12198 /* In parameters */
12200 /* Out parameters */
12203 ZERO_STRUCT(state
->orig
.out
.result
);
12205 if (DEBUGLEVEL
>= 10) {
12206 NDR_PRINT_IN_DEBUG(lsa_CREDRRENAME
, &state
->orig
);
12209 /* make a temporary copy, that we pass to the dispatch function */
12210 state
->tmp
= state
->orig
;
12212 subreq
= cli
->dispatch_send(state
, ev
, cli
,
12214 NDR_LSA_CREDRRENAME
,
12216 if (tevent_req_nomem(subreq
, req
)) {
12217 return tevent_req_post(req
, ev
);
12219 tevent_req_set_callback(subreq
, rpccli_lsa_CREDRRENAME_done
, req
);
12223 static void rpccli_lsa_CREDRRENAME_done(struct tevent_req
*subreq
)
12225 struct tevent_req
*req
= tevent_req_callback_data(
12226 subreq
, struct tevent_req
);
12227 struct rpccli_lsa_CREDRRENAME_state
*state
= tevent_req_data(
12228 req
, struct rpccli_lsa_CREDRRENAME_state
);
12230 TALLOC_CTX
*mem_ctx
;
12232 if (state
->out_mem_ctx
) {
12233 mem_ctx
= state
->out_mem_ctx
;
12238 status
= state
->dispatch_recv(subreq
, mem_ctx
);
12239 TALLOC_FREE(subreq
);
12240 if (!NT_STATUS_IS_OK(status
)) {
12241 tevent_req_nterror(req
, status
);
12245 /* Copy out parameters */
12248 state
->orig
.out
.result
= state
->tmp
.out
.result
;
12250 /* Reset temporary structure */
12251 ZERO_STRUCT(state
->tmp
);
12253 if (DEBUGLEVEL
>= 10) {
12254 NDR_PRINT_OUT_DEBUG(lsa_CREDRRENAME
, &state
->orig
);
12257 tevent_req_done(req
);
12260 NTSTATUS
rpccli_lsa_CREDRRENAME_recv(struct tevent_req
*req
,
12261 TALLOC_CTX
*mem_ctx
,
12264 struct rpccli_lsa_CREDRRENAME_state
*state
= tevent_req_data(
12265 req
, struct rpccli_lsa_CREDRRENAME_state
);
12268 if (tevent_req_is_nterror(req
, &status
)) {
12269 tevent_req_received(req
);
12273 /* Steal possbile out parameters to the callers context */
12274 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
12276 /* Return result */
12277 *result
= state
->orig
.out
.result
;
12279 tevent_req_received(req
);
12280 return NT_STATUS_OK
;
12283 NTSTATUS
rpccli_lsa_CREDRRENAME(struct rpc_pipe_client
*cli
,
12284 TALLOC_CTX
*mem_ctx
)
12286 struct lsa_CREDRRENAME r
;
12289 /* In parameters */
12291 if (DEBUGLEVEL
>= 10) {
12292 NDR_PRINT_IN_DEBUG(lsa_CREDRRENAME
, &r
);
12295 status
= cli
->dispatch(cli
,
12298 NDR_LSA_CREDRRENAME
,
12301 if (!NT_STATUS_IS_OK(status
)) {
12305 if (DEBUGLEVEL
>= 10) {
12306 NDR_PRINT_OUT_DEBUG(lsa_CREDRRENAME
, &r
);
12309 if (NT_STATUS_IS_ERR(status
)) {
12313 /* Return variables */
12315 /* Return result */
12316 return r
.out
.result
;
12319 struct rpccli_lsa_LookupSids3_state
{
12320 struct lsa_LookupSids3 orig
;
12321 struct lsa_LookupSids3 tmp
;
12322 TALLOC_CTX
*out_mem_ctx
;
12323 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
12326 static void rpccli_lsa_LookupSids3_done(struct tevent_req
*subreq
);
12328 struct tevent_req
*rpccli_lsa_LookupSids3_send(TALLOC_CTX
*mem_ctx
,
12329 struct tevent_context
*ev
,
12330 struct rpc_pipe_client
*cli
,
12331 struct lsa_SidArray
*_sids
/* [in] [ref] */,
12332 struct lsa_RefDomainList
**_domains
/* [out] [ref] */,
12333 struct lsa_TransNameArray2
*_names
/* [in,out] [ref] */,
12334 uint16_t _level
/* [in] */,
12335 uint32_t *_count
/* [in,out] [ref] */,
12336 uint32_t _unknown1
/* [in] */,
12337 uint32_t _unknown2
/* [in] */)
12339 struct tevent_req
*req
;
12340 struct rpccli_lsa_LookupSids3_state
*state
;
12341 struct tevent_req
*subreq
;
12343 req
= tevent_req_create(mem_ctx
, &state
,
12344 struct rpccli_lsa_LookupSids3_state
);
12348 state
->out_mem_ctx
= NULL
;
12349 state
->dispatch_recv
= cli
->dispatch_recv
;
12351 /* In parameters */
12352 state
->orig
.in
.sids
= _sids
;
12353 state
->orig
.in
.names
= _names
;
12354 state
->orig
.in
.level
= _level
;
12355 state
->orig
.in
.count
= _count
;
12356 state
->orig
.in
.unknown1
= _unknown1
;
12357 state
->orig
.in
.unknown2
= _unknown2
;
12359 /* Out parameters */
12360 state
->orig
.out
.domains
= _domains
;
12361 state
->orig
.out
.names
= _names
;
12362 state
->orig
.out
.count
= _count
;
12365 ZERO_STRUCT(state
->orig
.out
.result
);
12367 if (DEBUGLEVEL
>= 10) {
12368 NDR_PRINT_IN_DEBUG(lsa_LookupSids3
, &state
->orig
);
12371 state
->out_mem_ctx
= talloc_named_const(state
, 0,
12372 "rpccli_lsa_LookupSids3_out_memory");
12373 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
12374 return tevent_req_post(req
, ev
);
12377 /* make a temporary copy, that we pass to the dispatch function */
12378 state
->tmp
= state
->orig
;
12380 subreq
= cli
->dispatch_send(state
, ev
, cli
,
12382 NDR_LSA_LOOKUPSIDS3
,
12384 if (tevent_req_nomem(subreq
, req
)) {
12385 return tevent_req_post(req
, ev
);
12387 tevent_req_set_callback(subreq
, rpccli_lsa_LookupSids3_done
, req
);
12391 static void rpccli_lsa_LookupSids3_done(struct tevent_req
*subreq
)
12393 struct tevent_req
*req
= tevent_req_callback_data(
12394 subreq
, struct tevent_req
);
12395 struct rpccli_lsa_LookupSids3_state
*state
= tevent_req_data(
12396 req
, struct rpccli_lsa_LookupSids3_state
);
12398 TALLOC_CTX
*mem_ctx
;
12400 if (state
->out_mem_ctx
) {
12401 mem_ctx
= state
->out_mem_ctx
;
12406 status
= state
->dispatch_recv(subreq
, mem_ctx
);
12407 TALLOC_FREE(subreq
);
12408 if (!NT_STATUS_IS_OK(status
)) {
12409 tevent_req_nterror(req
, status
);
12413 /* Copy out parameters */
12414 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
12415 *state
->orig
.out
.names
= *state
->tmp
.out
.names
;
12416 *state
->orig
.out
.count
= *state
->tmp
.out
.count
;
12419 state
->orig
.out
.result
= state
->tmp
.out
.result
;
12421 /* Reset temporary structure */
12422 ZERO_STRUCT(state
->tmp
);
12424 if (DEBUGLEVEL
>= 10) {
12425 NDR_PRINT_OUT_DEBUG(lsa_LookupSids3
, &state
->orig
);
12428 tevent_req_done(req
);
12431 NTSTATUS
rpccli_lsa_LookupSids3_recv(struct tevent_req
*req
,
12432 TALLOC_CTX
*mem_ctx
,
12435 struct rpccli_lsa_LookupSids3_state
*state
= tevent_req_data(
12436 req
, struct rpccli_lsa_LookupSids3_state
);
12439 if (tevent_req_is_nterror(req
, &status
)) {
12440 tevent_req_received(req
);
12444 /* Steal possbile out parameters to the callers context */
12445 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
12447 /* Return result */
12448 *result
= state
->orig
.out
.result
;
12450 tevent_req_received(req
);
12451 return NT_STATUS_OK
;
12454 NTSTATUS
rpccli_lsa_LookupSids3(struct rpc_pipe_client
*cli
,
12455 TALLOC_CTX
*mem_ctx
,
12456 struct lsa_SidArray
*sids
/* [in] [ref] */,
12457 struct lsa_RefDomainList
**domains
/* [out] [ref] */,
12458 struct lsa_TransNameArray2
*names
/* [in,out] [ref] */,
12459 uint16_t level
/* [in] */,
12460 uint32_t *count
/* [in,out] [ref] */,
12461 uint32_t unknown1
/* [in] */,
12462 uint32_t unknown2
/* [in] */)
12464 struct lsa_LookupSids3 r
;
12467 /* In parameters */
12469 r
.in
.names
= names
;
12470 r
.in
.level
= level
;
12471 r
.in
.count
= count
;
12472 r
.in
.unknown1
= unknown1
;
12473 r
.in
.unknown2
= unknown2
;
12475 if (DEBUGLEVEL
>= 10) {
12476 NDR_PRINT_IN_DEBUG(lsa_LookupSids3
, &r
);
12479 status
= cli
->dispatch(cli
,
12482 NDR_LSA_LOOKUPSIDS3
,
12485 if (!NT_STATUS_IS_OK(status
)) {
12489 if (DEBUGLEVEL
>= 10) {
12490 NDR_PRINT_OUT_DEBUG(lsa_LookupSids3
, &r
);
12493 if (NT_STATUS_IS_ERR(status
)) {
12497 /* Return variables */
12498 *domains
= *r
.out
.domains
;
12499 *names
= *r
.out
.names
;
12500 *count
= *r
.out
.count
;
12502 /* Return result */
12503 return r
.out
.result
;
12506 struct rpccli_lsa_LookupNames4_state
{
12507 struct lsa_LookupNames4 orig
;
12508 struct lsa_LookupNames4 tmp
;
12509 TALLOC_CTX
*out_mem_ctx
;
12510 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
12513 static void rpccli_lsa_LookupNames4_done(struct tevent_req
*subreq
);
12515 struct tevent_req
*rpccli_lsa_LookupNames4_send(TALLOC_CTX
*mem_ctx
,
12516 struct tevent_context
*ev
,
12517 struct rpc_pipe_client
*cli
,
12518 uint32_t _num_names
/* [in] [range(0,1000)] */,
12519 struct lsa_String
*_names
/* [in] [size_is(num_names)] */,
12520 struct lsa_RefDomainList
**_domains
/* [out] [ref] */,
12521 struct lsa_TransSidArray3
*_sids
/* [in,out] [ref] */,
12522 enum lsa_LookupNamesLevel _level
/* [in] */,
12523 uint32_t *_count
/* [in,out] [ref] */,
12524 uint32_t _lookup_options
/* [in] */,
12525 uint32_t _client_revision
/* [in] */)
12527 struct tevent_req
*req
;
12528 struct rpccli_lsa_LookupNames4_state
*state
;
12529 struct tevent_req
*subreq
;
12531 req
= tevent_req_create(mem_ctx
, &state
,
12532 struct rpccli_lsa_LookupNames4_state
);
12536 state
->out_mem_ctx
= NULL
;
12537 state
->dispatch_recv
= cli
->dispatch_recv
;
12539 /* In parameters */
12540 state
->orig
.in
.num_names
= _num_names
;
12541 state
->orig
.in
.names
= _names
;
12542 state
->orig
.in
.sids
= _sids
;
12543 state
->orig
.in
.level
= _level
;
12544 state
->orig
.in
.count
= _count
;
12545 state
->orig
.in
.lookup_options
= _lookup_options
;
12546 state
->orig
.in
.client_revision
= _client_revision
;
12548 /* Out parameters */
12549 state
->orig
.out
.domains
= _domains
;
12550 state
->orig
.out
.sids
= _sids
;
12551 state
->orig
.out
.count
= _count
;
12554 ZERO_STRUCT(state
->orig
.out
.result
);
12556 if (DEBUGLEVEL
>= 10) {
12557 NDR_PRINT_IN_DEBUG(lsa_LookupNames4
, &state
->orig
);
12560 state
->out_mem_ctx
= talloc_named_const(state
, 0,
12561 "rpccli_lsa_LookupNames4_out_memory");
12562 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
12563 return tevent_req_post(req
, ev
);
12566 /* make a temporary copy, that we pass to the dispatch function */
12567 state
->tmp
= state
->orig
;
12569 subreq
= cli
->dispatch_send(state
, ev
, cli
,
12571 NDR_LSA_LOOKUPNAMES4
,
12573 if (tevent_req_nomem(subreq
, req
)) {
12574 return tevent_req_post(req
, ev
);
12576 tevent_req_set_callback(subreq
, rpccli_lsa_LookupNames4_done
, req
);
12580 static void rpccli_lsa_LookupNames4_done(struct tevent_req
*subreq
)
12582 struct tevent_req
*req
= tevent_req_callback_data(
12583 subreq
, struct tevent_req
);
12584 struct rpccli_lsa_LookupNames4_state
*state
= tevent_req_data(
12585 req
, struct rpccli_lsa_LookupNames4_state
);
12587 TALLOC_CTX
*mem_ctx
;
12589 if (state
->out_mem_ctx
) {
12590 mem_ctx
= state
->out_mem_ctx
;
12595 status
= state
->dispatch_recv(subreq
, mem_ctx
);
12596 TALLOC_FREE(subreq
);
12597 if (!NT_STATUS_IS_OK(status
)) {
12598 tevent_req_nterror(req
, status
);
12602 /* Copy out parameters */
12603 *state
->orig
.out
.domains
= *state
->tmp
.out
.domains
;
12604 *state
->orig
.out
.sids
= *state
->tmp
.out
.sids
;
12605 *state
->orig
.out
.count
= *state
->tmp
.out
.count
;
12608 state
->orig
.out
.result
= state
->tmp
.out
.result
;
12610 /* Reset temporary structure */
12611 ZERO_STRUCT(state
->tmp
);
12613 if (DEBUGLEVEL
>= 10) {
12614 NDR_PRINT_OUT_DEBUG(lsa_LookupNames4
, &state
->orig
);
12617 tevent_req_done(req
);
12620 NTSTATUS
rpccli_lsa_LookupNames4_recv(struct tevent_req
*req
,
12621 TALLOC_CTX
*mem_ctx
,
12624 struct rpccli_lsa_LookupNames4_state
*state
= tevent_req_data(
12625 req
, struct rpccli_lsa_LookupNames4_state
);
12628 if (tevent_req_is_nterror(req
, &status
)) {
12629 tevent_req_received(req
);
12633 /* Steal possbile out parameters to the callers context */
12634 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
12636 /* Return result */
12637 *result
= state
->orig
.out
.result
;
12639 tevent_req_received(req
);
12640 return NT_STATUS_OK
;
12643 NTSTATUS
rpccli_lsa_LookupNames4(struct rpc_pipe_client
*cli
,
12644 TALLOC_CTX
*mem_ctx
,
12645 uint32_t num_names
/* [in] [range(0,1000)] */,
12646 struct lsa_String
*names
/* [in] [size_is(num_names)] */,
12647 struct lsa_RefDomainList
**domains
/* [out] [ref] */,
12648 struct lsa_TransSidArray3
*sids
/* [in,out] [ref] */,
12649 enum lsa_LookupNamesLevel level
/* [in] */,
12650 uint32_t *count
/* [in,out] [ref] */,
12651 uint32_t lookup_options
/* [in] */,
12652 uint32_t client_revision
/* [in] */)
12654 struct lsa_LookupNames4 r
;
12657 /* In parameters */
12658 r
.in
.num_names
= num_names
;
12659 r
.in
.names
= names
;
12661 r
.in
.level
= level
;
12662 r
.in
.count
= count
;
12663 r
.in
.lookup_options
= lookup_options
;
12664 r
.in
.client_revision
= client_revision
;
12666 if (DEBUGLEVEL
>= 10) {
12667 NDR_PRINT_IN_DEBUG(lsa_LookupNames4
, &r
);
12670 status
= cli
->dispatch(cli
,
12673 NDR_LSA_LOOKUPNAMES4
,
12676 if (!NT_STATUS_IS_OK(status
)) {
12680 if (DEBUGLEVEL
>= 10) {
12681 NDR_PRINT_OUT_DEBUG(lsa_LookupNames4
, &r
);
12684 if (NT_STATUS_IS_ERR(status
)) {
12688 /* Return variables */
12689 *domains
= *r
.out
.domains
;
12690 *sids
= *r
.out
.sids
;
12691 *count
= *r
.out
.count
;
12693 /* Return result */
12694 return r
.out
.result
;
12697 struct rpccli_lsa_LSAROPENPOLICYSCE_state
{
12698 struct lsa_LSAROPENPOLICYSCE orig
;
12699 struct lsa_LSAROPENPOLICYSCE tmp
;
12700 TALLOC_CTX
*out_mem_ctx
;
12701 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
12704 static void rpccli_lsa_LSAROPENPOLICYSCE_done(struct tevent_req
*subreq
);
12706 struct tevent_req
*rpccli_lsa_LSAROPENPOLICYSCE_send(TALLOC_CTX
*mem_ctx
,
12707 struct tevent_context
*ev
,
12708 struct rpc_pipe_client
*cli
)
12710 struct tevent_req
*req
;
12711 struct rpccli_lsa_LSAROPENPOLICYSCE_state
*state
;
12712 struct tevent_req
*subreq
;
12714 req
= tevent_req_create(mem_ctx
, &state
,
12715 struct rpccli_lsa_LSAROPENPOLICYSCE_state
);
12719 state
->out_mem_ctx
= NULL
;
12720 state
->dispatch_recv
= cli
->dispatch_recv
;
12722 /* In parameters */
12724 /* Out parameters */
12727 ZERO_STRUCT(state
->orig
.out
.result
);
12729 if (DEBUGLEVEL
>= 10) {
12730 NDR_PRINT_IN_DEBUG(lsa_LSAROPENPOLICYSCE
, &state
->orig
);
12733 /* make a temporary copy, that we pass to the dispatch function */
12734 state
->tmp
= state
->orig
;
12736 subreq
= cli
->dispatch_send(state
, ev
, cli
,
12738 NDR_LSA_LSAROPENPOLICYSCE
,
12740 if (tevent_req_nomem(subreq
, req
)) {
12741 return tevent_req_post(req
, ev
);
12743 tevent_req_set_callback(subreq
, rpccli_lsa_LSAROPENPOLICYSCE_done
, req
);
12747 static void rpccli_lsa_LSAROPENPOLICYSCE_done(struct tevent_req
*subreq
)
12749 struct tevent_req
*req
= tevent_req_callback_data(
12750 subreq
, struct tevent_req
);
12751 struct rpccli_lsa_LSAROPENPOLICYSCE_state
*state
= tevent_req_data(
12752 req
, struct rpccli_lsa_LSAROPENPOLICYSCE_state
);
12754 TALLOC_CTX
*mem_ctx
;
12756 if (state
->out_mem_ctx
) {
12757 mem_ctx
= state
->out_mem_ctx
;
12762 status
= state
->dispatch_recv(subreq
, mem_ctx
);
12763 TALLOC_FREE(subreq
);
12764 if (!NT_STATUS_IS_OK(status
)) {
12765 tevent_req_nterror(req
, status
);
12769 /* Copy out parameters */
12772 state
->orig
.out
.result
= state
->tmp
.out
.result
;
12774 /* Reset temporary structure */
12775 ZERO_STRUCT(state
->tmp
);
12777 if (DEBUGLEVEL
>= 10) {
12778 NDR_PRINT_OUT_DEBUG(lsa_LSAROPENPOLICYSCE
, &state
->orig
);
12781 tevent_req_done(req
);
12784 NTSTATUS
rpccli_lsa_LSAROPENPOLICYSCE_recv(struct tevent_req
*req
,
12785 TALLOC_CTX
*mem_ctx
,
12788 struct rpccli_lsa_LSAROPENPOLICYSCE_state
*state
= tevent_req_data(
12789 req
, struct rpccli_lsa_LSAROPENPOLICYSCE_state
);
12792 if (tevent_req_is_nterror(req
, &status
)) {
12793 tevent_req_received(req
);
12797 /* Steal possbile out parameters to the callers context */
12798 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
12800 /* Return result */
12801 *result
= state
->orig
.out
.result
;
12803 tevent_req_received(req
);
12804 return NT_STATUS_OK
;
12807 NTSTATUS
rpccli_lsa_LSAROPENPOLICYSCE(struct rpc_pipe_client
*cli
,
12808 TALLOC_CTX
*mem_ctx
)
12810 struct lsa_LSAROPENPOLICYSCE r
;
12813 /* In parameters */
12815 if (DEBUGLEVEL
>= 10) {
12816 NDR_PRINT_IN_DEBUG(lsa_LSAROPENPOLICYSCE
, &r
);
12819 status
= cli
->dispatch(cli
,
12822 NDR_LSA_LSAROPENPOLICYSCE
,
12825 if (!NT_STATUS_IS_OK(status
)) {
12829 if (DEBUGLEVEL
>= 10) {
12830 NDR_PRINT_OUT_DEBUG(lsa_LSAROPENPOLICYSCE
, &r
);
12833 if (NT_STATUS_IS_ERR(status
)) {
12837 /* Return variables */
12839 /* Return result */
12840 return r
.out
.result
;
12843 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state
{
12844 struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE orig
;
12845 struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE tmp
;
12846 TALLOC_CTX
*out_mem_ctx
;
12847 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
12850 static void rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_done(struct tevent_req
*subreq
);
12852 struct tevent_req
*rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_send(TALLOC_CTX
*mem_ctx
,
12853 struct tevent_context
*ev
,
12854 struct rpc_pipe_client
*cli
)
12856 struct tevent_req
*req
;
12857 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state
*state
;
12858 struct tevent_req
*subreq
;
12860 req
= tevent_req_create(mem_ctx
, &state
,
12861 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state
);
12865 state
->out_mem_ctx
= NULL
;
12866 state
->dispatch_recv
= cli
->dispatch_recv
;
12868 /* In parameters */
12870 /* Out parameters */
12873 ZERO_STRUCT(state
->orig
.out
.result
);
12875 if (DEBUGLEVEL
>= 10) {
12876 NDR_PRINT_IN_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE
, &state
->orig
);
12879 /* make a temporary copy, that we pass to the dispatch function */
12880 state
->tmp
= state
->orig
;
12882 subreq
= cli
->dispatch_send(state
, ev
, cli
,
12884 NDR_LSA_LSARADTREGISTERSECURITYEVENTSOURCE
,
12886 if (tevent_req_nomem(subreq
, req
)) {
12887 return tevent_req_post(req
, ev
);
12889 tevent_req_set_callback(subreq
, rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_done
, req
);
12893 static void rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_done(struct tevent_req
*subreq
)
12895 struct tevent_req
*req
= tevent_req_callback_data(
12896 subreq
, struct tevent_req
);
12897 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state
*state
= tevent_req_data(
12898 req
, struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state
);
12900 TALLOC_CTX
*mem_ctx
;
12902 if (state
->out_mem_ctx
) {
12903 mem_ctx
= state
->out_mem_ctx
;
12908 status
= state
->dispatch_recv(subreq
, mem_ctx
);
12909 TALLOC_FREE(subreq
);
12910 if (!NT_STATUS_IS_OK(status
)) {
12911 tevent_req_nterror(req
, status
);
12915 /* Copy out parameters */
12918 state
->orig
.out
.result
= state
->tmp
.out
.result
;
12920 /* Reset temporary structure */
12921 ZERO_STRUCT(state
->tmp
);
12923 if (DEBUGLEVEL
>= 10) {
12924 NDR_PRINT_OUT_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE
, &state
->orig
);
12927 tevent_req_done(req
);
12930 NTSTATUS
rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_recv(struct tevent_req
*req
,
12931 TALLOC_CTX
*mem_ctx
,
12934 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state
*state
= tevent_req_data(
12935 req
, struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state
);
12938 if (tevent_req_is_nterror(req
, &status
)) {
12939 tevent_req_received(req
);
12943 /* Steal possbile out parameters to the callers context */
12944 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
12946 /* Return result */
12947 *result
= state
->orig
.out
.result
;
12949 tevent_req_received(req
);
12950 return NT_STATUS_OK
;
12953 NTSTATUS
rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client
*cli
,
12954 TALLOC_CTX
*mem_ctx
)
12956 struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE r
;
12959 /* In parameters */
12961 if (DEBUGLEVEL
>= 10) {
12962 NDR_PRINT_IN_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE
, &r
);
12965 status
= cli
->dispatch(cli
,
12968 NDR_LSA_LSARADTREGISTERSECURITYEVENTSOURCE
,
12971 if (!NT_STATUS_IS_OK(status
)) {
12975 if (DEBUGLEVEL
>= 10) {
12976 NDR_PRINT_OUT_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE
, &r
);
12979 if (NT_STATUS_IS_ERR(status
)) {
12983 /* Return variables */
12985 /* Return result */
12986 return r
.out
.result
;
12989 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state
{
12990 struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE orig
;
12991 struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE tmp
;
12992 TALLOC_CTX
*out_mem_ctx
;
12993 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
12996 static void rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_done(struct tevent_req
*subreq
);
12998 struct tevent_req
*rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_send(TALLOC_CTX
*mem_ctx
,
12999 struct tevent_context
*ev
,
13000 struct rpc_pipe_client
*cli
)
13002 struct tevent_req
*req
;
13003 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state
*state
;
13004 struct tevent_req
*subreq
;
13006 req
= tevent_req_create(mem_ctx
, &state
,
13007 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state
);
13011 state
->out_mem_ctx
= NULL
;
13012 state
->dispatch_recv
= cli
->dispatch_recv
;
13014 /* In parameters */
13016 /* Out parameters */
13019 ZERO_STRUCT(state
->orig
.out
.result
);
13021 if (DEBUGLEVEL
>= 10) {
13022 NDR_PRINT_IN_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
, &state
->orig
);
13025 /* make a temporary copy, that we pass to the dispatch function */
13026 state
->tmp
= state
->orig
;
13028 subreq
= cli
->dispatch_send(state
, ev
, cli
,
13030 NDR_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
13032 if (tevent_req_nomem(subreq
, req
)) {
13033 return tevent_req_post(req
, ev
);
13035 tevent_req_set_callback(subreq
, rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_done
, req
);
13039 static void rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_done(struct tevent_req
*subreq
)
13041 struct tevent_req
*req
= tevent_req_callback_data(
13042 subreq
, struct tevent_req
);
13043 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state
*state
= tevent_req_data(
13044 req
, struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state
);
13046 TALLOC_CTX
*mem_ctx
;
13048 if (state
->out_mem_ctx
) {
13049 mem_ctx
= state
->out_mem_ctx
;
13054 status
= state
->dispatch_recv(subreq
, mem_ctx
);
13055 TALLOC_FREE(subreq
);
13056 if (!NT_STATUS_IS_OK(status
)) {
13057 tevent_req_nterror(req
, status
);
13061 /* Copy out parameters */
13064 state
->orig
.out
.result
= state
->tmp
.out
.result
;
13066 /* Reset temporary structure */
13067 ZERO_STRUCT(state
->tmp
);
13069 if (DEBUGLEVEL
>= 10) {
13070 NDR_PRINT_OUT_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
, &state
->orig
);
13073 tevent_req_done(req
);
13076 NTSTATUS
rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_recv(struct tevent_req
*req
,
13077 TALLOC_CTX
*mem_ctx
,
13080 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state
*state
= tevent_req_data(
13081 req
, struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state
);
13084 if (tevent_req_is_nterror(req
, &status
)) {
13085 tevent_req_received(req
);
13089 /* Steal possbile out parameters to the callers context */
13090 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
13092 /* Return result */
13093 *result
= state
->orig
.out
.result
;
13095 tevent_req_received(req
);
13096 return NT_STATUS_OK
;
13099 NTSTATUS
rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client
*cli
,
13100 TALLOC_CTX
*mem_ctx
)
13102 struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE r
;
13105 /* In parameters */
13107 if (DEBUGLEVEL
>= 10) {
13108 NDR_PRINT_IN_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
, &r
);
13111 status
= cli
->dispatch(cli
,
13114 NDR_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
13117 if (!NT_STATUS_IS_OK(status
)) {
13121 if (DEBUGLEVEL
>= 10) {
13122 NDR_PRINT_OUT_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
, &r
);
13125 if (NT_STATUS_IS_ERR(status
)) {
13129 /* Return variables */
13131 /* Return result */
13132 return r
.out
.result
;
13135 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state
{
13136 struct lsa_LSARADTREPORTSECURITYEVENT orig
;
13137 struct lsa_LSARADTREPORTSECURITYEVENT tmp
;
13138 TALLOC_CTX
*out_mem_ctx
;
13139 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
13142 static void rpccli_lsa_LSARADTREPORTSECURITYEVENT_done(struct tevent_req
*subreq
);
13144 struct tevent_req
*rpccli_lsa_LSARADTREPORTSECURITYEVENT_send(TALLOC_CTX
*mem_ctx
,
13145 struct tevent_context
*ev
,
13146 struct rpc_pipe_client
*cli
)
13148 struct tevent_req
*req
;
13149 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state
*state
;
13150 struct tevent_req
*subreq
;
13152 req
= tevent_req_create(mem_ctx
, &state
,
13153 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state
);
13157 state
->out_mem_ctx
= NULL
;
13158 state
->dispatch_recv
= cli
->dispatch_recv
;
13160 /* In parameters */
13162 /* Out parameters */
13165 ZERO_STRUCT(state
->orig
.out
.result
);
13167 if (DEBUGLEVEL
>= 10) {
13168 NDR_PRINT_IN_DEBUG(lsa_LSARADTREPORTSECURITYEVENT
, &state
->orig
);
13171 /* make a temporary copy, that we pass to the dispatch function */
13172 state
->tmp
= state
->orig
;
13174 subreq
= cli
->dispatch_send(state
, ev
, cli
,
13176 NDR_LSA_LSARADTREPORTSECURITYEVENT
,
13178 if (tevent_req_nomem(subreq
, req
)) {
13179 return tevent_req_post(req
, ev
);
13181 tevent_req_set_callback(subreq
, rpccli_lsa_LSARADTREPORTSECURITYEVENT_done
, req
);
13185 static void rpccli_lsa_LSARADTREPORTSECURITYEVENT_done(struct tevent_req
*subreq
)
13187 struct tevent_req
*req
= tevent_req_callback_data(
13188 subreq
, struct tevent_req
);
13189 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state
*state
= tevent_req_data(
13190 req
, struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state
);
13192 TALLOC_CTX
*mem_ctx
;
13194 if (state
->out_mem_ctx
) {
13195 mem_ctx
= state
->out_mem_ctx
;
13200 status
= state
->dispatch_recv(subreq
, mem_ctx
);
13201 TALLOC_FREE(subreq
);
13202 if (!NT_STATUS_IS_OK(status
)) {
13203 tevent_req_nterror(req
, status
);
13207 /* Copy out parameters */
13210 state
->orig
.out
.result
= state
->tmp
.out
.result
;
13212 /* Reset temporary structure */
13213 ZERO_STRUCT(state
->tmp
);
13215 if (DEBUGLEVEL
>= 10) {
13216 NDR_PRINT_OUT_DEBUG(lsa_LSARADTREPORTSECURITYEVENT
, &state
->orig
);
13219 tevent_req_done(req
);
13222 NTSTATUS
rpccli_lsa_LSARADTREPORTSECURITYEVENT_recv(struct tevent_req
*req
,
13223 TALLOC_CTX
*mem_ctx
,
13226 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state
*state
= tevent_req_data(
13227 req
, struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state
);
13230 if (tevent_req_is_nterror(req
, &status
)) {
13231 tevent_req_received(req
);
13235 /* Steal possbile out parameters to the callers context */
13236 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
13238 /* Return result */
13239 *result
= state
->orig
.out
.result
;
13241 tevent_req_received(req
);
13242 return NT_STATUS_OK
;
13245 NTSTATUS
rpccli_lsa_LSARADTREPORTSECURITYEVENT(struct rpc_pipe_client
*cli
,
13246 TALLOC_CTX
*mem_ctx
)
13248 struct lsa_LSARADTREPORTSECURITYEVENT r
;
13251 /* In parameters */
13253 if (DEBUGLEVEL
>= 10) {
13254 NDR_PRINT_IN_DEBUG(lsa_LSARADTREPORTSECURITYEVENT
, &r
);
13257 status
= cli
->dispatch(cli
,
13260 NDR_LSA_LSARADTREPORTSECURITYEVENT
,
13263 if (!NT_STATUS_IS_OK(status
)) {
13267 if (DEBUGLEVEL
>= 10) {
13268 NDR_PRINT_OUT_DEBUG(lsa_LSARADTREPORTSECURITYEVENT
, &r
);
13271 if (NT_STATUS_IS_ERR(status
)) {
13275 /* Return variables */
13277 /* Return result */
13278 return r
.out
.result
;