r18188: merge 3.0-libndr branch
[Samba.git] / source / libndr / ndr_unixinfo.c
blob61b4f4696a7dce82d8fed51602cda3b8aee9910e
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "libndr/ndr_unixinfo.h"
5 static NTSTATUS ndr_push_unixinfo_GetPWUidInfo(struct ndr_push *ndr, int ndr_flags, const struct unixinfo_GetPWUidInfo *r)
7 if (ndr_flags & NDR_SCALARS) {
8 NDR_CHECK(ndr_push_align(ndr, 4));
9 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
10 NDR_CHECK(ndr_push_unique_ptr(ndr, r->homedir));
11 NDR_CHECK(ndr_push_unique_ptr(ndr, r->shell));
13 if (ndr_flags & NDR_BUFFERS) {
14 if (r->homedir) {
15 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->homedir, CH_UTF8)));
16 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->homedir, CH_UTF8)));
18 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->homedir, ndr_charset_length(r->homedir, CH_UTF8), sizeof(uint8_t), CH_UTF8));
20 if (r->shell) {
21 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->shell, CH_UTF8)));
22 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
23 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->shell, CH_UTF8)));
24 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->shell, ndr_charset_length(r->shell, CH_UTF8), sizeof(uint8_t), CH_UTF8));
27 return NT_STATUS_OK;
30 static NTSTATUS ndr_pull_unixinfo_GetPWUidInfo(struct ndr_pull *ndr, int ndr_flags, struct unixinfo_GetPWUidInfo *r)
32 uint32_t _ptr_homedir;
33 TALLOC_CTX *_mem_save_homedir_0;
34 uint32_t _ptr_shell;
35 TALLOC_CTX *_mem_save_shell_0;
36 if (ndr_flags & NDR_SCALARS) {
37 NDR_CHECK(ndr_pull_align(ndr, 4));
38 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
39 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_homedir));
40 if (_ptr_homedir) {
41 NDR_PULL_ALLOC_SIZE(ndr, r->homedir, 1);
42 } else {
43 r->homedir = NULL;
45 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_shell));
46 if (_ptr_shell) {
47 NDR_PULL_ALLOC_SIZE(ndr, r->shell, 1);
48 } else {
49 r->shell = NULL;
52 if (ndr_flags & NDR_BUFFERS) {
53 if (r->homedir) {
54 _mem_save_homedir_0 = NDR_PULL_GET_MEM_CTX(ndr);
55 NDR_PULL_SET_MEM_CTX(ndr, r->homedir, 0);
56 NDR_CHECK(ndr_pull_array_size(ndr, &r->homedir));
57 NDR_CHECK(ndr_pull_array_length(ndr, &r->homedir));
58 if (ndr_get_array_length(ndr, &r->homedir) > ndr_get_array_size(ndr, &r->homedir)) {
59 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->homedir), ndr_get_array_length(ndr, &r->homedir));
61 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->homedir), sizeof(uint8_t)));
62 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->homedir, ndr_get_array_length(ndr, &r->homedir), sizeof(uint8_t), CH_UTF8));
63 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_homedir_0, 0);
65 if (r->shell) {
66 _mem_save_shell_0 = NDR_PULL_GET_MEM_CTX(ndr);
67 NDR_PULL_SET_MEM_CTX(ndr, r->shell, 0);
68 NDR_CHECK(ndr_pull_array_size(ndr, &r->shell));
69 NDR_CHECK(ndr_pull_array_length(ndr, &r->shell));
70 if (ndr_get_array_length(ndr, &r->shell) > ndr_get_array_size(ndr, &r->shell)) {
71 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->shell), ndr_get_array_length(ndr, &r->shell));
73 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->shell), sizeof(uint8_t)));
74 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->shell, ndr_get_array_length(ndr, &r->shell), sizeof(uint8_t), CH_UTF8));
75 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_shell_0, 0);
78 return NT_STATUS_OK;
81 void ndr_print_unixinfo_GetPWUidInfo(struct ndr_print *ndr, const char *name, const struct unixinfo_GetPWUidInfo *r)
83 ndr_print_struct(ndr, name, "unixinfo_GetPWUidInfo");
84 ndr->depth++;
85 ndr_print_NTSTATUS(ndr, "status", r->status);
86 ndr_print_ptr(ndr, "homedir", r->homedir);
87 ndr->depth++;
88 if (r->homedir) {
89 ndr_print_string(ndr, "homedir", r->homedir);
91 ndr->depth--;
92 ndr_print_ptr(ndr, "shell", r->shell);
93 ndr->depth++;
94 if (r->shell) {
95 ndr_print_string(ndr, "shell", r->shell);
97 ndr->depth--;
98 ndr->depth--;
101 NTSTATUS ndr_push_unixinfo_SidToUid(struct ndr_push *ndr, int flags, const struct unixinfo_SidToUid *r)
103 if (flags & NDR_IN) {
104 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid));
106 if (flags & NDR_OUT) {
107 if (r->out.uid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
108 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.uid));
109 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
111 return NT_STATUS_OK;
114 NTSTATUS ndr_pull_unixinfo_SidToUid(struct ndr_pull *ndr, int flags, struct unixinfo_SidToUid *r)
116 TALLOC_CTX *_mem_save_uid_0;
117 if (flags & NDR_IN) {
118 ZERO_STRUCT(r->out);
120 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid));
121 NDR_PULL_ALLOC(ndr, r->out.uid);
122 ZERO_STRUCTP(r->out.uid);
124 if (flags & NDR_OUT) {
125 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
126 NDR_PULL_ALLOC(ndr, r->out.uid);
128 _mem_save_uid_0 = NDR_PULL_GET_MEM_CTX(ndr);
129 NDR_PULL_SET_MEM_CTX(ndr, r->out.uid, LIBNDR_FLAG_REF_ALLOC);
130 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.uid));
131 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uid_0, LIBNDR_FLAG_REF_ALLOC);
132 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
134 return NT_STATUS_OK;
137 void ndr_print_unixinfo_SidToUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToUid *r)
139 ndr_print_struct(ndr, name, "unixinfo_SidToUid");
140 ndr->depth++;
141 if (flags & NDR_SET_VALUES) {
142 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
144 if (flags & NDR_IN) {
145 ndr_print_struct(ndr, "in", "unixinfo_SidToUid");
146 ndr->depth++;
147 ndr_print_dom_sid(ndr, "sid", &r->in.sid);
148 ndr->depth--;
150 if (flags & NDR_OUT) {
151 ndr_print_struct(ndr, "out", "unixinfo_SidToUid");
152 ndr->depth++;
153 ndr_print_ptr(ndr, "uid", r->out.uid);
154 ndr->depth++;
155 ndr_print_hyper(ndr, "uid", *r->out.uid);
156 ndr->depth--;
157 ndr_print_NTSTATUS(ndr, "result", r->out.result);
158 ndr->depth--;
160 ndr->depth--;
163 NTSTATUS ndr_push_unixinfo_UidToSid(struct ndr_push *ndr, int flags, const struct unixinfo_UidToSid *r)
165 if (flags & NDR_IN) {
166 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uid));
168 if (flags & NDR_OUT) {
169 if (r->out.sid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
170 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
171 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
173 return NT_STATUS_OK;
176 NTSTATUS ndr_pull_unixinfo_UidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_UidToSid *r)
178 TALLOC_CTX *_mem_save_sid_0;
179 if (flags & NDR_IN) {
180 ZERO_STRUCT(r->out);
182 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uid));
183 NDR_PULL_ALLOC(ndr, r->out.sid);
184 ZERO_STRUCTP(r->out.sid);
186 if (flags & NDR_OUT) {
187 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
188 NDR_PULL_ALLOC(ndr, r->out.sid);
190 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
191 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
192 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
193 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
194 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
196 return NT_STATUS_OK;
199 void ndr_print_unixinfo_UidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_UidToSid *r)
201 ndr_print_struct(ndr, name, "unixinfo_UidToSid");
202 ndr->depth++;
203 if (flags & NDR_SET_VALUES) {
204 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
206 if (flags & NDR_IN) {
207 ndr_print_struct(ndr, "in", "unixinfo_UidToSid");
208 ndr->depth++;
209 ndr_print_hyper(ndr, "uid", r->in.uid);
210 ndr->depth--;
212 if (flags & NDR_OUT) {
213 ndr_print_struct(ndr, "out", "unixinfo_UidToSid");
214 ndr->depth++;
215 ndr_print_ptr(ndr, "sid", r->out.sid);
216 ndr->depth++;
217 ndr_print_dom_sid(ndr, "sid", r->out.sid);
218 ndr->depth--;
219 ndr_print_NTSTATUS(ndr, "result", r->out.result);
220 ndr->depth--;
222 ndr->depth--;
225 NTSTATUS ndr_push_unixinfo_SidToGid(struct ndr_push *ndr, int flags, const struct unixinfo_SidToGid *r)
227 if (flags & NDR_IN) {
228 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid));
230 if (flags & NDR_OUT) {
231 if (r->out.gid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
232 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.gid));
233 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
235 return NT_STATUS_OK;
238 NTSTATUS ndr_pull_unixinfo_SidToGid(struct ndr_pull *ndr, int flags, struct unixinfo_SidToGid *r)
240 TALLOC_CTX *_mem_save_gid_0;
241 if (flags & NDR_IN) {
242 ZERO_STRUCT(r->out);
244 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid));
245 NDR_PULL_ALLOC(ndr, r->out.gid);
246 ZERO_STRUCTP(r->out.gid);
248 if (flags & NDR_OUT) {
249 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
250 NDR_PULL_ALLOC(ndr, r->out.gid);
252 _mem_save_gid_0 = NDR_PULL_GET_MEM_CTX(ndr);
253 NDR_PULL_SET_MEM_CTX(ndr, r->out.gid, LIBNDR_FLAG_REF_ALLOC);
254 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.gid));
255 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gid_0, LIBNDR_FLAG_REF_ALLOC);
256 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
258 return NT_STATUS_OK;
261 void ndr_print_unixinfo_SidToGid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToGid *r)
263 ndr_print_struct(ndr, name, "unixinfo_SidToGid");
264 ndr->depth++;
265 if (flags & NDR_SET_VALUES) {
266 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
268 if (flags & NDR_IN) {
269 ndr_print_struct(ndr, "in", "unixinfo_SidToGid");
270 ndr->depth++;
271 ndr_print_dom_sid(ndr, "sid", &r->in.sid);
272 ndr->depth--;
274 if (flags & NDR_OUT) {
275 ndr_print_struct(ndr, "out", "unixinfo_SidToGid");
276 ndr->depth++;
277 ndr_print_ptr(ndr, "gid", r->out.gid);
278 ndr->depth++;
279 ndr_print_hyper(ndr, "gid", *r->out.gid);
280 ndr->depth--;
281 ndr_print_NTSTATUS(ndr, "result", r->out.result);
282 ndr->depth--;
284 ndr->depth--;
287 NTSTATUS ndr_push_unixinfo_GidToSid(struct ndr_push *ndr, int flags, const struct unixinfo_GidToSid *r)
289 if (flags & NDR_IN) {
290 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.gid));
292 if (flags & NDR_OUT) {
293 if (r->out.sid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
294 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
295 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
297 return NT_STATUS_OK;
300 NTSTATUS ndr_pull_unixinfo_GidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_GidToSid *r)
302 TALLOC_CTX *_mem_save_sid_0;
303 if (flags & NDR_IN) {
304 ZERO_STRUCT(r->out);
306 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.gid));
307 NDR_PULL_ALLOC(ndr, r->out.sid);
308 ZERO_STRUCTP(r->out.sid);
310 if (flags & NDR_OUT) {
311 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
312 NDR_PULL_ALLOC(ndr, r->out.sid);
314 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
315 NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
316 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
317 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
318 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
320 return NT_STATUS_OK;
323 void ndr_print_unixinfo_GidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GidToSid *r)
325 ndr_print_struct(ndr, name, "unixinfo_GidToSid");
326 ndr->depth++;
327 if (flags & NDR_SET_VALUES) {
328 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
330 if (flags & NDR_IN) {
331 ndr_print_struct(ndr, "in", "unixinfo_GidToSid");
332 ndr->depth++;
333 ndr_print_hyper(ndr, "gid", r->in.gid);
334 ndr->depth--;
336 if (flags & NDR_OUT) {
337 ndr_print_struct(ndr, "out", "unixinfo_GidToSid");
338 ndr->depth++;
339 ndr_print_ptr(ndr, "sid", r->out.sid);
340 ndr->depth++;
341 ndr_print_dom_sid(ndr, "sid", r->out.sid);
342 ndr->depth--;
343 ndr_print_NTSTATUS(ndr, "result", r->out.result);
344 ndr->depth--;
346 ndr->depth--;
349 NTSTATUS ndr_push_unixinfo_GetPWUid(struct ndr_push *ndr, int flags, const struct unixinfo_GetPWUid *r)
351 uint32_t cntr_uids_0;
352 uint32_t cntr_infos_1;
353 if (flags & NDR_IN) {
354 if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
355 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
356 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
357 for (cntr_uids_0 = 0; cntr_uids_0 < *r->in.count; cntr_uids_0++) {
358 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uids[cntr_uids_0]));
361 if (flags & NDR_OUT) {
362 if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
363 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
364 if (r->out.infos == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
365 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
366 for (cntr_infos_1 = 0; cntr_infos_1 < *r->out.count; cntr_infos_1++) {
367 NDR_CHECK(ndr_push_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_1]));
369 for (cntr_infos_1 = 0; cntr_infos_1 < *r->out.count; cntr_infos_1++) {
370 NDR_CHECK(ndr_push_unixinfo_GetPWUidInfo(ndr, NDR_BUFFERS, &r->out.infos[cntr_infos_1]));
372 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
374 return NT_STATUS_OK;
377 NTSTATUS ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, int flags, struct unixinfo_GetPWUid *r)
379 uint32_t cntr_uids_0;
380 uint32_t cntr_infos_1;
381 TALLOC_CTX *_mem_save_count_0;
382 TALLOC_CTX *_mem_save_uids_0;
383 TALLOC_CTX *_mem_save_infos_1;
384 if (flags & NDR_IN) {
385 ZERO_STRUCT(r->out);
387 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
388 NDR_PULL_ALLOC(ndr, r->in.count);
390 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
391 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
392 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
393 if (*r->in.count < 0 || *r->in.count > 1023) {
394 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
396 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
397 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.uids));
398 NDR_PULL_ALLOC_N(ndr, r->in.uids, ndr_get_array_size(ndr, &r->in.uids));
399 _mem_save_uids_0 = NDR_PULL_GET_MEM_CTX(ndr);
400 NDR_PULL_SET_MEM_CTX(ndr, r->in.uids, 0);
401 for (cntr_uids_0 = 0; cntr_uids_0 < *r->in.count; cntr_uids_0++) {
402 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uids[cntr_uids_0]));
404 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uids_0, 0);
405 NDR_PULL_ALLOC(ndr, r->out.count);
406 *r->out.count = *r->in.count;
407 if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
408 NDR_PULL_ALLOC_N(ndr, r->out.infos, *r->in.count);
409 memset(r->out.infos, 0, *r->in.count * sizeof(*r->out.infos));
410 if (r->in.uids) {
411 if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
412 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.uids, *r->in.count));
415 if (flags & NDR_OUT) {
416 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
417 NDR_PULL_ALLOC(ndr, r->out.count);
419 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
420 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
421 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
422 if (*r->out.count < 0 || *r->out.count > 1023) {
423 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
425 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
426 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.infos));
427 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
428 NDR_PULL_ALLOC_N(ndr, r->out.infos, ndr_get_array_size(ndr, &r->out.infos));
430 _mem_save_infos_1 = NDR_PULL_GET_MEM_CTX(ndr);
431 NDR_PULL_SET_MEM_CTX(ndr, r->out.infos, 0);
432 for (cntr_infos_1 = 0; cntr_infos_1 < *r->out.count; cntr_infos_1++) {
433 NDR_CHECK(ndr_pull_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_1]));
435 for (cntr_infos_1 = 0; cntr_infos_1 < *r->out.count; cntr_infos_1++) {
436 NDR_CHECK(ndr_pull_unixinfo_GetPWUidInfo(ndr, NDR_BUFFERS, &r->out.infos[cntr_infos_1]));
438 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_infos_1, 0);
439 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
440 if (r->out.infos) {
441 if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
442 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.infos, *r->out.count));
445 return NT_STATUS_OK;
448 void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GetPWUid *r)
450 uint32_t cntr_uids_0;
451 uint32_t cntr_infos_1;
452 ndr_print_struct(ndr, name, "unixinfo_GetPWUid");
453 ndr->depth++;
454 if (flags & NDR_SET_VALUES) {
455 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
457 if (flags & NDR_IN) {
458 ndr_print_struct(ndr, "in", "unixinfo_GetPWUid");
459 ndr->depth++;
460 ndr_print_ptr(ndr, "count", r->in.count);
461 ndr->depth++;
462 ndr_print_uint32(ndr, "count", *r->in.count);
463 ndr->depth--;
464 ndr->print(ndr, "%s: ARRAY(%d)", "uids", *r->in.count);
465 ndr->depth++;
466 for (cntr_uids_0=0;cntr_uids_0<*r->in.count;cntr_uids_0++) {
467 char *idx_0=NULL;
468 asprintf(&idx_0, "[%d]", cntr_uids_0);
469 if (idx_0) {
470 ndr_print_hyper(ndr, "uids", r->in.uids[cntr_uids_0]);
471 free(idx_0);
474 ndr->depth--;
475 ndr->depth--;
477 if (flags & NDR_OUT) {
478 ndr_print_struct(ndr, "out", "unixinfo_GetPWUid");
479 ndr->depth++;
480 ndr_print_ptr(ndr, "count", r->out.count);
481 ndr->depth++;
482 ndr_print_uint32(ndr, "count", *r->out.count);
483 ndr->depth--;
484 ndr_print_ptr(ndr, "infos", r->out.infos);
485 ndr->depth++;
486 ndr->print(ndr, "%s: ARRAY(%d)", "infos", *r->out.count);
487 ndr->depth++;
488 for (cntr_infos_1=0;cntr_infos_1<*r->out.count;cntr_infos_1++) {
489 char *idx_1=NULL;
490 asprintf(&idx_1, "[%d]", cntr_infos_1);
491 if (idx_1) {
492 ndr_print_unixinfo_GetPWUidInfo(ndr, "infos", &r->out.infos[cntr_infos_1]);
493 free(idx_1);
496 ndr->depth--;
497 ndr->depth--;
498 ndr_print_NTSTATUS(ndr, "result", r->out.result);
499 ndr->depth--;
501 ndr->depth--;