2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "librpc/gen_ndr/srv_wbint.h"
9 static bool api_wbint_Ping(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
;
18 call
= &ndr_table_wbint
.calls
[NDR_WBINT_PING
];
20 r
= talloc(talloc_tos(), struct wbint_Ping
);
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(wbint_Ping
, r
);
48 r
->out
.out_data
= talloc_zero(r
, uint32_t);
49 if (r
->out
.out_data
== NULL
) {
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(wbint_Ping
, 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_wbint_LookupSid(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
;
96 struct wbint_LookupSid
*r
;
98 call
= &ndr_table_wbint
.calls
[NDR_WBINT_LOOKUPSID
];
100 r
= talloc(talloc_tos(), struct wbint_LookupSid
);
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(wbint_LookupSid
, r
);
128 r
->out
.type
= talloc_zero(r
, enum lsa_SidType
);
129 if (r
->out
.type
== NULL
) {
134 r
->out
.domain
= talloc_zero(r
, const char *);
135 if (r
->out
.domain
== NULL
) {
140 r
->out
.name
= talloc_zero(r
, const char *);
141 if (r
->out
.name
== NULL
) {
146 r
->out
.result
= _wbint_LookupSid(p
, r
);
148 if (p
->rng_fault_state
) {
150 /* Return true here, srv_pipe_hnd.c will take care */
154 if (DEBUGLEVEL
>= 10) {
155 NDR_PRINT_OUT_DEBUG(wbint_LookupSid
, r
);
158 push
= ndr_push_init_ctx(r
, NULL
);
164 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
165 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
170 blob
= ndr_push_blob(push
);
171 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
181 static bool api_wbint_LookupName(pipes_struct
*p
)
183 const struct ndr_interface_call
*call
;
184 struct ndr_pull
*pull
;
185 struct ndr_push
*push
;
186 enum ndr_err_code ndr_err
;
188 struct wbint_LookupName
*r
;
190 call
= &ndr_table_wbint
.calls
[NDR_WBINT_LOOKUPNAME
];
192 r
= talloc(talloc_tos(), struct wbint_LookupName
);
197 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
202 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
208 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
209 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
210 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
215 if (DEBUGLEVEL
>= 10) {
216 NDR_PRINT_IN_DEBUG(wbint_LookupName
, r
);
220 r
->out
.type
= talloc_zero(r
, enum lsa_SidType
);
221 if (r
->out
.type
== NULL
) {
226 r
->out
.sid
= talloc_zero(r
, struct dom_sid
);
227 if (r
->out
.sid
== NULL
) {
232 r
->out
.result
= _wbint_LookupName(p
, r
);
234 if (p
->rng_fault_state
) {
236 /* Return true here, srv_pipe_hnd.c will take care */
240 if (DEBUGLEVEL
>= 10) {
241 NDR_PRINT_OUT_DEBUG(wbint_LookupName
, r
);
244 push
= ndr_push_init_ctx(r
, NULL
);
250 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
251 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
256 blob
= ndr_push_blob(push
);
257 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
267 static bool api_wbint_Sid2Uid(pipes_struct
*p
)
269 const struct ndr_interface_call
*call
;
270 struct ndr_pull
*pull
;
271 struct ndr_push
*push
;
272 enum ndr_err_code ndr_err
;
274 struct wbint_Sid2Uid
*r
;
276 call
= &ndr_table_wbint
.calls
[NDR_WBINT_SID2UID
];
278 r
= talloc(talloc_tos(), struct wbint_Sid2Uid
);
283 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
288 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
294 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
295 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
296 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
301 if (DEBUGLEVEL
>= 10) {
302 NDR_PRINT_IN_DEBUG(wbint_Sid2Uid
, r
);
306 r
->out
.uid
= talloc_zero(r
, uint64_t);
307 if (r
->out
.uid
== NULL
) {
312 r
->out
.result
= _wbint_Sid2Uid(p
, r
);
314 if (p
->rng_fault_state
) {
316 /* Return true here, srv_pipe_hnd.c will take care */
320 if (DEBUGLEVEL
>= 10) {
321 NDR_PRINT_OUT_DEBUG(wbint_Sid2Uid
, r
);
324 push
= ndr_push_init_ctx(r
, NULL
);
330 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
331 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
336 blob
= ndr_push_blob(push
);
337 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
347 static bool api_wbint_Sid2Gid(pipes_struct
*p
)
349 const struct ndr_interface_call
*call
;
350 struct ndr_pull
*pull
;
351 struct ndr_push
*push
;
352 enum ndr_err_code ndr_err
;
354 struct wbint_Sid2Gid
*r
;
356 call
= &ndr_table_wbint
.calls
[NDR_WBINT_SID2GID
];
358 r
= talloc(talloc_tos(), struct wbint_Sid2Gid
);
363 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
368 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
374 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
375 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
376 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
381 if (DEBUGLEVEL
>= 10) {
382 NDR_PRINT_IN_DEBUG(wbint_Sid2Gid
, r
);
386 r
->out
.gid
= talloc_zero(r
, uint64_t);
387 if (r
->out
.gid
== NULL
) {
392 r
->out
.result
= _wbint_Sid2Gid(p
, r
);
394 if (p
->rng_fault_state
) {
396 /* Return true here, srv_pipe_hnd.c will take care */
400 if (DEBUGLEVEL
>= 10) {
401 NDR_PRINT_OUT_DEBUG(wbint_Sid2Gid
, r
);
404 push
= ndr_push_init_ctx(r
, NULL
);
410 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
411 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
416 blob
= ndr_push_blob(push
);
417 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
427 static bool api_wbint_Uid2Sid(pipes_struct
*p
)
429 const struct ndr_interface_call
*call
;
430 struct ndr_pull
*pull
;
431 struct ndr_push
*push
;
432 enum ndr_err_code ndr_err
;
434 struct wbint_Uid2Sid
*r
;
436 call
= &ndr_table_wbint
.calls
[NDR_WBINT_UID2SID
];
438 r
= talloc(talloc_tos(), struct wbint_Uid2Sid
);
443 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
448 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
454 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
455 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
456 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
461 if (DEBUGLEVEL
>= 10) {
462 NDR_PRINT_IN_DEBUG(wbint_Uid2Sid
, r
);
466 r
->out
.sid
= talloc_zero(r
, struct dom_sid
);
467 if (r
->out
.sid
== NULL
) {
472 r
->out
.result
= _wbint_Uid2Sid(p
, r
);
474 if (p
->rng_fault_state
) {
476 /* Return true here, srv_pipe_hnd.c will take care */
480 if (DEBUGLEVEL
>= 10) {
481 NDR_PRINT_OUT_DEBUG(wbint_Uid2Sid
, r
);
484 push
= ndr_push_init_ctx(r
, NULL
);
490 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
491 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
496 blob
= ndr_push_blob(push
);
497 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
507 static bool api_wbint_Gid2Sid(pipes_struct
*p
)
509 const struct ndr_interface_call
*call
;
510 struct ndr_pull
*pull
;
511 struct ndr_push
*push
;
512 enum ndr_err_code ndr_err
;
514 struct wbint_Gid2Sid
*r
;
516 call
= &ndr_table_wbint
.calls
[NDR_WBINT_GID2SID
];
518 r
= talloc(talloc_tos(), struct wbint_Gid2Sid
);
523 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
528 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
534 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
535 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
536 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
541 if (DEBUGLEVEL
>= 10) {
542 NDR_PRINT_IN_DEBUG(wbint_Gid2Sid
, r
);
546 r
->out
.sid
= talloc_zero(r
, struct dom_sid
);
547 if (r
->out
.sid
== NULL
) {
552 r
->out
.result
= _wbint_Gid2Sid(p
, r
);
554 if (p
->rng_fault_state
) {
556 /* Return true here, srv_pipe_hnd.c will take care */
560 if (DEBUGLEVEL
>= 10) {
561 NDR_PRINT_OUT_DEBUG(wbint_Gid2Sid
, r
);
564 push
= ndr_push_init_ctx(r
, NULL
);
570 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
571 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
576 blob
= ndr_push_blob(push
);
577 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
587 static bool api_wbint_AllocateUid(pipes_struct
*p
)
589 const struct ndr_interface_call
*call
;
590 struct ndr_pull
*pull
;
591 struct ndr_push
*push
;
592 enum ndr_err_code ndr_err
;
594 struct wbint_AllocateUid
*r
;
596 call
= &ndr_table_wbint
.calls
[NDR_WBINT_ALLOCATEUID
];
598 r
= talloc(talloc_tos(), struct wbint_AllocateUid
);
603 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
608 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
614 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
615 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
616 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
621 if (DEBUGLEVEL
>= 10) {
622 NDR_PRINT_IN_DEBUG(wbint_AllocateUid
, r
);
626 r
->out
.uid
= talloc_zero(r
, uint64_t);
627 if (r
->out
.uid
== NULL
) {
632 r
->out
.result
= _wbint_AllocateUid(p
, r
);
634 if (p
->rng_fault_state
) {
636 /* Return true here, srv_pipe_hnd.c will take care */
640 if (DEBUGLEVEL
>= 10) {
641 NDR_PRINT_OUT_DEBUG(wbint_AllocateUid
, r
);
644 push
= ndr_push_init_ctx(r
, NULL
);
650 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
651 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
656 blob
= ndr_push_blob(push
);
657 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
667 static bool api_wbint_AllocateGid(pipes_struct
*p
)
669 const struct ndr_interface_call
*call
;
670 struct ndr_pull
*pull
;
671 struct ndr_push
*push
;
672 enum ndr_err_code ndr_err
;
674 struct wbint_AllocateGid
*r
;
676 call
= &ndr_table_wbint
.calls
[NDR_WBINT_ALLOCATEGID
];
678 r
= talloc(talloc_tos(), struct wbint_AllocateGid
);
683 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
688 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
694 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
695 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
696 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
701 if (DEBUGLEVEL
>= 10) {
702 NDR_PRINT_IN_DEBUG(wbint_AllocateGid
, r
);
706 r
->out
.gid
= talloc_zero(r
, uint64_t);
707 if (r
->out
.gid
== NULL
) {
712 r
->out
.result
= _wbint_AllocateGid(p
, r
);
714 if (p
->rng_fault_state
) {
716 /* Return true here, srv_pipe_hnd.c will take care */
720 if (DEBUGLEVEL
>= 10) {
721 NDR_PRINT_OUT_DEBUG(wbint_AllocateGid
, r
);
724 push
= ndr_push_init_ctx(r
, NULL
);
730 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
731 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
736 blob
= ndr_push_blob(push
);
737 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
747 static bool api_wbint_QueryUser(pipes_struct
*p
)
749 const struct ndr_interface_call
*call
;
750 struct ndr_pull
*pull
;
751 struct ndr_push
*push
;
752 enum ndr_err_code ndr_err
;
754 struct wbint_QueryUser
*r
;
756 call
= &ndr_table_wbint
.calls
[NDR_WBINT_QUERYUSER
];
758 r
= talloc(talloc_tos(), struct wbint_QueryUser
);
763 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
768 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
774 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
775 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
776 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
781 if (DEBUGLEVEL
>= 10) {
782 NDR_PRINT_IN_DEBUG(wbint_QueryUser
, r
);
786 r
->out
.info
= talloc_zero(r
, struct wbint_userinfo
);
787 if (r
->out
.info
== NULL
) {
792 r
->out
.result
= _wbint_QueryUser(p
, r
);
794 if (p
->rng_fault_state
) {
796 /* Return true here, srv_pipe_hnd.c will take care */
800 if (DEBUGLEVEL
>= 10) {
801 NDR_PRINT_OUT_DEBUG(wbint_QueryUser
, r
);
804 push
= ndr_push_init_ctx(r
, NULL
);
810 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
811 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
816 blob
= ndr_push_blob(push
);
817 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
827 static bool api_wbint_LookupUserAliases(pipes_struct
*p
)
829 const struct ndr_interface_call
*call
;
830 struct ndr_pull
*pull
;
831 struct ndr_push
*push
;
832 enum ndr_err_code ndr_err
;
834 struct wbint_LookupUserAliases
*r
;
836 call
= &ndr_table_wbint
.calls
[NDR_WBINT_LOOKUPUSERALIASES
];
838 r
= talloc(talloc_tos(), struct wbint_LookupUserAliases
);
843 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
848 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
854 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
855 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
856 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
861 if (DEBUGLEVEL
>= 10) {
862 NDR_PRINT_IN_DEBUG(wbint_LookupUserAliases
, r
);
866 r
->out
.rids
= talloc_zero(r
, struct wbint_RidArray
);
867 if (r
->out
.rids
== NULL
) {
872 r
->out
.result
= _wbint_LookupUserAliases(p
, r
);
874 if (p
->rng_fault_state
) {
876 /* Return true here, srv_pipe_hnd.c will take care */
880 if (DEBUGLEVEL
>= 10) {
881 NDR_PRINT_OUT_DEBUG(wbint_LookupUserAliases
, r
);
884 push
= ndr_push_init_ctx(r
, NULL
);
890 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
891 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
896 blob
= ndr_push_blob(push
);
897 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
907 static bool api_wbint_LookupUserGroups(pipes_struct
*p
)
909 const struct ndr_interface_call
*call
;
910 struct ndr_pull
*pull
;
911 struct ndr_push
*push
;
912 enum ndr_err_code ndr_err
;
914 struct wbint_LookupUserGroups
*r
;
916 call
= &ndr_table_wbint
.calls
[NDR_WBINT_LOOKUPUSERGROUPS
];
918 r
= talloc(talloc_tos(), struct wbint_LookupUserGroups
);
923 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
928 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
934 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
935 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
936 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
941 if (DEBUGLEVEL
>= 10) {
942 NDR_PRINT_IN_DEBUG(wbint_LookupUserGroups
, r
);
946 r
->out
.sids
= talloc_zero(r
, struct wbint_SidArray
);
947 if (r
->out
.sids
== NULL
) {
952 r
->out
.result
= _wbint_LookupUserGroups(p
, r
);
954 if (p
->rng_fault_state
) {
956 /* Return true here, srv_pipe_hnd.c will take care */
960 if (DEBUGLEVEL
>= 10) {
961 NDR_PRINT_OUT_DEBUG(wbint_LookupUserGroups
, r
);
964 push
= ndr_push_init_ctx(r
, NULL
);
970 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
971 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
976 blob
= ndr_push_blob(push
);
977 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
987 static bool api_wbint_QuerySequenceNumber(pipes_struct
*p
)
989 const struct ndr_interface_call
*call
;
990 struct ndr_pull
*pull
;
991 struct ndr_push
*push
;
992 enum ndr_err_code ndr_err
;
994 struct wbint_QuerySequenceNumber
*r
;
996 call
= &ndr_table_wbint
.calls
[NDR_WBINT_QUERYSEQUENCENUMBER
];
998 r
= talloc(talloc_tos(), struct wbint_QuerySequenceNumber
);
1003 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1008 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1014 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1015 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1016 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1021 if (DEBUGLEVEL
>= 10) {
1022 NDR_PRINT_IN_DEBUG(wbint_QuerySequenceNumber
, r
);
1025 ZERO_STRUCT(r
->out
);
1026 r
->out
.sequence
= talloc_zero(r
, uint32_t);
1027 if (r
->out
.sequence
== NULL
) {
1032 r
->out
.result
= _wbint_QuerySequenceNumber(p
, r
);
1034 if (p
->rng_fault_state
) {
1036 /* Return true here, srv_pipe_hnd.c will take care */
1040 if (DEBUGLEVEL
>= 10) {
1041 NDR_PRINT_OUT_DEBUG(wbint_QuerySequenceNumber
, r
);
1044 push
= ndr_push_init_ctx(r
, NULL
);
1050 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1051 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1056 blob
= ndr_push_blob(push
);
1057 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1067 static bool api_wbint_LookupGroupMembers(pipes_struct
*p
)
1069 const struct ndr_interface_call
*call
;
1070 struct ndr_pull
*pull
;
1071 struct ndr_push
*push
;
1072 enum ndr_err_code ndr_err
;
1074 struct wbint_LookupGroupMembers
*r
;
1076 call
= &ndr_table_wbint
.calls
[NDR_WBINT_LOOKUPGROUPMEMBERS
];
1078 r
= talloc(talloc_tos(), struct wbint_LookupGroupMembers
);
1083 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1088 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1094 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1095 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1096 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1101 if (DEBUGLEVEL
>= 10) {
1102 NDR_PRINT_IN_DEBUG(wbint_LookupGroupMembers
, r
);
1105 ZERO_STRUCT(r
->out
);
1106 r
->out
.members
= talloc_zero(r
, struct wbint_Principals
);
1107 if (r
->out
.members
== NULL
) {
1112 r
->out
.result
= _wbint_LookupGroupMembers(p
, r
);
1114 if (p
->rng_fault_state
) {
1116 /* Return true here, srv_pipe_hnd.c will take care */
1120 if (DEBUGLEVEL
>= 10) {
1121 NDR_PRINT_OUT_DEBUG(wbint_LookupGroupMembers
, r
);
1124 push
= ndr_push_init_ctx(r
, NULL
);
1130 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1131 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1136 blob
= ndr_push_blob(push
);
1137 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1147 static bool api_wbint_QueryUserList(pipes_struct
*p
)
1149 const struct ndr_interface_call
*call
;
1150 struct ndr_pull
*pull
;
1151 struct ndr_push
*push
;
1152 enum ndr_err_code ndr_err
;
1154 struct wbint_QueryUserList
*r
;
1156 call
= &ndr_table_wbint
.calls
[NDR_WBINT_QUERYUSERLIST
];
1158 r
= talloc(talloc_tos(), struct wbint_QueryUserList
);
1163 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1168 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1174 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1175 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1176 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1181 if (DEBUGLEVEL
>= 10) {
1182 NDR_PRINT_IN_DEBUG(wbint_QueryUserList
, r
);
1185 ZERO_STRUCT(r
->out
);
1186 r
->out
.users
= talloc_zero(r
, struct wbint_userinfos
);
1187 if (r
->out
.users
== NULL
) {
1192 r
->out
.result
= _wbint_QueryUserList(p
, r
);
1194 if (p
->rng_fault_state
) {
1196 /* Return true here, srv_pipe_hnd.c will take care */
1200 if (DEBUGLEVEL
>= 10) {
1201 NDR_PRINT_OUT_DEBUG(wbint_QueryUserList
, r
);
1204 push
= ndr_push_init_ctx(r
, NULL
);
1210 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1211 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1216 blob
= ndr_push_blob(push
);
1217 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1227 static bool api_wbint_QueryGroupList(pipes_struct
*p
)
1229 const struct ndr_interface_call
*call
;
1230 struct ndr_pull
*pull
;
1231 struct ndr_push
*push
;
1232 enum ndr_err_code ndr_err
;
1234 struct wbint_QueryGroupList
*r
;
1236 call
= &ndr_table_wbint
.calls
[NDR_WBINT_QUERYGROUPLIST
];
1238 r
= talloc(talloc_tos(), struct wbint_QueryGroupList
);
1243 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1248 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1254 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1255 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1256 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1261 if (DEBUGLEVEL
>= 10) {
1262 NDR_PRINT_IN_DEBUG(wbint_QueryGroupList
, r
);
1265 ZERO_STRUCT(r
->out
);
1266 r
->out
.groups
= talloc_zero(r
, struct wbint_Principals
);
1267 if (r
->out
.groups
== NULL
) {
1272 r
->out
.result
= _wbint_QueryGroupList(p
, r
);
1274 if (p
->rng_fault_state
) {
1276 /* Return true here, srv_pipe_hnd.c will take care */
1280 if (DEBUGLEVEL
>= 10) {
1281 NDR_PRINT_OUT_DEBUG(wbint_QueryGroupList
, r
);
1284 push
= ndr_push_init_ctx(r
, NULL
);
1290 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1291 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1296 blob
= ndr_push_blob(push
);
1297 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1307 static bool api_wbint_DsGetDcName(pipes_struct
*p
)
1309 const struct ndr_interface_call
*call
;
1310 struct ndr_pull
*pull
;
1311 struct ndr_push
*push
;
1312 enum ndr_err_code ndr_err
;
1314 struct wbint_DsGetDcName
*r
;
1316 call
= &ndr_table_wbint
.calls
[NDR_WBINT_DSGETDCNAME
];
1318 r
= talloc(talloc_tos(), struct wbint_DsGetDcName
);
1323 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1328 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1334 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1335 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1336 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1341 if (DEBUGLEVEL
>= 10) {
1342 NDR_PRINT_IN_DEBUG(wbint_DsGetDcName
, r
);
1345 ZERO_STRUCT(r
->out
);
1346 r
->out
.dc_info
= talloc_zero(r
, struct netr_DsRGetDCNameInfo
*);
1347 if (r
->out
.dc_info
== NULL
) {
1352 r
->out
.result
= _wbint_DsGetDcName(p
, r
);
1354 if (p
->rng_fault_state
) {
1356 /* Return true here, srv_pipe_hnd.c will take care */
1360 if (DEBUGLEVEL
>= 10) {
1361 NDR_PRINT_OUT_DEBUG(wbint_DsGetDcName
, r
);
1364 push
= ndr_push_init_ctx(r
, NULL
);
1370 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1371 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1376 blob
= ndr_push_blob(push
);
1377 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1387 static bool api_wbint_LookupRids(pipes_struct
*p
)
1389 const struct ndr_interface_call
*call
;
1390 struct ndr_pull
*pull
;
1391 struct ndr_push
*push
;
1392 enum ndr_err_code ndr_err
;
1394 struct wbint_LookupRids
*r
;
1396 call
= &ndr_table_wbint
.calls
[NDR_WBINT_LOOKUPRIDS
];
1398 r
= talloc(talloc_tos(), struct wbint_LookupRids
);
1403 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1408 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1414 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1415 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1416 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1421 if (DEBUGLEVEL
>= 10) {
1422 NDR_PRINT_IN_DEBUG(wbint_LookupRids
, r
);
1425 ZERO_STRUCT(r
->out
);
1426 r
->out
.names
= talloc_zero(r
, struct wbint_Principals
);
1427 if (r
->out
.names
== NULL
) {
1432 r
->out
.result
= _wbint_LookupRids(p
, r
);
1434 if (p
->rng_fault_state
) {
1436 /* Return true here, srv_pipe_hnd.c will take care */
1440 if (DEBUGLEVEL
>= 10) {
1441 NDR_PRINT_OUT_DEBUG(wbint_LookupRids
, r
);
1444 push
= ndr_push_init_ctx(r
, NULL
);
1450 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1451 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1456 blob
= ndr_push_blob(push
);
1457 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1467 static bool api_wbint_CheckMachineAccount(pipes_struct
*p
)
1469 const struct ndr_interface_call
*call
;
1470 struct ndr_pull
*pull
;
1471 struct ndr_push
*push
;
1472 enum ndr_err_code ndr_err
;
1474 struct wbint_CheckMachineAccount
*r
;
1476 call
= &ndr_table_wbint
.calls
[NDR_WBINT_CHECKMACHINEACCOUNT
];
1478 r
= talloc(talloc_tos(), struct wbint_CheckMachineAccount
);
1483 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1488 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1494 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1495 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1496 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1501 if (DEBUGLEVEL
>= 10) {
1502 NDR_PRINT_IN_DEBUG(wbint_CheckMachineAccount
, r
);
1505 r
->out
.result
= _wbint_CheckMachineAccount(p
, r
);
1507 if (p
->rng_fault_state
) {
1509 /* Return true here, srv_pipe_hnd.c will take care */
1513 if (DEBUGLEVEL
>= 10) {
1514 NDR_PRINT_OUT_DEBUG(wbint_CheckMachineAccount
, r
);
1517 push
= ndr_push_init_ctx(r
, NULL
);
1523 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1524 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1529 blob
= ndr_push_blob(push
);
1530 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1540 static bool api_wbint_ChangeMachineAccount(pipes_struct
*p
)
1542 const struct ndr_interface_call
*call
;
1543 struct ndr_pull
*pull
;
1544 struct ndr_push
*push
;
1545 enum ndr_err_code ndr_err
;
1547 struct wbint_ChangeMachineAccount
*r
;
1549 call
= &ndr_table_wbint
.calls
[NDR_WBINT_CHANGEMACHINEACCOUNT
];
1551 r
= talloc(talloc_tos(), struct wbint_ChangeMachineAccount
);
1556 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1561 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1567 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1568 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1569 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1574 if (DEBUGLEVEL
>= 10) {
1575 NDR_PRINT_IN_DEBUG(wbint_ChangeMachineAccount
, r
);
1578 r
->out
.result
= _wbint_ChangeMachineAccount(p
, r
);
1580 if (p
->rng_fault_state
) {
1582 /* Return true here, srv_pipe_hnd.c will take care */
1586 if (DEBUGLEVEL
>= 10) {
1587 NDR_PRINT_OUT_DEBUG(wbint_ChangeMachineAccount
, r
);
1590 push
= ndr_push_init_ctx(r
, NULL
);
1596 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1597 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1602 blob
= ndr_push_blob(push
);
1603 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1613 static bool api_wbint_SetMapping(pipes_struct
*p
)
1615 const struct ndr_interface_call
*call
;
1616 struct ndr_pull
*pull
;
1617 struct ndr_push
*push
;
1618 enum ndr_err_code ndr_err
;
1620 struct wbint_SetMapping
*r
;
1622 call
= &ndr_table_wbint
.calls
[NDR_WBINT_SETMAPPING
];
1624 r
= talloc(talloc_tos(), struct wbint_SetMapping
);
1629 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1634 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1640 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1641 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1642 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1647 if (DEBUGLEVEL
>= 10) {
1648 NDR_PRINT_IN_DEBUG(wbint_SetMapping
, r
);
1651 r
->out
.result
= _wbint_SetMapping(p
, r
);
1653 if (p
->rng_fault_state
) {
1655 /* Return true here, srv_pipe_hnd.c will take care */
1659 if (DEBUGLEVEL
>= 10) {
1660 NDR_PRINT_OUT_DEBUG(wbint_SetMapping
, r
);
1663 push
= ndr_push_init_ctx(r
, NULL
);
1669 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1670 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1675 blob
= ndr_push_blob(push
);
1676 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1686 static bool api_wbint_RemoveMapping(pipes_struct
*p
)
1688 const struct ndr_interface_call
*call
;
1689 struct ndr_pull
*pull
;
1690 struct ndr_push
*push
;
1691 enum ndr_err_code ndr_err
;
1693 struct wbint_RemoveMapping
*r
;
1695 call
= &ndr_table_wbint
.calls
[NDR_WBINT_REMOVEMAPPING
];
1697 r
= talloc(talloc_tos(), struct wbint_RemoveMapping
);
1702 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1707 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1713 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1714 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1715 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1720 if (DEBUGLEVEL
>= 10) {
1721 NDR_PRINT_IN_DEBUG(wbint_RemoveMapping
, r
);
1724 r
->out
.result
= _wbint_RemoveMapping(p
, r
);
1726 if (p
->rng_fault_state
) {
1728 /* Return true here, srv_pipe_hnd.c will take care */
1732 if (DEBUGLEVEL
>= 10) {
1733 NDR_PRINT_OUT_DEBUG(wbint_RemoveMapping
, r
);
1736 push
= ndr_push_init_ctx(r
, NULL
);
1742 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1743 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1748 blob
= ndr_push_blob(push
);
1749 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1759 static bool api_wbint_SetHWM(pipes_struct
*p
)
1761 const struct ndr_interface_call
*call
;
1762 struct ndr_pull
*pull
;
1763 struct ndr_push
*push
;
1764 enum ndr_err_code ndr_err
;
1766 struct wbint_SetHWM
*r
;
1768 call
= &ndr_table_wbint
.calls
[NDR_WBINT_SETHWM
];
1770 r
= talloc(talloc_tos(), struct wbint_SetHWM
);
1775 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1780 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1786 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1787 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1788 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1793 if (DEBUGLEVEL
>= 10) {
1794 NDR_PRINT_IN_DEBUG(wbint_SetHWM
, r
);
1797 r
->out
.result
= _wbint_SetHWM(p
, r
);
1799 if (p
->rng_fault_state
) {
1801 /* Return true here, srv_pipe_hnd.c will take care */
1805 if (DEBUGLEVEL
>= 10) {
1806 NDR_PRINT_OUT_DEBUG(wbint_SetHWM
, r
);
1809 push
= ndr_push_init_ctx(r
, NULL
);
1815 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1816 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1821 blob
= ndr_push_blob(push
);
1822 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1834 static struct api_struct api_wbint_cmds
[] =
1836 {"WBINT_PING", NDR_WBINT_PING
, api_wbint_Ping
},
1837 {"WBINT_LOOKUPSID", NDR_WBINT_LOOKUPSID
, api_wbint_LookupSid
},
1838 {"WBINT_LOOKUPNAME", NDR_WBINT_LOOKUPNAME
, api_wbint_LookupName
},
1839 {"WBINT_SID2UID", NDR_WBINT_SID2UID
, api_wbint_Sid2Uid
},
1840 {"WBINT_SID2GID", NDR_WBINT_SID2GID
, api_wbint_Sid2Gid
},
1841 {"WBINT_UID2SID", NDR_WBINT_UID2SID
, api_wbint_Uid2Sid
},
1842 {"WBINT_GID2SID", NDR_WBINT_GID2SID
, api_wbint_Gid2Sid
},
1843 {"WBINT_ALLOCATEUID", NDR_WBINT_ALLOCATEUID
, api_wbint_AllocateUid
},
1844 {"WBINT_ALLOCATEGID", NDR_WBINT_ALLOCATEGID
, api_wbint_AllocateGid
},
1845 {"WBINT_QUERYUSER", NDR_WBINT_QUERYUSER
, api_wbint_QueryUser
},
1846 {"WBINT_LOOKUPUSERALIASES", NDR_WBINT_LOOKUPUSERALIASES
, api_wbint_LookupUserAliases
},
1847 {"WBINT_LOOKUPUSERGROUPS", NDR_WBINT_LOOKUPUSERGROUPS
, api_wbint_LookupUserGroups
},
1848 {"WBINT_QUERYSEQUENCENUMBER", NDR_WBINT_QUERYSEQUENCENUMBER
, api_wbint_QuerySequenceNumber
},
1849 {"WBINT_LOOKUPGROUPMEMBERS", NDR_WBINT_LOOKUPGROUPMEMBERS
, api_wbint_LookupGroupMembers
},
1850 {"WBINT_QUERYUSERLIST", NDR_WBINT_QUERYUSERLIST
, api_wbint_QueryUserList
},
1851 {"WBINT_QUERYGROUPLIST", NDR_WBINT_QUERYGROUPLIST
, api_wbint_QueryGroupList
},
1852 {"WBINT_DSGETDCNAME", NDR_WBINT_DSGETDCNAME
, api_wbint_DsGetDcName
},
1853 {"WBINT_LOOKUPRIDS", NDR_WBINT_LOOKUPRIDS
, api_wbint_LookupRids
},
1854 {"WBINT_CHECKMACHINEACCOUNT", NDR_WBINT_CHECKMACHINEACCOUNT
, api_wbint_CheckMachineAccount
},
1855 {"WBINT_CHANGEMACHINEACCOUNT", NDR_WBINT_CHANGEMACHINEACCOUNT
, api_wbint_ChangeMachineAccount
},
1856 {"WBINT_SETMAPPING", NDR_WBINT_SETMAPPING
, api_wbint_SetMapping
},
1857 {"WBINT_REMOVEMAPPING", NDR_WBINT_REMOVEMAPPING
, api_wbint_RemoveMapping
},
1858 {"WBINT_SETHWM", NDR_WBINT_SETHWM
, api_wbint_SetHWM
},
1861 void wbint_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
1863 *fns
= api_wbint_cmds
;
1864 *n_fns
= sizeof(api_wbint_cmds
) / sizeof(struct api_struct
);
1867 NTSTATUS
rpc_wbint_dispatch(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, const struct ndr_interface_table
*table
, uint32_t opnum
, void *_r
)
1869 if (cli
->pipes_struct
== NULL
) {
1870 return NT_STATUS_INVALID_PARAMETER
;
1875 case NDR_WBINT_PING
: {
1876 struct wbint_Ping
*r
= (struct wbint_Ping
*)_r
;
1877 ZERO_STRUCT(r
->out
);
1878 r
->out
.out_data
= talloc_zero(mem_ctx
, uint32_t);
1879 if (r
->out
.out_data
== NULL
) {
1880 return NT_STATUS_NO_MEMORY
;
1883 _wbint_Ping(cli
->pipes_struct
, r
);
1884 return NT_STATUS_OK
;
1887 case NDR_WBINT_LOOKUPSID
: {
1888 struct wbint_LookupSid
*r
= (struct wbint_LookupSid
*)_r
;
1889 ZERO_STRUCT(r
->out
);
1890 r
->out
.type
= talloc_zero(mem_ctx
, enum lsa_SidType
);
1891 if (r
->out
.type
== NULL
) {
1892 return NT_STATUS_NO_MEMORY
;
1895 r
->out
.domain
= talloc_zero(mem_ctx
, const char *);
1896 if (r
->out
.domain
== NULL
) {
1897 return NT_STATUS_NO_MEMORY
;
1900 r
->out
.name
= talloc_zero(mem_ctx
, const char *);
1901 if (r
->out
.name
== NULL
) {
1902 return NT_STATUS_NO_MEMORY
;
1905 r
->out
.result
= _wbint_LookupSid(cli
->pipes_struct
, r
);
1906 return NT_STATUS_OK
;
1909 case NDR_WBINT_LOOKUPNAME
: {
1910 struct wbint_LookupName
*r
= (struct wbint_LookupName
*)_r
;
1911 ZERO_STRUCT(r
->out
);
1912 r
->out
.type
= talloc_zero(mem_ctx
, enum lsa_SidType
);
1913 if (r
->out
.type
== NULL
) {
1914 return NT_STATUS_NO_MEMORY
;
1917 r
->out
.sid
= talloc_zero(mem_ctx
, struct dom_sid
);
1918 if (r
->out
.sid
== NULL
) {
1919 return NT_STATUS_NO_MEMORY
;
1922 r
->out
.result
= _wbint_LookupName(cli
->pipes_struct
, r
);
1923 return NT_STATUS_OK
;
1926 case NDR_WBINT_SID2UID
: {
1927 struct wbint_Sid2Uid
*r
= (struct wbint_Sid2Uid
*)_r
;
1928 ZERO_STRUCT(r
->out
);
1929 r
->out
.uid
= talloc_zero(mem_ctx
, uint64_t);
1930 if (r
->out
.uid
== NULL
) {
1931 return NT_STATUS_NO_MEMORY
;
1934 r
->out
.result
= _wbint_Sid2Uid(cli
->pipes_struct
, r
);
1935 return NT_STATUS_OK
;
1938 case NDR_WBINT_SID2GID
: {
1939 struct wbint_Sid2Gid
*r
= (struct wbint_Sid2Gid
*)_r
;
1940 ZERO_STRUCT(r
->out
);
1941 r
->out
.gid
= talloc_zero(mem_ctx
, uint64_t);
1942 if (r
->out
.gid
== NULL
) {
1943 return NT_STATUS_NO_MEMORY
;
1946 r
->out
.result
= _wbint_Sid2Gid(cli
->pipes_struct
, r
);
1947 return NT_STATUS_OK
;
1950 case NDR_WBINT_UID2SID
: {
1951 struct wbint_Uid2Sid
*r
= (struct wbint_Uid2Sid
*)_r
;
1952 ZERO_STRUCT(r
->out
);
1953 r
->out
.sid
= talloc_zero(mem_ctx
, struct dom_sid
);
1954 if (r
->out
.sid
== NULL
) {
1955 return NT_STATUS_NO_MEMORY
;
1958 r
->out
.result
= _wbint_Uid2Sid(cli
->pipes_struct
, r
);
1959 return NT_STATUS_OK
;
1962 case NDR_WBINT_GID2SID
: {
1963 struct wbint_Gid2Sid
*r
= (struct wbint_Gid2Sid
*)_r
;
1964 ZERO_STRUCT(r
->out
);
1965 r
->out
.sid
= talloc_zero(mem_ctx
, struct dom_sid
);
1966 if (r
->out
.sid
== NULL
) {
1967 return NT_STATUS_NO_MEMORY
;
1970 r
->out
.result
= _wbint_Gid2Sid(cli
->pipes_struct
, r
);
1971 return NT_STATUS_OK
;
1974 case NDR_WBINT_ALLOCATEUID
: {
1975 struct wbint_AllocateUid
*r
= (struct wbint_AllocateUid
*)_r
;
1976 ZERO_STRUCT(r
->out
);
1977 r
->out
.uid
= talloc_zero(mem_ctx
, uint64_t);
1978 if (r
->out
.uid
== NULL
) {
1979 return NT_STATUS_NO_MEMORY
;
1982 r
->out
.result
= _wbint_AllocateUid(cli
->pipes_struct
, r
);
1983 return NT_STATUS_OK
;
1986 case NDR_WBINT_ALLOCATEGID
: {
1987 struct wbint_AllocateGid
*r
= (struct wbint_AllocateGid
*)_r
;
1988 ZERO_STRUCT(r
->out
);
1989 r
->out
.gid
= talloc_zero(mem_ctx
, uint64_t);
1990 if (r
->out
.gid
== NULL
) {
1991 return NT_STATUS_NO_MEMORY
;
1994 r
->out
.result
= _wbint_AllocateGid(cli
->pipes_struct
, r
);
1995 return NT_STATUS_OK
;
1998 case NDR_WBINT_QUERYUSER
: {
1999 struct wbint_QueryUser
*r
= (struct wbint_QueryUser
*)_r
;
2000 ZERO_STRUCT(r
->out
);
2001 r
->out
.info
= talloc_zero(mem_ctx
, struct wbint_userinfo
);
2002 if (r
->out
.info
== NULL
) {
2003 return NT_STATUS_NO_MEMORY
;
2006 r
->out
.result
= _wbint_QueryUser(cli
->pipes_struct
, r
);
2007 return NT_STATUS_OK
;
2010 case NDR_WBINT_LOOKUPUSERALIASES
: {
2011 struct wbint_LookupUserAliases
*r
= (struct wbint_LookupUserAliases
*)_r
;
2012 ZERO_STRUCT(r
->out
);
2013 r
->out
.rids
= talloc_zero(mem_ctx
, struct wbint_RidArray
);
2014 if (r
->out
.rids
== NULL
) {
2015 return NT_STATUS_NO_MEMORY
;
2018 r
->out
.result
= _wbint_LookupUserAliases(cli
->pipes_struct
, r
);
2019 return NT_STATUS_OK
;
2022 case NDR_WBINT_LOOKUPUSERGROUPS
: {
2023 struct wbint_LookupUserGroups
*r
= (struct wbint_LookupUserGroups
*)_r
;
2024 ZERO_STRUCT(r
->out
);
2025 r
->out
.sids
= talloc_zero(mem_ctx
, struct wbint_SidArray
);
2026 if (r
->out
.sids
== NULL
) {
2027 return NT_STATUS_NO_MEMORY
;
2030 r
->out
.result
= _wbint_LookupUserGroups(cli
->pipes_struct
, r
);
2031 return NT_STATUS_OK
;
2034 case NDR_WBINT_QUERYSEQUENCENUMBER
: {
2035 struct wbint_QuerySequenceNumber
*r
= (struct wbint_QuerySequenceNumber
*)_r
;
2036 ZERO_STRUCT(r
->out
);
2037 r
->out
.sequence
= talloc_zero(mem_ctx
, uint32_t);
2038 if (r
->out
.sequence
== NULL
) {
2039 return NT_STATUS_NO_MEMORY
;
2042 r
->out
.result
= _wbint_QuerySequenceNumber(cli
->pipes_struct
, r
);
2043 return NT_STATUS_OK
;
2046 case NDR_WBINT_LOOKUPGROUPMEMBERS
: {
2047 struct wbint_LookupGroupMembers
*r
= (struct wbint_LookupGroupMembers
*)_r
;
2048 ZERO_STRUCT(r
->out
);
2049 r
->out
.members
= talloc_zero(mem_ctx
, struct wbint_Principals
);
2050 if (r
->out
.members
== NULL
) {
2051 return NT_STATUS_NO_MEMORY
;
2054 r
->out
.result
= _wbint_LookupGroupMembers(cli
->pipes_struct
, r
);
2055 return NT_STATUS_OK
;
2058 case NDR_WBINT_QUERYUSERLIST
: {
2059 struct wbint_QueryUserList
*r
= (struct wbint_QueryUserList
*)_r
;
2060 ZERO_STRUCT(r
->out
);
2061 r
->out
.users
= talloc_zero(mem_ctx
, struct wbint_userinfos
);
2062 if (r
->out
.users
== NULL
) {
2063 return NT_STATUS_NO_MEMORY
;
2066 r
->out
.result
= _wbint_QueryUserList(cli
->pipes_struct
, r
);
2067 return NT_STATUS_OK
;
2070 case NDR_WBINT_QUERYGROUPLIST
: {
2071 struct wbint_QueryGroupList
*r
= (struct wbint_QueryGroupList
*)_r
;
2072 ZERO_STRUCT(r
->out
);
2073 r
->out
.groups
= talloc_zero(mem_ctx
, struct wbint_Principals
);
2074 if (r
->out
.groups
== NULL
) {
2075 return NT_STATUS_NO_MEMORY
;
2078 r
->out
.result
= _wbint_QueryGroupList(cli
->pipes_struct
, r
);
2079 return NT_STATUS_OK
;
2082 case NDR_WBINT_DSGETDCNAME
: {
2083 struct wbint_DsGetDcName
*r
= (struct wbint_DsGetDcName
*)_r
;
2084 ZERO_STRUCT(r
->out
);
2085 r
->out
.dc_info
= talloc_zero(mem_ctx
, struct netr_DsRGetDCNameInfo
*);
2086 if (r
->out
.dc_info
== NULL
) {
2087 return NT_STATUS_NO_MEMORY
;
2090 r
->out
.result
= _wbint_DsGetDcName(cli
->pipes_struct
, r
);
2091 return NT_STATUS_OK
;
2094 case NDR_WBINT_LOOKUPRIDS
: {
2095 struct wbint_LookupRids
*r
= (struct wbint_LookupRids
*)_r
;
2096 ZERO_STRUCT(r
->out
);
2097 r
->out
.names
= talloc_zero(mem_ctx
, struct wbint_Principals
);
2098 if (r
->out
.names
== NULL
) {
2099 return NT_STATUS_NO_MEMORY
;
2102 r
->out
.result
= _wbint_LookupRids(cli
->pipes_struct
, r
);
2103 return NT_STATUS_OK
;
2106 case NDR_WBINT_CHECKMACHINEACCOUNT
: {
2107 struct wbint_CheckMachineAccount
*r
= (struct wbint_CheckMachineAccount
*)_r
;
2108 r
->out
.result
= _wbint_CheckMachineAccount(cli
->pipes_struct
, r
);
2109 return NT_STATUS_OK
;
2112 case NDR_WBINT_CHANGEMACHINEACCOUNT
: {
2113 struct wbint_ChangeMachineAccount
*r
= (struct wbint_ChangeMachineAccount
*)_r
;
2114 r
->out
.result
= _wbint_ChangeMachineAccount(cli
->pipes_struct
, r
);
2115 return NT_STATUS_OK
;
2118 case NDR_WBINT_SETMAPPING
: {
2119 struct wbint_SetMapping
*r
= (struct wbint_SetMapping
*)_r
;
2120 r
->out
.result
= _wbint_SetMapping(cli
->pipes_struct
, r
);
2121 return NT_STATUS_OK
;
2124 case NDR_WBINT_REMOVEMAPPING
: {
2125 struct wbint_RemoveMapping
*r
= (struct wbint_RemoveMapping
*)_r
;
2126 r
->out
.result
= _wbint_RemoveMapping(cli
->pipes_struct
, r
);
2127 return NT_STATUS_OK
;
2130 case NDR_WBINT_SETHWM
: {
2131 struct wbint_SetHWM
*r
= (struct wbint_SetHWM
*)_r
;
2132 r
->out
.result
= _wbint_SetHWM(cli
->pipes_struct
, r
);
2133 return NT_STATUS_OK
;
2137 return NT_STATUS_NOT_IMPLEMENTED
;
2141 NTSTATUS
rpc_wbint_init(void)
2143 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION
, "wbint", "wbint", &ndr_table_wbint
, api_wbint_cmds
, sizeof(api_wbint_cmds
) / sizeof(struct api_struct
));