Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_smb_acl.h"
5 :
6 110052 : static enum ndr_err_code ndr_push_smb_acl_tag_t(struct ndr_push *ndr, int ndr_flags, enum smb_acl_tag_t r)
7 : {
8 110052 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
9 110052 : return NDR_ERR_SUCCESS;
10 : }
11 :
12 118293 : static enum ndr_err_code ndr_pull_smb_acl_tag_t(struct ndr_pull *ndr, int ndr_flags, enum smb_acl_tag_t *r)
13 : {
14 : uint16_t v;
15 118293 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
16 118293 : *r = v;
17 118293 : return NDR_ERR_SUCCESS;
18 : }
19 :
20 0 : _PUBLIC_ void ndr_print_smb_acl_tag_t(struct ndr_print *ndr, const char *name, enum smb_acl_tag_t r)
21 : {
22 0 : const char *val = NULL;
23 :
24 0 : switch (r) {
25 0 : case SMB_ACL_TAG_INVALID: val = "SMB_ACL_TAG_INVALID"; break;
26 0 : case SMB_ACL_USER: val = "SMB_ACL_USER"; break;
27 0 : case SMB_ACL_USER_OBJ: val = "SMB_ACL_USER_OBJ"; break;
28 0 : case SMB_ACL_GROUP: val = "SMB_ACL_GROUP"; break;
29 0 : case SMB_ACL_GROUP_OBJ: val = "SMB_ACL_GROUP_OBJ"; break;
30 0 : case SMB_ACL_OTHER: val = "SMB_ACL_OTHER"; break;
31 0 : case SMB_ACL_MASK: val = "SMB_ACL_MASK"; break;
32 : }
33 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
34 0 : }
35 :
36 33493 : static enum ndr_err_code ndr_push_smb_acl_user(struct ndr_push *ndr, int ndr_flags, const struct smb_acl_user *r)
37 : {
38 33493 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
39 33493 : if (ndr_flags & NDR_SCALARS) {
40 33493 : NDR_CHECK(ndr_push_align(ndr, 8));
41 33493 : NDR_CHECK(ndr_push_uid_t(ndr, NDR_SCALARS, r->uid));
42 33493 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
43 : }
44 33493 : if (ndr_flags & NDR_BUFFERS) {
45 : }
46 33493 : return NDR_ERR_SUCCESS;
47 : }
48 :
49 36328 : static enum ndr_err_code ndr_pull_smb_acl_user(struct ndr_pull *ndr, int ndr_flags, struct smb_acl_user *r)
50 : {
51 36328 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
52 36328 : if (ndr_flags & NDR_SCALARS) {
53 36328 : NDR_CHECK(ndr_pull_align(ndr, 8));
54 36328 : NDR_CHECK(ndr_pull_uid_t(ndr, NDR_SCALARS, &r->uid));
55 36328 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
56 : }
57 36328 : if (ndr_flags & NDR_BUFFERS) {
58 : }
59 36328 : return NDR_ERR_SUCCESS;
60 : }
61 :
62 0 : _PUBLIC_ void ndr_print_smb_acl_user(struct ndr_print *ndr, const char *name, const struct smb_acl_user *r)
63 : {
64 0 : ndr_print_struct(ndr, name, "smb_acl_user");
65 0 : if (r == NULL) { ndr_print_null(ndr); return; }
66 0 : ndr->depth++;
67 0 : ndr_print_uid_t(ndr, "uid", r->uid);
68 0 : ndr->depth--;
69 : }
70 :
71 36139 : static enum ndr_err_code ndr_push_smb_acl_group(struct ndr_push *ndr, int ndr_flags, const struct smb_acl_group *r)
72 : {
73 36139 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
74 36139 : if (ndr_flags & NDR_SCALARS) {
75 36139 : NDR_CHECK(ndr_push_align(ndr, 8));
76 36139 : NDR_CHECK(ndr_push_gid_t(ndr, NDR_SCALARS, r->gid));
77 36139 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
78 : }
79 36139 : if (ndr_flags & NDR_BUFFERS) {
80 : }
81 36139 : return NDR_ERR_SUCCESS;
82 : }
83 :
84 38853 : static enum ndr_err_code ndr_pull_smb_acl_group(struct ndr_pull *ndr, int ndr_flags, struct smb_acl_group *r)
85 : {
86 38853 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
87 38853 : if (ndr_flags & NDR_SCALARS) {
88 38853 : NDR_CHECK(ndr_pull_align(ndr, 8));
89 38853 : NDR_CHECK(ndr_pull_gid_t(ndr, NDR_SCALARS, &r->gid));
90 38853 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
91 : }
92 38853 : if (ndr_flags & NDR_BUFFERS) {
93 : }
94 38853 : return NDR_ERR_SUCCESS;
95 : }
96 :
97 0 : _PUBLIC_ void ndr_print_smb_acl_group(struct ndr_print *ndr, const char *name, const struct smb_acl_group *r)
98 : {
99 0 : ndr_print_struct(ndr, name, "smb_acl_group");
100 0 : if (r == NULL) { ndr_print_null(ndr); return; }
101 0 : ndr->depth++;
102 0 : ndr_print_gid_t(ndr, "gid", r->gid);
103 0 : ndr->depth--;
104 : }
105 :
106 220104 : static enum ndr_err_code ndr_push_smb_acl_entry_info(struct ndr_push *ndr, int ndr_flags, const union smb_acl_entry_info *r)
107 : {
108 : uint32_t level;
109 220104 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
110 220104 : if (ndr_flags & NDR_SCALARS) {
111 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
112 110052 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
113 110052 : NDR_CHECK(ndr_push_union_align(ndr, 8));
114 110052 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
115 110052 : NDR_CHECK(ndr_push_union_align(ndr, 8));
116 110052 : switch (level) {
117 33493 : case SMB_ACL_USER: {
118 33493 : NDR_CHECK(ndr_push_smb_acl_user(ndr, NDR_SCALARS, &r->user));
119 33493 : break; }
120 :
121 10105 : case SMB_ACL_USER_OBJ: {
122 10105 : break; }
123 :
124 36139 : case SMB_ACL_GROUP: {
125 36139 : NDR_CHECK(ndr_push_smb_acl_group(ndr, NDR_SCALARS, &r->group));
126 36139 : break; }
127 :
128 10105 : case SMB_ACL_GROUP_OBJ: {
129 10105 : break; }
130 :
131 10105 : case SMB_ACL_OTHER: {
132 10105 : break; }
133 :
134 10105 : case SMB_ACL_MASK: {
135 10105 : break; }
136 :
137 0 : default:
138 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
139 : }
140 94517 : }
141 220104 : if (ndr_flags & NDR_BUFFERS) {
142 110052 : if (!(ndr_flags & NDR_SCALARS)) {
143 : /* We didn't get it above, and the token is not needed after this. */
144 110052 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
145 : }
146 110052 : switch (level) {
147 33493 : case SMB_ACL_USER:
148 33493 : break;
149 :
150 10105 : case SMB_ACL_USER_OBJ:
151 10105 : break;
152 :
153 36139 : case SMB_ACL_GROUP:
154 36139 : break;
155 :
156 10105 : case SMB_ACL_GROUP_OBJ:
157 10105 : break;
158 :
159 10105 : case SMB_ACL_OTHER:
160 10105 : break;
161 :
162 10105 : case SMB_ACL_MASK:
163 10105 : break;
164 :
165 0 : default:
166 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
167 : }
168 94517 : }
169 220104 : return NDR_ERR_SUCCESS;
170 : }
171 :
172 236586 : static enum ndr_err_code ndr_pull_smb_acl_entry_info(struct ndr_pull *ndr, int ndr_flags, union smb_acl_entry_info *r)
173 : {
174 : uint32_t level;
175 : uint16_t _level;
176 236586 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
177 236586 : if (ndr_flags & NDR_SCALARS) {
178 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
179 118293 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
180 118293 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
181 118293 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
182 118293 : if (_level != level) {
183 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
184 : }
185 118293 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
186 118293 : switch (level) {
187 36328 : case SMB_ACL_USER: {
188 36328 : NDR_CHECK(ndr_pull_smb_acl_user(ndr, NDR_SCALARS, &r->user));
189 36328 : break; }
190 :
191 10778 : case SMB_ACL_USER_OBJ: {
192 10778 : break; }
193 :
194 38853 : case SMB_ACL_GROUP: {
195 38853 : NDR_CHECK(ndr_pull_smb_acl_group(ndr, NDR_SCALARS, &r->group));
196 38853 : break; }
197 :
198 10778 : case SMB_ACL_GROUP_OBJ: {
199 10778 : break; }
200 :
201 10778 : case SMB_ACL_OTHER: {
202 10778 : break; }
203 :
204 10778 : case SMB_ACL_MASK: {
205 10778 : break; }
206 :
207 0 : default:
208 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
209 : }
210 101021 : }
211 236586 : if (ndr_flags & NDR_BUFFERS) {
212 118293 : if (!(ndr_flags & NDR_SCALARS)) {
213 : /* We didn't get it above, and the token is not needed after this. */
214 118293 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
215 : }
216 118293 : switch (level) {
217 36328 : case SMB_ACL_USER:
218 36328 : break;
219 :
220 10778 : case SMB_ACL_USER_OBJ:
221 10778 : break;
222 :
223 38853 : case SMB_ACL_GROUP:
224 38853 : break;
225 :
226 10778 : case SMB_ACL_GROUP_OBJ:
227 10778 : break;
228 :
229 10778 : case SMB_ACL_OTHER:
230 10778 : break;
231 :
232 10778 : case SMB_ACL_MASK:
233 10778 : break;
234 :
235 0 : default:
236 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
237 : }
238 101021 : }
239 236586 : return NDR_ERR_SUCCESS;
240 : }
241 :
242 0 : _PUBLIC_ void ndr_print_smb_acl_entry_info(struct ndr_print *ndr, const char *name, const union smb_acl_entry_info *r)
243 : {
244 : uint32_t level;
245 0 : level = ndr_print_steal_switch_value(ndr, r);
246 0 : ndr_print_union(ndr, name, level, "smb_acl_entry_info");
247 0 : switch (level) {
248 0 : case SMB_ACL_USER:
249 0 : ndr_print_smb_acl_user(ndr, "user", &r->user);
250 0 : break;
251 :
252 0 : case SMB_ACL_USER_OBJ:
253 0 : break;
254 :
255 0 : case SMB_ACL_GROUP:
256 0 : ndr_print_smb_acl_group(ndr, "group", &r->group);
257 0 : break;
258 :
259 0 : case SMB_ACL_GROUP_OBJ:
260 0 : break;
261 :
262 0 : case SMB_ACL_OTHER:
263 0 : break;
264 :
265 0 : case SMB_ACL_MASK:
266 0 : break;
267 :
268 0 : default:
269 0 : ndr_print_bad_level(ndr, name, level);
270 : }
271 0 : }
272 :
273 220104 : static enum ndr_err_code ndr_push_smb_acl_entry(struct ndr_push *ndr, int ndr_flags, const struct smb_acl_entry *r)
274 : {
275 220104 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
276 220104 : if (ndr_flags & NDR_SCALARS) {
277 110052 : NDR_CHECK(ndr_push_align(ndr, 8));
278 110052 : NDR_CHECK(ndr_push_smb_acl_tag_t(ndr, NDR_SCALARS, r->a_type));
279 110052 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->a_type));
280 110052 : NDR_CHECK(ndr_push_smb_acl_entry_info(ndr, NDR_SCALARS, &r->info));
281 110052 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->a_perm));
282 110052 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
283 : }
284 220104 : if (ndr_flags & NDR_BUFFERS) {
285 110052 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->a_type));
286 110052 : NDR_CHECK(ndr_push_smb_acl_entry_info(ndr, NDR_BUFFERS, &r->info));
287 : }
288 220104 : return NDR_ERR_SUCCESS;
289 : }
290 :
291 236586 : static enum ndr_err_code ndr_pull_smb_acl_entry(struct ndr_pull *ndr, int ndr_flags, struct smb_acl_entry *r)
292 : {
293 236586 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
294 236586 : if (ndr_flags & NDR_SCALARS) {
295 118293 : NDR_CHECK(ndr_pull_align(ndr, 8));
296 118293 : NDR_CHECK(ndr_pull_smb_acl_tag_t(ndr, NDR_SCALARS, &r->a_type));
297 118293 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->a_type));
298 118293 : NDR_CHECK(ndr_pull_smb_acl_entry_info(ndr, NDR_SCALARS, &r->info));
299 118293 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->a_perm));
300 118293 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
301 : }
302 236586 : if (ndr_flags & NDR_BUFFERS) {
303 118293 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->a_type));
304 118293 : NDR_CHECK(ndr_pull_smb_acl_entry_info(ndr, NDR_BUFFERS, &r->info));
305 : }
306 236586 : return NDR_ERR_SUCCESS;
307 : }
308 :
309 0 : _PUBLIC_ void ndr_print_smb_acl_entry(struct ndr_print *ndr, const char *name, const struct smb_acl_entry *r)
310 : {
311 0 : ndr_print_struct(ndr, name, "smb_acl_entry");
312 0 : if (r == NULL) { ndr_print_null(ndr); return; }
313 0 : ndr->depth++;
314 0 : ndr_print_smb_acl_tag_t(ndr, "a_type", r->a_type);
315 0 : ndr_print_set_switch_value(ndr, &r->info, r->a_type);
316 0 : ndr_print_smb_acl_entry_info(ndr, "info", &r->info);
317 0 : ndr_print_uint32(ndr, "a_perm", r->a_perm);
318 0 : ndr->depth--;
319 : }
320 :
321 10105 : _PUBLIC_ enum ndr_err_code ndr_push_smb_acl_t(struct ndr_push *ndr, int ndr_flags, const struct smb_acl_t *r)
322 : {
323 : uint32_t cntr_acl_0;
324 10105 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
325 10105 : if (ndr_flags & NDR_SCALARS) {
326 10105 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
327 10105 : NDR_CHECK(ndr_push_align(ndr, 8));
328 10105 : NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->count));
329 10105 : NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, 0));
330 120157 : for (cntr_acl_0 = 0; cntr_acl_0 < (r->count); cntr_acl_0++) {
331 110052 : NDR_CHECK(ndr_push_smb_acl_entry(ndr, NDR_SCALARS, &r->acl[cntr_acl_0]));
332 : }
333 10105 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
334 : }
335 10105 : if (ndr_flags & NDR_BUFFERS) {
336 120157 : for (cntr_acl_0 = 0; cntr_acl_0 < (r->count); cntr_acl_0++) {
337 110052 : NDR_CHECK(ndr_push_smb_acl_entry(ndr, NDR_BUFFERS, &r->acl[cntr_acl_0]));
338 : }
339 : }
340 10105 : return NDR_ERR_SUCCESS;
341 : }
342 :
343 10778 : _PUBLIC_ enum ndr_err_code ndr_pull_smb_acl_t(struct ndr_pull *ndr, int ndr_flags, struct smb_acl_t *r)
344 : {
345 10778 : uint32_t size_acl_0 = 0;
346 : uint32_t cntr_acl_0;
347 10778 : TALLOC_CTX *_mem_save_acl_0 = NULL;
348 10778 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
349 10778 : if (ndr_flags & NDR_SCALARS) {
350 10778 : NDR_CHECK(ndr_pull_array_size(ndr, &r->acl));
351 10778 : NDR_CHECK(ndr_pull_align(ndr, 8));
352 10778 : NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->count));
353 10778 : NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->next));
354 10778 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->acl, &size_acl_0));
355 10778 : NDR_PULL_ALLOC_N(ndr, r->acl, size_acl_0);
356 10778 : _mem_save_acl_0 = NDR_PULL_GET_MEM_CTX(ndr);
357 10778 : NDR_PULL_SET_MEM_CTX(ndr, r->acl, 0);
358 129071 : for (cntr_acl_0 = 0; cntr_acl_0 < (size_acl_0); cntr_acl_0++) {
359 118293 : NDR_CHECK(ndr_pull_smb_acl_entry(ndr, NDR_SCALARS, &r->acl[cntr_acl_0]));
360 : }
361 10778 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acl_0, 0);
362 10778 : if (r->acl) {
363 10778 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->acl, r->count));
364 : }
365 10778 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
366 : }
367 10778 : if (ndr_flags & NDR_BUFFERS) {
368 10778 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->acl, &size_acl_0));
369 10778 : _mem_save_acl_0 = NDR_PULL_GET_MEM_CTX(ndr);
370 10778 : NDR_PULL_SET_MEM_CTX(ndr, r->acl, 0);
371 129071 : for (cntr_acl_0 = 0; cntr_acl_0 < (size_acl_0); cntr_acl_0++) {
372 118293 : NDR_CHECK(ndr_pull_smb_acl_entry(ndr, NDR_BUFFERS, &r->acl[cntr_acl_0]));
373 : }
374 10778 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acl_0, 0);
375 28050 : for (cntr_acl_0 = 0; cntr_acl_0 < (size_acl_0); cntr_acl_0++) {
376 : }
377 : }
378 10778 : return NDR_ERR_SUCCESS;
379 : }
380 :
381 0 : static void ndr_print_flags_smb_acl_t(struct ndr_print *ndr, const char *name, int unused, const struct smb_acl_t *r)
382 : {
383 0 : ndr_print_smb_acl_t(ndr, name, r);
384 0 : }
385 :
386 0 : _PUBLIC_ void ndr_print_smb_acl_t(struct ndr_print *ndr, const char *name, const struct smb_acl_t *r)
387 : {
388 : uint32_t cntr_acl_0;
389 0 : ndr_print_struct(ndr, name, "smb_acl_t");
390 0 : if (r == NULL) { ndr_print_null(ndr); return; }
391 0 : ndr->depth++;
392 0 : ndr_print_int32(ndr, "count", r->count);
393 0 : ndr_print_int32(ndr, "next", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->next);
394 0 : ndr->print(ndr, "%s: ARRAY(%d)", "acl", (int)r->count);
395 0 : ndr->depth++;
396 0 : for (cntr_acl_0 = 0; cntr_acl_0 < (r->count); cntr_acl_0++) {
397 0 : ndr_print_smb_acl_entry(ndr, "acl", &r->acl[cntr_acl_0]);
398 : }
399 0 : ndr->depth--;
400 0 : ndr->depth--;
401 : }
402 :
403 7655 : _PUBLIC_ enum ndr_err_code ndr_push_smb_acl_wrapper(struct ndr_push *ndr, int ndr_flags, const struct smb_acl_wrapper *r)
404 : {
405 7655 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
406 7655 : if (ndr_flags & NDR_SCALARS) {
407 7655 : NDR_CHECK(ndr_push_align(ndr, 8));
408 7655 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->access_acl));
409 7655 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->default_acl));
410 7655 : NDR_CHECK(ndr_push_uid_t(ndr, NDR_SCALARS, r->owner));
411 7655 : NDR_CHECK(ndr_push_gid_t(ndr, NDR_SCALARS, r->group));
412 7655 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->mode));
413 7655 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
414 : }
415 7655 : if (ndr_flags & NDR_BUFFERS) {
416 7655 : if (r->access_acl) {
417 4631 : NDR_CHECK(ndr_push_smb_acl_t(ndr, NDR_SCALARS|NDR_BUFFERS, r->access_acl));
418 : }
419 7655 : if (r->default_acl) {
420 3756 : NDR_CHECK(ndr_push_smb_acl_t(ndr, NDR_SCALARS|NDR_BUFFERS, r->default_acl));
421 : }
422 : }
423 7655 : return NDR_ERR_SUCCESS;
424 : }
425 :
426 0 : _PUBLIC_ enum ndr_err_code ndr_pull_smb_acl_wrapper(struct ndr_pull *ndr, int ndr_flags, struct smb_acl_wrapper *r)
427 : {
428 : uint32_t _ptr_access_acl;
429 0 : TALLOC_CTX *_mem_save_access_acl_0 = NULL;
430 : uint32_t _ptr_default_acl;
431 0 : TALLOC_CTX *_mem_save_default_acl_0 = NULL;
432 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
433 0 : if (ndr_flags & NDR_SCALARS) {
434 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
435 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_access_acl));
436 0 : if (_ptr_access_acl) {
437 0 : NDR_PULL_ALLOC(ndr, r->access_acl);
438 : } else {
439 0 : r->access_acl = NULL;
440 : }
441 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_acl));
442 0 : if (_ptr_default_acl) {
443 0 : NDR_PULL_ALLOC(ndr, r->default_acl);
444 : } else {
445 0 : r->default_acl = NULL;
446 : }
447 0 : NDR_CHECK(ndr_pull_uid_t(ndr, NDR_SCALARS, &r->owner));
448 0 : NDR_CHECK(ndr_pull_gid_t(ndr, NDR_SCALARS, &r->group));
449 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->mode));
450 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
451 : }
452 0 : if (ndr_flags & NDR_BUFFERS) {
453 0 : if (r->access_acl) {
454 0 : _mem_save_access_acl_0 = NDR_PULL_GET_MEM_CTX(ndr);
455 0 : NDR_PULL_SET_MEM_CTX(ndr, r->access_acl, 0);
456 0 : NDR_CHECK(ndr_pull_smb_acl_t(ndr, NDR_SCALARS|NDR_BUFFERS, r->access_acl));
457 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_access_acl_0, 0);
458 : }
459 0 : if (r->default_acl) {
460 0 : _mem_save_default_acl_0 = NDR_PULL_GET_MEM_CTX(ndr);
461 0 : NDR_PULL_SET_MEM_CTX(ndr, r->default_acl, 0);
462 0 : NDR_CHECK(ndr_pull_smb_acl_t(ndr, NDR_SCALARS|NDR_BUFFERS, r->default_acl));
463 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_acl_0, 0);
464 : }
465 : }
466 0 : return NDR_ERR_SUCCESS;
467 : }
468 :
469 0 : static void ndr_print_flags_smb_acl_wrapper(struct ndr_print *ndr, const char *name, int unused, const struct smb_acl_wrapper *r)
470 : {
471 0 : ndr_print_smb_acl_wrapper(ndr, name, r);
472 0 : }
473 :
474 0 : _PUBLIC_ void ndr_print_smb_acl_wrapper(struct ndr_print *ndr, const char *name, const struct smb_acl_wrapper *r)
475 : {
476 0 : ndr_print_struct(ndr, name, "smb_acl_wrapper");
477 0 : if (r == NULL) { ndr_print_null(ndr); return; }
478 0 : ndr->depth++;
479 0 : ndr_print_ptr(ndr, "access_acl", r->access_acl);
480 0 : ndr->depth++;
481 0 : if (r->access_acl) {
482 0 : ndr_print_smb_acl_t(ndr, "access_acl", r->access_acl);
483 : }
484 0 : ndr->depth--;
485 0 : ndr_print_ptr(ndr, "default_acl", r->default_acl);
486 0 : ndr->depth++;
487 0 : if (r->default_acl) {
488 0 : ndr_print_smb_acl_t(ndr, "default_acl", r->default_acl);
489 : }
490 0 : ndr->depth--;
491 0 : ndr_print_uid_t(ndr, "owner", r->owner);
492 0 : ndr_print_gid_t(ndr, "group", r->group);
493 0 : ndr_print_uint32(ndr, "mode", r->mode);
494 0 : ndr->depth--;
495 : }
496 :
497 : #ifndef SKIP_NDR_TABLE_smb_acl
498 : static const struct ndr_interface_public_struct smb_acl_public_structs[] = {
499 : {
500 : .name = "smb_acl_t",
501 : .struct_size = sizeof(struct smb_acl_t ),
502 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smb_acl_t,
503 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smb_acl_t,
504 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smb_acl_t,
505 : },
506 : {
507 : .name = "smb_acl_wrapper",
508 : .struct_size = sizeof(struct smb_acl_wrapper ),
509 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_smb_acl_wrapper,
510 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smb_acl_wrapper,
511 : .ndr_print = (ndr_print_function_t) ndr_print_flags_smb_acl_wrapper,
512 : },
513 : { .name = NULL }
514 : };
515 :
516 : static const struct ndr_interface_call smb_acl_calls[] = {
517 : { .name = NULL }
518 : };
519 :
520 : static const char * const smb_acl_endpoint_strings[] = {
521 : "ncacn_np:[\\pipe\\smb_acl]",
522 : };
523 :
524 : static const struct ndr_interface_string_array smb_acl_endpoints = {
525 : .count = 1,
526 : .names = smb_acl_endpoint_strings
527 : };
528 :
529 : static const char * const smb_acl_authservice_strings[] = {
530 : "host",
531 : };
532 :
533 : static const struct ndr_interface_string_array smb_acl_authservices = {
534 : .count = 1,
535 : .names = smb_acl_authservice_strings
536 : };
537 :
538 :
539 : const struct ndr_interface_table ndr_table_smb_acl = {
540 : .name = "smb_acl",
541 : .num_calls = 0,
542 : .calls = smb_acl_calls,
543 : .num_public_structs = 2,
544 : .public_structs = smb_acl_public_structs,
545 : .endpoints = &smb_acl_endpoints,
546 : .authservices = &smb_acl_authservices
547 : };
548 :
549 : #endif /* SKIP_NDR_TABLE_smb_acl */
|