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