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_QueryUser(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_QueryUser *r;
596 call = &ndr_table_wbint.calls[NDR_WBINT_QUERYUSER];
598 r = talloc(talloc_tos(), struct wbint_QueryUser);
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_QueryUser, r);
626 r->out.info = talloc_zero(r, struct wbint_userinfo);
627 if (r->out.info == NULL) {
632 r->out.result = _wbint_QueryUser(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_QueryUser, 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_LookupUserAliases(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_LookupUserAliases *r;
676 call = &ndr_table_wbint.calls[NDR_WBINT_LOOKUPUSERALIASES];
678 r = talloc(talloc_tos(), struct wbint_LookupUserAliases);
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_LookupUserAliases, r);
706 r->out.rids = talloc_zero(r, struct wbint_RidArray);
707 if (r->out.rids == NULL) {
712 r->out.result = _wbint_LookupUserAliases(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_LookupUserAliases, 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)) {
749 static struct api_struct api_wbint_cmds[] =
751 {"WBINT_PING", NDR_WBINT_PING, api_wbint_Ping},
752 {"WBINT_LOOKUPSID", NDR_WBINT_LOOKUPSID, api_wbint_LookupSid},
753 {"WBINT_LOOKUPNAME", NDR_WBINT_LOOKUPNAME, api_wbint_LookupName},
754 {"WBINT_SID2UID", NDR_WBINT_SID2UID, api_wbint_Sid2Uid},
755 {"WBINT_SID2GID", NDR_WBINT_SID2GID, api_wbint_Sid2Gid},
756 {"WBINT_UID2SID", NDR_WBINT_UID2SID, api_wbint_Uid2Sid},
757 {"WBINT_GID2SID", NDR_WBINT_GID2SID, api_wbint_Gid2Sid},
758 {"WBINT_QUERYUSER", NDR_WBINT_QUERYUSER, api_wbint_QueryUser},
759 {"WBINT_LOOKUPUSERALIASES", NDR_WBINT_LOOKUPUSERALIASES, api_wbint_LookupUserAliases},
762 void wbint_get_pipe_fns(struct api_struct **fns, int *n_fns)
764 *fns = api_wbint_cmds;
765 *n_fns = sizeof(api_wbint_cmds) / sizeof(struct api_struct);
768 NTSTATUS rpc_wbint_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
770 if (cli->pipes_struct == NULL) {
771 return NT_STATUS_INVALID_PARAMETER;
776 case NDR_WBINT_PING: {
777 struct wbint_Ping *r = (struct wbint_Ping *)_r;
779 r->out.out_data = talloc_zero(mem_ctx, uint32_t);
780 if (r->out.out_data == NULL) {
781 return NT_STATUS_NO_MEMORY;
784 _wbint_Ping(cli->pipes_struct, r);
788 case NDR_WBINT_LOOKUPSID: {
789 struct wbint_LookupSid *r = (struct wbint_LookupSid *)_r;
791 r->out.type = talloc_zero(mem_ctx, enum lsa_SidType);
792 if (r->out.type == NULL) {
793 return NT_STATUS_NO_MEMORY;
796 r->out.domain = talloc_zero(mem_ctx, const char *);
797 if (r->out.domain == NULL) {
798 return NT_STATUS_NO_MEMORY;
801 r->out.name = talloc_zero(mem_ctx, const char *);
802 if (r->out.name == NULL) {
803 return NT_STATUS_NO_MEMORY;
806 r->out.result = _wbint_LookupSid(cli->pipes_struct, r);
810 case NDR_WBINT_LOOKUPNAME: {
811 struct wbint_LookupName *r = (struct wbint_LookupName *)_r;
813 r->out.type = talloc_zero(mem_ctx, enum lsa_SidType);
814 if (r->out.type == NULL) {
815 return NT_STATUS_NO_MEMORY;
818 r->out.sid = talloc_zero(mem_ctx, struct dom_sid);
819 if (r->out.sid == NULL) {
820 return NT_STATUS_NO_MEMORY;
823 r->out.result = _wbint_LookupName(cli->pipes_struct, r);
827 case NDR_WBINT_SID2UID: {
828 struct wbint_Sid2Uid *r = (struct wbint_Sid2Uid *)_r;
830 r->out.uid = talloc_zero(mem_ctx, uint64_t);
831 if (r->out.uid == NULL) {
832 return NT_STATUS_NO_MEMORY;
835 r->out.result = _wbint_Sid2Uid(cli->pipes_struct, r);
839 case NDR_WBINT_SID2GID: {
840 struct wbint_Sid2Gid *r = (struct wbint_Sid2Gid *)_r;
842 r->out.gid = talloc_zero(mem_ctx, uint64_t);
843 if (r->out.gid == NULL) {
844 return NT_STATUS_NO_MEMORY;
847 r->out.result = _wbint_Sid2Gid(cli->pipes_struct, r);
851 case NDR_WBINT_UID2SID: {
852 struct wbint_Uid2Sid *r = (struct wbint_Uid2Sid *)_r;
854 r->out.sid = talloc_zero(mem_ctx, struct dom_sid);
855 if (r->out.sid == NULL) {
856 return NT_STATUS_NO_MEMORY;
859 r->out.result = _wbint_Uid2Sid(cli->pipes_struct, r);
863 case NDR_WBINT_GID2SID: {
864 struct wbint_Gid2Sid *r = (struct wbint_Gid2Sid *)_r;
866 r->out.sid = talloc_zero(mem_ctx, struct dom_sid);
867 if (r->out.sid == NULL) {
868 return NT_STATUS_NO_MEMORY;
871 r->out.result = _wbint_Gid2Sid(cli->pipes_struct, r);
875 case NDR_WBINT_QUERYUSER: {
876 struct wbint_QueryUser *r = (struct wbint_QueryUser *)_r;
878 r->out.info = talloc_zero(mem_ctx, struct wbint_userinfo);
879 if (r->out.info == NULL) {
880 return NT_STATUS_NO_MEMORY;
883 r->out.result = _wbint_QueryUser(cli->pipes_struct, r);
887 case NDR_WBINT_LOOKUPUSERALIASES: {
888 struct wbint_LookupUserAliases *r = (struct wbint_LookupUserAliases *)_r;
890 r->out.rids = talloc_zero(mem_ctx, struct wbint_RidArray);
891 if (r->out.rids == NULL) {
892 return NT_STATUS_NO_MEMORY;
895 r->out.result = _wbint_LookupUserAliases(cli->pipes_struct, r);
900 return NT_STATUS_NOT_IMPLEMENTED;
904 NTSTATUS rpc_wbint_init(void)
906 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "wbint", "wbint", &ndr_table_wbint, api_wbint_cmds, sizeof(api_wbint_cmds) / sizeof(struct api_struct));