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 9329538 : static enum ndr_err_code ndr_push_smb_acl_tag_t(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum smb_acl_tag_t r)
7 : {
8 9329538 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
9 9310297 : return NDR_ERR_SUCCESS;
10 : }
11 :
12 9251284 : static enum ndr_err_code ndr_pull_smb_acl_tag_t(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum smb_acl_tag_t *r)
13 : {
14 20344 : uint16_t v;
15 9251284 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
16 9251284 : *r = v;
17 9251284 : 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 1193668 : static enum ndr_err_code ndr_push_smb_acl_user(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct smb_acl_user *r)
37 : {
38 1193668 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
39 1193668 : if (ndr_flags & NDR_SCALARS) {
40 1193668 : NDR_CHECK(ndr_push_align(ndr, 8));
41 1193668 : NDR_CHECK(ndr_push_uid_t(ndr, NDR_SCALARS, r->uid));
42 1193668 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
43 : }
44 1193668 : if (ndr_flags & NDR_BUFFERS) {
45 2364 : }
46 1193668 : return NDR_ERR_SUCCESS;
47 : }
48 :
49 1184231 : static enum ndr_err_code ndr_pull_smb_acl_user(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct smb_acl_user *r)
50 : {
51 1184231 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
52 1184231 : if (ndr_flags & NDR_SCALARS) {
53 1184231 : NDR_CHECK(ndr_pull_align(ndr, 8));
54 1184231 : NDR_CHECK(ndr_pull_uid_t(ndr, NDR_SCALARS, &r->uid));
55 1184231 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
56 : }
57 1184231 : if (ndr_flags & NDR_BUFFERS) {
58 2530 : }
59 1184231 : 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 2011906 : static enum ndr_err_code ndr_push_smb_acl_group(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct smb_acl_group *r)
72 : {
73 2011906 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
74 2011906 : if (ndr_flags & NDR_SCALARS) {
75 2011906 : NDR_CHECK(ndr_push_align(ndr, 8));
76 2011906 : NDR_CHECK(ndr_push_gid_t(ndr, NDR_SCALARS, r->gid));
77 2011906 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
78 : }
79 2011906 : if (ndr_flags & NDR_BUFFERS) {
80 5597 : }
81 2011906 : return NDR_ERR_SUCCESS;
82 : }
83 :
84 1992577 : static enum ndr_err_code ndr_pull_smb_acl_group(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct smb_acl_group *r)
85 : {
86 1992577 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
87 1992577 : if (ndr_flags & NDR_SCALARS) {
88 1992577 : NDR_CHECK(ndr_pull_align(ndr, 8));
89 1992577 : NDR_CHECK(ndr_pull_gid_t(ndr, NDR_SCALARS, &r->gid));
90 1992577 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
91 : }
92 1992577 : if (ndr_flags & NDR_BUFFERS) {
93 5954 : }
94 1992577 : 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 18659076 : static enum ndr_err_code ndr_push_smb_acl_entry_info(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union smb_acl_entry_info *r)
107 : {
108 38482 : uint32_t level;
109 18659076 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
110 18659076 : if (ndr_flags & NDR_SCALARS) {
111 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
112 9329538 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
113 9329538 : NDR_CHECK(ndr_push_union_align(ndr, 8));
114 9329538 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
115 9329538 : NDR_CHECK(ndr_push_union_align(ndr, 8));
116 9329538 : switch (level) {
117 1193668 : case SMB_ACL_USER: {
118 1193668 : NDR_CHECK(ndr_push_smb_acl_user(ndr, NDR_SCALARS, &r->user));
119 1191304 : break; }
120 :
121 1528196 : case SMB_ACL_USER_OBJ: {
122 1528196 : break; }
123 :
124 2011906 : case SMB_ACL_GROUP: {
125 2011906 : NDR_CHECK(ndr_push_smb_acl_group(ndr, NDR_SCALARS, &r->group));
126 2006309 : break; }
127 :
128 1528196 : case SMB_ACL_GROUP_OBJ: {
129 1528196 : break; }
130 :
131 1528196 : case SMB_ACL_OTHER: {
132 1528196 : break; }
133 :
134 1528096 : case SMB_ACL_MASK: {
135 1528096 : break; }
136 :
137 0 : default:
138 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
139 : }
140 : }
141 18659076 : if (ndr_flags & NDR_BUFFERS) {
142 9329538 : if (!(ndr_flags & NDR_SCALARS)) {
143 : /* We didn't get it above, and the token is not needed after this. */
144 9329538 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
145 : }
146 9329538 : switch (level) {
147 1191304 : case SMB_ACL_USER:
148 1191304 : break;
149 :
150 1528196 : case SMB_ACL_USER_OBJ:
151 1528196 : break;
152 :
153 2006309 : case SMB_ACL_GROUP:
154 2006309 : break;
155 :
156 1528196 : case SMB_ACL_GROUP_OBJ:
157 1528196 : break;
158 :
159 1528196 : case SMB_ACL_OTHER:
160 1528196 : break;
161 :
162 1528096 : case SMB_ACL_MASK:
163 1528096 : break;
164 :
165 0 : default:
166 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
167 : }
168 : }
169 18620594 : return NDR_ERR_SUCCESS;
170 : }
171 :
172 18502568 : static enum ndr_err_code ndr_pull_smb_acl_entry_info(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union smb_acl_entry_info *r)
173 : {
174 40688 : uint32_t level;
175 40688 : uint16_t _level;
176 18502568 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
177 18502568 : if (ndr_flags & NDR_SCALARS) {
178 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
179 9251284 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
180 9251284 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
181 9251284 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
182 9251284 : if (_level != level) {
183 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
184 : }
185 9251284 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
186 9251284 : switch (level) {
187 1184231 : case SMB_ACL_USER: {
188 1184231 : NDR_CHECK(ndr_pull_smb_acl_user(ndr, NDR_SCALARS, &r->user));
189 1181701 : break; }
190 :
191 1515654 : case SMB_ACL_USER_OBJ: {
192 1515654 : break; }
193 :
194 1992577 : case SMB_ACL_GROUP: {
195 1992577 : NDR_CHECK(ndr_pull_smb_acl_group(ndr, NDR_SCALARS, &r->group));
196 1986623 : break; }
197 :
198 1515654 : case SMB_ACL_GROUP_OBJ: {
199 1515654 : break; }
200 :
201 1515654 : case SMB_ACL_OTHER: {
202 1515654 : break; }
203 :
204 1515654 : case SMB_ACL_MASK: {
205 1515654 : break; }
206 :
207 0 : default:
208 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
209 : }
210 : }
211 18502568 : if (ndr_flags & NDR_BUFFERS) {
212 9251284 : if (!(ndr_flags & NDR_SCALARS)) {
213 : /* We didn't get it above, and the token is not needed after this. */
214 9251284 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
215 : }
216 9251284 : switch (level) {
217 1181701 : case SMB_ACL_USER:
218 1181701 : break;
219 :
220 1515654 : case SMB_ACL_USER_OBJ:
221 1515654 : break;
222 :
223 1986623 : case SMB_ACL_GROUP:
224 1986623 : break;
225 :
226 1515654 : case SMB_ACL_GROUP_OBJ:
227 1515654 : break;
228 :
229 1515654 : case SMB_ACL_OTHER:
230 1515654 : break;
231 :
232 1515654 : case SMB_ACL_MASK:
233 1515654 : break;
234 :
235 0 : default:
236 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
237 : }
238 : }
239 18461880 : 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 0 : 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 18659076 : static enum ndr_err_code ndr_push_smb_acl_entry(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct smb_acl_entry *r)
274 : {
275 18659076 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
276 18659076 : if (ndr_flags & NDR_SCALARS) {
277 9329538 : NDR_CHECK(ndr_push_align(ndr, 8));
278 9348779 : NDR_CHECK(ndr_push_smb_acl_tag_t(ndr, NDR_SCALARS, r->a_type));
279 9329538 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->a_type));
280 9329538 : NDR_CHECK(ndr_push_smb_acl_entry_info(ndr, NDR_SCALARS, &r->info));
281 9329538 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->a_perm));
282 9329538 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
283 : }
284 18659076 : if (ndr_flags & NDR_BUFFERS) {
285 9329538 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->a_type));
286 9329538 : NDR_CHECK(ndr_push_smb_acl_entry_info(ndr, NDR_BUFFERS, &r->info));
287 : }
288 18620594 : return NDR_ERR_SUCCESS;
289 : }
290 :
291 18502568 : static enum ndr_err_code ndr_pull_smb_acl_entry(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct smb_acl_entry *r)
292 : {
293 18502568 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
294 18502568 : if (ndr_flags & NDR_SCALARS) {
295 9251284 : NDR_CHECK(ndr_pull_align(ndr, 8));
296 9271628 : NDR_CHECK(ndr_pull_smb_acl_tag_t(ndr, NDR_SCALARS, &r->a_type));
297 9251284 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->a_type));
298 9251284 : NDR_CHECK(ndr_pull_smb_acl_entry_info(ndr, NDR_SCALARS, &r->info));
299 9251284 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->a_perm));
300 9251284 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
301 : }
302 18502568 : if (ndr_flags & NDR_BUFFERS) {
303 9251284 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->a_type));
304 9251284 : NDR_CHECK(ndr_pull_smb_acl_entry_info(ndr, NDR_BUFFERS, &r->info));
305 : }
306 18461880 : 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 1531056 : _PUBLIC_ enum ndr_err_code ndr_push_smb_acl_t(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct smb_acl_t *r)
322 : {
323 2820 : uint32_t cntr_acl_0;
324 1531056 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
325 1531056 : if (ndr_flags & NDR_SCALARS) {
326 1531056 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
327 1531056 : NDR_CHECK(ndr_push_align(ndr, 8));
328 1531056 : NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->count));
329 1531056 : NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, 0));
330 10860594 : for (cntr_acl_0 = 0; cntr_acl_0 < (r->count); cntr_acl_0++) {
331 9329538 : NDR_CHECK(ndr_push_smb_acl_entry(ndr, NDR_SCALARS, &r->acl[cntr_acl_0]));
332 : }
333 1531056 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
334 : }
335 1531056 : if (ndr_flags & NDR_BUFFERS) {
336 10860594 : for (cntr_acl_0 = 0; cntr_acl_0 < (r->count); cntr_acl_0++) {
337 9329538 : NDR_CHECK(ndr_push_smb_acl_entry(ndr, NDR_BUFFERS, &r->acl[cntr_acl_0]));
338 : }
339 : }
340 1528236 : return NDR_ERR_SUCCESS;
341 : }
342 :
343 1518643 : _PUBLIC_ enum ndr_err_code ndr_pull_smb_acl_t(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct smb_acl_t *r)
344 : {
345 1518643 : uint32_t size_acl_0 = 0;
346 2965 : uint32_t cntr_acl_0;
347 1518643 : TALLOC_CTX *_mem_save_acl_0 = NULL;
348 1518643 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
349 1518643 : if (ndr_flags & NDR_SCALARS) {
350 1518643 : NDR_CHECK(ndr_pull_array_size(ndr, &r->acl));
351 1518619 : NDR_CHECK(ndr_pull_align(ndr, 8));
352 1518619 : NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->count));
353 1518619 : NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->next));
354 1518619 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->acl, &size_acl_0));
355 1518619 : NDR_PULL_ALLOC_N(ndr, r->acl, size_acl_0);
356 1518619 : _mem_save_acl_0 = NDR_PULL_GET_MEM_CTX(ndr);
357 1518619 : NDR_PULL_SET_MEM_CTX(ndr, r->acl, 0);
358 10769903 : for (cntr_acl_0 = 0; cntr_acl_0 < (size_acl_0); cntr_acl_0++) {
359 9251284 : NDR_CHECK(ndr_pull_smb_acl_entry(ndr, NDR_SCALARS, &r->acl[cntr_acl_0]));
360 : }
361 1518619 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acl_0, 0);
362 1518619 : if (r->acl) {
363 1518619 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->acl, r->count));
364 : }
365 1518619 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
366 : }
367 1518619 : if (ndr_flags & NDR_BUFFERS) {
368 1518619 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->acl, &size_acl_0));
369 1518619 : _mem_save_acl_0 = NDR_PULL_GET_MEM_CTX(ndr);
370 1518619 : NDR_PULL_SET_MEM_CTX(ndr, r->acl, 0);
371 10769903 : for (cntr_acl_0 = 0; cntr_acl_0 < (size_acl_0); cntr_acl_0++) {
372 9251284 : NDR_CHECK(ndr_pull_smb_acl_entry(ndr, NDR_BUFFERS, &r->acl[cntr_acl_0]));
373 : }
374 1518619 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acl_0, 0);
375 10749559 : for (cntr_acl_0 = 0; cntr_acl_0 < (size_acl_0); cntr_acl_0++) {
376 : }
377 : }
378 1515654 : return NDR_ERR_SUCCESS;
379 : }
380 :
381 0 : static void ndr_print_flags_smb_acl_t(struct ndr_print *ndr, const char *name, ndr_flags_type 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 0 : 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(%"PRIu32")", "acl", (uint32_t)(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 913369 : _PUBLIC_ enum ndr_err_code ndr_push_smb_acl_wrapper(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct smb_acl_wrapper *r)
404 : {
405 913369 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
406 913369 : if (ndr_flags & NDR_SCALARS) {
407 913369 : NDR_CHECK(ndr_push_align(ndr, 8));
408 913369 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->access_acl));
409 913369 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->default_acl));
410 913369 : NDR_CHECK(ndr_push_uid_t(ndr, NDR_SCALARS, r->owner));
411 913369 : NDR_CHECK(ndr_push_gid_t(ndr, NDR_SCALARS, r->group));
412 913369 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->mode));
413 913369 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
414 : }
415 913369 : if (ndr_flags & NDR_BUFFERS) {
416 913369 : if (r->access_acl) {
417 906402 : NDR_CHECK(ndr_push_smb_acl_t(ndr, NDR_SCALARS|NDR_BUFFERS, r->access_acl));
418 : }
419 913369 : if (r->default_acl) {
420 461974 : NDR_CHECK(ndr_push_smb_acl_t(ndr, NDR_SCALARS|NDR_BUFFERS, r->default_acl));
421 : }
422 : }
423 911845 : return NDR_ERR_SUCCESS;
424 : }
425 :
426 0 : _PUBLIC_ enum ndr_err_code ndr_pull_smb_acl_wrapper(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct smb_acl_wrapper *r)
427 : {
428 0 : uint32_t _ptr_access_acl;
429 0 : TALLOC_CTX *_mem_save_access_acl_0 = NULL;
430 0 : 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, ndr_flags_type 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 */
|