git add -f bin/default/librpc/gen_ndr/*.[ch] bin/default/source*/librpc/gen_ndr/...
[metze/samba/wip.git] / bin.gen_ndr / default / librpc / gen_ndr / ndr_unixinfo.c
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4 #include "bin/default/librpc/gen_ndr/ndr_unixinfo.h"
5
6 #include "librpc/gen_ndr/ndr_security.h"
7 static enum ndr_err_code ndr_push_unixinfo_GetPWUidInfo(struct ndr_push *ndr, int ndr_flags, const struct unixinfo_GetPWUidInfo *r)
8 {
9         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10         if (ndr_flags & NDR_SCALARS) {
11                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->shell, CH_UTF8)));
12                 NDR_CHECK(ndr_push_align(ndr, 4));
13                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
14                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->homedir, CH_UTF8)));
15                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->homedir, CH_UTF8)));
17                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->homedir, ndr_charset_length(r->homedir, CH_UTF8), sizeof(uint8_t), CH_UTF8));
18                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
19                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->shell, CH_UTF8)));
20                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->shell, ndr_charset_length(r->shell, CH_UTF8), sizeof(uint8_t), CH_UTF8));
21                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
22         }
23         if (ndr_flags & NDR_BUFFERS) {
24         }
25         return NDR_ERR_SUCCESS;
26 }
27
28 static enum ndr_err_code ndr_pull_unixinfo_GetPWUidInfo(struct ndr_pull *ndr, int ndr_flags, struct unixinfo_GetPWUidInfo *r)
29 {
30         uint32_t size_homedir_0 = 0;
31         uint32_t length_homedir_0 = 0;
32         uint32_t size_shell_0 = 0;
33         uint32_t length_shell_0 = 0;
34         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
35         if (ndr_flags & NDR_SCALARS) {
36                 NDR_CHECK(ndr_pull_array_size(ndr, &r->shell));
37                 NDR_CHECK(ndr_pull_align(ndr, 4));
38                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
39                 NDR_CHECK(ndr_pull_array_size(ndr, &r->homedir));
40                 NDR_CHECK(ndr_pull_array_length(ndr, &r->homedir));
41                 size_homedir_0 = ndr_get_array_size(ndr, &r->homedir);
42                 length_homedir_0 = ndr_get_array_length(ndr, &r->homedir);
43                 if (length_homedir_0 > size_homedir_0) {
44                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_homedir_0, length_homedir_0);
45                 }
46                 NDR_CHECK(ndr_check_string_terminator(ndr, length_homedir_0, sizeof(uint8_t)));
47                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->homedir, length_homedir_0, sizeof(uint8_t), CH_UTF8));
48                 NDR_CHECK(ndr_pull_array_length(ndr, &r->shell));
49                 size_shell_0 = ndr_get_array_size(ndr, &r->shell);
50                 length_shell_0 = ndr_get_array_length(ndr, &r->shell);
51                 if (length_shell_0 > size_shell_0) {
52                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_shell_0, length_shell_0);
53                 }
54                 NDR_CHECK(ndr_check_string_terminator(ndr, length_shell_0, sizeof(uint8_t)));
55                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->shell, length_shell_0, sizeof(uint8_t), CH_UTF8));
56                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
57         }
58         if (ndr_flags & NDR_BUFFERS) {
59         }
60         return NDR_ERR_SUCCESS;
61 }
62
63 _PUBLIC_ void ndr_print_unixinfo_GetPWUidInfo(struct ndr_print *ndr, const char *name, const struct unixinfo_GetPWUidInfo *r)
64 {
65         ndr_print_struct(ndr, name, "unixinfo_GetPWUidInfo");
66         if (r == NULL) { ndr_print_null(ndr); return; }
67         ndr->depth++;
68         ndr_print_NTSTATUS(ndr, "status", r->status);
69         ndr_print_string(ndr, "homedir", r->homedir);
70         ndr_print_string(ndr, "shell", r->shell);
71         ndr->depth--;
72 }
73
74 static enum ndr_err_code ndr_push_unixinfo_SidToUid(struct ndr_push *ndr, int flags, const struct unixinfo_SidToUid *r)
75 {
76         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
77         if (flags & NDR_IN) {
78                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->in.sid));
79         }
80         if (flags & NDR_OUT) {
81                 if (r->out.uid == NULL) {
82                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
83                 }
84                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.uid));
85                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
86         }
87         return NDR_ERR_SUCCESS;
88 }
89
90 static enum ndr_err_code ndr_pull_unixinfo_SidToUid(struct ndr_pull *ndr, int flags, struct unixinfo_SidToUid *r)
91 {
92         TALLOC_CTX *_mem_save_uid_0;
93         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
94         if (flags & NDR_IN) {
95                 ZERO_STRUCT(r->out);
96
97                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->in.sid));
98                 NDR_PULL_ALLOC(ndr, r->out.uid);
99                 ZERO_STRUCTP(r->out.uid);
100         }
101         if (flags & NDR_OUT) {
102                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
103                         NDR_PULL_ALLOC(ndr, r->out.uid);
104                 }
105                 _mem_save_uid_0 = NDR_PULL_GET_MEM_CTX(ndr);
106                 NDR_PULL_SET_MEM_CTX(ndr, r->out.uid, LIBNDR_FLAG_REF_ALLOC);
107                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.uid));
108                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uid_0, LIBNDR_FLAG_REF_ALLOC);
109                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
110         }
111         return NDR_ERR_SUCCESS;
112 }
113
114 _PUBLIC_ void ndr_print_unixinfo_SidToUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToUid *r)
115 {
116         ndr_print_struct(ndr, name, "unixinfo_SidToUid");
117         if (r == NULL) { ndr_print_null(ndr); return; }
118         ndr->depth++;
119         if (flags & NDR_SET_VALUES) {
120                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
121         }
122         if (flags & NDR_IN) {
123                 ndr_print_struct(ndr, "in", "unixinfo_SidToUid");
124                 ndr->depth++;
125                 ndr_print_dom_sid(ndr, "sid", &r->in.sid);
126                 ndr->depth--;
127         }
128         if (flags & NDR_OUT) {
129                 ndr_print_struct(ndr, "out", "unixinfo_SidToUid");
130                 ndr->depth++;
131                 ndr_print_ptr(ndr, "uid", r->out.uid);
132                 ndr->depth++;
133                 ndr_print_hyper(ndr, "uid", *r->out.uid);
134                 ndr->depth--;
135                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
136                 ndr->depth--;
137         }
138         ndr->depth--;
139 }
140
141 static enum ndr_err_code ndr_push_unixinfo_UidToSid(struct ndr_push *ndr, int flags, const struct unixinfo_UidToSid *r)
142 {
143         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
144         if (flags & NDR_IN) {
145                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uid));
146         }
147         if (flags & NDR_OUT) {
148                 if (r->out.sid == NULL) {
149                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
150                 }
151                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->out.sid));
152                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
153         }
154         return NDR_ERR_SUCCESS;
155 }
156
157 static enum ndr_err_code ndr_pull_unixinfo_UidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_UidToSid *r)
158 {
159         TALLOC_CTX *_mem_save_sid_0;
160         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
161         if (flags & NDR_IN) {
162                 ZERO_STRUCT(r->out);
163
164                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uid));
165                 NDR_PULL_ALLOC(ndr, r->out.sid);
166                 ZERO_STRUCTP(r->out.sid);
167         }
168         if (flags & NDR_OUT) {
169                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
170                         NDR_PULL_ALLOC(ndr, r->out.sid);
171                 }
172                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
173                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
174                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->out.sid));
175                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
176                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
177         }
178         return NDR_ERR_SUCCESS;
179 }
180
181 _PUBLIC_ void ndr_print_unixinfo_UidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_UidToSid *r)
182 {
183         ndr_print_struct(ndr, name, "unixinfo_UidToSid");
184         if (r == NULL) { ndr_print_null(ndr); return; }
185         ndr->depth++;
186         if (flags & NDR_SET_VALUES) {
187                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
188         }
189         if (flags & NDR_IN) {
190                 ndr_print_struct(ndr, "in", "unixinfo_UidToSid");
191                 ndr->depth++;
192                 ndr_print_hyper(ndr, "uid", r->in.uid);
193                 ndr->depth--;
194         }
195         if (flags & NDR_OUT) {
196                 ndr_print_struct(ndr, "out", "unixinfo_UidToSid");
197                 ndr->depth++;
198                 ndr_print_ptr(ndr, "sid", r->out.sid);
199                 ndr->depth++;
200                 ndr_print_dom_sid(ndr, "sid", r->out.sid);
201                 ndr->depth--;
202                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
203                 ndr->depth--;
204         }
205         ndr->depth--;
206 }
207
208 static enum ndr_err_code ndr_push_unixinfo_SidToGid(struct ndr_push *ndr, int flags, const struct unixinfo_SidToGid *r)
209 {
210         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
211         if (flags & NDR_IN) {
212                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->in.sid));
213         }
214         if (flags & NDR_OUT) {
215                 if (r->out.gid == NULL) {
216                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
217                 }
218                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.gid));
219                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
220         }
221         return NDR_ERR_SUCCESS;
222 }
223
224 static enum ndr_err_code ndr_pull_unixinfo_SidToGid(struct ndr_pull *ndr, int flags, struct unixinfo_SidToGid *r)
225 {
226         TALLOC_CTX *_mem_save_gid_0;
227         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
228         if (flags & NDR_IN) {
229                 ZERO_STRUCT(r->out);
230
231                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->in.sid));
232                 NDR_PULL_ALLOC(ndr, r->out.gid);
233                 ZERO_STRUCTP(r->out.gid);
234         }
235         if (flags & NDR_OUT) {
236                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
237                         NDR_PULL_ALLOC(ndr, r->out.gid);
238                 }
239                 _mem_save_gid_0 = NDR_PULL_GET_MEM_CTX(ndr);
240                 NDR_PULL_SET_MEM_CTX(ndr, r->out.gid, LIBNDR_FLAG_REF_ALLOC);
241                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.gid));
242                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gid_0, LIBNDR_FLAG_REF_ALLOC);
243                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
244         }
245         return NDR_ERR_SUCCESS;
246 }
247
248 _PUBLIC_ void ndr_print_unixinfo_SidToGid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToGid *r)
249 {
250         ndr_print_struct(ndr, name, "unixinfo_SidToGid");
251         if (r == NULL) { ndr_print_null(ndr); return; }
252         ndr->depth++;
253         if (flags & NDR_SET_VALUES) {
254                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
255         }
256         if (flags & NDR_IN) {
257                 ndr_print_struct(ndr, "in", "unixinfo_SidToGid");
258                 ndr->depth++;
259                 ndr_print_dom_sid(ndr, "sid", &r->in.sid);
260                 ndr->depth--;
261         }
262         if (flags & NDR_OUT) {
263                 ndr_print_struct(ndr, "out", "unixinfo_SidToGid");
264                 ndr->depth++;
265                 ndr_print_ptr(ndr, "gid", r->out.gid);
266                 ndr->depth++;
267                 ndr_print_hyper(ndr, "gid", *r->out.gid);
268                 ndr->depth--;
269                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
270                 ndr->depth--;
271         }
272         ndr->depth--;
273 }
274
275 static enum ndr_err_code ndr_push_unixinfo_GidToSid(struct ndr_push *ndr, int flags, const struct unixinfo_GidToSid *r)
276 {
277         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
278         if (flags & NDR_IN) {
279                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.gid));
280         }
281         if (flags & NDR_OUT) {
282                 if (r->out.sid == NULL) {
283                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
284                 }
285                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->out.sid));
286                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
287         }
288         return NDR_ERR_SUCCESS;
289 }
290
291 static enum ndr_err_code ndr_pull_unixinfo_GidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_GidToSid *r)
292 {
293         TALLOC_CTX *_mem_save_sid_0;
294         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
295         if (flags & NDR_IN) {
296                 ZERO_STRUCT(r->out);
297
298                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.gid));
299                 NDR_PULL_ALLOC(ndr, r->out.sid);
300                 ZERO_STRUCTP(r->out.sid);
301         }
302         if (flags & NDR_OUT) {
303                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
304                         NDR_PULL_ALLOC(ndr, r->out.sid);
305                 }
306                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
307                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
308                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->out.sid));
309                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
310                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
311         }
312         return NDR_ERR_SUCCESS;
313 }
314
315 _PUBLIC_ void ndr_print_unixinfo_GidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GidToSid *r)
316 {
317         ndr_print_struct(ndr, name, "unixinfo_GidToSid");
318         if (r == NULL) { ndr_print_null(ndr); return; }
319         ndr->depth++;
320         if (flags & NDR_SET_VALUES) {
321                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
322         }
323         if (flags & NDR_IN) {
324                 ndr_print_struct(ndr, "in", "unixinfo_GidToSid");
325                 ndr->depth++;
326                 ndr_print_hyper(ndr, "gid", r->in.gid);
327                 ndr->depth--;
328         }
329         if (flags & NDR_OUT) {
330                 ndr_print_struct(ndr, "out", "unixinfo_GidToSid");
331                 ndr->depth++;
332                 ndr_print_ptr(ndr, "sid", r->out.sid);
333                 ndr->depth++;
334                 ndr_print_dom_sid(ndr, "sid", r->out.sid);
335                 ndr->depth--;
336                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
337                 ndr->depth--;
338         }
339         ndr->depth--;
340 }
341
342 static enum ndr_err_code ndr_push_unixinfo_GetPWUid(struct ndr_push *ndr, int flags, const struct unixinfo_GetPWUid *r)
343 {
344         uint32_t cntr_uids_0;
345         uint32_t cntr_infos_0;
346         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
347         if (flags & NDR_IN) {
348                 if (r->in.count == NULL) {
349                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
350                 }
351                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
352                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->in.count));
353                 for (cntr_uids_0 = 0; cntr_uids_0 < *r->in.count; cntr_uids_0++) {
354                         NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uids[cntr_uids_0]));
355                 }
356         }
357         if (flags & NDR_OUT) {
358                 if (r->out.count == NULL) {
359                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
360                 }
361                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
362                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.count));
363                 for (cntr_infos_0 = 0; cntr_infos_0 < *r->out.count; cntr_infos_0++) {
364                         NDR_CHECK(ndr_push_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_0]));
365                 }
366                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
367         }
368         return NDR_ERR_SUCCESS;
369 }
370
371 static enum ndr_err_code ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, int flags, struct unixinfo_GetPWUid *r)
372 {
373         uint32_t size_uids_0 = 0;
374         uint32_t cntr_uids_0;
375         uint32_t size_infos_0 = 0;
376         uint32_t cntr_infos_0;
377         TALLOC_CTX *_mem_save_count_0;
378         TALLOC_CTX *_mem_save_uids_0;
379         TALLOC_CTX *_mem_save_infos_0;
380         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
381         if (flags & NDR_IN) {
382                 ZERO_STRUCT(r->out);
383
384                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
385                         NDR_PULL_ALLOC(ndr, r->in.count);
386                 }
387                 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
388                 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
389                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
390                 if (*r->in.count > 1023) {
391                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
392                 }
393                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
394                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.uids));
395                 size_uids_0 = ndr_get_array_size(ndr, &r->in.uids);
396                 NDR_PULL_ALLOC_N(ndr, r->in.uids, size_uids_0);
397                 _mem_save_uids_0 = NDR_PULL_GET_MEM_CTX(ndr);
398                 NDR_PULL_SET_MEM_CTX(ndr, r->in.uids, 0);
399                 for (cntr_uids_0 = 0; cntr_uids_0 < size_uids_0; cntr_uids_0++) {
400                         NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uids[cntr_uids_0]));
401                 }
402                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uids_0, 0);
403                 NDR_PULL_ALLOC(ndr, r->out.count);
404                 *r->out.count = *r->in.count;
405                 if (r->in.uids) {
406                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.uids, *r->in.count));
407                 }
408         }
409         if (flags & NDR_OUT) {
410                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
411                         NDR_PULL_ALLOC(ndr, r->out.count);
412                 }
413                 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
414                 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
415                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
416                 if (*r->out.count > 1023) {
417                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
418                 }
419                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
420                 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.infos));
421                 size_infos_0 = ndr_get_array_size(ndr, &r->out.infos);
422                 NDR_PULL_ALLOC_N(ndr, r->out.infos, size_infos_0);
423                 _mem_save_infos_0 = NDR_PULL_GET_MEM_CTX(ndr);
424                 NDR_PULL_SET_MEM_CTX(ndr, r->out.infos, 0);
425                 for (cntr_infos_0 = 0; cntr_infos_0 < size_infos_0; cntr_infos_0++) {
426                         NDR_CHECK(ndr_pull_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_0]));
427                 }
428                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_infos_0, 0);
429                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
430                 if (r->out.infos) {
431                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.infos, *r->out.count));
432                 }
433         }
434         return NDR_ERR_SUCCESS;
435 }
436
437 _PUBLIC_ void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GetPWUid *r)
438 {
439         uint32_t cntr_uids_0;
440         uint32_t cntr_infos_0;
441         ndr_print_struct(ndr, name, "unixinfo_GetPWUid");
442         if (r == NULL) { ndr_print_null(ndr); return; }
443         ndr->depth++;
444         if (flags & NDR_SET_VALUES) {
445                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
446         }
447         if (flags & NDR_IN) {
448                 ndr_print_struct(ndr, "in", "unixinfo_GetPWUid");
449                 ndr->depth++;
450                 ndr_print_ptr(ndr, "count", r->in.count);
451                 ndr->depth++;
452                 ndr_print_uint32(ndr, "count", *r->in.count);
453                 ndr->depth--;
454                 ndr->print(ndr, "%s: ARRAY(%d)", "uids", (int)*r->in.count);
455                 ndr->depth++;
456                 for (cntr_uids_0=0;cntr_uids_0<*r->in.count;cntr_uids_0++) {
457                         ndr_print_hyper(ndr, "uids", r->in.uids[cntr_uids_0]);
458                 }
459                 ndr->depth--;
460                 ndr->depth--;
461         }
462         if (flags & NDR_OUT) {
463                 ndr_print_struct(ndr, "out", "unixinfo_GetPWUid");
464                 ndr->depth++;
465                 ndr_print_ptr(ndr, "count", r->out.count);
466                 ndr->depth++;
467                 ndr_print_uint32(ndr, "count", *r->out.count);
468                 ndr->depth--;
469                 ndr->print(ndr, "%s: ARRAY(%d)", "infos", (int)*r->out.count);
470                 ndr->depth++;
471                 for (cntr_infos_0=0;cntr_infos_0<*r->out.count;cntr_infos_0++) {
472                         ndr_print_unixinfo_GetPWUidInfo(ndr, "infos", &r->out.infos[cntr_infos_0]);
473                 }
474                 ndr->depth--;
475                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
476                 ndr->depth--;
477         }
478         ndr->depth--;
479 }
480
481 static const struct ndr_interface_call unixinfo_calls[] = {
482         {
483                 "unixinfo_SidToUid",
484                 sizeof(struct unixinfo_SidToUid),
485                 (ndr_push_flags_fn_t) ndr_push_unixinfo_SidToUid,
486                 (ndr_pull_flags_fn_t) ndr_pull_unixinfo_SidToUid,
487                 (ndr_print_function_t) ndr_print_unixinfo_SidToUid,
488                 { 0, NULL },
489                 { 0, NULL },
490         },
491         {
492                 "unixinfo_UidToSid",
493                 sizeof(struct unixinfo_UidToSid),
494                 (ndr_push_flags_fn_t) ndr_push_unixinfo_UidToSid,
495                 (ndr_pull_flags_fn_t) ndr_pull_unixinfo_UidToSid,
496                 (ndr_print_function_t) ndr_print_unixinfo_UidToSid,
497                 { 0, NULL },
498                 { 0, NULL },
499         },
500         {
501                 "unixinfo_SidToGid",
502                 sizeof(struct unixinfo_SidToGid),
503                 (ndr_push_flags_fn_t) ndr_push_unixinfo_SidToGid,
504                 (ndr_pull_flags_fn_t) ndr_pull_unixinfo_SidToGid,
505                 (ndr_print_function_t) ndr_print_unixinfo_SidToGid,
506                 { 0, NULL },
507                 { 0, NULL },
508         },
509         {
510                 "unixinfo_GidToSid",
511                 sizeof(struct unixinfo_GidToSid),
512                 (ndr_push_flags_fn_t) ndr_push_unixinfo_GidToSid,
513                 (ndr_pull_flags_fn_t) ndr_pull_unixinfo_GidToSid,
514                 (ndr_print_function_t) ndr_print_unixinfo_GidToSid,
515                 { 0, NULL },
516                 { 0, NULL },
517         },
518         {
519                 "unixinfo_GetPWUid",
520                 sizeof(struct unixinfo_GetPWUid),
521                 (ndr_push_flags_fn_t) ndr_push_unixinfo_GetPWUid,
522                 (ndr_pull_flags_fn_t) ndr_pull_unixinfo_GetPWUid,
523                 (ndr_print_function_t) ndr_print_unixinfo_GetPWUid,
524                 { 0, NULL },
525                 { 0, NULL },
526         },
527         { NULL, 0, NULL, NULL, NULL }
528 };
529
530 static const char * const unixinfo_endpoint_strings[] = {
531         "ncacn_np:[\\pipe\\unixinfo]", 
532         "ncacn_ip_tcp:", 
533         "ncalrpc:", 
534 };
535
536 static const struct ndr_interface_string_array unixinfo_endpoints = {
537         .count  = 3,
538         .names  = unixinfo_endpoint_strings
539 };
540
541 static const char * const unixinfo_authservice_strings[] = {
542         "host", 
543 };
544
545 static const struct ndr_interface_string_array unixinfo_authservices = {
546         .count  = 1,
547         .names  = unixinfo_authservice_strings
548 };
549
550
551 const struct ndr_interface_table ndr_table_unixinfo = {
552         .name           = "unixinfo",
553         .syntax_id      = {
554                 {0x9c54e310,0xa955,0x4885,{0xbd,0x31},{0x78,0x78,0x71,0x47,0xdf,0xa6}},
555                 NDR_UNIXINFO_VERSION
556         },
557         .helpstring     = NDR_UNIXINFO_HELPSTRING,
558         .num_calls      = 5,
559         .calls          = unixinfo_calls,
560         .endpoints      = &unixinfo_endpoints,
561         .authservices   = &unixinfo_authservices
562 };
563