2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/cli_samr.h"
9 struct rpccli_samr_Connect_state
{
10 struct samr_Connect orig
;
11 struct samr_Connect tmp
;
12 TALLOC_CTX
*out_mem_ctx
;
13 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
16 static void rpccli_samr_Connect_done(struct tevent_req
*subreq
);
18 struct tevent_req
*rpccli_samr_Connect_send(TALLOC_CTX
*mem_ctx
,
19 struct tevent_context
*ev
,
20 struct rpc_pipe_client
*cli
,
21 uint16_t *_system_name
/* [in] [unique] */,
22 uint32_t _access_mask
/* [in] */,
23 struct policy_handle
*_connect_handle
/* [out] [ref] */)
25 struct tevent_req
*req
;
26 struct rpccli_samr_Connect_state
*state
;
27 struct tevent_req
*subreq
;
29 req
= tevent_req_create(mem_ctx
, &state
,
30 struct rpccli_samr_Connect_state
);
34 state
->out_mem_ctx
= NULL
;
35 state
->dispatch_recv
= cli
->dispatch_recv
;
38 state
->orig
.in
.system_name
= _system_name
;
39 state
->orig
.in
.access_mask
= _access_mask
;
42 state
->orig
.out
.connect_handle
= _connect_handle
;
45 ZERO_STRUCT(state
->orig
.out
.result
);
47 state
->out_mem_ctx
= talloc_named_const(state
, 0,
48 "rpccli_samr_Connect_out_memory");
49 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
50 return tevent_req_post(req
, ev
);
53 /* make a temporary copy, that we pass to the dispatch function */
54 state
->tmp
= state
->orig
;
56 subreq
= cli
->dispatch_send(state
, ev
, cli
,
60 if (tevent_req_nomem(subreq
, req
)) {
61 return tevent_req_post(req
, ev
);
63 tevent_req_set_callback(subreq
, rpccli_samr_Connect_done
, req
);
67 static void rpccli_samr_Connect_done(struct tevent_req
*subreq
)
69 struct tevent_req
*req
= tevent_req_callback_data(
70 subreq
, struct tevent_req
);
71 struct rpccli_samr_Connect_state
*state
= tevent_req_data(
72 req
, struct rpccli_samr_Connect_state
);
76 if (state
->out_mem_ctx
) {
77 mem_ctx
= state
->out_mem_ctx
;
82 status
= state
->dispatch_recv(subreq
, mem_ctx
);
84 if (!NT_STATUS_IS_OK(status
)) {
85 tevent_req_nterror(req
, status
);
89 /* Copy out parameters */
90 *state
->orig
.out
.connect_handle
= *state
->tmp
.out
.connect_handle
;
93 state
->orig
.out
.result
= state
->tmp
.out
.result
;
95 /* Reset temporary structure */
96 ZERO_STRUCT(state
->tmp
);
101 NTSTATUS
rpccli_samr_Connect_recv(struct tevent_req
*req
,
105 struct rpccli_samr_Connect_state
*state
= tevent_req_data(
106 req
, struct rpccli_samr_Connect_state
);
109 if (tevent_req_is_nterror(req
, &status
)) {
110 tevent_req_received(req
);
114 /* Steal possbile out parameters to the callers context */
115 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
118 *result
= state
->orig
.out
.result
;
120 tevent_req_received(req
);
124 NTSTATUS
rpccli_samr_Connect(struct rpc_pipe_client
*cli
,
126 uint16_t *system_name
/* [in] [unique] */,
127 uint32_t access_mask
/* [in] */,
128 struct policy_handle
*connect_handle
/* [out] [ref] */)
130 struct samr_Connect r
;
134 r
.in
.system_name
= system_name
;
135 r
.in
.access_mask
= access_mask
;
137 status
= cli
->dispatch(cli
,
143 if (!NT_STATUS_IS_OK(status
)) {
147 if (NT_STATUS_IS_ERR(status
)) {
151 /* Return variables */
152 *connect_handle
= *r
.out
.connect_handle
;
158 struct rpccli_samr_Close_state
{
159 struct samr_Close orig
;
160 struct samr_Close tmp
;
161 TALLOC_CTX
*out_mem_ctx
;
162 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
165 static void rpccli_samr_Close_done(struct tevent_req
*subreq
);
167 struct tevent_req
*rpccli_samr_Close_send(TALLOC_CTX
*mem_ctx
,
168 struct tevent_context
*ev
,
169 struct rpc_pipe_client
*cli
,
170 struct policy_handle
*_handle
/* [in,out] [ref] */)
172 struct tevent_req
*req
;
173 struct rpccli_samr_Close_state
*state
;
174 struct tevent_req
*subreq
;
176 req
= tevent_req_create(mem_ctx
, &state
,
177 struct rpccli_samr_Close_state
);
181 state
->out_mem_ctx
= NULL
;
182 state
->dispatch_recv
= cli
->dispatch_recv
;
185 state
->orig
.in
.handle
= _handle
;
188 state
->orig
.out
.handle
= _handle
;
191 ZERO_STRUCT(state
->orig
.out
.result
);
193 state
->out_mem_ctx
= talloc_named_const(state
, 0,
194 "rpccli_samr_Close_out_memory");
195 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
196 return tevent_req_post(req
, ev
);
199 /* make a temporary copy, that we pass to the dispatch function */
200 state
->tmp
= state
->orig
;
202 subreq
= cli
->dispatch_send(state
, ev
, cli
,
206 if (tevent_req_nomem(subreq
, req
)) {
207 return tevent_req_post(req
, ev
);
209 tevent_req_set_callback(subreq
, rpccli_samr_Close_done
, req
);
213 static void rpccli_samr_Close_done(struct tevent_req
*subreq
)
215 struct tevent_req
*req
= tevent_req_callback_data(
216 subreq
, struct tevent_req
);
217 struct rpccli_samr_Close_state
*state
= tevent_req_data(
218 req
, struct rpccli_samr_Close_state
);
222 if (state
->out_mem_ctx
) {
223 mem_ctx
= state
->out_mem_ctx
;
228 status
= state
->dispatch_recv(subreq
, mem_ctx
);
230 if (!NT_STATUS_IS_OK(status
)) {
231 tevent_req_nterror(req
, status
);
235 /* Copy out parameters */
236 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
239 state
->orig
.out
.result
= state
->tmp
.out
.result
;
241 /* Reset temporary structure */
242 ZERO_STRUCT(state
->tmp
);
244 tevent_req_done(req
);
247 NTSTATUS
rpccli_samr_Close_recv(struct tevent_req
*req
,
251 struct rpccli_samr_Close_state
*state
= tevent_req_data(
252 req
, struct rpccli_samr_Close_state
);
255 if (tevent_req_is_nterror(req
, &status
)) {
256 tevent_req_received(req
);
260 /* Steal possbile out parameters to the callers context */
261 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
264 *result
= state
->orig
.out
.result
;
266 tevent_req_received(req
);
270 NTSTATUS
rpccli_samr_Close(struct rpc_pipe_client
*cli
,
272 struct policy_handle
*handle
/* [in,out] [ref] */)
278 r
.in
.handle
= handle
;
280 status
= cli
->dispatch(cli
,
286 if (!NT_STATUS_IS_OK(status
)) {
290 if (NT_STATUS_IS_ERR(status
)) {
294 /* Return variables */
295 *handle
= *r
.out
.handle
;
301 struct rpccli_samr_SetSecurity_state
{
302 struct samr_SetSecurity orig
;
303 struct samr_SetSecurity tmp
;
304 TALLOC_CTX
*out_mem_ctx
;
305 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
308 static void rpccli_samr_SetSecurity_done(struct tevent_req
*subreq
);
310 struct tevent_req
*rpccli_samr_SetSecurity_send(TALLOC_CTX
*mem_ctx
,
311 struct tevent_context
*ev
,
312 struct rpc_pipe_client
*cli
,
313 struct policy_handle
*_handle
/* [in] [ref] */,
314 uint32_t _sec_info
/* [in] */,
315 struct sec_desc_buf
*_sdbuf
/* [in] [ref] */)
317 struct tevent_req
*req
;
318 struct rpccli_samr_SetSecurity_state
*state
;
319 struct tevent_req
*subreq
;
321 req
= tevent_req_create(mem_ctx
, &state
,
322 struct rpccli_samr_SetSecurity_state
);
326 state
->out_mem_ctx
= NULL
;
327 state
->dispatch_recv
= cli
->dispatch_recv
;
330 state
->orig
.in
.handle
= _handle
;
331 state
->orig
.in
.sec_info
= _sec_info
;
332 state
->orig
.in
.sdbuf
= _sdbuf
;
337 ZERO_STRUCT(state
->orig
.out
.result
);
339 /* make a temporary copy, that we pass to the dispatch function */
340 state
->tmp
= state
->orig
;
342 subreq
= cli
->dispatch_send(state
, ev
, cli
,
344 NDR_SAMR_SETSECURITY
,
346 if (tevent_req_nomem(subreq
, req
)) {
347 return tevent_req_post(req
, ev
);
349 tevent_req_set_callback(subreq
, rpccli_samr_SetSecurity_done
, req
);
353 static void rpccli_samr_SetSecurity_done(struct tevent_req
*subreq
)
355 struct tevent_req
*req
= tevent_req_callback_data(
356 subreq
, struct tevent_req
);
357 struct rpccli_samr_SetSecurity_state
*state
= tevent_req_data(
358 req
, struct rpccli_samr_SetSecurity_state
);
362 if (state
->out_mem_ctx
) {
363 mem_ctx
= state
->out_mem_ctx
;
368 status
= state
->dispatch_recv(subreq
, mem_ctx
);
370 if (!NT_STATUS_IS_OK(status
)) {
371 tevent_req_nterror(req
, status
);
375 /* Copy out parameters */
378 state
->orig
.out
.result
= state
->tmp
.out
.result
;
380 /* Reset temporary structure */
381 ZERO_STRUCT(state
->tmp
);
383 tevent_req_done(req
);
386 NTSTATUS
rpccli_samr_SetSecurity_recv(struct tevent_req
*req
,
390 struct rpccli_samr_SetSecurity_state
*state
= tevent_req_data(
391 req
, struct rpccli_samr_SetSecurity_state
);
394 if (tevent_req_is_nterror(req
, &status
)) {
395 tevent_req_received(req
);
399 /* Steal possbile out parameters to the callers context */
400 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
403 *result
= state
->orig
.out
.result
;
405 tevent_req_received(req
);
409 NTSTATUS
rpccli_samr_SetSecurity(struct rpc_pipe_client
*cli
,
411 struct policy_handle
*handle
/* [in] [ref] */,
412 uint32_t sec_info
/* [in] */,
413 struct sec_desc_buf
*sdbuf
/* [in] [ref] */)
415 struct samr_SetSecurity r
;
419 r
.in
.handle
= handle
;
420 r
.in
.sec_info
= sec_info
;
423 status
= cli
->dispatch(cli
,
426 NDR_SAMR_SETSECURITY
,
429 if (!NT_STATUS_IS_OK(status
)) {
433 if (NT_STATUS_IS_ERR(status
)) {
437 /* Return variables */
443 struct rpccli_samr_QuerySecurity_state
{
444 struct samr_QuerySecurity orig
;
445 struct samr_QuerySecurity tmp
;
446 TALLOC_CTX
*out_mem_ctx
;
447 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
450 static void rpccli_samr_QuerySecurity_done(struct tevent_req
*subreq
);
452 struct tevent_req
*rpccli_samr_QuerySecurity_send(TALLOC_CTX
*mem_ctx
,
453 struct tevent_context
*ev
,
454 struct rpc_pipe_client
*cli
,
455 struct policy_handle
*_handle
/* [in] [ref] */,
456 uint32_t _sec_info
/* [in] */,
457 struct sec_desc_buf
**_sdbuf
/* [out] [ref] */)
459 struct tevent_req
*req
;
460 struct rpccli_samr_QuerySecurity_state
*state
;
461 struct tevent_req
*subreq
;
463 req
= tevent_req_create(mem_ctx
, &state
,
464 struct rpccli_samr_QuerySecurity_state
);
468 state
->out_mem_ctx
= NULL
;
469 state
->dispatch_recv
= cli
->dispatch_recv
;
472 state
->orig
.in
.handle
= _handle
;
473 state
->orig
.in
.sec_info
= _sec_info
;
476 state
->orig
.out
.sdbuf
= _sdbuf
;
479 ZERO_STRUCT(state
->orig
.out
.result
);
481 state
->out_mem_ctx
= talloc_named_const(state
, 0,
482 "rpccli_samr_QuerySecurity_out_memory");
483 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
484 return tevent_req_post(req
, ev
);
487 /* make a temporary copy, that we pass to the dispatch function */
488 state
->tmp
= state
->orig
;
490 subreq
= cli
->dispatch_send(state
, ev
, cli
,
492 NDR_SAMR_QUERYSECURITY
,
494 if (tevent_req_nomem(subreq
, req
)) {
495 return tevent_req_post(req
, ev
);
497 tevent_req_set_callback(subreq
, rpccli_samr_QuerySecurity_done
, req
);
501 static void rpccli_samr_QuerySecurity_done(struct tevent_req
*subreq
)
503 struct tevent_req
*req
= tevent_req_callback_data(
504 subreq
, struct tevent_req
);
505 struct rpccli_samr_QuerySecurity_state
*state
= tevent_req_data(
506 req
, struct rpccli_samr_QuerySecurity_state
);
510 if (state
->out_mem_ctx
) {
511 mem_ctx
= state
->out_mem_ctx
;
516 status
= state
->dispatch_recv(subreq
, mem_ctx
);
518 if (!NT_STATUS_IS_OK(status
)) {
519 tevent_req_nterror(req
, status
);
523 /* Copy out parameters */
524 *state
->orig
.out
.sdbuf
= *state
->tmp
.out
.sdbuf
;
527 state
->orig
.out
.result
= state
->tmp
.out
.result
;
529 /* Reset temporary structure */
530 ZERO_STRUCT(state
->tmp
);
532 tevent_req_done(req
);
535 NTSTATUS
rpccli_samr_QuerySecurity_recv(struct tevent_req
*req
,
539 struct rpccli_samr_QuerySecurity_state
*state
= tevent_req_data(
540 req
, struct rpccli_samr_QuerySecurity_state
);
543 if (tevent_req_is_nterror(req
, &status
)) {
544 tevent_req_received(req
);
548 /* Steal possbile out parameters to the callers context */
549 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
552 *result
= state
->orig
.out
.result
;
554 tevent_req_received(req
);
558 NTSTATUS
rpccli_samr_QuerySecurity(struct rpc_pipe_client
*cli
,
560 struct policy_handle
*handle
/* [in] [ref] */,
561 uint32_t sec_info
/* [in] */,
562 struct sec_desc_buf
**sdbuf
/* [out] [ref] */)
564 struct samr_QuerySecurity r
;
568 r
.in
.handle
= handle
;
569 r
.in
.sec_info
= sec_info
;
571 status
= cli
->dispatch(cli
,
574 NDR_SAMR_QUERYSECURITY
,
577 if (!NT_STATUS_IS_OK(status
)) {
581 if (NT_STATUS_IS_ERR(status
)) {
585 /* Return variables */
586 *sdbuf
= *r
.out
.sdbuf
;
592 struct rpccli_samr_Shutdown_state
{
593 struct samr_Shutdown orig
;
594 struct samr_Shutdown tmp
;
595 TALLOC_CTX
*out_mem_ctx
;
596 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
599 static void rpccli_samr_Shutdown_done(struct tevent_req
*subreq
);
601 struct tevent_req
*rpccli_samr_Shutdown_send(TALLOC_CTX
*mem_ctx
,
602 struct tevent_context
*ev
,
603 struct rpc_pipe_client
*cli
,
604 struct policy_handle
*_connect_handle
/* [in] [ref] */)
606 struct tevent_req
*req
;
607 struct rpccli_samr_Shutdown_state
*state
;
608 struct tevent_req
*subreq
;
610 req
= tevent_req_create(mem_ctx
, &state
,
611 struct rpccli_samr_Shutdown_state
);
615 state
->out_mem_ctx
= NULL
;
616 state
->dispatch_recv
= cli
->dispatch_recv
;
619 state
->orig
.in
.connect_handle
= _connect_handle
;
624 ZERO_STRUCT(state
->orig
.out
.result
);
626 /* make a temporary copy, that we pass to the dispatch function */
627 state
->tmp
= state
->orig
;
629 subreq
= cli
->dispatch_send(state
, ev
, cli
,
633 if (tevent_req_nomem(subreq
, req
)) {
634 return tevent_req_post(req
, ev
);
636 tevent_req_set_callback(subreq
, rpccli_samr_Shutdown_done
, req
);
640 static void rpccli_samr_Shutdown_done(struct tevent_req
*subreq
)
642 struct tevent_req
*req
= tevent_req_callback_data(
643 subreq
, struct tevent_req
);
644 struct rpccli_samr_Shutdown_state
*state
= tevent_req_data(
645 req
, struct rpccli_samr_Shutdown_state
);
649 if (state
->out_mem_ctx
) {
650 mem_ctx
= state
->out_mem_ctx
;
655 status
= state
->dispatch_recv(subreq
, mem_ctx
);
657 if (!NT_STATUS_IS_OK(status
)) {
658 tevent_req_nterror(req
, status
);
662 /* Copy out parameters */
665 state
->orig
.out
.result
= state
->tmp
.out
.result
;
667 /* Reset temporary structure */
668 ZERO_STRUCT(state
->tmp
);
670 tevent_req_done(req
);
673 NTSTATUS
rpccli_samr_Shutdown_recv(struct tevent_req
*req
,
677 struct rpccli_samr_Shutdown_state
*state
= tevent_req_data(
678 req
, struct rpccli_samr_Shutdown_state
);
681 if (tevent_req_is_nterror(req
, &status
)) {
682 tevent_req_received(req
);
686 /* Steal possbile out parameters to the callers context */
687 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
690 *result
= state
->orig
.out
.result
;
692 tevent_req_received(req
);
696 NTSTATUS
rpccli_samr_Shutdown(struct rpc_pipe_client
*cli
,
698 struct policy_handle
*connect_handle
/* [in] [ref] */)
700 struct samr_Shutdown r
;
704 r
.in
.connect_handle
= connect_handle
;
706 status
= cli
->dispatch(cli
,
712 if (!NT_STATUS_IS_OK(status
)) {
716 if (NT_STATUS_IS_ERR(status
)) {
720 /* Return variables */
726 struct rpccli_samr_LookupDomain_state
{
727 struct samr_LookupDomain orig
;
728 struct samr_LookupDomain tmp
;
729 TALLOC_CTX
*out_mem_ctx
;
730 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
733 static void rpccli_samr_LookupDomain_done(struct tevent_req
*subreq
);
735 struct tevent_req
*rpccli_samr_LookupDomain_send(TALLOC_CTX
*mem_ctx
,
736 struct tevent_context
*ev
,
737 struct rpc_pipe_client
*cli
,
738 struct policy_handle
*_connect_handle
/* [in] [ref] */,
739 struct lsa_String
*_domain_name
/* [in] [ref] */,
740 struct dom_sid2
**_sid
/* [out] [ref] */)
742 struct tevent_req
*req
;
743 struct rpccli_samr_LookupDomain_state
*state
;
744 struct tevent_req
*subreq
;
746 req
= tevent_req_create(mem_ctx
, &state
,
747 struct rpccli_samr_LookupDomain_state
);
751 state
->out_mem_ctx
= NULL
;
752 state
->dispatch_recv
= cli
->dispatch_recv
;
755 state
->orig
.in
.connect_handle
= _connect_handle
;
756 state
->orig
.in
.domain_name
= _domain_name
;
759 state
->orig
.out
.sid
= _sid
;
762 ZERO_STRUCT(state
->orig
.out
.result
);
764 state
->out_mem_ctx
= talloc_named_const(state
, 0,
765 "rpccli_samr_LookupDomain_out_memory");
766 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
767 return tevent_req_post(req
, ev
);
770 /* make a temporary copy, that we pass to the dispatch function */
771 state
->tmp
= state
->orig
;
773 subreq
= cli
->dispatch_send(state
, ev
, cli
,
775 NDR_SAMR_LOOKUPDOMAIN
,
777 if (tevent_req_nomem(subreq
, req
)) {
778 return tevent_req_post(req
, ev
);
780 tevent_req_set_callback(subreq
, rpccli_samr_LookupDomain_done
, req
);
784 static void rpccli_samr_LookupDomain_done(struct tevent_req
*subreq
)
786 struct tevent_req
*req
= tevent_req_callback_data(
787 subreq
, struct tevent_req
);
788 struct rpccli_samr_LookupDomain_state
*state
= tevent_req_data(
789 req
, struct rpccli_samr_LookupDomain_state
);
793 if (state
->out_mem_ctx
) {
794 mem_ctx
= state
->out_mem_ctx
;
799 status
= state
->dispatch_recv(subreq
, mem_ctx
);
801 if (!NT_STATUS_IS_OK(status
)) {
802 tevent_req_nterror(req
, status
);
806 /* Copy out parameters */
807 *state
->orig
.out
.sid
= *state
->tmp
.out
.sid
;
810 state
->orig
.out
.result
= state
->tmp
.out
.result
;
812 /* Reset temporary structure */
813 ZERO_STRUCT(state
->tmp
);
815 tevent_req_done(req
);
818 NTSTATUS
rpccli_samr_LookupDomain_recv(struct tevent_req
*req
,
822 struct rpccli_samr_LookupDomain_state
*state
= tevent_req_data(
823 req
, struct rpccli_samr_LookupDomain_state
);
826 if (tevent_req_is_nterror(req
, &status
)) {
827 tevent_req_received(req
);
831 /* Steal possbile out parameters to the callers context */
832 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
835 *result
= state
->orig
.out
.result
;
837 tevent_req_received(req
);
841 NTSTATUS
rpccli_samr_LookupDomain(struct rpc_pipe_client
*cli
,
843 struct policy_handle
*connect_handle
/* [in] [ref] */,
844 struct lsa_String
*domain_name
/* [in] [ref] */,
845 struct dom_sid2
**sid
/* [out] [ref] */)
847 struct samr_LookupDomain r
;
851 r
.in
.connect_handle
= connect_handle
;
852 r
.in
.domain_name
= domain_name
;
854 status
= cli
->dispatch(cli
,
857 NDR_SAMR_LOOKUPDOMAIN
,
860 if (!NT_STATUS_IS_OK(status
)) {
864 if (NT_STATUS_IS_ERR(status
)) {
868 /* Return variables */
875 struct rpccli_samr_EnumDomains_state
{
876 struct samr_EnumDomains orig
;
877 struct samr_EnumDomains tmp
;
878 TALLOC_CTX
*out_mem_ctx
;
879 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
882 static void rpccli_samr_EnumDomains_done(struct tevent_req
*subreq
);
884 struct tevent_req
*rpccli_samr_EnumDomains_send(TALLOC_CTX
*mem_ctx
,
885 struct tevent_context
*ev
,
886 struct rpc_pipe_client
*cli
,
887 struct policy_handle
*_connect_handle
/* [in] [ref] */,
888 uint32_t *_resume_handle
/* [in,out] [ref] */,
889 struct samr_SamArray
**_sam
/* [out] [ref] */,
890 uint32_t _buf_size
/* [in] */,
891 uint32_t *_num_entries
/* [out] [ref] */)
893 struct tevent_req
*req
;
894 struct rpccli_samr_EnumDomains_state
*state
;
895 struct tevent_req
*subreq
;
897 req
= tevent_req_create(mem_ctx
, &state
,
898 struct rpccli_samr_EnumDomains_state
);
902 state
->out_mem_ctx
= NULL
;
903 state
->dispatch_recv
= cli
->dispatch_recv
;
906 state
->orig
.in
.connect_handle
= _connect_handle
;
907 state
->orig
.in
.resume_handle
= _resume_handle
;
908 state
->orig
.in
.buf_size
= _buf_size
;
911 state
->orig
.out
.resume_handle
= _resume_handle
;
912 state
->orig
.out
.sam
= _sam
;
913 state
->orig
.out
.num_entries
= _num_entries
;
916 ZERO_STRUCT(state
->orig
.out
.result
);
918 state
->out_mem_ctx
= talloc_named_const(state
, 0,
919 "rpccli_samr_EnumDomains_out_memory");
920 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
921 return tevent_req_post(req
, ev
);
924 /* make a temporary copy, that we pass to the dispatch function */
925 state
->tmp
= state
->orig
;
927 subreq
= cli
->dispatch_send(state
, ev
, cli
,
929 NDR_SAMR_ENUMDOMAINS
,
931 if (tevent_req_nomem(subreq
, req
)) {
932 return tevent_req_post(req
, ev
);
934 tevent_req_set_callback(subreq
, rpccli_samr_EnumDomains_done
, req
);
938 static void rpccli_samr_EnumDomains_done(struct tevent_req
*subreq
)
940 struct tevent_req
*req
= tevent_req_callback_data(
941 subreq
, struct tevent_req
);
942 struct rpccli_samr_EnumDomains_state
*state
= tevent_req_data(
943 req
, struct rpccli_samr_EnumDomains_state
);
947 if (state
->out_mem_ctx
) {
948 mem_ctx
= state
->out_mem_ctx
;
953 status
= state
->dispatch_recv(subreq
, mem_ctx
);
955 if (!NT_STATUS_IS_OK(status
)) {
956 tevent_req_nterror(req
, status
);
960 /* Copy out parameters */
961 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
962 *state
->orig
.out
.sam
= *state
->tmp
.out
.sam
;
963 *state
->orig
.out
.num_entries
= *state
->tmp
.out
.num_entries
;
966 state
->orig
.out
.result
= state
->tmp
.out
.result
;
968 /* Reset temporary structure */
969 ZERO_STRUCT(state
->tmp
);
971 tevent_req_done(req
);
974 NTSTATUS
rpccli_samr_EnumDomains_recv(struct tevent_req
*req
,
978 struct rpccli_samr_EnumDomains_state
*state
= tevent_req_data(
979 req
, struct rpccli_samr_EnumDomains_state
);
982 if (tevent_req_is_nterror(req
, &status
)) {
983 tevent_req_received(req
);
987 /* Steal possbile out parameters to the callers context */
988 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
991 *result
= state
->orig
.out
.result
;
993 tevent_req_received(req
);
997 NTSTATUS
rpccli_samr_EnumDomains(struct rpc_pipe_client
*cli
,
999 struct policy_handle
*connect_handle
/* [in] [ref] */,
1000 uint32_t *resume_handle
/* [in,out] [ref] */,
1001 struct samr_SamArray
**sam
/* [out] [ref] */,
1002 uint32_t buf_size
/* [in] */,
1003 uint32_t *num_entries
/* [out] [ref] */)
1005 struct samr_EnumDomains r
;
1009 r
.in
.connect_handle
= connect_handle
;
1010 r
.in
.resume_handle
= resume_handle
;
1011 r
.in
.buf_size
= buf_size
;
1013 status
= cli
->dispatch(cli
,
1016 NDR_SAMR_ENUMDOMAINS
,
1019 if (!NT_STATUS_IS_OK(status
)) {
1023 if (NT_STATUS_IS_ERR(status
)) {
1027 /* Return variables */
1028 *resume_handle
= *r
.out
.resume_handle
;
1030 *num_entries
= *r
.out
.num_entries
;
1033 return r
.out
.result
;
1036 struct rpccli_samr_OpenDomain_state
{
1037 struct samr_OpenDomain orig
;
1038 struct samr_OpenDomain tmp
;
1039 TALLOC_CTX
*out_mem_ctx
;
1040 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1043 static void rpccli_samr_OpenDomain_done(struct tevent_req
*subreq
);
1045 struct tevent_req
*rpccli_samr_OpenDomain_send(TALLOC_CTX
*mem_ctx
,
1046 struct tevent_context
*ev
,
1047 struct rpc_pipe_client
*cli
,
1048 struct policy_handle
*_connect_handle
/* [in] [ref] */,
1049 uint32_t _access_mask
/* [in] */,
1050 struct dom_sid2
*_sid
/* [in] [ref] */,
1051 struct policy_handle
*_domain_handle
/* [out] [ref] */)
1053 struct tevent_req
*req
;
1054 struct rpccli_samr_OpenDomain_state
*state
;
1055 struct tevent_req
*subreq
;
1057 req
= tevent_req_create(mem_ctx
, &state
,
1058 struct rpccli_samr_OpenDomain_state
);
1062 state
->out_mem_ctx
= NULL
;
1063 state
->dispatch_recv
= cli
->dispatch_recv
;
1066 state
->orig
.in
.connect_handle
= _connect_handle
;
1067 state
->orig
.in
.access_mask
= _access_mask
;
1068 state
->orig
.in
.sid
= _sid
;
1070 /* Out parameters */
1071 state
->orig
.out
.domain_handle
= _domain_handle
;
1074 ZERO_STRUCT(state
->orig
.out
.result
);
1076 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1077 "rpccli_samr_OpenDomain_out_memory");
1078 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1079 return tevent_req_post(req
, ev
);
1082 /* make a temporary copy, that we pass to the dispatch function */
1083 state
->tmp
= state
->orig
;
1085 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1087 NDR_SAMR_OPENDOMAIN
,
1089 if (tevent_req_nomem(subreq
, req
)) {
1090 return tevent_req_post(req
, ev
);
1092 tevent_req_set_callback(subreq
, rpccli_samr_OpenDomain_done
, req
);
1096 static void rpccli_samr_OpenDomain_done(struct tevent_req
*subreq
)
1098 struct tevent_req
*req
= tevent_req_callback_data(
1099 subreq
, struct tevent_req
);
1100 struct rpccli_samr_OpenDomain_state
*state
= tevent_req_data(
1101 req
, struct rpccli_samr_OpenDomain_state
);
1103 TALLOC_CTX
*mem_ctx
;
1105 if (state
->out_mem_ctx
) {
1106 mem_ctx
= state
->out_mem_ctx
;
1111 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1112 TALLOC_FREE(subreq
);
1113 if (!NT_STATUS_IS_OK(status
)) {
1114 tevent_req_nterror(req
, status
);
1118 /* Copy out parameters */
1119 *state
->orig
.out
.domain_handle
= *state
->tmp
.out
.domain_handle
;
1122 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1124 /* Reset temporary structure */
1125 ZERO_STRUCT(state
->tmp
);
1127 tevent_req_done(req
);
1130 NTSTATUS
rpccli_samr_OpenDomain_recv(struct tevent_req
*req
,
1131 TALLOC_CTX
*mem_ctx
,
1134 struct rpccli_samr_OpenDomain_state
*state
= tevent_req_data(
1135 req
, struct rpccli_samr_OpenDomain_state
);
1138 if (tevent_req_is_nterror(req
, &status
)) {
1139 tevent_req_received(req
);
1143 /* Steal possbile out parameters to the callers context */
1144 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1147 *result
= state
->orig
.out
.result
;
1149 tevent_req_received(req
);
1150 return NT_STATUS_OK
;
1153 NTSTATUS
rpccli_samr_OpenDomain(struct rpc_pipe_client
*cli
,
1154 TALLOC_CTX
*mem_ctx
,
1155 struct policy_handle
*connect_handle
/* [in] [ref] */,
1156 uint32_t access_mask
/* [in] */,
1157 struct dom_sid2
*sid
/* [in] [ref] */,
1158 struct policy_handle
*domain_handle
/* [out] [ref] */)
1160 struct samr_OpenDomain r
;
1164 r
.in
.connect_handle
= connect_handle
;
1165 r
.in
.access_mask
= access_mask
;
1168 status
= cli
->dispatch(cli
,
1171 NDR_SAMR_OPENDOMAIN
,
1174 if (!NT_STATUS_IS_OK(status
)) {
1178 if (NT_STATUS_IS_ERR(status
)) {
1182 /* Return variables */
1183 *domain_handle
= *r
.out
.domain_handle
;
1186 return r
.out
.result
;
1189 struct rpccli_samr_QueryDomainInfo_state
{
1190 struct samr_QueryDomainInfo orig
;
1191 struct samr_QueryDomainInfo tmp
;
1192 TALLOC_CTX
*out_mem_ctx
;
1193 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1196 static void rpccli_samr_QueryDomainInfo_done(struct tevent_req
*subreq
);
1198 struct tevent_req
*rpccli_samr_QueryDomainInfo_send(TALLOC_CTX
*mem_ctx
,
1199 struct tevent_context
*ev
,
1200 struct rpc_pipe_client
*cli
,
1201 struct policy_handle
*_domain_handle
/* [in] [ref] */,
1202 enum samr_DomainInfoClass _level
/* [in] */,
1203 union samr_DomainInfo
**_info
/* [out] [ref,switch_is(level)] */)
1205 struct tevent_req
*req
;
1206 struct rpccli_samr_QueryDomainInfo_state
*state
;
1207 struct tevent_req
*subreq
;
1209 req
= tevent_req_create(mem_ctx
, &state
,
1210 struct rpccli_samr_QueryDomainInfo_state
);
1214 state
->out_mem_ctx
= NULL
;
1215 state
->dispatch_recv
= cli
->dispatch_recv
;
1218 state
->orig
.in
.domain_handle
= _domain_handle
;
1219 state
->orig
.in
.level
= _level
;
1221 /* Out parameters */
1222 state
->orig
.out
.info
= _info
;
1225 ZERO_STRUCT(state
->orig
.out
.result
);
1227 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1228 "rpccli_samr_QueryDomainInfo_out_memory");
1229 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1230 return tevent_req_post(req
, ev
);
1233 /* make a temporary copy, that we pass to the dispatch function */
1234 state
->tmp
= state
->orig
;
1236 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1238 NDR_SAMR_QUERYDOMAININFO
,
1240 if (tevent_req_nomem(subreq
, req
)) {
1241 return tevent_req_post(req
, ev
);
1243 tevent_req_set_callback(subreq
, rpccli_samr_QueryDomainInfo_done
, req
);
1247 static void rpccli_samr_QueryDomainInfo_done(struct tevent_req
*subreq
)
1249 struct tevent_req
*req
= tevent_req_callback_data(
1250 subreq
, struct tevent_req
);
1251 struct rpccli_samr_QueryDomainInfo_state
*state
= tevent_req_data(
1252 req
, struct rpccli_samr_QueryDomainInfo_state
);
1254 TALLOC_CTX
*mem_ctx
;
1256 if (state
->out_mem_ctx
) {
1257 mem_ctx
= state
->out_mem_ctx
;
1262 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1263 TALLOC_FREE(subreq
);
1264 if (!NT_STATUS_IS_OK(status
)) {
1265 tevent_req_nterror(req
, status
);
1269 /* Copy out parameters */
1270 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
1273 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1275 /* Reset temporary structure */
1276 ZERO_STRUCT(state
->tmp
);
1278 tevent_req_done(req
);
1281 NTSTATUS
rpccli_samr_QueryDomainInfo_recv(struct tevent_req
*req
,
1282 TALLOC_CTX
*mem_ctx
,
1285 struct rpccli_samr_QueryDomainInfo_state
*state
= tevent_req_data(
1286 req
, struct rpccli_samr_QueryDomainInfo_state
);
1289 if (tevent_req_is_nterror(req
, &status
)) {
1290 tevent_req_received(req
);
1294 /* Steal possbile out parameters to the callers context */
1295 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1298 *result
= state
->orig
.out
.result
;
1300 tevent_req_received(req
);
1301 return NT_STATUS_OK
;
1304 NTSTATUS
rpccli_samr_QueryDomainInfo(struct rpc_pipe_client
*cli
,
1305 TALLOC_CTX
*mem_ctx
,
1306 struct policy_handle
*domain_handle
/* [in] [ref] */,
1307 enum samr_DomainInfoClass level
/* [in] */,
1308 union samr_DomainInfo
**info
/* [out] [ref,switch_is(level)] */)
1310 struct samr_QueryDomainInfo r
;
1314 r
.in
.domain_handle
= domain_handle
;
1317 status
= cli
->dispatch(cli
,
1320 NDR_SAMR_QUERYDOMAININFO
,
1323 if (!NT_STATUS_IS_OK(status
)) {
1327 if (NT_STATUS_IS_ERR(status
)) {
1331 /* Return variables */
1332 *info
= *r
.out
.info
;
1335 return r
.out
.result
;
1338 struct rpccli_samr_SetDomainInfo_state
{
1339 struct samr_SetDomainInfo orig
;
1340 struct samr_SetDomainInfo tmp
;
1341 TALLOC_CTX
*out_mem_ctx
;
1342 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1345 static void rpccli_samr_SetDomainInfo_done(struct tevent_req
*subreq
);
1347 struct tevent_req
*rpccli_samr_SetDomainInfo_send(TALLOC_CTX
*mem_ctx
,
1348 struct tevent_context
*ev
,
1349 struct rpc_pipe_client
*cli
,
1350 struct policy_handle
*_domain_handle
/* [in] [ref] */,
1351 enum samr_DomainInfoClass _level
/* [in] */,
1352 union samr_DomainInfo
*_info
/* [in] [ref,switch_is(level)] */)
1354 struct tevent_req
*req
;
1355 struct rpccli_samr_SetDomainInfo_state
*state
;
1356 struct tevent_req
*subreq
;
1358 req
= tevent_req_create(mem_ctx
, &state
,
1359 struct rpccli_samr_SetDomainInfo_state
);
1363 state
->out_mem_ctx
= NULL
;
1364 state
->dispatch_recv
= cli
->dispatch_recv
;
1367 state
->orig
.in
.domain_handle
= _domain_handle
;
1368 state
->orig
.in
.level
= _level
;
1369 state
->orig
.in
.info
= _info
;
1371 /* Out parameters */
1374 ZERO_STRUCT(state
->orig
.out
.result
);
1376 /* make a temporary copy, that we pass to the dispatch function */
1377 state
->tmp
= state
->orig
;
1379 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1381 NDR_SAMR_SETDOMAININFO
,
1383 if (tevent_req_nomem(subreq
, req
)) {
1384 return tevent_req_post(req
, ev
);
1386 tevent_req_set_callback(subreq
, rpccli_samr_SetDomainInfo_done
, req
);
1390 static void rpccli_samr_SetDomainInfo_done(struct tevent_req
*subreq
)
1392 struct tevent_req
*req
= tevent_req_callback_data(
1393 subreq
, struct tevent_req
);
1394 struct rpccli_samr_SetDomainInfo_state
*state
= tevent_req_data(
1395 req
, struct rpccli_samr_SetDomainInfo_state
);
1397 TALLOC_CTX
*mem_ctx
;
1399 if (state
->out_mem_ctx
) {
1400 mem_ctx
= state
->out_mem_ctx
;
1405 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1406 TALLOC_FREE(subreq
);
1407 if (!NT_STATUS_IS_OK(status
)) {
1408 tevent_req_nterror(req
, status
);
1412 /* Copy out parameters */
1415 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1417 /* Reset temporary structure */
1418 ZERO_STRUCT(state
->tmp
);
1420 tevent_req_done(req
);
1423 NTSTATUS
rpccli_samr_SetDomainInfo_recv(struct tevent_req
*req
,
1424 TALLOC_CTX
*mem_ctx
,
1427 struct rpccli_samr_SetDomainInfo_state
*state
= tevent_req_data(
1428 req
, struct rpccli_samr_SetDomainInfo_state
);
1431 if (tevent_req_is_nterror(req
, &status
)) {
1432 tevent_req_received(req
);
1436 /* Steal possbile out parameters to the callers context */
1437 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1440 *result
= state
->orig
.out
.result
;
1442 tevent_req_received(req
);
1443 return NT_STATUS_OK
;
1446 NTSTATUS
rpccli_samr_SetDomainInfo(struct rpc_pipe_client
*cli
,
1447 TALLOC_CTX
*mem_ctx
,
1448 struct policy_handle
*domain_handle
/* [in] [ref] */,
1449 enum samr_DomainInfoClass level
/* [in] */,
1450 union samr_DomainInfo
*info
/* [in] [ref,switch_is(level)] */)
1452 struct samr_SetDomainInfo r
;
1456 r
.in
.domain_handle
= domain_handle
;
1460 status
= cli
->dispatch(cli
,
1463 NDR_SAMR_SETDOMAININFO
,
1466 if (!NT_STATUS_IS_OK(status
)) {
1470 if (NT_STATUS_IS_ERR(status
)) {
1474 /* Return variables */
1477 return r
.out
.result
;
1480 struct rpccli_samr_CreateDomainGroup_state
{
1481 struct samr_CreateDomainGroup orig
;
1482 struct samr_CreateDomainGroup tmp
;
1483 TALLOC_CTX
*out_mem_ctx
;
1484 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1487 static void rpccli_samr_CreateDomainGroup_done(struct tevent_req
*subreq
);
1489 struct tevent_req
*rpccli_samr_CreateDomainGroup_send(TALLOC_CTX
*mem_ctx
,
1490 struct tevent_context
*ev
,
1491 struct rpc_pipe_client
*cli
,
1492 struct policy_handle
*_domain_handle
/* [in] [ref] */,
1493 struct lsa_String
*_name
/* [in] [ref] */,
1494 uint32_t _access_mask
/* [in] */,
1495 struct policy_handle
*_group_handle
/* [out] [ref] */,
1496 uint32_t *_rid
/* [out] [ref] */)
1498 struct tevent_req
*req
;
1499 struct rpccli_samr_CreateDomainGroup_state
*state
;
1500 struct tevent_req
*subreq
;
1502 req
= tevent_req_create(mem_ctx
, &state
,
1503 struct rpccli_samr_CreateDomainGroup_state
);
1507 state
->out_mem_ctx
= NULL
;
1508 state
->dispatch_recv
= cli
->dispatch_recv
;
1511 state
->orig
.in
.domain_handle
= _domain_handle
;
1512 state
->orig
.in
.name
= _name
;
1513 state
->orig
.in
.access_mask
= _access_mask
;
1515 /* Out parameters */
1516 state
->orig
.out
.group_handle
= _group_handle
;
1517 state
->orig
.out
.rid
= _rid
;
1520 ZERO_STRUCT(state
->orig
.out
.result
);
1522 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1523 "rpccli_samr_CreateDomainGroup_out_memory");
1524 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1525 return tevent_req_post(req
, ev
);
1528 /* make a temporary copy, that we pass to the dispatch function */
1529 state
->tmp
= state
->orig
;
1531 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1533 NDR_SAMR_CREATEDOMAINGROUP
,
1535 if (tevent_req_nomem(subreq
, req
)) {
1536 return tevent_req_post(req
, ev
);
1538 tevent_req_set_callback(subreq
, rpccli_samr_CreateDomainGroup_done
, req
);
1542 static void rpccli_samr_CreateDomainGroup_done(struct tevent_req
*subreq
)
1544 struct tevent_req
*req
= tevent_req_callback_data(
1545 subreq
, struct tevent_req
);
1546 struct rpccli_samr_CreateDomainGroup_state
*state
= tevent_req_data(
1547 req
, struct rpccli_samr_CreateDomainGroup_state
);
1549 TALLOC_CTX
*mem_ctx
;
1551 if (state
->out_mem_ctx
) {
1552 mem_ctx
= state
->out_mem_ctx
;
1557 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1558 TALLOC_FREE(subreq
);
1559 if (!NT_STATUS_IS_OK(status
)) {
1560 tevent_req_nterror(req
, status
);
1564 /* Copy out parameters */
1565 *state
->orig
.out
.group_handle
= *state
->tmp
.out
.group_handle
;
1566 *state
->orig
.out
.rid
= *state
->tmp
.out
.rid
;
1569 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1571 /* Reset temporary structure */
1572 ZERO_STRUCT(state
->tmp
);
1574 tevent_req_done(req
);
1577 NTSTATUS
rpccli_samr_CreateDomainGroup_recv(struct tevent_req
*req
,
1578 TALLOC_CTX
*mem_ctx
,
1581 struct rpccli_samr_CreateDomainGroup_state
*state
= tevent_req_data(
1582 req
, struct rpccli_samr_CreateDomainGroup_state
);
1585 if (tevent_req_is_nterror(req
, &status
)) {
1586 tevent_req_received(req
);
1590 /* Steal possbile out parameters to the callers context */
1591 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1594 *result
= state
->orig
.out
.result
;
1596 tevent_req_received(req
);
1597 return NT_STATUS_OK
;
1600 NTSTATUS
rpccli_samr_CreateDomainGroup(struct rpc_pipe_client
*cli
,
1601 TALLOC_CTX
*mem_ctx
,
1602 struct policy_handle
*domain_handle
/* [in] [ref] */,
1603 struct lsa_String
*name
/* [in] [ref] */,
1604 uint32_t access_mask
/* [in] */,
1605 struct policy_handle
*group_handle
/* [out] [ref] */,
1606 uint32_t *rid
/* [out] [ref] */)
1608 struct samr_CreateDomainGroup r
;
1612 r
.in
.domain_handle
= domain_handle
;
1614 r
.in
.access_mask
= access_mask
;
1616 status
= cli
->dispatch(cli
,
1619 NDR_SAMR_CREATEDOMAINGROUP
,
1622 if (!NT_STATUS_IS_OK(status
)) {
1626 if (NT_STATUS_IS_ERR(status
)) {
1630 /* Return variables */
1631 *group_handle
= *r
.out
.group_handle
;
1635 return r
.out
.result
;
1638 struct rpccli_samr_EnumDomainGroups_state
{
1639 struct samr_EnumDomainGroups orig
;
1640 struct samr_EnumDomainGroups tmp
;
1641 TALLOC_CTX
*out_mem_ctx
;
1642 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1645 static void rpccli_samr_EnumDomainGroups_done(struct tevent_req
*subreq
);
1647 struct tevent_req
*rpccli_samr_EnumDomainGroups_send(TALLOC_CTX
*mem_ctx
,
1648 struct tevent_context
*ev
,
1649 struct rpc_pipe_client
*cli
,
1650 struct policy_handle
*_domain_handle
/* [in] [ref] */,
1651 uint32_t *_resume_handle
/* [in,out] [ref] */,
1652 struct samr_SamArray
**_sam
/* [out] [ref] */,
1653 uint32_t _max_size
/* [in] */,
1654 uint32_t *_num_entries
/* [out] [ref] */)
1656 struct tevent_req
*req
;
1657 struct rpccli_samr_EnumDomainGroups_state
*state
;
1658 struct tevent_req
*subreq
;
1660 req
= tevent_req_create(mem_ctx
, &state
,
1661 struct rpccli_samr_EnumDomainGroups_state
);
1665 state
->out_mem_ctx
= NULL
;
1666 state
->dispatch_recv
= cli
->dispatch_recv
;
1669 state
->orig
.in
.domain_handle
= _domain_handle
;
1670 state
->orig
.in
.resume_handle
= _resume_handle
;
1671 state
->orig
.in
.max_size
= _max_size
;
1673 /* Out parameters */
1674 state
->orig
.out
.resume_handle
= _resume_handle
;
1675 state
->orig
.out
.sam
= _sam
;
1676 state
->orig
.out
.num_entries
= _num_entries
;
1679 ZERO_STRUCT(state
->orig
.out
.result
);
1681 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1682 "rpccli_samr_EnumDomainGroups_out_memory");
1683 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1684 return tevent_req_post(req
, ev
);
1687 /* make a temporary copy, that we pass to the dispatch function */
1688 state
->tmp
= state
->orig
;
1690 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1692 NDR_SAMR_ENUMDOMAINGROUPS
,
1694 if (tevent_req_nomem(subreq
, req
)) {
1695 return tevent_req_post(req
, ev
);
1697 tevent_req_set_callback(subreq
, rpccli_samr_EnumDomainGroups_done
, req
);
1701 static void rpccli_samr_EnumDomainGroups_done(struct tevent_req
*subreq
)
1703 struct tevent_req
*req
= tevent_req_callback_data(
1704 subreq
, struct tevent_req
);
1705 struct rpccli_samr_EnumDomainGroups_state
*state
= tevent_req_data(
1706 req
, struct rpccli_samr_EnumDomainGroups_state
);
1708 TALLOC_CTX
*mem_ctx
;
1710 if (state
->out_mem_ctx
) {
1711 mem_ctx
= state
->out_mem_ctx
;
1716 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1717 TALLOC_FREE(subreq
);
1718 if (!NT_STATUS_IS_OK(status
)) {
1719 tevent_req_nterror(req
, status
);
1723 /* Copy out parameters */
1724 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
1725 *state
->orig
.out
.sam
= *state
->tmp
.out
.sam
;
1726 *state
->orig
.out
.num_entries
= *state
->tmp
.out
.num_entries
;
1729 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1731 /* Reset temporary structure */
1732 ZERO_STRUCT(state
->tmp
);
1734 tevent_req_done(req
);
1737 NTSTATUS
rpccli_samr_EnumDomainGroups_recv(struct tevent_req
*req
,
1738 TALLOC_CTX
*mem_ctx
,
1741 struct rpccli_samr_EnumDomainGroups_state
*state
= tevent_req_data(
1742 req
, struct rpccli_samr_EnumDomainGroups_state
);
1745 if (tevent_req_is_nterror(req
, &status
)) {
1746 tevent_req_received(req
);
1750 /* Steal possbile out parameters to the callers context */
1751 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1754 *result
= state
->orig
.out
.result
;
1756 tevent_req_received(req
);
1757 return NT_STATUS_OK
;
1760 NTSTATUS
rpccli_samr_EnumDomainGroups(struct rpc_pipe_client
*cli
,
1761 TALLOC_CTX
*mem_ctx
,
1762 struct policy_handle
*domain_handle
/* [in] [ref] */,
1763 uint32_t *resume_handle
/* [in,out] [ref] */,
1764 struct samr_SamArray
**sam
/* [out] [ref] */,
1765 uint32_t max_size
/* [in] */,
1766 uint32_t *num_entries
/* [out] [ref] */)
1768 struct samr_EnumDomainGroups r
;
1772 r
.in
.domain_handle
= domain_handle
;
1773 r
.in
.resume_handle
= resume_handle
;
1774 r
.in
.max_size
= max_size
;
1776 status
= cli
->dispatch(cli
,
1779 NDR_SAMR_ENUMDOMAINGROUPS
,
1782 if (!NT_STATUS_IS_OK(status
)) {
1786 if (NT_STATUS_IS_ERR(status
)) {
1790 /* Return variables */
1791 *resume_handle
= *r
.out
.resume_handle
;
1793 *num_entries
= *r
.out
.num_entries
;
1796 return r
.out
.result
;
1799 struct rpccli_samr_CreateUser_state
{
1800 struct samr_CreateUser orig
;
1801 struct samr_CreateUser tmp
;
1802 TALLOC_CTX
*out_mem_ctx
;
1803 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1806 static void rpccli_samr_CreateUser_done(struct tevent_req
*subreq
);
1808 struct tevent_req
*rpccli_samr_CreateUser_send(TALLOC_CTX
*mem_ctx
,
1809 struct tevent_context
*ev
,
1810 struct rpc_pipe_client
*cli
,
1811 struct policy_handle
*_domain_handle
/* [in] [ref] */,
1812 struct lsa_String
*_account_name
/* [in] [ref] */,
1813 uint32_t _access_mask
/* [in] */,
1814 struct policy_handle
*_user_handle
/* [out] [ref] */,
1815 uint32_t *_rid
/* [out] [ref] */)
1817 struct tevent_req
*req
;
1818 struct rpccli_samr_CreateUser_state
*state
;
1819 struct tevent_req
*subreq
;
1821 req
= tevent_req_create(mem_ctx
, &state
,
1822 struct rpccli_samr_CreateUser_state
);
1826 state
->out_mem_ctx
= NULL
;
1827 state
->dispatch_recv
= cli
->dispatch_recv
;
1830 state
->orig
.in
.domain_handle
= _domain_handle
;
1831 state
->orig
.in
.account_name
= _account_name
;
1832 state
->orig
.in
.access_mask
= _access_mask
;
1834 /* Out parameters */
1835 state
->orig
.out
.user_handle
= _user_handle
;
1836 state
->orig
.out
.rid
= _rid
;
1839 ZERO_STRUCT(state
->orig
.out
.result
);
1841 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1842 "rpccli_samr_CreateUser_out_memory");
1843 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1844 return tevent_req_post(req
, ev
);
1847 /* make a temporary copy, that we pass to the dispatch function */
1848 state
->tmp
= state
->orig
;
1850 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1852 NDR_SAMR_CREATEUSER
,
1854 if (tevent_req_nomem(subreq
, req
)) {
1855 return tevent_req_post(req
, ev
);
1857 tevent_req_set_callback(subreq
, rpccli_samr_CreateUser_done
, req
);
1861 static void rpccli_samr_CreateUser_done(struct tevent_req
*subreq
)
1863 struct tevent_req
*req
= tevent_req_callback_data(
1864 subreq
, struct tevent_req
);
1865 struct rpccli_samr_CreateUser_state
*state
= tevent_req_data(
1866 req
, struct rpccli_samr_CreateUser_state
);
1868 TALLOC_CTX
*mem_ctx
;
1870 if (state
->out_mem_ctx
) {
1871 mem_ctx
= state
->out_mem_ctx
;
1876 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1877 TALLOC_FREE(subreq
);
1878 if (!NT_STATUS_IS_OK(status
)) {
1879 tevent_req_nterror(req
, status
);
1883 /* Copy out parameters */
1884 *state
->orig
.out
.user_handle
= *state
->tmp
.out
.user_handle
;
1885 *state
->orig
.out
.rid
= *state
->tmp
.out
.rid
;
1888 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1890 /* Reset temporary structure */
1891 ZERO_STRUCT(state
->tmp
);
1893 tevent_req_done(req
);
1896 NTSTATUS
rpccli_samr_CreateUser_recv(struct tevent_req
*req
,
1897 TALLOC_CTX
*mem_ctx
,
1900 struct rpccli_samr_CreateUser_state
*state
= tevent_req_data(
1901 req
, struct rpccli_samr_CreateUser_state
);
1904 if (tevent_req_is_nterror(req
, &status
)) {
1905 tevent_req_received(req
);
1909 /* Steal possbile out parameters to the callers context */
1910 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1913 *result
= state
->orig
.out
.result
;
1915 tevent_req_received(req
);
1916 return NT_STATUS_OK
;
1919 NTSTATUS
rpccli_samr_CreateUser(struct rpc_pipe_client
*cli
,
1920 TALLOC_CTX
*mem_ctx
,
1921 struct policy_handle
*domain_handle
/* [in] [ref] */,
1922 struct lsa_String
*account_name
/* [in] [ref] */,
1923 uint32_t access_mask
/* [in] */,
1924 struct policy_handle
*user_handle
/* [out] [ref] */,
1925 uint32_t *rid
/* [out] [ref] */)
1927 struct samr_CreateUser r
;
1931 r
.in
.domain_handle
= domain_handle
;
1932 r
.in
.account_name
= account_name
;
1933 r
.in
.access_mask
= access_mask
;
1935 status
= cli
->dispatch(cli
,
1938 NDR_SAMR_CREATEUSER
,
1941 if (!NT_STATUS_IS_OK(status
)) {
1945 if (NT_STATUS_IS_ERR(status
)) {
1949 /* Return variables */
1950 *user_handle
= *r
.out
.user_handle
;
1954 return r
.out
.result
;
1957 struct rpccli_samr_EnumDomainUsers_state
{
1958 struct samr_EnumDomainUsers orig
;
1959 struct samr_EnumDomainUsers tmp
;
1960 TALLOC_CTX
*out_mem_ctx
;
1961 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1964 static void rpccli_samr_EnumDomainUsers_done(struct tevent_req
*subreq
);
1966 struct tevent_req
*rpccli_samr_EnumDomainUsers_send(TALLOC_CTX
*mem_ctx
,
1967 struct tevent_context
*ev
,
1968 struct rpc_pipe_client
*cli
,
1969 struct policy_handle
*_domain_handle
/* [in] [ref] */,
1970 uint32_t *_resume_handle
/* [in,out] [ref] */,
1971 uint32_t _acct_flags
/* [in] */,
1972 struct samr_SamArray
**_sam
/* [out] [ref] */,
1973 uint32_t _max_size
/* [in] */,
1974 uint32_t *_num_entries
/* [out] [ref] */)
1976 struct tevent_req
*req
;
1977 struct rpccli_samr_EnumDomainUsers_state
*state
;
1978 struct tevent_req
*subreq
;
1980 req
= tevent_req_create(mem_ctx
, &state
,
1981 struct rpccli_samr_EnumDomainUsers_state
);
1985 state
->out_mem_ctx
= NULL
;
1986 state
->dispatch_recv
= cli
->dispatch_recv
;
1989 state
->orig
.in
.domain_handle
= _domain_handle
;
1990 state
->orig
.in
.resume_handle
= _resume_handle
;
1991 state
->orig
.in
.acct_flags
= _acct_flags
;
1992 state
->orig
.in
.max_size
= _max_size
;
1994 /* Out parameters */
1995 state
->orig
.out
.resume_handle
= _resume_handle
;
1996 state
->orig
.out
.sam
= _sam
;
1997 state
->orig
.out
.num_entries
= _num_entries
;
2000 ZERO_STRUCT(state
->orig
.out
.result
);
2002 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2003 "rpccli_samr_EnumDomainUsers_out_memory");
2004 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2005 return tevent_req_post(req
, ev
);
2008 /* make a temporary copy, that we pass to the dispatch function */
2009 state
->tmp
= state
->orig
;
2011 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2013 NDR_SAMR_ENUMDOMAINUSERS
,
2015 if (tevent_req_nomem(subreq
, req
)) {
2016 return tevent_req_post(req
, ev
);
2018 tevent_req_set_callback(subreq
, rpccli_samr_EnumDomainUsers_done
, req
);
2022 static void rpccli_samr_EnumDomainUsers_done(struct tevent_req
*subreq
)
2024 struct tevent_req
*req
= tevent_req_callback_data(
2025 subreq
, struct tevent_req
);
2026 struct rpccli_samr_EnumDomainUsers_state
*state
= tevent_req_data(
2027 req
, struct rpccli_samr_EnumDomainUsers_state
);
2029 TALLOC_CTX
*mem_ctx
;
2031 if (state
->out_mem_ctx
) {
2032 mem_ctx
= state
->out_mem_ctx
;
2037 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2038 TALLOC_FREE(subreq
);
2039 if (!NT_STATUS_IS_OK(status
)) {
2040 tevent_req_nterror(req
, status
);
2044 /* Copy out parameters */
2045 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
2046 *state
->orig
.out
.sam
= *state
->tmp
.out
.sam
;
2047 *state
->orig
.out
.num_entries
= *state
->tmp
.out
.num_entries
;
2050 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2052 /* Reset temporary structure */
2053 ZERO_STRUCT(state
->tmp
);
2055 tevent_req_done(req
);
2058 NTSTATUS
rpccli_samr_EnumDomainUsers_recv(struct tevent_req
*req
,
2059 TALLOC_CTX
*mem_ctx
,
2062 struct rpccli_samr_EnumDomainUsers_state
*state
= tevent_req_data(
2063 req
, struct rpccli_samr_EnumDomainUsers_state
);
2066 if (tevent_req_is_nterror(req
, &status
)) {
2067 tevent_req_received(req
);
2071 /* Steal possbile out parameters to the callers context */
2072 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2075 *result
= state
->orig
.out
.result
;
2077 tevent_req_received(req
);
2078 return NT_STATUS_OK
;
2081 NTSTATUS
rpccli_samr_EnumDomainUsers(struct rpc_pipe_client
*cli
,
2082 TALLOC_CTX
*mem_ctx
,
2083 struct policy_handle
*domain_handle
/* [in] [ref] */,
2084 uint32_t *resume_handle
/* [in,out] [ref] */,
2085 uint32_t acct_flags
/* [in] */,
2086 struct samr_SamArray
**sam
/* [out] [ref] */,
2087 uint32_t max_size
/* [in] */,
2088 uint32_t *num_entries
/* [out] [ref] */)
2090 struct samr_EnumDomainUsers r
;
2094 r
.in
.domain_handle
= domain_handle
;
2095 r
.in
.resume_handle
= resume_handle
;
2096 r
.in
.acct_flags
= acct_flags
;
2097 r
.in
.max_size
= max_size
;
2099 status
= cli
->dispatch(cli
,
2102 NDR_SAMR_ENUMDOMAINUSERS
,
2105 if (!NT_STATUS_IS_OK(status
)) {
2109 if (NT_STATUS_IS_ERR(status
)) {
2113 /* Return variables */
2114 *resume_handle
= *r
.out
.resume_handle
;
2116 *num_entries
= *r
.out
.num_entries
;
2119 return r
.out
.result
;
2122 struct rpccli_samr_CreateDomAlias_state
{
2123 struct samr_CreateDomAlias orig
;
2124 struct samr_CreateDomAlias tmp
;
2125 TALLOC_CTX
*out_mem_ctx
;
2126 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2129 static void rpccli_samr_CreateDomAlias_done(struct tevent_req
*subreq
);
2131 struct tevent_req
*rpccli_samr_CreateDomAlias_send(TALLOC_CTX
*mem_ctx
,
2132 struct tevent_context
*ev
,
2133 struct rpc_pipe_client
*cli
,
2134 struct policy_handle
*_domain_handle
/* [in] [ref] */,
2135 struct lsa_String
*_alias_name
/* [in] [ref] */,
2136 uint32_t _access_mask
/* [in] */,
2137 struct policy_handle
*_alias_handle
/* [out] [ref] */,
2138 uint32_t *_rid
/* [out] [ref] */)
2140 struct tevent_req
*req
;
2141 struct rpccli_samr_CreateDomAlias_state
*state
;
2142 struct tevent_req
*subreq
;
2144 req
= tevent_req_create(mem_ctx
, &state
,
2145 struct rpccli_samr_CreateDomAlias_state
);
2149 state
->out_mem_ctx
= NULL
;
2150 state
->dispatch_recv
= cli
->dispatch_recv
;
2153 state
->orig
.in
.domain_handle
= _domain_handle
;
2154 state
->orig
.in
.alias_name
= _alias_name
;
2155 state
->orig
.in
.access_mask
= _access_mask
;
2157 /* Out parameters */
2158 state
->orig
.out
.alias_handle
= _alias_handle
;
2159 state
->orig
.out
.rid
= _rid
;
2162 ZERO_STRUCT(state
->orig
.out
.result
);
2164 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2165 "rpccli_samr_CreateDomAlias_out_memory");
2166 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2167 return tevent_req_post(req
, ev
);
2170 /* make a temporary copy, that we pass to the dispatch function */
2171 state
->tmp
= state
->orig
;
2173 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2175 NDR_SAMR_CREATEDOMALIAS
,
2177 if (tevent_req_nomem(subreq
, req
)) {
2178 return tevent_req_post(req
, ev
);
2180 tevent_req_set_callback(subreq
, rpccli_samr_CreateDomAlias_done
, req
);
2184 static void rpccli_samr_CreateDomAlias_done(struct tevent_req
*subreq
)
2186 struct tevent_req
*req
= tevent_req_callback_data(
2187 subreq
, struct tevent_req
);
2188 struct rpccli_samr_CreateDomAlias_state
*state
= tevent_req_data(
2189 req
, struct rpccli_samr_CreateDomAlias_state
);
2191 TALLOC_CTX
*mem_ctx
;
2193 if (state
->out_mem_ctx
) {
2194 mem_ctx
= state
->out_mem_ctx
;
2199 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2200 TALLOC_FREE(subreq
);
2201 if (!NT_STATUS_IS_OK(status
)) {
2202 tevent_req_nterror(req
, status
);
2206 /* Copy out parameters */
2207 *state
->orig
.out
.alias_handle
= *state
->tmp
.out
.alias_handle
;
2208 *state
->orig
.out
.rid
= *state
->tmp
.out
.rid
;
2211 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2213 /* Reset temporary structure */
2214 ZERO_STRUCT(state
->tmp
);
2216 tevent_req_done(req
);
2219 NTSTATUS
rpccli_samr_CreateDomAlias_recv(struct tevent_req
*req
,
2220 TALLOC_CTX
*mem_ctx
,
2223 struct rpccli_samr_CreateDomAlias_state
*state
= tevent_req_data(
2224 req
, struct rpccli_samr_CreateDomAlias_state
);
2227 if (tevent_req_is_nterror(req
, &status
)) {
2228 tevent_req_received(req
);
2232 /* Steal possbile out parameters to the callers context */
2233 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2236 *result
= state
->orig
.out
.result
;
2238 tevent_req_received(req
);
2239 return NT_STATUS_OK
;
2242 NTSTATUS
rpccli_samr_CreateDomAlias(struct rpc_pipe_client
*cli
,
2243 TALLOC_CTX
*mem_ctx
,
2244 struct policy_handle
*domain_handle
/* [in] [ref] */,
2245 struct lsa_String
*alias_name
/* [in] [ref] */,
2246 uint32_t access_mask
/* [in] */,
2247 struct policy_handle
*alias_handle
/* [out] [ref] */,
2248 uint32_t *rid
/* [out] [ref] */)
2250 struct samr_CreateDomAlias r
;
2254 r
.in
.domain_handle
= domain_handle
;
2255 r
.in
.alias_name
= alias_name
;
2256 r
.in
.access_mask
= access_mask
;
2258 status
= cli
->dispatch(cli
,
2261 NDR_SAMR_CREATEDOMALIAS
,
2264 if (!NT_STATUS_IS_OK(status
)) {
2268 if (NT_STATUS_IS_ERR(status
)) {
2272 /* Return variables */
2273 *alias_handle
= *r
.out
.alias_handle
;
2277 return r
.out
.result
;
2280 struct rpccli_samr_EnumDomainAliases_state
{
2281 struct samr_EnumDomainAliases orig
;
2282 struct samr_EnumDomainAliases tmp
;
2283 TALLOC_CTX
*out_mem_ctx
;
2284 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2287 static void rpccli_samr_EnumDomainAliases_done(struct tevent_req
*subreq
);
2289 struct tevent_req
*rpccli_samr_EnumDomainAliases_send(TALLOC_CTX
*mem_ctx
,
2290 struct tevent_context
*ev
,
2291 struct rpc_pipe_client
*cli
,
2292 struct policy_handle
*_domain_handle
/* [in] [ref] */,
2293 uint32_t *_resume_handle
/* [in,out] [ref] */,
2294 struct samr_SamArray
**_sam
/* [out] [ref] */,
2295 uint32_t _max_size
/* [in] */,
2296 uint32_t *_num_entries
/* [out] [ref] */)
2298 struct tevent_req
*req
;
2299 struct rpccli_samr_EnumDomainAliases_state
*state
;
2300 struct tevent_req
*subreq
;
2302 req
= tevent_req_create(mem_ctx
, &state
,
2303 struct rpccli_samr_EnumDomainAliases_state
);
2307 state
->out_mem_ctx
= NULL
;
2308 state
->dispatch_recv
= cli
->dispatch_recv
;
2311 state
->orig
.in
.domain_handle
= _domain_handle
;
2312 state
->orig
.in
.resume_handle
= _resume_handle
;
2313 state
->orig
.in
.max_size
= _max_size
;
2315 /* Out parameters */
2316 state
->orig
.out
.resume_handle
= _resume_handle
;
2317 state
->orig
.out
.sam
= _sam
;
2318 state
->orig
.out
.num_entries
= _num_entries
;
2321 ZERO_STRUCT(state
->orig
.out
.result
);
2323 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2324 "rpccli_samr_EnumDomainAliases_out_memory");
2325 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2326 return tevent_req_post(req
, ev
);
2329 /* make a temporary copy, that we pass to the dispatch function */
2330 state
->tmp
= state
->orig
;
2332 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2334 NDR_SAMR_ENUMDOMAINALIASES
,
2336 if (tevent_req_nomem(subreq
, req
)) {
2337 return tevent_req_post(req
, ev
);
2339 tevent_req_set_callback(subreq
, rpccli_samr_EnumDomainAliases_done
, req
);
2343 static void rpccli_samr_EnumDomainAliases_done(struct tevent_req
*subreq
)
2345 struct tevent_req
*req
= tevent_req_callback_data(
2346 subreq
, struct tevent_req
);
2347 struct rpccli_samr_EnumDomainAliases_state
*state
= tevent_req_data(
2348 req
, struct rpccli_samr_EnumDomainAliases_state
);
2350 TALLOC_CTX
*mem_ctx
;
2352 if (state
->out_mem_ctx
) {
2353 mem_ctx
= state
->out_mem_ctx
;
2358 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2359 TALLOC_FREE(subreq
);
2360 if (!NT_STATUS_IS_OK(status
)) {
2361 tevent_req_nterror(req
, status
);
2365 /* Copy out parameters */
2366 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
2367 *state
->orig
.out
.sam
= *state
->tmp
.out
.sam
;
2368 *state
->orig
.out
.num_entries
= *state
->tmp
.out
.num_entries
;
2371 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2373 /* Reset temporary structure */
2374 ZERO_STRUCT(state
->tmp
);
2376 tevent_req_done(req
);
2379 NTSTATUS
rpccli_samr_EnumDomainAliases_recv(struct tevent_req
*req
,
2380 TALLOC_CTX
*mem_ctx
,
2383 struct rpccli_samr_EnumDomainAliases_state
*state
= tevent_req_data(
2384 req
, struct rpccli_samr_EnumDomainAliases_state
);
2387 if (tevent_req_is_nterror(req
, &status
)) {
2388 tevent_req_received(req
);
2392 /* Steal possbile out parameters to the callers context */
2393 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2396 *result
= state
->orig
.out
.result
;
2398 tevent_req_received(req
);
2399 return NT_STATUS_OK
;
2402 NTSTATUS
rpccli_samr_EnumDomainAliases(struct rpc_pipe_client
*cli
,
2403 TALLOC_CTX
*mem_ctx
,
2404 struct policy_handle
*domain_handle
/* [in] [ref] */,
2405 uint32_t *resume_handle
/* [in,out] [ref] */,
2406 struct samr_SamArray
**sam
/* [out] [ref] */,
2407 uint32_t max_size
/* [in] */,
2408 uint32_t *num_entries
/* [out] [ref] */)
2410 struct samr_EnumDomainAliases r
;
2414 r
.in
.domain_handle
= domain_handle
;
2415 r
.in
.resume_handle
= resume_handle
;
2416 r
.in
.max_size
= max_size
;
2418 status
= cli
->dispatch(cli
,
2421 NDR_SAMR_ENUMDOMAINALIASES
,
2424 if (!NT_STATUS_IS_OK(status
)) {
2428 if (NT_STATUS_IS_ERR(status
)) {
2432 /* Return variables */
2433 *resume_handle
= *r
.out
.resume_handle
;
2435 *num_entries
= *r
.out
.num_entries
;
2438 return r
.out
.result
;
2441 struct rpccli_samr_GetAliasMembership_state
{
2442 struct samr_GetAliasMembership orig
;
2443 struct samr_GetAliasMembership tmp
;
2444 TALLOC_CTX
*out_mem_ctx
;
2445 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2448 static void rpccli_samr_GetAliasMembership_done(struct tevent_req
*subreq
);
2450 struct tevent_req
*rpccli_samr_GetAliasMembership_send(TALLOC_CTX
*mem_ctx
,
2451 struct tevent_context
*ev
,
2452 struct rpc_pipe_client
*cli
,
2453 struct policy_handle
*_domain_handle
/* [in] [ref] */,
2454 struct lsa_SidArray
*_sids
/* [in] [ref] */,
2455 struct samr_Ids
*_rids
/* [out] [ref] */)
2457 struct tevent_req
*req
;
2458 struct rpccli_samr_GetAliasMembership_state
*state
;
2459 struct tevent_req
*subreq
;
2461 req
= tevent_req_create(mem_ctx
, &state
,
2462 struct rpccli_samr_GetAliasMembership_state
);
2466 state
->out_mem_ctx
= NULL
;
2467 state
->dispatch_recv
= cli
->dispatch_recv
;
2470 state
->orig
.in
.domain_handle
= _domain_handle
;
2471 state
->orig
.in
.sids
= _sids
;
2473 /* Out parameters */
2474 state
->orig
.out
.rids
= _rids
;
2477 ZERO_STRUCT(state
->orig
.out
.result
);
2479 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2480 "rpccli_samr_GetAliasMembership_out_memory");
2481 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2482 return tevent_req_post(req
, ev
);
2485 /* make a temporary copy, that we pass to the dispatch function */
2486 state
->tmp
= state
->orig
;
2488 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2490 NDR_SAMR_GETALIASMEMBERSHIP
,
2492 if (tevent_req_nomem(subreq
, req
)) {
2493 return tevent_req_post(req
, ev
);
2495 tevent_req_set_callback(subreq
, rpccli_samr_GetAliasMembership_done
, req
);
2499 static void rpccli_samr_GetAliasMembership_done(struct tevent_req
*subreq
)
2501 struct tevent_req
*req
= tevent_req_callback_data(
2502 subreq
, struct tevent_req
);
2503 struct rpccli_samr_GetAliasMembership_state
*state
= tevent_req_data(
2504 req
, struct rpccli_samr_GetAliasMembership_state
);
2506 TALLOC_CTX
*mem_ctx
;
2508 if (state
->out_mem_ctx
) {
2509 mem_ctx
= state
->out_mem_ctx
;
2514 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2515 TALLOC_FREE(subreq
);
2516 if (!NT_STATUS_IS_OK(status
)) {
2517 tevent_req_nterror(req
, status
);
2521 /* Copy out parameters */
2522 *state
->orig
.out
.rids
= *state
->tmp
.out
.rids
;
2525 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2527 /* Reset temporary structure */
2528 ZERO_STRUCT(state
->tmp
);
2530 tevent_req_done(req
);
2533 NTSTATUS
rpccli_samr_GetAliasMembership_recv(struct tevent_req
*req
,
2534 TALLOC_CTX
*mem_ctx
,
2537 struct rpccli_samr_GetAliasMembership_state
*state
= tevent_req_data(
2538 req
, struct rpccli_samr_GetAliasMembership_state
);
2541 if (tevent_req_is_nterror(req
, &status
)) {
2542 tevent_req_received(req
);
2546 /* Steal possbile out parameters to the callers context */
2547 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2550 *result
= state
->orig
.out
.result
;
2552 tevent_req_received(req
);
2553 return NT_STATUS_OK
;
2556 NTSTATUS
rpccli_samr_GetAliasMembership(struct rpc_pipe_client
*cli
,
2557 TALLOC_CTX
*mem_ctx
,
2558 struct policy_handle
*domain_handle
/* [in] [ref] */,
2559 struct lsa_SidArray
*sids
/* [in] [ref] */,
2560 struct samr_Ids
*rids
/* [out] [ref] */)
2562 struct samr_GetAliasMembership r
;
2566 r
.in
.domain_handle
= domain_handle
;
2569 status
= cli
->dispatch(cli
,
2572 NDR_SAMR_GETALIASMEMBERSHIP
,
2575 if (!NT_STATUS_IS_OK(status
)) {
2579 if (NT_STATUS_IS_ERR(status
)) {
2583 /* Return variables */
2584 *rids
= *r
.out
.rids
;
2587 return r
.out
.result
;
2590 struct rpccli_samr_LookupNames_state
{
2591 struct samr_LookupNames orig
;
2592 struct samr_LookupNames tmp
;
2593 TALLOC_CTX
*out_mem_ctx
;
2594 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2597 static void rpccli_samr_LookupNames_done(struct tevent_req
*subreq
);
2599 struct tevent_req
*rpccli_samr_LookupNames_send(TALLOC_CTX
*mem_ctx
,
2600 struct tevent_context
*ev
,
2601 struct rpc_pipe_client
*cli
,
2602 struct policy_handle
*_domain_handle
/* [in] [ref] */,
2603 uint32_t _num_names
/* [in] [range(0,1000)] */,
2604 struct lsa_String
*_names
/* [in] [length_is(num_names),size_is(1000)] */,
2605 struct samr_Ids
*_rids
/* [out] [ref] */,
2606 struct samr_Ids
*_types
/* [out] [ref] */)
2608 struct tevent_req
*req
;
2609 struct rpccli_samr_LookupNames_state
*state
;
2610 struct tevent_req
*subreq
;
2612 req
= tevent_req_create(mem_ctx
, &state
,
2613 struct rpccli_samr_LookupNames_state
);
2617 state
->out_mem_ctx
= NULL
;
2618 state
->dispatch_recv
= cli
->dispatch_recv
;
2621 state
->orig
.in
.domain_handle
= _domain_handle
;
2622 state
->orig
.in
.num_names
= _num_names
;
2623 state
->orig
.in
.names
= _names
;
2625 /* Out parameters */
2626 state
->orig
.out
.rids
= _rids
;
2627 state
->orig
.out
.types
= _types
;
2630 ZERO_STRUCT(state
->orig
.out
.result
);
2632 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2633 "rpccli_samr_LookupNames_out_memory");
2634 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2635 return tevent_req_post(req
, ev
);
2638 /* make a temporary copy, that we pass to the dispatch function */
2639 state
->tmp
= state
->orig
;
2641 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2643 NDR_SAMR_LOOKUPNAMES
,
2645 if (tevent_req_nomem(subreq
, req
)) {
2646 return tevent_req_post(req
, ev
);
2648 tevent_req_set_callback(subreq
, rpccli_samr_LookupNames_done
, req
);
2652 static void rpccli_samr_LookupNames_done(struct tevent_req
*subreq
)
2654 struct tevent_req
*req
= tevent_req_callback_data(
2655 subreq
, struct tevent_req
);
2656 struct rpccli_samr_LookupNames_state
*state
= tevent_req_data(
2657 req
, struct rpccli_samr_LookupNames_state
);
2659 TALLOC_CTX
*mem_ctx
;
2661 if (state
->out_mem_ctx
) {
2662 mem_ctx
= state
->out_mem_ctx
;
2667 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2668 TALLOC_FREE(subreq
);
2669 if (!NT_STATUS_IS_OK(status
)) {
2670 tevent_req_nterror(req
, status
);
2674 /* Copy out parameters */
2675 *state
->orig
.out
.rids
= *state
->tmp
.out
.rids
;
2676 *state
->orig
.out
.types
= *state
->tmp
.out
.types
;
2679 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2681 /* Reset temporary structure */
2682 ZERO_STRUCT(state
->tmp
);
2684 tevent_req_done(req
);
2687 NTSTATUS
rpccli_samr_LookupNames_recv(struct tevent_req
*req
,
2688 TALLOC_CTX
*mem_ctx
,
2691 struct rpccli_samr_LookupNames_state
*state
= tevent_req_data(
2692 req
, struct rpccli_samr_LookupNames_state
);
2695 if (tevent_req_is_nterror(req
, &status
)) {
2696 tevent_req_received(req
);
2700 /* Steal possbile out parameters to the callers context */
2701 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2704 *result
= state
->orig
.out
.result
;
2706 tevent_req_received(req
);
2707 return NT_STATUS_OK
;
2710 NTSTATUS
rpccli_samr_LookupNames(struct rpc_pipe_client
*cli
,
2711 TALLOC_CTX
*mem_ctx
,
2712 struct policy_handle
*domain_handle
/* [in] [ref] */,
2713 uint32_t num_names
/* [in] [range(0,1000)] */,
2714 struct lsa_String
*names
/* [in] [length_is(num_names),size_is(1000)] */,
2715 struct samr_Ids
*rids
/* [out] [ref] */,
2716 struct samr_Ids
*types
/* [out] [ref] */)
2718 struct samr_LookupNames r
;
2722 r
.in
.domain_handle
= domain_handle
;
2723 r
.in
.num_names
= num_names
;
2726 status
= cli
->dispatch(cli
,
2729 NDR_SAMR_LOOKUPNAMES
,
2732 if (!NT_STATUS_IS_OK(status
)) {
2736 if (NT_STATUS_IS_ERR(status
)) {
2740 /* Return variables */
2741 *rids
= *r
.out
.rids
;
2742 *types
= *r
.out
.types
;
2745 return r
.out
.result
;
2748 struct rpccli_samr_LookupRids_state
{
2749 struct samr_LookupRids orig
;
2750 struct samr_LookupRids tmp
;
2751 TALLOC_CTX
*out_mem_ctx
;
2752 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2755 static void rpccli_samr_LookupRids_done(struct tevent_req
*subreq
);
2757 struct tevent_req
*rpccli_samr_LookupRids_send(TALLOC_CTX
*mem_ctx
,
2758 struct tevent_context
*ev
,
2759 struct rpc_pipe_client
*cli
,
2760 struct policy_handle
*_domain_handle
/* [in] [ref] */,
2761 uint32_t _num_rids
/* [in] [range(0,1000)] */,
2762 uint32_t *_rids
/* [in] [length_is(num_rids),size_is(1000)] */,
2763 struct lsa_Strings
*_names
/* [out] [ref] */,
2764 struct samr_Ids
*_types
/* [out] [ref] */)
2766 struct tevent_req
*req
;
2767 struct rpccli_samr_LookupRids_state
*state
;
2768 struct tevent_req
*subreq
;
2770 req
= tevent_req_create(mem_ctx
, &state
,
2771 struct rpccli_samr_LookupRids_state
);
2775 state
->out_mem_ctx
= NULL
;
2776 state
->dispatch_recv
= cli
->dispatch_recv
;
2779 state
->orig
.in
.domain_handle
= _domain_handle
;
2780 state
->orig
.in
.num_rids
= _num_rids
;
2781 state
->orig
.in
.rids
= _rids
;
2783 /* Out parameters */
2784 state
->orig
.out
.names
= _names
;
2785 state
->orig
.out
.types
= _types
;
2788 ZERO_STRUCT(state
->orig
.out
.result
);
2790 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2791 "rpccli_samr_LookupRids_out_memory");
2792 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2793 return tevent_req_post(req
, ev
);
2796 /* make a temporary copy, that we pass to the dispatch function */
2797 state
->tmp
= state
->orig
;
2799 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2801 NDR_SAMR_LOOKUPRIDS
,
2803 if (tevent_req_nomem(subreq
, req
)) {
2804 return tevent_req_post(req
, ev
);
2806 tevent_req_set_callback(subreq
, rpccli_samr_LookupRids_done
, req
);
2810 static void rpccli_samr_LookupRids_done(struct tevent_req
*subreq
)
2812 struct tevent_req
*req
= tevent_req_callback_data(
2813 subreq
, struct tevent_req
);
2814 struct rpccli_samr_LookupRids_state
*state
= tevent_req_data(
2815 req
, struct rpccli_samr_LookupRids_state
);
2817 TALLOC_CTX
*mem_ctx
;
2819 if (state
->out_mem_ctx
) {
2820 mem_ctx
= state
->out_mem_ctx
;
2825 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2826 TALLOC_FREE(subreq
);
2827 if (!NT_STATUS_IS_OK(status
)) {
2828 tevent_req_nterror(req
, status
);
2832 /* Copy out parameters */
2833 *state
->orig
.out
.names
= *state
->tmp
.out
.names
;
2834 *state
->orig
.out
.types
= *state
->tmp
.out
.types
;
2837 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2839 /* Reset temporary structure */
2840 ZERO_STRUCT(state
->tmp
);
2842 tevent_req_done(req
);
2845 NTSTATUS
rpccli_samr_LookupRids_recv(struct tevent_req
*req
,
2846 TALLOC_CTX
*mem_ctx
,
2849 struct rpccli_samr_LookupRids_state
*state
= tevent_req_data(
2850 req
, struct rpccli_samr_LookupRids_state
);
2853 if (tevent_req_is_nterror(req
, &status
)) {
2854 tevent_req_received(req
);
2858 /* Steal possbile out parameters to the callers context */
2859 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2862 *result
= state
->orig
.out
.result
;
2864 tevent_req_received(req
);
2865 return NT_STATUS_OK
;
2868 NTSTATUS
rpccli_samr_LookupRids(struct rpc_pipe_client
*cli
,
2869 TALLOC_CTX
*mem_ctx
,
2870 struct policy_handle
*domain_handle
/* [in] [ref] */,
2871 uint32_t num_rids
/* [in] [range(0,1000)] */,
2872 uint32_t *rids
/* [in] [length_is(num_rids),size_is(1000)] */,
2873 struct lsa_Strings
*names
/* [out] [ref] */,
2874 struct samr_Ids
*types
/* [out] [ref] */)
2876 struct samr_LookupRids r
;
2880 r
.in
.domain_handle
= domain_handle
;
2881 r
.in
.num_rids
= num_rids
;
2884 status
= cli
->dispatch(cli
,
2887 NDR_SAMR_LOOKUPRIDS
,
2890 if (!NT_STATUS_IS_OK(status
)) {
2894 if (NT_STATUS_IS_ERR(status
)) {
2898 /* Return variables */
2899 *names
= *r
.out
.names
;
2900 *types
= *r
.out
.types
;
2903 return r
.out
.result
;
2906 struct rpccli_samr_OpenGroup_state
{
2907 struct samr_OpenGroup orig
;
2908 struct samr_OpenGroup tmp
;
2909 TALLOC_CTX
*out_mem_ctx
;
2910 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2913 static void rpccli_samr_OpenGroup_done(struct tevent_req
*subreq
);
2915 struct tevent_req
*rpccli_samr_OpenGroup_send(TALLOC_CTX
*mem_ctx
,
2916 struct tevent_context
*ev
,
2917 struct rpc_pipe_client
*cli
,
2918 struct policy_handle
*_domain_handle
/* [in] [ref] */,
2919 uint32_t _access_mask
/* [in] */,
2920 uint32_t _rid
/* [in] */,
2921 struct policy_handle
*_group_handle
/* [out] [ref] */)
2923 struct tevent_req
*req
;
2924 struct rpccli_samr_OpenGroup_state
*state
;
2925 struct tevent_req
*subreq
;
2927 req
= tevent_req_create(mem_ctx
, &state
,
2928 struct rpccli_samr_OpenGroup_state
);
2932 state
->out_mem_ctx
= NULL
;
2933 state
->dispatch_recv
= cli
->dispatch_recv
;
2936 state
->orig
.in
.domain_handle
= _domain_handle
;
2937 state
->orig
.in
.access_mask
= _access_mask
;
2938 state
->orig
.in
.rid
= _rid
;
2940 /* Out parameters */
2941 state
->orig
.out
.group_handle
= _group_handle
;
2944 ZERO_STRUCT(state
->orig
.out
.result
);
2946 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2947 "rpccli_samr_OpenGroup_out_memory");
2948 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2949 return tevent_req_post(req
, ev
);
2952 /* make a temporary copy, that we pass to the dispatch function */
2953 state
->tmp
= state
->orig
;
2955 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2959 if (tevent_req_nomem(subreq
, req
)) {
2960 return tevent_req_post(req
, ev
);
2962 tevent_req_set_callback(subreq
, rpccli_samr_OpenGroup_done
, req
);
2966 static void rpccli_samr_OpenGroup_done(struct tevent_req
*subreq
)
2968 struct tevent_req
*req
= tevent_req_callback_data(
2969 subreq
, struct tevent_req
);
2970 struct rpccli_samr_OpenGroup_state
*state
= tevent_req_data(
2971 req
, struct rpccli_samr_OpenGroup_state
);
2973 TALLOC_CTX
*mem_ctx
;
2975 if (state
->out_mem_ctx
) {
2976 mem_ctx
= state
->out_mem_ctx
;
2981 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2982 TALLOC_FREE(subreq
);
2983 if (!NT_STATUS_IS_OK(status
)) {
2984 tevent_req_nterror(req
, status
);
2988 /* Copy out parameters */
2989 *state
->orig
.out
.group_handle
= *state
->tmp
.out
.group_handle
;
2992 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2994 /* Reset temporary structure */
2995 ZERO_STRUCT(state
->tmp
);
2997 tevent_req_done(req
);
3000 NTSTATUS
rpccli_samr_OpenGroup_recv(struct tevent_req
*req
,
3001 TALLOC_CTX
*mem_ctx
,
3004 struct rpccli_samr_OpenGroup_state
*state
= tevent_req_data(
3005 req
, struct rpccli_samr_OpenGroup_state
);
3008 if (tevent_req_is_nterror(req
, &status
)) {
3009 tevent_req_received(req
);
3013 /* Steal possbile out parameters to the callers context */
3014 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3017 *result
= state
->orig
.out
.result
;
3019 tevent_req_received(req
);
3020 return NT_STATUS_OK
;
3023 NTSTATUS
rpccli_samr_OpenGroup(struct rpc_pipe_client
*cli
,
3024 TALLOC_CTX
*mem_ctx
,
3025 struct policy_handle
*domain_handle
/* [in] [ref] */,
3026 uint32_t access_mask
/* [in] */,
3027 uint32_t rid
/* [in] */,
3028 struct policy_handle
*group_handle
/* [out] [ref] */)
3030 struct samr_OpenGroup r
;
3034 r
.in
.domain_handle
= domain_handle
;
3035 r
.in
.access_mask
= access_mask
;
3038 status
= cli
->dispatch(cli
,
3044 if (!NT_STATUS_IS_OK(status
)) {
3048 if (NT_STATUS_IS_ERR(status
)) {
3052 /* Return variables */
3053 *group_handle
= *r
.out
.group_handle
;
3056 return r
.out
.result
;
3059 struct rpccli_samr_QueryGroupInfo_state
{
3060 struct samr_QueryGroupInfo orig
;
3061 struct samr_QueryGroupInfo tmp
;
3062 TALLOC_CTX
*out_mem_ctx
;
3063 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3066 static void rpccli_samr_QueryGroupInfo_done(struct tevent_req
*subreq
);
3068 struct tevent_req
*rpccli_samr_QueryGroupInfo_send(TALLOC_CTX
*mem_ctx
,
3069 struct tevent_context
*ev
,
3070 struct rpc_pipe_client
*cli
,
3071 struct policy_handle
*_group_handle
/* [in] [ref] */,
3072 enum samr_GroupInfoEnum _level
/* [in] */,
3073 union samr_GroupInfo
**_info
/* [out] [ref,switch_is(level)] */)
3075 struct tevent_req
*req
;
3076 struct rpccli_samr_QueryGroupInfo_state
*state
;
3077 struct tevent_req
*subreq
;
3079 req
= tevent_req_create(mem_ctx
, &state
,
3080 struct rpccli_samr_QueryGroupInfo_state
);
3084 state
->out_mem_ctx
= NULL
;
3085 state
->dispatch_recv
= cli
->dispatch_recv
;
3088 state
->orig
.in
.group_handle
= _group_handle
;
3089 state
->orig
.in
.level
= _level
;
3091 /* Out parameters */
3092 state
->orig
.out
.info
= _info
;
3095 ZERO_STRUCT(state
->orig
.out
.result
);
3097 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3098 "rpccli_samr_QueryGroupInfo_out_memory");
3099 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3100 return tevent_req_post(req
, ev
);
3103 /* make a temporary copy, that we pass to the dispatch function */
3104 state
->tmp
= state
->orig
;
3106 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3108 NDR_SAMR_QUERYGROUPINFO
,
3110 if (tevent_req_nomem(subreq
, req
)) {
3111 return tevent_req_post(req
, ev
);
3113 tevent_req_set_callback(subreq
, rpccli_samr_QueryGroupInfo_done
, req
);
3117 static void rpccli_samr_QueryGroupInfo_done(struct tevent_req
*subreq
)
3119 struct tevent_req
*req
= tevent_req_callback_data(
3120 subreq
, struct tevent_req
);
3121 struct rpccli_samr_QueryGroupInfo_state
*state
= tevent_req_data(
3122 req
, struct rpccli_samr_QueryGroupInfo_state
);
3124 TALLOC_CTX
*mem_ctx
;
3126 if (state
->out_mem_ctx
) {
3127 mem_ctx
= state
->out_mem_ctx
;
3132 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3133 TALLOC_FREE(subreq
);
3134 if (!NT_STATUS_IS_OK(status
)) {
3135 tevent_req_nterror(req
, status
);
3139 /* Copy out parameters */
3140 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
3143 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3145 /* Reset temporary structure */
3146 ZERO_STRUCT(state
->tmp
);
3148 tevent_req_done(req
);
3151 NTSTATUS
rpccli_samr_QueryGroupInfo_recv(struct tevent_req
*req
,
3152 TALLOC_CTX
*mem_ctx
,
3155 struct rpccli_samr_QueryGroupInfo_state
*state
= tevent_req_data(
3156 req
, struct rpccli_samr_QueryGroupInfo_state
);
3159 if (tevent_req_is_nterror(req
, &status
)) {
3160 tevent_req_received(req
);
3164 /* Steal possbile out parameters to the callers context */
3165 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3168 *result
= state
->orig
.out
.result
;
3170 tevent_req_received(req
);
3171 return NT_STATUS_OK
;
3174 NTSTATUS
rpccli_samr_QueryGroupInfo(struct rpc_pipe_client
*cli
,
3175 TALLOC_CTX
*mem_ctx
,
3176 struct policy_handle
*group_handle
/* [in] [ref] */,
3177 enum samr_GroupInfoEnum level
/* [in] */,
3178 union samr_GroupInfo
**info
/* [out] [ref,switch_is(level)] */)
3180 struct samr_QueryGroupInfo r
;
3184 r
.in
.group_handle
= group_handle
;
3187 status
= cli
->dispatch(cli
,
3190 NDR_SAMR_QUERYGROUPINFO
,
3193 if (!NT_STATUS_IS_OK(status
)) {
3197 if (NT_STATUS_IS_ERR(status
)) {
3201 /* Return variables */
3202 *info
= *r
.out
.info
;
3205 return r
.out
.result
;
3208 struct rpccli_samr_SetGroupInfo_state
{
3209 struct samr_SetGroupInfo orig
;
3210 struct samr_SetGroupInfo tmp
;
3211 TALLOC_CTX
*out_mem_ctx
;
3212 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3215 static void rpccli_samr_SetGroupInfo_done(struct tevent_req
*subreq
);
3217 struct tevent_req
*rpccli_samr_SetGroupInfo_send(TALLOC_CTX
*mem_ctx
,
3218 struct tevent_context
*ev
,
3219 struct rpc_pipe_client
*cli
,
3220 struct policy_handle
*_group_handle
/* [in] [ref] */,
3221 enum samr_GroupInfoEnum _level
/* [in] */,
3222 union samr_GroupInfo
*_info
/* [in] [ref,switch_is(level)] */)
3224 struct tevent_req
*req
;
3225 struct rpccli_samr_SetGroupInfo_state
*state
;
3226 struct tevent_req
*subreq
;
3228 req
= tevent_req_create(mem_ctx
, &state
,
3229 struct rpccli_samr_SetGroupInfo_state
);
3233 state
->out_mem_ctx
= NULL
;
3234 state
->dispatch_recv
= cli
->dispatch_recv
;
3237 state
->orig
.in
.group_handle
= _group_handle
;
3238 state
->orig
.in
.level
= _level
;
3239 state
->orig
.in
.info
= _info
;
3241 /* Out parameters */
3244 ZERO_STRUCT(state
->orig
.out
.result
);
3246 /* make a temporary copy, that we pass to the dispatch function */
3247 state
->tmp
= state
->orig
;
3249 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3251 NDR_SAMR_SETGROUPINFO
,
3253 if (tevent_req_nomem(subreq
, req
)) {
3254 return tevent_req_post(req
, ev
);
3256 tevent_req_set_callback(subreq
, rpccli_samr_SetGroupInfo_done
, req
);
3260 static void rpccli_samr_SetGroupInfo_done(struct tevent_req
*subreq
)
3262 struct tevent_req
*req
= tevent_req_callback_data(
3263 subreq
, struct tevent_req
);
3264 struct rpccli_samr_SetGroupInfo_state
*state
= tevent_req_data(
3265 req
, struct rpccli_samr_SetGroupInfo_state
);
3267 TALLOC_CTX
*mem_ctx
;
3269 if (state
->out_mem_ctx
) {
3270 mem_ctx
= state
->out_mem_ctx
;
3275 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3276 TALLOC_FREE(subreq
);
3277 if (!NT_STATUS_IS_OK(status
)) {
3278 tevent_req_nterror(req
, status
);
3282 /* Copy out parameters */
3285 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3287 /* Reset temporary structure */
3288 ZERO_STRUCT(state
->tmp
);
3290 tevent_req_done(req
);
3293 NTSTATUS
rpccli_samr_SetGroupInfo_recv(struct tevent_req
*req
,
3294 TALLOC_CTX
*mem_ctx
,
3297 struct rpccli_samr_SetGroupInfo_state
*state
= tevent_req_data(
3298 req
, struct rpccli_samr_SetGroupInfo_state
);
3301 if (tevent_req_is_nterror(req
, &status
)) {
3302 tevent_req_received(req
);
3306 /* Steal possbile out parameters to the callers context */
3307 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3310 *result
= state
->orig
.out
.result
;
3312 tevent_req_received(req
);
3313 return NT_STATUS_OK
;
3316 NTSTATUS
rpccli_samr_SetGroupInfo(struct rpc_pipe_client
*cli
,
3317 TALLOC_CTX
*mem_ctx
,
3318 struct policy_handle
*group_handle
/* [in] [ref] */,
3319 enum samr_GroupInfoEnum level
/* [in] */,
3320 union samr_GroupInfo
*info
/* [in] [ref,switch_is(level)] */)
3322 struct samr_SetGroupInfo r
;
3326 r
.in
.group_handle
= group_handle
;
3330 status
= cli
->dispatch(cli
,
3333 NDR_SAMR_SETGROUPINFO
,
3336 if (!NT_STATUS_IS_OK(status
)) {
3340 if (NT_STATUS_IS_ERR(status
)) {
3344 /* Return variables */
3347 return r
.out
.result
;
3350 struct rpccli_samr_AddGroupMember_state
{
3351 struct samr_AddGroupMember orig
;
3352 struct samr_AddGroupMember tmp
;
3353 TALLOC_CTX
*out_mem_ctx
;
3354 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3357 static void rpccli_samr_AddGroupMember_done(struct tevent_req
*subreq
);
3359 struct tevent_req
*rpccli_samr_AddGroupMember_send(TALLOC_CTX
*mem_ctx
,
3360 struct tevent_context
*ev
,
3361 struct rpc_pipe_client
*cli
,
3362 struct policy_handle
*_group_handle
/* [in] [ref] */,
3363 uint32_t _rid
/* [in] */,
3364 uint32_t _flags
/* [in] */)
3366 struct tevent_req
*req
;
3367 struct rpccli_samr_AddGroupMember_state
*state
;
3368 struct tevent_req
*subreq
;
3370 req
= tevent_req_create(mem_ctx
, &state
,
3371 struct rpccli_samr_AddGroupMember_state
);
3375 state
->out_mem_ctx
= NULL
;
3376 state
->dispatch_recv
= cli
->dispatch_recv
;
3379 state
->orig
.in
.group_handle
= _group_handle
;
3380 state
->orig
.in
.rid
= _rid
;
3381 state
->orig
.in
.flags
= _flags
;
3383 /* Out parameters */
3386 ZERO_STRUCT(state
->orig
.out
.result
);
3388 /* make a temporary copy, that we pass to the dispatch function */
3389 state
->tmp
= state
->orig
;
3391 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3393 NDR_SAMR_ADDGROUPMEMBER
,
3395 if (tevent_req_nomem(subreq
, req
)) {
3396 return tevent_req_post(req
, ev
);
3398 tevent_req_set_callback(subreq
, rpccli_samr_AddGroupMember_done
, req
);
3402 static void rpccli_samr_AddGroupMember_done(struct tevent_req
*subreq
)
3404 struct tevent_req
*req
= tevent_req_callback_data(
3405 subreq
, struct tevent_req
);
3406 struct rpccli_samr_AddGroupMember_state
*state
= tevent_req_data(
3407 req
, struct rpccli_samr_AddGroupMember_state
);
3409 TALLOC_CTX
*mem_ctx
;
3411 if (state
->out_mem_ctx
) {
3412 mem_ctx
= state
->out_mem_ctx
;
3417 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3418 TALLOC_FREE(subreq
);
3419 if (!NT_STATUS_IS_OK(status
)) {
3420 tevent_req_nterror(req
, status
);
3424 /* Copy out parameters */
3427 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3429 /* Reset temporary structure */
3430 ZERO_STRUCT(state
->tmp
);
3432 tevent_req_done(req
);
3435 NTSTATUS
rpccli_samr_AddGroupMember_recv(struct tevent_req
*req
,
3436 TALLOC_CTX
*mem_ctx
,
3439 struct rpccli_samr_AddGroupMember_state
*state
= tevent_req_data(
3440 req
, struct rpccli_samr_AddGroupMember_state
);
3443 if (tevent_req_is_nterror(req
, &status
)) {
3444 tevent_req_received(req
);
3448 /* Steal possbile out parameters to the callers context */
3449 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3452 *result
= state
->orig
.out
.result
;
3454 tevent_req_received(req
);
3455 return NT_STATUS_OK
;
3458 NTSTATUS
rpccli_samr_AddGroupMember(struct rpc_pipe_client
*cli
,
3459 TALLOC_CTX
*mem_ctx
,
3460 struct policy_handle
*group_handle
/* [in] [ref] */,
3461 uint32_t rid
/* [in] */,
3462 uint32_t flags
/* [in] */)
3464 struct samr_AddGroupMember r
;
3468 r
.in
.group_handle
= group_handle
;
3472 status
= cli
->dispatch(cli
,
3475 NDR_SAMR_ADDGROUPMEMBER
,
3478 if (!NT_STATUS_IS_OK(status
)) {
3482 if (NT_STATUS_IS_ERR(status
)) {
3486 /* Return variables */
3489 return r
.out
.result
;
3492 struct rpccli_samr_DeleteDomainGroup_state
{
3493 struct samr_DeleteDomainGroup orig
;
3494 struct samr_DeleteDomainGroup tmp
;
3495 TALLOC_CTX
*out_mem_ctx
;
3496 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3499 static void rpccli_samr_DeleteDomainGroup_done(struct tevent_req
*subreq
);
3501 struct tevent_req
*rpccli_samr_DeleteDomainGroup_send(TALLOC_CTX
*mem_ctx
,
3502 struct tevent_context
*ev
,
3503 struct rpc_pipe_client
*cli
,
3504 struct policy_handle
*_group_handle
/* [in,out] [ref] */)
3506 struct tevent_req
*req
;
3507 struct rpccli_samr_DeleteDomainGroup_state
*state
;
3508 struct tevent_req
*subreq
;
3510 req
= tevent_req_create(mem_ctx
, &state
,
3511 struct rpccli_samr_DeleteDomainGroup_state
);
3515 state
->out_mem_ctx
= NULL
;
3516 state
->dispatch_recv
= cli
->dispatch_recv
;
3519 state
->orig
.in
.group_handle
= _group_handle
;
3521 /* Out parameters */
3522 state
->orig
.out
.group_handle
= _group_handle
;
3525 ZERO_STRUCT(state
->orig
.out
.result
);
3527 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3528 "rpccli_samr_DeleteDomainGroup_out_memory");
3529 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3530 return tevent_req_post(req
, ev
);
3533 /* make a temporary copy, that we pass to the dispatch function */
3534 state
->tmp
= state
->orig
;
3536 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3538 NDR_SAMR_DELETEDOMAINGROUP
,
3540 if (tevent_req_nomem(subreq
, req
)) {
3541 return tevent_req_post(req
, ev
);
3543 tevent_req_set_callback(subreq
, rpccli_samr_DeleteDomainGroup_done
, req
);
3547 static void rpccli_samr_DeleteDomainGroup_done(struct tevent_req
*subreq
)
3549 struct tevent_req
*req
= tevent_req_callback_data(
3550 subreq
, struct tevent_req
);
3551 struct rpccli_samr_DeleteDomainGroup_state
*state
= tevent_req_data(
3552 req
, struct rpccli_samr_DeleteDomainGroup_state
);
3554 TALLOC_CTX
*mem_ctx
;
3556 if (state
->out_mem_ctx
) {
3557 mem_ctx
= state
->out_mem_ctx
;
3562 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3563 TALLOC_FREE(subreq
);
3564 if (!NT_STATUS_IS_OK(status
)) {
3565 tevent_req_nterror(req
, status
);
3569 /* Copy out parameters */
3570 *state
->orig
.out
.group_handle
= *state
->tmp
.out
.group_handle
;
3573 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3575 /* Reset temporary structure */
3576 ZERO_STRUCT(state
->tmp
);
3578 tevent_req_done(req
);
3581 NTSTATUS
rpccli_samr_DeleteDomainGroup_recv(struct tevent_req
*req
,
3582 TALLOC_CTX
*mem_ctx
,
3585 struct rpccli_samr_DeleteDomainGroup_state
*state
= tevent_req_data(
3586 req
, struct rpccli_samr_DeleteDomainGroup_state
);
3589 if (tevent_req_is_nterror(req
, &status
)) {
3590 tevent_req_received(req
);
3594 /* Steal possbile out parameters to the callers context */
3595 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3598 *result
= state
->orig
.out
.result
;
3600 tevent_req_received(req
);
3601 return NT_STATUS_OK
;
3604 NTSTATUS
rpccli_samr_DeleteDomainGroup(struct rpc_pipe_client
*cli
,
3605 TALLOC_CTX
*mem_ctx
,
3606 struct policy_handle
*group_handle
/* [in,out] [ref] */)
3608 struct samr_DeleteDomainGroup r
;
3612 r
.in
.group_handle
= group_handle
;
3614 status
= cli
->dispatch(cli
,
3617 NDR_SAMR_DELETEDOMAINGROUP
,
3620 if (!NT_STATUS_IS_OK(status
)) {
3624 if (NT_STATUS_IS_ERR(status
)) {
3628 /* Return variables */
3629 *group_handle
= *r
.out
.group_handle
;
3632 return r
.out
.result
;
3635 struct rpccli_samr_DeleteGroupMember_state
{
3636 struct samr_DeleteGroupMember orig
;
3637 struct samr_DeleteGroupMember tmp
;
3638 TALLOC_CTX
*out_mem_ctx
;
3639 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3642 static void rpccli_samr_DeleteGroupMember_done(struct tevent_req
*subreq
);
3644 struct tevent_req
*rpccli_samr_DeleteGroupMember_send(TALLOC_CTX
*mem_ctx
,
3645 struct tevent_context
*ev
,
3646 struct rpc_pipe_client
*cli
,
3647 struct policy_handle
*_group_handle
/* [in] [ref] */,
3648 uint32_t _rid
/* [in] */)
3650 struct tevent_req
*req
;
3651 struct rpccli_samr_DeleteGroupMember_state
*state
;
3652 struct tevent_req
*subreq
;
3654 req
= tevent_req_create(mem_ctx
, &state
,
3655 struct rpccli_samr_DeleteGroupMember_state
);
3659 state
->out_mem_ctx
= NULL
;
3660 state
->dispatch_recv
= cli
->dispatch_recv
;
3663 state
->orig
.in
.group_handle
= _group_handle
;
3664 state
->orig
.in
.rid
= _rid
;
3666 /* Out parameters */
3669 ZERO_STRUCT(state
->orig
.out
.result
);
3671 /* make a temporary copy, that we pass to the dispatch function */
3672 state
->tmp
= state
->orig
;
3674 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3676 NDR_SAMR_DELETEGROUPMEMBER
,
3678 if (tevent_req_nomem(subreq
, req
)) {
3679 return tevent_req_post(req
, ev
);
3681 tevent_req_set_callback(subreq
, rpccli_samr_DeleteGroupMember_done
, req
);
3685 static void rpccli_samr_DeleteGroupMember_done(struct tevent_req
*subreq
)
3687 struct tevent_req
*req
= tevent_req_callback_data(
3688 subreq
, struct tevent_req
);
3689 struct rpccli_samr_DeleteGroupMember_state
*state
= tevent_req_data(
3690 req
, struct rpccli_samr_DeleteGroupMember_state
);
3692 TALLOC_CTX
*mem_ctx
;
3694 if (state
->out_mem_ctx
) {
3695 mem_ctx
= state
->out_mem_ctx
;
3700 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3701 TALLOC_FREE(subreq
);
3702 if (!NT_STATUS_IS_OK(status
)) {
3703 tevent_req_nterror(req
, status
);
3707 /* Copy out parameters */
3710 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3712 /* Reset temporary structure */
3713 ZERO_STRUCT(state
->tmp
);
3715 tevent_req_done(req
);
3718 NTSTATUS
rpccli_samr_DeleteGroupMember_recv(struct tevent_req
*req
,
3719 TALLOC_CTX
*mem_ctx
,
3722 struct rpccli_samr_DeleteGroupMember_state
*state
= tevent_req_data(
3723 req
, struct rpccli_samr_DeleteGroupMember_state
);
3726 if (tevent_req_is_nterror(req
, &status
)) {
3727 tevent_req_received(req
);
3731 /* Steal possbile out parameters to the callers context */
3732 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3735 *result
= state
->orig
.out
.result
;
3737 tevent_req_received(req
);
3738 return NT_STATUS_OK
;
3741 NTSTATUS
rpccli_samr_DeleteGroupMember(struct rpc_pipe_client
*cli
,
3742 TALLOC_CTX
*mem_ctx
,
3743 struct policy_handle
*group_handle
/* [in] [ref] */,
3744 uint32_t rid
/* [in] */)
3746 struct samr_DeleteGroupMember r
;
3750 r
.in
.group_handle
= group_handle
;
3753 status
= cli
->dispatch(cli
,
3756 NDR_SAMR_DELETEGROUPMEMBER
,
3759 if (!NT_STATUS_IS_OK(status
)) {
3763 if (NT_STATUS_IS_ERR(status
)) {
3767 /* Return variables */
3770 return r
.out
.result
;
3773 struct rpccli_samr_QueryGroupMember_state
{
3774 struct samr_QueryGroupMember orig
;
3775 struct samr_QueryGroupMember tmp
;
3776 TALLOC_CTX
*out_mem_ctx
;
3777 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3780 static void rpccli_samr_QueryGroupMember_done(struct tevent_req
*subreq
);
3782 struct tevent_req
*rpccli_samr_QueryGroupMember_send(TALLOC_CTX
*mem_ctx
,
3783 struct tevent_context
*ev
,
3784 struct rpc_pipe_client
*cli
,
3785 struct policy_handle
*_group_handle
/* [in] [ref] */,
3786 struct samr_RidTypeArray
**_rids
/* [out] [ref] */)
3788 struct tevent_req
*req
;
3789 struct rpccli_samr_QueryGroupMember_state
*state
;
3790 struct tevent_req
*subreq
;
3792 req
= tevent_req_create(mem_ctx
, &state
,
3793 struct rpccli_samr_QueryGroupMember_state
);
3797 state
->out_mem_ctx
= NULL
;
3798 state
->dispatch_recv
= cli
->dispatch_recv
;
3801 state
->orig
.in
.group_handle
= _group_handle
;
3803 /* Out parameters */
3804 state
->orig
.out
.rids
= _rids
;
3807 ZERO_STRUCT(state
->orig
.out
.result
);
3809 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3810 "rpccli_samr_QueryGroupMember_out_memory");
3811 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3812 return tevent_req_post(req
, ev
);
3815 /* make a temporary copy, that we pass to the dispatch function */
3816 state
->tmp
= state
->orig
;
3818 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3820 NDR_SAMR_QUERYGROUPMEMBER
,
3822 if (tevent_req_nomem(subreq
, req
)) {
3823 return tevent_req_post(req
, ev
);
3825 tevent_req_set_callback(subreq
, rpccli_samr_QueryGroupMember_done
, req
);
3829 static void rpccli_samr_QueryGroupMember_done(struct tevent_req
*subreq
)
3831 struct tevent_req
*req
= tevent_req_callback_data(
3832 subreq
, struct tevent_req
);
3833 struct rpccli_samr_QueryGroupMember_state
*state
= tevent_req_data(
3834 req
, struct rpccli_samr_QueryGroupMember_state
);
3836 TALLOC_CTX
*mem_ctx
;
3838 if (state
->out_mem_ctx
) {
3839 mem_ctx
= state
->out_mem_ctx
;
3844 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3845 TALLOC_FREE(subreq
);
3846 if (!NT_STATUS_IS_OK(status
)) {
3847 tevent_req_nterror(req
, status
);
3851 /* Copy out parameters */
3852 *state
->orig
.out
.rids
= *state
->tmp
.out
.rids
;
3855 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3857 /* Reset temporary structure */
3858 ZERO_STRUCT(state
->tmp
);
3860 tevent_req_done(req
);
3863 NTSTATUS
rpccli_samr_QueryGroupMember_recv(struct tevent_req
*req
,
3864 TALLOC_CTX
*mem_ctx
,
3867 struct rpccli_samr_QueryGroupMember_state
*state
= tevent_req_data(
3868 req
, struct rpccli_samr_QueryGroupMember_state
);
3871 if (tevent_req_is_nterror(req
, &status
)) {
3872 tevent_req_received(req
);
3876 /* Steal possbile out parameters to the callers context */
3877 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3880 *result
= state
->orig
.out
.result
;
3882 tevent_req_received(req
);
3883 return NT_STATUS_OK
;
3886 NTSTATUS
rpccli_samr_QueryGroupMember(struct rpc_pipe_client
*cli
,
3887 TALLOC_CTX
*mem_ctx
,
3888 struct policy_handle
*group_handle
/* [in] [ref] */,
3889 struct samr_RidTypeArray
**rids
/* [out] [ref] */)
3891 struct samr_QueryGroupMember r
;
3895 r
.in
.group_handle
= group_handle
;
3897 status
= cli
->dispatch(cli
,
3900 NDR_SAMR_QUERYGROUPMEMBER
,
3903 if (!NT_STATUS_IS_OK(status
)) {
3907 if (NT_STATUS_IS_ERR(status
)) {
3911 /* Return variables */
3912 *rids
= *r
.out
.rids
;
3915 return r
.out
.result
;
3918 struct rpccli_samr_SetMemberAttributesOfGroup_state
{
3919 struct samr_SetMemberAttributesOfGroup orig
;
3920 struct samr_SetMemberAttributesOfGroup tmp
;
3921 TALLOC_CTX
*out_mem_ctx
;
3922 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3925 static void rpccli_samr_SetMemberAttributesOfGroup_done(struct tevent_req
*subreq
);
3927 struct tevent_req
*rpccli_samr_SetMemberAttributesOfGroup_send(TALLOC_CTX
*mem_ctx
,
3928 struct tevent_context
*ev
,
3929 struct rpc_pipe_client
*cli
,
3930 struct policy_handle
*_group_handle
/* [in] [ref] */,
3931 uint32_t _unknown1
/* [in] */,
3932 uint32_t _unknown2
/* [in] */)
3934 struct tevent_req
*req
;
3935 struct rpccli_samr_SetMemberAttributesOfGroup_state
*state
;
3936 struct tevent_req
*subreq
;
3938 req
= tevent_req_create(mem_ctx
, &state
,
3939 struct rpccli_samr_SetMemberAttributesOfGroup_state
);
3943 state
->out_mem_ctx
= NULL
;
3944 state
->dispatch_recv
= cli
->dispatch_recv
;
3947 state
->orig
.in
.group_handle
= _group_handle
;
3948 state
->orig
.in
.unknown1
= _unknown1
;
3949 state
->orig
.in
.unknown2
= _unknown2
;
3951 /* Out parameters */
3954 ZERO_STRUCT(state
->orig
.out
.result
);
3956 /* make a temporary copy, that we pass to the dispatch function */
3957 state
->tmp
= state
->orig
;
3959 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3961 NDR_SAMR_SETMEMBERATTRIBUTESOFGROUP
,
3963 if (tevent_req_nomem(subreq
, req
)) {
3964 return tevent_req_post(req
, ev
);
3966 tevent_req_set_callback(subreq
, rpccli_samr_SetMemberAttributesOfGroup_done
, req
);
3970 static void rpccli_samr_SetMemberAttributesOfGroup_done(struct tevent_req
*subreq
)
3972 struct tevent_req
*req
= tevent_req_callback_data(
3973 subreq
, struct tevent_req
);
3974 struct rpccli_samr_SetMemberAttributesOfGroup_state
*state
= tevent_req_data(
3975 req
, struct rpccli_samr_SetMemberAttributesOfGroup_state
);
3977 TALLOC_CTX
*mem_ctx
;
3979 if (state
->out_mem_ctx
) {
3980 mem_ctx
= state
->out_mem_ctx
;
3985 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3986 TALLOC_FREE(subreq
);
3987 if (!NT_STATUS_IS_OK(status
)) {
3988 tevent_req_nterror(req
, status
);
3992 /* Copy out parameters */
3995 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3997 /* Reset temporary structure */
3998 ZERO_STRUCT(state
->tmp
);
4000 tevent_req_done(req
);
4003 NTSTATUS
rpccli_samr_SetMemberAttributesOfGroup_recv(struct tevent_req
*req
,
4004 TALLOC_CTX
*mem_ctx
,
4007 struct rpccli_samr_SetMemberAttributesOfGroup_state
*state
= tevent_req_data(
4008 req
, struct rpccli_samr_SetMemberAttributesOfGroup_state
);
4011 if (tevent_req_is_nterror(req
, &status
)) {
4012 tevent_req_received(req
);
4016 /* Steal possbile out parameters to the callers context */
4017 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4020 *result
= state
->orig
.out
.result
;
4022 tevent_req_received(req
);
4023 return NT_STATUS_OK
;
4026 NTSTATUS
rpccli_samr_SetMemberAttributesOfGroup(struct rpc_pipe_client
*cli
,
4027 TALLOC_CTX
*mem_ctx
,
4028 struct policy_handle
*group_handle
/* [in] [ref] */,
4029 uint32_t unknown1
/* [in] */,
4030 uint32_t unknown2
/* [in] */)
4032 struct samr_SetMemberAttributesOfGroup r
;
4036 r
.in
.group_handle
= group_handle
;
4037 r
.in
.unknown1
= unknown1
;
4038 r
.in
.unknown2
= unknown2
;
4040 status
= cli
->dispatch(cli
,
4043 NDR_SAMR_SETMEMBERATTRIBUTESOFGROUP
,
4046 if (!NT_STATUS_IS_OK(status
)) {
4050 if (NT_STATUS_IS_ERR(status
)) {
4054 /* Return variables */
4057 return r
.out
.result
;
4060 struct rpccli_samr_OpenAlias_state
{
4061 struct samr_OpenAlias orig
;
4062 struct samr_OpenAlias tmp
;
4063 TALLOC_CTX
*out_mem_ctx
;
4064 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4067 static void rpccli_samr_OpenAlias_done(struct tevent_req
*subreq
);
4069 struct tevent_req
*rpccli_samr_OpenAlias_send(TALLOC_CTX
*mem_ctx
,
4070 struct tevent_context
*ev
,
4071 struct rpc_pipe_client
*cli
,
4072 struct policy_handle
*_domain_handle
/* [in] [ref] */,
4073 uint32_t _access_mask
/* [in] */,
4074 uint32_t _rid
/* [in] */,
4075 struct policy_handle
*_alias_handle
/* [out] [ref] */)
4077 struct tevent_req
*req
;
4078 struct rpccli_samr_OpenAlias_state
*state
;
4079 struct tevent_req
*subreq
;
4081 req
= tevent_req_create(mem_ctx
, &state
,
4082 struct rpccli_samr_OpenAlias_state
);
4086 state
->out_mem_ctx
= NULL
;
4087 state
->dispatch_recv
= cli
->dispatch_recv
;
4090 state
->orig
.in
.domain_handle
= _domain_handle
;
4091 state
->orig
.in
.access_mask
= _access_mask
;
4092 state
->orig
.in
.rid
= _rid
;
4094 /* Out parameters */
4095 state
->orig
.out
.alias_handle
= _alias_handle
;
4098 ZERO_STRUCT(state
->orig
.out
.result
);
4100 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4101 "rpccli_samr_OpenAlias_out_memory");
4102 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4103 return tevent_req_post(req
, ev
);
4106 /* make a temporary copy, that we pass to the dispatch function */
4107 state
->tmp
= state
->orig
;
4109 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4113 if (tevent_req_nomem(subreq
, req
)) {
4114 return tevent_req_post(req
, ev
);
4116 tevent_req_set_callback(subreq
, rpccli_samr_OpenAlias_done
, req
);
4120 static void rpccli_samr_OpenAlias_done(struct tevent_req
*subreq
)
4122 struct tevent_req
*req
= tevent_req_callback_data(
4123 subreq
, struct tevent_req
);
4124 struct rpccli_samr_OpenAlias_state
*state
= tevent_req_data(
4125 req
, struct rpccli_samr_OpenAlias_state
);
4127 TALLOC_CTX
*mem_ctx
;
4129 if (state
->out_mem_ctx
) {
4130 mem_ctx
= state
->out_mem_ctx
;
4135 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4136 TALLOC_FREE(subreq
);
4137 if (!NT_STATUS_IS_OK(status
)) {
4138 tevent_req_nterror(req
, status
);
4142 /* Copy out parameters */
4143 *state
->orig
.out
.alias_handle
= *state
->tmp
.out
.alias_handle
;
4146 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4148 /* Reset temporary structure */
4149 ZERO_STRUCT(state
->tmp
);
4151 tevent_req_done(req
);
4154 NTSTATUS
rpccli_samr_OpenAlias_recv(struct tevent_req
*req
,
4155 TALLOC_CTX
*mem_ctx
,
4158 struct rpccli_samr_OpenAlias_state
*state
= tevent_req_data(
4159 req
, struct rpccli_samr_OpenAlias_state
);
4162 if (tevent_req_is_nterror(req
, &status
)) {
4163 tevent_req_received(req
);
4167 /* Steal possbile out parameters to the callers context */
4168 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4171 *result
= state
->orig
.out
.result
;
4173 tevent_req_received(req
);
4174 return NT_STATUS_OK
;
4177 NTSTATUS
rpccli_samr_OpenAlias(struct rpc_pipe_client
*cli
,
4178 TALLOC_CTX
*mem_ctx
,
4179 struct policy_handle
*domain_handle
/* [in] [ref] */,
4180 uint32_t access_mask
/* [in] */,
4181 uint32_t rid
/* [in] */,
4182 struct policy_handle
*alias_handle
/* [out] [ref] */)
4184 struct samr_OpenAlias r
;
4188 r
.in
.domain_handle
= domain_handle
;
4189 r
.in
.access_mask
= access_mask
;
4192 status
= cli
->dispatch(cli
,
4198 if (!NT_STATUS_IS_OK(status
)) {
4202 if (NT_STATUS_IS_ERR(status
)) {
4206 /* Return variables */
4207 *alias_handle
= *r
.out
.alias_handle
;
4210 return r
.out
.result
;
4213 struct rpccli_samr_QueryAliasInfo_state
{
4214 struct samr_QueryAliasInfo orig
;
4215 struct samr_QueryAliasInfo tmp
;
4216 TALLOC_CTX
*out_mem_ctx
;
4217 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4220 static void rpccli_samr_QueryAliasInfo_done(struct tevent_req
*subreq
);
4222 struct tevent_req
*rpccli_samr_QueryAliasInfo_send(TALLOC_CTX
*mem_ctx
,
4223 struct tevent_context
*ev
,
4224 struct rpc_pipe_client
*cli
,
4225 struct policy_handle
*_alias_handle
/* [in] [ref] */,
4226 enum samr_AliasInfoEnum _level
/* [in] */,
4227 union samr_AliasInfo
**_info
/* [out] [ref,switch_is(level)] */)
4229 struct tevent_req
*req
;
4230 struct rpccli_samr_QueryAliasInfo_state
*state
;
4231 struct tevent_req
*subreq
;
4233 req
= tevent_req_create(mem_ctx
, &state
,
4234 struct rpccli_samr_QueryAliasInfo_state
);
4238 state
->out_mem_ctx
= NULL
;
4239 state
->dispatch_recv
= cli
->dispatch_recv
;
4242 state
->orig
.in
.alias_handle
= _alias_handle
;
4243 state
->orig
.in
.level
= _level
;
4245 /* Out parameters */
4246 state
->orig
.out
.info
= _info
;
4249 ZERO_STRUCT(state
->orig
.out
.result
);
4251 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4252 "rpccli_samr_QueryAliasInfo_out_memory");
4253 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4254 return tevent_req_post(req
, ev
);
4257 /* make a temporary copy, that we pass to the dispatch function */
4258 state
->tmp
= state
->orig
;
4260 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4262 NDR_SAMR_QUERYALIASINFO
,
4264 if (tevent_req_nomem(subreq
, req
)) {
4265 return tevent_req_post(req
, ev
);
4267 tevent_req_set_callback(subreq
, rpccli_samr_QueryAliasInfo_done
, req
);
4271 static void rpccli_samr_QueryAliasInfo_done(struct tevent_req
*subreq
)
4273 struct tevent_req
*req
= tevent_req_callback_data(
4274 subreq
, struct tevent_req
);
4275 struct rpccli_samr_QueryAliasInfo_state
*state
= tevent_req_data(
4276 req
, struct rpccli_samr_QueryAliasInfo_state
);
4278 TALLOC_CTX
*mem_ctx
;
4280 if (state
->out_mem_ctx
) {
4281 mem_ctx
= state
->out_mem_ctx
;
4286 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4287 TALLOC_FREE(subreq
);
4288 if (!NT_STATUS_IS_OK(status
)) {
4289 tevent_req_nterror(req
, status
);
4293 /* Copy out parameters */
4294 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
4297 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4299 /* Reset temporary structure */
4300 ZERO_STRUCT(state
->tmp
);
4302 tevent_req_done(req
);
4305 NTSTATUS
rpccli_samr_QueryAliasInfo_recv(struct tevent_req
*req
,
4306 TALLOC_CTX
*mem_ctx
,
4309 struct rpccli_samr_QueryAliasInfo_state
*state
= tevent_req_data(
4310 req
, struct rpccli_samr_QueryAliasInfo_state
);
4313 if (tevent_req_is_nterror(req
, &status
)) {
4314 tevent_req_received(req
);
4318 /* Steal possbile out parameters to the callers context */
4319 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4322 *result
= state
->orig
.out
.result
;
4324 tevent_req_received(req
);
4325 return NT_STATUS_OK
;
4328 NTSTATUS
rpccli_samr_QueryAliasInfo(struct rpc_pipe_client
*cli
,
4329 TALLOC_CTX
*mem_ctx
,
4330 struct policy_handle
*alias_handle
/* [in] [ref] */,
4331 enum samr_AliasInfoEnum level
/* [in] */,
4332 union samr_AliasInfo
**info
/* [out] [ref,switch_is(level)] */)
4334 struct samr_QueryAliasInfo r
;
4338 r
.in
.alias_handle
= alias_handle
;
4341 status
= cli
->dispatch(cli
,
4344 NDR_SAMR_QUERYALIASINFO
,
4347 if (!NT_STATUS_IS_OK(status
)) {
4351 if (NT_STATUS_IS_ERR(status
)) {
4355 /* Return variables */
4356 *info
= *r
.out
.info
;
4359 return r
.out
.result
;
4362 struct rpccli_samr_SetAliasInfo_state
{
4363 struct samr_SetAliasInfo orig
;
4364 struct samr_SetAliasInfo tmp
;
4365 TALLOC_CTX
*out_mem_ctx
;
4366 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4369 static void rpccli_samr_SetAliasInfo_done(struct tevent_req
*subreq
);
4371 struct tevent_req
*rpccli_samr_SetAliasInfo_send(TALLOC_CTX
*mem_ctx
,
4372 struct tevent_context
*ev
,
4373 struct rpc_pipe_client
*cli
,
4374 struct policy_handle
*_alias_handle
/* [in] [ref] */,
4375 enum samr_AliasInfoEnum _level
/* [in] */,
4376 union samr_AliasInfo
*_info
/* [in] [ref,switch_is(level)] */)
4378 struct tevent_req
*req
;
4379 struct rpccli_samr_SetAliasInfo_state
*state
;
4380 struct tevent_req
*subreq
;
4382 req
= tevent_req_create(mem_ctx
, &state
,
4383 struct rpccli_samr_SetAliasInfo_state
);
4387 state
->out_mem_ctx
= NULL
;
4388 state
->dispatch_recv
= cli
->dispatch_recv
;
4391 state
->orig
.in
.alias_handle
= _alias_handle
;
4392 state
->orig
.in
.level
= _level
;
4393 state
->orig
.in
.info
= _info
;
4395 /* Out parameters */
4398 ZERO_STRUCT(state
->orig
.out
.result
);
4400 /* make a temporary copy, that we pass to the dispatch function */
4401 state
->tmp
= state
->orig
;
4403 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4405 NDR_SAMR_SETALIASINFO
,
4407 if (tevent_req_nomem(subreq
, req
)) {
4408 return tevent_req_post(req
, ev
);
4410 tevent_req_set_callback(subreq
, rpccli_samr_SetAliasInfo_done
, req
);
4414 static void rpccli_samr_SetAliasInfo_done(struct tevent_req
*subreq
)
4416 struct tevent_req
*req
= tevent_req_callback_data(
4417 subreq
, struct tevent_req
);
4418 struct rpccli_samr_SetAliasInfo_state
*state
= tevent_req_data(
4419 req
, struct rpccli_samr_SetAliasInfo_state
);
4421 TALLOC_CTX
*mem_ctx
;
4423 if (state
->out_mem_ctx
) {
4424 mem_ctx
= state
->out_mem_ctx
;
4429 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4430 TALLOC_FREE(subreq
);
4431 if (!NT_STATUS_IS_OK(status
)) {
4432 tevent_req_nterror(req
, status
);
4436 /* Copy out parameters */
4439 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4441 /* Reset temporary structure */
4442 ZERO_STRUCT(state
->tmp
);
4444 tevent_req_done(req
);
4447 NTSTATUS
rpccli_samr_SetAliasInfo_recv(struct tevent_req
*req
,
4448 TALLOC_CTX
*mem_ctx
,
4451 struct rpccli_samr_SetAliasInfo_state
*state
= tevent_req_data(
4452 req
, struct rpccli_samr_SetAliasInfo_state
);
4455 if (tevent_req_is_nterror(req
, &status
)) {
4456 tevent_req_received(req
);
4460 /* Steal possbile out parameters to the callers context */
4461 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4464 *result
= state
->orig
.out
.result
;
4466 tevent_req_received(req
);
4467 return NT_STATUS_OK
;
4470 NTSTATUS
rpccli_samr_SetAliasInfo(struct rpc_pipe_client
*cli
,
4471 TALLOC_CTX
*mem_ctx
,
4472 struct policy_handle
*alias_handle
/* [in] [ref] */,
4473 enum samr_AliasInfoEnum level
/* [in] */,
4474 union samr_AliasInfo
*info
/* [in] [ref,switch_is(level)] */)
4476 struct samr_SetAliasInfo r
;
4480 r
.in
.alias_handle
= alias_handle
;
4484 status
= cli
->dispatch(cli
,
4487 NDR_SAMR_SETALIASINFO
,
4490 if (!NT_STATUS_IS_OK(status
)) {
4494 if (NT_STATUS_IS_ERR(status
)) {
4498 /* Return variables */
4501 return r
.out
.result
;
4504 struct rpccli_samr_DeleteDomAlias_state
{
4505 struct samr_DeleteDomAlias orig
;
4506 struct samr_DeleteDomAlias tmp
;
4507 TALLOC_CTX
*out_mem_ctx
;
4508 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4511 static void rpccli_samr_DeleteDomAlias_done(struct tevent_req
*subreq
);
4513 struct tevent_req
*rpccli_samr_DeleteDomAlias_send(TALLOC_CTX
*mem_ctx
,
4514 struct tevent_context
*ev
,
4515 struct rpc_pipe_client
*cli
,
4516 struct policy_handle
*_alias_handle
/* [in,out] [ref] */)
4518 struct tevent_req
*req
;
4519 struct rpccli_samr_DeleteDomAlias_state
*state
;
4520 struct tevent_req
*subreq
;
4522 req
= tevent_req_create(mem_ctx
, &state
,
4523 struct rpccli_samr_DeleteDomAlias_state
);
4527 state
->out_mem_ctx
= NULL
;
4528 state
->dispatch_recv
= cli
->dispatch_recv
;
4531 state
->orig
.in
.alias_handle
= _alias_handle
;
4533 /* Out parameters */
4534 state
->orig
.out
.alias_handle
= _alias_handle
;
4537 ZERO_STRUCT(state
->orig
.out
.result
);
4539 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4540 "rpccli_samr_DeleteDomAlias_out_memory");
4541 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4542 return tevent_req_post(req
, ev
);
4545 /* make a temporary copy, that we pass to the dispatch function */
4546 state
->tmp
= state
->orig
;
4548 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4550 NDR_SAMR_DELETEDOMALIAS
,
4552 if (tevent_req_nomem(subreq
, req
)) {
4553 return tevent_req_post(req
, ev
);
4555 tevent_req_set_callback(subreq
, rpccli_samr_DeleteDomAlias_done
, req
);
4559 static void rpccli_samr_DeleteDomAlias_done(struct tevent_req
*subreq
)
4561 struct tevent_req
*req
= tevent_req_callback_data(
4562 subreq
, struct tevent_req
);
4563 struct rpccli_samr_DeleteDomAlias_state
*state
= tevent_req_data(
4564 req
, struct rpccli_samr_DeleteDomAlias_state
);
4566 TALLOC_CTX
*mem_ctx
;
4568 if (state
->out_mem_ctx
) {
4569 mem_ctx
= state
->out_mem_ctx
;
4574 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4575 TALLOC_FREE(subreq
);
4576 if (!NT_STATUS_IS_OK(status
)) {
4577 tevent_req_nterror(req
, status
);
4581 /* Copy out parameters */
4582 *state
->orig
.out
.alias_handle
= *state
->tmp
.out
.alias_handle
;
4585 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4587 /* Reset temporary structure */
4588 ZERO_STRUCT(state
->tmp
);
4590 tevent_req_done(req
);
4593 NTSTATUS
rpccli_samr_DeleteDomAlias_recv(struct tevent_req
*req
,
4594 TALLOC_CTX
*mem_ctx
,
4597 struct rpccli_samr_DeleteDomAlias_state
*state
= tevent_req_data(
4598 req
, struct rpccli_samr_DeleteDomAlias_state
);
4601 if (tevent_req_is_nterror(req
, &status
)) {
4602 tevent_req_received(req
);
4606 /* Steal possbile out parameters to the callers context */
4607 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4610 *result
= state
->orig
.out
.result
;
4612 tevent_req_received(req
);
4613 return NT_STATUS_OK
;
4616 NTSTATUS
rpccli_samr_DeleteDomAlias(struct rpc_pipe_client
*cli
,
4617 TALLOC_CTX
*mem_ctx
,
4618 struct policy_handle
*alias_handle
/* [in,out] [ref] */)
4620 struct samr_DeleteDomAlias r
;
4624 r
.in
.alias_handle
= alias_handle
;
4626 status
= cli
->dispatch(cli
,
4629 NDR_SAMR_DELETEDOMALIAS
,
4632 if (!NT_STATUS_IS_OK(status
)) {
4636 if (NT_STATUS_IS_ERR(status
)) {
4640 /* Return variables */
4641 *alias_handle
= *r
.out
.alias_handle
;
4644 return r
.out
.result
;
4647 struct rpccli_samr_AddAliasMember_state
{
4648 struct samr_AddAliasMember orig
;
4649 struct samr_AddAliasMember tmp
;
4650 TALLOC_CTX
*out_mem_ctx
;
4651 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4654 static void rpccli_samr_AddAliasMember_done(struct tevent_req
*subreq
);
4656 struct tevent_req
*rpccli_samr_AddAliasMember_send(TALLOC_CTX
*mem_ctx
,
4657 struct tevent_context
*ev
,
4658 struct rpc_pipe_client
*cli
,
4659 struct policy_handle
*_alias_handle
/* [in] [ref] */,
4660 struct dom_sid2
*_sid
/* [in] [ref] */)
4662 struct tevent_req
*req
;
4663 struct rpccli_samr_AddAliasMember_state
*state
;
4664 struct tevent_req
*subreq
;
4666 req
= tevent_req_create(mem_ctx
, &state
,
4667 struct rpccli_samr_AddAliasMember_state
);
4671 state
->out_mem_ctx
= NULL
;
4672 state
->dispatch_recv
= cli
->dispatch_recv
;
4675 state
->orig
.in
.alias_handle
= _alias_handle
;
4676 state
->orig
.in
.sid
= _sid
;
4678 /* Out parameters */
4681 ZERO_STRUCT(state
->orig
.out
.result
);
4683 /* make a temporary copy, that we pass to the dispatch function */
4684 state
->tmp
= state
->orig
;
4686 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4688 NDR_SAMR_ADDALIASMEMBER
,
4690 if (tevent_req_nomem(subreq
, req
)) {
4691 return tevent_req_post(req
, ev
);
4693 tevent_req_set_callback(subreq
, rpccli_samr_AddAliasMember_done
, req
);
4697 static void rpccli_samr_AddAliasMember_done(struct tevent_req
*subreq
)
4699 struct tevent_req
*req
= tevent_req_callback_data(
4700 subreq
, struct tevent_req
);
4701 struct rpccli_samr_AddAliasMember_state
*state
= tevent_req_data(
4702 req
, struct rpccli_samr_AddAliasMember_state
);
4704 TALLOC_CTX
*mem_ctx
;
4706 if (state
->out_mem_ctx
) {
4707 mem_ctx
= state
->out_mem_ctx
;
4712 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4713 TALLOC_FREE(subreq
);
4714 if (!NT_STATUS_IS_OK(status
)) {
4715 tevent_req_nterror(req
, status
);
4719 /* Copy out parameters */
4722 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4724 /* Reset temporary structure */
4725 ZERO_STRUCT(state
->tmp
);
4727 tevent_req_done(req
);
4730 NTSTATUS
rpccli_samr_AddAliasMember_recv(struct tevent_req
*req
,
4731 TALLOC_CTX
*mem_ctx
,
4734 struct rpccli_samr_AddAliasMember_state
*state
= tevent_req_data(
4735 req
, struct rpccli_samr_AddAliasMember_state
);
4738 if (tevent_req_is_nterror(req
, &status
)) {
4739 tevent_req_received(req
);
4743 /* Steal possbile out parameters to the callers context */
4744 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4747 *result
= state
->orig
.out
.result
;
4749 tevent_req_received(req
);
4750 return NT_STATUS_OK
;
4753 NTSTATUS
rpccli_samr_AddAliasMember(struct rpc_pipe_client
*cli
,
4754 TALLOC_CTX
*mem_ctx
,
4755 struct policy_handle
*alias_handle
/* [in] [ref] */,
4756 struct dom_sid2
*sid
/* [in] [ref] */)
4758 struct samr_AddAliasMember r
;
4762 r
.in
.alias_handle
= alias_handle
;
4765 status
= cli
->dispatch(cli
,
4768 NDR_SAMR_ADDALIASMEMBER
,
4771 if (!NT_STATUS_IS_OK(status
)) {
4775 if (NT_STATUS_IS_ERR(status
)) {
4779 /* Return variables */
4782 return r
.out
.result
;
4785 struct rpccli_samr_DeleteAliasMember_state
{
4786 struct samr_DeleteAliasMember orig
;
4787 struct samr_DeleteAliasMember tmp
;
4788 TALLOC_CTX
*out_mem_ctx
;
4789 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4792 static void rpccli_samr_DeleteAliasMember_done(struct tevent_req
*subreq
);
4794 struct tevent_req
*rpccli_samr_DeleteAliasMember_send(TALLOC_CTX
*mem_ctx
,
4795 struct tevent_context
*ev
,
4796 struct rpc_pipe_client
*cli
,
4797 struct policy_handle
*_alias_handle
/* [in] [ref] */,
4798 struct dom_sid2
*_sid
/* [in] [ref] */)
4800 struct tevent_req
*req
;
4801 struct rpccli_samr_DeleteAliasMember_state
*state
;
4802 struct tevent_req
*subreq
;
4804 req
= tevent_req_create(mem_ctx
, &state
,
4805 struct rpccli_samr_DeleteAliasMember_state
);
4809 state
->out_mem_ctx
= NULL
;
4810 state
->dispatch_recv
= cli
->dispatch_recv
;
4813 state
->orig
.in
.alias_handle
= _alias_handle
;
4814 state
->orig
.in
.sid
= _sid
;
4816 /* Out parameters */
4819 ZERO_STRUCT(state
->orig
.out
.result
);
4821 /* make a temporary copy, that we pass to the dispatch function */
4822 state
->tmp
= state
->orig
;
4824 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4826 NDR_SAMR_DELETEALIASMEMBER
,
4828 if (tevent_req_nomem(subreq
, req
)) {
4829 return tevent_req_post(req
, ev
);
4831 tevent_req_set_callback(subreq
, rpccli_samr_DeleteAliasMember_done
, req
);
4835 static void rpccli_samr_DeleteAliasMember_done(struct tevent_req
*subreq
)
4837 struct tevent_req
*req
= tevent_req_callback_data(
4838 subreq
, struct tevent_req
);
4839 struct rpccli_samr_DeleteAliasMember_state
*state
= tevent_req_data(
4840 req
, struct rpccli_samr_DeleteAliasMember_state
);
4842 TALLOC_CTX
*mem_ctx
;
4844 if (state
->out_mem_ctx
) {
4845 mem_ctx
= state
->out_mem_ctx
;
4850 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4851 TALLOC_FREE(subreq
);
4852 if (!NT_STATUS_IS_OK(status
)) {
4853 tevent_req_nterror(req
, status
);
4857 /* Copy out parameters */
4860 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4862 /* Reset temporary structure */
4863 ZERO_STRUCT(state
->tmp
);
4865 tevent_req_done(req
);
4868 NTSTATUS
rpccli_samr_DeleteAliasMember_recv(struct tevent_req
*req
,
4869 TALLOC_CTX
*mem_ctx
,
4872 struct rpccli_samr_DeleteAliasMember_state
*state
= tevent_req_data(
4873 req
, struct rpccli_samr_DeleteAliasMember_state
);
4876 if (tevent_req_is_nterror(req
, &status
)) {
4877 tevent_req_received(req
);
4881 /* Steal possbile out parameters to the callers context */
4882 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4885 *result
= state
->orig
.out
.result
;
4887 tevent_req_received(req
);
4888 return NT_STATUS_OK
;
4891 NTSTATUS
rpccli_samr_DeleteAliasMember(struct rpc_pipe_client
*cli
,
4892 TALLOC_CTX
*mem_ctx
,
4893 struct policy_handle
*alias_handle
/* [in] [ref] */,
4894 struct dom_sid2
*sid
/* [in] [ref] */)
4896 struct samr_DeleteAliasMember r
;
4900 r
.in
.alias_handle
= alias_handle
;
4903 status
= cli
->dispatch(cli
,
4906 NDR_SAMR_DELETEALIASMEMBER
,
4909 if (!NT_STATUS_IS_OK(status
)) {
4913 if (NT_STATUS_IS_ERR(status
)) {
4917 /* Return variables */
4920 return r
.out
.result
;
4923 struct rpccli_samr_GetMembersInAlias_state
{
4924 struct samr_GetMembersInAlias orig
;
4925 struct samr_GetMembersInAlias tmp
;
4926 TALLOC_CTX
*out_mem_ctx
;
4927 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4930 static void rpccli_samr_GetMembersInAlias_done(struct tevent_req
*subreq
);
4932 struct tevent_req
*rpccli_samr_GetMembersInAlias_send(TALLOC_CTX
*mem_ctx
,
4933 struct tevent_context
*ev
,
4934 struct rpc_pipe_client
*cli
,
4935 struct policy_handle
*_alias_handle
/* [in] [ref] */,
4936 struct lsa_SidArray
*_sids
/* [out] [ref] */)
4938 struct tevent_req
*req
;
4939 struct rpccli_samr_GetMembersInAlias_state
*state
;
4940 struct tevent_req
*subreq
;
4942 req
= tevent_req_create(mem_ctx
, &state
,
4943 struct rpccli_samr_GetMembersInAlias_state
);
4947 state
->out_mem_ctx
= NULL
;
4948 state
->dispatch_recv
= cli
->dispatch_recv
;
4951 state
->orig
.in
.alias_handle
= _alias_handle
;
4953 /* Out parameters */
4954 state
->orig
.out
.sids
= _sids
;
4957 ZERO_STRUCT(state
->orig
.out
.result
);
4959 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4960 "rpccli_samr_GetMembersInAlias_out_memory");
4961 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4962 return tevent_req_post(req
, ev
);
4965 /* make a temporary copy, that we pass to the dispatch function */
4966 state
->tmp
= state
->orig
;
4968 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4970 NDR_SAMR_GETMEMBERSINALIAS
,
4972 if (tevent_req_nomem(subreq
, req
)) {
4973 return tevent_req_post(req
, ev
);
4975 tevent_req_set_callback(subreq
, rpccli_samr_GetMembersInAlias_done
, req
);
4979 static void rpccli_samr_GetMembersInAlias_done(struct tevent_req
*subreq
)
4981 struct tevent_req
*req
= tevent_req_callback_data(
4982 subreq
, struct tevent_req
);
4983 struct rpccli_samr_GetMembersInAlias_state
*state
= tevent_req_data(
4984 req
, struct rpccli_samr_GetMembersInAlias_state
);
4986 TALLOC_CTX
*mem_ctx
;
4988 if (state
->out_mem_ctx
) {
4989 mem_ctx
= state
->out_mem_ctx
;
4994 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4995 TALLOC_FREE(subreq
);
4996 if (!NT_STATUS_IS_OK(status
)) {
4997 tevent_req_nterror(req
, status
);
5001 /* Copy out parameters */
5002 *state
->orig
.out
.sids
= *state
->tmp
.out
.sids
;
5005 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5007 /* Reset temporary structure */
5008 ZERO_STRUCT(state
->tmp
);
5010 tevent_req_done(req
);
5013 NTSTATUS
rpccli_samr_GetMembersInAlias_recv(struct tevent_req
*req
,
5014 TALLOC_CTX
*mem_ctx
,
5017 struct rpccli_samr_GetMembersInAlias_state
*state
= tevent_req_data(
5018 req
, struct rpccli_samr_GetMembersInAlias_state
);
5021 if (tevent_req_is_nterror(req
, &status
)) {
5022 tevent_req_received(req
);
5026 /* Steal possbile out parameters to the callers context */
5027 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5030 *result
= state
->orig
.out
.result
;
5032 tevent_req_received(req
);
5033 return NT_STATUS_OK
;
5036 NTSTATUS
rpccli_samr_GetMembersInAlias(struct rpc_pipe_client
*cli
,
5037 TALLOC_CTX
*mem_ctx
,
5038 struct policy_handle
*alias_handle
/* [in] [ref] */,
5039 struct lsa_SidArray
*sids
/* [out] [ref] */)
5041 struct samr_GetMembersInAlias r
;
5045 r
.in
.alias_handle
= alias_handle
;
5047 status
= cli
->dispatch(cli
,
5050 NDR_SAMR_GETMEMBERSINALIAS
,
5053 if (!NT_STATUS_IS_OK(status
)) {
5057 if (NT_STATUS_IS_ERR(status
)) {
5061 /* Return variables */
5062 *sids
= *r
.out
.sids
;
5065 return r
.out
.result
;
5068 struct rpccli_samr_OpenUser_state
{
5069 struct samr_OpenUser orig
;
5070 struct samr_OpenUser tmp
;
5071 TALLOC_CTX
*out_mem_ctx
;
5072 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5075 static void rpccli_samr_OpenUser_done(struct tevent_req
*subreq
);
5077 struct tevent_req
*rpccli_samr_OpenUser_send(TALLOC_CTX
*mem_ctx
,
5078 struct tevent_context
*ev
,
5079 struct rpc_pipe_client
*cli
,
5080 struct policy_handle
*_domain_handle
/* [in] [ref] */,
5081 uint32_t _access_mask
/* [in] */,
5082 uint32_t _rid
/* [in] */,
5083 struct policy_handle
*_user_handle
/* [out] [ref] */)
5085 struct tevent_req
*req
;
5086 struct rpccli_samr_OpenUser_state
*state
;
5087 struct tevent_req
*subreq
;
5089 req
= tevent_req_create(mem_ctx
, &state
,
5090 struct rpccli_samr_OpenUser_state
);
5094 state
->out_mem_ctx
= NULL
;
5095 state
->dispatch_recv
= cli
->dispatch_recv
;
5098 state
->orig
.in
.domain_handle
= _domain_handle
;
5099 state
->orig
.in
.access_mask
= _access_mask
;
5100 state
->orig
.in
.rid
= _rid
;
5102 /* Out parameters */
5103 state
->orig
.out
.user_handle
= _user_handle
;
5106 ZERO_STRUCT(state
->orig
.out
.result
);
5108 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5109 "rpccli_samr_OpenUser_out_memory");
5110 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5111 return tevent_req_post(req
, ev
);
5114 /* make a temporary copy, that we pass to the dispatch function */
5115 state
->tmp
= state
->orig
;
5117 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5121 if (tevent_req_nomem(subreq
, req
)) {
5122 return tevent_req_post(req
, ev
);
5124 tevent_req_set_callback(subreq
, rpccli_samr_OpenUser_done
, req
);
5128 static void rpccli_samr_OpenUser_done(struct tevent_req
*subreq
)
5130 struct tevent_req
*req
= tevent_req_callback_data(
5131 subreq
, struct tevent_req
);
5132 struct rpccli_samr_OpenUser_state
*state
= tevent_req_data(
5133 req
, struct rpccli_samr_OpenUser_state
);
5135 TALLOC_CTX
*mem_ctx
;
5137 if (state
->out_mem_ctx
) {
5138 mem_ctx
= state
->out_mem_ctx
;
5143 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5144 TALLOC_FREE(subreq
);
5145 if (!NT_STATUS_IS_OK(status
)) {
5146 tevent_req_nterror(req
, status
);
5150 /* Copy out parameters */
5151 *state
->orig
.out
.user_handle
= *state
->tmp
.out
.user_handle
;
5154 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5156 /* Reset temporary structure */
5157 ZERO_STRUCT(state
->tmp
);
5159 tevent_req_done(req
);
5162 NTSTATUS
rpccli_samr_OpenUser_recv(struct tevent_req
*req
,
5163 TALLOC_CTX
*mem_ctx
,
5166 struct rpccli_samr_OpenUser_state
*state
= tevent_req_data(
5167 req
, struct rpccli_samr_OpenUser_state
);
5170 if (tevent_req_is_nterror(req
, &status
)) {
5171 tevent_req_received(req
);
5175 /* Steal possbile out parameters to the callers context */
5176 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5179 *result
= state
->orig
.out
.result
;
5181 tevent_req_received(req
);
5182 return NT_STATUS_OK
;
5185 NTSTATUS
rpccli_samr_OpenUser(struct rpc_pipe_client
*cli
,
5186 TALLOC_CTX
*mem_ctx
,
5187 struct policy_handle
*domain_handle
/* [in] [ref] */,
5188 uint32_t access_mask
/* [in] */,
5189 uint32_t rid
/* [in] */,
5190 struct policy_handle
*user_handle
/* [out] [ref] */)
5192 struct samr_OpenUser r
;
5196 r
.in
.domain_handle
= domain_handle
;
5197 r
.in
.access_mask
= access_mask
;
5200 status
= cli
->dispatch(cli
,
5206 if (!NT_STATUS_IS_OK(status
)) {
5210 if (NT_STATUS_IS_ERR(status
)) {
5214 /* Return variables */
5215 *user_handle
= *r
.out
.user_handle
;
5218 return r
.out
.result
;
5221 struct rpccli_samr_DeleteUser_state
{
5222 struct samr_DeleteUser orig
;
5223 struct samr_DeleteUser tmp
;
5224 TALLOC_CTX
*out_mem_ctx
;
5225 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5228 static void rpccli_samr_DeleteUser_done(struct tevent_req
*subreq
);
5230 struct tevent_req
*rpccli_samr_DeleteUser_send(TALLOC_CTX
*mem_ctx
,
5231 struct tevent_context
*ev
,
5232 struct rpc_pipe_client
*cli
,
5233 struct policy_handle
*_user_handle
/* [in,out] [ref] */)
5235 struct tevent_req
*req
;
5236 struct rpccli_samr_DeleteUser_state
*state
;
5237 struct tevent_req
*subreq
;
5239 req
= tevent_req_create(mem_ctx
, &state
,
5240 struct rpccli_samr_DeleteUser_state
);
5244 state
->out_mem_ctx
= NULL
;
5245 state
->dispatch_recv
= cli
->dispatch_recv
;
5248 state
->orig
.in
.user_handle
= _user_handle
;
5250 /* Out parameters */
5251 state
->orig
.out
.user_handle
= _user_handle
;
5254 ZERO_STRUCT(state
->orig
.out
.result
);
5256 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5257 "rpccli_samr_DeleteUser_out_memory");
5258 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5259 return tevent_req_post(req
, ev
);
5262 /* make a temporary copy, that we pass to the dispatch function */
5263 state
->tmp
= state
->orig
;
5265 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5267 NDR_SAMR_DELETEUSER
,
5269 if (tevent_req_nomem(subreq
, req
)) {
5270 return tevent_req_post(req
, ev
);
5272 tevent_req_set_callback(subreq
, rpccli_samr_DeleteUser_done
, req
);
5276 static void rpccli_samr_DeleteUser_done(struct tevent_req
*subreq
)
5278 struct tevent_req
*req
= tevent_req_callback_data(
5279 subreq
, struct tevent_req
);
5280 struct rpccli_samr_DeleteUser_state
*state
= tevent_req_data(
5281 req
, struct rpccli_samr_DeleteUser_state
);
5283 TALLOC_CTX
*mem_ctx
;
5285 if (state
->out_mem_ctx
) {
5286 mem_ctx
= state
->out_mem_ctx
;
5291 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5292 TALLOC_FREE(subreq
);
5293 if (!NT_STATUS_IS_OK(status
)) {
5294 tevent_req_nterror(req
, status
);
5298 /* Copy out parameters */
5299 *state
->orig
.out
.user_handle
= *state
->tmp
.out
.user_handle
;
5302 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5304 /* Reset temporary structure */
5305 ZERO_STRUCT(state
->tmp
);
5307 tevent_req_done(req
);
5310 NTSTATUS
rpccli_samr_DeleteUser_recv(struct tevent_req
*req
,
5311 TALLOC_CTX
*mem_ctx
,
5314 struct rpccli_samr_DeleteUser_state
*state
= tevent_req_data(
5315 req
, struct rpccli_samr_DeleteUser_state
);
5318 if (tevent_req_is_nterror(req
, &status
)) {
5319 tevent_req_received(req
);
5323 /* Steal possbile out parameters to the callers context */
5324 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5327 *result
= state
->orig
.out
.result
;
5329 tevent_req_received(req
);
5330 return NT_STATUS_OK
;
5333 NTSTATUS
rpccli_samr_DeleteUser(struct rpc_pipe_client
*cli
,
5334 TALLOC_CTX
*mem_ctx
,
5335 struct policy_handle
*user_handle
/* [in,out] [ref] */)
5337 struct samr_DeleteUser r
;
5341 r
.in
.user_handle
= user_handle
;
5343 status
= cli
->dispatch(cli
,
5346 NDR_SAMR_DELETEUSER
,
5349 if (!NT_STATUS_IS_OK(status
)) {
5353 if (NT_STATUS_IS_ERR(status
)) {
5357 /* Return variables */
5358 *user_handle
= *r
.out
.user_handle
;
5361 return r
.out
.result
;
5364 struct rpccli_samr_QueryUserInfo_state
{
5365 struct samr_QueryUserInfo orig
;
5366 struct samr_QueryUserInfo tmp
;
5367 TALLOC_CTX
*out_mem_ctx
;
5368 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5371 static void rpccli_samr_QueryUserInfo_done(struct tevent_req
*subreq
);
5373 struct tevent_req
*rpccli_samr_QueryUserInfo_send(TALLOC_CTX
*mem_ctx
,
5374 struct tevent_context
*ev
,
5375 struct rpc_pipe_client
*cli
,
5376 struct policy_handle
*_user_handle
/* [in] [ref] */,
5377 enum samr_UserInfoLevel _level
/* [in] */,
5378 union samr_UserInfo
**_info
/* [out] [ref,switch_is(level)] */)
5380 struct tevent_req
*req
;
5381 struct rpccli_samr_QueryUserInfo_state
*state
;
5382 struct tevent_req
*subreq
;
5384 req
= tevent_req_create(mem_ctx
, &state
,
5385 struct rpccli_samr_QueryUserInfo_state
);
5389 state
->out_mem_ctx
= NULL
;
5390 state
->dispatch_recv
= cli
->dispatch_recv
;
5393 state
->orig
.in
.user_handle
= _user_handle
;
5394 state
->orig
.in
.level
= _level
;
5396 /* Out parameters */
5397 state
->orig
.out
.info
= _info
;
5400 ZERO_STRUCT(state
->orig
.out
.result
);
5402 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5403 "rpccli_samr_QueryUserInfo_out_memory");
5404 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5405 return tevent_req_post(req
, ev
);
5408 /* make a temporary copy, that we pass to the dispatch function */
5409 state
->tmp
= state
->orig
;
5411 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5413 NDR_SAMR_QUERYUSERINFO
,
5415 if (tevent_req_nomem(subreq
, req
)) {
5416 return tevent_req_post(req
, ev
);
5418 tevent_req_set_callback(subreq
, rpccli_samr_QueryUserInfo_done
, req
);
5422 static void rpccli_samr_QueryUserInfo_done(struct tevent_req
*subreq
)
5424 struct tevent_req
*req
= tevent_req_callback_data(
5425 subreq
, struct tevent_req
);
5426 struct rpccli_samr_QueryUserInfo_state
*state
= tevent_req_data(
5427 req
, struct rpccli_samr_QueryUserInfo_state
);
5429 TALLOC_CTX
*mem_ctx
;
5431 if (state
->out_mem_ctx
) {
5432 mem_ctx
= state
->out_mem_ctx
;
5437 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5438 TALLOC_FREE(subreq
);
5439 if (!NT_STATUS_IS_OK(status
)) {
5440 tevent_req_nterror(req
, status
);
5444 /* Copy out parameters */
5445 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
5448 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5450 /* Reset temporary structure */
5451 ZERO_STRUCT(state
->tmp
);
5453 tevent_req_done(req
);
5456 NTSTATUS
rpccli_samr_QueryUserInfo_recv(struct tevent_req
*req
,
5457 TALLOC_CTX
*mem_ctx
,
5460 struct rpccli_samr_QueryUserInfo_state
*state
= tevent_req_data(
5461 req
, struct rpccli_samr_QueryUserInfo_state
);
5464 if (tevent_req_is_nterror(req
, &status
)) {
5465 tevent_req_received(req
);
5469 /* Steal possbile out parameters to the callers context */
5470 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5473 *result
= state
->orig
.out
.result
;
5475 tevent_req_received(req
);
5476 return NT_STATUS_OK
;
5479 NTSTATUS
rpccli_samr_QueryUserInfo(struct rpc_pipe_client
*cli
,
5480 TALLOC_CTX
*mem_ctx
,
5481 struct policy_handle
*user_handle
/* [in] [ref] */,
5482 enum samr_UserInfoLevel level
/* [in] */,
5483 union samr_UserInfo
**info
/* [out] [ref,switch_is(level)] */)
5485 struct samr_QueryUserInfo r
;
5489 r
.in
.user_handle
= user_handle
;
5492 status
= cli
->dispatch(cli
,
5495 NDR_SAMR_QUERYUSERINFO
,
5498 if (!NT_STATUS_IS_OK(status
)) {
5502 if (NT_STATUS_IS_ERR(status
)) {
5506 /* Return variables */
5507 *info
= *r
.out
.info
;
5510 return r
.out
.result
;
5513 struct rpccli_samr_SetUserInfo_state
{
5514 struct samr_SetUserInfo orig
;
5515 struct samr_SetUserInfo tmp
;
5516 TALLOC_CTX
*out_mem_ctx
;
5517 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5520 static void rpccli_samr_SetUserInfo_done(struct tevent_req
*subreq
);
5522 struct tevent_req
*rpccli_samr_SetUserInfo_send(TALLOC_CTX
*mem_ctx
,
5523 struct tevent_context
*ev
,
5524 struct rpc_pipe_client
*cli
,
5525 struct policy_handle
*_user_handle
/* [in] [ref] */,
5526 enum samr_UserInfoLevel _level
/* [in] */,
5527 union samr_UserInfo
*_info
/* [in] [ref,switch_is(level)] */)
5529 struct tevent_req
*req
;
5530 struct rpccli_samr_SetUserInfo_state
*state
;
5531 struct tevent_req
*subreq
;
5533 req
= tevent_req_create(mem_ctx
, &state
,
5534 struct rpccli_samr_SetUserInfo_state
);
5538 state
->out_mem_ctx
= NULL
;
5539 state
->dispatch_recv
= cli
->dispatch_recv
;
5542 state
->orig
.in
.user_handle
= _user_handle
;
5543 state
->orig
.in
.level
= _level
;
5544 state
->orig
.in
.info
= _info
;
5546 /* Out parameters */
5549 ZERO_STRUCT(state
->orig
.out
.result
);
5551 /* make a temporary copy, that we pass to the dispatch function */
5552 state
->tmp
= state
->orig
;
5554 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5556 NDR_SAMR_SETUSERINFO
,
5558 if (tevent_req_nomem(subreq
, req
)) {
5559 return tevent_req_post(req
, ev
);
5561 tevent_req_set_callback(subreq
, rpccli_samr_SetUserInfo_done
, req
);
5565 static void rpccli_samr_SetUserInfo_done(struct tevent_req
*subreq
)
5567 struct tevent_req
*req
= tevent_req_callback_data(
5568 subreq
, struct tevent_req
);
5569 struct rpccli_samr_SetUserInfo_state
*state
= tevent_req_data(
5570 req
, struct rpccli_samr_SetUserInfo_state
);
5572 TALLOC_CTX
*mem_ctx
;
5574 if (state
->out_mem_ctx
) {
5575 mem_ctx
= state
->out_mem_ctx
;
5580 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5581 TALLOC_FREE(subreq
);
5582 if (!NT_STATUS_IS_OK(status
)) {
5583 tevent_req_nterror(req
, status
);
5587 /* Copy out parameters */
5590 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5592 /* Reset temporary structure */
5593 ZERO_STRUCT(state
->tmp
);
5595 tevent_req_done(req
);
5598 NTSTATUS
rpccli_samr_SetUserInfo_recv(struct tevent_req
*req
,
5599 TALLOC_CTX
*mem_ctx
,
5602 struct rpccli_samr_SetUserInfo_state
*state
= tevent_req_data(
5603 req
, struct rpccli_samr_SetUserInfo_state
);
5606 if (tevent_req_is_nterror(req
, &status
)) {
5607 tevent_req_received(req
);
5611 /* Steal possbile out parameters to the callers context */
5612 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5615 *result
= state
->orig
.out
.result
;
5617 tevent_req_received(req
);
5618 return NT_STATUS_OK
;
5621 NTSTATUS
rpccli_samr_SetUserInfo(struct rpc_pipe_client
*cli
,
5622 TALLOC_CTX
*mem_ctx
,
5623 struct policy_handle
*user_handle
/* [in] [ref] */,
5624 enum samr_UserInfoLevel level
/* [in] */,
5625 union samr_UserInfo
*info
/* [in] [ref,switch_is(level)] */)
5627 struct samr_SetUserInfo r
;
5631 r
.in
.user_handle
= user_handle
;
5635 status
= cli
->dispatch(cli
,
5638 NDR_SAMR_SETUSERINFO
,
5641 if (!NT_STATUS_IS_OK(status
)) {
5645 if (NT_STATUS_IS_ERR(status
)) {
5649 /* Return variables */
5652 return r
.out
.result
;
5655 struct rpccli_samr_ChangePasswordUser_state
{
5656 struct samr_ChangePasswordUser orig
;
5657 struct samr_ChangePasswordUser tmp
;
5658 TALLOC_CTX
*out_mem_ctx
;
5659 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5662 static void rpccli_samr_ChangePasswordUser_done(struct tevent_req
*subreq
);
5664 struct tevent_req
*rpccli_samr_ChangePasswordUser_send(TALLOC_CTX
*mem_ctx
,
5665 struct tevent_context
*ev
,
5666 struct rpc_pipe_client
*cli
,
5667 struct policy_handle
*_user_handle
/* [in] [ref] */,
5668 uint8_t _lm_present
/* [in] */,
5669 struct samr_Password
*_old_lm_crypted
/* [in] [unique] */,
5670 struct samr_Password
*_new_lm_crypted
/* [in] [unique] */,
5671 uint8_t _nt_present
/* [in] */,
5672 struct samr_Password
*_old_nt_crypted
/* [in] [unique] */,
5673 struct samr_Password
*_new_nt_crypted
/* [in] [unique] */,
5674 uint8_t _cross1_present
/* [in] */,
5675 struct samr_Password
*_nt_cross
/* [in] [unique] */,
5676 uint8_t _cross2_present
/* [in] */,
5677 struct samr_Password
*_lm_cross
/* [in] [unique] */)
5679 struct tevent_req
*req
;
5680 struct rpccli_samr_ChangePasswordUser_state
*state
;
5681 struct tevent_req
*subreq
;
5683 req
= tevent_req_create(mem_ctx
, &state
,
5684 struct rpccli_samr_ChangePasswordUser_state
);
5688 state
->out_mem_ctx
= NULL
;
5689 state
->dispatch_recv
= cli
->dispatch_recv
;
5692 state
->orig
.in
.user_handle
= _user_handle
;
5693 state
->orig
.in
.lm_present
= _lm_present
;
5694 state
->orig
.in
.old_lm_crypted
= _old_lm_crypted
;
5695 state
->orig
.in
.new_lm_crypted
= _new_lm_crypted
;
5696 state
->orig
.in
.nt_present
= _nt_present
;
5697 state
->orig
.in
.old_nt_crypted
= _old_nt_crypted
;
5698 state
->orig
.in
.new_nt_crypted
= _new_nt_crypted
;
5699 state
->orig
.in
.cross1_present
= _cross1_present
;
5700 state
->orig
.in
.nt_cross
= _nt_cross
;
5701 state
->orig
.in
.cross2_present
= _cross2_present
;
5702 state
->orig
.in
.lm_cross
= _lm_cross
;
5704 /* Out parameters */
5707 ZERO_STRUCT(state
->orig
.out
.result
);
5709 /* make a temporary copy, that we pass to the dispatch function */
5710 state
->tmp
= state
->orig
;
5712 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5714 NDR_SAMR_CHANGEPASSWORDUSER
,
5716 if (tevent_req_nomem(subreq
, req
)) {
5717 return tevent_req_post(req
, ev
);
5719 tevent_req_set_callback(subreq
, rpccli_samr_ChangePasswordUser_done
, req
);
5723 static void rpccli_samr_ChangePasswordUser_done(struct tevent_req
*subreq
)
5725 struct tevent_req
*req
= tevent_req_callback_data(
5726 subreq
, struct tevent_req
);
5727 struct rpccli_samr_ChangePasswordUser_state
*state
= tevent_req_data(
5728 req
, struct rpccli_samr_ChangePasswordUser_state
);
5730 TALLOC_CTX
*mem_ctx
;
5732 if (state
->out_mem_ctx
) {
5733 mem_ctx
= state
->out_mem_ctx
;
5738 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5739 TALLOC_FREE(subreq
);
5740 if (!NT_STATUS_IS_OK(status
)) {
5741 tevent_req_nterror(req
, status
);
5745 /* Copy out parameters */
5748 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5750 /* Reset temporary structure */
5751 ZERO_STRUCT(state
->tmp
);
5753 tevent_req_done(req
);
5756 NTSTATUS
rpccli_samr_ChangePasswordUser_recv(struct tevent_req
*req
,
5757 TALLOC_CTX
*mem_ctx
,
5760 struct rpccli_samr_ChangePasswordUser_state
*state
= tevent_req_data(
5761 req
, struct rpccli_samr_ChangePasswordUser_state
);
5764 if (tevent_req_is_nterror(req
, &status
)) {
5765 tevent_req_received(req
);
5769 /* Steal possbile out parameters to the callers context */
5770 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5773 *result
= state
->orig
.out
.result
;
5775 tevent_req_received(req
);
5776 return NT_STATUS_OK
;
5779 NTSTATUS
rpccli_samr_ChangePasswordUser(struct rpc_pipe_client
*cli
,
5780 TALLOC_CTX
*mem_ctx
,
5781 struct policy_handle
*user_handle
/* [in] [ref] */,
5782 uint8_t lm_present
/* [in] */,
5783 struct samr_Password
*old_lm_crypted
/* [in] [unique] */,
5784 struct samr_Password
*new_lm_crypted
/* [in] [unique] */,
5785 uint8_t nt_present
/* [in] */,
5786 struct samr_Password
*old_nt_crypted
/* [in] [unique] */,
5787 struct samr_Password
*new_nt_crypted
/* [in] [unique] */,
5788 uint8_t cross1_present
/* [in] */,
5789 struct samr_Password
*nt_cross
/* [in] [unique] */,
5790 uint8_t cross2_present
/* [in] */,
5791 struct samr_Password
*lm_cross
/* [in] [unique] */)
5793 struct samr_ChangePasswordUser r
;
5797 r
.in
.user_handle
= user_handle
;
5798 r
.in
.lm_present
= lm_present
;
5799 r
.in
.old_lm_crypted
= old_lm_crypted
;
5800 r
.in
.new_lm_crypted
= new_lm_crypted
;
5801 r
.in
.nt_present
= nt_present
;
5802 r
.in
.old_nt_crypted
= old_nt_crypted
;
5803 r
.in
.new_nt_crypted
= new_nt_crypted
;
5804 r
.in
.cross1_present
= cross1_present
;
5805 r
.in
.nt_cross
= nt_cross
;
5806 r
.in
.cross2_present
= cross2_present
;
5807 r
.in
.lm_cross
= lm_cross
;
5809 status
= cli
->dispatch(cli
,
5812 NDR_SAMR_CHANGEPASSWORDUSER
,
5815 if (!NT_STATUS_IS_OK(status
)) {
5819 if (NT_STATUS_IS_ERR(status
)) {
5823 /* Return variables */
5826 return r
.out
.result
;
5829 struct rpccli_samr_GetGroupsForUser_state
{
5830 struct samr_GetGroupsForUser orig
;
5831 struct samr_GetGroupsForUser tmp
;
5832 TALLOC_CTX
*out_mem_ctx
;
5833 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5836 static void rpccli_samr_GetGroupsForUser_done(struct tevent_req
*subreq
);
5838 struct tevent_req
*rpccli_samr_GetGroupsForUser_send(TALLOC_CTX
*mem_ctx
,
5839 struct tevent_context
*ev
,
5840 struct rpc_pipe_client
*cli
,
5841 struct policy_handle
*_user_handle
/* [in] [ref] */,
5842 struct samr_RidWithAttributeArray
**_rids
/* [out] [ref] */)
5844 struct tevent_req
*req
;
5845 struct rpccli_samr_GetGroupsForUser_state
*state
;
5846 struct tevent_req
*subreq
;
5848 req
= tevent_req_create(mem_ctx
, &state
,
5849 struct rpccli_samr_GetGroupsForUser_state
);
5853 state
->out_mem_ctx
= NULL
;
5854 state
->dispatch_recv
= cli
->dispatch_recv
;
5857 state
->orig
.in
.user_handle
= _user_handle
;
5859 /* Out parameters */
5860 state
->orig
.out
.rids
= _rids
;
5863 ZERO_STRUCT(state
->orig
.out
.result
);
5865 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5866 "rpccli_samr_GetGroupsForUser_out_memory");
5867 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5868 return tevent_req_post(req
, ev
);
5871 /* make a temporary copy, that we pass to the dispatch function */
5872 state
->tmp
= state
->orig
;
5874 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5876 NDR_SAMR_GETGROUPSFORUSER
,
5878 if (tevent_req_nomem(subreq
, req
)) {
5879 return tevent_req_post(req
, ev
);
5881 tevent_req_set_callback(subreq
, rpccli_samr_GetGroupsForUser_done
, req
);
5885 static void rpccli_samr_GetGroupsForUser_done(struct tevent_req
*subreq
)
5887 struct tevent_req
*req
= tevent_req_callback_data(
5888 subreq
, struct tevent_req
);
5889 struct rpccli_samr_GetGroupsForUser_state
*state
= tevent_req_data(
5890 req
, struct rpccli_samr_GetGroupsForUser_state
);
5892 TALLOC_CTX
*mem_ctx
;
5894 if (state
->out_mem_ctx
) {
5895 mem_ctx
= state
->out_mem_ctx
;
5900 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5901 TALLOC_FREE(subreq
);
5902 if (!NT_STATUS_IS_OK(status
)) {
5903 tevent_req_nterror(req
, status
);
5907 /* Copy out parameters */
5908 *state
->orig
.out
.rids
= *state
->tmp
.out
.rids
;
5911 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5913 /* Reset temporary structure */
5914 ZERO_STRUCT(state
->tmp
);
5916 tevent_req_done(req
);
5919 NTSTATUS
rpccli_samr_GetGroupsForUser_recv(struct tevent_req
*req
,
5920 TALLOC_CTX
*mem_ctx
,
5923 struct rpccli_samr_GetGroupsForUser_state
*state
= tevent_req_data(
5924 req
, struct rpccli_samr_GetGroupsForUser_state
);
5927 if (tevent_req_is_nterror(req
, &status
)) {
5928 tevent_req_received(req
);
5932 /* Steal possbile out parameters to the callers context */
5933 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5936 *result
= state
->orig
.out
.result
;
5938 tevent_req_received(req
);
5939 return NT_STATUS_OK
;
5942 NTSTATUS
rpccli_samr_GetGroupsForUser(struct rpc_pipe_client
*cli
,
5943 TALLOC_CTX
*mem_ctx
,
5944 struct policy_handle
*user_handle
/* [in] [ref] */,
5945 struct samr_RidWithAttributeArray
**rids
/* [out] [ref] */)
5947 struct samr_GetGroupsForUser r
;
5951 r
.in
.user_handle
= user_handle
;
5953 status
= cli
->dispatch(cli
,
5956 NDR_SAMR_GETGROUPSFORUSER
,
5959 if (!NT_STATUS_IS_OK(status
)) {
5963 if (NT_STATUS_IS_ERR(status
)) {
5967 /* Return variables */
5968 *rids
= *r
.out
.rids
;
5971 return r
.out
.result
;
5974 struct rpccli_samr_QueryDisplayInfo_state
{
5975 struct samr_QueryDisplayInfo orig
;
5976 struct samr_QueryDisplayInfo tmp
;
5977 TALLOC_CTX
*out_mem_ctx
;
5978 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5981 static void rpccli_samr_QueryDisplayInfo_done(struct tevent_req
*subreq
);
5983 struct tevent_req
*rpccli_samr_QueryDisplayInfo_send(TALLOC_CTX
*mem_ctx
,
5984 struct tevent_context
*ev
,
5985 struct rpc_pipe_client
*cli
,
5986 struct policy_handle
*_domain_handle
/* [in] [ref] */,
5987 uint16_t _level
/* [in] */,
5988 uint32_t _start_idx
/* [in] */,
5989 uint32_t _max_entries
/* [in] */,
5990 uint32_t _buf_size
/* [in] */,
5991 uint32_t *_total_size
/* [out] [ref] */,
5992 uint32_t *_returned_size
/* [out] [ref] */,
5993 union samr_DispInfo
*_info
/* [out] [ref,switch_is(level)] */)
5995 struct tevent_req
*req
;
5996 struct rpccli_samr_QueryDisplayInfo_state
*state
;
5997 struct tevent_req
*subreq
;
5999 req
= tevent_req_create(mem_ctx
, &state
,
6000 struct rpccli_samr_QueryDisplayInfo_state
);
6004 state
->out_mem_ctx
= NULL
;
6005 state
->dispatch_recv
= cli
->dispatch_recv
;
6008 state
->orig
.in
.domain_handle
= _domain_handle
;
6009 state
->orig
.in
.level
= _level
;
6010 state
->orig
.in
.start_idx
= _start_idx
;
6011 state
->orig
.in
.max_entries
= _max_entries
;
6012 state
->orig
.in
.buf_size
= _buf_size
;
6014 /* Out parameters */
6015 state
->orig
.out
.total_size
= _total_size
;
6016 state
->orig
.out
.returned_size
= _returned_size
;
6017 state
->orig
.out
.info
= _info
;
6020 ZERO_STRUCT(state
->orig
.out
.result
);
6022 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6023 "rpccli_samr_QueryDisplayInfo_out_memory");
6024 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6025 return tevent_req_post(req
, ev
);
6028 /* make a temporary copy, that we pass to the dispatch function */
6029 state
->tmp
= state
->orig
;
6031 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6033 NDR_SAMR_QUERYDISPLAYINFO
,
6035 if (tevent_req_nomem(subreq
, req
)) {
6036 return tevent_req_post(req
, ev
);
6038 tevent_req_set_callback(subreq
, rpccli_samr_QueryDisplayInfo_done
, req
);
6042 static void rpccli_samr_QueryDisplayInfo_done(struct tevent_req
*subreq
)
6044 struct tevent_req
*req
= tevent_req_callback_data(
6045 subreq
, struct tevent_req
);
6046 struct rpccli_samr_QueryDisplayInfo_state
*state
= tevent_req_data(
6047 req
, struct rpccli_samr_QueryDisplayInfo_state
);
6049 TALLOC_CTX
*mem_ctx
;
6051 if (state
->out_mem_ctx
) {
6052 mem_ctx
= state
->out_mem_ctx
;
6057 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6058 TALLOC_FREE(subreq
);
6059 if (!NT_STATUS_IS_OK(status
)) {
6060 tevent_req_nterror(req
, status
);
6064 /* Copy out parameters */
6065 *state
->orig
.out
.total_size
= *state
->tmp
.out
.total_size
;
6066 *state
->orig
.out
.returned_size
= *state
->tmp
.out
.returned_size
;
6067 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
6070 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6072 /* Reset temporary structure */
6073 ZERO_STRUCT(state
->tmp
);
6075 tevent_req_done(req
);
6078 NTSTATUS
rpccli_samr_QueryDisplayInfo_recv(struct tevent_req
*req
,
6079 TALLOC_CTX
*mem_ctx
,
6082 struct rpccli_samr_QueryDisplayInfo_state
*state
= tevent_req_data(
6083 req
, struct rpccli_samr_QueryDisplayInfo_state
);
6086 if (tevent_req_is_nterror(req
, &status
)) {
6087 tevent_req_received(req
);
6091 /* Steal possbile out parameters to the callers context */
6092 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6095 *result
= state
->orig
.out
.result
;
6097 tevent_req_received(req
);
6098 return NT_STATUS_OK
;
6101 NTSTATUS
rpccli_samr_QueryDisplayInfo(struct rpc_pipe_client
*cli
,
6102 TALLOC_CTX
*mem_ctx
,
6103 struct policy_handle
*domain_handle
/* [in] [ref] */,
6104 uint16_t level
/* [in] */,
6105 uint32_t start_idx
/* [in] */,
6106 uint32_t max_entries
/* [in] */,
6107 uint32_t buf_size
/* [in] */,
6108 uint32_t *total_size
/* [out] [ref] */,
6109 uint32_t *returned_size
/* [out] [ref] */,
6110 union samr_DispInfo
*info
/* [out] [ref,switch_is(level)] */)
6112 struct samr_QueryDisplayInfo r
;
6116 r
.in
.domain_handle
= domain_handle
;
6118 r
.in
.start_idx
= start_idx
;
6119 r
.in
.max_entries
= max_entries
;
6120 r
.in
.buf_size
= buf_size
;
6122 status
= cli
->dispatch(cli
,
6125 NDR_SAMR_QUERYDISPLAYINFO
,
6128 if (!NT_STATUS_IS_OK(status
)) {
6132 if (NT_STATUS_IS_ERR(status
)) {
6136 /* Return variables */
6137 *total_size
= *r
.out
.total_size
;
6138 *returned_size
= *r
.out
.returned_size
;
6139 *info
= *r
.out
.info
;
6142 return r
.out
.result
;
6145 struct rpccli_samr_GetDisplayEnumerationIndex_state
{
6146 struct samr_GetDisplayEnumerationIndex orig
;
6147 struct samr_GetDisplayEnumerationIndex tmp
;
6148 TALLOC_CTX
*out_mem_ctx
;
6149 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6152 static void rpccli_samr_GetDisplayEnumerationIndex_done(struct tevent_req
*subreq
);
6154 struct tevent_req
*rpccli_samr_GetDisplayEnumerationIndex_send(TALLOC_CTX
*mem_ctx
,
6155 struct tevent_context
*ev
,
6156 struct rpc_pipe_client
*cli
,
6157 struct policy_handle
*_domain_handle
/* [in] [ref] */,
6158 uint16_t _level
/* [in] */,
6159 struct lsa_String
*_name
/* [in] [ref] */,
6160 uint32_t *_idx
/* [out] [ref] */)
6162 struct tevent_req
*req
;
6163 struct rpccli_samr_GetDisplayEnumerationIndex_state
*state
;
6164 struct tevent_req
*subreq
;
6166 req
= tevent_req_create(mem_ctx
, &state
,
6167 struct rpccli_samr_GetDisplayEnumerationIndex_state
);
6171 state
->out_mem_ctx
= NULL
;
6172 state
->dispatch_recv
= cli
->dispatch_recv
;
6175 state
->orig
.in
.domain_handle
= _domain_handle
;
6176 state
->orig
.in
.level
= _level
;
6177 state
->orig
.in
.name
= _name
;
6179 /* Out parameters */
6180 state
->orig
.out
.idx
= _idx
;
6183 ZERO_STRUCT(state
->orig
.out
.result
);
6185 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6186 "rpccli_samr_GetDisplayEnumerationIndex_out_memory");
6187 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6188 return tevent_req_post(req
, ev
);
6191 /* make a temporary copy, that we pass to the dispatch function */
6192 state
->tmp
= state
->orig
;
6194 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6196 NDR_SAMR_GETDISPLAYENUMERATIONINDEX
,
6198 if (tevent_req_nomem(subreq
, req
)) {
6199 return tevent_req_post(req
, ev
);
6201 tevent_req_set_callback(subreq
, rpccli_samr_GetDisplayEnumerationIndex_done
, req
);
6205 static void rpccli_samr_GetDisplayEnumerationIndex_done(struct tevent_req
*subreq
)
6207 struct tevent_req
*req
= tevent_req_callback_data(
6208 subreq
, struct tevent_req
);
6209 struct rpccli_samr_GetDisplayEnumerationIndex_state
*state
= tevent_req_data(
6210 req
, struct rpccli_samr_GetDisplayEnumerationIndex_state
);
6212 TALLOC_CTX
*mem_ctx
;
6214 if (state
->out_mem_ctx
) {
6215 mem_ctx
= state
->out_mem_ctx
;
6220 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6221 TALLOC_FREE(subreq
);
6222 if (!NT_STATUS_IS_OK(status
)) {
6223 tevent_req_nterror(req
, status
);
6227 /* Copy out parameters */
6228 *state
->orig
.out
.idx
= *state
->tmp
.out
.idx
;
6231 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6233 /* Reset temporary structure */
6234 ZERO_STRUCT(state
->tmp
);
6236 tevent_req_done(req
);
6239 NTSTATUS
rpccli_samr_GetDisplayEnumerationIndex_recv(struct tevent_req
*req
,
6240 TALLOC_CTX
*mem_ctx
,
6243 struct rpccli_samr_GetDisplayEnumerationIndex_state
*state
= tevent_req_data(
6244 req
, struct rpccli_samr_GetDisplayEnumerationIndex_state
);
6247 if (tevent_req_is_nterror(req
, &status
)) {
6248 tevent_req_received(req
);
6252 /* Steal possbile out parameters to the callers context */
6253 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6256 *result
= state
->orig
.out
.result
;
6258 tevent_req_received(req
);
6259 return NT_STATUS_OK
;
6262 NTSTATUS
rpccli_samr_GetDisplayEnumerationIndex(struct rpc_pipe_client
*cli
,
6263 TALLOC_CTX
*mem_ctx
,
6264 struct policy_handle
*domain_handle
/* [in] [ref] */,
6265 uint16_t level
/* [in] */,
6266 struct lsa_String
*name
/* [in] [ref] */,
6267 uint32_t *idx
/* [out] [ref] */)
6269 struct samr_GetDisplayEnumerationIndex r
;
6273 r
.in
.domain_handle
= domain_handle
;
6277 status
= cli
->dispatch(cli
,
6280 NDR_SAMR_GETDISPLAYENUMERATIONINDEX
,
6283 if (!NT_STATUS_IS_OK(status
)) {
6287 if (NT_STATUS_IS_ERR(status
)) {
6291 /* Return variables */
6295 return r
.out
.result
;
6298 struct rpccli_samr_TestPrivateFunctionsDomain_state
{
6299 struct samr_TestPrivateFunctionsDomain orig
;
6300 struct samr_TestPrivateFunctionsDomain tmp
;
6301 TALLOC_CTX
*out_mem_ctx
;
6302 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6305 static void rpccli_samr_TestPrivateFunctionsDomain_done(struct tevent_req
*subreq
);
6307 struct tevent_req
*rpccli_samr_TestPrivateFunctionsDomain_send(TALLOC_CTX
*mem_ctx
,
6308 struct tevent_context
*ev
,
6309 struct rpc_pipe_client
*cli
,
6310 struct policy_handle
*_domain_handle
/* [in] [ref] */)
6312 struct tevent_req
*req
;
6313 struct rpccli_samr_TestPrivateFunctionsDomain_state
*state
;
6314 struct tevent_req
*subreq
;
6316 req
= tevent_req_create(mem_ctx
, &state
,
6317 struct rpccli_samr_TestPrivateFunctionsDomain_state
);
6321 state
->out_mem_ctx
= NULL
;
6322 state
->dispatch_recv
= cli
->dispatch_recv
;
6325 state
->orig
.in
.domain_handle
= _domain_handle
;
6327 /* Out parameters */
6330 ZERO_STRUCT(state
->orig
.out
.result
);
6332 /* make a temporary copy, that we pass to the dispatch function */
6333 state
->tmp
= state
->orig
;
6335 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6337 NDR_SAMR_TESTPRIVATEFUNCTIONSDOMAIN
,
6339 if (tevent_req_nomem(subreq
, req
)) {
6340 return tevent_req_post(req
, ev
);
6342 tevent_req_set_callback(subreq
, rpccli_samr_TestPrivateFunctionsDomain_done
, req
);
6346 static void rpccli_samr_TestPrivateFunctionsDomain_done(struct tevent_req
*subreq
)
6348 struct tevent_req
*req
= tevent_req_callback_data(
6349 subreq
, struct tevent_req
);
6350 struct rpccli_samr_TestPrivateFunctionsDomain_state
*state
= tevent_req_data(
6351 req
, struct rpccli_samr_TestPrivateFunctionsDomain_state
);
6353 TALLOC_CTX
*mem_ctx
;
6355 if (state
->out_mem_ctx
) {
6356 mem_ctx
= state
->out_mem_ctx
;
6361 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6362 TALLOC_FREE(subreq
);
6363 if (!NT_STATUS_IS_OK(status
)) {
6364 tevent_req_nterror(req
, status
);
6368 /* Copy out parameters */
6371 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6373 /* Reset temporary structure */
6374 ZERO_STRUCT(state
->tmp
);
6376 tevent_req_done(req
);
6379 NTSTATUS
rpccli_samr_TestPrivateFunctionsDomain_recv(struct tevent_req
*req
,
6380 TALLOC_CTX
*mem_ctx
,
6383 struct rpccli_samr_TestPrivateFunctionsDomain_state
*state
= tevent_req_data(
6384 req
, struct rpccli_samr_TestPrivateFunctionsDomain_state
);
6387 if (tevent_req_is_nterror(req
, &status
)) {
6388 tevent_req_received(req
);
6392 /* Steal possbile out parameters to the callers context */
6393 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6396 *result
= state
->orig
.out
.result
;
6398 tevent_req_received(req
);
6399 return NT_STATUS_OK
;
6402 NTSTATUS
rpccli_samr_TestPrivateFunctionsDomain(struct rpc_pipe_client
*cli
,
6403 TALLOC_CTX
*mem_ctx
,
6404 struct policy_handle
*domain_handle
/* [in] [ref] */)
6406 struct samr_TestPrivateFunctionsDomain r
;
6410 r
.in
.domain_handle
= domain_handle
;
6412 status
= cli
->dispatch(cli
,
6415 NDR_SAMR_TESTPRIVATEFUNCTIONSDOMAIN
,
6418 if (!NT_STATUS_IS_OK(status
)) {
6422 if (NT_STATUS_IS_ERR(status
)) {
6426 /* Return variables */
6429 return r
.out
.result
;
6432 struct rpccli_samr_TestPrivateFunctionsUser_state
{
6433 struct samr_TestPrivateFunctionsUser orig
;
6434 struct samr_TestPrivateFunctionsUser tmp
;
6435 TALLOC_CTX
*out_mem_ctx
;
6436 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6439 static void rpccli_samr_TestPrivateFunctionsUser_done(struct tevent_req
*subreq
);
6441 struct tevent_req
*rpccli_samr_TestPrivateFunctionsUser_send(TALLOC_CTX
*mem_ctx
,
6442 struct tevent_context
*ev
,
6443 struct rpc_pipe_client
*cli
,
6444 struct policy_handle
*_user_handle
/* [in] [ref] */)
6446 struct tevent_req
*req
;
6447 struct rpccli_samr_TestPrivateFunctionsUser_state
*state
;
6448 struct tevent_req
*subreq
;
6450 req
= tevent_req_create(mem_ctx
, &state
,
6451 struct rpccli_samr_TestPrivateFunctionsUser_state
);
6455 state
->out_mem_ctx
= NULL
;
6456 state
->dispatch_recv
= cli
->dispatch_recv
;
6459 state
->orig
.in
.user_handle
= _user_handle
;
6461 /* Out parameters */
6464 ZERO_STRUCT(state
->orig
.out
.result
);
6466 /* make a temporary copy, that we pass to the dispatch function */
6467 state
->tmp
= state
->orig
;
6469 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6471 NDR_SAMR_TESTPRIVATEFUNCTIONSUSER
,
6473 if (tevent_req_nomem(subreq
, req
)) {
6474 return tevent_req_post(req
, ev
);
6476 tevent_req_set_callback(subreq
, rpccli_samr_TestPrivateFunctionsUser_done
, req
);
6480 static void rpccli_samr_TestPrivateFunctionsUser_done(struct tevent_req
*subreq
)
6482 struct tevent_req
*req
= tevent_req_callback_data(
6483 subreq
, struct tevent_req
);
6484 struct rpccli_samr_TestPrivateFunctionsUser_state
*state
= tevent_req_data(
6485 req
, struct rpccli_samr_TestPrivateFunctionsUser_state
);
6487 TALLOC_CTX
*mem_ctx
;
6489 if (state
->out_mem_ctx
) {
6490 mem_ctx
= state
->out_mem_ctx
;
6495 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6496 TALLOC_FREE(subreq
);
6497 if (!NT_STATUS_IS_OK(status
)) {
6498 tevent_req_nterror(req
, status
);
6502 /* Copy out parameters */
6505 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6507 /* Reset temporary structure */
6508 ZERO_STRUCT(state
->tmp
);
6510 tevent_req_done(req
);
6513 NTSTATUS
rpccli_samr_TestPrivateFunctionsUser_recv(struct tevent_req
*req
,
6514 TALLOC_CTX
*mem_ctx
,
6517 struct rpccli_samr_TestPrivateFunctionsUser_state
*state
= tevent_req_data(
6518 req
, struct rpccli_samr_TestPrivateFunctionsUser_state
);
6521 if (tevent_req_is_nterror(req
, &status
)) {
6522 tevent_req_received(req
);
6526 /* Steal possbile out parameters to the callers context */
6527 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6530 *result
= state
->orig
.out
.result
;
6532 tevent_req_received(req
);
6533 return NT_STATUS_OK
;
6536 NTSTATUS
rpccli_samr_TestPrivateFunctionsUser(struct rpc_pipe_client
*cli
,
6537 TALLOC_CTX
*mem_ctx
,
6538 struct policy_handle
*user_handle
/* [in] [ref] */)
6540 struct samr_TestPrivateFunctionsUser r
;
6544 r
.in
.user_handle
= user_handle
;
6546 status
= cli
->dispatch(cli
,
6549 NDR_SAMR_TESTPRIVATEFUNCTIONSUSER
,
6552 if (!NT_STATUS_IS_OK(status
)) {
6556 if (NT_STATUS_IS_ERR(status
)) {
6560 /* Return variables */
6563 return r
.out
.result
;
6566 struct rpccli_samr_GetUserPwInfo_state
{
6567 struct samr_GetUserPwInfo orig
;
6568 struct samr_GetUserPwInfo tmp
;
6569 TALLOC_CTX
*out_mem_ctx
;
6570 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6573 static void rpccli_samr_GetUserPwInfo_done(struct tevent_req
*subreq
);
6575 struct tevent_req
*rpccli_samr_GetUserPwInfo_send(TALLOC_CTX
*mem_ctx
,
6576 struct tevent_context
*ev
,
6577 struct rpc_pipe_client
*cli
,
6578 struct policy_handle
*_user_handle
/* [in] [ref] */,
6579 struct samr_PwInfo
*_info
/* [out] [ref] */)
6581 struct tevent_req
*req
;
6582 struct rpccli_samr_GetUserPwInfo_state
*state
;
6583 struct tevent_req
*subreq
;
6585 req
= tevent_req_create(mem_ctx
, &state
,
6586 struct rpccli_samr_GetUserPwInfo_state
);
6590 state
->out_mem_ctx
= NULL
;
6591 state
->dispatch_recv
= cli
->dispatch_recv
;
6594 state
->orig
.in
.user_handle
= _user_handle
;
6596 /* Out parameters */
6597 state
->orig
.out
.info
= _info
;
6600 ZERO_STRUCT(state
->orig
.out
.result
);
6602 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6603 "rpccli_samr_GetUserPwInfo_out_memory");
6604 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6605 return tevent_req_post(req
, ev
);
6608 /* make a temporary copy, that we pass to the dispatch function */
6609 state
->tmp
= state
->orig
;
6611 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6613 NDR_SAMR_GETUSERPWINFO
,
6615 if (tevent_req_nomem(subreq
, req
)) {
6616 return tevent_req_post(req
, ev
);
6618 tevent_req_set_callback(subreq
, rpccli_samr_GetUserPwInfo_done
, req
);
6622 static void rpccli_samr_GetUserPwInfo_done(struct tevent_req
*subreq
)
6624 struct tevent_req
*req
= tevent_req_callback_data(
6625 subreq
, struct tevent_req
);
6626 struct rpccli_samr_GetUserPwInfo_state
*state
= tevent_req_data(
6627 req
, struct rpccli_samr_GetUserPwInfo_state
);
6629 TALLOC_CTX
*mem_ctx
;
6631 if (state
->out_mem_ctx
) {
6632 mem_ctx
= state
->out_mem_ctx
;
6637 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6638 TALLOC_FREE(subreq
);
6639 if (!NT_STATUS_IS_OK(status
)) {
6640 tevent_req_nterror(req
, status
);
6644 /* Copy out parameters */
6645 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
6648 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6650 /* Reset temporary structure */
6651 ZERO_STRUCT(state
->tmp
);
6653 tevent_req_done(req
);
6656 NTSTATUS
rpccli_samr_GetUserPwInfo_recv(struct tevent_req
*req
,
6657 TALLOC_CTX
*mem_ctx
,
6660 struct rpccli_samr_GetUserPwInfo_state
*state
= tevent_req_data(
6661 req
, struct rpccli_samr_GetUserPwInfo_state
);
6664 if (tevent_req_is_nterror(req
, &status
)) {
6665 tevent_req_received(req
);
6669 /* Steal possbile out parameters to the callers context */
6670 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6673 *result
= state
->orig
.out
.result
;
6675 tevent_req_received(req
);
6676 return NT_STATUS_OK
;
6679 NTSTATUS
rpccli_samr_GetUserPwInfo(struct rpc_pipe_client
*cli
,
6680 TALLOC_CTX
*mem_ctx
,
6681 struct policy_handle
*user_handle
/* [in] [ref] */,
6682 struct samr_PwInfo
*info
/* [out] [ref] */)
6684 struct samr_GetUserPwInfo r
;
6688 r
.in
.user_handle
= user_handle
;
6690 status
= cli
->dispatch(cli
,
6693 NDR_SAMR_GETUSERPWINFO
,
6696 if (!NT_STATUS_IS_OK(status
)) {
6700 if (NT_STATUS_IS_ERR(status
)) {
6704 /* Return variables */
6705 *info
= *r
.out
.info
;
6708 return r
.out
.result
;
6711 struct rpccli_samr_RemoveMemberFromForeignDomain_state
{
6712 struct samr_RemoveMemberFromForeignDomain orig
;
6713 struct samr_RemoveMemberFromForeignDomain tmp
;
6714 TALLOC_CTX
*out_mem_ctx
;
6715 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6718 static void rpccli_samr_RemoveMemberFromForeignDomain_done(struct tevent_req
*subreq
);
6720 struct tevent_req
*rpccli_samr_RemoveMemberFromForeignDomain_send(TALLOC_CTX
*mem_ctx
,
6721 struct tevent_context
*ev
,
6722 struct rpc_pipe_client
*cli
,
6723 struct policy_handle
*_domain_handle
/* [in] [ref] */,
6724 struct dom_sid2
*_sid
/* [in] [ref] */)
6726 struct tevent_req
*req
;
6727 struct rpccli_samr_RemoveMemberFromForeignDomain_state
*state
;
6728 struct tevent_req
*subreq
;
6730 req
= tevent_req_create(mem_ctx
, &state
,
6731 struct rpccli_samr_RemoveMemberFromForeignDomain_state
);
6735 state
->out_mem_ctx
= NULL
;
6736 state
->dispatch_recv
= cli
->dispatch_recv
;
6739 state
->orig
.in
.domain_handle
= _domain_handle
;
6740 state
->orig
.in
.sid
= _sid
;
6742 /* Out parameters */
6745 ZERO_STRUCT(state
->orig
.out
.result
);
6747 /* make a temporary copy, that we pass to the dispatch function */
6748 state
->tmp
= state
->orig
;
6750 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6752 NDR_SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN
,
6754 if (tevent_req_nomem(subreq
, req
)) {
6755 return tevent_req_post(req
, ev
);
6757 tevent_req_set_callback(subreq
, rpccli_samr_RemoveMemberFromForeignDomain_done
, req
);
6761 static void rpccli_samr_RemoveMemberFromForeignDomain_done(struct tevent_req
*subreq
)
6763 struct tevent_req
*req
= tevent_req_callback_data(
6764 subreq
, struct tevent_req
);
6765 struct rpccli_samr_RemoveMemberFromForeignDomain_state
*state
= tevent_req_data(
6766 req
, struct rpccli_samr_RemoveMemberFromForeignDomain_state
);
6768 TALLOC_CTX
*mem_ctx
;
6770 if (state
->out_mem_ctx
) {
6771 mem_ctx
= state
->out_mem_ctx
;
6776 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6777 TALLOC_FREE(subreq
);
6778 if (!NT_STATUS_IS_OK(status
)) {
6779 tevent_req_nterror(req
, status
);
6783 /* Copy out parameters */
6786 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6788 /* Reset temporary structure */
6789 ZERO_STRUCT(state
->tmp
);
6791 tevent_req_done(req
);
6794 NTSTATUS
rpccli_samr_RemoveMemberFromForeignDomain_recv(struct tevent_req
*req
,
6795 TALLOC_CTX
*mem_ctx
,
6798 struct rpccli_samr_RemoveMemberFromForeignDomain_state
*state
= tevent_req_data(
6799 req
, struct rpccli_samr_RemoveMemberFromForeignDomain_state
);
6802 if (tevent_req_is_nterror(req
, &status
)) {
6803 tevent_req_received(req
);
6807 /* Steal possbile out parameters to the callers context */
6808 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6811 *result
= state
->orig
.out
.result
;
6813 tevent_req_received(req
);
6814 return NT_STATUS_OK
;
6817 NTSTATUS
rpccli_samr_RemoveMemberFromForeignDomain(struct rpc_pipe_client
*cli
,
6818 TALLOC_CTX
*mem_ctx
,
6819 struct policy_handle
*domain_handle
/* [in] [ref] */,
6820 struct dom_sid2
*sid
/* [in] [ref] */)
6822 struct samr_RemoveMemberFromForeignDomain r
;
6826 r
.in
.domain_handle
= domain_handle
;
6829 status
= cli
->dispatch(cli
,
6832 NDR_SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN
,
6835 if (!NT_STATUS_IS_OK(status
)) {
6839 if (NT_STATUS_IS_ERR(status
)) {
6843 /* Return variables */
6846 return r
.out
.result
;
6849 struct rpccli_samr_QueryDomainInfo2_state
{
6850 struct samr_QueryDomainInfo2 orig
;
6851 struct samr_QueryDomainInfo2 tmp
;
6852 TALLOC_CTX
*out_mem_ctx
;
6853 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6856 static void rpccli_samr_QueryDomainInfo2_done(struct tevent_req
*subreq
);
6858 struct tevent_req
*rpccli_samr_QueryDomainInfo2_send(TALLOC_CTX
*mem_ctx
,
6859 struct tevent_context
*ev
,
6860 struct rpc_pipe_client
*cli
,
6861 struct policy_handle
*_domain_handle
/* [in] [ref] */,
6862 enum samr_DomainInfoClass _level
/* [in] */,
6863 union samr_DomainInfo
**_info
/* [out] [ref,switch_is(level)] */)
6865 struct tevent_req
*req
;
6866 struct rpccli_samr_QueryDomainInfo2_state
*state
;
6867 struct tevent_req
*subreq
;
6869 req
= tevent_req_create(mem_ctx
, &state
,
6870 struct rpccli_samr_QueryDomainInfo2_state
);
6874 state
->out_mem_ctx
= NULL
;
6875 state
->dispatch_recv
= cli
->dispatch_recv
;
6878 state
->orig
.in
.domain_handle
= _domain_handle
;
6879 state
->orig
.in
.level
= _level
;
6881 /* Out parameters */
6882 state
->orig
.out
.info
= _info
;
6885 ZERO_STRUCT(state
->orig
.out
.result
);
6887 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6888 "rpccli_samr_QueryDomainInfo2_out_memory");
6889 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6890 return tevent_req_post(req
, ev
);
6893 /* make a temporary copy, that we pass to the dispatch function */
6894 state
->tmp
= state
->orig
;
6896 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6898 NDR_SAMR_QUERYDOMAININFO2
,
6900 if (tevent_req_nomem(subreq
, req
)) {
6901 return tevent_req_post(req
, ev
);
6903 tevent_req_set_callback(subreq
, rpccli_samr_QueryDomainInfo2_done
, req
);
6907 static void rpccli_samr_QueryDomainInfo2_done(struct tevent_req
*subreq
)
6909 struct tevent_req
*req
= tevent_req_callback_data(
6910 subreq
, struct tevent_req
);
6911 struct rpccli_samr_QueryDomainInfo2_state
*state
= tevent_req_data(
6912 req
, struct rpccli_samr_QueryDomainInfo2_state
);
6914 TALLOC_CTX
*mem_ctx
;
6916 if (state
->out_mem_ctx
) {
6917 mem_ctx
= state
->out_mem_ctx
;
6922 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6923 TALLOC_FREE(subreq
);
6924 if (!NT_STATUS_IS_OK(status
)) {
6925 tevent_req_nterror(req
, status
);
6929 /* Copy out parameters */
6930 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
6933 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6935 /* Reset temporary structure */
6936 ZERO_STRUCT(state
->tmp
);
6938 tevent_req_done(req
);
6941 NTSTATUS
rpccli_samr_QueryDomainInfo2_recv(struct tevent_req
*req
,
6942 TALLOC_CTX
*mem_ctx
,
6945 struct rpccli_samr_QueryDomainInfo2_state
*state
= tevent_req_data(
6946 req
, struct rpccli_samr_QueryDomainInfo2_state
);
6949 if (tevent_req_is_nterror(req
, &status
)) {
6950 tevent_req_received(req
);
6954 /* Steal possbile out parameters to the callers context */
6955 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6958 *result
= state
->orig
.out
.result
;
6960 tevent_req_received(req
);
6961 return NT_STATUS_OK
;
6964 NTSTATUS
rpccli_samr_QueryDomainInfo2(struct rpc_pipe_client
*cli
,
6965 TALLOC_CTX
*mem_ctx
,
6966 struct policy_handle
*domain_handle
/* [in] [ref] */,
6967 enum samr_DomainInfoClass level
/* [in] */,
6968 union samr_DomainInfo
**info
/* [out] [ref,switch_is(level)] */)
6970 struct samr_QueryDomainInfo2 r
;
6974 r
.in
.domain_handle
= domain_handle
;
6977 status
= cli
->dispatch(cli
,
6980 NDR_SAMR_QUERYDOMAININFO2
,
6983 if (!NT_STATUS_IS_OK(status
)) {
6987 if (NT_STATUS_IS_ERR(status
)) {
6991 /* Return variables */
6992 *info
= *r
.out
.info
;
6995 return r
.out
.result
;
6998 struct rpccli_samr_QueryUserInfo2_state
{
6999 struct samr_QueryUserInfo2 orig
;
7000 struct samr_QueryUserInfo2 tmp
;
7001 TALLOC_CTX
*out_mem_ctx
;
7002 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7005 static void rpccli_samr_QueryUserInfo2_done(struct tevent_req
*subreq
);
7007 struct tevent_req
*rpccli_samr_QueryUserInfo2_send(TALLOC_CTX
*mem_ctx
,
7008 struct tevent_context
*ev
,
7009 struct rpc_pipe_client
*cli
,
7010 struct policy_handle
*_user_handle
/* [in] [ref] */,
7011 enum samr_UserInfoLevel _level
/* [in] */,
7012 union samr_UserInfo
**_info
/* [out] [ref,switch_is(level)] */)
7014 struct tevent_req
*req
;
7015 struct rpccli_samr_QueryUserInfo2_state
*state
;
7016 struct tevent_req
*subreq
;
7018 req
= tevent_req_create(mem_ctx
, &state
,
7019 struct rpccli_samr_QueryUserInfo2_state
);
7023 state
->out_mem_ctx
= NULL
;
7024 state
->dispatch_recv
= cli
->dispatch_recv
;
7027 state
->orig
.in
.user_handle
= _user_handle
;
7028 state
->orig
.in
.level
= _level
;
7030 /* Out parameters */
7031 state
->orig
.out
.info
= _info
;
7034 ZERO_STRUCT(state
->orig
.out
.result
);
7036 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7037 "rpccli_samr_QueryUserInfo2_out_memory");
7038 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7039 return tevent_req_post(req
, ev
);
7042 /* make a temporary copy, that we pass to the dispatch function */
7043 state
->tmp
= state
->orig
;
7045 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7047 NDR_SAMR_QUERYUSERINFO2
,
7049 if (tevent_req_nomem(subreq
, req
)) {
7050 return tevent_req_post(req
, ev
);
7052 tevent_req_set_callback(subreq
, rpccli_samr_QueryUserInfo2_done
, req
);
7056 static void rpccli_samr_QueryUserInfo2_done(struct tevent_req
*subreq
)
7058 struct tevent_req
*req
= tevent_req_callback_data(
7059 subreq
, struct tevent_req
);
7060 struct rpccli_samr_QueryUserInfo2_state
*state
= tevent_req_data(
7061 req
, struct rpccli_samr_QueryUserInfo2_state
);
7063 TALLOC_CTX
*mem_ctx
;
7065 if (state
->out_mem_ctx
) {
7066 mem_ctx
= state
->out_mem_ctx
;
7071 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7072 TALLOC_FREE(subreq
);
7073 if (!NT_STATUS_IS_OK(status
)) {
7074 tevent_req_nterror(req
, status
);
7078 /* Copy out parameters */
7079 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
7082 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7084 /* Reset temporary structure */
7085 ZERO_STRUCT(state
->tmp
);
7087 tevent_req_done(req
);
7090 NTSTATUS
rpccli_samr_QueryUserInfo2_recv(struct tevent_req
*req
,
7091 TALLOC_CTX
*mem_ctx
,
7094 struct rpccli_samr_QueryUserInfo2_state
*state
= tevent_req_data(
7095 req
, struct rpccli_samr_QueryUserInfo2_state
);
7098 if (tevent_req_is_nterror(req
, &status
)) {
7099 tevent_req_received(req
);
7103 /* Steal possbile out parameters to the callers context */
7104 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7107 *result
= state
->orig
.out
.result
;
7109 tevent_req_received(req
);
7110 return NT_STATUS_OK
;
7113 NTSTATUS
rpccli_samr_QueryUserInfo2(struct rpc_pipe_client
*cli
,
7114 TALLOC_CTX
*mem_ctx
,
7115 struct policy_handle
*user_handle
/* [in] [ref] */,
7116 enum samr_UserInfoLevel level
/* [in] */,
7117 union samr_UserInfo
**info
/* [out] [ref,switch_is(level)] */)
7119 struct samr_QueryUserInfo2 r
;
7123 r
.in
.user_handle
= user_handle
;
7126 status
= cli
->dispatch(cli
,
7129 NDR_SAMR_QUERYUSERINFO2
,
7132 if (!NT_STATUS_IS_OK(status
)) {
7136 if (NT_STATUS_IS_ERR(status
)) {
7140 /* Return variables */
7141 *info
= *r
.out
.info
;
7144 return r
.out
.result
;
7147 struct rpccli_samr_QueryDisplayInfo2_state
{
7148 struct samr_QueryDisplayInfo2 orig
;
7149 struct samr_QueryDisplayInfo2 tmp
;
7150 TALLOC_CTX
*out_mem_ctx
;
7151 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7154 static void rpccli_samr_QueryDisplayInfo2_done(struct tevent_req
*subreq
);
7156 struct tevent_req
*rpccli_samr_QueryDisplayInfo2_send(TALLOC_CTX
*mem_ctx
,
7157 struct tevent_context
*ev
,
7158 struct rpc_pipe_client
*cli
,
7159 struct policy_handle
*_domain_handle
/* [in] [ref] */,
7160 uint16_t _level
/* [in] */,
7161 uint32_t _start_idx
/* [in] */,
7162 uint32_t _max_entries
/* [in] */,
7163 uint32_t _buf_size
/* [in] */,
7164 uint32_t *_total_size
/* [out] [ref] */,
7165 uint32_t *_returned_size
/* [out] [ref] */,
7166 union samr_DispInfo
*_info
/* [out] [ref,switch_is(level)] */)
7168 struct tevent_req
*req
;
7169 struct rpccli_samr_QueryDisplayInfo2_state
*state
;
7170 struct tevent_req
*subreq
;
7172 req
= tevent_req_create(mem_ctx
, &state
,
7173 struct rpccli_samr_QueryDisplayInfo2_state
);
7177 state
->out_mem_ctx
= NULL
;
7178 state
->dispatch_recv
= cli
->dispatch_recv
;
7181 state
->orig
.in
.domain_handle
= _domain_handle
;
7182 state
->orig
.in
.level
= _level
;
7183 state
->orig
.in
.start_idx
= _start_idx
;
7184 state
->orig
.in
.max_entries
= _max_entries
;
7185 state
->orig
.in
.buf_size
= _buf_size
;
7187 /* Out parameters */
7188 state
->orig
.out
.total_size
= _total_size
;
7189 state
->orig
.out
.returned_size
= _returned_size
;
7190 state
->orig
.out
.info
= _info
;
7193 ZERO_STRUCT(state
->orig
.out
.result
);
7195 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7196 "rpccli_samr_QueryDisplayInfo2_out_memory");
7197 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7198 return tevent_req_post(req
, ev
);
7201 /* make a temporary copy, that we pass to the dispatch function */
7202 state
->tmp
= state
->orig
;
7204 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7206 NDR_SAMR_QUERYDISPLAYINFO2
,
7208 if (tevent_req_nomem(subreq
, req
)) {
7209 return tevent_req_post(req
, ev
);
7211 tevent_req_set_callback(subreq
, rpccli_samr_QueryDisplayInfo2_done
, req
);
7215 static void rpccli_samr_QueryDisplayInfo2_done(struct tevent_req
*subreq
)
7217 struct tevent_req
*req
= tevent_req_callback_data(
7218 subreq
, struct tevent_req
);
7219 struct rpccli_samr_QueryDisplayInfo2_state
*state
= tevent_req_data(
7220 req
, struct rpccli_samr_QueryDisplayInfo2_state
);
7222 TALLOC_CTX
*mem_ctx
;
7224 if (state
->out_mem_ctx
) {
7225 mem_ctx
= state
->out_mem_ctx
;
7230 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7231 TALLOC_FREE(subreq
);
7232 if (!NT_STATUS_IS_OK(status
)) {
7233 tevent_req_nterror(req
, status
);
7237 /* Copy out parameters */
7238 *state
->orig
.out
.total_size
= *state
->tmp
.out
.total_size
;
7239 *state
->orig
.out
.returned_size
= *state
->tmp
.out
.returned_size
;
7240 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
7243 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7245 /* Reset temporary structure */
7246 ZERO_STRUCT(state
->tmp
);
7248 tevent_req_done(req
);
7251 NTSTATUS
rpccli_samr_QueryDisplayInfo2_recv(struct tevent_req
*req
,
7252 TALLOC_CTX
*mem_ctx
,
7255 struct rpccli_samr_QueryDisplayInfo2_state
*state
= tevent_req_data(
7256 req
, struct rpccli_samr_QueryDisplayInfo2_state
);
7259 if (tevent_req_is_nterror(req
, &status
)) {
7260 tevent_req_received(req
);
7264 /* Steal possbile out parameters to the callers context */
7265 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7268 *result
= state
->orig
.out
.result
;
7270 tevent_req_received(req
);
7271 return NT_STATUS_OK
;
7274 NTSTATUS
rpccli_samr_QueryDisplayInfo2(struct rpc_pipe_client
*cli
,
7275 TALLOC_CTX
*mem_ctx
,
7276 struct policy_handle
*domain_handle
/* [in] [ref] */,
7277 uint16_t level
/* [in] */,
7278 uint32_t start_idx
/* [in] */,
7279 uint32_t max_entries
/* [in] */,
7280 uint32_t buf_size
/* [in] */,
7281 uint32_t *total_size
/* [out] [ref] */,
7282 uint32_t *returned_size
/* [out] [ref] */,
7283 union samr_DispInfo
*info
/* [out] [ref,switch_is(level)] */)
7285 struct samr_QueryDisplayInfo2 r
;
7289 r
.in
.domain_handle
= domain_handle
;
7291 r
.in
.start_idx
= start_idx
;
7292 r
.in
.max_entries
= max_entries
;
7293 r
.in
.buf_size
= buf_size
;
7295 status
= cli
->dispatch(cli
,
7298 NDR_SAMR_QUERYDISPLAYINFO2
,
7301 if (!NT_STATUS_IS_OK(status
)) {
7305 if (NT_STATUS_IS_ERR(status
)) {
7309 /* Return variables */
7310 *total_size
= *r
.out
.total_size
;
7311 *returned_size
= *r
.out
.returned_size
;
7312 *info
= *r
.out
.info
;
7315 return r
.out
.result
;
7318 struct rpccli_samr_GetDisplayEnumerationIndex2_state
{
7319 struct samr_GetDisplayEnumerationIndex2 orig
;
7320 struct samr_GetDisplayEnumerationIndex2 tmp
;
7321 TALLOC_CTX
*out_mem_ctx
;
7322 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7325 static void rpccli_samr_GetDisplayEnumerationIndex2_done(struct tevent_req
*subreq
);
7327 struct tevent_req
*rpccli_samr_GetDisplayEnumerationIndex2_send(TALLOC_CTX
*mem_ctx
,
7328 struct tevent_context
*ev
,
7329 struct rpc_pipe_client
*cli
,
7330 struct policy_handle
*_domain_handle
/* [in] [ref] */,
7331 uint16_t _level
/* [in] */,
7332 struct lsa_String
*_name
/* [in] [ref] */,
7333 uint32_t *_idx
/* [out] [ref] */)
7335 struct tevent_req
*req
;
7336 struct rpccli_samr_GetDisplayEnumerationIndex2_state
*state
;
7337 struct tevent_req
*subreq
;
7339 req
= tevent_req_create(mem_ctx
, &state
,
7340 struct rpccli_samr_GetDisplayEnumerationIndex2_state
);
7344 state
->out_mem_ctx
= NULL
;
7345 state
->dispatch_recv
= cli
->dispatch_recv
;
7348 state
->orig
.in
.domain_handle
= _domain_handle
;
7349 state
->orig
.in
.level
= _level
;
7350 state
->orig
.in
.name
= _name
;
7352 /* Out parameters */
7353 state
->orig
.out
.idx
= _idx
;
7356 ZERO_STRUCT(state
->orig
.out
.result
);
7358 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7359 "rpccli_samr_GetDisplayEnumerationIndex2_out_memory");
7360 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7361 return tevent_req_post(req
, ev
);
7364 /* make a temporary copy, that we pass to the dispatch function */
7365 state
->tmp
= state
->orig
;
7367 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7369 NDR_SAMR_GETDISPLAYENUMERATIONINDEX2
,
7371 if (tevent_req_nomem(subreq
, req
)) {
7372 return tevent_req_post(req
, ev
);
7374 tevent_req_set_callback(subreq
, rpccli_samr_GetDisplayEnumerationIndex2_done
, req
);
7378 static void rpccli_samr_GetDisplayEnumerationIndex2_done(struct tevent_req
*subreq
)
7380 struct tevent_req
*req
= tevent_req_callback_data(
7381 subreq
, struct tevent_req
);
7382 struct rpccli_samr_GetDisplayEnumerationIndex2_state
*state
= tevent_req_data(
7383 req
, struct rpccli_samr_GetDisplayEnumerationIndex2_state
);
7385 TALLOC_CTX
*mem_ctx
;
7387 if (state
->out_mem_ctx
) {
7388 mem_ctx
= state
->out_mem_ctx
;
7393 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7394 TALLOC_FREE(subreq
);
7395 if (!NT_STATUS_IS_OK(status
)) {
7396 tevent_req_nterror(req
, status
);
7400 /* Copy out parameters */
7401 *state
->orig
.out
.idx
= *state
->tmp
.out
.idx
;
7404 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7406 /* Reset temporary structure */
7407 ZERO_STRUCT(state
->tmp
);
7409 tevent_req_done(req
);
7412 NTSTATUS
rpccli_samr_GetDisplayEnumerationIndex2_recv(struct tevent_req
*req
,
7413 TALLOC_CTX
*mem_ctx
,
7416 struct rpccli_samr_GetDisplayEnumerationIndex2_state
*state
= tevent_req_data(
7417 req
, struct rpccli_samr_GetDisplayEnumerationIndex2_state
);
7420 if (tevent_req_is_nterror(req
, &status
)) {
7421 tevent_req_received(req
);
7425 /* Steal possbile out parameters to the callers context */
7426 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7429 *result
= state
->orig
.out
.result
;
7431 tevent_req_received(req
);
7432 return NT_STATUS_OK
;
7435 NTSTATUS
rpccli_samr_GetDisplayEnumerationIndex2(struct rpc_pipe_client
*cli
,
7436 TALLOC_CTX
*mem_ctx
,
7437 struct policy_handle
*domain_handle
/* [in] [ref] */,
7438 uint16_t level
/* [in] */,
7439 struct lsa_String
*name
/* [in] [ref] */,
7440 uint32_t *idx
/* [out] [ref] */)
7442 struct samr_GetDisplayEnumerationIndex2 r
;
7446 r
.in
.domain_handle
= domain_handle
;
7450 status
= cli
->dispatch(cli
,
7453 NDR_SAMR_GETDISPLAYENUMERATIONINDEX2
,
7456 if (!NT_STATUS_IS_OK(status
)) {
7460 if (NT_STATUS_IS_ERR(status
)) {
7464 /* Return variables */
7468 return r
.out
.result
;
7471 struct rpccli_samr_CreateUser2_state
{
7472 struct samr_CreateUser2 orig
;
7473 struct samr_CreateUser2 tmp
;
7474 TALLOC_CTX
*out_mem_ctx
;
7475 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7478 static void rpccli_samr_CreateUser2_done(struct tevent_req
*subreq
);
7480 struct tevent_req
*rpccli_samr_CreateUser2_send(TALLOC_CTX
*mem_ctx
,
7481 struct tevent_context
*ev
,
7482 struct rpc_pipe_client
*cli
,
7483 struct policy_handle
*_domain_handle
/* [in] [ref] */,
7484 struct lsa_String
*_account_name
/* [in] [ref] */,
7485 uint32_t _acct_flags
/* [in] */,
7486 uint32_t _access_mask
/* [in] */,
7487 struct policy_handle
*_user_handle
/* [out] [ref] */,
7488 uint32_t *_access_granted
/* [out] [ref] */,
7489 uint32_t *_rid
/* [out] [ref] */)
7491 struct tevent_req
*req
;
7492 struct rpccli_samr_CreateUser2_state
*state
;
7493 struct tevent_req
*subreq
;
7495 req
= tevent_req_create(mem_ctx
, &state
,
7496 struct rpccli_samr_CreateUser2_state
);
7500 state
->out_mem_ctx
= NULL
;
7501 state
->dispatch_recv
= cli
->dispatch_recv
;
7504 state
->orig
.in
.domain_handle
= _domain_handle
;
7505 state
->orig
.in
.account_name
= _account_name
;
7506 state
->orig
.in
.acct_flags
= _acct_flags
;
7507 state
->orig
.in
.access_mask
= _access_mask
;
7509 /* Out parameters */
7510 state
->orig
.out
.user_handle
= _user_handle
;
7511 state
->orig
.out
.access_granted
= _access_granted
;
7512 state
->orig
.out
.rid
= _rid
;
7515 ZERO_STRUCT(state
->orig
.out
.result
);
7517 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7518 "rpccli_samr_CreateUser2_out_memory");
7519 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7520 return tevent_req_post(req
, ev
);
7523 /* make a temporary copy, that we pass to the dispatch function */
7524 state
->tmp
= state
->orig
;
7526 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7528 NDR_SAMR_CREATEUSER2
,
7530 if (tevent_req_nomem(subreq
, req
)) {
7531 return tevent_req_post(req
, ev
);
7533 tevent_req_set_callback(subreq
, rpccli_samr_CreateUser2_done
, req
);
7537 static void rpccli_samr_CreateUser2_done(struct tevent_req
*subreq
)
7539 struct tevent_req
*req
= tevent_req_callback_data(
7540 subreq
, struct tevent_req
);
7541 struct rpccli_samr_CreateUser2_state
*state
= tevent_req_data(
7542 req
, struct rpccli_samr_CreateUser2_state
);
7544 TALLOC_CTX
*mem_ctx
;
7546 if (state
->out_mem_ctx
) {
7547 mem_ctx
= state
->out_mem_ctx
;
7552 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7553 TALLOC_FREE(subreq
);
7554 if (!NT_STATUS_IS_OK(status
)) {
7555 tevent_req_nterror(req
, status
);
7559 /* Copy out parameters */
7560 *state
->orig
.out
.user_handle
= *state
->tmp
.out
.user_handle
;
7561 *state
->orig
.out
.access_granted
= *state
->tmp
.out
.access_granted
;
7562 *state
->orig
.out
.rid
= *state
->tmp
.out
.rid
;
7565 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7567 /* Reset temporary structure */
7568 ZERO_STRUCT(state
->tmp
);
7570 tevent_req_done(req
);
7573 NTSTATUS
rpccli_samr_CreateUser2_recv(struct tevent_req
*req
,
7574 TALLOC_CTX
*mem_ctx
,
7577 struct rpccli_samr_CreateUser2_state
*state
= tevent_req_data(
7578 req
, struct rpccli_samr_CreateUser2_state
);
7581 if (tevent_req_is_nterror(req
, &status
)) {
7582 tevent_req_received(req
);
7586 /* Steal possbile out parameters to the callers context */
7587 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7590 *result
= state
->orig
.out
.result
;
7592 tevent_req_received(req
);
7593 return NT_STATUS_OK
;
7596 NTSTATUS
rpccli_samr_CreateUser2(struct rpc_pipe_client
*cli
,
7597 TALLOC_CTX
*mem_ctx
,
7598 struct policy_handle
*domain_handle
/* [in] [ref] */,
7599 struct lsa_String
*account_name
/* [in] [ref] */,
7600 uint32_t acct_flags
/* [in] */,
7601 uint32_t access_mask
/* [in] */,
7602 struct policy_handle
*user_handle
/* [out] [ref] */,
7603 uint32_t *access_granted
/* [out] [ref] */,
7604 uint32_t *rid
/* [out] [ref] */)
7606 struct samr_CreateUser2 r
;
7610 r
.in
.domain_handle
= domain_handle
;
7611 r
.in
.account_name
= account_name
;
7612 r
.in
.acct_flags
= acct_flags
;
7613 r
.in
.access_mask
= access_mask
;
7615 status
= cli
->dispatch(cli
,
7618 NDR_SAMR_CREATEUSER2
,
7621 if (!NT_STATUS_IS_OK(status
)) {
7625 if (NT_STATUS_IS_ERR(status
)) {
7629 /* Return variables */
7630 *user_handle
= *r
.out
.user_handle
;
7631 *access_granted
= *r
.out
.access_granted
;
7635 return r
.out
.result
;
7638 struct rpccli_samr_QueryDisplayInfo3_state
{
7639 struct samr_QueryDisplayInfo3 orig
;
7640 struct samr_QueryDisplayInfo3 tmp
;
7641 TALLOC_CTX
*out_mem_ctx
;
7642 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7645 static void rpccli_samr_QueryDisplayInfo3_done(struct tevent_req
*subreq
);
7647 struct tevent_req
*rpccli_samr_QueryDisplayInfo3_send(TALLOC_CTX
*mem_ctx
,
7648 struct tevent_context
*ev
,
7649 struct rpc_pipe_client
*cli
,
7650 struct policy_handle
*_domain_handle
/* [in] [ref] */,
7651 uint16_t _level
/* [in] */,
7652 uint32_t _start_idx
/* [in] */,
7653 uint32_t _max_entries
/* [in] */,
7654 uint32_t _buf_size
/* [in] */,
7655 uint32_t *_total_size
/* [out] [ref] */,
7656 uint32_t *_returned_size
/* [out] [ref] */,
7657 union samr_DispInfo
*_info
/* [out] [ref,switch_is(level)] */)
7659 struct tevent_req
*req
;
7660 struct rpccli_samr_QueryDisplayInfo3_state
*state
;
7661 struct tevent_req
*subreq
;
7663 req
= tevent_req_create(mem_ctx
, &state
,
7664 struct rpccli_samr_QueryDisplayInfo3_state
);
7668 state
->out_mem_ctx
= NULL
;
7669 state
->dispatch_recv
= cli
->dispatch_recv
;
7672 state
->orig
.in
.domain_handle
= _domain_handle
;
7673 state
->orig
.in
.level
= _level
;
7674 state
->orig
.in
.start_idx
= _start_idx
;
7675 state
->orig
.in
.max_entries
= _max_entries
;
7676 state
->orig
.in
.buf_size
= _buf_size
;
7678 /* Out parameters */
7679 state
->orig
.out
.total_size
= _total_size
;
7680 state
->orig
.out
.returned_size
= _returned_size
;
7681 state
->orig
.out
.info
= _info
;
7684 ZERO_STRUCT(state
->orig
.out
.result
);
7686 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7687 "rpccli_samr_QueryDisplayInfo3_out_memory");
7688 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7689 return tevent_req_post(req
, ev
);
7692 /* make a temporary copy, that we pass to the dispatch function */
7693 state
->tmp
= state
->orig
;
7695 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7697 NDR_SAMR_QUERYDISPLAYINFO3
,
7699 if (tevent_req_nomem(subreq
, req
)) {
7700 return tevent_req_post(req
, ev
);
7702 tevent_req_set_callback(subreq
, rpccli_samr_QueryDisplayInfo3_done
, req
);
7706 static void rpccli_samr_QueryDisplayInfo3_done(struct tevent_req
*subreq
)
7708 struct tevent_req
*req
= tevent_req_callback_data(
7709 subreq
, struct tevent_req
);
7710 struct rpccli_samr_QueryDisplayInfo3_state
*state
= tevent_req_data(
7711 req
, struct rpccli_samr_QueryDisplayInfo3_state
);
7713 TALLOC_CTX
*mem_ctx
;
7715 if (state
->out_mem_ctx
) {
7716 mem_ctx
= state
->out_mem_ctx
;
7721 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7722 TALLOC_FREE(subreq
);
7723 if (!NT_STATUS_IS_OK(status
)) {
7724 tevent_req_nterror(req
, status
);
7728 /* Copy out parameters */
7729 *state
->orig
.out
.total_size
= *state
->tmp
.out
.total_size
;
7730 *state
->orig
.out
.returned_size
= *state
->tmp
.out
.returned_size
;
7731 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
7734 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7736 /* Reset temporary structure */
7737 ZERO_STRUCT(state
->tmp
);
7739 tevent_req_done(req
);
7742 NTSTATUS
rpccli_samr_QueryDisplayInfo3_recv(struct tevent_req
*req
,
7743 TALLOC_CTX
*mem_ctx
,
7746 struct rpccli_samr_QueryDisplayInfo3_state
*state
= tevent_req_data(
7747 req
, struct rpccli_samr_QueryDisplayInfo3_state
);
7750 if (tevent_req_is_nterror(req
, &status
)) {
7751 tevent_req_received(req
);
7755 /* Steal possbile out parameters to the callers context */
7756 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7759 *result
= state
->orig
.out
.result
;
7761 tevent_req_received(req
);
7762 return NT_STATUS_OK
;
7765 NTSTATUS
rpccli_samr_QueryDisplayInfo3(struct rpc_pipe_client
*cli
,
7766 TALLOC_CTX
*mem_ctx
,
7767 struct policy_handle
*domain_handle
/* [in] [ref] */,
7768 uint16_t level
/* [in] */,
7769 uint32_t start_idx
/* [in] */,
7770 uint32_t max_entries
/* [in] */,
7771 uint32_t buf_size
/* [in] */,
7772 uint32_t *total_size
/* [out] [ref] */,
7773 uint32_t *returned_size
/* [out] [ref] */,
7774 union samr_DispInfo
*info
/* [out] [ref,switch_is(level)] */)
7776 struct samr_QueryDisplayInfo3 r
;
7780 r
.in
.domain_handle
= domain_handle
;
7782 r
.in
.start_idx
= start_idx
;
7783 r
.in
.max_entries
= max_entries
;
7784 r
.in
.buf_size
= buf_size
;
7786 status
= cli
->dispatch(cli
,
7789 NDR_SAMR_QUERYDISPLAYINFO3
,
7792 if (!NT_STATUS_IS_OK(status
)) {
7796 if (NT_STATUS_IS_ERR(status
)) {
7800 /* Return variables */
7801 *total_size
= *r
.out
.total_size
;
7802 *returned_size
= *r
.out
.returned_size
;
7803 *info
= *r
.out
.info
;
7806 return r
.out
.result
;
7809 struct rpccli_samr_AddMultipleMembersToAlias_state
{
7810 struct samr_AddMultipleMembersToAlias orig
;
7811 struct samr_AddMultipleMembersToAlias tmp
;
7812 TALLOC_CTX
*out_mem_ctx
;
7813 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7816 static void rpccli_samr_AddMultipleMembersToAlias_done(struct tevent_req
*subreq
);
7818 struct tevent_req
*rpccli_samr_AddMultipleMembersToAlias_send(TALLOC_CTX
*mem_ctx
,
7819 struct tevent_context
*ev
,
7820 struct rpc_pipe_client
*cli
,
7821 struct policy_handle
*_alias_handle
/* [in] [ref] */,
7822 struct lsa_SidArray
*_sids
/* [in] [ref] */)
7824 struct tevent_req
*req
;
7825 struct rpccli_samr_AddMultipleMembersToAlias_state
*state
;
7826 struct tevent_req
*subreq
;
7828 req
= tevent_req_create(mem_ctx
, &state
,
7829 struct rpccli_samr_AddMultipleMembersToAlias_state
);
7833 state
->out_mem_ctx
= NULL
;
7834 state
->dispatch_recv
= cli
->dispatch_recv
;
7837 state
->orig
.in
.alias_handle
= _alias_handle
;
7838 state
->orig
.in
.sids
= _sids
;
7840 /* Out parameters */
7843 ZERO_STRUCT(state
->orig
.out
.result
);
7845 /* make a temporary copy, that we pass to the dispatch function */
7846 state
->tmp
= state
->orig
;
7848 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7850 NDR_SAMR_ADDMULTIPLEMEMBERSTOALIAS
,
7852 if (tevent_req_nomem(subreq
, req
)) {
7853 return tevent_req_post(req
, ev
);
7855 tevent_req_set_callback(subreq
, rpccli_samr_AddMultipleMembersToAlias_done
, req
);
7859 static void rpccli_samr_AddMultipleMembersToAlias_done(struct tevent_req
*subreq
)
7861 struct tevent_req
*req
= tevent_req_callback_data(
7862 subreq
, struct tevent_req
);
7863 struct rpccli_samr_AddMultipleMembersToAlias_state
*state
= tevent_req_data(
7864 req
, struct rpccli_samr_AddMultipleMembersToAlias_state
);
7866 TALLOC_CTX
*mem_ctx
;
7868 if (state
->out_mem_ctx
) {
7869 mem_ctx
= state
->out_mem_ctx
;
7874 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7875 TALLOC_FREE(subreq
);
7876 if (!NT_STATUS_IS_OK(status
)) {
7877 tevent_req_nterror(req
, status
);
7881 /* Copy out parameters */
7884 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7886 /* Reset temporary structure */
7887 ZERO_STRUCT(state
->tmp
);
7889 tevent_req_done(req
);
7892 NTSTATUS
rpccli_samr_AddMultipleMembersToAlias_recv(struct tevent_req
*req
,
7893 TALLOC_CTX
*mem_ctx
,
7896 struct rpccli_samr_AddMultipleMembersToAlias_state
*state
= tevent_req_data(
7897 req
, struct rpccli_samr_AddMultipleMembersToAlias_state
);
7900 if (tevent_req_is_nterror(req
, &status
)) {
7901 tevent_req_received(req
);
7905 /* Steal possbile out parameters to the callers context */
7906 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7909 *result
= state
->orig
.out
.result
;
7911 tevent_req_received(req
);
7912 return NT_STATUS_OK
;
7915 NTSTATUS
rpccli_samr_AddMultipleMembersToAlias(struct rpc_pipe_client
*cli
,
7916 TALLOC_CTX
*mem_ctx
,
7917 struct policy_handle
*alias_handle
/* [in] [ref] */,
7918 struct lsa_SidArray
*sids
/* [in] [ref] */)
7920 struct samr_AddMultipleMembersToAlias r
;
7924 r
.in
.alias_handle
= alias_handle
;
7927 status
= cli
->dispatch(cli
,
7930 NDR_SAMR_ADDMULTIPLEMEMBERSTOALIAS
,
7933 if (!NT_STATUS_IS_OK(status
)) {
7937 if (NT_STATUS_IS_ERR(status
)) {
7941 /* Return variables */
7944 return r
.out
.result
;
7947 struct rpccli_samr_RemoveMultipleMembersFromAlias_state
{
7948 struct samr_RemoveMultipleMembersFromAlias orig
;
7949 struct samr_RemoveMultipleMembersFromAlias tmp
;
7950 TALLOC_CTX
*out_mem_ctx
;
7951 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7954 static void rpccli_samr_RemoveMultipleMembersFromAlias_done(struct tevent_req
*subreq
);
7956 struct tevent_req
*rpccli_samr_RemoveMultipleMembersFromAlias_send(TALLOC_CTX
*mem_ctx
,
7957 struct tevent_context
*ev
,
7958 struct rpc_pipe_client
*cli
,
7959 struct policy_handle
*_alias_handle
/* [in] [ref] */,
7960 struct lsa_SidArray
*_sids
/* [in] [ref] */)
7962 struct tevent_req
*req
;
7963 struct rpccli_samr_RemoveMultipleMembersFromAlias_state
*state
;
7964 struct tevent_req
*subreq
;
7966 req
= tevent_req_create(mem_ctx
, &state
,
7967 struct rpccli_samr_RemoveMultipleMembersFromAlias_state
);
7971 state
->out_mem_ctx
= NULL
;
7972 state
->dispatch_recv
= cli
->dispatch_recv
;
7975 state
->orig
.in
.alias_handle
= _alias_handle
;
7976 state
->orig
.in
.sids
= _sids
;
7978 /* Out parameters */
7981 ZERO_STRUCT(state
->orig
.out
.result
);
7983 /* make a temporary copy, that we pass to the dispatch function */
7984 state
->tmp
= state
->orig
;
7986 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7988 NDR_SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS
,
7990 if (tevent_req_nomem(subreq
, req
)) {
7991 return tevent_req_post(req
, ev
);
7993 tevent_req_set_callback(subreq
, rpccli_samr_RemoveMultipleMembersFromAlias_done
, req
);
7997 static void rpccli_samr_RemoveMultipleMembersFromAlias_done(struct tevent_req
*subreq
)
7999 struct tevent_req
*req
= tevent_req_callback_data(
8000 subreq
, struct tevent_req
);
8001 struct rpccli_samr_RemoveMultipleMembersFromAlias_state
*state
= tevent_req_data(
8002 req
, struct rpccli_samr_RemoveMultipleMembersFromAlias_state
);
8004 TALLOC_CTX
*mem_ctx
;
8006 if (state
->out_mem_ctx
) {
8007 mem_ctx
= state
->out_mem_ctx
;
8012 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8013 TALLOC_FREE(subreq
);
8014 if (!NT_STATUS_IS_OK(status
)) {
8015 tevent_req_nterror(req
, status
);
8019 /* Copy out parameters */
8022 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8024 /* Reset temporary structure */
8025 ZERO_STRUCT(state
->tmp
);
8027 tevent_req_done(req
);
8030 NTSTATUS
rpccli_samr_RemoveMultipleMembersFromAlias_recv(struct tevent_req
*req
,
8031 TALLOC_CTX
*mem_ctx
,
8034 struct rpccli_samr_RemoveMultipleMembersFromAlias_state
*state
= tevent_req_data(
8035 req
, struct rpccli_samr_RemoveMultipleMembersFromAlias_state
);
8038 if (tevent_req_is_nterror(req
, &status
)) {
8039 tevent_req_received(req
);
8043 /* Steal possbile out parameters to the callers context */
8044 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8047 *result
= state
->orig
.out
.result
;
8049 tevent_req_received(req
);
8050 return NT_STATUS_OK
;
8053 NTSTATUS
rpccli_samr_RemoveMultipleMembersFromAlias(struct rpc_pipe_client
*cli
,
8054 TALLOC_CTX
*mem_ctx
,
8055 struct policy_handle
*alias_handle
/* [in] [ref] */,
8056 struct lsa_SidArray
*sids
/* [in] [ref] */)
8058 struct samr_RemoveMultipleMembersFromAlias r
;
8062 r
.in
.alias_handle
= alias_handle
;
8065 status
= cli
->dispatch(cli
,
8068 NDR_SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS
,
8071 if (!NT_STATUS_IS_OK(status
)) {
8075 if (NT_STATUS_IS_ERR(status
)) {
8079 /* Return variables */
8082 return r
.out
.result
;
8085 struct rpccli_samr_OemChangePasswordUser2_state
{
8086 struct samr_OemChangePasswordUser2 orig
;
8087 struct samr_OemChangePasswordUser2 tmp
;
8088 TALLOC_CTX
*out_mem_ctx
;
8089 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8092 static void rpccli_samr_OemChangePasswordUser2_done(struct tevent_req
*subreq
);
8094 struct tevent_req
*rpccli_samr_OemChangePasswordUser2_send(TALLOC_CTX
*mem_ctx
,
8095 struct tevent_context
*ev
,
8096 struct rpc_pipe_client
*cli
,
8097 struct lsa_AsciiString
*_server
/* [in] [unique] */,
8098 struct lsa_AsciiString
*_account
/* [in] [ref] */,
8099 struct samr_CryptPassword
*_password
/* [in] [unique] */,
8100 struct samr_Password
*_hash
/* [in] [unique] */)
8102 struct tevent_req
*req
;
8103 struct rpccli_samr_OemChangePasswordUser2_state
*state
;
8104 struct tevent_req
*subreq
;
8106 req
= tevent_req_create(mem_ctx
, &state
,
8107 struct rpccli_samr_OemChangePasswordUser2_state
);
8111 state
->out_mem_ctx
= NULL
;
8112 state
->dispatch_recv
= cli
->dispatch_recv
;
8115 state
->orig
.in
.server
= _server
;
8116 state
->orig
.in
.account
= _account
;
8117 state
->orig
.in
.password
= _password
;
8118 state
->orig
.in
.hash
= _hash
;
8120 /* Out parameters */
8123 ZERO_STRUCT(state
->orig
.out
.result
);
8125 /* make a temporary copy, that we pass to the dispatch function */
8126 state
->tmp
= state
->orig
;
8128 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8130 NDR_SAMR_OEMCHANGEPASSWORDUSER2
,
8132 if (tevent_req_nomem(subreq
, req
)) {
8133 return tevent_req_post(req
, ev
);
8135 tevent_req_set_callback(subreq
, rpccli_samr_OemChangePasswordUser2_done
, req
);
8139 static void rpccli_samr_OemChangePasswordUser2_done(struct tevent_req
*subreq
)
8141 struct tevent_req
*req
= tevent_req_callback_data(
8142 subreq
, struct tevent_req
);
8143 struct rpccli_samr_OemChangePasswordUser2_state
*state
= tevent_req_data(
8144 req
, struct rpccli_samr_OemChangePasswordUser2_state
);
8146 TALLOC_CTX
*mem_ctx
;
8148 if (state
->out_mem_ctx
) {
8149 mem_ctx
= state
->out_mem_ctx
;
8154 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8155 TALLOC_FREE(subreq
);
8156 if (!NT_STATUS_IS_OK(status
)) {
8157 tevent_req_nterror(req
, status
);
8161 /* Copy out parameters */
8164 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8166 /* Reset temporary structure */
8167 ZERO_STRUCT(state
->tmp
);
8169 tevent_req_done(req
);
8172 NTSTATUS
rpccli_samr_OemChangePasswordUser2_recv(struct tevent_req
*req
,
8173 TALLOC_CTX
*mem_ctx
,
8176 struct rpccli_samr_OemChangePasswordUser2_state
*state
= tevent_req_data(
8177 req
, struct rpccli_samr_OemChangePasswordUser2_state
);
8180 if (tevent_req_is_nterror(req
, &status
)) {
8181 tevent_req_received(req
);
8185 /* Steal possbile out parameters to the callers context */
8186 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8189 *result
= state
->orig
.out
.result
;
8191 tevent_req_received(req
);
8192 return NT_STATUS_OK
;
8195 NTSTATUS
rpccli_samr_OemChangePasswordUser2(struct rpc_pipe_client
*cli
,
8196 TALLOC_CTX
*mem_ctx
,
8197 struct lsa_AsciiString
*server
/* [in] [unique] */,
8198 struct lsa_AsciiString
*account
/* [in] [ref] */,
8199 struct samr_CryptPassword
*password
/* [in] [unique] */,
8200 struct samr_Password
*hash
/* [in] [unique] */)
8202 struct samr_OemChangePasswordUser2 r
;
8206 r
.in
.server
= server
;
8207 r
.in
.account
= account
;
8208 r
.in
.password
= password
;
8211 status
= cli
->dispatch(cli
,
8214 NDR_SAMR_OEMCHANGEPASSWORDUSER2
,
8217 if (!NT_STATUS_IS_OK(status
)) {
8221 if (NT_STATUS_IS_ERR(status
)) {
8225 /* Return variables */
8228 return r
.out
.result
;
8231 struct rpccli_samr_ChangePasswordUser2_state
{
8232 struct samr_ChangePasswordUser2 orig
;
8233 struct samr_ChangePasswordUser2 tmp
;
8234 TALLOC_CTX
*out_mem_ctx
;
8235 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8238 static void rpccli_samr_ChangePasswordUser2_done(struct tevent_req
*subreq
);
8240 struct tevent_req
*rpccli_samr_ChangePasswordUser2_send(TALLOC_CTX
*mem_ctx
,
8241 struct tevent_context
*ev
,
8242 struct rpc_pipe_client
*cli
,
8243 struct lsa_String
*_server
/* [in] [unique] */,
8244 struct lsa_String
*_account
/* [in] [ref] */,
8245 struct samr_CryptPassword
*_nt_password
/* [in] [unique] */,
8246 struct samr_Password
*_nt_verifier
/* [in] [unique] */,
8247 uint8_t _lm_change
/* [in] */,
8248 struct samr_CryptPassword
*_lm_password
/* [in] [unique] */,
8249 struct samr_Password
*_lm_verifier
/* [in] [unique] */)
8251 struct tevent_req
*req
;
8252 struct rpccli_samr_ChangePasswordUser2_state
*state
;
8253 struct tevent_req
*subreq
;
8255 req
= tevent_req_create(mem_ctx
, &state
,
8256 struct rpccli_samr_ChangePasswordUser2_state
);
8260 state
->out_mem_ctx
= NULL
;
8261 state
->dispatch_recv
= cli
->dispatch_recv
;
8264 state
->orig
.in
.server
= _server
;
8265 state
->orig
.in
.account
= _account
;
8266 state
->orig
.in
.nt_password
= _nt_password
;
8267 state
->orig
.in
.nt_verifier
= _nt_verifier
;
8268 state
->orig
.in
.lm_change
= _lm_change
;
8269 state
->orig
.in
.lm_password
= _lm_password
;
8270 state
->orig
.in
.lm_verifier
= _lm_verifier
;
8272 /* Out parameters */
8275 ZERO_STRUCT(state
->orig
.out
.result
);
8277 /* make a temporary copy, that we pass to the dispatch function */
8278 state
->tmp
= state
->orig
;
8280 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8282 NDR_SAMR_CHANGEPASSWORDUSER2
,
8284 if (tevent_req_nomem(subreq
, req
)) {
8285 return tevent_req_post(req
, ev
);
8287 tevent_req_set_callback(subreq
, rpccli_samr_ChangePasswordUser2_done
, req
);
8291 static void rpccli_samr_ChangePasswordUser2_done(struct tevent_req
*subreq
)
8293 struct tevent_req
*req
= tevent_req_callback_data(
8294 subreq
, struct tevent_req
);
8295 struct rpccli_samr_ChangePasswordUser2_state
*state
= tevent_req_data(
8296 req
, struct rpccli_samr_ChangePasswordUser2_state
);
8298 TALLOC_CTX
*mem_ctx
;
8300 if (state
->out_mem_ctx
) {
8301 mem_ctx
= state
->out_mem_ctx
;
8306 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8307 TALLOC_FREE(subreq
);
8308 if (!NT_STATUS_IS_OK(status
)) {
8309 tevent_req_nterror(req
, status
);
8313 /* Copy out parameters */
8316 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8318 /* Reset temporary structure */
8319 ZERO_STRUCT(state
->tmp
);
8321 tevent_req_done(req
);
8324 NTSTATUS
rpccli_samr_ChangePasswordUser2_recv(struct tevent_req
*req
,
8325 TALLOC_CTX
*mem_ctx
,
8328 struct rpccli_samr_ChangePasswordUser2_state
*state
= tevent_req_data(
8329 req
, struct rpccli_samr_ChangePasswordUser2_state
);
8332 if (tevent_req_is_nterror(req
, &status
)) {
8333 tevent_req_received(req
);
8337 /* Steal possbile out parameters to the callers context */
8338 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8341 *result
= state
->orig
.out
.result
;
8343 tevent_req_received(req
);
8344 return NT_STATUS_OK
;
8347 NTSTATUS
rpccli_samr_ChangePasswordUser2(struct rpc_pipe_client
*cli
,
8348 TALLOC_CTX
*mem_ctx
,
8349 struct lsa_String
*server
/* [in] [unique] */,
8350 struct lsa_String
*account
/* [in] [ref] */,
8351 struct samr_CryptPassword
*nt_password
/* [in] [unique] */,
8352 struct samr_Password
*nt_verifier
/* [in] [unique] */,
8353 uint8_t lm_change
/* [in] */,
8354 struct samr_CryptPassword
*lm_password
/* [in] [unique] */,
8355 struct samr_Password
*lm_verifier
/* [in] [unique] */)
8357 struct samr_ChangePasswordUser2 r
;
8361 r
.in
.server
= server
;
8362 r
.in
.account
= account
;
8363 r
.in
.nt_password
= nt_password
;
8364 r
.in
.nt_verifier
= nt_verifier
;
8365 r
.in
.lm_change
= lm_change
;
8366 r
.in
.lm_password
= lm_password
;
8367 r
.in
.lm_verifier
= lm_verifier
;
8369 status
= cli
->dispatch(cli
,
8372 NDR_SAMR_CHANGEPASSWORDUSER2
,
8375 if (!NT_STATUS_IS_OK(status
)) {
8379 if (NT_STATUS_IS_ERR(status
)) {
8383 /* Return variables */
8386 return r
.out
.result
;
8389 struct rpccli_samr_GetDomPwInfo_state
{
8390 struct samr_GetDomPwInfo orig
;
8391 struct samr_GetDomPwInfo tmp
;
8392 TALLOC_CTX
*out_mem_ctx
;
8393 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8396 static void rpccli_samr_GetDomPwInfo_done(struct tevent_req
*subreq
);
8398 struct tevent_req
*rpccli_samr_GetDomPwInfo_send(TALLOC_CTX
*mem_ctx
,
8399 struct tevent_context
*ev
,
8400 struct rpc_pipe_client
*cli
,
8401 struct lsa_String
*_domain_name
/* [in] [unique] */,
8402 struct samr_PwInfo
*_info
/* [out] [ref] */)
8404 struct tevent_req
*req
;
8405 struct rpccli_samr_GetDomPwInfo_state
*state
;
8406 struct tevent_req
*subreq
;
8408 req
= tevent_req_create(mem_ctx
, &state
,
8409 struct rpccli_samr_GetDomPwInfo_state
);
8413 state
->out_mem_ctx
= NULL
;
8414 state
->dispatch_recv
= cli
->dispatch_recv
;
8417 state
->orig
.in
.domain_name
= _domain_name
;
8419 /* Out parameters */
8420 state
->orig
.out
.info
= _info
;
8423 ZERO_STRUCT(state
->orig
.out
.result
);
8425 state
->out_mem_ctx
= talloc_named_const(state
, 0,
8426 "rpccli_samr_GetDomPwInfo_out_memory");
8427 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
8428 return tevent_req_post(req
, ev
);
8431 /* make a temporary copy, that we pass to the dispatch function */
8432 state
->tmp
= state
->orig
;
8434 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8436 NDR_SAMR_GETDOMPWINFO
,
8438 if (tevent_req_nomem(subreq
, req
)) {
8439 return tevent_req_post(req
, ev
);
8441 tevent_req_set_callback(subreq
, rpccli_samr_GetDomPwInfo_done
, req
);
8445 static void rpccli_samr_GetDomPwInfo_done(struct tevent_req
*subreq
)
8447 struct tevent_req
*req
= tevent_req_callback_data(
8448 subreq
, struct tevent_req
);
8449 struct rpccli_samr_GetDomPwInfo_state
*state
= tevent_req_data(
8450 req
, struct rpccli_samr_GetDomPwInfo_state
);
8452 TALLOC_CTX
*mem_ctx
;
8454 if (state
->out_mem_ctx
) {
8455 mem_ctx
= state
->out_mem_ctx
;
8460 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8461 TALLOC_FREE(subreq
);
8462 if (!NT_STATUS_IS_OK(status
)) {
8463 tevent_req_nterror(req
, status
);
8467 /* Copy out parameters */
8468 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
8471 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8473 /* Reset temporary structure */
8474 ZERO_STRUCT(state
->tmp
);
8476 tevent_req_done(req
);
8479 NTSTATUS
rpccli_samr_GetDomPwInfo_recv(struct tevent_req
*req
,
8480 TALLOC_CTX
*mem_ctx
,
8483 struct rpccli_samr_GetDomPwInfo_state
*state
= tevent_req_data(
8484 req
, struct rpccli_samr_GetDomPwInfo_state
);
8487 if (tevent_req_is_nterror(req
, &status
)) {
8488 tevent_req_received(req
);
8492 /* Steal possbile out parameters to the callers context */
8493 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8496 *result
= state
->orig
.out
.result
;
8498 tevent_req_received(req
);
8499 return NT_STATUS_OK
;
8502 NTSTATUS
rpccli_samr_GetDomPwInfo(struct rpc_pipe_client
*cli
,
8503 TALLOC_CTX
*mem_ctx
,
8504 struct lsa_String
*domain_name
/* [in] [unique] */,
8505 struct samr_PwInfo
*info
/* [out] [ref] */)
8507 struct samr_GetDomPwInfo r
;
8511 r
.in
.domain_name
= domain_name
;
8513 status
= cli
->dispatch(cli
,
8516 NDR_SAMR_GETDOMPWINFO
,
8519 if (!NT_STATUS_IS_OK(status
)) {
8523 if (NT_STATUS_IS_ERR(status
)) {
8527 /* Return variables */
8528 *info
= *r
.out
.info
;
8531 return r
.out
.result
;
8534 struct rpccli_samr_Connect2_state
{
8535 struct samr_Connect2 orig
;
8536 struct samr_Connect2 tmp
;
8537 TALLOC_CTX
*out_mem_ctx
;
8538 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8541 static void rpccli_samr_Connect2_done(struct tevent_req
*subreq
);
8543 struct tevent_req
*rpccli_samr_Connect2_send(TALLOC_CTX
*mem_ctx
,
8544 struct tevent_context
*ev
,
8545 struct rpc_pipe_client
*cli
,
8546 const char *_system_name
/* [in] [unique,charset(UTF16)] */,
8547 uint32_t _access_mask
/* [in] */,
8548 struct policy_handle
*_connect_handle
/* [out] [ref] */)
8550 struct tevent_req
*req
;
8551 struct rpccli_samr_Connect2_state
*state
;
8552 struct tevent_req
*subreq
;
8554 req
= tevent_req_create(mem_ctx
, &state
,
8555 struct rpccli_samr_Connect2_state
);
8559 state
->out_mem_ctx
= NULL
;
8560 state
->dispatch_recv
= cli
->dispatch_recv
;
8563 state
->orig
.in
.system_name
= _system_name
;
8564 state
->orig
.in
.access_mask
= _access_mask
;
8566 /* Out parameters */
8567 state
->orig
.out
.connect_handle
= _connect_handle
;
8570 ZERO_STRUCT(state
->orig
.out
.result
);
8572 state
->out_mem_ctx
= talloc_named_const(state
, 0,
8573 "rpccli_samr_Connect2_out_memory");
8574 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
8575 return tevent_req_post(req
, ev
);
8578 /* make a temporary copy, that we pass to the dispatch function */
8579 state
->tmp
= state
->orig
;
8581 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8585 if (tevent_req_nomem(subreq
, req
)) {
8586 return tevent_req_post(req
, ev
);
8588 tevent_req_set_callback(subreq
, rpccli_samr_Connect2_done
, req
);
8592 static void rpccli_samr_Connect2_done(struct tevent_req
*subreq
)
8594 struct tevent_req
*req
= tevent_req_callback_data(
8595 subreq
, struct tevent_req
);
8596 struct rpccli_samr_Connect2_state
*state
= tevent_req_data(
8597 req
, struct rpccli_samr_Connect2_state
);
8599 TALLOC_CTX
*mem_ctx
;
8601 if (state
->out_mem_ctx
) {
8602 mem_ctx
= state
->out_mem_ctx
;
8607 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8608 TALLOC_FREE(subreq
);
8609 if (!NT_STATUS_IS_OK(status
)) {
8610 tevent_req_nterror(req
, status
);
8614 /* Copy out parameters */
8615 *state
->orig
.out
.connect_handle
= *state
->tmp
.out
.connect_handle
;
8618 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8620 /* Reset temporary structure */
8621 ZERO_STRUCT(state
->tmp
);
8623 tevent_req_done(req
);
8626 NTSTATUS
rpccli_samr_Connect2_recv(struct tevent_req
*req
,
8627 TALLOC_CTX
*mem_ctx
,
8630 struct rpccli_samr_Connect2_state
*state
= tevent_req_data(
8631 req
, struct rpccli_samr_Connect2_state
);
8634 if (tevent_req_is_nterror(req
, &status
)) {
8635 tevent_req_received(req
);
8639 /* Steal possbile out parameters to the callers context */
8640 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8643 *result
= state
->orig
.out
.result
;
8645 tevent_req_received(req
);
8646 return NT_STATUS_OK
;
8649 NTSTATUS
rpccli_samr_Connect2(struct rpc_pipe_client
*cli
,
8650 TALLOC_CTX
*mem_ctx
,
8651 const char *system_name
/* [in] [unique,charset(UTF16)] */,
8652 uint32_t access_mask
/* [in] */,
8653 struct policy_handle
*connect_handle
/* [out] [ref] */)
8655 struct samr_Connect2 r
;
8659 r
.in
.system_name
= system_name
;
8660 r
.in
.access_mask
= access_mask
;
8662 status
= cli
->dispatch(cli
,
8668 if (!NT_STATUS_IS_OK(status
)) {
8672 if (NT_STATUS_IS_ERR(status
)) {
8676 /* Return variables */
8677 *connect_handle
= *r
.out
.connect_handle
;
8680 return r
.out
.result
;
8683 struct rpccli_samr_SetUserInfo2_state
{
8684 struct samr_SetUserInfo2 orig
;
8685 struct samr_SetUserInfo2 tmp
;
8686 TALLOC_CTX
*out_mem_ctx
;
8687 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8690 static void rpccli_samr_SetUserInfo2_done(struct tevent_req
*subreq
);
8692 struct tevent_req
*rpccli_samr_SetUserInfo2_send(TALLOC_CTX
*mem_ctx
,
8693 struct tevent_context
*ev
,
8694 struct rpc_pipe_client
*cli
,
8695 struct policy_handle
*_user_handle
/* [in] [ref] */,
8696 enum samr_UserInfoLevel _level
/* [in] */,
8697 union samr_UserInfo
*_info
/* [in] [ref,switch_is(level)] */)
8699 struct tevent_req
*req
;
8700 struct rpccli_samr_SetUserInfo2_state
*state
;
8701 struct tevent_req
*subreq
;
8703 req
= tevent_req_create(mem_ctx
, &state
,
8704 struct rpccli_samr_SetUserInfo2_state
);
8708 state
->out_mem_ctx
= NULL
;
8709 state
->dispatch_recv
= cli
->dispatch_recv
;
8712 state
->orig
.in
.user_handle
= _user_handle
;
8713 state
->orig
.in
.level
= _level
;
8714 state
->orig
.in
.info
= _info
;
8716 /* Out parameters */
8719 ZERO_STRUCT(state
->orig
.out
.result
);
8721 /* make a temporary copy, that we pass to the dispatch function */
8722 state
->tmp
= state
->orig
;
8724 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8726 NDR_SAMR_SETUSERINFO2
,
8728 if (tevent_req_nomem(subreq
, req
)) {
8729 return tevent_req_post(req
, ev
);
8731 tevent_req_set_callback(subreq
, rpccli_samr_SetUserInfo2_done
, req
);
8735 static void rpccli_samr_SetUserInfo2_done(struct tevent_req
*subreq
)
8737 struct tevent_req
*req
= tevent_req_callback_data(
8738 subreq
, struct tevent_req
);
8739 struct rpccli_samr_SetUserInfo2_state
*state
= tevent_req_data(
8740 req
, struct rpccli_samr_SetUserInfo2_state
);
8742 TALLOC_CTX
*mem_ctx
;
8744 if (state
->out_mem_ctx
) {
8745 mem_ctx
= state
->out_mem_ctx
;
8750 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8751 TALLOC_FREE(subreq
);
8752 if (!NT_STATUS_IS_OK(status
)) {
8753 tevent_req_nterror(req
, status
);
8757 /* Copy out parameters */
8760 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8762 /* Reset temporary structure */
8763 ZERO_STRUCT(state
->tmp
);
8765 tevent_req_done(req
);
8768 NTSTATUS
rpccli_samr_SetUserInfo2_recv(struct tevent_req
*req
,
8769 TALLOC_CTX
*mem_ctx
,
8772 struct rpccli_samr_SetUserInfo2_state
*state
= tevent_req_data(
8773 req
, struct rpccli_samr_SetUserInfo2_state
);
8776 if (tevent_req_is_nterror(req
, &status
)) {
8777 tevent_req_received(req
);
8781 /* Steal possbile out parameters to the callers context */
8782 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8785 *result
= state
->orig
.out
.result
;
8787 tevent_req_received(req
);
8788 return NT_STATUS_OK
;
8791 NTSTATUS
rpccli_samr_SetUserInfo2(struct rpc_pipe_client
*cli
,
8792 TALLOC_CTX
*mem_ctx
,
8793 struct policy_handle
*user_handle
/* [in] [ref] */,
8794 enum samr_UserInfoLevel level
/* [in] */,
8795 union samr_UserInfo
*info
/* [in] [ref,switch_is(level)] */)
8797 struct samr_SetUserInfo2 r
;
8801 r
.in
.user_handle
= user_handle
;
8805 status
= cli
->dispatch(cli
,
8808 NDR_SAMR_SETUSERINFO2
,
8811 if (!NT_STATUS_IS_OK(status
)) {
8815 if (NT_STATUS_IS_ERR(status
)) {
8819 /* Return variables */
8822 return r
.out
.result
;
8825 struct rpccli_samr_SetBootKeyInformation_state
{
8826 struct samr_SetBootKeyInformation orig
;
8827 struct samr_SetBootKeyInformation tmp
;
8828 TALLOC_CTX
*out_mem_ctx
;
8829 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8832 static void rpccli_samr_SetBootKeyInformation_done(struct tevent_req
*subreq
);
8834 struct tevent_req
*rpccli_samr_SetBootKeyInformation_send(TALLOC_CTX
*mem_ctx
,
8835 struct tevent_context
*ev
,
8836 struct rpc_pipe_client
*cli
,
8837 struct policy_handle
*_connect_handle
/* [in] [ref] */,
8838 uint32_t _unknown1
/* [in] */,
8839 uint32_t _unknown2
/* [in] */,
8840 uint32_t _unknown3
/* [in] */)
8842 struct tevent_req
*req
;
8843 struct rpccli_samr_SetBootKeyInformation_state
*state
;
8844 struct tevent_req
*subreq
;
8846 req
= tevent_req_create(mem_ctx
, &state
,
8847 struct rpccli_samr_SetBootKeyInformation_state
);
8851 state
->out_mem_ctx
= NULL
;
8852 state
->dispatch_recv
= cli
->dispatch_recv
;
8855 state
->orig
.in
.connect_handle
= _connect_handle
;
8856 state
->orig
.in
.unknown1
= _unknown1
;
8857 state
->orig
.in
.unknown2
= _unknown2
;
8858 state
->orig
.in
.unknown3
= _unknown3
;
8860 /* Out parameters */
8863 ZERO_STRUCT(state
->orig
.out
.result
);
8865 /* make a temporary copy, that we pass to the dispatch function */
8866 state
->tmp
= state
->orig
;
8868 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8870 NDR_SAMR_SETBOOTKEYINFORMATION
,
8872 if (tevent_req_nomem(subreq
, req
)) {
8873 return tevent_req_post(req
, ev
);
8875 tevent_req_set_callback(subreq
, rpccli_samr_SetBootKeyInformation_done
, req
);
8879 static void rpccli_samr_SetBootKeyInformation_done(struct tevent_req
*subreq
)
8881 struct tevent_req
*req
= tevent_req_callback_data(
8882 subreq
, struct tevent_req
);
8883 struct rpccli_samr_SetBootKeyInformation_state
*state
= tevent_req_data(
8884 req
, struct rpccli_samr_SetBootKeyInformation_state
);
8886 TALLOC_CTX
*mem_ctx
;
8888 if (state
->out_mem_ctx
) {
8889 mem_ctx
= state
->out_mem_ctx
;
8894 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8895 TALLOC_FREE(subreq
);
8896 if (!NT_STATUS_IS_OK(status
)) {
8897 tevent_req_nterror(req
, status
);
8901 /* Copy out parameters */
8904 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8906 /* Reset temporary structure */
8907 ZERO_STRUCT(state
->tmp
);
8909 tevent_req_done(req
);
8912 NTSTATUS
rpccli_samr_SetBootKeyInformation_recv(struct tevent_req
*req
,
8913 TALLOC_CTX
*mem_ctx
,
8916 struct rpccli_samr_SetBootKeyInformation_state
*state
= tevent_req_data(
8917 req
, struct rpccli_samr_SetBootKeyInformation_state
);
8920 if (tevent_req_is_nterror(req
, &status
)) {
8921 tevent_req_received(req
);
8925 /* Steal possbile out parameters to the callers context */
8926 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8929 *result
= state
->orig
.out
.result
;
8931 tevent_req_received(req
);
8932 return NT_STATUS_OK
;
8935 NTSTATUS
rpccli_samr_SetBootKeyInformation(struct rpc_pipe_client
*cli
,
8936 TALLOC_CTX
*mem_ctx
,
8937 struct policy_handle
*connect_handle
/* [in] [ref] */,
8938 uint32_t unknown1
/* [in] */,
8939 uint32_t unknown2
/* [in] */,
8940 uint32_t unknown3
/* [in] */)
8942 struct samr_SetBootKeyInformation r
;
8946 r
.in
.connect_handle
= connect_handle
;
8947 r
.in
.unknown1
= unknown1
;
8948 r
.in
.unknown2
= unknown2
;
8949 r
.in
.unknown3
= unknown3
;
8951 status
= cli
->dispatch(cli
,
8954 NDR_SAMR_SETBOOTKEYINFORMATION
,
8957 if (!NT_STATUS_IS_OK(status
)) {
8961 if (NT_STATUS_IS_ERR(status
)) {
8965 /* Return variables */
8968 return r
.out
.result
;
8971 struct rpccli_samr_GetBootKeyInformation_state
{
8972 struct samr_GetBootKeyInformation orig
;
8973 struct samr_GetBootKeyInformation tmp
;
8974 TALLOC_CTX
*out_mem_ctx
;
8975 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8978 static void rpccli_samr_GetBootKeyInformation_done(struct tevent_req
*subreq
);
8980 struct tevent_req
*rpccli_samr_GetBootKeyInformation_send(TALLOC_CTX
*mem_ctx
,
8981 struct tevent_context
*ev
,
8982 struct rpc_pipe_client
*cli
,
8983 struct policy_handle
*_domain_handle
/* [in] [ref] */,
8984 uint32_t *_unknown
/* [out] [ref] */)
8986 struct tevent_req
*req
;
8987 struct rpccli_samr_GetBootKeyInformation_state
*state
;
8988 struct tevent_req
*subreq
;
8990 req
= tevent_req_create(mem_ctx
, &state
,
8991 struct rpccli_samr_GetBootKeyInformation_state
);
8995 state
->out_mem_ctx
= NULL
;
8996 state
->dispatch_recv
= cli
->dispatch_recv
;
8999 state
->orig
.in
.domain_handle
= _domain_handle
;
9001 /* Out parameters */
9002 state
->orig
.out
.unknown
= _unknown
;
9005 ZERO_STRUCT(state
->orig
.out
.result
);
9007 state
->out_mem_ctx
= talloc_named_const(state
, 0,
9008 "rpccli_samr_GetBootKeyInformation_out_memory");
9009 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
9010 return tevent_req_post(req
, ev
);
9013 /* make a temporary copy, that we pass to the dispatch function */
9014 state
->tmp
= state
->orig
;
9016 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9018 NDR_SAMR_GETBOOTKEYINFORMATION
,
9020 if (tevent_req_nomem(subreq
, req
)) {
9021 return tevent_req_post(req
, ev
);
9023 tevent_req_set_callback(subreq
, rpccli_samr_GetBootKeyInformation_done
, req
);
9027 static void rpccli_samr_GetBootKeyInformation_done(struct tevent_req
*subreq
)
9029 struct tevent_req
*req
= tevent_req_callback_data(
9030 subreq
, struct tevent_req
);
9031 struct rpccli_samr_GetBootKeyInformation_state
*state
= tevent_req_data(
9032 req
, struct rpccli_samr_GetBootKeyInformation_state
);
9034 TALLOC_CTX
*mem_ctx
;
9036 if (state
->out_mem_ctx
) {
9037 mem_ctx
= state
->out_mem_ctx
;
9042 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9043 TALLOC_FREE(subreq
);
9044 if (!NT_STATUS_IS_OK(status
)) {
9045 tevent_req_nterror(req
, status
);
9049 /* Copy out parameters */
9050 *state
->orig
.out
.unknown
= *state
->tmp
.out
.unknown
;
9053 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9055 /* Reset temporary structure */
9056 ZERO_STRUCT(state
->tmp
);
9058 tevent_req_done(req
);
9061 NTSTATUS
rpccli_samr_GetBootKeyInformation_recv(struct tevent_req
*req
,
9062 TALLOC_CTX
*mem_ctx
,
9065 struct rpccli_samr_GetBootKeyInformation_state
*state
= tevent_req_data(
9066 req
, struct rpccli_samr_GetBootKeyInformation_state
);
9069 if (tevent_req_is_nterror(req
, &status
)) {
9070 tevent_req_received(req
);
9074 /* Steal possbile out parameters to the callers context */
9075 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9078 *result
= state
->orig
.out
.result
;
9080 tevent_req_received(req
);
9081 return NT_STATUS_OK
;
9084 NTSTATUS
rpccli_samr_GetBootKeyInformation(struct rpc_pipe_client
*cli
,
9085 TALLOC_CTX
*mem_ctx
,
9086 struct policy_handle
*domain_handle
/* [in] [ref] */,
9087 uint32_t *unknown
/* [out] [ref] */)
9089 struct samr_GetBootKeyInformation r
;
9093 r
.in
.domain_handle
= domain_handle
;
9095 status
= cli
->dispatch(cli
,
9098 NDR_SAMR_GETBOOTKEYINFORMATION
,
9101 if (!NT_STATUS_IS_OK(status
)) {
9105 if (NT_STATUS_IS_ERR(status
)) {
9109 /* Return variables */
9110 *unknown
= *r
.out
.unknown
;
9113 return r
.out
.result
;
9116 struct rpccli_samr_Connect3_state
{
9117 struct samr_Connect3 orig
;
9118 struct samr_Connect3 tmp
;
9119 TALLOC_CTX
*out_mem_ctx
;
9120 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9123 static void rpccli_samr_Connect3_done(struct tevent_req
*subreq
);
9125 struct tevent_req
*rpccli_samr_Connect3_send(TALLOC_CTX
*mem_ctx
,
9126 struct tevent_context
*ev
,
9127 struct rpc_pipe_client
*cli
,
9128 const char *_system_name
/* [in] [unique,charset(UTF16)] */,
9129 uint32_t _unknown
/* [in] */,
9130 uint32_t _access_mask
/* [in] */,
9131 struct policy_handle
*_connect_handle
/* [out] [ref] */)
9133 struct tevent_req
*req
;
9134 struct rpccli_samr_Connect3_state
*state
;
9135 struct tevent_req
*subreq
;
9137 req
= tevent_req_create(mem_ctx
, &state
,
9138 struct rpccli_samr_Connect3_state
);
9142 state
->out_mem_ctx
= NULL
;
9143 state
->dispatch_recv
= cli
->dispatch_recv
;
9146 state
->orig
.in
.system_name
= _system_name
;
9147 state
->orig
.in
.unknown
= _unknown
;
9148 state
->orig
.in
.access_mask
= _access_mask
;
9150 /* Out parameters */
9151 state
->orig
.out
.connect_handle
= _connect_handle
;
9154 ZERO_STRUCT(state
->orig
.out
.result
);
9156 state
->out_mem_ctx
= talloc_named_const(state
, 0,
9157 "rpccli_samr_Connect3_out_memory");
9158 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
9159 return tevent_req_post(req
, ev
);
9162 /* make a temporary copy, that we pass to the dispatch function */
9163 state
->tmp
= state
->orig
;
9165 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9169 if (tevent_req_nomem(subreq
, req
)) {
9170 return tevent_req_post(req
, ev
);
9172 tevent_req_set_callback(subreq
, rpccli_samr_Connect3_done
, req
);
9176 static void rpccli_samr_Connect3_done(struct tevent_req
*subreq
)
9178 struct tevent_req
*req
= tevent_req_callback_data(
9179 subreq
, struct tevent_req
);
9180 struct rpccli_samr_Connect3_state
*state
= tevent_req_data(
9181 req
, struct rpccli_samr_Connect3_state
);
9183 TALLOC_CTX
*mem_ctx
;
9185 if (state
->out_mem_ctx
) {
9186 mem_ctx
= state
->out_mem_ctx
;
9191 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9192 TALLOC_FREE(subreq
);
9193 if (!NT_STATUS_IS_OK(status
)) {
9194 tevent_req_nterror(req
, status
);
9198 /* Copy out parameters */
9199 *state
->orig
.out
.connect_handle
= *state
->tmp
.out
.connect_handle
;
9202 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9204 /* Reset temporary structure */
9205 ZERO_STRUCT(state
->tmp
);
9207 tevent_req_done(req
);
9210 NTSTATUS
rpccli_samr_Connect3_recv(struct tevent_req
*req
,
9211 TALLOC_CTX
*mem_ctx
,
9214 struct rpccli_samr_Connect3_state
*state
= tevent_req_data(
9215 req
, struct rpccli_samr_Connect3_state
);
9218 if (tevent_req_is_nterror(req
, &status
)) {
9219 tevent_req_received(req
);
9223 /* Steal possbile out parameters to the callers context */
9224 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9227 *result
= state
->orig
.out
.result
;
9229 tevent_req_received(req
);
9230 return NT_STATUS_OK
;
9233 NTSTATUS
rpccli_samr_Connect3(struct rpc_pipe_client
*cli
,
9234 TALLOC_CTX
*mem_ctx
,
9235 const char *system_name
/* [in] [unique,charset(UTF16)] */,
9236 uint32_t unknown
/* [in] */,
9237 uint32_t access_mask
/* [in] */,
9238 struct policy_handle
*connect_handle
/* [out] [ref] */)
9240 struct samr_Connect3 r
;
9244 r
.in
.system_name
= system_name
;
9245 r
.in
.unknown
= unknown
;
9246 r
.in
.access_mask
= access_mask
;
9248 status
= cli
->dispatch(cli
,
9254 if (!NT_STATUS_IS_OK(status
)) {
9258 if (NT_STATUS_IS_ERR(status
)) {
9262 /* Return variables */
9263 *connect_handle
= *r
.out
.connect_handle
;
9266 return r
.out
.result
;
9269 struct rpccli_samr_Connect4_state
{
9270 struct samr_Connect4 orig
;
9271 struct samr_Connect4 tmp
;
9272 TALLOC_CTX
*out_mem_ctx
;
9273 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9276 static void rpccli_samr_Connect4_done(struct tevent_req
*subreq
);
9278 struct tevent_req
*rpccli_samr_Connect4_send(TALLOC_CTX
*mem_ctx
,
9279 struct tevent_context
*ev
,
9280 struct rpc_pipe_client
*cli
,
9281 const char *_system_name
/* [in] [unique,charset(UTF16)] */,
9282 enum samr_ConnectVersion _client_version
/* [in] */,
9283 uint32_t _access_mask
/* [in] */,
9284 struct policy_handle
*_connect_handle
/* [out] [ref] */)
9286 struct tevent_req
*req
;
9287 struct rpccli_samr_Connect4_state
*state
;
9288 struct tevent_req
*subreq
;
9290 req
= tevent_req_create(mem_ctx
, &state
,
9291 struct rpccli_samr_Connect4_state
);
9295 state
->out_mem_ctx
= NULL
;
9296 state
->dispatch_recv
= cli
->dispatch_recv
;
9299 state
->orig
.in
.system_name
= _system_name
;
9300 state
->orig
.in
.client_version
= _client_version
;
9301 state
->orig
.in
.access_mask
= _access_mask
;
9303 /* Out parameters */
9304 state
->orig
.out
.connect_handle
= _connect_handle
;
9307 ZERO_STRUCT(state
->orig
.out
.result
);
9309 state
->out_mem_ctx
= talloc_named_const(state
, 0,
9310 "rpccli_samr_Connect4_out_memory");
9311 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
9312 return tevent_req_post(req
, ev
);
9315 /* make a temporary copy, that we pass to the dispatch function */
9316 state
->tmp
= state
->orig
;
9318 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9322 if (tevent_req_nomem(subreq
, req
)) {
9323 return tevent_req_post(req
, ev
);
9325 tevent_req_set_callback(subreq
, rpccli_samr_Connect4_done
, req
);
9329 static void rpccli_samr_Connect4_done(struct tevent_req
*subreq
)
9331 struct tevent_req
*req
= tevent_req_callback_data(
9332 subreq
, struct tevent_req
);
9333 struct rpccli_samr_Connect4_state
*state
= tevent_req_data(
9334 req
, struct rpccli_samr_Connect4_state
);
9336 TALLOC_CTX
*mem_ctx
;
9338 if (state
->out_mem_ctx
) {
9339 mem_ctx
= state
->out_mem_ctx
;
9344 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9345 TALLOC_FREE(subreq
);
9346 if (!NT_STATUS_IS_OK(status
)) {
9347 tevent_req_nterror(req
, status
);
9351 /* Copy out parameters */
9352 *state
->orig
.out
.connect_handle
= *state
->tmp
.out
.connect_handle
;
9355 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9357 /* Reset temporary structure */
9358 ZERO_STRUCT(state
->tmp
);
9360 tevent_req_done(req
);
9363 NTSTATUS
rpccli_samr_Connect4_recv(struct tevent_req
*req
,
9364 TALLOC_CTX
*mem_ctx
,
9367 struct rpccli_samr_Connect4_state
*state
= tevent_req_data(
9368 req
, struct rpccli_samr_Connect4_state
);
9371 if (tevent_req_is_nterror(req
, &status
)) {
9372 tevent_req_received(req
);
9376 /* Steal possbile out parameters to the callers context */
9377 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9380 *result
= state
->orig
.out
.result
;
9382 tevent_req_received(req
);
9383 return NT_STATUS_OK
;
9386 NTSTATUS
rpccli_samr_Connect4(struct rpc_pipe_client
*cli
,
9387 TALLOC_CTX
*mem_ctx
,
9388 const char *system_name
/* [in] [unique,charset(UTF16)] */,
9389 enum samr_ConnectVersion client_version
/* [in] */,
9390 uint32_t access_mask
/* [in] */,
9391 struct policy_handle
*connect_handle
/* [out] [ref] */)
9393 struct samr_Connect4 r
;
9397 r
.in
.system_name
= system_name
;
9398 r
.in
.client_version
= client_version
;
9399 r
.in
.access_mask
= access_mask
;
9401 status
= cli
->dispatch(cli
,
9407 if (!NT_STATUS_IS_OK(status
)) {
9411 if (NT_STATUS_IS_ERR(status
)) {
9415 /* Return variables */
9416 *connect_handle
= *r
.out
.connect_handle
;
9419 return r
.out
.result
;
9422 struct rpccli_samr_ChangePasswordUser3_state
{
9423 struct samr_ChangePasswordUser3 orig
;
9424 struct samr_ChangePasswordUser3 tmp
;
9425 TALLOC_CTX
*out_mem_ctx
;
9426 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9429 static void rpccli_samr_ChangePasswordUser3_done(struct tevent_req
*subreq
);
9431 struct tevent_req
*rpccli_samr_ChangePasswordUser3_send(TALLOC_CTX
*mem_ctx
,
9432 struct tevent_context
*ev
,
9433 struct rpc_pipe_client
*cli
,
9434 struct lsa_String
*_server
/* [in] [unique] */,
9435 struct lsa_String
*_account
/* [in] [ref] */,
9436 struct samr_CryptPassword
*_nt_password
/* [in] [unique] */,
9437 struct samr_Password
*_nt_verifier
/* [in] [unique] */,
9438 uint8_t _lm_change
/* [in] */,
9439 struct samr_CryptPassword
*_lm_password
/* [in] [unique] */,
9440 struct samr_Password
*_lm_verifier
/* [in] [unique] */,
9441 struct samr_CryptPassword
*_password3
/* [in] [unique] */,
9442 struct samr_DomInfo1
**_dominfo
/* [out] [ref] */,
9443 struct userPwdChangeFailureInformation
**_reject
/* [out] [ref] */)
9445 struct tevent_req
*req
;
9446 struct rpccli_samr_ChangePasswordUser3_state
*state
;
9447 struct tevent_req
*subreq
;
9449 req
= tevent_req_create(mem_ctx
, &state
,
9450 struct rpccli_samr_ChangePasswordUser3_state
);
9454 state
->out_mem_ctx
= NULL
;
9455 state
->dispatch_recv
= cli
->dispatch_recv
;
9458 state
->orig
.in
.server
= _server
;
9459 state
->orig
.in
.account
= _account
;
9460 state
->orig
.in
.nt_password
= _nt_password
;
9461 state
->orig
.in
.nt_verifier
= _nt_verifier
;
9462 state
->orig
.in
.lm_change
= _lm_change
;
9463 state
->orig
.in
.lm_password
= _lm_password
;
9464 state
->orig
.in
.lm_verifier
= _lm_verifier
;
9465 state
->orig
.in
.password3
= _password3
;
9467 /* Out parameters */
9468 state
->orig
.out
.dominfo
= _dominfo
;
9469 state
->orig
.out
.reject
= _reject
;
9472 ZERO_STRUCT(state
->orig
.out
.result
);
9474 state
->out_mem_ctx
= talloc_named_const(state
, 0,
9475 "rpccli_samr_ChangePasswordUser3_out_memory");
9476 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
9477 return tevent_req_post(req
, ev
);
9480 /* make a temporary copy, that we pass to the dispatch function */
9481 state
->tmp
= state
->orig
;
9483 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9485 NDR_SAMR_CHANGEPASSWORDUSER3
,
9487 if (tevent_req_nomem(subreq
, req
)) {
9488 return tevent_req_post(req
, ev
);
9490 tevent_req_set_callback(subreq
, rpccli_samr_ChangePasswordUser3_done
, req
);
9494 static void rpccli_samr_ChangePasswordUser3_done(struct tevent_req
*subreq
)
9496 struct tevent_req
*req
= tevent_req_callback_data(
9497 subreq
, struct tevent_req
);
9498 struct rpccli_samr_ChangePasswordUser3_state
*state
= tevent_req_data(
9499 req
, struct rpccli_samr_ChangePasswordUser3_state
);
9501 TALLOC_CTX
*mem_ctx
;
9503 if (state
->out_mem_ctx
) {
9504 mem_ctx
= state
->out_mem_ctx
;
9509 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9510 TALLOC_FREE(subreq
);
9511 if (!NT_STATUS_IS_OK(status
)) {
9512 tevent_req_nterror(req
, status
);
9516 /* Copy out parameters */
9517 *state
->orig
.out
.dominfo
= *state
->tmp
.out
.dominfo
;
9518 *state
->orig
.out
.reject
= *state
->tmp
.out
.reject
;
9521 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9523 /* Reset temporary structure */
9524 ZERO_STRUCT(state
->tmp
);
9526 tevent_req_done(req
);
9529 NTSTATUS
rpccli_samr_ChangePasswordUser3_recv(struct tevent_req
*req
,
9530 TALLOC_CTX
*mem_ctx
,
9533 struct rpccli_samr_ChangePasswordUser3_state
*state
= tevent_req_data(
9534 req
, struct rpccli_samr_ChangePasswordUser3_state
);
9537 if (tevent_req_is_nterror(req
, &status
)) {
9538 tevent_req_received(req
);
9542 /* Steal possbile out parameters to the callers context */
9543 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9546 *result
= state
->orig
.out
.result
;
9548 tevent_req_received(req
);
9549 return NT_STATUS_OK
;
9552 NTSTATUS
rpccli_samr_ChangePasswordUser3(struct rpc_pipe_client
*cli
,
9553 TALLOC_CTX
*mem_ctx
,
9554 struct lsa_String
*server
/* [in] [unique] */,
9555 struct lsa_String
*account
/* [in] [ref] */,
9556 struct samr_CryptPassword
*nt_password
/* [in] [unique] */,
9557 struct samr_Password
*nt_verifier
/* [in] [unique] */,
9558 uint8_t lm_change
/* [in] */,
9559 struct samr_CryptPassword
*lm_password
/* [in] [unique] */,
9560 struct samr_Password
*lm_verifier
/* [in] [unique] */,
9561 struct samr_CryptPassword
*password3
/* [in] [unique] */,
9562 struct samr_DomInfo1
**dominfo
/* [out] [ref] */,
9563 struct userPwdChangeFailureInformation
**reject
/* [out] [ref] */)
9565 struct samr_ChangePasswordUser3 r
;
9569 r
.in
.server
= server
;
9570 r
.in
.account
= account
;
9571 r
.in
.nt_password
= nt_password
;
9572 r
.in
.nt_verifier
= nt_verifier
;
9573 r
.in
.lm_change
= lm_change
;
9574 r
.in
.lm_password
= lm_password
;
9575 r
.in
.lm_verifier
= lm_verifier
;
9576 r
.in
.password3
= password3
;
9578 status
= cli
->dispatch(cli
,
9581 NDR_SAMR_CHANGEPASSWORDUSER3
,
9584 if (!NT_STATUS_IS_OK(status
)) {
9588 if (NT_STATUS_IS_ERR(status
)) {
9592 /* Return variables */
9593 *dominfo
= *r
.out
.dominfo
;
9594 *reject
= *r
.out
.reject
;
9597 return r
.out
.result
;
9600 struct rpccli_samr_Connect5_state
{
9601 struct samr_Connect5 orig
;
9602 struct samr_Connect5 tmp
;
9603 TALLOC_CTX
*out_mem_ctx
;
9604 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9607 static void rpccli_samr_Connect5_done(struct tevent_req
*subreq
);
9609 struct tevent_req
*rpccli_samr_Connect5_send(TALLOC_CTX
*mem_ctx
,
9610 struct tevent_context
*ev
,
9611 struct rpc_pipe_client
*cli
,
9612 const char *_system_name
/* [in] [unique,charset(UTF16)] */,
9613 uint32_t _access_mask
/* [in] */,
9614 uint32_t _level_in
/* [in] */,
9615 union samr_ConnectInfo
*_info_in
/* [in] [ref,switch_is(level_in)] */,
9616 uint32_t *_level_out
/* [out] [ref] */,
9617 union samr_ConnectInfo
*_info_out
/* [out] [ref,switch_is(*level_out)] */,
9618 struct policy_handle
*_connect_handle
/* [out] [ref] */)
9620 struct tevent_req
*req
;
9621 struct rpccli_samr_Connect5_state
*state
;
9622 struct tevent_req
*subreq
;
9624 req
= tevent_req_create(mem_ctx
, &state
,
9625 struct rpccli_samr_Connect5_state
);
9629 state
->out_mem_ctx
= NULL
;
9630 state
->dispatch_recv
= cli
->dispatch_recv
;
9633 state
->orig
.in
.system_name
= _system_name
;
9634 state
->orig
.in
.access_mask
= _access_mask
;
9635 state
->orig
.in
.level_in
= _level_in
;
9636 state
->orig
.in
.info_in
= _info_in
;
9638 /* Out parameters */
9639 state
->orig
.out
.level_out
= _level_out
;
9640 state
->orig
.out
.info_out
= _info_out
;
9641 state
->orig
.out
.connect_handle
= _connect_handle
;
9644 ZERO_STRUCT(state
->orig
.out
.result
);
9646 state
->out_mem_ctx
= talloc_named_const(state
, 0,
9647 "rpccli_samr_Connect5_out_memory");
9648 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
9649 return tevent_req_post(req
, ev
);
9652 /* make a temporary copy, that we pass to the dispatch function */
9653 state
->tmp
= state
->orig
;
9655 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9659 if (tevent_req_nomem(subreq
, req
)) {
9660 return tevent_req_post(req
, ev
);
9662 tevent_req_set_callback(subreq
, rpccli_samr_Connect5_done
, req
);
9666 static void rpccli_samr_Connect5_done(struct tevent_req
*subreq
)
9668 struct tevent_req
*req
= tevent_req_callback_data(
9669 subreq
, struct tevent_req
);
9670 struct rpccli_samr_Connect5_state
*state
= tevent_req_data(
9671 req
, struct rpccli_samr_Connect5_state
);
9673 TALLOC_CTX
*mem_ctx
;
9675 if (state
->out_mem_ctx
) {
9676 mem_ctx
= state
->out_mem_ctx
;
9681 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9682 TALLOC_FREE(subreq
);
9683 if (!NT_STATUS_IS_OK(status
)) {
9684 tevent_req_nterror(req
, status
);
9688 /* Copy out parameters */
9689 *state
->orig
.out
.level_out
= *state
->tmp
.out
.level_out
;
9690 *state
->orig
.out
.info_out
= *state
->tmp
.out
.info_out
;
9691 *state
->orig
.out
.connect_handle
= *state
->tmp
.out
.connect_handle
;
9694 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9696 /* Reset temporary structure */
9697 ZERO_STRUCT(state
->tmp
);
9699 tevent_req_done(req
);
9702 NTSTATUS
rpccli_samr_Connect5_recv(struct tevent_req
*req
,
9703 TALLOC_CTX
*mem_ctx
,
9706 struct rpccli_samr_Connect5_state
*state
= tevent_req_data(
9707 req
, struct rpccli_samr_Connect5_state
);
9710 if (tevent_req_is_nterror(req
, &status
)) {
9711 tevent_req_received(req
);
9715 /* Steal possbile out parameters to the callers context */
9716 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9719 *result
= state
->orig
.out
.result
;
9721 tevent_req_received(req
);
9722 return NT_STATUS_OK
;
9725 NTSTATUS
rpccli_samr_Connect5(struct rpc_pipe_client
*cli
,
9726 TALLOC_CTX
*mem_ctx
,
9727 const char *system_name
/* [in] [unique,charset(UTF16)] */,
9728 uint32_t access_mask
/* [in] */,
9729 uint32_t level_in
/* [in] */,
9730 union samr_ConnectInfo
*info_in
/* [in] [ref,switch_is(level_in)] */,
9731 uint32_t *level_out
/* [out] [ref] */,
9732 union samr_ConnectInfo
*info_out
/* [out] [ref,switch_is(*level_out)] */,
9733 struct policy_handle
*connect_handle
/* [out] [ref] */)
9735 struct samr_Connect5 r
;
9739 r
.in
.system_name
= system_name
;
9740 r
.in
.access_mask
= access_mask
;
9741 r
.in
.level_in
= level_in
;
9742 r
.in
.info_in
= info_in
;
9744 status
= cli
->dispatch(cli
,
9750 if (!NT_STATUS_IS_OK(status
)) {
9754 if (NT_STATUS_IS_ERR(status
)) {
9758 /* Return variables */
9759 *level_out
= *r
.out
.level_out
;
9760 *info_out
= *r
.out
.info_out
;
9761 *connect_handle
= *r
.out
.connect_handle
;
9764 return r
.out
.result
;
9767 struct rpccli_samr_RidToSid_state
{
9768 struct samr_RidToSid orig
;
9769 struct samr_RidToSid tmp
;
9770 TALLOC_CTX
*out_mem_ctx
;
9771 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9774 static void rpccli_samr_RidToSid_done(struct tevent_req
*subreq
);
9776 struct tevent_req
*rpccli_samr_RidToSid_send(TALLOC_CTX
*mem_ctx
,
9777 struct tevent_context
*ev
,
9778 struct rpc_pipe_client
*cli
,
9779 struct policy_handle
*_domain_handle
/* [in] [ref] */,
9780 uint32_t _rid
/* [in] */,
9781 struct dom_sid2
**_sid
/* [out] [ref] */)
9783 struct tevent_req
*req
;
9784 struct rpccli_samr_RidToSid_state
*state
;
9785 struct tevent_req
*subreq
;
9787 req
= tevent_req_create(mem_ctx
, &state
,
9788 struct rpccli_samr_RidToSid_state
);
9792 state
->out_mem_ctx
= NULL
;
9793 state
->dispatch_recv
= cli
->dispatch_recv
;
9796 state
->orig
.in
.domain_handle
= _domain_handle
;
9797 state
->orig
.in
.rid
= _rid
;
9799 /* Out parameters */
9800 state
->orig
.out
.sid
= _sid
;
9803 ZERO_STRUCT(state
->orig
.out
.result
);
9805 state
->out_mem_ctx
= talloc_named_const(state
, 0,
9806 "rpccli_samr_RidToSid_out_memory");
9807 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
9808 return tevent_req_post(req
, ev
);
9811 /* make a temporary copy, that we pass to the dispatch function */
9812 state
->tmp
= state
->orig
;
9814 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9818 if (tevent_req_nomem(subreq
, req
)) {
9819 return tevent_req_post(req
, ev
);
9821 tevent_req_set_callback(subreq
, rpccli_samr_RidToSid_done
, req
);
9825 static void rpccli_samr_RidToSid_done(struct tevent_req
*subreq
)
9827 struct tevent_req
*req
= tevent_req_callback_data(
9828 subreq
, struct tevent_req
);
9829 struct rpccli_samr_RidToSid_state
*state
= tevent_req_data(
9830 req
, struct rpccli_samr_RidToSid_state
);
9832 TALLOC_CTX
*mem_ctx
;
9834 if (state
->out_mem_ctx
) {
9835 mem_ctx
= state
->out_mem_ctx
;
9840 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9841 TALLOC_FREE(subreq
);
9842 if (!NT_STATUS_IS_OK(status
)) {
9843 tevent_req_nterror(req
, status
);
9847 /* Copy out parameters */
9848 *state
->orig
.out
.sid
= *state
->tmp
.out
.sid
;
9851 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9853 /* Reset temporary structure */
9854 ZERO_STRUCT(state
->tmp
);
9856 tevent_req_done(req
);
9859 NTSTATUS
rpccli_samr_RidToSid_recv(struct tevent_req
*req
,
9860 TALLOC_CTX
*mem_ctx
,
9863 struct rpccli_samr_RidToSid_state
*state
= tevent_req_data(
9864 req
, struct rpccli_samr_RidToSid_state
);
9867 if (tevent_req_is_nterror(req
, &status
)) {
9868 tevent_req_received(req
);
9872 /* Steal possbile out parameters to the callers context */
9873 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
9876 *result
= state
->orig
.out
.result
;
9878 tevent_req_received(req
);
9879 return NT_STATUS_OK
;
9882 NTSTATUS
rpccli_samr_RidToSid(struct rpc_pipe_client
*cli
,
9883 TALLOC_CTX
*mem_ctx
,
9884 struct policy_handle
*domain_handle
/* [in] [ref] */,
9885 uint32_t rid
/* [in] */,
9886 struct dom_sid2
**sid
/* [out] [ref] */)
9888 struct samr_RidToSid r
;
9892 r
.in
.domain_handle
= domain_handle
;
9895 status
= cli
->dispatch(cli
,
9901 if (!NT_STATUS_IS_OK(status
)) {
9905 if (NT_STATUS_IS_ERR(status
)) {
9909 /* Return variables */
9913 return r
.out
.result
;
9916 struct rpccli_samr_SetDsrmPassword_state
{
9917 struct samr_SetDsrmPassword orig
;
9918 struct samr_SetDsrmPassword tmp
;
9919 TALLOC_CTX
*out_mem_ctx
;
9920 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
9923 static void rpccli_samr_SetDsrmPassword_done(struct tevent_req
*subreq
);
9925 struct tevent_req
*rpccli_samr_SetDsrmPassword_send(TALLOC_CTX
*mem_ctx
,
9926 struct tevent_context
*ev
,
9927 struct rpc_pipe_client
*cli
,
9928 struct lsa_String
*_name
/* [in] [unique] */,
9929 uint32_t _unknown
/* [in] */,
9930 struct samr_Password
*_hash
/* [in] [unique] */)
9932 struct tevent_req
*req
;
9933 struct rpccli_samr_SetDsrmPassword_state
*state
;
9934 struct tevent_req
*subreq
;
9936 req
= tevent_req_create(mem_ctx
, &state
,
9937 struct rpccli_samr_SetDsrmPassword_state
);
9941 state
->out_mem_ctx
= NULL
;
9942 state
->dispatch_recv
= cli
->dispatch_recv
;
9945 state
->orig
.in
.name
= _name
;
9946 state
->orig
.in
.unknown
= _unknown
;
9947 state
->orig
.in
.hash
= _hash
;
9949 /* Out parameters */
9952 ZERO_STRUCT(state
->orig
.out
.result
);
9954 /* make a temporary copy, that we pass to the dispatch function */
9955 state
->tmp
= state
->orig
;
9957 subreq
= cli
->dispatch_send(state
, ev
, cli
,
9959 NDR_SAMR_SETDSRMPASSWORD
,
9961 if (tevent_req_nomem(subreq
, req
)) {
9962 return tevent_req_post(req
, ev
);
9964 tevent_req_set_callback(subreq
, rpccli_samr_SetDsrmPassword_done
, req
);
9968 static void rpccli_samr_SetDsrmPassword_done(struct tevent_req
*subreq
)
9970 struct tevent_req
*req
= tevent_req_callback_data(
9971 subreq
, struct tevent_req
);
9972 struct rpccli_samr_SetDsrmPassword_state
*state
= tevent_req_data(
9973 req
, struct rpccli_samr_SetDsrmPassword_state
);
9975 TALLOC_CTX
*mem_ctx
;
9977 if (state
->out_mem_ctx
) {
9978 mem_ctx
= state
->out_mem_ctx
;
9983 status
= state
->dispatch_recv(subreq
, mem_ctx
);
9984 TALLOC_FREE(subreq
);
9985 if (!NT_STATUS_IS_OK(status
)) {
9986 tevent_req_nterror(req
, status
);
9990 /* Copy out parameters */
9993 state
->orig
.out
.result
= state
->tmp
.out
.result
;
9995 /* Reset temporary structure */
9996 ZERO_STRUCT(state
->tmp
);
9998 tevent_req_done(req
);
10001 NTSTATUS
rpccli_samr_SetDsrmPassword_recv(struct tevent_req
*req
,
10002 TALLOC_CTX
*mem_ctx
,
10005 struct rpccli_samr_SetDsrmPassword_state
*state
= tevent_req_data(
10006 req
, struct rpccli_samr_SetDsrmPassword_state
);
10009 if (tevent_req_is_nterror(req
, &status
)) {
10010 tevent_req_received(req
);
10014 /* Steal possbile out parameters to the callers context */
10015 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10017 /* Return result */
10018 *result
= state
->orig
.out
.result
;
10020 tevent_req_received(req
);
10021 return NT_STATUS_OK
;
10024 NTSTATUS
rpccli_samr_SetDsrmPassword(struct rpc_pipe_client
*cli
,
10025 TALLOC_CTX
*mem_ctx
,
10026 struct lsa_String
*name
/* [in] [unique] */,
10027 uint32_t unknown
/* [in] */,
10028 struct samr_Password
*hash
/* [in] [unique] */)
10030 struct samr_SetDsrmPassword r
;
10033 /* In parameters */
10035 r
.in
.unknown
= unknown
;
10038 status
= cli
->dispatch(cli
,
10041 NDR_SAMR_SETDSRMPASSWORD
,
10044 if (!NT_STATUS_IS_OK(status
)) {
10048 if (NT_STATUS_IS_ERR(status
)) {
10052 /* Return variables */
10054 /* Return result */
10055 return r
.out
.result
;
10058 struct rpccli_samr_ValidatePassword_state
{
10059 struct samr_ValidatePassword orig
;
10060 struct samr_ValidatePassword tmp
;
10061 TALLOC_CTX
*out_mem_ctx
;
10062 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
10065 static void rpccli_samr_ValidatePassword_done(struct tevent_req
*subreq
);
10067 struct tevent_req
*rpccli_samr_ValidatePassword_send(TALLOC_CTX
*mem_ctx
,
10068 struct tevent_context
*ev
,
10069 struct rpc_pipe_client
*cli
,
10070 enum samr_ValidatePasswordLevel _level
/* [in] */,
10071 union samr_ValidatePasswordReq
*_req
/* [in] [ref,switch_is(level)] */,
10072 union samr_ValidatePasswordRep
**_rep
/* [out] [ref,switch_is(level)] */)
10074 struct tevent_req
*req
;
10075 struct rpccli_samr_ValidatePassword_state
*state
;
10076 struct tevent_req
*subreq
;
10078 req
= tevent_req_create(mem_ctx
, &state
,
10079 struct rpccli_samr_ValidatePassword_state
);
10083 state
->out_mem_ctx
= NULL
;
10084 state
->dispatch_recv
= cli
->dispatch_recv
;
10086 /* In parameters */
10087 state
->orig
.in
.level
= _level
;
10088 state
->orig
.in
.req
= _req
;
10090 /* Out parameters */
10091 state
->orig
.out
.rep
= _rep
;
10094 ZERO_STRUCT(state
->orig
.out
.result
);
10096 state
->out_mem_ctx
= talloc_named_const(state
, 0,
10097 "rpccli_samr_ValidatePassword_out_memory");
10098 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
10099 return tevent_req_post(req
, ev
);
10102 /* make a temporary copy, that we pass to the dispatch function */
10103 state
->tmp
= state
->orig
;
10105 subreq
= cli
->dispatch_send(state
, ev
, cli
,
10107 NDR_SAMR_VALIDATEPASSWORD
,
10109 if (tevent_req_nomem(subreq
, req
)) {
10110 return tevent_req_post(req
, ev
);
10112 tevent_req_set_callback(subreq
, rpccli_samr_ValidatePassword_done
, req
);
10116 static void rpccli_samr_ValidatePassword_done(struct tevent_req
*subreq
)
10118 struct tevent_req
*req
= tevent_req_callback_data(
10119 subreq
, struct tevent_req
);
10120 struct rpccli_samr_ValidatePassword_state
*state
= tevent_req_data(
10121 req
, struct rpccli_samr_ValidatePassword_state
);
10123 TALLOC_CTX
*mem_ctx
;
10125 if (state
->out_mem_ctx
) {
10126 mem_ctx
= state
->out_mem_ctx
;
10131 status
= state
->dispatch_recv(subreq
, mem_ctx
);
10132 TALLOC_FREE(subreq
);
10133 if (!NT_STATUS_IS_OK(status
)) {
10134 tevent_req_nterror(req
, status
);
10138 /* Copy out parameters */
10139 *state
->orig
.out
.rep
= *state
->tmp
.out
.rep
;
10142 state
->orig
.out
.result
= state
->tmp
.out
.result
;
10144 /* Reset temporary structure */
10145 ZERO_STRUCT(state
->tmp
);
10147 tevent_req_done(req
);
10150 NTSTATUS
rpccli_samr_ValidatePassword_recv(struct tevent_req
*req
,
10151 TALLOC_CTX
*mem_ctx
,
10154 struct rpccli_samr_ValidatePassword_state
*state
= tevent_req_data(
10155 req
, struct rpccli_samr_ValidatePassword_state
);
10158 if (tevent_req_is_nterror(req
, &status
)) {
10159 tevent_req_received(req
);
10163 /* Steal possbile out parameters to the callers context */
10164 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
10166 /* Return result */
10167 *result
= state
->orig
.out
.result
;
10169 tevent_req_received(req
);
10170 return NT_STATUS_OK
;
10173 NTSTATUS
rpccli_samr_ValidatePassword(struct rpc_pipe_client
*cli
,
10174 TALLOC_CTX
*mem_ctx
,
10175 enum samr_ValidatePasswordLevel level
/* [in] */,
10176 union samr_ValidatePasswordReq
*req
/* [in] [ref,switch_is(level)] */,
10177 union samr_ValidatePasswordRep
**rep
/* [out] [ref,switch_is(level)] */)
10179 struct samr_ValidatePassword r
;
10182 /* In parameters */
10183 r
.in
.level
= level
;
10186 status
= cli
->dispatch(cli
,
10189 NDR_SAMR_VALIDATEPASSWORD
,
10192 if (!NT_STATUS_IS_OK(status
)) {
10196 if (NT_STATUS_IS_ERR(status
)) {
10200 /* Return variables */
10203 /* Return result */
10204 return r
.out
.result
;