2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/srv_samr.h"
9 static bool api_samr_Connect(pipes_struct
*p
)
11 const struct ndr_interface_call
*call
;
12 struct ndr_pull
*pull
;
13 struct ndr_push
*push
;
14 enum ndr_err_code ndr_err
;
16 struct samr_Connect
*r
;
18 call
= &ndr_table_samr
.calls
[NDR_SAMR_CONNECT
];
20 r
= talloc(talloc_tos(), struct samr_Connect
);
25 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
30 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
36 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
37 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
38 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
43 if (DEBUGLEVEL
>= 10) {
44 NDR_PRINT_IN_DEBUG(samr_Connect
, r
);
48 r
->out
.connect_handle
= talloc_zero(r
, struct policy_handle
);
49 if (r
->out
.connect_handle
== NULL
) {
54 r
->out
.result
= _samr_Connect(p
, r
);
56 if (p
->rng_fault_state
) {
58 /* Return true here, srv_pipe_hnd.c will take care */
62 if (DEBUGLEVEL
>= 10) {
63 NDR_PRINT_OUT_DEBUG(samr_Connect
, r
);
66 push
= ndr_push_init_ctx(r
, NULL
);
72 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
73 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
78 blob
= ndr_push_blob(push
);
79 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
89 static bool api_samr_Close(pipes_struct
*p
)
91 const struct ndr_interface_call
*call
;
92 struct ndr_pull
*pull
;
93 struct ndr_push
*push
;
94 enum ndr_err_code ndr_err
;
98 call
= &ndr_table_samr
.calls
[NDR_SAMR_CLOSE
];
100 r
= talloc(talloc_tos(), struct samr_Close
);
105 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
110 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
116 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
117 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
118 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
123 if (DEBUGLEVEL
>= 10) {
124 NDR_PRINT_IN_DEBUG(samr_Close
, r
);
128 r
->out
.handle
= r
->in
.handle
;
129 r
->out
.result
= _samr_Close(p
, r
);
131 if (p
->rng_fault_state
) {
133 /* Return true here, srv_pipe_hnd.c will take care */
137 if (DEBUGLEVEL
>= 10) {
138 NDR_PRINT_OUT_DEBUG(samr_Close
, r
);
141 push
= ndr_push_init_ctx(r
, NULL
);
147 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
148 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
153 blob
= ndr_push_blob(push
);
154 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
164 static bool api_samr_SetSecurity(pipes_struct
*p
)
166 const struct ndr_interface_call
*call
;
167 struct ndr_pull
*pull
;
168 struct ndr_push
*push
;
169 enum ndr_err_code ndr_err
;
171 struct samr_SetSecurity
*r
;
173 call
= &ndr_table_samr
.calls
[NDR_SAMR_SETSECURITY
];
175 r
= talloc(talloc_tos(), struct samr_SetSecurity
);
180 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
185 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
191 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
192 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
193 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
198 if (DEBUGLEVEL
>= 10) {
199 NDR_PRINT_IN_DEBUG(samr_SetSecurity
, r
);
202 r
->out
.result
= _samr_SetSecurity(p
, r
);
204 if (p
->rng_fault_state
) {
206 /* Return true here, srv_pipe_hnd.c will take care */
210 if (DEBUGLEVEL
>= 10) {
211 NDR_PRINT_OUT_DEBUG(samr_SetSecurity
, r
);
214 push
= ndr_push_init_ctx(r
, NULL
);
220 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
221 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
226 blob
= ndr_push_blob(push
);
227 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
237 static bool api_samr_QuerySecurity(pipes_struct
*p
)
239 const struct ndr_interface_call
*call
;
240 struct ndr_pull
*pull
;
241 struct ndr_push
*push
;
242 enum ndr_err_code ndr_err
;
244 struct samr_QuerySecurity
*r
;
246 call
= &ndr_table_samr
.calls
[NDR_SAMR_QUERYSECURITY
];
248 r
= talloc(talloc_tos(), struct samr_QuerySecurity
);
253 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
258 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
264 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
265 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
266 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
271 if (DEBUGLEVEL
>= 10) {
272 NDR_PRINT_IN_DEBUG(samr_QuerySecurity
, r
);
276 r
->out
.sdbuf
= talloc_zero(r
, struct sec_desc_buf
*);
277 if (r
->out
.sdbuf
== NULL
) {
282 r
->out
.result
= _samr_QuerySecurity(p
, r
);
284 if (p
->rng_fault_state
) {
286 /* Return true here, srv_pipe_hnd.c will take care */
290 if (DEBUGLEVEL
>= 10) {
291 NDR_PRINT_OUT_DEBUG(samr_QuerySecurity
, r
);
294 push
= ndr_push_init_ctx(r
, NULL
);
300 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
301 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
306 blob
= ndr_push_blob(push
);
307 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
317 static bool api_samr_Shutdown(pipes_struct
*p
)
319 const struct ndr_interface_call
*call
;
320 struct ndr_pull
*pull
;
321 struct ndr_push
*push
;
322 enum ndr_err_code ndr_err
;
324 struct samr_Shutdown
*r
;
326 call
= &ndr_table_samr
.calls
[NDR_SAMR_SHUTDOWN
];
328 r
= talloc(talloc_tos(), struct samr_Shutdown
);
333 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
338 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
344 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
345 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
346 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
351 if (DEBUGLEVEL
>= 10) {
352 NDR_PRINT_IN_DEBUG(samr_Shutdown
, r
);
355 r
->out
.result
= _samr_Shutdown(p
, r
);
357 if (p
->rng_fault_state
) {
359 /* Return true here, srv_pipe_hnd.c will take care */
363 if (DEBUGLEVEL
>= 10) {
364 NDR_PRINT_OUT_DEBUG(samr_Shutdown
, r
);
367 push
= ndr_push_init_ctx(r
, NULL
);
373 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
374 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
379 blob
= ndr_push_blob(push
);
380 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
390 static bool api_samr_LookupDomain(pipes_struct
*p
)
392 const struct ndr_interface_call
*call
;
393 struct ndr_pull
*pull
;
394 struct ndr_push
*push
;
395 enum ndr_err_code ndr_err
;
397 struct samr_LookupDomain
*r
;
399 call
= &ndr_table_samr
.calls
[NDR_SAMR_LOOKUPDOMAIN
];
401 r
= talloc(talloc_tos(), struct samr_LookupDomain
);
406 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
411 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
417 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
418 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
419 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
424 if (DEBUGLEVEL
>= 10) {
425 NDR_PRINT_IN_DEBUG(samr_LookupDomain
, r
);
429 r
->out
.sid
= talloc_zero(r
, struct dom_sid2
*);
430 if (r
->out
.sid
== NULL
) {
435 r
->out
.result
= _samr_LookupDomain(p
, r
);
437 if (p
->rng_fault_state
) {
439 /* Return true here, srv_pipe_hnd.c will take care */
443 if (DEBUGLEVEL
>= 10) {
444 NDR_PRINT_OUT_DEBUG(samr_LookupDomain
, r
);
447 push
= ndr_push_init_ctx(r
, NULL
);
453 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
454 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
459 blob
= ndr_push_blob(push
);
460 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
470 static bool api_samr_EnumDomains(pipes_struct
*p
)
472 const struct ndr_interface_call
*call
;
473 struct ndr_pull
*pull
;
474 struct ndr_push
*push
;
475 enum ndr_err_code ndr_err
;
477 struct samr_EnumDomains
*r
;
479 call
= &ndr_table_samr
.calls
[NDR_SAMR_ENUMDOMAINS
];
481 r
= talloc(talloc_tos(), struct samr_EnumDomains
);
486 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
491 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
497 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
498 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
499 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
504 if (DEBUGLEVEL
>= 10) {
505 NDR_PRINT_IN_DEBUG(samr_EnumDomains
, r
);
509 r
->out
.resume_handle
= r
->in
.resume_handle
;
510 r
->out
.sam
= talloc_zero(r
, struct samr_SamArray
*);
511 if (r
->out
.sam
== NULL
) {
516 r
->out
.num_entries
= talloc_zero(r
, uint32_t);
517 if (r
->out
.num_entries
== NULL
) {
522 r
->out
.result
= _samr_EnumDomains(p
, r
);
524 if (p
->rng_fault_state
) {
526 /* Return true here, srv_pipe_hnd.c will take care */
530 if (DEBUGLEVEL
>= 10) {
531 NDR_PRINT_OUT_DEBUG(samr_EnumDomains
, r
);
534 push
= ndr_push_init_ctx(r
, NULL
);
540 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
541 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
546 blob
= ndr_push_blob(push
);
547 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
557 static bool api_samr_OpenDomain(pipes_struct
*p
)
559 const struct ndr_interface_call
*call
;
560 struct ndr_pull
*pull
;
561 struct ndr_push
*push
;
562 enum ndr_err_code ndr_err
;
564 struct samr_OpenDomain
*r
;
566 call
= &ndr_table_samr
.calls
[NDR_SAMR_OPENDOMAIN
];
568 r
= talloc(talloc_tos(), struct samr_OpenDomain
);
573 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
578 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
584 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
585 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
586 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
591 if (DEBUGLEVEL
>= 10) {
592 NDR_PRINT_IN_DEBUG(samr_OpenDomain
, r
);
596 r
->out
.domain_handle
= talloc_zero(r
, struct policy_handle
);
597 if (r
->out
.domain_handle
== NULL
) {
602 r
->out
.result
= _samr_OpenDomain(p
, r
);
604 if (p
->rng_fault_state
) {
606 /* Return true here, srv_pipe_hnd.c will take care */
610 if (DEBUGLEVEL
>= 10) {
611 NDR_PRINT_OUT_DEBUG(samr_OpenDomain
, r
);
614 push
= ndr_push_init_ctx(r
, NULL
);
620 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
621 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
626 blob
= ndr_push_blob(push
);
627 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
637 static bool api_samr_QueryDomainInfo(pipes_struct
*p
)
639 const struct ndr_interface_call
*call
;
640 struct ndr_pull
*pull
;
641 struct ndr_push
*push
;
642 enum ndr_err_code ndr_err
;
644 struct samr_QueryDomainInfo
*r
;
646 call
= &ndr_table_samr
.calls
[NDR_SAMR_QUERYDOMAININFO
];
648 r
= talloc(talloc_tos(), struct samr_QueryDomainInfo
);
653 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
658 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
664 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
665 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
666 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
671 if (DEBUGLEVEL
>= 10) {
672 NDR_PRINT_IN_DEBUG(samr_QueryDomainInfo
, r
);
676 r
->out
.info
= talloc_zero(r
, union samr_DomainInfo
*);
677 if (r
->out
.info
== NULL
) {
682 r
->out
.result
= _samr_QueryDomainInfo(p
, r
);
684 if (p
->rng_fault_state
) {
686 /* Return true here, srv_pipe_hnd.c will take care */
690 if (DEBUGLEVEL
>= 10) {
691 NDR_PRINT_OUT_DEBUG(samr_QueryDomainInfo
, r
);
694 push
= ndr_push_init_ctx(r
, NULL
);
700 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
701 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
706 blob
= ndr_push_blob(push
);
707 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
717 static bool api_samr_SetDomainInfo(pipes_struct
*p
)
719 const struct ndr_interface_call
*call
;
720 struct ndr_pull
*pull
;
721 struct ndr_push
*push
;
722 enum ndr_err_code ndr_err
;
724 struct samr_SetDomainInfo
*r
;
726 call
= &ndr_table_samr
.calls
[NDR_SAMR_SETDOMAININFO
];
728 r
= talloc(talloc_tos(), struct samr_SetDomainInfo
);
733 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
738 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
744 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
745 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
746 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
751 if (DEBUGLEVEL
>= 10) {
752 NDR_PRINT_IN_DEBUG(samr_SetDomainInfo
, r
);
755 r
->out
.result
= _samr_SetDomainInfo(p
, r
);
757 if (p
->rng_fault_state
) {
759 /* Return true here, srv_pipe_hnd.c will take care */
763 if (DEBUGLEVEL
>= 10) {
764 NDR_PRINT_OUT_DEBUG(samr_SetDomainInfo
, r
);
767 push
= ndr_push_init_ctx(r
, NULL
);
773 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
774 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
779 blob
= ndr_push_blob(push
);
780 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
790 static bool api_samr_CreateDomainGroup(pipes_struct
*p
)
792 const struct ndr_interface_call
*call
;
793 struct ndr_pull
*pull
;
794 struct ndr_push
*push
;
795 enum ndr_err_code ndr_err
;
797 struct samr_CreateDomainGroup
*r
;
799 call
= &ndr_table_samr
.calls
[NDR_SAMR_CREATEDOMAINGROUP
];
801 r
= talloc(talloc_tos(), struct samr_CreateDomainGroup
);
806 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
811 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
817 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
818 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
819 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
824 if (DEBUGLEVEL
>= 10) {
825 NDR_PRINT_IN_DEBUG(samr_CreateDomainGroup
, r
);
829 r
->out
.group_handle
= talloc_zero(r
, struct policy_handle
);
830 if (r
->out
.group_handle
== NULL
) {
835 r
->out
.rid
= talloc_zero(r
, uint32_t);
836 if (r
->out
.rid
== NULL
) {
841 r
->out
.result
= _samr_CreateDomainGroup(p
, r
);
843 if (p
->rng_fault_state
) {
845 /* Return true here, srv_pipe_hnd.c will take care */
849 if (DEBUGLEVEL
>= 10) {
850 NDR_PRINT_OUT_DEBUG(samr_CreateDomainGroup
, r
);
853 push
= ndr_push_init_ctx(r
, NULL
);
859 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
860 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
865 blob
= ndr_push_blob(push
);
866 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
876 static bool api_samr_EnumDomainGroups(pipes_struct
*p
)
878 const struct ndr_interface_call
*call
;
879 struct ndr_pull
*pull
;
880 struct ndr_push
*push
;
881 enum ndr_err_code ndr_err
;
883 struct samr_EnumDomainGroups
*r
;
885 call
= &ndr_table_samr
.calls
[NDR_SAMR_ENUMDOMAINGROUPS
];
887 r
= talloc(talloc_tos(), struct samr_EnumDomainGroups
);
892 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
897 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
903 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
904 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
905 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
910 if (DEBUGLEVEL
>= 10) {
911 NDR_PRINT_IN_DEBUG(samr_EnumDomainGroups
, r
);
915 r
->out
.resume_handle
= r
->in
.resume_handle
;
916 r
->out
.sam
= talloc_zero(r
, struct samr_SamArray
*);
917 if (r
->out
.sam
== NULL
) {
922 r
->out
.num_entries
= talloc_zero(r
, uint32_t);
923 if (r
->out
.num_entries
== NULL
) {
928 r
->out
.result
= _samr_EnumDomainGroups(p
, r
);
930 if (p
->rng_fault_state
) {
932 /* Return true here, srv_pipe_hnd.c will take care */
936 if (DEBUGLEVEL
>= 10) {
937 NDR_PRINT_OUT_DEBUG(samr_EnumDomainGroups
, r
);
940 push
= ndr_push_init_ctx(r
, NULL
);
946 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
947 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
952 blob
= ndr_push_blob(push
);
953 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
963 static bool api_samr_CreateUser(pipes_struct
*p
)
965 const struct ndr_interface_call
*call
;
966 struct ndr_pull
*pull
;
967 struct ndr_push
*push
;
968 enum ndr_err_code ndr_err
;
970 struct samr_CreateUser
*r
;
972 call
= &ndr_table_samr
.calls
[NDR_SAMR_CREATEUSER
];
974 r
= talloc(talloc_tos(), struct samr_CreateUser
);
979 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
984 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
990 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
991 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
992 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
997 if (DEBUGLEVEL
>= 10) {
998 NDR_PRINT_IN_DEBUG(samr_CreateUser
, r
);
1001 ZERO_STRUCT(r
->out
);
1002 r
->out
.user_handle
= talloc_zero(r
, struct policy_handle
);
1003 if (r
->out
.user_handle
== NULL
) {
1008 r
->out
.rid
= talloc_zero(r
, uint32_t);
1009 if (r
->out
.rid
== NULL
) {
1014 r
->out
.result
= _samr_CreateUser(p
, r
);
1016 if (p
->rng_fault_state
) {
1018 /* Return true here, srv_pipe_hnd.c will take care */
1022 if (DEBUGLEVEL
>= 10) {
1023 NDR_PRINT_OUT_DEBUG(samr_CreateUser
, r
);
1026 push
= ndr_push_init_ctx(r
, NULL
);
1032 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1033 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1038 blob
= ndr_push_blob(push
);
1039 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1049 static bool api_samr_EnumDomainUsers(pipes_struct
*p
)
1051 const struct ndr_interface_call
*call
;
1052 struct ndr_pull
*pull
;
1053 struct ndr_push
*push
;
1054 enum ndr_err_code ndr_err
;
1056 struct samr_EnumDomainUsers
*r
;
1058 call
= &ndr_table_samr
.calls
[NDR_SAMR_ENUMDOMAINUSERS
];
1060 r
= talloc(talloc_tos(), struct samr_EnumDomainUsers
);
1065 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1070 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1076 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1077 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1078 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1083 if (DEBUGLEVEL
>= 10) {
1084 NDR_PRINT_IN_DEBUG(samr_EnumDomainUsers
, r
);
1087 ZERO_STRUCT(r
->out
);
1088 r
->out
.resume_handle
= r
->in
.resume_handle
;
1089 r
->out
.sam
= talloc_zero(r
, struct samr_SamArray
*);
1090 if (r
->out
.sam
== NULL
) {
1095 r
->out
.num_entries
= talloc_zero(r
, uint32_t);
1096 if (r
->out
.num_entries
== NULL
) {
1101 r
->out
.result
= _samr_EnumDomainUsers(p
, r
);
1103 if (p
->rng_fault_state
) {
1105 /* Return true here, srv_pipe_hnd.c will take care */
1109 if (DEBUGLEVEL
>= 10) {
1110 NDR_PRINT_OUT_DEBUG(samr_EnumDomainUsers
, r
);
1113 push
= ndr_push_init_ctx(r
, NULL
);
1119 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1120 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1125 blob
= ndr_push_blob(push
);
1126 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1136 static bool api_samr_CreateDomAlias(pipes_struct
*p
)
1138 const struct ndr_interface_call
*call
;
1139 struct ndr_pull
*pull
;
1140 struct ndr_push
*push
;
1141 enum ndr_err_code ndr_err
;
1143 struct samr_CreateDomAlias
*r
;
1145 call
= &ndr_table_samr
.calls
[NDR_SAMR_CREATEDOMALIAS
];
1147 r
= talloc(talloc_tos(), struct samr_CreateDomAlias
);
1152 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1157 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1163 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1164 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1165 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1170 if (DEBUGLEVEL
>= 10) {
1171 NDR_PRINT_IN_DEBUG(samr_CreateDomAlias
, r
);
1174 ZERO_STRUCT(r
->out
);
1175 r
->out
.alias_handle
= talloc_zero(r
, struct policy_handle
);
1176 if (r
->out
.alias_handle
== NULL
) {
1181 r
->out
.rid
= talloc_zero(r
, uint32_t);
1182 if (r
->out
.rid
== NULL
) {
1187 r
->out
.result
= _samr_CreateDomAlias(p
, r
);
1189 if (p
->rng_fault_state
) {
1191 /* Return true here, srv_pipe_hnd.c will take care */
1195 if (DEBUGLEVEL
>= 10) {
1196 NDR_PRINT_OUT_DEBUG(samr_CreateDomAlias
, r
);
1199 push
= ndr_push_init_ctx(r
, NULL
);
1205 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1206 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1211 blob
= ndr_push_blob(push
);
1212 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1222 static bool api_samr_EnumDomainAliases(pipes_struct
*p
)
1224 const struct ndr_interface_call
*call
;
1225 struct ndr_pull
*pull
;
1226 struct ndr_push
*push
;
1227 enum ndr_err_code ndr_err
;
1229 struct samr_EnumDomainAliases
*r
;
1231 call
= &ndr_table_samr
.calls
[NDR_SAMR_ENUMDOMAINALIASES
];
1233 r
= talloc(talloc_tos(), struct samr_EnumDomainAliases
);
1238 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1243 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1249 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1250 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1251 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1256 if (DEBUGLEVEL
>= 10) {
1257 NDR_PRINT_IN_DEBUG(samr_EnumDomainAliases
, r
);
1260 ZERO_STRUCT(r
->out
);
1261 r
->out
.resume_handle
= r
->in
.resume_handle
;
1262 r
->out
.sam
= talloc_zero(r
, struct samr_SamArray
*);
1263 if (r
->out
.sam
== NULL
) {
1268 r
->out
.num_entries
= talloc_zero(r
, uint32_t);
1269 if (r
->out
.num_entries
== NULL
) {
1274 r
->out
.result
= _samr_EnumDomainAliases(p
, r
);
1276 if (p
->rng_fault_state
) {
1278 /* Return true here, srv_pipe_hnd.c will take care */
1282 if (DEBUGLEVEL
>= 10) {
1283 NDR_PRINT_OUT_DEBUG(samr_EnumDomainAliases
, r
);
1286 push
= ndr_push_init_ctx(r
, NULL
);
1292 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1293 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1298 blob
= ndr_push_blob(push
);
1299 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1309 static bool api_samr_GetAliasMembership(pipes_struct
*p
)
1311 const struct ndr_interface_call
*call
;
1312 struct ndr_pull
*pull
;
1313 struct ndr_push
*push
;
1314 enum ndr_err_code ndr_err
;
1316 struct samr_GetAliasMembership
*r
;
1318 call
= &ndr_table_samr
.calls
[NDR_SAMR_GETALIASMEMBERSHIP
];
1320 r
= talloc(talloc_tos(), struct samr_GetAliasMembership
);
1325 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1330 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1336 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1337 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1338 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1343 if (DEBUGLEVEL
>= 10) {
1344 NDR_PRINT_IN_DEBUG(samr_GetAliasMembership
, r
);
1347 ZERO_STRUCT(r
->out
);
1348 r
->out
.rids
= talloc_zero(r
, struct samr_Ids
);
1349 if (r
->out
.rids
== NULL
) {
1354 r
->out
.result
= _samr_GetAliasMembership(p
, r
);
1356 if (p
->rng_fault_state
) {
1358 /* Return true here, srv_pipe_hnd.c will take care */
1362 if (DEBUGLEVEL
>= 10) {
1363 NDR_PRINT_OUT_DEBUG(samr_GetAliasMembership
, r
);
1366 push
= ndr_push_init_ctx(r
, NULL
);
1372 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1373 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1378 blob
= ndr_push_blob(push
);
1379 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1389 static bool api_samr_LookupNames(pipes_struct
*p
)
1391 const struct ndr_interface_call
*call
;
1392 struct ndr_pull
*pull
;
1393 struct ndr_push
*push
;
1394 enum ndr_err_code ndr_err
;
1396 struct samr_LookupNames
*r
;
1398 call
= &ndr_table_samr
.calls
[NDR_SAMR_LOOKUPNAMES
];
1400 r
= talloc(talloc_tos(), struct samr_LookupNames
);
1405 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1410 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1416 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1417 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1418 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1423 if (DEBUGLEVEL
>= 10) {
1424 NDR_PRINT_IN_DEBUG(samr_LookupNames
, r
);
1427 ZERO_STRUCT(r
->out
);
1428 r
->out
.rids
= talloc_zero(r
, struct samr_Ids
);
1429 if (r
->out
.rids
== NULL
) {
1434 r
->out
.types
= talloc_zero(r
, struct samr_Ids
);
1435 if (r
->out
.types
== NULL
) {
1440 r
->out
.result
= _samr_LookupNames(p
, r
);
1442 if (p
->rng_fault_state
) {
1444 /* Return true here, srv_pipe_hnd.c will take care */
1448 if (DEBUGLEVEL
>= 10) {
1449 NDR_PRINT_OUT_DEBUG(samr_LookupNames
, r
);
1452 push
= ndr_push_init_ctx(r
, NULL
);
1458 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1459 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1464 blob
= ndr_push_blob(push
);
1465 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1475 static bool api_samr_LookupRids(pipes_struct
*p
)
1477 const struct ndr_interface_call
*call
;
1478 struct ndr_pull
*pull
;
1479 struct ndr_push
*push
;
1480 enum ndr_err_code ndr_err
;
1482 struct samr_LookupRids
*r
;
1484 call
= &ndr_table_samr
.calls
[NDR_SAMR_LOOKUPRIDS
];
1486 r
= talloc(talloc_tos(), struct samr_LookupRids
);
1491 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1496 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1502 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1503 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1504 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1509 if (DEBUGLEVEL
>= 10) {
1510 NDR_PRINT_IN_DEBUG(samr_LookupRids
, r
);
1513 ZERO_STRUCT(r
->out
);
1514 r
->out
.names
= talloc_zero(r
, struct lsa_Strings
);
1515 if (r
->out
.names
== NULL
) {
1520 r
->out
.types
= talloc_zero(r
, struct samr_Ids
);
1521 if (r
->out
.types
== NULL
) {
1526 r
->out
.result
= _samr_LookupRids(p
, r
);
1528 if (p
->rng_fault_state
) {
1530 /* Return true here, srv_pipe_hnd.c will take care */
1534 if (DEBUGLEVEL
>= 10) {
1535 NDR_PRINT_OUT_DEBUG(samr_LookupRids
, r
);
1538 push
= ndr_push_init_ctx(r
, NULL
);
1544 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1545 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1550 blob
= ndr_push_blob(push
);
1551 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1561 static bool api_samr_OpenGroup(pipes_struct
*p
)
1563 const struct ndr_interface_call
*call
;
1564 struct ndr_pull
*pull
;
1565 struct ndr_push
*push
;
1566 enum ndr_err_code ndr_err
;
1568 struct samr_OpenGroup
*r
;
1570 call
= &ndr_table_samr
.calls
[NDR_SAMR_OPENGROUP
];
1572 r
= talloc(talloc_tos(), struct samr_OpenGroup
);
1577 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1582 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1588 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1589 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1590 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1595 if (DEBUGLEVEL
>= 10) {
1596 NDR_PRINT_IN_DEBUG(samr_OpenGroup
, r
);
1599 ZERO_STRUCT(r
->out
);
1600 r
->out
.group_handle
= talloc_zero(r
, struct policy_handle
);
1601 if (r
->out
.group_handle
== NULL
) {
1606 r
->out
.result
= _samr_OpenGroup(p
, r
);
1608 if (p
->rng_fault_state
) {
1610 /* Return true here, srv_pipe_hnd.c will take care */
1614 if (DEBUGLEVEL
>= 10) {
1615 NDR_PRINT_OUT_DEBUG(samr_OpenGroup
, r
);
1618 push
= ndr_push_init_ctx(r
, NULL
);
1624 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1625 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1630 blob
= ndr_push_blob(push
);
1631 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1641 static bool api_samr_QueryGroupInfo(pipes_struct
*p
)
1643 const struct ndr_interface_call
*call
;
1644 struct ndr_pull
*pull
;
1645 struct ndr_push
*push
;
1646 enum ndr_err_code ndr_err
;
1648 struct samr_QueryGroupInfo
*r
;
1650 call
= &ndr_table_samr
.calls
[NDR_SAMR_QUERYGROUPINFO
];
1652 r
= talloc(talloc_tos(), struct samr_QueryGroupInfo
);
1657 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1662 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1668 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1669 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1670 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1675 if (DEBUGLEVEL
>= 10) {
1676 NDR_PRINT_IN_DEBUG(samr_QueryGroupInfo
, r
);
1679 ZERO_STRUCT(r
->out
);
1680 r
->out
.info
= talloc_zero(r
, union samr_GroupInfo
*);
1681 if (r
->out
.info
== NULL
) {
1686 r
->out
.result
= _samr_QueryGroupInfo(p
, r
);
1688 if (p
->rng_fault_state
) {
1690 /* Return true here, srv_pipe_hnd.c will take care */
1694 if (DEBUGLEVEL
>= 10) {
1695 NDR_PRINT_OUT_DEBUG(samr_QueryGroupInfo
, r
);
1698 push
= ndr_push_init_ctx(r
, NULL
);
1704 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1705 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1710 blob
= ndr_push_blob(push
);
1711 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1721 static bool api_samr_SetGroupInfo(pipes_struct
*p
)
1723 const struct ndr_interface_call
*call
;
1724 struct ndr_pull
*pull
;
1725 struct ndr_push
*push
;
1726 enum ndr_err_code ndr_err
;
1728 struct samr_SetGroupInfo
*r
;
1730 call
= &ndr_table_samr
.calls
[NDR_SAMR_SETGROUPINFO
];
1732 r
= talloc(talloc_tos(), struct samr_SetGroupInfo
);
1737 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1742 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1748 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1749 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1750 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1755 if (DEBUGLEVEL
>= 10) {
1756 NDR_PRINT_IN_DEBUG(samr_SetGroupInfo
, r
);
1759 r
->out
.result
= _samr_SetGroupInfo(p
, r
);
1761 if (p
->rng_fault_state
) {
1763 /* Return true here, srv_pipe_hnd.c will take care */
1767 if (DEBUGLEVEL
>= 10) {
1768 NDR_PRINT_OUT_DEBUG(samr_SetGroupInfo
, r
);
1771 push
= ndr_push_init_ctx(r
, NULL
);
1777 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1778 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1783 blob
= ndr_push_blob(push
);
1784 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1794 static bool api_samr_AddGroupMember(pipes_struct
*p
)
1796 const struct ndr_interface_call
*call
;
1797 struct ndr_pull
*pull
;
1798 struct ndr_push
*push
;
1799 enum ndr_err_code ndr_err
;
1801 struct samr_AddGroupMember
*r
;
1803 call
= &ndr_table_samr
.calls
[NDR_SAMR_ADDGROUPMEMBER
];
1805 r
= talloc(talloc_tos(), struct samr_AddGroupMember
);
1810 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1815 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1821 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1822 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1823 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1828 if (DEBUGLEVEL
>= 10) {
1829 NDR_PRINT_IN_DEBUG(samr_AddGroupMember
, r
);
1832 r
->out
.result
= _samr_AddGroupMember(p
, r
);
1834 if (p
->rng_fault_state
) {
1836 /* Return true here, srv_pipe_hnd.c will take care */
1840 if (DEBUGLEVEL
>= 10) {
1841 NDR_PRINT_OUT_DEBUG(samr_AddGroupMember
, r
);
1844 push
= ndr_push_init_ctx(r
, NULL
);
1850 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1851 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1856 blob
= ndr_push_blob(push
);
1857 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1867 static bool api_samr_DeleteDomainGroup(pipes_struct
*p
)
1869 const struct ndr_interface_call
*call
;
1870 struct ndr_pull
*pull
;
1871 struct ndr_push
*push
;
1872 enum ndr_err_code ndr_err
;
1874 struct samr_DeleteDomainGroup
*r
;
1876 call
= &ndr_table_samr
.calls
[NDR_SAMR_DELETEDOMAINGROUP
];
1878 r
= talloc(talloc_tos(), struct samr_DeleteDomainGroup
);
1883 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1888 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1894 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1895 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1896 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1901 if (DEBUGLEVEL
>= 10) {
1902 NDR_PRINT_IN_DEBUG(samr_DeleteDomainGroup
, r
);
1905 ZERO_STRUCT(r
->out
);
1906 r
->out
.group_handle
= r
->in
.group_handle
;
1907 r
->out
.result
= _samr_DeleteDomainGroup(p
, r
);
1909 if (p
->rng_fault_state
) {
1911 /* Return true here, srv_pipe_hnd.c will take care */
1915 if (DEBUGLEVEL
>= 10) {
1916 NDR_PRINT_OUT_DEBUG(samr_DeleteDomainGroup
, r
);
1919 push
= ndr_push_init_ctx(r
, NULL
);
1925 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1926 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1931 blob
= ndr_push_blob(push
);
1932 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1942 static bool api_samr_DeleteGroupMember(pipes_struct
*p
)
1944 const struct ndr_interface_call
*call
;
1945 struct ndr_pull
*pull
;
1946 struct ndr_push
*push
;
1947 enum ndr_err_code ndr_err
;
1949 struct samr_DeleteGroupMember
*r
;
1951 call
= &ndr_table_samr
.calls
[NDR_SAMR_DELETEGROUPMEMBER
];
1953 r
= talloc(talloc_tos(), struct samr_DeleteGroupMember
);
1958 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1963 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1969 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1970 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1971 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1976 if (DEBUGLEVEL
>= 10) {
1977 NDR_PRINT_IN_DEBUG(samr_DeleteGroupMember
, r
);
1980 r
->out
.result
= _samr_DeleteGroupMember(p
, r
);
1982 if (p
->rng_fault_state
) {
1984 /* Return true here, srv_pipe_hnd.c will take care */
1988 if (DEBUGLEVEL
>= 10) {
1989 NDR_PRINT_OUT_DEBUG(samr_DeleteGroupMember
, r
);
1992 push
= ndr_push_init_ctx(r
, NULL
);
1998 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1999 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2004 blob
= ndr_push_blob(push
);
2005 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2015 static bool api_samr_QueryGroupMember(pipes_struct
*p
)
2017 const struct ndr_interface_call
*call
;
2018 struct ndr_pull
*pull
;
2019 struct ndr_push
*push
;
2020 enum ndr_err_code ndr_err
;
2022 struct samr_QueryGroupMember
*r
;
2024 call
= &ndr_table_samr
.calls
[NDR_SAMR_QUERYGROUPMEMBER
];
2026 r
= talloc(talloc_tos(), struct samr_QueryGroupMember
);
2031 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2036 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2042 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2043 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2044 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2049 if (DEBUGLEVEL
>= 10) {
2050 NDR_PRINT_IN_DEBUG(samr_QueryGroupMember
, r
);
2053 ZERO_STRUCT(r
->out
);
2054 r
->out
.rids
= talloc_zero(r
, struct samr_RidTypeArray
*);
2055 if (r
->out
.rids
== NULL
) {
2060 r
->out
.result
= _samr_QueryGroupMember(p
, r
);
2062 if (p
->rng_fault_state
) {
2064 /* Return true here, srv_pipe_hnd.c will take care */
2068 if (DEBUGLEVEL
>= 10) {
2069 NDR_PRINT_OUT_DEBUG(samr_QueryGroupMember
, r
);
2072 push
= ndr_push_init_ctx(r
, NULL
);
2078 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2079 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2084 blob
= ndr_push_blob(push
);
2085 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2095 static bool api_samr_SetMemberAttributesOfGroup(pipes_struct
*p
)
2097 const struct ndr_interface_call
*call
;
2098 struct ndr_pull
*pull
;
2099 struct ndr_push
*push
;
2100 enum ndr_err_code ndr_err
;
2102 struct samr_SetMemberAttributesOfGroup
*r
;
2104 call
= &ndr_table_samr
.calls
[NDR_SAMR_SETMEMBERATTRIBUTESOFGROUP
];
2106 r
= talloc(talloc_tos(), struct samr_SetMemberAttributesOfGroup
);
2111 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2116 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2122 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2123 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2124 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2129 if (DEBUGLEVEL
>= 10) {
2130 NDR_PRINT_IN_DEBUG(samr_SetMemberAttributesOfGroup
, r
);
2133 r
->out
.result
= _samr_SetMemberAttributesOfGroup(p
, r
);
2135 if (p
->rng_fault_state
) {
2137 /* Return true here, srv_pipe_hnd.c will take care */
2141 if (DEBUGLEVEL
>= 10) {
2142 NDR_PRINT_OUT_DEBUG(samr_SetMemberAttributesOfGroup
, r
);
2145 push
= ndr_push_init_ctx(r
, NULL
);
2151 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2152 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2157 blob
= ndr_push_blob(push
);
2158 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2168 static bool api_samr_OpenAlias(pipes_struct
*p
)
2170 const struct ndr_interface_call
*call
;
2171 struct ndr_pull
*pull
;
2172 struct ndr_push
*push
;
2173 enum ndr_err_code ndr_err
;
2175 struct samr_OpenAlias
*r
;
2177 call
= &ndr_table_samr
.calls
[NDR_SAMR_OPENALIAS
];
2179 r
= talloc(talloc_tos(), struct samr_OpenAlias
);
2184 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2189 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2195 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2196 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2197 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2202 if (DEBUGLEVEL
>= 10) {
2203 NDR_PRINT_IN_DEBUG(samr_OpenAlias
, r
);
2206 ZERO_STRUCT(r
->out
);
2207 r
->out
.alias_handle
= talloc_zero(r
, struct policy_handle
);
2208 if (r
->out
.alias_handle
== NULL
) {
2213 r
->out
.result
= _samr_OpenAlias(p
, r
);
2215 if (p
->rng_fault_state
) {
2217 /* Return true here, srv_pipe_hnd.c will take care */
2221 if (DEBUGLEVEL
>= 10) {
2222 NDR_PRINT_OUT_DEBUG(samr_OpenAlias
, r
);
2225 push
= ndr_push_init_ctx(r
, NULL
);
2231 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2232 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2237 blob
= ndr_push_blob(push
);
2238 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2248 static bool api_samr_QueryAliasInfo(pipes_struct
*p
)
2250 const struct ndr_interface_call
*call
;
2251 struct ndr_pull
*pull
;
2252 struct ndr_push
*push
;
2253 enum ndr_err_code ndr_err
;
2255 struct samr_QueryAliasInfo
*r
;
2257 call
= &ndr_table_samr
.calls
[NDR_SAMR_QUERYALIASINFO
];
2259 r
= talloc(talloc_tos(), struct samr_QueryAliasInfo
);
2264 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2269 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2275 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2276 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2277 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2282 if (DEBUGLEVEL
>= 10) {
2283 NDR_PRINT_IN_DEBUG(samr_QueryAliasInfo
, r
);
2286 ZERO_STRUCT(r
->out
);
2287 r
->out
.info
= talloc_zero(r
, union samr_AliasInfo
*);
2288 if (r
->out
.info
== NULL
) {
2293 r
->out
.result
= _samr_QueryAliasInfo(p
, r
);
2295 if (p
->rng_fault_state
) {
2297 /* Return true here, srv_pipe_hnd.c will take care */
2301 if (DEBUGLEVEL
>= 10) {
2302 NDR_PRINT_OUT_DEBUG(samr_QueryAliasInfo
, r
);
2305 push
= ndr_push_init_ctx(r
, NULL
);
2311 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2312 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2317 blob
= ndr_push_blob(push
);
2318 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2328 static bool api_samr_SetAliasInfo(pipes_struct
*p
)
2330 const struct ndr_interface_call
*call
;
2331 struct ndr_pull
*pull
;
2332 struct ndr_push
*push
;
2333 enum ndr_err_code ndr_err
;
2335 struct samr_SetAliasInfo
*r
;
2337 call
= &ndr_table_samr
.calls
[NDR_SAMR_SETALIASINFO
];
2339 r
= talloc(talloc_tos(), struct samr_SetAliasInfo
);
2344 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2349 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2355 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2356 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2357 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2362 if (DEBUGLEVEL
>= 10) {
2363 NDR_PRINT_IN_DEBUG(samr_SetAliasInfo
, r
);
2366 r
->out
.result
= _samr_SetAliasInfo(p
, r
);
2368 if (p
->rng_fault_state
) {
2370 /* Return true here, srv_pipe_hnd.c will take care */
2374 if (DEBUGLEVEL
>= 10) {
2375 NDR_PRINT_OUT_DEBUG(samr_SetAliasInfo
, r
);
2378 push
= ndr_push_init_ctx(r
, NULL
);
2384 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2385 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2390 blob
= ndr_push_blob(push
);
2391 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2401 static bool api_samr_DeleteDomAlias(pipes_struct
*p
)
2403 const struct ndr_interface_call
*call
;
2404 struct ndr_pull
*pull
;
2405 struct ndr_push
*push
;
2406 enum ndr_err_code ndr_err
;
2408 struct samr_DeleteDomAlias
*r
;
2410 call
= &ndr_table_samr
.calls
[NDR_SAMR_DELETEDOMALIAS
];
2412 r
= talloc(talloc_tos(), struct samr_DeleteDomAlias
);
2417 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2422 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2428 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2429 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2430 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2435 if (DEBUGLEVEL
>= 10) {
2436 NDR_PRINT_IN_DEBUG(samr_DeleteDomAlias
, r
);
2439 ZERO_STRUCT(r
->out
);
2440 r
->out
.alias_handle
= r
->in
.alias_handle
;
2441 r
->out
.result
= _samr_DeleteDomAlias(p
, r
);
2443 if (p
->rng_fault_state
) {
2445 /* Return true here, srv_pipe_hnd.c will take care */
2449 if (DEBUGLEVEL
>= 10) {
2450 NDR_PRINT_OUT_DEBUG(samr_DeleteDomAlias
, r
);
2453 push
= ndr_push_init_ctx(r
, NULL
);
2459 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2460 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2465 blob
= ndr_push_blob(push
);
2466 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2476 static bool api_samr_AddAliasMember(pipes_struct
*p
)
2478 const struct ndr_interface_call
*call
;
2479 struct ndr_pull
*pull
;
2480 struct ndr_push
*push
;
2481 enum ndr_err_code ndr_err
;
2483 struct samr_AddAliasMember
*r
;
2485 call
= &ndr_table_samr
.calls
[NDR_SAMR_ADDALIASMEMBER
];
2487 r
= talloc(talloc_tos(), struct samr_AddAliasMember
);
2492 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2497 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2503 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2504 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2505 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2510 if (DEBUGLEVEL
>= 10) {
2511 NDR_PRINT_IN_DEBUG(samr_AddAliasMember
, r
);
2514 r
->out
.result
= _samr_AddAliasMember(p
, r
);
2516 if (p
->rng_fault_state
) {
2518 /* Return true here, srv_pipe_hnd.c will take care */
2522 if (DEBUGLEVEL
>= 10) {
2523 NDR_PRINT_OUT_DEBUG(samr_AddAliasMember
, r
);
2526 push
= ndr_push_init_ctx(r
, NULL
);
2532 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2533 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2538 blob
= ndr_push_blob(push
);
2539 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2549 static bool api_samr_DeleteAliasMember(pipes_struct
*p
)
2551 const struct ndr_interface_call
*call
;
2552 struct ndr_pull
*pull
;
2553 struct ndr_push
*push
;
2554 enum ndr_err_code ndr_err
;
2556 struct samr_DeleteAliasMember
*r
;
2558 call
= &ndr_table_samr
.calls
[NDR_SAMR_DELETEALIASMEMBER
];
2560 r
= talloc(talloc_tos(), struct samr_DeleteAliasMember
);
2565 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2570 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2576 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2577 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2578 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2583 if (DEBUGLEVEL
>= 10) {
2584 NDR_PRINT_IN_DEBUG(samr_DeleteAliasMember
, r
);
2587 r
->out
.result
= _samr_DeleteAliasMember(p
, r
);
2589 if (p
->rng_fault_state
) {
2591 /* Return true here, srv_pipe_hnd.c will take care */
2595 if (DEBUGLEVEL
>= 10) {
2596 NDR_PRINT_OUT_DEBUG(samr_DeleteAliasMember
, r
);
2599 push
= ndr_push_init_ctx(r
, NULL
);
2605 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2606 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2611 blob
= ndr_push_blob(push
);
2612 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2622 static bool api_samr_GetMembersInAlias(pipes_struct
*p
)
2624 const struct ndr_interface_call
*call
;
2625 struct ndr_pull
*pull
;
2626 struct ndr_push
*push
;
2627 enum ndr_err_code ndr_err
;
2629 struct samr_GetMembersInAlias
*r
;
2631 call
= &ndr_table_samr
.calls
[NDR_SAMR_GETMEMBERSINALIAS
];
2633 r
= talloc(talloc_tos(), struct samr_GetMembersInAlias
);
2638 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2643 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2649 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2650 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2651 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2656 if (DEBUGLEVEL
>= 10) {
2657 NDR_PRINT_IN_DEBUG(samr_GetMembersInAlias
, r
);
2660 ZERO_STRUCT(r
->out
);
2661 r
->out
.sids
= talloc_zero(r
, struct lsa_SidArray
);
2662 if (r
->out
.sids
== NULL
) {
2667 r
->out
.result
= _samr_GetMembersInAlias(p
, r
);
2669 if (p
->rng_fault_state
) {
2671 /* Return true here, srv_pipe_hnd.c will take care */
2675 if (DEBUGLEVEL
>= 10) {
2676 NDR_PRINT_OUT_DEBUG(samr_GetMembersInAlias
, r
);
2679 push
= ndr_push_init_ctx(r
, NULL
);
2685 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2686 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2691 blob
= ndr_push_blob(push
);
2692 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2702 static bool api_samr_OpenUser(pipes_struct
*p
)
2704 const struct ndr_interface_call
*call
;
2705 struct ndr_pull
*pull
;
2706 struct ndr_push
*push
;
2707 enum ndr_err_code ndr_err
;
2709 struct samr_OpenUser
*r
;
2711 call
= &ndr_table_samr
.calls
[NDR_SAMR_OPENUSER
];
2713 r
= talloc(talloc_tos(), struct samr_OpenUser
);
2718 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2723 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2729 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2730 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2731 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2736 if (DEBUGLEVEL
>= 10) {
2737 NDR_PRINT_IN_DEBUG(samr_OpenUser
, r
);
2740 ZERO_STRUCT(r
->out
);
2741 r
->out
.user_handle
= talloc_zero(r
, struct policy_handle
);
2742 if (r
->out
.user_handle
== NULL
) {
2747 r
->out
.result
= _samr_OpenUser(p
, r
);
2749 if (p
->rng_fault_state
) {
2751 /* Return true here, srv_pipe_hnd.c will take care */
2755 if (DEBUGLEVEL
>= 10) {
2756 NDR_PRINT_OUT_DEBUG(samr_OpenUser
, r
);
2759 push
= ndr_push_init_ctx(r
, NULL
);
2765 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2766 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2771 blob
= ndr_push_blob(push
);
2772 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2782 static bool api_samr_DeleteUser(pipes_struct
*p
)
2784 const struct ndr_interface_call
*call
;
2785 struct ndr_pull
*pull
;
2786 struct ndr_push
*push
;
2787 enum ndr_err_code ndr_err
;
2789 struct samr_DeleteUser
*r
;
2791 call
= &ndr_table_samr
.calls
[NDR_SAMR_DELETEUSER
];
2793 r
= talloc(talloc_tos(), struct samr_DeleteUser
);
2798 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2803 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2809 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2810 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2811 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2816 if (DEBUGLEVEL
>= 10) {
2817 NDR_PRINT_IN_DEBUG(samr_DeleteUser
, r
);
2820 ZERO_STRUCT(r
->out
);
2821 r
->out
.user_handle
= r
->in
.user_handle
;
2822 r
->out
.result
= _samr_DeleteUser(p
, r
);
2824 if (p
->rng_fault_state
) {
2826 /* Return true here, srv_pipe_hnd.c will take care */
2830 if (DEBUGLEVEL
>= 10) {
2831 NDR_PRINT_OUT_DEBUG(samr_DeleteUser
, r
);
2834 push
= ndr_push_init_ctx(r
, NULL
);
2840 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2841 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2846 blob
= ndr_push_blob(push
);
2847 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2857 static bool api_samr_QueryUserInfo(pipes_struct
*p
)
2859 const struct ndr_interface_call
*call
;
2860 struct ndr_pull
*pull
;
2861 struct ndr_push
*push
;
2862 enum ndr_err_code ndr_err
;
2864 struct samr_QueryUserInfo
*r
;
2866 call
= &ndr_table_samr
.calls
[NDR_SAMR_QUERYUSERINFO
];
2868 r
= talloc(talloc_tos(), struct samr_QueryUserInfo
);
2873 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2878 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2884 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2885 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2886 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2891 if (DEBUGLEVEL
>= 10) {
2892 NDR_PRINT_IN_DEBUG(samr_QueryUserInfo
, r
);
2895 ZERO_STRUCT(r
->out
);
2896 r
->out
.info
= talloc_zero(r
, union samr_UserInfo
*);
2897 if (r
->out
.info
== NULL
) {
2902 r
->out
.result
= _samr_QueryUserInfo(p
, r
);
2904 if (p
->rng_fault_state
) {
2906 /* Return true here, srv_pipe_hnd.c will take care */
2910 if (DEBUGLEVEL
>= 10) {
2911 NDR_PRINT_OUT_DEBUG(samr_QueryUserInfo
, r
);
2914 push
= ndr_push_init_ctx(r
, NULL
);
2920 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2921 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2926 blob
= ndr_push_blob(push
);
2927 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2937 static bool api_samr_SetUserInfo(pipes_struct
*p
)
2939 const struct ndr_interface_call
*call
;
2940 struct ndr_pull
*pull
;
2941 struct ndr_push
*push
;
2942 enum ndr_err_code ndr_err
;
2944 struct samr_SetUserInfo
*r
;
2946 call
= &ndr_table_samr
.calls
[NDR_SAMR_SETUSERINFO
];
2948 r
= talloc(talloc_tos(), struct samr_SetUserInfo
);
2953 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2958 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2964 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2965 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2966 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2971 if (DEBUGLEVEL
>= 10) {
2972 NDR_PRINT_IN_DEBUG(samr_SetUserInfo
, r
);
2975 r
->out
.result
= _samr_SetUserInfo(p
, r
);
2977 if (p
->rng_fault_state
) {
2979 /* Return true here, srv_pipe_hnd.c will take care */
2983 if (DEBUGLEVEL
>= 10) {
2984 NDR_PRINT_OUT_DEBUG(samr_SetUserInfo
, r
);
2987 push
= ndr_push_init_ctx(r
, NULL
);
2993 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2994 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2999 blob
= ndr_push_blob(push
);
3000 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3010 static bool api_samr_ChangePasswordUser(pipes_struct
*p
)
3012 const struct ndr_interface_call
*call
;
3013 struct ndr_pull
*pull
;
3014 struct ndr_push
*push
;
3015 enum ndr_err_code ndr_err
;
3017 struct samr_ChangePasswordUser
*r
;
3019 call
= &ndr_table_samr
.calls
[NDR_SAMR_CHANGEPASSWORDUSER
];
3021 r
= talloc(talloc_tos(), struct samr_ChangePasswordUser
);
3026 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3031 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3037 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3038 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3039 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3044 if (DEBUGLEVEL
>= 10) {
3045 NDR_PRINT_IN_DEBUG(samr_ChangePasswordUser
, r
);
3048 r
->out
.result
= _samr_ChangePasswordUser(p
, r
);
3050 if (p
->rng_fault_state
) {
3052 /* Return true here, srv_pipe_hnd.c will take care */
3056 if (DEBUGLEVEL
>= 10) {
3057 NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser
, r
);
3060 push
= ndr_push_init_ctx(r
, NULL
);
3066 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3067 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3072 blob
= ndr_push_blob(push
);
3073 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3083 static bool api_samr_GetGroupsForUser(pipes_struct
*p
)
3085 const struct ndr_interface_call
*call
;
3086 struct ndr_pull
*pull
;
3087 struct ndr_push
*push
;
3088 enum ndr_err_code ndr_err
;
3090 struct samr_GetGroupsForUser
*r
;
3092 call
= &ndr_table_samr
.calls
[NDR_SAMR_GETGROUPSFORUSER
];
3094 r
= talloc(talloc_tos(), struct samr_GetGroupsForUser
);
3099 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3104 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3110 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3111 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3112 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3117 if (DEBUGLEVEL
>= 10) {
3118 NDR_PRINT_IN_DEBUG(samr_GetGroupsForUser
, r
);
3121 ZERO_STRUCT(r
->out
);
3122 r
->out
.rids
= talloc_zero(r
, struct samr_RidWithAttributeArray
*);
3123 if (r
->out
.rids
== NULL
) {
3128 r
->out
.result
= _samr_GetGroupsForUser(p
, r
);
3130 if (p
->rng_fault_state
) {
3132 /* Return true here, srv_pipe_hnd.c will take care */
3136 if (DEBUGLEVEL
>= 10) {
3137 NDR_PRINT_OUT_DEBUG(samr_GetGroupsForUser
, r
);
3140 push
= ndr_push_init_ctx(r
, NULL
);
3146 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3147 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3152 blob
= ndr_push_blob(push
);
3153 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3163 static bool api_samr_QueryDisplayInfo(pipes_struct
*p
)
3165 const struct ndr_interface_call
*call
;
3166 struct ndr_pull
*pull
;
3167 struct ndr_push
*push
;
3168 enum ndr_err_code ndr_err
;
3170 struct samr_QueryDisplayInfo
*r
;
3172 call
= &ndr_table_samr
.calls
[NDR_SAMR_QUERYDISPLAYINFO
];
3174 r
= talloc(talloc_tos(), struct samr_QueryDisplayInfo
);
3179 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3184 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3190 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3191 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3192 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3197 if (DEBUGLEVEL
>= 10) {
3198 NDR_PRINT_IN_DEBUG(samr_QueryDisplayInfo
, r
);
3201 ZERO_STRUCT(r
->out
);
3202 r
->out
.total_size
= talloc_zero(r
, uint32_t);
3203 if (r
->out
.total_size
== NULL
) {
3208 r
->out
.returned_size
= talloc_zero(r
, uint32_t);
3209 if (r
->out
.returned_size
== NULL
) {
3214 r
->out
.info
= talloc_zero(r
, union samr_DispInfo
);
3215 if (r
->out
.info
== NULL
) {
3220 r
->out
.result
= _samr_QueryDisplayInfo(p
, r
);
3222 if (p
->rng_fault_state
) {
3224 /* Return true here, srv_pipe_hnd.c will take care */
3228 if (DEBUGLEVEL
>= 10) {
3229 NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo
, r
);
3232 push
= ndr_push_init_ctx(r
, NULL
);
3238 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3239 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3244 blob
= ndr_push_blob(push
);
3245 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3255 static bool api_samr_GetDisplayEnumerationIndex(pipes_struct
*p
)
3257 const struct ndr_interface_call
*call
;
3258 struct ndr_pull
*pull
;
3259 struct ndr_push
*push
;
3260 enum ndr_err_code ndr_err
;
3262 struct samr_GetDisplayEnumerationIndex
*r
;
3264 call
= &ndr_table_samr
.calls
[NDR_SAMR_GETDISPLAYENUMERATIONINDEX
];
3266 r
= talloc(talloc_tos(), struct samr_GetDisplayEnumerationIndex
);
3271 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3276 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3282 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3283 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3284 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3289 if (DEBUGLEVEL
>= 10) {
3290 NDR_PRINT_IN_DEBUG(samr_GetDisplayEnumerationIndex
, r
);
3293 ZERO_STRUCT(r
->out
);
3294 r
->out
.idx
= talloc_zero(r
, uint32_t);
3295 if (r
->out
.idx
== NULL
) {
3300 r
->out
.result
= _samr_GetDisplayEnumerationIndex(p
, r
);
3302 if (p
->rng_fault_state
) {
3304 /* Return true here, srv_pipe_hnd.c will take care */
3308 if (DEBUGLEVEL
>= 10) {
3309 NDR_PRINT_OUT_DEBUG(samr_GetDisplayEnumerationIndex
, r
);
3312 push
= ndr_push_init_ctx(r
, NULL
);
3318 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3319 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3324 blob
= ndr_push_blob(push
);
3325 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3335 static bool api_samr_TestPrivateFunctionsDomain(pipes_struct
*p
)
3337 const struct ndr_interface_call
*call
;
3338 struct ndr_pull
*pull
;
3339 struct ndr_push
*push
;
3340 enum ndr_err_code ndr_err
;
3342 struct samr_TestPrivateFunctionsDomain
*r
;
3344 call
= &ndr_table_samr
.calls
[NDR_SAMR_TESTPRIVATEFUNCTIONSDOMAIN
];
3346 r
= talloc(talloc_tos(), struct samr_TestPrivateFunctionsDomain
);
3351 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3356 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3362 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3363 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3364 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3369 if (DEBUGLEVEL
>= 10) {
3370 NDR_PRINT_IN_DEBUG(samr_TestPrivateFunctionsDomain
, r
);
3373 r
->out
.result
= _samr_TestPrivateFunctionsDomain(p
, r
);
3375 if (p
->rng_fault_state
) {
3377 /* Return true here, srv_pipe_hnd.c will take care */
3381 if (DEBUGLEVEL
>= 10) {
3382 NDR_PRINT_OUT_DEBUG(samr_TestPrivateFunctionsDomain
, r
);
3385 push
= ndr_push_init_ctx(r
, NULL
);
3391 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3392 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3397 blob
= ndr_push_blob(push
);
3398 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3408 static bool api_samr_TestPrivateFunctionsUser(pipes_struct
*p
)
3410 const struct ndr_interface_call
*call
;
3411 struct ndr_pull
*pull
;
3412 struct ndr_push
*push
;
3413 enum ndr_err_code ndr_err
;
3415 struct samr_TestPrivateFunctionsUser
*r
;
3417 call
= &ndr_table_samr
.calls
[NDR_SAMR_TESTPRIVATEFUNCTIONSUSER
];
3419 r
= talloc(talloc_tos(), struct samr_TestPrivateFunctionsUser
);
3424 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3429 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3435 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3436 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3437 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3442 if (DEBUGLEVEL
>= 10) {
3443 NDR_PRINT_IN_DEBUG(samr_TestPrivateFunctionsUser
, r
);
3446 r
->out
.result
= _samr_TestPrivateFunctionsUser(p
, r
);
3448 if (p
->rng_fault_state
) {
3450 /* Return true here, srv_pipe_hnd.c will take care */
3454 if (DEBUGLEVEL
>= 10) {
3455 NDR_PRINT_OUT_DEBUG(samr_TestPrivateFunctionsUser
, r
);
3458 push
= ndr_push_init_ctx(r
, NULL
);
3464 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3465 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3470 blob
= ndr_push_blob(push
);
3471 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3481 static bool api_samr_GetUserPwInfo(pipes_struct
*p
)
3483 const struct ndr_interface_call
*call
;
3484 struct ndr_pull
*pull
;
3485 struct ndr_push
*push
;
3486 enum ndr_err_code ndr_err
;
3488 struct samr_GetUserPwInfo
*r
;
3490 call
= &ndr_table_samr
.calls
[NDR_SAMR_GETUSERPWINFO
];
3492 r
= talloc(talloc_tos(), struct samr_GetUserPwInfo
);
3497 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3502 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3508 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3509 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3510 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3515 if (DEBUGLEVEL
>= 10) {
3516 NDR_PRINT_IN_DEBUG(samr_GetUserPwInfo
, r
);
3519 ZERO_STRUCT(r
->out
);
3520 r
->out
.info
= talloc_zero(r
, struct samr_PwInfo
);
3521 if (r
->out
.info
== NULL
) {
3526 r
->out
.result
= _samr_GetUserPwInfo(p
, r
);
3528 if (p
->rng_fault_state
) {
3530 /* Return true here, srv_pipe_hnd.c will take care */
3534 if (DEBUGLEVEL
>= 10) {
3535 NDR_PRINT_OUT_DEBUG(samr_GetUserPwInfo
, r
);
3538 push
= ndr_push_init_ctx(r
, NULL
);
3544 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3545 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3550 blob
= ndr_push_blob(push
);
3551 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3561 static bool api_samr_RemoveMemberFromForeignDomain(pipes_struct
*p
)
3563 const struct ndr_interface_call
*call
;
3564 struct ndr_pull
*pull
;
3565 struct ndr_push
*push
;
3566 enum ndr_err_code ndr_err
;
3568 struct samr_RemoveMemberFromForeignDomain
*r
;
3570 call
= &ndr_table_samr
.calls
[NDR_SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN
];
3572 r
= talloc(talloc_tos(), struct samr_RemoveMemberFromForeignDomain
);
3577 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3582 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3588 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3589 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3590 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3595 if (DEBUGLEVEL
>= 10) {
3596 NDR_PRINT_IN_DEBUG(samr_RemoveMemberFromForeignDomain
, r
);
3599 r
->out
.result
= _samr_RemoveMemberFromForeignDomain(p
, r
);
3601 if (p
->rng_fault_state
) {
3603 /* Return true here, srv_pipe_hnd.c will take care */
3607 if (DEBUGLEVEL
>= 10) {
3608 NDR_PRINT_OUT_DEBUG(samr_RemoveMemberFromForeignDomain
, r
);
3611 push
= ndr_push_init_ctx(r
, NULL
);
3617 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3618 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3623 blob
= ndr_push_blob(push
);
3624 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3634 static bool api_samr_QueryDomainInfo2(pipes_struct
*p
)
3636 const struct ndr_interface_call
*call
;
3637 struct ndr_pull
*pull
;
3638 struct ndr_push
*push
;
3639 enum ndr_err_code ndr_err
;
3641 struct samr_QueryDomainInfo2
*r
;
3643 call
= &ndr_table_samr
.calls
[NDR_SAMR_QUERYDOMAININFO2
];
3645 r
= talloc(talloc_tos(), struct samr_QueryDomainInfo2
);
3650 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3655 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3661 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3662 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3663 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3668 if (DEBUGLEVEL
>= 10) {
3669 NDR_PRINT_IN_DEBUG(samr_QueryDomainInfo2
, r
);
3672 ZERO_STRUCT(r
->out
);
3673 r
->out
.info
= talloc_zero(r
, union samr_DomainInfo
*);
3674 if (r
->out
.info
== NULL
) {
3679 r
->out
.result
= _samr_QueryDomainInfo2(p
, r
);
3681 if (p
->rng_fault_state
) {
3683 /* Return true here, srv_pipe_hnd.c will take care */
3687 if (DEBUGLEVEL
>= 10) {
3688 NDR_PRINT_OUT_DEBUG(samr_QueryDomainInfo2
, r
);
3691 push
= ndr_push_init_ctx(r
, NULL
);
3697 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3698 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3703 blob
= ndr_push_blob(push
);
3704 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3714 static bool api_samr_QueryUserInfo2(pipes_struct
*p
)
3716 const struct ndr_interface_call
*call
;
3717 struct ndr_pull
*pull
;
3718 struct ndr_push
*push
;
3719 enum ndr_err_code ndr_err
;
3721 struct samr_QueryUserInfo2
*r
;
3723 call
= &ndr_table_samr
.calls
[NDR_SAMR_QUERYUSERINFO2
];
3725 r
= talloc(talloc_tos(), struct samr_QueryUserInfo2
);
3730 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3735 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3741 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3742 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3743 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3748 if (DEBUGLEVEL
>= 10) {
3749 NDR_PRINT_IN_DEBUG(samr_QueryUserInfo2
, r
);
3752 ZERO_STRUCT(r
->out
);
3753 r
->out
.info
= talloc_zero(r
, union samr_UserInfo
*);
3754 if (r
->out
.info
== NULL
) {
3759 r
->out
.result
= _samr_QueryUserInfo2(p
, r
);
3761 if (p
->rng_fault_state
) {
3763 /* Return true here, srv_pipe_hnd.c will take care */
3767 if (DEBUGLEVEL
>= 10) {
3768 NDR_PRINT_OUT_DEBUG(samr_QueryUserInfo2
, r
);
3771 push
= ndr_push_init_ctx(r
, NULL
);
3777 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3778 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3783 blob
= ndr_push_blob(push
);
3784 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3794 static bool api_samr_QueryDisplayInfo2(pipes_struct
*p
)
3796 const struct ndr_interface_call
*call
;
3797 struct ndr_pull
*pull
;
3798 struct ndr_push
*push
;
3799 enum ndr_err_code ndr_err
;
3801 struct samr_QueryDisplayInfo2
*r
;
3803 call
= &ndr_table_samr
.calls
[NDR_SAMR_QUERYDISPLAYINFO2
];
3805 r
= talloc(talloc_tos(), struct samr_QueryDisplayInfo2
);
3810 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3815 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3821 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3822 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3823 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3828 if (DEBUGLEVEL
>= 10) {
3829 NDR_PRINT_IN_DEBUG(samr_QueryDisplayInfo2
, r
);
3832 ZERO_STRUCT(r
->out
);
3833 r
->out
.total_size
= talloc_zero(r
, uint32_t);
3834 if (r
->out
.total_size
== NULL
) {
3839 r
->out
.returned_size
= talloc_zero(r
, uint32_t);
3840 if (r
->out
.returned_size
== NULL
) {
3845 r
->out
.info
= talloc_zero(r
, union samr_DispInfo
);
3846 if (r
->out
.info
== NULL
) {
3851 r
->out
.result
= _samr_QueryDisplayInfo2(p
, r
);
3853 if (p
->rng_fault_state
) {
3855 /* Return true here, srv_pipe_hnd.c will take care */
3859 if (DEBUGLEVEL
>= 10) {
3860 NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo2
, r
);
3863 push
= ndr_push_init_ctx(r
, NULL
);
3869 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3870 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3875 blob
= ndr_push_blob(push
);
3876 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3886 static bool api_samr_GetDisplayEnumerationIndex2(pipes_struct
*p
)
3888 const struct ndr_interface_call
*call
;
3889 struct ndr_pull
*pull
;
3890 struct ndr_push
*push
;
3891 enum ndr_err_code ndr_err
;
3893 struct samr_GetDisplayEnumerationIndex2
*r
;
3895 call
= &ndr_table_samr
.calls
[NDR_SAMR_GETDISPLAYENUMERATIONINDEX2
];
3897 r
= talloc(talloc_tos(), struct samr_GetDisplayEnumerationIndex2
);
3902 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3907 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3913 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3914 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3915 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3920 if (DEBUGLEVEL
>= 10) {
3921 NDR_PRINT_IN_DEBUG(samr_GetDisplayEnumerationIndex2
, r
);
3924 ZERO_STRUCT(r
->out
);
3925 r
->out
.idx
= talloc_zero(r
, uint32_t);
3926 if (r
->out
.idx
== NULL
) {
3931 r
->out
.result
= _samr_GetDisplayEnumerationIndex2(p
, r
);
3933 if (p
->rng_fault_state
) {
3935 /* Return true here, srv_pipe_hnd.c will take care */
3939 if (DEBUGLEVEL
>= 10) {
3940 NDR_PRINT_OUT_DEBUG(samr_GetDisplayEnumerationIndex2
, r
);
3943 push
= ndr_push_init_ctx(r
, NULL
);
3949 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3950 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3955 blob
= ndr_push_blob(push
);
3956 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3966 static bool api_samr_CreateUser2(pipes_struct
*p
)
3968 const struct ndr_interface_call
*call
;
3969 struct ndr_pull
*pull
;
3970 struct ndr_push
*push
;
3971 enum ndr_err_code ndr_err
;
3973 struct samr_CreateUser2
*r
;
3975 call
= &ndr_table_samr
.calls
[NDR_SAMR_CREATEUSER2
];
3977 r
= talloc(talloc_tos(), struct samr_CreateUser2
);
3982 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3987 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3993 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3994 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3995 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4000 if (DEBUGLEVEL
>= 10) {
4001 NDR_PRINT_IN_DEBUG(samr_CreateUser2
, r
);
4004 ZERO_STRUCT(r
->out
);
4005 r
->out
.user_handle
= talloc_zero(r
, struct policy_handle
);
4006 if (r
->out
.user_handle
== NULL
) {
4011 r
->out
.access_granted
= talloc_zero(r
, uint32_t);
4012 if (r
->out
.access_granted
== NULL
) {
4017 r
->out
.rid
= talloc_zero(r
, uint32_t);
4018 if (r
->out
.rid
== NULL
) {
4023 r
->out
.result
= _samr_CreateUser2(p
, r
);
4025 if (p
->rng_fault_state
) {
4027 /* Return true here, srv_pipe_hnd.c will take care */
4031 if (DEBUGLEVEL
>= 10) {
4032 NDR_PRINT_OUT_DEBUG(samr_CreateUser2
, r
);
4035 push
= ndr_push_init_ctx(r
, NULL
);
4041 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4042 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4047 blob
= ndr_push_blob(push
);
4048 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4058 static bool api_samr_QueryDisplayInfo3(pipes_struct
*p
)
4060 const struct ndr_interface_call
*call
;
4061 struct ndr_pull
*pull
;
4062 struct ndr_push
*push
;
4063 enum ndr_err_code ndr_err
;
4065 struct samr_QueryDisplayInfo3
*r
;
4067 call
= &ndr_table_samr
.calls
[NDR_SAMR_QUERYDISPLAYINFO3
];
4069 r
= talloc(talloc_tos(), struct samr_QueryDisplayInfo3
);
4074 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4079 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4085 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4086 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4087 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4092 if (DEBUGLEVEL
>= 10) {
4093 NDR_PRINT_IN_DEBUG(samr_QueryDisplayInfo3
, r
);
4096 ZERO_STRUCT(r
->out
);
4097 r
->out
.total_size
= talloc_zero(r
, uint32_t);
4098 if (r
->out
.total_size
== NULL
) {
4103 r
->out
.returned_size
= talloc_zero(r
, uint32_t);
4104 if (r
->out
.returned_size
== NULL
) {
4109 r
->out
.info
= talloc_zero(r
, union samr_DispInfo
);
4110 if (r
->out
.info
== NULL
) {
4115 r
->out
.result
= _samr_QueryDisplayInfo3(p
, r
);
4117 if (p
->rng_fault_state
) {
4119 /* Return true here, srv_pipe_hnd.c will take care */
4123 if (DEBUGLEVEL
>= 10) {
4124 NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo3
, r
);
4127 push
= ndr_push_init_ctx(r
, NULL
);
4133 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4134 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4139 blob
= ndr_push_blob(push
);
4140 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4150 static bool api_samr_AddMultipleMembersToAlias(pipes_struct
*p
)
4152 const struct ndr_interface_call
*call
;
4153 struct ndr_pull
*pull
;
4154 struct ndr_push
*push
;
4155 enum ndr_err_code ndr_err
;
4157 struct samr_AddMultipleMembersToAlias
*r
;
4159 call
= &ndr_table_samr
.calls
[NDR_SAMR_ADDMULTIPLEMEMBERSTOALIAS
];
4161 r
= talloc(talloc_tos(), struct samr_AddMultipleMembersToAlias
);
4166 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4171 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4177 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4178 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4179 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4184 if (DEBUGLEVEL
>= 10) {
4185 NDR_PRINT_IN_DEBUG(samr_AddMultipleMembersToAlias
, r
);
4188 r
->out
.result
= _samr_AddMultipleMembersToAlias(p
, r
);
4190 if (p
->rng_fault_state
) {
4192 /* Return true here, srv_pipe_hnd.c will take care */
4196 if (DEBUGLEVEL
>= 10) {
4197 NDR_PRINT_OUT_DEBUG(samr_AddMultipleMembersToAlias
, r
);
4200 push
= ndr_push_init_ctx(r
, NULL
);
4206 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4207 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4212 blob
= ndr_push_blob(push
);
4213 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4223 static bool api_samr_RemoveMultipleMembersFromAlias(pipes_struct
*p
)
4225 const struct ndr_interface_call
*call
;
4226 struct ndr_pull
*pull
;
4227 struct ndr_push
*push
;
4228 enum ndr_err_code ndr_err
;
4230 struct samr_RemoveMultipleMembersFromAlias
*r
;
4232 call
= &ndr_table_samr
.calls
[NDR_SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS
];
4234 r
= talloc(talloc_tos(), struct samr_RemoveMultipleMembersFromAlias
);
4239 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4244 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4250 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4251 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4252 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4257 if (DEBUGLEVEL
>= 10) {
4258 NDR_PRINT_IN_DEBUG(samr_RemoveMultipleMembersFromAlias
, r
);
4261 r
->out
.result
= _samr_RemoveMultipleMembersFromAlias(p
, r
);
4263 if (p
->rng_fault_state
) {
4265 /* Return true here, srv_pipe_hnd.c will take care */
4269 if (DEBUGLEVEL
>= 10) {
4270 NDR_PRINT_OUT_DEBUG(samr_RemoveMultipleMembersFromAlias
, r
);
4273 push
= ndr_push_init_ctx(r
, NULL
);
4279 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4280 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4285 blob
= ndr_push_blob(push
);
4286 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4296 static bool api_samr_OemChangePasswordUser2(pipes_struct
*p
)
4298 const struct ndr_interface_call
*call
;
4299 struct ndr_pull
*pull
;
4300 struct ndr_push
*push
;
4301 enum ndr_err_code ndr_err
;
4303 struct samr_OemChangePasswordUser2
*r
;
4305 call
= &ndr_table_samr
.calls
[NDR_SAMR_OEMCHANGEPASSWORDUSER2
];
4307 r
= talloc(talloc_tos(), struct samr_OemChangePasswordUser2
);
4312 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4317 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4323 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4324 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4325 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4330 if (DEBUGLEVEL
>= 10) {
4331 NDR_PRINT_IN_DEBUG(samr_OemChangePasswordUser2
, r
);
4334 r
->out
.result
= _samr_OemChangePasswordUser2(p
, r
);
4336 if (p
->rng_fault_state
) {
4338 /* Return true here, srv_pipe_hnd.c will take care */
4342 if (DEBUGLEVEL
>= 10) {
4343 NDR_PRINT_OUT_DEBUG(samr_OemChangePasswordUser2
, r
);
4346 push
= ndr_push_init_ctx(r
, NULL
);
4352 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4353 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4358 blob
= ndr_push_blob(push
);
4359 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4369 static bool api_samr_ChangePasswordUser2(pipes_struct
*p
)
4371 const struct ndr_interface_call
*call
;
4372 struct ndr_pull
*pull
;
4373 struct ndr_push
*push
;
4374 enum ndr_err_code ndr_err
;
4376 struct samr_ChangePasswordUser2
*r
;
4378 call
= &ndr_table_samr
.calls
[NDR_SAMR_CHANGEPASSWORDUSER2
];
4380 r
= talloc(talloc_tos(), struct samr_ChangePasswordUser2
);
4385 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4390 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4396 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4397 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4398 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4403 if (DEBUGLEVEL
>= 10) {
4404 NDR_PRINT_IN_DEBUG(samr_ChangePasswordUser2
, r
);
4407 r
->out
.result
= _samr_ChangePasswordUser2(p
, r
);
4409 if (p
->rng_fault_state
) {
4411 /* Return true here, srv_pipe_hnd.c will take care */
4415 if (DEBUGLEVEL
>= 10) {
4416 NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser2
, r
);
4419 push
= ndr_push_init_ctx(r
, NULL
);
4425 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4426 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4431 blob
= ndr_push_blob(push
);
4432 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4442 static bool api_samr_GetDomPwInfo(pipes_struct
*p
)
4444 const struct ndr_interface_call
*call
;
4445 struct ndr_pull
*pull
;
4446 struct ndr_push
*push
;
4447 enum ndr_err_code ndr_err
;
4449 struct samr_GetDomPwInfo
*r
;
4451 call
= &ndr_table_samr
.calls
[NDR_SAMR_GETDOMPWINFO
];
4453 r
= talloc(talloc_tos(), struct samr_GetDomPwInfo
);
4458 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4463 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4469 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4470 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4471 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4476 if (DEBUGLEVEL
>= 10) {
4477 NDR_PRINT_IN_DEBUG(samr_GetDomPwInfo
, r
);
4480 ZERO_STRUCT(r
->out
);
4481 r
->out
.info
= talloc_zero(r
, struct samr_PwInfo
);
4482 if (r
->out
.info
== NULL
) {
4487 r
->out
.result
= _samr_GetDomPwInfo(p
, r
);
4489 if (p
->rng_fault_state
) {
4491 /* Return true here, srv_pipe_hnd.c will take care */
4495 if (DEBUGLEVEL
>= 10) {
4496 NDR_PRINT_OUT_DEBUG(samr_GetDomPwInfo
, r
);
4499 push
= ndr_push_init_ctx(r
, NULL
);
4505 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4506 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4511 blob
= ndr_push_blob(push
);
4512 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4522 static bool api_samr_Connect2(pipes_struct
*p
)
4524 const struct ndr_interface_call
*call
;
4525 struct ndr_pull
*pull
;
4526 struct ndr_push
*push
;
4527 enum ndr_err_code ndr_err
;
4529 struct samr_Connect2
*r
;
4531 call
= &ndr_table_samr
.calls
[NDR_SAMR_CONNECT2
];
4533 r
= talloc(talloc_tos(), struct samr_Connect2
);
4538 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4543 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4549 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4550 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4551 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4556 if (DEBUGLEVEL
>= 10) {
4557 NDR_PRINT_IN_DEBUG(samr_Connect2
, r
);
4560 ZERO_STRUCT(r
->out
);
4561 r
->out
.connect_handle
= talloc_zero(r
, struct policy_handle
);
4562 if (r
->out
.connect_handle
== NULL
) {
4567 r
->out
.result
= _samr_Connect2(p
, r
);
4569 if (p
->rng_fault_state
) {
4571 /* Return true here, srv_pipe_hnd.c will take care */
4575 if (DEBUGLEVEL
>= 10) {
4576 NDR_PRINT_OUT_DEBUG(samr_Connect2
, r
);
4579 push
= ndr_push_init_ctx(r
, NULL
);
4585 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4586 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4591 blob
= ndr_push_blob(push
);
4592 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4602 static bool api_samr_SetUserInfo2(pipes_struct
*p
)
4604 const struct ndr_interface_call
*call
;
4605 struct ndr_pull
*pull
;
4606 struct ndr_push
*push
;
4607 enum ndr_err_code ndr_err
;
4609 struct samr_SetUserInfo2
*r
;
4611 call
= &ndr_table_samr
.calls
[NDR_SAMR_SETUSERINFO2
];
4613 r
= talloc(talloc_tos(), struct samr_SetUserInfo2
);
4618 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4623 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4629 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4630 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4631 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4636 if (DEBUGLEVEL
>= 10) {
4637 NDR_PRINT_IN_DEBUG(samr_SetUserInfo2
, r
);
4640 r
->out
.result
= _samr_SetUserInfo2(p
, r
);
4642 if (p
->rng_fault_state
) {
4644 /* Return true here, srv_pipe_hnd.c will take care */
4648 if (DEBUGLEVEL
>= 10) {
4649 NDR_PRINT_OUT_DEBUG(samr_SetUserInfo2
, r
);
4652 push
= ndr_push_init_ctx(r
, NULL
);
4658 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4659 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4664 blob
= ndr_push_blob(push
);
4665 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4675 static bool api_samr_SetBootKeyInformation(pipes_struct
*p
)
4677 const struct ndr_interface_call
*call
;
4678 struct ndr_pull
*pull
;
4679 struct ndr_push
*push
;
4680 enum ndr_err_code ndr_err
;
4682 struct samr_SetBootKeyInformation
*r
;
4684 call
= &ndr_table_samr
.calls
[NDR_SAMR_SETBOOTKEYINFORMATION
];
4686 r
= talloc(talloc_tos(), struct samr_SetBootKeyInformation
);
4691 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4696 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4702 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4703 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4704 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4709 if (DEBUGLEVEL
>= 10) {
4710 NDR_PRINT_IN_DEBUG(samr_SetBootKeyInformation
, r
);
4713 r
->out
.result
= _samr_SetBootKeyInformation(p
, r
);
4715 if (p
->rng_fault_state
) {
4717 /* Return true here, srv_pipe_hnd.c will take care */
4721 if (DEBUGLEVEL
>= 10) {
4722 NDR_PRINT_OUT_DEBUG(samr_SetBootKeyInformation
, r
);
4725 push
= ndr_push_init_ctx(r
, NULL
);
4731 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4732 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4737 blob
= ndr_push_blob(push
);
4738 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4748 static bool api_samr_GetBootKeyInformation(pipes_struct
*p
)
4750 const struct ndr_interface_call
*call
;
4751 struct ndr_pull
*pull
;
4752 struct ndr_push
*push
;
4753 enum ndr_err_code ndr_err
;
4755 struct samr_GetBootKeyInformation
*r
;
4757 call
= &ndr_table_samr
.calls
[NDR_SAMR_GETBOOTKEYINFORMATION
];
4759 r
= talloc(talloc_tos(), struct samr_GetBootKeyInformation
);
4764 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4769 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4775 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4776 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4777 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4782 if (DEBUGLEVEL
>= 10) {
4783 NDR_PRINT_IN_DEBUG(samr_GetBootKeyInformation
, r
);
4786 ZERO_STRUCT(r
->out
);
4787 r
->out
.unknown
= talloc_zero(r
, uint32_t);
4788 if (r
->out
.unknown
== NULL
) {
4793 r
->out
.result
= _samr_GetBootKeyInformation(p
, r
);
4795 if (p
->rng_fault_state
) {
4797 /* Return true here, srv_pipe_hnd.c will take care */
4801 if (DEBUGLEVEL
>= 10) {
4802 NDR_PRINT_OUT_DEBUG(samr_GetBootKeyInformation
, r
);
4805 push
= ndr_push_init_ctx(r
, NULL
);
4811 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4812 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4817 blob
= ndr_push_blob(push
);
4818 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4828 static bool api_samr_Connect3(pipes_struct
*p
)
4830 const struct ndr_interface_call
*call
;
4831 struct ndr_pull
*pull
;
4832 struct ndr_push
*push
;
4833 enum ndr_err_code ndr_err
;
4835 struct samr_Connect3
*r
;
4837 call
= &ndr_table_samr
.calls
[NDR_SAMR_CONNECT3
];
4839 r
= talloc(talloc_tos(), struct samr_Connect3
);
4844 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4849 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4855 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4856 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4857 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4862 if (DEBUGLEVEL
>= 10) {
4863 NDR_PRINT_IN_DEBUG(samr_Connect3
, r
);
4866 ZERO_STRUCT(r
->out
);
4867 r
->out
.connect_handle
= talloc_zero(r
, struct policy_handle
);
4868 if (r
->out
.connect_handle
== NULL
) {
4873 r
->out
.result
= _samr_Connect3(p
, r
);
4875 if (p
->rng_fault_state
) {
4877 /* Return true here, srv_pipe_hnd.c will take care */
4881 if (DEBUGLEVEL
>= 10) {
4882 NDR_PRINT_OUT_DEBUG(samr_Connect3
, r
);
4885 push
= ndr_push_init_ctx(r
, NULL
);
4891 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4892 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4897 blob
= ndr_push_blob(push
);
4898 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4908 static bool api_samr_Connect4(pipes_struct
*p
)
4910 const struct ndr_interface_call
*call
;
4911 struct ndr_pull
*pull
;
4912 struct ndr_push
*push
;
4913 enum ndr_err_code ndr_err
;
4915 struct samr_Connect4
*r
;
4917 call
= &ndr_table_samr
.calls
[NDR_SAMR_CONNECT4
];
4919 r
= talloc(talloc_tos(), struct samr_Connect4
);
4924 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4929 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4935 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4936 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4937 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4942 if (DEBUGLEVEL
>= 10) {
4943 NDR_PRINT_IN_DEBUG(samr_Connect4
, r
);
4946 ZERO_STRUCT(r
->out
);
4947 r
->out
.connect_handle
= talloc_zero(r
, struct policy_handle
);
4948 if (r
->out
.connect_handle
== NULL
) {
4953 r
->out
.result
= _samr_Connect4(p
, r
);
4955 if (p
->rng_fault_state
) {
4957 /* Return true here, srv_pipe_hnd.c will take care */
4961 if (DEBUGLEVEL
>= 10) {
4962 NDR_PRINT_OUT_DEBUG(samr_Connect4
, r
);
4965 push
= ndr_push_init_ctx(r
, NULL
);
4971 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4972 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4977 blob
= ndr_push_blob(push
);
4978 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4988 static bool api_samr_ChangePasswordUser3(pipes_struct
*p
)
4990 const struct ndr_interface_call
*call
;
4991 struct ndr_pull
*pull
;
4992 struct ndr_push
*push
;
4993 enum ndr_err_code ndr_err
;
4995 struct samr_ChangePasswordUser3
*r
;
4997 call
= &ndr_table_samr
.calls
[NDR_SAMR_CHANGEPASSWORDUSER3
];
4999 r
= talloc(talloc_tos(), struct samr_ChangePasswordUser3
);
5004 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5009 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5015 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5016 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5017 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5022 if (DEBUGLEVEL
>= 10) {
5023 NDR_PRINT_IN_DEBUG(samr_ChangePasswordUser3
, r
);
5026 ZERO_STRUCT(r
->out
);
5027 r
->out
.dominfo
= talloc_zero(r
, struct samr_DomInfo1
*);
5028 if (r
->out
.dominfo
== NULL
) {
5033 r
->out
.reject
= talloc_zero(r
, struct samr_ChangeReject
*);
5034 if (r
->out
.reject
== NULL
) {
5039 r
->out
.result
= _samr_ChangePasswordUser3(p
, r
);
5041 if (p
->rng_fault_state
) {
5043 /* Return true here, srv_pipe_hnd.c will take care */
5047 if (DEBUGLEVEL
>= 10) {
5048 NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser3
, r
);
5051 push
= ndr_push_init_ctx(r
, NULL
);
5057 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5058 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5063 blob
= ndr_push_blob(push
);
5064 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5074 static bool api_samr_Connect5(pipes_struct
*p
)
5076 const struct ndr_interface_call
*call
;
5077 struct ndr_pull
*pull
;
5078 struct ndr_push
*push
;
5079 enum ndr_err_code ndr_err
;
5081 struct samr_Connect5
*r
;
5083 call
= &ndr_table_samr
.calls
[NDR_SAMR_CONNECT5
];
5085 r
= talloc(talloc_tos(), struct samr_Connect5
);
5090 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5095 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5101 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5102 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5103 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5108 if (DEBUGLEVEL
>= 10) {
5109 NDR_PRINT_IN_DEBUG(samr_Connect5
, r
);
5112 ZERO_STRUCT(r
->out
);
5113 r
->out
.level_out
= talloc_zero(r
, uint32_t);
5114 if (r
->out
.level_out
== NULL
) {
5119 r
->out
.info_out
= talloc_zero(r
, union samr_ConnectInfo
);
5120 if (r
->out
.info_out
== NULL
) {
5125 r
->out
.connect_handle
= talloc_zero(r
, struct policy_handle
);
5126 if (r
->out
.connect_handle
== NULL
) {
5131 r
->out
.result
= _samr_Connect5(p
, r
);
5133 if (p
->rng_fault_state
) {
5135 /* Return true here, srv_pipe_hnd.c will take care */
5139 if (DEBUGLEVEL
>= 10) {
5140 NDR_PRINT_OUT_DEBUG(samr_Connect5
, r
);
5143 push
= ndr_push_init_ctx(r
, NULL
);
5149 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5150 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5155 blob
= ndr_push_blob(push
);
5156 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5166 static bool api_samr_RidToSid(pipes_struct
*p
)
5168 const struct ndr_interface_call
*call
;
5169 struct ndr_pull
*pull
;
5170 struct ndr_push
*push
;
5171 enum ndr_err_code ndr_err
;
5173 struct samr_RidToSid
*r
;
5175 call
= &ndr_table_samr
.calls
[NDR_SAMR_RIDTOSID
];
5177 r
= talloc(talloc_tos(), struct samr_RidToSid
);
5182 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5187 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5193 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5194 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5195 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5200 if (DEBUGLEVEL
>= 10) {
5201 NDR_PRINT_IN_DEBUG(samr_RidToSid
, r
);
5204 ZERO_STRUCT(r
->out
);
5205 r
->out
.sid
= talloc_zero(r
, struct dom_sid2
*);
5206 if (r
->out
.sid
== NULL
) {
5211 r
->out
.result
= _samr_RidToSid(p
, r
);
5213 if (p
->rng_fault_state
) {
5215 /* Return true here, srv_pipe_hnd.c will take care */
5219 if (DEBUGLEVEL
>= 10) {
5220 NDR_PRINT_OUT_DEBUG(samr_RidToSid
, r
);
5223 push
= ndr_push_init_ctx(r
, NULL
);
5229 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5230 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5235 blob
= ndr_push_blob(push
);
5236 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5246 static bool api_samr_SetDsrmPassword(pipes_struct
*p
)
5248 const struct ndr_interface_call
*call
;
5249 struct ndr_pull
*pull
;
5250 struct ndr_push
*push
;
5251 enum ndr_err_code ndr_err
;
5253 struct samr_SetDsrmPassword
*r
;
5255 call
= &ndr_table_samr
.calls
[NDR_SAMR_SETDSRMPASSWORD
];
5257 r
= talloc(talloc_tos(), struct samr_SetDsrmPassword
);
5262 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5267 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5273 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5274 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5275 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5280 if (DEBUGLEVEL
>= 10) {
5281 NDR_PRINT_IN_DEBUG(samr_SetDsrmPassword
, r
);
5284 r
->out
.result
= _samr_SetDsrmPassword(p
, r
);
5286 if (p
->rng_fault_state
) {
5288 /* Return true here, srv_pipe_hnd.c will take care */
5292 if (DEBUGLEVEL
>= 10) {
5293 NDR_PRINT_OUT_DEBUG(samr_SetDsrmPassword
, r
);
5296 push
= ndr_push_init_ctx(r
, NULL
);
5302 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5303 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5308 blob
= ndr_push_blob(push
);
5309 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5319 static bool api_samr_ValidatePassword(pipes_struct
*p
)
5321 const struct ndr_interface_call
*call
;
5322 struct ndr_pull
*pull
;
5323 struct ndr_push
*push
;
5324 enum ndr_err_code ndr_err
;
5326 struct samr_ValidatePassword
*r
;
5328 call
= &ndr_table_samr
.calls
[NDR_SAMR_VALIDATEPASSWORD
];
5330 r
= talloc(talloc_tos(), struct samr_ValidatePassword
);
5335 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5340 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5346 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5347 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5348 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5353 if (DEBUGLEVEL
>= 10) {
5354 NDR_PRINT_IN_DEBUG(samr_ValidatePassword
, r
);
5357 ZERO_STRUCT(r
->out
);
5358 r
->out
.rep
= talloc_zero(r
, union samr_ValidatePasswordRep
*);
5359 if (r
->out
.rep
== NULL
) {
5364 r
->out
.result
= _samr_ValidatePassword(p
, r
);
5366 if (p
->rng_fault_state
) {
5368 /* Return true here, srv_pipe_hnd.c will take care */
5372 if (DEBUGLEVEL
>= 10) {
5373 NDR_PRINT_OUT_DEBUG(samr_ValidatePassword
, r
);
5376 push
= ndr_push_init_ctx(r
, NULL
);
5382 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5383 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5388 blob
= ndr_push_blob(push
);
5389 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5401 static struct api_struct api_samr_cmds
[] =
5403 {"SAMR_CONNECT", NDR_SAMR_CONNECT
, api_samr_Connect
},
5404 {"SAMR_CLOSE", NDR_SAMR_CLOSE
, api_samr_Close
},
5405 {"SAMR_SETSECURITY", NDR_SAMR_SETSECURITY
, api_samr_SetSecurity
},
5406 {"SAMR_QUERYSECURITY", NDR_SAMR_QUERYSECURITY
, api_samr_QuerySecurity
},
5407 {"SAMR_SHUTDOWN", NDR_SAMR_SHUTDOWN
, api_samr_Shutdown
},
5408 {"SAMR_LOOKUPDOMAIN", NDR_SAMR_LOOKUPDOMAIN
, api_samr_LookupDomain
},
5409 {"SAMR_ENUMDOMAINS", NDR_SAMR_ENUMDOMAINS
, api_samr_EnumDomains
},
5410 {"SAMR_OPENDOMAIN", NDR_SAMR_OPENDOMAIN
, api_samr_OpenDomain
},
5411 {"SAMR_QUERYDOMAININFO", NDR_SAMR_QUERYDOMAININFO
, api_samr_QueryDomainInfo
},
5412 {"SAMR_SETDOMAININFO", NDR_SAMR_SETDOMAININFO
, api_samr_SetDomainInfo
},
5413 {"SAMR_CREATEDOMAINGROUP", NDR_SAMR_CREATEDOMAINGROUP
, api_samr_CreateDomainGroup
},
5414 {"SAMR_ENUMDOMAINGROUPS", NDR_SAMR_ENUMDOMAINGROUPS
, api_samr_EnumDomainGroups
},
5415 {"SAMR_CREATEUSER", NDR_SAMR_CREATEUSER
, api_samr_CreateUser
},
5416 {"SAMR_ENUMDOMAINUSERS", NDR_SAMR_ENUMDOMAINUSERS
, api_samr_EnumDomainUsers
},
5417 {"SAMR_CREATEDOMALIAS", NDR_SAMR_CREATEDOMALIAS
, api_samr_CreateDomAlias
},
5418 {"SAMR_ENUMDOMAINALIASES", NDR_SAMR_ENUMDOMAINALIASES
, api_samr_EnumDomainAliases
},
5419 {"SAMR_GETALIASMEMBERSHIP", NDR_SAMR_GETALIASMEMBERSHIP
, api_samr_GetAliasMembership
},
5420 {"SAMR_LOOKUPNAMES", NDR_SAMR_LOOKUPNAMES
, api_samr_LookupNames
},
5421 {"SAMR_LOOKUPRIDS", NDR_SAMR_LOOKUPRIDS
, api_samr_LookupRids
},
5422 {"SAMR_OPENGROUP", NDR_SAMR_OPENGROUP
, api_samr_OpenGroup
},
5423 {"SAMR_QUERYGROUPINFO", NDR_SAMR_QUERYGROUPINFO
, api_samr_QueryGroupInfo
},
5424 {"SAMR_SETGROUPINFO", NDR_SAMR_SETGROUPINFO
, api_samr_SetGroupInfo
},
5425 {"SAMR_ADDGROUPMEMBER", NDR_SAMR_ADDGROUPMEMBER
, api_samr_AddGroupMember
},
5426 {"SAMR_DELETEDOMAINGROUP", NDR_SAMR_DELETEDOMAINGROUP
, api_samr_DeleteDomainGroup
},
5427 {"SAMR_DELETEGROUPMEMBER", NDR_SAMR_DELETEGROUPMEMBER
, api_samr_DeleteGroupMember
},
5428 {"SAMR_QUERYGROUPMEMBER", NDR_SAMR_QUERYGROUPMEMBER
, api_samr_QueryGroupMember
},
5429 {"SAMR_SETMEMBERATTRIBUTESOFGROUP", NDR_SAMR_SETMEMBERATTRIBUTESOFGROUP
, api_samr_SetMemberAttributesOfGroup
},
5430 {"SAMR_OPENALIAS", NDR_SAMR_OPENALIAS
, api_samr_OpenAlias
},
5431 {"SAMR_QUERYALIASINFO", NDR_SAMR_QUERYALIASINFO
, api_samr_QueryAliasInfo
},
5432 {"SAMR_SETALIASINFO", NDR_SAMR_SETALIASINFO
, api_samr_SetAliasInfo
},
5433 {"SAMR_DELETEDOMALIAS", NDR_SAMR_DELETEDOMALIAS
, api_samr_DeleteDomAlias
},
5434 {"SAMR_ADDALIASMEMBER", NDR_SAMR_ADDALIASMEMBER
, api_samr_AddAliasMember
},
5435 {"SAMR_DELETEALIASMEMBER", NDR_SAMR_DELETEALIASMEMBER
, api_samr_DeleteAliasMember
},
5436 {"SAMR_GETMEMBERSINALIAS", NDR_SAMR_GETMEMBERSINALIAS
, api_samr_GetMembersInAlias
},
5437 {"SAMR_OPENUSER", NDR_SAMR_OPENUSER
, api_samr_OpenUser
},
5438 {"SAMR_DELETEUSER", NDR_SAMR_DELETEUSER
, api_samr_DeleteUser
},
5439 {"SAMR_QUERYUSERINFO", NDR_SAMR_QUERYUSERINFO
, api_samr_QueryUserInfo
},
5440 {"SAMR_SETUSERINFO", NDR_SAMR_SETUSERINFO
, api_samr_SetUserInfo
},
5441 {"SAMR_CHANGEPASSWORDUSER", NDR_SAMR_CHANGEPASSWORDUSER
, api_samr_ChangePasswordUser
},
5442 {"SAMR_GETGROUPSFORUSER", NDR_SAMR_GETGROUPSFORUSER
, api_samr_GetGroupsForUser
},
5443 {"SAMR_QUERYDISPLAYINFO", NDR_SAMR_QUERYDISPLAYINFO
, api_samr_QueryDisplayInfo
},
5444 {"SAMR_GETDISPLAYENUMERATIONINDEX", NDR_SAMR_GETDISPLAYENUMERATIONINDEX
, api_samr_GetDisplayEnumerationIndex
},
5445 {"SAMR_TESTPRIVATEFUNCTIONSDOMAIN", NDR_SAMR_TESTPRIVATEFUNCTIONSDOMAIN
, api_samr_TestPrivateFunctionsDomain
},
5446 {"SAMR_TESTPRIVATEFUNCTIONSUSER", NDR_SAMR_TESTPRIVATEFUNCTIONSUSER
, api_samr_TestPrivateFunctionsUser
},
5447 {"SAMR_GETUSERPWINFO", NDR_SAMR_GETUSERPWINFO
, api_samr_GetUserPwInfo
},
5448 {"SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN", NDR_SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN
, api_samr_RemoveMemberFromForeignDomain
},
5449 {"SAMR_QUERYDOMAININFO2", NDR_SAMR_QUERYDOMAININFO2
, api_samr_QueryDomainInfo2
},
5450 {"SAMR_QUERYUSERINFO2", NDR_SAMR_QUERYUSERINFO2
, api_samr_QueryUserInfo2
},
5451 {"SAMR_QUERYDISPLAYINFO2", NDR_SAMR_QUERYDISPLAYINFO2
, api_samr_QueryDisplayInfo2
},
5452 {"SAMR_GETDISPLAYENUMERATIONINDEX2", NDR_SAMR_GETDISPLAYENUMERATIONINDEX2
, api_samr_GetDisplayEnumerationIndex2
},
5453 {"SAMR_CREATEUSER2", NDR_SAMR_CREATEUSER2
, api_samr_CreateUser2
},
5454 {"SAMR_QUERYDISPLAYINFO3", NDR_SAMR_QUERYDISPLAYINFO3
, api_samr_QueryDisplayInfo3
},
5455 {"SAMR_ADDMULTIPLEMEMBERSTOALIAS", NDR_SAMR_ADDMULTIPLEMEMBERSTOALIAS
, api_samr_AddMultipleMembersToAlias
},
5456 {"SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS", NDR_SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS
, api_samr_RemoveMultipleMembersFromAlias
},
5457 {"SAMR_OEMCHANGEPASSWORDUSER2", NDR_SAMR_OEMCHANGEPASSWORDUSER2
, api_samr_OemChangePasswordUser2
},
5458 {"SAMR_CHANGEPASSWORDUSER2", NDR_SAMR_CHANGEPASSWORDUSER2
, api_samr_ChangePasswordUser2
},
5459 {"SAMR_GETDOMPWINFO", NDR_SAMR_GETDOMPWINFO
, api_samr_GetDomPwInfo
},
5460 {"SAMR_CONNECT2", NDR_SAMR_CONNECT2
, api_samr_Connect2
},
5461 {"SAMR_SETUSERINFO2", NDR_SAMR_SETUSERINFO2
, api_samr_SetUserInfo2
},
5462 {"SAMR_SETBOOTKEYINFORMATION", NDR_SAMR_SETBOOTKEYINFORMATION
, api_samr_SetBootKeyInformation
},
5463 {"SAMR_GETBOOTKEYINFORMATION", NDR_SAMR_GETBOOTKEYINFORMATION
, api_samr_GetBootKeyInformation
},
5464 {"SAMR_CONNECT3", NDR_SAMR_CONNECT3
, api_samr_Connect3
},
5465 {"SAMR_CONNECT4", NDR_SAMR_CONNECT4
, api_samr_Connect4
},
5466 {"SAMR_CHANGEPASSWORDUSER3", NDR_SAMR_CHANGEPASSWORDUSER3
, api_samr_ChangePasswordUser3
},
5467 {"SAMR_CONNECT5", NDR_SAMR_CONNECT5
, api_samr_Connect5
},
5468 {"SAMR_RIDTOSID", NDR_SAMR_RIDTOSID
, api_samr_RidToSid
},
5469 {"SAMR_SETDSRMPASSWORD", NDR_SAMR_SETDSRMPASSWORD
, api_samr_SetDsrmPassword
},
5470 {"SAMR_VALIDATEPASSWORD", NDR_SAMR_VALIDATEPASSWORD
, api_samr_ValidatePassword
},
5473 void samr_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
5475 *fns
= api_samr_cmds
;
5476 *n_fns
= sizeof(api_samr_cmds
) / sizeof(struct api_struct
);
5479 NTSTATUS
rpc_samr_init(void)
5481 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION
, "samr", "samr", &ndr_table_samr
.syntax_id
, api_samr_cmds
, sizeof(api_samr_cmds
) / sizeof(struct api_struct
));