1 /* parser auto-generated by pidl */
4 #include "../librpc/gen_ndr/ndr_xattr.h"
6 #include "librpc/gen_ndr/ndr_security.h"
7 static enum ndr_err_code
ndr_push_xattr_DosInfoFFFFCompat(struct ndr_push
*ndr
, int ndr_flags
, const struct xattr_DosInfoFFFFCompat
*r
)
9 if (ndr_flags
& NDR_SCALARS
) {
10 NDR_CHECK(ndr_push_align(ndr
, 4));
11 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->attrib
));
12 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
14 if (ndr_flags
& NDR_BUFFERS
) {
16 return NDR_ERR_SUCCESS
;
19 static enum ndr_err_code
ndr_pull_xattr_DosInfoFFFFCompat(struct ndr_pull
*ndr
, int ndr_flags
, struct xattr_DosInfoFFFFCompat
*r
)
21 if (ndr_flags
& NDR_SCALARS
) {
22 NDR_CHECK(ndr_pull_align(ndr
, 4));
23 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->attrib
));
24 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
26 if (ndr_flags
& NDR_BUFFERS
) {
28 return NDR_ERR_SUCCESS
;
31 _PUBLIC_
void ndr_print_xattr_DosInfoFFFFCompat(struct ndr_print
*ndr
, const char *name
, const struct xattr_DosInfoFFFFCompat
*r
)
33 ndr_print_struct(ndr
, name
, "xattr_DosInfoFFFFCompat");
35 ndr_print_uint32(ndr
, "attrib", r
->attrib
);
39 static enum ndr_err_code
ndr_push_xattr_DosInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct xattr_DosInfo1
*r
)
41 if (ndr_flags
& NDR_SCALARS
) {
42 NDR_CHECK(ndr_push_align(ndr
, 4));
43 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->attrib
));
44 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ea_size
));
45 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->size
));
46 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->alloc_size
));
47 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->create_time
));
48 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->change_time
));
49 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
51 if (ndr_flags
& NDR_BUFFERS
) {
53 return NDR_ERR_SUCCESS
;
56 static enum ndr_err_code
ndr_pull_xattr_DosInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct xattr_DosInfo1
*r
)
58 if (ndr_flags
& NDR_SCALARS
) {
59 NDR_CHECK(ndr_pull_align(ndr
, 4));
60 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->attrib
));
61 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ea_size
));
62 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->size
));
63 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->alloc_size
));
64 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->create_time
));
65 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->change_time
));
66 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
68 if (ndr_flags
& NDR_BUFFERS
) {
70 return NDR_ERR_SUCCESS
;
73 _PUBLIC_
void ndr_print_xattr_DosInfo1(struct ndr_print
*ndr
, const char *name
, const struct xattr_DosInfo1
*r
)
75 ndr_print_struct(ndr
, name
, "xattr_DosInfo1");
77 ndr_print_uint32(ndr
, "attrib", r
->attrib
);
78 ndr_print_uint32(ndr
, "ea_size", r
->ea_size
);
79 ndr_print_udlong(ndr
, "size", r
->size
);
80 ndr_print_udlong(ndr
, "alloc_size", r
->alloc_size
);
81 ndr_print_NTTIME(ndr
, "create_time", r
->create_time
);
82 ndr_print_NTTIME(ndr
, "change_time", r
->change_time
);
86 static enum ndr_err_code
ndr_push_xattr_DosInfo2Old(struct ndr_push
*ndr
, int ndr_flags
, const struct xattr_DosInfo2Old
*r
)
88 if (ndr_flags
& NDR_SCALARS
) {
89 NDR_CHECK(ndr_push_align(ndr
, 4));
90 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
91 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->attrib
));
92 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ea_size
));
93 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->size
));
94 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->alloc_size
));
95 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->create_time
));
96 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->change_time
));
97 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->write_time
));
99 uint32_t _flags_save_string
= ndr
->flags
;
100 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_UTF8
|LIBNDR_FLAG_STR_NULLTERM
);
101 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->name
));
102 ndr
->flags
= _flags_save_string
;
104 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
106 if (ndr_flags
& NDR_BUFFERS
) {
108 return NDR_ERR_SUCCESS
;
111 static enum ndr_err_code
ndr_pull_xattr_DosInfo2Old(struct ndr_pull
*ndr
, int ndr_flags
, struct xattr_DosInfo2Old
*r
)
113 if (ndr_flags
& NDR_SCALARS
) {
114 NDR_CHECK(ndr_pull_align(ndr
, 4));
115 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
116 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->attrib
));
117 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ea_size
));
118 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->size
));
119 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->alloc_size
));
120 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->create_time
));
121 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->change_time
));
122 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->write_time
));
124 uint32_t _flags_save_string
= ndr
->flags
;
125 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_UTF8
|LIBNDR_FLAG_STR_NULLTERM
);
126 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->name
));
127 ndr
->flags
= _flags_save_string
;
129 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
131 if (ndr_flags
& NDR_BUFFERS
) {
133 return NDR_ERR_SUCCESS
;
136 _PUBLIC_
void ndr_print_xattr_DosInfo2Old(struct ndr_print
*ndr
, const char *name
, const struct xattr_DosInfo2Old
*r
)
138 ndr_print_struct(ndr
, name
, "xattr_DosInfo2Old");
140 ndr_print_uint32(ndr
, "flags", r
->flags
);
141 ndr_print_uint32(ndr
, "attrib", r
->attrib
);
142 ndr_print_uint32(ndr
, "ea_size", r
->ea_size
);
143 ndr_print_udlong(ndr
, "size", r
->size
);
144 ndr_print_udlong(ndr
, "alloc_size", r
->alloc_size
);
145 ndr_print_NTTIME(ndr
, "create_time", r
->create_time
);
146 ndr_print_NTTIME(ndr
, "change_time", r
->change_time
);
147 ndr_print_NTTIME(ndr
, "write_time", r
->write_time
);
148 ndr_print_string(ndr
, "name", r
->name
);
152 static enum ndr_err_code
ndr_push_xattr_DosInfoValidFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
154 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
155 return NDR_ERR_SUCCESS
;
158 static enum ndr_err_code
ndr_pull_xattr_DosInfoValidFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
161 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
163 return NDR_ERR_SUCCESS
;
166 _PUBLIC_
void ndr_print_xattr_DosInfoValidFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
168 ndr_print_uint32(ndr
, name
, r
);
170 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "XATTR_DOSINFO_ATTRIB", XATTR_DOSINFO_ATTRIB
, r
);
171 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "XATTR_DOSINFO_EA_SIZE", XATTR_DOSINFO_EA_SIZE
, r
);
172 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "XATTR_DOSINFO_SIZE", XATTR_DOSINFO_SIZE
, r
);
173 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "XATTR_DOSINFO_ALLOC_SIZE", XATTR_DOSINFO_ALLOC_SIZE
, r
);
174 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "XATTR_DOSINFO_CREATE_TIME", XATTR_DOSINFO_CREATE_TIME
, r
);
175 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "XATTR_DOSINFO_CHANGE_TIME", XATTR_DOSINFO_CHANGE_TIME
, r
);
179 static enum ndr_err_code
ndr_push_xattr_DosInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct xattr_DosInfo3
*r
)
181 if (ndr_flags
& NDR_SCALARS
) {
182 NDR_CHECK(ndr_push_align(ndr
, 4));
183 NDR_CHECK(ndr_push_xattr_DosInfoValidFlags(ndr
, NDR_SCALARS
, r
->valid_flags
));
184 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->attrib
));
185 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ea_size
));
186 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->size
));
187 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->alloc_size
));
188 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->create_time
));
189 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->change_time
));
190 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
192 if (ndr_flags
& NDR_BUFFERS
) {
194 return NDR_ERR_SUCCESS
;
197 static enum ndr_err_code
ndr_pull_xattr_DosInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct xattr_DosInfo3
*r
)
199 if (ndr_flags
& NDR_SCALARS
) {
200 NDR_CHECK(ndr_pull_align(ndr
, 4));
201 NDR_CHECK(ndr_pull_xattr_DosInfoValidFlags(ndr
, NDR_SCALARS
, &r
->valid_flags
));
202 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->attrib
));
203 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ea_size
));
204 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->size
));
205 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->alloc_size
));
206 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->create_time
));
207 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->change_time
));
208 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
210 if (ndr_flags
& NDR_BUFFERS
) {
212 return NDR_ERR_SUCCESS
;
215 _PUBLIC_
void ndr_print_xattr_DosInfo3(struct ndr_print
*ndr
, const char *name
, const struct xattr_DosInfo3
*r
)
217 ndr_print_struct(ndr
, name
, "xattr_DosInfo3");
219 ndr_print_xattr_DosInfoValidFlags(ndr
, "valid_flags", r
->valid_flags
);
220 ndr_print_uint32(ndr
, "attrib", r
->attrib
);
221 ndr_print_uint32(ndr
, "ea_size", r
->ea_size
);
222 ndr_print_udlong(ndr
, "size", r
->size
);
223 ndr_print_udlong(ndr
, "alloc_size", r
->alloc_size
);
224 ndr_print_NTTIME(ndr
, "create_time", r
->create_time
);
225 ndr_print_NTTIME(ndr
, "change_time", r
->change_time
);
229 _PUBLIC_
enum ndr_err_code
ndr_push_xattr_DosInfo(struct ndr_push
*ndr
, int ndr_flags
, const union xattr_DosInfo
*r
)
231 if (ndr_flags
& NDR_SCALARS
) {
232 int level
= ndr_push_get_switch_value(ndr
, r
);
233 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
234 NDR_CHECK(ndr_push_union_align(ndr
, 4));
237 NDR_CHECK(ndr_push_xattr_DosInfoFFFFCompat(ndr
, NDR_SCALARS
, &r
->compatinfoFFFF
));
241 NDR_CHECK(ndr_push_xattr_DosInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
245 NDR_CHECK(ndr_push_xattr_DosInfo2Old(ndr
, NDR_SCALARS
, &r
->oldinfo2
));
249 NDR_CHECK(ndr_push_xattr_DosInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
253 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
256 if (ndr_flags
& NDR_BUFFERS
) {
257 int level
= ndr_push_get_switch_value(ndr
, r
);
272 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
275 return NDR_ERR_SUCCESS
;
278 _PUBLIC_
enum ndr_err_code
ndr_pull_xattr_DosInfo(struct ndr_pull
*ndr
, int ndr_flags
, union xattr_DosInfo
*r
)
282 level
= ndr_pull_get_switch_value(ndr
, r
);
283 if (ndr_flags
& NDR_SCALARS
) {
284 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
285 if (_level
!= level
) {
286 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
288 NDR_CHECK(ndr_pull_union_align(ndr
, 4));
291 NDR_CHECK(ndr_pull_xattr_DosInfoFFFFCompat(ndr
, NDR_SCALARS
, &r
->compatinfoFFFF
));
295 NDR_CHECK(ndr_pull_xattr_DosInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
299 NDR_CHECK(ndr_pull_xattr_DosInfo2Old(ndr
, NDR_SCALARS
, &r
->oldinfo2
));
303 NDR_CHECK(ndr_pull_xattr_DosInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
307 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
310 if (ndr_flags
& NDR_BUFFERS
) {
325 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
328 return NDR_ERR_SUCCESS
;
331 _PUBLIC_
void ndr_print_xattr_DosInfo(struct ndr_print
*ndr
, const char *name
, const union xattr_DosInfo
*r
)
334 level
= ndr_print_get_switch_value(ndr
, r
);
335 ndr_print_union(ndr
, name
, level
, "xattr_DosInfo");
338 ndr_print_xattr_DosInfoFFFFCompat(ndr
, "compatinfoFFFF", &r
->compatinfoFFFF
);
342 ndr_print_xattr_DosInfo1(ndr
, "info1", &r
->info1
);
346 ndr_print_xattr_DosInfo2Old(ndr
, "oldinfo2", &r
->oldinfo2
);
350 ndr_print_xattr_DosInfo3(ndr
, "info3", &r
->info3
);
354 ndr_print_bad_level(ndr
, name
, level
);
358 _PUBLIC_
enum ndr_err_code
ndr_push_xattr_DosAttrib(struct ndr_push
*ndr
, int ndr_flags
, const struct xattr_DosAttrib
*r
)
360 if (ndr_flags
& NDR_SCALARS
) {
361 NDR_CHECK(ndr_push_align(ndr
, 4));
362 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->version
));
363 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->info
, r
->version
));
364 NDR_CHECK(ndr_push_xattr_DosInfo(ndr
, NDR_SCALARS
, &r
->info
));
365 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
367 if (ndr_flags
& NDR_BUFFERS
) {
369 return NDR_ERR_SUCCESS
;
372 _PUBLIC_
enum ndr_err_code
ndr_pull_xattr_DosAttrib(struct ndr_pull
*ndr
, int ndr_flags
, struct xattr_DosAttrib
*r
)
374 if (ndr_flags
& NDR_SCALARS
) {
375 NDR_CHECK(ndr_pull_align(ndr
, 4));
376 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->version
));
377 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->info
, r
->version
));
378 NDR_CHECK(ndr_pull_xattr_DosInfo(ndr
, NDR_SCALARS
, &r
->info
));
379 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
381 if (ndr_flags
& NDR_BUFFERS
) {
383 return NDR_ERR_SUCCESS
;
386 _PUBLIC_
void ndr_print_xattr_DosAttrib(struct ndr_print
*ndr
, const char *name
, const struct xattr_DosAttrib
*r
)
388 ndr_print_struct(ndr
, name
, "xattr_DosAttrib");
390 ndr_print_uint16(ndr
, "version", r
->version
);
391 ndr_print_set_switch_value(ndr
, &r
->info
, r
->version
);
392 ndr_print_xattr_DosInfo(ndr
, "info", &r
->info
);
396 static enum ndr_err_code
ndr_push_xattr_EA(struct ndr_push
*ndr
, int ndr_flags
, const struct xattr_EA
*r
)
398 if (ndr_flags
& NDR_SCALARS
) {
399 NDR_CHECK(ndr_push_align(ndr
, 4));
401 uint32_t _flags_save_string
= ndr
->flags
;
402 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_UTF8
|LIBNDR_FLAG_STR_NULLTERM
);
403 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->name
));
404 ndr
->flags
= _flags_save_string
;
406 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->value
));
407 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
409 if (ndr_flags
& NDR_BUFFERS
) {
411 return NDR_ERR_SUCCESS
;
414 static enum ndr_err_code
ndr_pull_xattr_EA(struct ndr_pull
*ndr
, int ndr_flags
, struct xattr_EA
*r
)
416 if (ndr_flags
& NDR_SCALARS
) {
417 NDR_CHECK(ndr_pull_align(ndr
, 4));
419 uint32_t _flags_save_string
= ndr
->flags
;
420 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_UTF8
|LIBNDR_FLAG_STR_NULLTERM
);
421 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->name
));
422 ndr
->flags
= _flags_save_string
;
424 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->value
));
425 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
427 if (ndr_flags
& NDR_BUFFERS
) {
429 return NDR_ERR_SUCCESS
;
432 _PUBLIC_
void ndr_print_xattr_EA(struct ndr_print
*ndr
, const char *name
, const struct xattr_EA
*r
)
434 ndr_print_struct(ndr
, name
, "xattr_EA");
436 ndr_print_string(ndr
, "name", r
->name
);
437 ndr_print_DATA_BLOB(ndr
, "value", r
->value
);
441 _PUBLIC_
enum ndr_err_code
ndr_push_xattr_DosEAs(struct ndr_push
*ndr
, int ndr_flags
, const struct xattr_DosEAs
*r
)
444 if (ndr_flags
& NDR_SCALARS
) {
445 NDR_CHECK(ndr_push_align(ndr
, 5));
446 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->num_eas
));
447 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->eas
));
448 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
450 if (ndr_flags
& NDR_BUFFERS
) {
452 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_eas
));
453 for (cntr_eas_1
= 0; cntr_eas_1
< r
->num_eas
; cntr_eas_1
++) {
454 NDR_CHECK(ndr_push_xattr_EA(ndr
, NDR_SCALARS
, &r
->eas
[cntr_eas_1
]));
458 return NDR_ERR_SUCCESS
;
461 _PUBLIC_
enum ndr_err_code
ndr_pull_xattr_DosEAs(struct ndr_pull
*ndr
, int ndr_flags
, struct xattr_DosEAs
*r
)
465 TALLOC_CTX
*_mem_save_eas_0
;
466 TALLOC_CTX
*_mem_save_eas_1
;
467 if (ndr_flags
& NDR_SCALARS
) {
468 NDR_CHECK(ndr_pull_align(ndr
, 5));
469 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->num_eas
));
470 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_eas
));
472 NDR_PULL_ALLOC(ndr
, r
->eas
);
476 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
478 if (ndr_flags
& NDR_BUFFERS
) {
480 _mem_save_eas_0
= NDR_PULL_GET_MEM_CTX(ndr
);
481 NDR_PULL_SET_MEM_CTX(ndr
, r
->eas
, 0);
482 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->eas
));
483 NDR_PULL_ALLOC_N(ndr
, r
->eas
, ndr_get_array_size(ndr
, &r
->eas
));
484 _mem_save_eas_1
= NDR_PULL_GET_MEM_CTX(ndr
);
485 NDR_PULL_SET_MEM_CTX(ndr
, r
->eas
, 0);
486 for (cntr_eas_1
= 0; cntr_eas_1
< r
->num_eas
; cntr_eas_1
++) {
487 NDR_CHECK(ndr_pull_xattr_EA(ndr
, NDR_SCALARS
, &r
->eas
[cntr_eas_1
]));
489 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_eas_1
, 0);
490 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_eas_0
, 0);
493 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->eas
, r
->num_eas
));
496 return NDR_ERR_SUCCESS
;
499 _PUBLIC_
void ndr_print_xattr_DosEAs(struct ndr_print
*ndr
, const char *name
, const struct xattr_DosEAs
*r
)
502 ndr_print_struct(ndr
, name
, "xattr_DosEAs");
504 ndr_print_uint16(ndr
, "num_eas", r
->num_eas
);
505 ndr_print_ptr(ndr
, "eas", r
->eas
);
508 ndr
->print(ndr
, "%s: ARRAY(%d)", "eas", (int)r
->num_eas
);
510 for (cntr_eas_1
=0;cntr_eas_1
<r
->num_eas
;cntr_eas_1
++) {
512 if (asprintf(&idx_1
, "[%d]", cntr_eas_1
) != -1) {
513 ndr_print_xattr_EA(ndr
, "eas", &r
->eas
[cntr_eas_1
]);
523 _PUBLIC_
enum ndr_err_code
ndr_push_tdb_xattrs(struct ndr_push
*ndr
, int ndr_flags
, const struct tdb_xattrs
*r
)
526 if (ndr_flags
& NDR_SCALARS
) {
527 NDR_CHECK(ndr_push_align(ndr
, 4));
528 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_eas
));
529 for (cntr_eas_0
= 0; cntr_eas_0
< r
->num_eas
; cntr_eas_0
++) {
530 NDR_CHECK(ndr_push_xattr_EA(ndr
, NDR_SCALARS
, &r
->eas
[cntr_eas_0
]));
532 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
534 if (ndr_flags
& NDR_BUFFERS
) {
536 return NDR_ERR_SUCCESS
;
539 _PUBLIC_
enum ndr_err_code
ndr_pull_tdb_xattrs(struct ndr_pull
*ndr
, int ndr_flags
, struct tdb_xattrs
*r
)
542 TALLOC_CTX
*_mem_save_eas_0
;
543 if (ndr_flags
& NDR_SCALARS
) {
544 NDR_CHECK(ndr_pull_align(ndr
, 4));
545 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_eas
));
546 NDR_PULL_ALLOC_N(ndr
, r
->eas
, r
->num_eas
);
547 _mem_save_eas_0
= NDR_PULL_GET_MEM_CTX(ndr
);
548 NDR_PULL_SET_MEM_CTX(ndr
, r
->eas
, 0);
549 for (cntr_eas_0
= 0; cntr_eas_0
< r
->num_eas
; cntr_eas_0
++) {
550 NDR_CHECK(ndr_pull_xattr_EA(ndr
, NDR_SCALARS
, &r
->eas
[cntr_eas_0
]));
552 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_eas_0
, 0);
553 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
555 if (ndr_flags
& NDR_BUFFERS
) {
557 return NDR_ERR_SUCCESS
;
560 _PUBLIC_
void ndr_print_tdb_xattrs(struct ndr_print
*ndr
, const char *name
, const struct tdb_xattrs
*r
)
563 ndr_print_struct(ndr
, name
, "tdb_xattrs");
565 ndr_print_uint32(ndr
, "num_eas", r
->num_eas
);
566 ndr
->print(ndr
, "%s: ARRAY(%d)", "eas", (int)r
->num_eas
);
568 for (cntr_eas_0
=0;cntr_eas_0
<r
->num_eas
;cntr_eas_0
++) {
570 if (asprintf(&idx_0
, "[%d]", cntr_eas_0
) != -1) {
571 ndr_print_xattr_EA(ndr
, "eas", &r
->eas
[cntr_eas_0
]);
579 static enum ndr_err_code
ndr_push_xattr_DosStream(struct ndr_push
*ndr
, int ndr_flags
, const struct xattr_DosStream
*r
)
581 if (ndr_flags
& NDR_SCALARS
) {
582 NDR_CHECK(ndr_push_align(ndr
, 4));
583 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
584 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->size
));
585 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->alloc_size
));
587 uint32_t _flags_save_string
= ndr
->flags
;
588 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_UTF8
|LIBNDR_FLAG_STR_NULLTERM
);
589 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->name
));
590 ndr
->flags
= _flags_save_string
;
592 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
594 if (ndr_flags
& NDR_BUFFERS
) {
596 return NDR_ERR_SUCCESS
;
599 static enum ndr_err_code
ndr_pull_xattr_DosStream(struct ndr_pull
*ndr
, int ndr_flags
, struct xattr_DosStream
*r
)
601 if (ndr_flags
& NDR_SCALARS
) {
602 NDR_CHECK(ndr_pull_align(ndr
, 4));
603 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
604 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->size
));
605 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->alloc_size
));
607 uint32_t _flags_save_string
= ndr
->flags
;
608 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_UTF8
|LIBNDR_FLAG_STR_NULLTERM
);
609 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->name
));
610 ndr
->flags
= _flags_save_string
;
612 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
614 if (ndr_flags
& NDR_BUFFERS
) {
616 return NDR_ERR_SUCCESS
;
619 _PUBLIC_
void ndr_print_xattr_DosStream(struct ndr_print
*ndr
, const char *name
, const struct xattr_DosStream
*r
)
621 ndr_print_struct(ndr
, name
, "xattr_DosStream");
623 ndr_print_uint32(ndr
, "flags", r
->flags
);
624 ndr_print_udlong(ndr
, "size", r
->size
);
625 ndr_print_udlong(ndr
, "alloc_size", r
->alloc_size
);
626 ndr_print_string(ndr
, "name", r
->name
);
630 _PUBLIC_
enum ndr_err_code
ndr_push_xattr_DosStreams(struct ndr_push
*ndr
, int ndr_flags
, const struct xattr_DosStreams
*r
)
632 uint32_t cntr_streams_1
;
633 if (ndr_flags
& NDR_SCALARS
) {
634 NDR_CHECK(ndr_push_align(ndr
, 5));
635 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_streams
));
636 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->streams
));
637 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
639 if (ndr_flags
& NDR_BUFFERS
) {
641 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_streams
));
642 for (cntr_streams_1
= 0; cntr_streams_1
< r
->num_streams
; cntr_streams_1
++) {
643 NDR_CHECK(ndr_push_xattr_DosStream(ndr
, NDR_SCALARS
, &r
->streams
[cntr_streams_1
]));
647 return NDR_ERR_SUCCESS
;
650 _PUBLIC_
enum ndr_err_code
ndr_pull_xattr_DosStreams(struct ndr_pull
*ndr
, int ndr_flags
, struct xattr_DosStreams
*r
)
652 uint32_t _ptr_streams
;
653 uint32_t cntr_streams_1
;
654 TALLOC_CTX
*_mem_save_streams_0
;
655 TALLOC_CTX
*_mem_save_streams_1
;
656 if (ndr_flags
& NDR_SCALARS
) {
657 NDR_CHECK(ndr_pull_align(ndr
, 5));
658 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_streams
));
659 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_streams
));
661 NDR_PULL_ALLOC(ndr
, r
->streams
);
665 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
667 if (ndr_flags
& NDR_BUFFERS
) {
669 _mem_save_streams_0
= NDR_PULL_GET_MEM_CTX(ndr
);
670 NDR_PULL_SET_MEM_CTX(ndr
, r
->streams
, 0);
671 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->streams
));
672 NDR_PULL_ALLOC_N(ndr
, r
->streams
, ndr_get_array_size(ndr
, &r
->streams
));
673 _mem_save_streams_1
= NDR_PULL_GET_MEM_CTX(ndr
);
674 NDR_PULL_SET_MEM_CTX(ndr
, r
->streams
, 0);
675 for (cntr_streams_1
= 0; cntr_streams_1
< r
->num_streams
; cntr_streams_1
++) {
676 NDR_CHECK(ndr_pull_xattr_DosStream(ndr
, NDR_SCALARS
, &r
->streams
[cntr_streams_1
]));
678 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_streams_1
, 0);
679 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_streams_0
, 0);
682 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->streams
, r
->num_streams
));
685 return NDR_ERR_SUCCESS
;
688 _PUBLIC_
void ndr_print_xattr_DosStreams(struct ndr_print
*ndr
, const char *name
, const struct xattr_DosStreams
*r
)
690 uint32_t cntr_streams_1
;
691 ndr_print_struct(ndr
, name
, "xattr_DosStreams");
693 ndr_print_uint32(ndr
, "num_streams", r
->num_streams
);
694 ndr_print_ptr(ndr
, "streams", r
->streams
);
697 ndr
->print(ndr
, "%s: ARRAY(%d)", "streams", (int)r
->num_streams
);
699 for (cntr_streams_1
=0;cntr_streams_1
<r
->num_streams
;cntr_streams_1
++) {
701 if (asprintf(&idx_1
, "[%d]", cntr_streams_1
) != -1) {
702 ndr_print_xattr_DosStream(ndr
, "streams", &r
->streams
[cntr_streams_1
]);
712 _PUBLIC_
enum ndr_err_code
ndr_push_security_descriptor_hash_v2(struct ndr_push
*ndr
, int ndr_flags
, const struct security_descriptor_hash_v2
*r
)
714 if (ndr_flags
& NDR_SCALARS
) {
715 NDR_CHECK(ndr_push_align(ndr
, 5));
716 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sd
));
717 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->hash
, 16));
718 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
720 if (ndr_flags
& NDR_BUFFERS
) {
722 NDR_CHECK(ndr_push_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sd
));
725 return NDR_ERR_SUCCESS
;
728 _PUBLIC_
enum ndr_err_code
ndr_pull_security_descriptor_hash_v2(struct ndr_pull
*ndr
, int ndr_flags
, struct security_descriptor_hash_v2
*r
)
731 TALLOC_CTX
*_mem_save_sd_0
;
732 if (ndr_flags
& NDR_SCALARS
) {
733 NDR_CHECK(ndr_pull_align(ndr
, 5));
734 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sd
));
736 NDR_PULL_ALLOC(ndr
, r
->sd
);
740 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->hash
, 16));
741 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
743 if (ndr_flags
& NDR_BUFFERS
) {
745 _mem_save_sd_0
= NDR_PULL_GET_MEM_CTX(ndr
);
746 NDR_PULL_SET_MEM_CTX(ndr
, r
->sd
, 0);
747 NDR_CHECK(ndr_pull_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sd
));
748 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sd_0
, 0);
751 return NDR_ERR_SUCCESS
;
754 _PUBLIC_
void ndr_print_security_descriptor_hash_v2(struct ndr_print
*ndr
, const char *name
, const struct security_descriptor_hash_v2
*r
)
756 ndr_print_struct(ndr
, name
, "security_descriptor_hash_v2");
758 ndr_print_ptr(ndr
, "sd", r
->sd
);
761 ndr_print_security_descriptor(ndr
, "sd", r
->sd
);
764 ndr_print_array_uint8(ndr
, "hash", r
->hash
, 16);
768 _PUBLIC_
enum ndr_err_code
ndr_push_security_descriptor_hash_v3(struct ndr_push
*ndr
, int ndr_flags
, const struct security_descriptor_hash_v3
*r
)
770 if (ndr_flags
& NDR_SCALARS
) {
771 NDR_CHECK(ndr_push_align(ndr
, 5));
772 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sd
));
773 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->hash_type
));
774 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->hash
, 64));
775 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
777 if (ndr_flags
& NDR_BUFFERS
) {
779 NDR_CHECK(ndr_push_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sd
));
782 return NDR_ERR_SUCCESS
;
785 _PUBLIC_
enum ndr_err_code
ndr_pull_security_descriptor_hash_v3(struct ndr_pull
*ndr
, int ndr_flags
, struct security_descriptor_hash_v3
*r
)
788 TALLOC_CTX
*_mem_save_sd_0
;
789 if (ndr_flags
& NDR_SCALARS
) {
790 NDR_CHECK(ndr_pull_align(ndr
, 5));
791 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sd
));
793 NDR_PULL_ALLOC(ndr
, r
->sd
);
797 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->hash_type
));
798 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->hash
, 64));
799 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
801 if (ndr_flags
& NDR_BUFFERS
) {
803 _mem_save_sd_0
= NDR_PULL_GET_MEM_CTX(ndr
);
804 NDR_PULL_SET_MEM_CTX(ndr
, r
->sd
, 0);
805 NDR_CHECK(ndr_pull_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sd
));
806 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sd_0
, 0);
809 return NDR_ERR_SUCCESS
;
812 _PUBLIC_
void ndr_print_security_descriptor_hash_v3(struct ndr_print
*ndr
, const char *name
, const struct security_descriptor_hash_v3
*r
)
814 ndr_print_struct(ndr
, name
, "security_descriptor_hash_v3");
816 ndr_print_ptr(ndr
, "sd", r
->sd
);
819 ndr_print_security_descriptor(ndr
, "sd", r
->sd
);
822 ndr_print_uint16(ndr
, "hash_type", r
->hash_type
);
823 ndr_print_array_uint8(ndr
, "hash", r
->hash
, 64);
827 static enum ndr_err_code
ndr_push_xattr_NTACL_Info(struct ndr_push
*ndr
, int ndr_flags
, const union xattr_NTACL_Info
*r
)
829 if (ndr_flags
& NDR_SCALARS
) {
830 int level
= ndr_push_get_switch_value(ndr
, r
);
831 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
832 NDR_CHECK(ndr_push_union_align(ndr
, 5));
835 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sd
));
839 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sd_hs2
));
843 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sd_hs3
));
847 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
850 if (ndr_flags
& NDR_BUFFERS
) {
851 int level
= ndr_push_get_switch_value(ndr
, r
);
855 NDR_CHECK(ndr_push_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sd
));
861 NDR_CHECK(ndr_push_security_descriptor_hash_v2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sd_hs2
));
867 NDR_CHECK(ndr_push_security_descriptor_hash_v3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sd_hs3
));
872 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
875 return NDR_ERR_SUCCESS
;
878 static enum ndr_err_code
ndr_pull_xattr_NTACL_Info(struct ndr_pull
*ndr
, int ndr_flags
, union xattr_NTACL_Info
*r
)
882 TALLOC_CTX
*_mem_save_sd_0
;
883 TALLOC_CTX
*_mem_save_sd_hs2_0
;
884 TALLOC_CTX
*_mem_save_sd_hs3_0
;
885 level
= ndr_pull_get_switch_value(ndr
, r
);
886 if (ndr_flags
& NDR_SCALARS
) {
887 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
888 if (_level
!= level
) {
889 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
891 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
895 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sd
));
897 NDR_PULL_ALLOC(ndr
, r
->sd
);
904 uint32_t _ptr_sd_hs2
;
905 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sd_hs2
));
907 NDR_PULL_ALLOC(ndr
, r
->sd_hs2
);
914 uint32_t _ptr_sd_hs3
;
915 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sd_hs3
));
917 NDR_PULL_ALLOC(ndr
, r
->sd_hs3
);
924 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
927 if (ndr_flags
& NDR_BUFFERS
) {
931 _mem_save_sd_0
= NDR_PULL_GET_MEM_CTX(ndr
);
932 NDR_PULL_SET_MEM_CTX(ndr
, r
->sd
, 0);
933 NDR_CHECK(ndr_pull_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sd
));
934 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sd_0
, 0);
940 _mem_save_sd_hs2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
941 NDR_PULL_SET_MEM_CTX(ndr
, r
->sd_hs2
, 0);
942 NDR_CHECK(ndr_pull_security_descriptor_hash_v2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sd_hs2
));
943 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sd_hs2_0
, 0);
949 _mem_save_sd_hs3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
950 NDR_PULL_SET_MEM_CTX(ndr
, r
->sd_hs3
, 0);
951 NDR_CHECK(ndr_pull_security_descriptor_hash_v3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sd_hs3
));
952 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sd_hs3_0
, 0);
957 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
960 return NDR_ERR_SUCCESS
;
963 _PUBLIC_
void ndr_print_xattr_NTACL_Info(struct ndr_print
*ndr
, const char *name
, const union xattr_NTACL_Info
*r
)
966 level
= ndr_print_get_switch_value(ndr
, r
);
967 ndr_print_union(ndr
, name
, level
, "xattr_NTACL_Info");
970 ndr_print_ptr(ndr
, "sd", r
->sd
);
973 ndr_print_security_descriptor(ndr
, "sd", r
->sd
);
979 ndr_print_ptr(ndr
, "sd_hs2", r
->sd_hs2
);
982 ndr_print_security_descriptor_hash_v2(ndr
, "sd_hs2", r
->sd_hs2
);
988 ndr_print_ptr(ndr
, "sd_hs3", r
->sd_hs3
);
991 ndr_print_security_descriptor_hash_v3(ndr
, "sd_hs3", r
->sd_hs3
);
997 ndr_print_bad_level(ndr
, name
, level
);
1001 _PUBLIC_
enum ndr_err_code
ndr_push_xattr_NTACL(struct ndr_push
*ndr
, int ndr_flags
, const struct xattr_NTACL
*r
)
1003 if (ndr_flags
& NDR_SCALARS
) {
1004 NDR_CHECK(ndr_push_align(ndr
, 5));
1005 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->version
));
1006 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->info
, r
->version
));
1007 NDR_CHECK(ndr_push_xattr_NTACL_Info(ndr
, NDR_SCALARS
, &r
->info
));
1008 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1010 if (ndr_flags
& NDR_BUFFERS
) {
1011 NDR_CHECK(ndr_push_xattr_NTACL_Info(ndr
, NDR_BUFFERS
, &r
->info
));
1013 return NDR_ERR_SUCCESS
;
1016 _PUBLIC_
enum ndr_err_code
ndr_pull_xattr_NTACL(struct ndr_pull
*ndr
, int ndr_flags
, struct xattr_NTACL
*r
)
1018 if (ndr_flags
& NDR_SCALARS
) {
1019 NDR_CHECK(ndr_pull_align(ndr
, 5));
1020 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->version
));
1021 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->info
, r
->version
));
1022 NDR_CHECK(ndr_pull_xattr_NTACL_Info(ndr
, NDR_SCALARS
, &r
->info
));
1023 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1025 if (ndr_flags
& NDR_BUFFERS
) {
1026 NDR_CHECK(ndr_pull_xattr_NTACL_Info(ndr
, NDR_BUFFERS
, &r
->info
));
1028 return NDR_ERR_SUCCESS
;
1031 _PUBLIC_
void ndr_print_xattr_NTACL(struct ndr_print
*ndr
, const char *name
, const struct xattr_NTACL
*r
)
1033 ndr_print_struct(ndr
, name
, "xattr_NTACL");
1035 ndr_print_uint16(ndr
, "version", r
->version
);
1036 ndr_print_set_switch_value(ndr
, &r
->info
, r
->version
);
1037 ndr_print_xattr_NTACL_Info(ndr
, "info", &r
->info
);
1041 static enum ndr_err_code
ndr_push_xattr_parse_DOSATTRIB(struct ndr_push
*ndr
, int flags
, const struct xattr_parse_DOSATTRIB
*r
)
1043 if (flags
& NDR_IN
) {
1044 NDR_CHECK(ndr_push_xattr_DOSATTRIB(ndr
, NDR_SCALARS
, &r
->in
.x
));
1046 if (flags
& NDR_OUT
) {
1048 return NDR_ERR_SUCCESS
;
1051 static enum ndr_err_code
ndr_pull_xattr_parse_DOSATTRIB(struct ndr_pull
*ndr
, int flags
, struct xattr_parse_DOSATTRIB
*r
)
1053 if (flags
& NDR_IN
) {
1054 NDR_CHECK(ndr_pull_xattr_DOSATTRIB(ndr
, NDR_SCALARS
, &r
->in
.x
));
1056 if (flags
& NDR_OUT
) {
1058 return NDR_ERR_SUCCESS
;
1061 _PUBLIC_
void ndr_print_xattr_parse_DOSATTRIB(struct ndr_print
*ndr
, const char *name
, int flags
, const struct xattr_parse_DOSATTRIB
*r
)
1063 ndr_print_struct(ndr
, name
, "xattr_parse_DOSATTRIB");
1065 if (flags
& NDR_SET_VALUES
) {
1066 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1068 if (flags
& NDR_IN
) {
1069 ndr_print_struct(ndr
, "in", "xattr_parse_DOSATTRIB");
1071 ndr_print_xattr_DOSATTRIB(ndr
, "x", &r
->in
.x
);
1074 if (flags
& NDR_OUT
) {
1075 ndr_print_struct(ndr
, "out", "xattr_parse_DOSATTRIB");
1082 static const struct ndr_interface_call xattr_calls
[] = {
1084 "xattr_parse_DOSATTRIB",
1085 sizeof(struct xattr_parse_DOSATTRIB
),
1086 (ndr_push_flags_fn_t
) ndr_push_xattr_parse_DOSATTRIB
,
1087 (ndr_pull_flags_fn_t
) ndr_pull_xattr_parse_DOSATTRIB
,
1088 (ndr_print_function_t
) ndr_print_xattr_parse_DOSATTRIB
,
1091 { NULL
, 0, NULL
, NULL
, NULL
, false }
1094 static const char * const xattr_endpoint_strings
[] = {
1095 "ncacn_np:[\\pipe\\xattr]",
1098 static const struct ndr_interface_string_array xattr_endpoints
= {
1100 .names
= xattr_endpoint_strings
1103 static const char * const xattr_authservice_strings
[] = {
1107 static const struct ndr_interface_string_array xattr_authservices
= {
1109 .names
= xattr_authservice_strings
1113 const struct ndr_interface_table ndr_table_xattr
= {
1116 {0x12345778,0x1234,0xabcd,{0x00,0x01},{0x00,0x00,0x00,0x02}},
1119 .helpstring
= NDR_XATTR_HELPSTRING
,
1121 .calls
= xattr_calls
,
1122 .endpoints
= &xattr_endpoints
,
1123 .authservices
= &xattr_authservices