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;
16 struct unixinfo_SidToUid *r;
18 call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_SIDTOUID];
20 r = talloc(NULL, 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 status = call->ndr_pull(pull, NDR_IN, r);
38 if (NT_STATUS_IS_ERR(status)) {
44 NDR_PRINT_IN_DEBUG(unixinfo_SidToUid, r);
47 r->out.uid = talloc_zero(r, uint64_t);
48 if (r->out.uid == NULL) {
53 r->out.result = _unixinfo_SidToUid(p, r);
55 if (p->rng_fault_state) {
57 /* Return True here, srv_pipe_hnd.c will take care */
62 NDR_PRINT_OUT_DEBUG(unixinfo_SidToUid, r);
64 push = ndr_push_init_ctx(r);
70 status = call->ndr_push(push, NDR_OUT, r);
71 if (NT_STATUS_IS_ERR(status)) {
76 blob = ndr_push_blob(push);
77 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
87 static BOOL api_unixinfo_UidToSid(pipes_struct *p)
89 const struct ndr_interface_call *call;
90 struct ndr_pull *pull;
91 struct ndr_push *push;
94 struct unixinfo_UidToSid *r;
96 call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_UIDTOSID];
98 r = talloc(NULL, struct unixinfo_UidToSid);
103 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
108 pull = ndr_pull_init_blob(&blob, r);
114 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
115 status = call->ndr_pull(pull, NDR_IN, r);
116 if (NT_STATUS_IS_ERR(status)) {
121 if (DEBUGLEVEL >= 10)
122 NDR_PRINT_IN_DEBUG(unixinfo_UidToSid, r);
125 r->out.sid = talloc_zero(r, struct dom_sid);
126 if (r->out.sid == NULL) {
131 r->out.result = _unixinfo_UidToSid(p, r);
133 if (p->rng_fault_state) {
135 /* Return True here, srv_pipe_hnd.c will take care */
139 if (DEBUGLEVEL >= 10)
140 NDR_PRINT_OUT_DEBUG(unixinfo_UidToSid, r);
142 push = ndr_push_init_ctx(r);
148 status = call->ndr_push(push, NDR_OUT, r);
149 if (NT_STATUS_IS_ERR(status)) {
154 blob = ndr_push_blob(push);
155 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
165 static BOOL api_unixinfo_SidToGid(pipes_struct *p)
167 const struct ndr_interface_call *call;
168 struct ndr_pull *pull;
169 struct ndr_push *push;
172 struct unixinfo_SidToGid *r;
174 call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_SIDTOGID];
176 r = talloc(NULL, struct unixinfo_SidToGid);
181 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
186 pull = ndr_pull_init_blob(&blob, r);
192 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
193 status = call->ndr_pull(pull, NDR_IN, r);
194 if (NT_STATUS_IS_ERR(status)) {
199 if (DEBUGLEVEL >= 10)
200 NDR_PRINT_IN_DEBUG(unixinfo_SidToGid, r);
203 r->out.gid = talloc_zero(r, uint64_t);
204 if (r->out.gid == NULL) {
209 r->out.result = _unixinfo_SidToGid(p, r);
211 if (p->rng_fault_state) {
213 /* Return True here, srv_pipe_hnd.c will take care */
217 if (DEBUGLEVEL >= 10)
218 NDR_PRINT_OUT_DEBUG(unixinfo_SidToGid, r);
220 push = ndr_push_init_ctx(r);
226 status = call->ndr_push(push, NDR_OUT, r);
227 if (NT_STATUS_IS_ERR(status)) {
232 blob = ndr_push_blob(push);
233 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
243 static BOOL api_unixinfo_GidToSid(pipes_struct *p)
245 const struct ndr_interface_call *call;
246 struct ndr_pull *pull;
247 struct ndr_push *push;
250 struct unixinfo_GidToSid *r;
252 call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_GIDTOSID];
254 r = talloc(NULL, struct unixinfo_GidToSid);
259 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
264 pull = ndr_pull_init_blob(&blob, r);
270 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
271 status = call->ndr_pull(pull, NDR_IN, r);
272 if (NT_STATUS_IS_ERR(status)) {
277 if (DEBUGLEVEL >= 10)
278 NDR_PRINT_IN_DEBUG(unixinfo_GidToSid, r);
281 r->out.sid = talloc_zero(r, struct dom_sid);
282 if (r->out.sid == NULL) {
287 r->out.result = _unixinfo_GidToSid(p, r);
289 if (p->rng_fault_state) {
291 /* Return True here, srv_pipe_hnd.c will take care */
295 if (DEBUGLEVEL >= 10)
296 NDR_PRINT_OUT_DEBUG(unixinfo_GidToSid, r);
298 push = ndr_push_init_ctx(r);
304 status = call->ndr_push(push, NDR_OUT, r);
305 if (NT_STATUS_IS_ERR(status)) {
310 blob = ndr_push_blob(push);
311 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
321 static BOOL api_unixinfo_GetPWUid(pipes_struct *p)
323 const struct ndr_interface_call *call;
324 struct ndr_pull *pull;
325 struct ndr_push *push;
328 struct unixinfo_GetPWUid *r;
330 call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_GETPWUID];
332 r = talloc(NULL, struct unixinfo_GetPWUid);
337 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
342 pull = ndr_pull_init_blob(&blob, r);
348 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
349 status = call->ndr_pull(pull, NDR_IN, r);
350 if (NT_STATUS_IS_ERR(status)) {
355 if (DEBUGLEVEL >= 10)
356 NDR_PRINT_IN_DEBUG(unixinfo_GetPWUid, r);
359 r->out.count = r->in.count;
360 r->out.infos = talloc_zero_array(r, struct unixinfo_GetPWUidInfo, *r->out.count);
361 if (r->out.infos == NULL) {
366 r->out.result = _unixinfo_GetPWUid(p, r);
368 if (p->rng_fault_state) {
370 /* Return True here, srv_pipe_hnd.c will take care */
374 if (DEBUGLEVEL >= 10)
375 NDR_PRINT_OUT_DEBUG(unixinfo_GetPWUid, r);
377 push = ndr_push_init_ctx(r);
383 status = call->ndr_push(push, NDR_OUT, r);
384 if (NT_STATUS_IS_ERR(status)) {
389 blob = ndr_push_blob(push);
390 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
402 static struct api_struct api_unixinfo_cmds[] =
404 {"UNIXINFO_SIDTOUID", NDR_UNIXINFO_SIDTOUID, api_unixinfo_SidToUid},
405 {"UNIXINFO_UIDTOSID", NDR_UNIXINFO_UIDTOSID, api_unixinfo_UidToSid},
406 {"UNIXINFO_SIDTOGID", NDR_UNIXINFO_SIDTOGID, api_unixinfo_SidToGid},
407 {"UNIXINFO_GIDTOSID", NDR_UNIXINFO_GIDTOSID, api_unixinfo_GidToSid},
408 {"UNIXINFO_GETPWUID", NDR_UNIXINFO_GETPWUID, api_unixinfo_GetPWUid},
411 void unixinfo_get_pipe_fns(struct api_struct **fns, int *n_fns)
413 *fns = api_unixinfo_cmds;
414 *n_fns = sizeof(api_unixinfo_cmds) / sizeof(struct api_struct);
417 NTSTATUS rpc_unixinfo_init(void)
419 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "unixinfo", "unixinfo", api_unixinfo_cmds, sizeof(api_unixinfo_cmds) / sizeof(struct api_struct));