8448b76a8dfc48e9a1a598bfd11850956b37a62a
[bbaumbach/samba-autobuild/.git] / source3 / librpc / gen_ndr / cli_unixinfo.c
1 /*
2  * Unix SMB/CIFS implementation.
3  * client auto-generated by pidl. DO NOT MODIFY!
4  */
5
6 #include "includes.h"
7 #include "librpc/gen_ndr/cli_unixinfo.h"
8
9 NTSTATUS rpccli_unixinfo_SidToUid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct dom_sid sid, uint64_t *uid)
10 {
11         struct unixinfo_SidToUid r;
12         NTSTATUS status;
13         
14         /* In parameters */
15         r.in.sid = sid;
16         
17         if (DEBUGLEVEL >= 10)
18                 NDR_PRINT_IN_DEBUG(unixinfo_SidToUid, &r);
19         
20         status = cli_do_rpc_ndr(cli, mem_ctx, PI_UNIXINFO, DCERPC_UNIXINFO_SIDTOUID, &r, (ndr_pull_flags_fn_t)ndr_pull_unixinfo_SidToUid, (ndr_push_flags_fn_t)ndr_push_unixinfo_SidToUid);
21         
22         if (DEBUGLEVEL >= 10)
23                 NDR_PRINT_OUT_DEBUG(unixinfo_SidToUid, &r);
24         
25         if (NT_STATUS_IS_ERR(status)) {
26                 return status;
27         }
28         
29         /* Return variables */
30         *uid = *r.out.uid;
31         
32         /* Return result */
33         return r.out.result;
34 }
35
36 NTSTATUS rpccli_unixinfo_UidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint64_t uid, struct dom_sid *sid)
37 {
38         struct unixinfo_UidToSid r;
39         NTSTATUS status;
40         
41         /* In parameters */
42         r.in.uid = uid;
43         
44         if (DEBUGLEVEL >= 10)
45                 NDR_PRINT_IN_DEBUG(unixinfo_UidToSid, &r);
46         
47         status = cli_do_rpc_ndr(cli, mem_ctx, PI_UNIXINFO, DCERPC_UNIXINFO_UIDTOSID, &r, (ndr_pull_flags_fn_t)ndr_pull_unixinfo_UidToSid, (ndr_push_flags_fn_t)ndr_push_unixinfo_UidToSid);
48         
49         if (DEBUGLEVEL >= 10)
50                 NDR_PRINT_OUT_DEBUG(unixinfo_UidToSid, &r);
51         
52         if (NT_STATUS_IS_ERR(status)) {
53                 return status;
54         }
55         
56         /* Return variables */
57         *sid = *r.out.sid;
58         
59         /* Return result */
60         return r.out.result;
61 }
62
63 NTSTATUS rpccli_unixinfo_SidToGid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct dom_sid sid, uint64_t *gid)
64 {
65         struct unixinfo_SidToGid r;
66         NTSTATUS status;
67         
68         /* In parameters */
69         r.in.sid = sid;
70         
71         if (DEBUGLEVEL >= 10)
72                 NDR_PRINT_IN_DEBUG(unixinfo_SidToGid, &r);
73         
74         status = cli_do_rpc_ndr(cli, mem_ctx, PI_UNIXINFO, DCERPC_UNIXINFO_SIDTOGID, &r, (ndr_pull_flags_fn_t)ndr_pull_unixinfo_SidToGid, (ndr_push_flags_fn_t)ndr_push_unixinfo_SidToGid);
75         
76         if (DEBUGLEVEL >= 10)
77                 NDR_PRINT_OUT_DEBUG(unixinfo_SidToGid, &r);
78         
79         if (NT_STATUS_IS_ERR(status)) {
80                 return status;
81         }
82         
83         /* Return variables */
84         *gid = *r.out.gid;
85         
86         /* Return result */
87         return r.out.result;
88 }
89
90 NTSTATUS rpccli_unixinfo_GidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint64_t gid, struct dom_sid *sid)
91 {
92         struct unixinfo_GidToSid r;
93         NTSTATUS status;
94         
95         /* In parameters */
96         r.in.gid = gid;
97         
98         if (DEBUGLEVEL >= 10)
99                 NDR_PRINT_IN_DEBUG(unixinfo_GidToSid, &r);
100         
101         status = cli_do_rpc_ndr(cli, mem_ctx, PI_UNIXINFO, DCERPC_UNIXINFO_GIDTOSID, &r, (ndr_pull_flags_fn_t)ndr_pull_unixinfo_GidToSid, (ndr_push_flags_fn_t)ndr_push_unixinfo_GidToSid);
102         
103         if (DEBUGLEVEL >= 10)
104                 NDR_PRINT_OUT_DEBUG(unixinfo_GidToSid, &r);
105         
106         if (NT_STATUS_IS_ERR(status)) {
107                 return status;
108         }
109         
110         /* Return variables */
111         *sid = *r.out.sid;
112         
113         /* Return result */
114         return r.out.result;
115 }
116
117 NTSTATUS rpccli_unixinfo_GetPWUid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t *count, uint64_t *uids, struct unixinfo_GetPWUidInfo *infos)
118 {
119         struct unixinfo_GetPWUid r;
120         NTSTATUS status;
121         
122         /* In parameters */
123         r.in.count = count;
124         r.in.uids = uids;
125         
126         if (DEBUGLEVEL >= 10)
127                 NDR_PRINT_IN_DEBUG(unixinfo_GetPWUid, &r);
128         
129         status = cli_do_rpc_ndr(cli, mem_ctx, PI_UNIXINFO, DCERPC_UNIXINFO_GETPWUID, &r, (ndr_pull_flags_fn_t)ndr_pull_unixinfo_GetPWUid, (ndr_push_flags_fn_t)ndr_push_unixinfo_GetPWUid);
130         
131         if (DEBUGLEVEL >= 10)
132                 NDR_PRINT_OUT_DEBUG(unixinfo_GetPWUid, &r);
133         
134         if (NT_STATUS_IS_ERR(status)) {
135                 return status;
136         }
137         
138         /* Return variables */
139         *count = *r.out.count;
140         *infos = *r.out.infos;
141         
142         /* Return result */
143         return r.out.result;
144 }
145