2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "librpc/gen_ndr/srv_unixinfo.h"
9 static bool api_unixinfo_SidToUid(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 unixinfo_SidToUid *r;
18 call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_SIDTOUID];
20 r = talloc(talloc_tos(), struct unixinfo_SidToUid);
25 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
30 pull = ndr_pull_init_blob(&blob, r);
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(unixinfo_SidToUid, r);
48 r->out.uid = talloc_zero(r, uint64_t);
49 if (r->out.uid == NULL) {
54 r->out.result = _unixinfo_SidToUid(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(unixinfo_SidToUid, r);
66 push = ndr_push_init_ctx(r);
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_unixinfo_UidToSid(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 unixinfo_UidToSid *r;
98 call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_UIDTOSID];
100 r = talloc(talloc_tos(), struct unixinfo_UidToSid);
105 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
110 pull = ndr_pull_init_blob(&blob, r);
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(unixinfo_UidToSid, r);
128 r->out.sid = talloc_zero(r, struct dom_sid);
129 if (r->out.sid == NULL) {
134 r->out.result = _unixinfo_UidToSid(p, r);
136 if (p->rng_fault_state) {
138 /* Return true here, srv_pipe_hnd.c will take care */
142 if (DEBUGLEVEL >= 10) {
143 NDR_PRINT_OUT_DEBUG(unixinfo_UidToSid, r);
146 push = ndr_push_init_ctx(r);
152 ndr_err = call->ndr_push(push, NDR_OUT, r);
153 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
158 blob = ndr_push_blob(push);
159 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
169 static bool api_unixinfo_SidToGid(pipes_struct *p)
171 const struct ndr_interface_call *call;
172 struct ndr_pull *pull;
173 struct ndr_push *push;
174 enum ndr_err_code ndr_err;
176 struct unixinfo_SidToGid *r;
178 call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_SIDTOGID];
180 r = talloc(talloc_tos(), struct unixinfo_SidToGid);
185 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
190 pull = ndr_pull_init_blob(&blob, r);
196 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
197 ndr_err = call->ndr_pull(pull, NDR_IN, r);
198 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
203 if (DEBUGLEVEL >= 10) {
204 NDR_PRINT_IN_DEBUG(unixinfo_SidToGid, r);
208 r->out.gid = talloc_zero(r, uint64_t);
209 if (r->out.gid == NULL) {
214 r->out.result = _unixinfo_SidToGid(p, r);
216 if (p->rng_fault_state) {
218 /* Return true here, srv_pipe_hnd.c will take care */
222 if (DEBUGLEVEL >= 10) {
223 NDR_PRINT_OUT_DEBUG(unixinfo_SidToGid, r);
226 push = ndr_push_init_ctx(r);
232 ndr_err = call->ndr_push(push, NDR_OUT, r);
233 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
238 blob = ndr_push_blob(push);
239 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
249 static bool api_unixinfo_GidToSid(pipes_struct *p)
251 const struct ndr_interface_call *call;
252 struct ndr_pull *pull;
253 struct ndr_push *push;
254 enum ndr_err_code ndr_err;
256 struct unixinfo_GidToSid *r;
258 call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_GIDTOSID];
260 r = talloc(talloc_tos(), struct unixinfo_GidToSid);
265 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
270 pull = ndr_pull_init_blob(&blob, r);
276 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
277 ndr_err = call->ndr_pull(pull, NDR_IN, r);
278 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
283 if (DEBUGLEVEL >= 10) {
284 NDR_PRINT_IN_DEBUG(unixinfo_GidToSid, r);
288 r->out.sid = talloc_zero(r, struct dom_sid);
289 if (r->out.sid == NULL) {
294 r->out.result = _unixinfo_GidToSid(p, r);
296 if (p->rng_fault_state) {
298 /* Return true here, srv_pipe_hnd.c will take care */
302 if (DEBUGLEVEL >= 10) {
303 NDR_PRINT_OUT_DEBUG(unixinfo_GidToSid, r);
306 push = ndr_push_init_ctx(r);
312 ndr_err = call->ndr_push(push, NDR_OUT, r);
313 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
318 blob = ndr_push_blob(push);
319 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
329 static bool api_unixinfo_GetPWUid(pipes_struct *p)
331 const struct ndr_interface_call *call;
332 struct ndr_pull *pull;
333 struct ndr_push *push;
334 enum ndr_err_code ndr_err;
336 struct unixinfo_GetPWUid *r;
338 call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_GETPWUID];
340 r = talloc(talloc_tos(), struct unixinfo_GetPWUid);
345 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
350 pull = ndr_pull_init_blob(&blob, r);
356 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
357 ndr_err = call->ndr_pull(pull, NDR_IN, r);
358 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
363 if (DEBUGLEVEL >= 10) {
364 NDR_PRINT_IN_DEBUG(unixinfo_GetPWUid, r);
368 r->out.count = r->in.count;
369 r->out.infos = talloc_zero_array(r, struct unixinfo_GetPWUidInfo, *r->out.count);
370 if (r->out.infos == NULL) {
375 r->out.result = _unixinfo_GetPWUid(p, r);
377 if (p->rng_fault_state) {
379 /* Return true here, srv_pipe_hnd.c will take care */
383 if (DEBUGLEVEL >= 10) {
384 NDR_PRINT_OUT_DEBUG(unixinfo_GetPWUid, r);
387 push = ndr_push_init_ctx(r);
393 ndr_err = call->ndr_push(push, NDR_OUT, r);
394 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
399 blob = ndr_push_blob(push);
400 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
412 static struct api_struct api_unixinfo_cmds[] =
414 {"UNIXINFO_SIDTOUID", NDR_UNIXINFO_SIDTOUID, api_unixinfo_SidToUid},
415 {"UNIXINFO_UIDTOSID", NDR_UNIXINFO_UIDTOSID, api_unixinfo_UidToSid},
416 {"UNIXINFO_SIDTOGID", NDR_UNIXINFO_SIDTOGID, api_unixinfo_SidToGid},
417 {"UNIXINFO_GIDTOSID", NDR_UNIXINFO_GIDTOSID, api_unixinfo_GidToSid},
418 {"UNIXINFO_GETPWUID", NDR_UNIXINFO_GETPWUID, api_unixinfo_GetPWUid},
421 void unixinfo_get_pipe_fns(struct api_struct **fns, int *n_fns)
423 *fns = api_unixinfo_cmds;
424 *n_fns = sizeof(api_unixinfo_cmds) / sizeof(struct api_struct);
427 NTSTATUS rpc_unixinfo_init(void)
429 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "unixinfo", "unixinfo", api_unixinfo_cmds, sizeof(api_unixinfo_cmds) / sizeof(struct api_struct));