s3:smbd: make sure we always have a valid talloc stackframe
[Samba.git] / librpc / gen_ndr / ndr_lsa.c
blobf1b87ec06c51f672afd502aae2dc227ab9ec0b5d
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_lsa.h"
6 #include "librpc/gen_ndr/ndr_misc.h"
7 #include "librpc/gen_ndr/ndr_security.h"
8 _PUBLIC_ enum ndr_err_code ndr_push_lsa_String(struct ndr_push *ndr, int ndr_flags, const struct lsa_String *r)
10 if (ndr_flags & NDR_SCALARS) {
11 NDR_CHECK(ndr_push_align(ndr, 5));
12 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
13 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
14 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
15 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
17 if (ndr_flags & NDR_BUFFERS) {
18 if (r->string) {
19 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
20 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
21 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
22 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2 * strlen_m(r->string) / 2, sizeof(uint16_t), CH_UTF16));
25 return NDR_ERR_SUCCESS;
28 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_String(struct ndr_pull *ndr, int ndr_flags, struct lsa_String *r)
30 uint32_t _ptr_string;
31 TALLOC_CTX *_mem_save_string_0;
32 if (ndr_flags & NDR_SCALARS) {
33 NDR_CHECK(ndr_pull_align(ndr, 5));
34 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
35 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
36 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
37 if (_ptr_string) {
38 NDR_PULL_ALLOC(ndr, r->string);
39 } else {
40 r->string = NULL;
42 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
44 if (ndr_flags & NDR_BUFFERS) {
45 if (r->string) {
46 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
47 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
48 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
49 NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
50 if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
51 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string));
53 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
54 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
56 if (r->string) {
57 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size / 2));
59 if (r->string) {
60 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length / 2));
63 return NDR_ERR_SUCCESS;
66 _PUBLIC_ void ndr_print_lsa_String(struct ndr_print *ndr, const char *name, const struct lsa_String *r)
68 ndr_print_struct(ndr, name, "lsa_String");
69 ndr->depth++;
70 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
71 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->size);
72 ndr_print_ptr(ndr, "string", r->string);
73 ndr->depth++;
74 if (r->string) {
75 ndr_print_string(ndr, "string", r->string);
77 ndr->depth--;
78 ndr->depth--;
81 _PUBLIC_ enum ndr_err_code ndr_push_lsa_StringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_StringLarge *r)
83 if (ndr_flags & NDR_SCALARS) {
84 NDR_CHECK(ndr_push_align(ndr, 5));
85 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
86 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m_term(r->string)));
87 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
88 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
90 if (ndr_flags & NDR_BUFFERS) {
91 if (r->string) {
92 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 2 * strlen_m_term(r->string) / 2));
93 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
94 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
95 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2 * strlen_m(r->string) / 2, sizeof(uint16_t), CH_UTF16));
98 return NDR_ERR_SUCCESS;
101 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_StringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_StringLarge *r)
103 uint32_t _ptr_string;
104 TALLOC_CTX *_mem_save_string_0;
105 if (ndr_flags & NDR_SCALARS) {
106 NDR_CHECK(ndr_pull_align(ndr, 5));
107 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
108 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
109 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
110 if (_ptr_string) {
111 NDR_PULL_ALLOC(ndr, r->string);
112 } else {
113 r->string = NULL;
115 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
117 if (ndr_flags & NDR_BUFFERS) {
118 if (r->string) {
119 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
120 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
121 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
122 NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
123 if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
124 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string));
126 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
127 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
129 if (r->string) {
130 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size / 2));
132 if (r->string) {
133 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length / 2));
136 return NDR_ERR_SUCCESS;
139 _PUBLIC_ void ndr_print_lsa_StringLarge(struct ndr_print *ndr, const char *name, const struct lsa_StringLarge *r)
141 ndr_print_struct(ndr, name, "lsa_StringLarge");
142 ndr->depth++;
143 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
144 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->string):r->size);
145 ndr_print_ptr(ndr, "string", r->string);
146 ndr->depth++;
147 if (r->string) {
148 ndr_print_string(ndr, "string", r->string);
150 ndr->depth--;
151 ndr->depth--;
154 _PUBLIC_ enum ndr_err_code ndr_push_lsa_Strings(struct ndr_push *ndr, int ndr_flags, const struct lsa_Strings *r)
156 uint32_t cntr_names_1;
157 if (ndr_flags & NDR_SCALARS) {
158 NDR_CHECK(ndr_push_align(ndr, 5));
159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
160 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
161 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
163 if (ndr_flags & NDR_BUFFERS) {
164 if (r->names) {
165 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
166 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
167 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
169 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
170 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
174 return NDR_ERR_SUCCESS;
177 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Strings(struct ndr_pull *ndr, int ndr_flags, struct lsa_Strings *r)
179 uint32_t _ptr_names;
180 uint32_t cntr_names_1;
181 TALLOC_CTX *_mem_save_names_0;
182 TALLOC_CTX *_mem_save_names_1;
183 if (ndr_flags & NDR_SCALARS) {
184 NDR_CHECK(ndr_pull_align(ndr, 5));
185 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
186 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
187 if (_ptr_names) {
188 NDR_PULL_ALLOC(ndr, r->names);
189 } else {
190 r->names = NULL;
192 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
194 if (ndr_flags & NDR_BUFFERS) {
195 if (r->names) {
196 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
197 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
198 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
199 NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
200 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
201 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
202 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
203 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
205 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
206 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
208 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
209 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
211 if (r->names) {
212 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
215 return NDR_ERR_SUCCESS;
218 _PUBLIC_ void ndr_print_lsa_Strings(struct ndr_print *ndr, const char *name, const struct lsa_Strings *r)
220 uint32_t cntr_names_1;
221 ndr_print_struct(ndr, name, "lsa_Strings");
222 ndr->depth++;
223 ndr_print_uint32(ndr, "count", r->count);
224 ndr_print_ptr(ndr, "names", r->names);
225 ndr->depth++;
226 if (r->names) {
227 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
228 ndr->depth++;
229 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
230 char *idx_1=NULL;
231 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
232 ndr_print_lsa_String(ndr, "names", &r->names[cntr_names_1]);
233 free(idx_1);
236 ndr->depth--;
238 ndr->depth--;
239 ndr->depth--;
242 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiString(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiString *r)
244 if (ndr_flags & NDR_SCALARS) {
245 NDR_CHECK(ndr_push_align(ndr, 5));
246 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
247 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
248 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
249 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
251 if (ndr_flags & NDR_BUFFERS) {
252 if (r->string) {
253 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m(r->string)));
254 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
255 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m(r->string)));
256 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, strlen_m(r->string), sizeof(uint8_t), CH_DOS));
259 return NDR_ERR_SUCCESS;
262 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiString(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiString *r)
264 uint32_t _ptr_string;
265 TALLOC_CTX *_mem_save_string_0;
266 if (ndr_flags & NDR_SCALARS) {
267 NDR_CHECK(ndr_pull_align(ndr, 5));
268 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
269 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
270 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
271 if (_ptr_string) {
272 NDR_PULL_ALLOC(ndr, r->string);
273 } else {
274 r->string = NULL;
276 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
278 if (ndr_flags & NDR_BUFFERS) {
279 if (r->string) {
280 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
281 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
282 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
283 NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
284 if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
285 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string));
287 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint8_t), CH_DOS));
288 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
290 if (r->string) {
291 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size));
293 if (r->string) {
294 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length));
297 return NDR_ERR_SUCCESS;
300 _PUBLIC_ void ndr_print_lsa_AsciiString(struct ndr_print *ndr, const char *name, const struct lsa_AsciiString *r)
302 ndr_print_struct(ndr, name, "lsa_AsciiString");
303 ndr->depth++;
304 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->length);
305 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->size);
306 ndr_print_ptr(ndr, "string", r->string);
307 ndr->depth++;
308 if (r->string) {
309 ndr_print_string(ndr, "string", r->string);
311 ndr->depth--;
312 ndr->depth--;
315 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiStringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiStringLarge *r)
317 if (ndr_flags & NDR_SCALARS) {
318 NDR_CHECK(ndr_push_align(ndr, 5));
319 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
320 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->string)));
321 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
322 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
324 if (ndr_flags & NDR_BUFFERS) {
325 if (r->string) {
326 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m_term(r->string)));
327 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
328 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m(r->string)));
329 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, strlen_m(r->string), sizeof(uint8_t), CH_DOS));
332 return NDR_ERR_SUCCESS;
335 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiStringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiStringLarge *r)
337 uint32_t _ptr_string;
338 TALLOC_CTX *_mem_save_string_0;
339 if (ndr_flags & NDR_SCALARS) {
340 NDR_CHECK(ndr_pull_align(ndr, 5));
341 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
342 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
343 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
344 if (_ptr_string) {
345 NDR_PULL_ALLOC(ndr, r->string);
346 } else {
347 r->string = NULL;
349 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
351 if (ndr_flags & NDR_BUFFERS) {
352 if (r->string) {
353 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
354 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
355 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
356 NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
357 if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
358 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string));
360 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint8_t), CH_DOS));
361 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
363 if (r->string) {
364 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size));
366 if (r->string) {
367 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length));
370 return NDR_ERR_SUCCESS;
373 _PUBLIC_ void ndr_print_lsa_AsciiStringLarge(struct ndr_print *ndr, const char *name, const struct lsa_AsciiStringLarge *r)
375 ndr_print_struct(ndr, name, "lsa_AsciiStringLarge");
376 ndr->depth++;
377 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->length);
378 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->string):r->size);
379 ndr_print_ptr(ndr, "string", r->string);
380 ndr->depth++;
381 if (r->string) {
382 ndr_print_string(ndr, "string", r->string);
384 ndr->depth--;
385 ndr->depth--;
388 _PUBLIC_ enum ndr_err_code ndr_push_lsa_BinaryString(struct ndr_push *ndr, int ndr_flags, const struct lsa_BinaryString *r)
390 uint32_t cntr_array_1;
391 if (ndr_flags & NDR_SCALARS) {
392 NDR_CHECK(ndr_push_align(ndr, 5));
393 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
394 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
395 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
396 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
398 if (ndr_flags & NDR_BUFFERS) {
399 if (r->array) {
400 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size / 2));
401 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
402 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length / 2));
403 for (cntr_array_1 = 0; cntr_array_1 < r->length / 2; cntr_array_1++) {
404 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->array[cntr_array_1]));
408 return NDR_ERR_SUCCESS;
411 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_BinaryString(struct ndr_pull *ndr, int ndr_flags, struct lsa_BinaryString *r)
413 uint32_t _ptr_array;
414 uint32_t cntr_array_1;
415 TALLOC_CTX *_mem_save_array_0;
416 TALLOC_CTX *_mem_save_array_1;
417 if (ndr_flags & NDR_SCALARS) {
418 NDR_CHECK(ndr_pull_align(ndr, 5));
419 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
420 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
421 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
422 if (_ptr_array) {
423 NDR_PULL_ALLOC(ndr, r->array);
424 } else {
425 r->array = NULL;
427 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
429 if (ndr_flags & NDR_BUFFERS) {
430 if (r->array) {
431 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
432 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
433 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
434 NDR_CHECK(ndr_pull_array_length(ndr, &r->array));
435 if (ndr_get_array_length(ndr, &r->array) > ndr_get_array_size(ndr, &r->array)) {
436 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->array), ndr_get_array_length(ndr, &r->array));
438 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
439 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
440 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
441 for (cntr_array_1 = 0; cntr_array_1 < ndr_get_array_length(ndr, &r->array); cntr_array_1++) {
442 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
444 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
445 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
447 if (r->array) {
448 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->size / 2));
450 if (r->array) {
451 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->array, r->length / 2));
454 return NDR_ERR_SUCCESS;
457 _PUBLIC_ void ndr_print_lsa_BinaryString(struct ndr_print *ndr, const char *name, const struct lsa_BinaryString *r)
459 uint32_t cntr_array_1;
460 ndr_print_struct(ndr, name, "lsa_BinaryString");
461 ndr->depth++;
462 ndr_print_uint16(ndr, "length", r->length);
463 ndr_print_uint16(ndr, "size", r->size);
464 ndr_print_ptr(ndr, "array", r->array);
465 ndr->depth++;
466 if (r->array) {
467 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->length / 2);
468 ndr->depth++;
469 for (cntr_array_1=0;cntr_array_1<r->length / 2;cntr_array_1++) {
470 char *idx_1=NULL;
471 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
472 ndr_print_uint16(ndr, "array", r->array[cntr_array_1]);
473 free(idx_1);
476 ndr->depth--;
478 ndr->depth--;
479 ndr->depth--;
482 static enum ndr_err_code ndr_push_lsa_LUID(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUID *r)
484 if (ndr_flags & NDR_SCALARS) {
485 NDR_CHECK(ndr_push_align(ndr, 4));
486 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->low));
487 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->high));
488 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
490 if (ndr_flags & NDR_BUFFERS) {
492 return NDR_ERR_SUCCESS;
495 static enum ndr_err_code ndr_pull_lsa_LUID(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUID *r)
497 if (ndr_flags & NDR_SCALARS) {
498 NDR_CHECK(ndr_pull_align(ndr, 4));
499 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->low));
500 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->high));
501 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
503 if (ndr_flags & NDR_BUFFERS) {
505 return NDR_ERR_SUCCESS;
508 _PUBLIC_ void ndr_print_lsa_LUID(struct ndr_print *ndr, const char *name, const struct lsa_LUID *r)
510 ndr_print_struct(ndr, name, "lsa_LUID");
511 ndr->depth++;
512 ndr_print_uint32(ndr, "low", r->low);
513 ndr_print_uint32(ndr, "high", r->high);
514 ndr->depth--;
517 static enum ndr_err_code ndr_push_lsa_PrivEntry(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivEntry *r)
519 if (ndr_flags & NDR_SCALARS) {
520 NDR_CHECK(ndr_push_align(ndr, 5));
521 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
522 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
523 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
525 if (ndr_flags & NDR_BUFFERS) {
526 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
528 return NDR_ERR_SUCCESS;
531 static enum ndr_err_code ndr_pull_lsa_PrivEntry(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivEntry *r)
533 if (ndr_flags & NDR_SCALARS) {
534 NDR_CHECK(ndr_pull_align(ndr, 5));
535 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
536 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
537 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
539 if (ndr_flags & NDR_BUFFERS) {
540 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
542 return NDR_ERR_SUCCESS;
545 _PUBLIC_ void ndr_print_lsa_PrivEntry(struct ndr_print *ndr, const char *name, const struct lsa_PrivEntry *r)
547 ndr_print_struct(ndr, name, "lsa_PrivEntry");
548 ndr->depth++;
549 ndr_print_lsa_StringLarge(ndr, "name", &r->name);
550 ndr_print_lsa_LUID(ndr, "luid", &r->luid);
551 ndr->depth--;
554 static enum ndr_err_code ndr_push_lsa_PrivArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivArray *r)
556 uint32_t cntr_privs_1;
557 if (ndr_flags & NDR_SCALARS) {
558 NDR_CHECK(ndr_push_align(ndr, 5));
559 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
560 NDR_CHECK(ndr_push_unique_ptr(ndr, r->privs));
561 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
563 if (ndr_flags & NDR_BUFFERS) {
564 if (r->privs) {
565 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
566 for (cntr_privs_1 = 0; cntr_privs_1 < r->count; cntr_privs_1++) {
567 NDR_CHECK(ndr_push_lsa_PrivEntry(ndr, NDR_SCALARS, &r->privs[cntr_privs_1]));
569 for (cntr_privs_1 = 0; cntr_privs_1 < r->count; cntr_privs_1++) {
570 NDR_CHECK(ndr_push_lsa_PrivEntry(ndr, NDR_BUFFERS, &r->privs[cntr_privs_1]));
574 return NDR_ERR_SUCCESS;
577 static enum ndr_err_code ndr_pull_lsa_PrivArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivArray *r)
579 uint32_t _ptr_privs;
580 uint32_t cntr_privs_1;
581 TALLOC_CTX *_mem_save_privs_0;
582 TALLOC_CTX *_mem_save_privs_1;
583 if (ndr_flags & NDR_SCALARS) {
584 NDR_CHECK(ndr_pull_align(ndr, 5));
585 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
586 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
587 if (_ptr_privs) {
588 NDR_PULL_ALLOC(ndr, r->privs);
589 } else {
590 r->privs = NULL;
592 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
594 if (ndr_flags & NDR_BUFFERS) {
595 if (r->privs) {
596 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
597 NDR_PULL_SET_MEM_CTX(ndr, r->privs, 0);
598 NDR_CHECK(ndr_pull_array_size(ndr, &r->privs));
599 NDR_PULL_ALLOC_N(ndr, r->privs, ndr_get_array_size(ndr, &r->privs));
600 _mem_save_privs_1 = NDR_PULL_GET_MEM_CTX(ndr);
601 NDR_PULL_SET_MEM_CTX(ndr, r->privs, 0);
602 for (cntr_privs_1 = 0; cntr_privs_1 < r->count; cntr_privs_1++) {
603 NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr, NDR_SCALARS, &r->privs[cntr_privs_1]));
605 for (cntr_privs_1 = 0; cntr_privs_1 < r->count; cntr_privs_1++) {
606 NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr, NDR_BUFFERS, &r->privs[cntr_privs_1]));
608 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_1, 0);
609 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0);
611 if (r->privs) {
612 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->privs, r->count));
615 return NDR_ERR_SUCCESS;
618 _PUBLIC_ void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, const struct lsa_PrivArray *r)
620 uint32_t cntr_privs_1;
621 ndr_print_struct(ndr, name, "lsa_PrivArray");
622 ndr->depth++;
623 ndr_print_uint32(ndr, "count", r->count);
624 ndr_print_ptr(ndr, "privs", r->privs);
625 ndr->depth++;
626 if (r->privs) {
627 ndr->print(ndr, "%s: ARRAY(%d)", "privs", (int)r->count);
628 ndr->depth++;
629 for (cntr_privs_1=0;cntr_privs_1<r->count;cntr_privs_1++) {
630 char *idx_1=NULL;
631 if (asprintf(&idx_1, "[%d]", cntr_privs_1) != -1) {
632 ndr_print_lsa_PrivEntry(ndr, "privs", &r->privs[cntr_privs_1]);
633 free(idx_1);
636 ndr->depth--;
638 ndr->depth--;
639 ndr->depth--;
642 static enum ndr_err_code ndr_push_lsa_QosInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_QosInfo *r)
644 if (ndr_flags & NDR_SCALARS) {
645 NDR_CHECK(ndr_push_align(ndr, 4));
646 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
647 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->impersonation_level));
648 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->context_mode));
649 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->effective_only));
650 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
652 if (ndr_flags & NDR_BUFFERS) {
654 return NDR_ERR_SUCCESS;
657 static enum ndr_err_code ndr_pull_lsa_QosInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_QosInfo *r)
659 if (ndr_flags & NDR_SCALARS) {
660 NDR_CHECK(ndr_pull_align(ndr, 4));
661 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
662 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->impersonation_level));
663 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->context_mode));
664 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->effective_only));
665 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
667 if (ndr_flags & NDR_BUFFERS) {
669 return NDR_ERR_SUCCESS;
672 _PUBLIC_ void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, const struct lsa_QosInfo *r)
674 ndr_print_struct(ndr, name, "lsa_QosInfo");
675 ndr->depth++;
676 ndr_print_uint32(ndr, "len", r->len);
677 ndr_print_uint16(ndr, "impersonation_level", r->impersonation_level);
678 ndr_print_uint8(ndr, "context_mode", r->context_mode);
679 ndr_print_uint8(ndr, "effective_only", r->effective_only);
680 ndr->depth--;
683 static enum ndr_err_code ndr_push_lsa_ObjectAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_ObjectAttribute *r)
685 if (ndr_flags & NDR_SCALARS) {
686 NDR_CHECK(ndr_push_align(ndr, 5));
687 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
688 NDR_CHECK(ndr_push_unique_ptr(ndr, r->root_dir));
689 NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_name));
690 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attributes));
691 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sec_desc));
692 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sec_qos));
693 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
695 if (ndr_flags & NDR_BUFFERS) {
696 if (r->root_dir) {
697 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->root_dir));
699 if (r->object_name) {
700 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_name, CH_UTF16)));
701 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
702 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_name, CH_UTF16)));
703 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_name, ndr_charset_length(r->object_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
705 if (r->sec_desc) {
706 NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->sec_desc));
708 if (r->sec_qos) {
709 NDR_CHECK(ndr_push_lsa_QosInfo(ndr, NDR_SCALARS, r->sec_qos));
712 return NDR_ERR_SUCCESS;
715 static enum ndr_err_code ndr_pull_lsa_ObjectAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_ObjectAttribute *r)
717 uint32_t _ptr_root_dir;
718 TALLOC_CTX *_mem_save_root_dir_0;
719 uint32_t _ptr_object_name;
720 TALLOC_CTX *_mem_save_object_name_0;
721 uint32_t _ptr_sec_desc;
722 TALLOC_CTX *_mem_save_sec_desc_0;
723 uint32_t _ptr_sec_qos;
724 TALLOC_CTX *_mem_save_sec_qos_0;
725 if (ndr_flags & NDR_SCALARS) {
726 NDR_CHECK(ndr_pull_align(ndr, 5));
727 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
728 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_root_dir));
729 if (_ptr_root_dir) {
730 NDR_PULL_ALLOC(ndr, r->root_dir);
731 } else {
732 r->root_dir = NULL;
734 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_name));
735 if (_ptr_object_name) {
736 NDR_PULL_ALLOC(ndr, r->object_name);
737 } else {
738 r->object_name = NULL;
740 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attributes));
741 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sec_desc));
742 if (_ptr_sec_desc) {
743 NDR_PULL_ALLOC(ndr, r->sec_desc);
744 } else {
745 r->sec_desc = NULL;
747 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sec_qos));
748 if (_ptr_sec_qos) {
749 NDR_PULL_ALLOC(ndr, r->sec_qos);
750 } else {
751 r->sec_qos = NULL;
753 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
755 if (ndr_flags & NDR_BUFFERS) {
756 if (r->root_dir) {
757 _mem_save_root_dir_0 = NDR_PULL_GET_MEM_CTX(ndr);
758 NDR_PULL_SET_MEM_CTX(ndr, r->root_dir, 0);
759 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->root_dir));
760 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_root_dir_0, 0);
762 if (r->object_name) {
763 _mem_save_object_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
764 NDR_PULL_SET_MEM_CTX(ndr, r->object_name, 0);
765 NDR_CHECK(ndr_pull_array_size(ndr, &r->object_name));
766 NDR_CHECK(ndr_pull_array_length(ndr, &r->object_name));
767 if (ndr_get_array_length(ndr, &r->object_name) > ndr_get_array_size(ndr, &r->object_name)) {
768 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->object_name), ndr_get_array_length(ndr, &r->object_name));
770 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->object_name), sizeof(uint16_t)));
771 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_name, ndr_get_array_length(ndr, &r->object_name), sizeof(uint16_t), CH_UTF16));
772 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_name_0, 0);
774 if (r->sec_desc) {
775 _mem_save_sec_desc_0 = NDR_PULL_GET_MEM_CTX(ndr);
776 NDR_PULL_SET_MEM_CTX(ndr, r->sec_desc, 0);
777 NDR_CHECK(ndr_pull_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->sec_desc));
778 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_desc_0, 0);
780 if (r->sec_qos) {
781 _mem_save_sec_qos_0 = NDR_PULL_GET_MEM_CTX(ndr);
782 NDR_PULL_SET_MEM_CTX(ndr, r->sec_qos, 0);
783 NDR_CHECK(ndr_pull_lsa_QosInfo(ndr, NDR_SCALARS, r->sec_qos));
784 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_qos_0, 0);
787 return NDR_ERR_SUCCESS;
790 _PUBLIC_ void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *name, const struct lsa_ObjectAttribute *r)
792 ndr_print_struct(ndr, name, "lsa_ObjectAttribute");
793 ndr->depth++;
794 ndr_print_uint32(ndr, "len", r->len);
795 ndr_print_ptr(ndr, "root_dir", r->root_dir);
796 ndr->depth++;
797 if (r->root_dir) {
798 ndr_print_uint8(ndr, "root_dir", *r->root_dir);
800 ndr->depth--;
801 ndr_print_ptr(ndr, "object_name", r->object_name);
802 ndr->depth++;
803 if (r->object_name) {
804 ndr_print_string(ndr, "object_name", r->object_name);
806 ndr->depth--;
807 ndr_print_uint32(ndr, "attributes", r->attributes);
808 ndr_print_ptr(ndr, "sec_desc", r->sec_desc);
809 ndr->depth++;
810 if (r->sec_desc) {
811 ndr_print_security_descriptor(ndr, "sec_desc", r->sec_desc);
813 ndr->depth--;
814 ndr_print_ptr(ndr, "sec_qos", r->sec_qos);
815 ndr->depth++;
816 if (r->sec_qos) {
817 ndr_print_lsa_QosInfo(ndr, "sec_qos", r->sec_qos);
819 ndr->depth--;
820 ndr->depth--;
823 _PUBLIC_ enum ndr_err_code ndr_push_lsa_PolicyAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
825 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
826 return NDR_ERR_SUCCESS;
829 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_PolicyAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
831 uint32_t v;
832 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
833 *r = v;
834 return NDR_ERR_SUCCESS;
837 _PUBLIC_ void ndr_print_lsa_PolicyAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
839 ndr_print_uint32(ndr, name, r);
840 ndr->depth++;
841 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_VIEW_LOCAL_INFORMATION", LSA_POLICY_VIEW_LOCAL_INFORMATION, r);
842 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_VIEW_AUDIT_INFORMATION", LSA_POLICY_VIEW_AUDIT_INFORMATION, r);
843 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_GET_PRIVATE_INFORMATION", LSA_POLICY_GET_PRIVATE_INFORMATION, r);
844 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_TRUST_ADMIN", LSA_POLICY_TRUST_ADMIN, r);
845 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_ACCOUNT", LSA_POLICY_CREATE_ACCOUNT, r);
846 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_SECRET", LSA_POLICY_CREATE_SECRET, r);
847 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_PRIVILEGE", LSA_POLICY_CREATE_PRIVILEGE, r);
848 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS", LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS, r);
849 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SET_AUDIT_REQUIREMENTS", LSA_POLICY_SET_AUDIT_REQUIREMENTS, r);
850 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_AUDIT_LOG_ADMIN", LSA_POLICY_AUDIT_LOG_ADMIN, r);
851 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SERVER_ADMIN", LSA_POLICY_SERVER_ADMIN, r);
852 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_LOOKUP_NAMES", LSA_POLICY_LOOKUP_NAMES, r);
853 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_NOTIFICATION", LSA_POLICY_NOTIFICATION, r);
854 ndr->depth--;
857 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AccountAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
859 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
860 return NDR_ERR_SUCCESS;
863 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AccountAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
865 uint32_t v;
866 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
867 *r = v;
868 return NDR_ERR_SUCCESS;
871 _PUBLIC_ void ndr_print_lsa_AccountAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
873 ndr_print_uint32(ndr, name, r);
874 ndr->depth++;
875 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_VIEW", LSA_ACCOUNT_VIEW, r);
876 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_PRIVILEGES", LSA_ACCOUNT_ADJUST_PRIVILEGES, r);
877 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_QUOTAS", LSA_ACCOUNT_ADJUST_QUOTAS, r);
878 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS", LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS, r);
879 ndr->depth--;
882 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SecretAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
884 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
885 return NDR_ERR_SUCCESS;
888 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SecretAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
890 uint32_t v;
891 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
892 *r = v;
893 return NDR_ERR_SUCCESS;
896 _PUBLIC_ void ndr_print_lsa_SecretAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
898 ndr_print_uint32(ndr, name, r);
899 ndr->depth++;
900 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_SECRET_SET_VALUE", LSA_SECRET_SET_VALUE, r);
901 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_SECRET_QUERY_VALUE", LSA_SECRET_QUERY_VALUE, r);
902 ndr->depth--;
905 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustedAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
907 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
908 return NDR_ERR_SUCCESS;
911 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustedAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
913 uint32_t v;
914 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
915 *r = v;
916 return NDR_ERR_SUCCESS;
919 _PUBLIC_ void ndr_print_lsa_TrustedAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
921 ndr_print_uint32(ndr, name, r);
922 ndr->depth++;
923 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_DOMAIN_NAME", LSA_TRUSTED_QUERY_DOMAIN_NAME, r);
924 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_CONTROLLERS", LSA_TRUSTED_QUERY_CONTROLLERS, r);
925 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_SET_CONTROLLERS", LSA_TRUSTED_SET_CONTROLLERS, r);
926 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_POSIX", LSA_TRUSTED_QUERY_POSIX, r);
927 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_SET_POSIX", LSA_TRUSTED_SET_POSIX, r);
928 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_SET_AUTH", LSA_TRUSTED_SET_AUTH, r);
929 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_AUTH", LSA_TRUSTED_QUERY_AUTH, r);
930 ndr->depth--;
933 static enum ndr_err_code ndr_push_lsa_AuditLogInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditLogInfo *r)
935 if (ndr_flags & NDR_SCALARS) {
936 NDR_CHECK(ndr_push_align(ndr, 8));
937 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->percent_full));
938 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximum_log_size));
939 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->retention_time));
940 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_in_progress));
941 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->time_to_shutdown));
942 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->next_audit_record));
943 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
945 if (ndr_flags & NDR_BUFFERS) {
947 return NDR_ERR_SUCCESS;
950 static enum ndr_err_code ndr_pull_lsa_AuditLogInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditLogInfo *r)
952 if (ndr_flags & NDR_SCALARS) {
953 NDR_CHECK(ndr_pull_align(ndr, 8));
954 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->percent_full));
955 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximum_log_size));
956 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->retention_time));
957 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_in_progress));
958 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->time_to_shutdown));
959 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->next_audit_record));
960 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
962 if (ndr_flags & NDR_BUFFERS) {
964 return NDR_ERR_SUCCESS;
967 _PUBLIC_ void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditLogInfo *r)
969 ndr_print_struct(ndr, name, "lsa_AuditLogInfo");
970 ndr->depth++;
971 ndr_print_uint32(ndr, "percent_full", r->percent_full);
972 ndr_print_uint32(ndr, "maximum_log_size", r->maximum_log_size);
973 ndr_print_hyper(ndr, "retention_time", r->retention_time);
974 ndr_print_uint8(ndr, "shutdown_in_progress", r->shutdown_in_progress);
975 ndr_print_hyper(ndr, "time_to_shutdown", r->time_to_shutdown);
976 ndr_print_uint32(ndr, "next_audit_record", r->next_audit_record);
977 ndr->depth--;
980 static enum ndr_err_code ndr_push_lsa_PolicyAuditPolicy(struct ndr_push *ndr, int ndr_flags, enum lsa_PolicyAuditPolicy r)
982 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
983 return NDR_ERR_SUCCESS;
986 static enum ndr_err_code ndr_pull_lsa_PolicyAuditPolicy(struct ndr_pull *ndr, int ndr_flags, enum lsa_PolicyAuditPolicy *r)
988 uint32_t v;
989 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
990 *r = v;
991 return NDR_ERR_SUCCESS;
994 _PUBLIC_ void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print *ndr, const char *name, enum lsa_PolicyAuditPolicy r)
996 const char *val = NULL;
998 switch (r) {
999 case LSA_AUDIT_POLICY_NONE: val = "LSA_AUDIT_POLICY_NONE"; break;
1000 case LSA_AUDIT_POLICY_SUCCESS: val = "LSA_AUDIT_POLICY_SUCCESS"; break;
1001 case LSA_AUDIT_POLICY_FAILURE: val = "LSA_AUDIT_POLICY_FAILURE"; break;
1002 case LSA_AUDIT_POLICY_ALL: val = "LSA_AUDIT_POLICY_ALL"; break;
1003 case LSA_AUDIT_POLICY_CLEAR: val = "LSA_AUDIT_POLICY_CLEAR"; break;
1005 ndr_print_enum(ndr, name, "ENUM", val, r);
1008 static enum ndr_err_code ndr_push_lsa_AuditEventsInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditEventsInfo *r)
1010 uint32_t cntr_settings_1;
1011 if (ndr_flags & NDR_SCALARS) {
1012 NDR_CHECK(ndr_push_align(ndr, 5));
1013 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditing_mode));
1014 NDR_CHECK(ndr_push_unique_ptr(ndr, r->settings));
1015 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1016 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1018 if (ndr_flags & NDR_BUFFERS) {
1019 if (r->settings) {
1020 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1021 for (cntr_settings_1 = 0; cntr_settings_1 < r->count; cntr_settings_1++) {
1022 NDR_CHECK(ndr_push_lsa_PolicyAuditPolicy(ndr, NDR_SCALARS, r->settings[cntr_settings_1]));
1026 return NDR_ERR_SUCCESS;
1029 static enum ndr_err_code ndr_pull_lsa_AuditEventsInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditEventsInfo *r)
1031 uint32_t _ptr_settings;
1032 uint32_t cntr_settings_1;
1033 TALLOC_CTX *_mem_save_settings_0;
1034 TALLOC_CTX *_mem_save_settings_1;
1035 if (ndr_flags & NDR_SCALARS) {
1036 NDR_CHECK(ndr_pull_align(ndr, 5));
1037 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditing_mode));
1038 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_settings));
1039 if (_ptr_settings) {
1040 NDR_PULL_ALLOC(ndr, r->settings);
1041 } else {
1042 r->settings = NULL;
1044 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1045 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1047 if (ndr_flags & NDR_BUFFERS) {
1048 if (r->settings) {
1049 _mem_save_settings_0 = NDR_PULL_GET_MEM_CTX(ndr);
1050 NDR_PULL_SET_MEM_CTX(ndr, r->settings, 0);
1051 NDR_CHECK(ndr_pull_array_size(ndr, &r->settings));
1052 NDR_PULL_ALLOC_N(ndr, r->settings, ndr_get_array_size(ndr, &r->settings));
1053 _mem_save_settings_1 = NDR_PULL_GET_MEM_CTX(ndr);
1054 NDR_PULL_SET_MEM_CTX(ndr, r->settings, 0);
1055 for (cntr_settings_1 = 0; cntr_settings_1 < r->count; cntr_settings_1++) {
1056 NDR_CHECK(ndr_pull_lsa_PolicyAuditPolicy(ndr, NDR_SCALARS, &r->settings[cntr_settings_1]));
1058 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_settings_1, 0);
1059 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_settings_0, 0);
1061 if (r->settings) {
1062 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->settings, r->count));
1065 return NDR_ERR_SUCCESS;
1068 _PUBLIC_ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditEventsInfo *r)
1070 uint32_t cntr_settings_1;
1071 ndr_print_struct(ndr, name, "lsa_AuditEventsInfo");
1072 ndr->depth++;
1073 ndr_print_uint32(ndr, "auditing_mode", r->auditing_mode);
1074 ndr_print_ptr(ndr, "settings", r->settings);
1075 ndr->depth++;
1076 if (r->settings) {
1077 ndr->print(ndr, "%s: ARRAY(%d)", "settings", (int)r->count);
1078 ndr->depth++;
1079 for (cntr_settings_1=0;cntr_settings_1<r->count;cntr_settings_1++) {
1080 char *idx_1=NULL;
1081 if (asprintf(&idx_1, "[%d]", cntr_settings_1) != -1) {
1082 ndr_print_lsa_PolicyAuditPolicy(ndr, "settings", r->settings[cntr_settings_1]);
1083 free(idx_1);
1086 ndr->depth--;
1088 ndr->depth--;
1089 ndr_print_uint32(ndr, "count", r->count);
1090 ndr->depth--;
1093 static enum ndr_err_code ndr_push_lsa_DomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfo *r)
1095 if (ndr_flags & NDR_SCALARS) {
1096 NDR_CHECK(ndr_push_align(ndr, 5));
1097 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1098 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
1099 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1101 if (ndr_flags & NDR_BUFFERS) {
1102 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1103 if (r->sid) {
1104 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1107 return NDR_ERR_SUCCESS;
1110 static enum ndr_err_code ndr_pull_lsa_DomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfo *r)
1112 uint32_t _ptr_sid;
1113 TALLOC_CTX *_mem_save_sid_0;
1114 if (ndr_flags & NDR_SCALARS) {
1115 NDR_CHECK(ndr_pull_align(ndr, 5));
1116 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1117 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
1118 if (_ptr_sid) {
1119 NDR_PULL_ALLOC(ndr, r->sid);
1120 } else {
1121 r->sid = NULL;
1123 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1125 if (ndr_flags & NDR_BUFFERS) {
1126 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1127 if (r->sid) {
1128 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1129 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
1130 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1131 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
1134 return NDR_ERR_SUCCESS;
1137 _PUBLIC_ void ndr_print_lsa_DomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfo *r)
1139 ndr_print_struct(ndr, name, "lsa_DomainInfo");
1140 ndr->depth++;
1141 ndr_print_lsa_StringLarge(ndr, "name", &r->name);
1142 ndr_print_ptr(ndr, "sid", r->sid);
1143 ndr->depth++;
1144 if (r->sid) {
1145 ndr_print_dom_sid2(ndr, "sid", r->sid);
1147 ndr->depth--;
1148 ndr->depth--;
1151 static enum ndr_err_code ndr_push_lsa_PDAccountInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_PDAccountInfo *r)
1153 if (ndr_flags & NDR_SCALARS) {
1154 NDR_CHECK(ndr_push_align(ndr, 5));
1155 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1156 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1158 if (ndr_flags & NDR_BUFFERS) {
1159 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1161 return NDR_ERR_SUCCESS;
1164 static enum ndr_err_code ndr_pull_lsa_PDAccountInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_PDAccountInfo *r)
1166 if (ndr_flags & NDR_SCALARS) {
1167 NDR_CHECK(ndr_pull_align(ndr, 5));
1168 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1169 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1171 if (ndr_flags & NDR_BUFFERS) {
1172 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1174 return NDR_ERR_SUCCESS;
1177 _PUBLIC_ void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *name, const struct lsa_PDAccountInfo *r)
1179 ndr_print_struct(ndr, name, "lsa_PDAccountInfo");
1180 ndr->depth++;
1181 ndr_print_lsa_String(ndr, "name", &r->name);
1182 ndr->depth--;
1185 static enum ndr_err_code ndr_push_lsa_Role(struct ndr_push *ndr, int ndr_flags, enum lsa_Role r)
1187 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1188 return NDR_ERR_SUCCESS;
1191 static enum ndr_err_code ndr_pull_lsa_Role(struct ndr_pull *ndr, int ndr_flags, enum lsa_Role *r)
1193 uint32_t v;
1194 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1195 *r = v;
1196 return NDR_ERR_SUCCESS;
1199 _PUBLIC_ void ndr_print_lsa_Role(struct ndr_print *ndr, const char *name, enum lsa_Role r)
1201 const char *val = NULL;
1203 switch (r) {
1204 case LSA_ROLE_BACKUP: val = "LSA_ROLE_BACKUP"; break;
1205 case LSA_ROLE_PRIMARY: val = "LSA_ROLE_PRIMARY"; break;
1207 ndr_print_enum(ndr, name, "ENUM", val, r);
1210 static enum ndr_err_code ndr_push_lsa_ServerRole(struct ndr_push *ndr, int ndr_flags, const struct lsa_ServerRole *r)
1212 if (ndr_flags & NDR_SCALARS) {
1213 NDR_CHECK(ndr_push_align(ndr, 4));
1214 NDR_CHECK(ndr_push_lsa_Role(ndr, NDR_SCALARS, r->role));
1215 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1217 if (ndr_flags & NDR_BUFFERS) {
1219 return NDR_ERR_SUCCESS;
1222 static enum ndr_err_code ndr_pull_lsa_ServerRole(struct ndr_pull *ndr, int ndr_flags, struct lsa_ServerRole *r)
1224 if (ndr_flags & NDR_SCALARS) {
1225 NDR_CHECK(ndr_pull_align(ndr, 4));
1226 NDR_CHECK(ndr_pull_lsa_Role(ndr, NDR_SCALARS, &r->role));
1227 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1229 if (ndr_flags & NDR_BUFFERS) {
1231 return NDR_ERR_SUCCESS;
1234 _PUBLIC_ void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, const struct lsa_ServerRole *r)
1236 ndr_print_struct(ndr, name, "lsa_ServerRole");
1237 ndr->depth++;
1238 ndr_print_lsa_Role(ndr, "role", r->role);
1239 ndr->depth--;
1242 static enum ndr_err_code ndr_push_lsa_ReplicaSourceInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ReplicaSourceInfo *r)
1244 if (ndr_flags & NDR_SCALARS) {
1245 NDR_CHECK(ndr_push_align(ndr, 5));
1246 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->source));
1247 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account));
1248 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1250 if (ndr_flags & NDR_BUFFERS) {
1251 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->source));
1252 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account));
1254 return NDR_ERR_SUCCESS;
1257 static enum ndr_err_code ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ReplicaSourceInfo *r)
1259 if (ndr_flags & NDR_SCALARS) {
1260 NDR_CHECK(ndr_pull_align(ndr, 5));
1261 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->source));
1262 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account));
1263 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1265 if (ndr_flags & NDR_BUFFERS) {
1266 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->source));
1267 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account));
1269 return NDR_ERR_SUCCESS;
1272 _PUBLIC_ void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print *ndr, const char *name, const struct lsa_ReplicaSourceInfo *r)
1274 ndr_print_struct(ndr, name, "lsa_ReplicaSourceInfo");
1275 ndr->depth++;
1276 ndr_print_lsa_String(ndr, "source", &r->source);
1277 ndr_print_lsa_String(ndr, "account", &r->account);
1278 ndr->depth--;
1281 static enum ndr_err_code ndr_push_lsa_DefaultQuotaInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DefaultQuotaInfo *r)
1283 if (ndr_flags & NDR_SCALARS) {
1284 NDR_CHECK(ndr_push_align(ndr, 8));
1285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->paged_pool));
1286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->non_paged_pool));
1287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->min_wss));
1288 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_wss));
1289 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagefile));
1290 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown));
1291 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1293 if (ndr_flags & NDR_BUFFERS) {
1295 return NDR_ERR_SUCCESS;
1298 static enum ndr_err_code ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DefaultQuotaInfo *r)
1300 if (ndr_flags & NDR_SCALARS) {
1301 NDR_CHECK(ndr_pull_align(ndr, 8));
1302 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->paged_pool));
1303 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->non_paged_pool));
1304 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->min_wss));
1305 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_wss));
1306 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagefile));
1307 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown));
1308 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1310 if (ndr_flags & NDR_BUFFERS) {
1312 return NDR_ERR_SUCCESS;
1315 _PUBLIC_ void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print *ndr, const char *name, const struct lsa_DefaultQuotaInfo *r)
1317 ndr_print_struct(ndr, name, "lsa_DefaultQuotaInfo");
1318 ndr->depth++;
1319 ndr_print_uint32(ndr, "paged_pool", r->paged_pool);
1320 ndr_print_uint32(ndr, "non_paged_pool", r->non_paged_pool);
1321 ndr_print_uint32(ndr, "min_wss", r->min_wss);
1322 ndr_print_uint32(ndr, "max_wss", r->max_wss);
1323 ndr_print_uint32(ndr, "pagefile", r->pagefile);
1324 ndr_print_hyper(ndr, "unknown", r->unknown);
1325 ndr->depth--;
1328 static enum ndr_err_code ndr_push_lsa_ModificationInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ModificationInfo *r)
1330 if (ndr_flags & NDR_SCALARS) {
1331 NDR_CHECK(ndr_push_align(ndr, 8));
1332 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->modified_id));
1333 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->db_create_time));
1334 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1336 if (ndr_flags & NDR_BUFFERS) {
1338 return NDR_ERR_SUCCESS;
1341 static enum ndr_err_code ndr_pull_lsa_ModificationInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ModificationInfo *r)
1343 if (ndr_flags & NDR_SCALARS) {
1344 NDR_CHECK(ndr_pull_align(ndr, 8));
1345 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->modified_id));
1346 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->db_create_time));
1347 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1349 if (ndr_flags & NDR_BUFFERS) {
1351 return NDR_ERR_SUCCESS;
1354 _PUBLIC_ void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *name, const struct lsa_ModificationInfo *r)
1356 ndr_print_struct(ndr, name, "lsa_ModificationInfo");
1357 ndr->depth++;
1358 ndr_print_hyper(ndr, "modified_id", r->modified_id);
1359 ndr_print_NTTIME_hyper(ndr, "db_create_time", r->db_create_time);
1360 ndr->depth--;
1363 static enum ndr_err_code ndr_push_lsa_AuditFullSetInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullSetInfo *r)
1365 if (ndr_flags & NDR_SCALARS) {
1366 NDR_CHECK(ndr_push_align(ndr, 1));
1367 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full));
1368 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
1370 if (ndr_flags & NDR_BUFFERS) {
1372 return NDR_ERR_SUCCESS;
1375 static enum ndr_err_code ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullSetInfo *r)
1377 if (ndr_flags & NDR_SCALARS) {
1378 NDR_CHECK(ndr_pull_align(ndr, 1));
1379 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full));
1380 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
1382 if (ndr_flags & NDR_BUFFERS) {
1384 return NDR_ERR_SUCCESS;
1387 _PUBLIC_ void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullSetInfo *r)
1389 ndr_print_struct(ndr, name, "lsa_AuditFullSetInfo");
1390 ndr->depth++;
1391 ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full);
1392 ndr->depth--;
1395 static enum ndr_err_code ndr_push_lsa_AuditFullQueryInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullQueryInfo *r)
1397 if (ndr_flags & NDR_SCALARS) {
1398 NDR_CHECK(ndr_push_align(ndr, 1));
1399 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full));
1400 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->log_is_full));
1401 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
1403 if (ndr_flags & NDR_BUFFERS) {
1405 return NDR_ERR_SUCCESS;
1408 static enum ndr_err_code ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullQueryInfo *r)
1410 if (ndr_flags & NDR_SCALARS) {
1411 NDR_CHECK(ndr_pull_align(ndr, 1));
1412 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full));
1413 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->log_is_full));
1414 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
1416 if (ndr_flags & NDR_BUFFERS) {
1418 return NDR_ERR_SUCCESS;
1421 _PUBLIC_ void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullQueryInfo *r)
1423 ndr_print_struct(ndr, name, "lsa_AuditFullQueryInfo");
1424 ndr->depth++;
1425 ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full);
1426 ndr_print_uint8(ndr, "log_is_full", r->log_is_full);
1427 ndr->depth--;
1430 static enum ndr_err_code ndr_push_lsa_DnsDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DnsDomainInfo *r)
1432 if (ndr_flags & NDR_SCALARS) {
1433 NDR_CHECK(ndr_push_align(ndr, 5));
1434 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1435 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain));
1436 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forest));
1437 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
1438 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
1439 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1441 if (ndr_flags & NDR_BUFFERS) {
1442 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1443 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain));
1444 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forest));
1445 if (r->sid) {
1446 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1449 return NDR_ERR_SUCCESS;
1452 static enum ndr_err_code ndr_pull_lsa_DnsDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DnsDomainInfo *r)
1454 uint32_t _ptr_sid;
1455 TALLOC_CTX *_mem_save_sid_0;
1456 if (ndr_flags & NDR_SCALARS) {
1457 NDR_CHECK(ndr_pull_align(ndr, 5));
1458 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1459 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain));
1460 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forest));
1461 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
1462 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
1463 if (_ptr_sid) {
1464 NDR_PULL_ALLOC(ndr, r->sid);
1465 } else {
1466 r->sid = NULL;
1468 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1470 if (ndr_flags & NDR_BUFFERS) {
1471 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1472 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain));
1473 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forest));
1474 if (r->sid) {
1475 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1476 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
1477 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1478 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
1481 return NDR_ERR_SUCCESS;
1484 _PUBLIC_ void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DnsDomainInfo *r)
1486 ndr_print_struct(ndr, name, "lsa_DnsDomainInfo");
1487 ndr->depth++;
1488 ndr_print_lsa_StringLarge(ndr, "name", &r->name);
1489 ndr_print_lsa_StringLarge(ndr, "dns_domain", &r->dns_domain);
1490 ndr_print_lsa_StringLarge(ndr, "dns_forest", &r->dns_forest);
1491 ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
1492 ndr_print_ptr(ndr, "sid", r->sid);
1493 ndr->depth++;
1494 if (r->sid) {
1495 ndr_print_dom_sid2(ndr, "sid", r->sid);
1497 ndr->depth--;
1498 ndr->depth--;
1501 static enum ndr_err_code ndr_push_lsa_PolicyInfo(struct ndr_push *ndr, int ndr_flags, enum lsa_PolicyInfo r)
1503 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1504 return NDR_ERR_SUCCESS;
1507 static enum ndr_err_code ndr_pull_lsa_PolicyInfo(struct ndr_pull *ndr, int ndr_flags, enum lsa_PolicyInfo *r)
1509 uint16_t v;
1510 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1511 *r = v;
1512 return NDR_ERR_SUCCESS;
1515 _PUBLIC_ void ndr_print_lsa_PolicyInfo(struct ndr_print *ndr, const char *name, enum lsa_PolicyInfo r)
1517 const char *val = NULL;
1519 switch (r) {
1520 case LSA_POLICY_INFO_AUDIT_LOG: val = "LSA_POLICY_INFO_AUDIT_LOG"; break;
1521 case LSA_POLICY_INFO_AUDIT_EVENTS: val = "LSA_POLICY_INFO_AUDIT_EVENTS"; break;
1522 case LSA_POLICY_INFO_DOMAIN: val = "LSA_POLICY_INFO_DOMAIN"; break;
1523 case LSA_POLICY_INFO_PD: val = "LSA_POLICY_INFO_PD"; break;
1524 case LSA_POLICY_INFO_ACCOUNT_DOMAIN: val = "LSA_POLICY_INFO_ACCOUNT_DOMAIN"; break;
1525 case LSA_POLICY_INFO_ROLE: val = "LSA_POLICY_INFO_ROLE"; break;
1526 case LSA_POLICY_INFO_REPLICA: val = "LSA_POLICY_INFO_REPLICA"; break;
1527 case LSA_POLICY_INFO_QUOTA: val = "LSA_POLICY_INFO_QUOTA"; break;
1528 case LSA_POLICY_INFO_MOD: val = "LSA_POLICY_INFO_MOD"; break;
1529 case LSA_POLICY_INFO_AUDIT_FULL_SET: val = "LSA_POLICY_INFO_AUDIT_FULL_SET"; break;
1530 case LSA_POLICY_INFO_AUDIT_FULL_QUERY: val = "LSA_POLICY_INFO_AUDIT_FULL_QUERY"; break;
1531 case LSA_POLICY_INFO_DNS: val = "LSA_POLICY_INFO_DNS"; break;
1532 case LSA_POLICY_INFO_DNS_INT: val = "LSA_POLICY_INFO_DNS_INT"; break;
1533 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: val = "LSA_POLICY_INFO_L_ACCOUNT_DOMAIN"; break;
1535 ndr_print_enum(ndr, name, "ENUM", val, r);
1538 static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, int ndr_flags, const union lsa_PolicyInformation *r)
1540 if (ndr_flags & NDR_SCALARS) {
1541 int level = ndr_push_get_switch_value(ndr, r);
1542 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
1543 NDR_CHECK(ndr_push_union_align(ndr, 8));
1544 switch (level) {
1545 case LSA_POLICY_INFO_AUDIT_LOG: {
1546 NDR_CHECK(ndr_push_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log));
1547 break; }
1549 case LSA_POLICY_INFO_AUDIT_EVENTS: {
1550 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr, NDR_SCALARS, &r->audit_events));
1551 break; }
1553 case LSA_POLICY_INFO_DOMAIN: {
1554 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain));
1555 break; }
1557 case LSA_POLICY_INFO_PD: {
1558 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd));
1559 break; }
1561 case LSA_POLICY_INFO_ACCOUNT_DOMAIN: {
1562 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain));
1563 break; }
1565 case LSA_POLICY_INFO_ROLE: {
1566 NDR_CHECK(ndr_push_lsa_ServerRole(ndr, NDR_SCALARS, &r->role));
1567 break; }
1569 case LSA_POLICY_INFO_REPLICA: {
1570 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica));
1571 break; }
1573 case LSA_POLICY_INFO_QUOTA: {
1574 NDR_CHECK(ndr_push_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota));
1575 break; }
1577 case LSA_POLICY_INFO_MOD: {
1578 NDR_CHECK(ndr_push_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->mod));
1579 break; }
1581 case LSA_POLICY_INFO_AUDIT_FULL_SET: {
1582 NDR_CHECK(ndr_push_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset));
1583 break; }
1585 case LSA_POLICY_INFO_AUDIT_FULL_QUERY: {
1586 NDR_CHECK(ndr_push_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery));
1587 break; }
1589 case LSA_POLICY_INFO_DNS: {
1590 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1591 break; }
1593 case LSA_POLICY_INFO_DNS_INT: {
1594 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1595 break; }
1597 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: {
1598 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->l_account_domain));
1599 break; }
1601 default:
1602 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1605 if (ndr_flags & NDR_BUFFERS) {
1606 int level = ndr_push_get_switch_value(ndr, r);
1607 switch (level) {
1608 case LSA_POLICY_INFO_AUDIT_LOG:
1609 break;
1611 case LSA_POLICY_INFO_AUDIT_EVENTS:
1612 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr, NDR_BUFFERS, &r->audit_events));
1613 break;
1615 case LSA_POLICY_INFO_DOMAIN:
1616 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domain));
1617 break;
1619 case LSA_POLICY_INFO_PD:
1620 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr, NDR_BUFFERS, &r->pd));
1621 break;
1623 case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
1624 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->account_domain));
1625 break;
1627 case LSA_POLICY_INFO_ROLE:
1628 break;
1630 case LSA_POLICY_INFO_REPLICA:
1631 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr, NDR_BUFFERS, &r->replica));
1632 break;
1634 case LSA_POLICY_INFO_QUOTA:
1635 break;
1637 case LSA_POLICY_INFO_MOD:
1638 break;
1640 case LSA_POLICY_INFO_AUDIT_FULL_SET:
1641 break;
1643 case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
1644 break;
1646 case LSA_POLICY_INFO_DNS:
1647 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1648 break;
1650 case LSA_POLICY_INFO_DNS_INT:
1651 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1652 break;
1654 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
1655 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->l_account_domain));
1656 break;
1658 default:
1659 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1662 return NDR_ERR_SUCCESS;
1665 static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, int ndr_flags, union lsa_PolicyInformation *r)
1667 int level;
1668 uint16_t _level;
1669 level = ndr_pull_get_switch_value(ndr, r);
1670 if (ndr_flags & NDR_SCALARS) {
1671 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
1672 if (_level != level) {
1673 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1675 NDR_CHECK(ndr_pull_union_align(ndr, 8));
1676 switch (level) {
1677 case LSA_POLICY_INFO_AUDIT_LOG: {
1678 NDR_CHECK(ndr_pull_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log));
1679 break; }
1681 case LSA_POLICY_INFO_AUDIT_EVENTS: {
1682 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr, NDR_SCALARS, &r->audit_events));
1683 break; }
1685 case LSA_POLICY_INFO_DOMAIN: {
1686 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain));
1687 break; }
1689 case LSA_POLICY_INFO_PD: {
1690 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd));
1691 break; }
1693 case LSA_POLICY_INFO_ACCOUNT_DOMAIN: {
1694 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain));
1695 break; }
1697 case LSA_POLICY_INFO_ROLE: {
1698 NDR_CHECK(ndr_pull_lsa_ServerRole(ndr, NDR_SCALARS, &r->role));
1699 break; }
1701 case LSA_POLICY_INFO_REPLICA: {
1702 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica));
1703 break; }
1705 case LSA_POLICY_INFO_QUOTA: {
1706 NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota));
1707 break; }
1709 case LSA_POLICY_INFO_MOD: {
1710 NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->mod));
1711 break; }
1713 case LSA_POLICY_INFO_AUDIT_FULL_SET: {
1714 NDR_CHECK(ndr_pull_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset));
1715 break; }
1717 case LSA_POLICY_INFO_AUDIT_FULL_QUERY: {
1718 NDR_CHECK(ndr_pull_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery));
1719 break; }
1721 case LSA_POLICY_INFO_DNS: {
1722 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1723 break; }
1725 case LSA_POLICY_INFO_DNS_INT: {
1726 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1727 break; }
1729 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: {
1730 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->l_account_domain));
1731 break; }
1733 default:
1734 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1737 if (ndr_flags & NDR_BUFFERS) {
1738 switch (level) {
1739 case LSA_POLICY_INFO_AUDIT_LOG:
1740 break;
1742 case LSA_POLICY_INFO_AUDIT_EVENTS:
1743 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr, NDR_BUFFERS, &r->audit_events));
1744 break;
1746 case LSA_POLICY_INFO_DOMAIN:
1747 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domain));
1748 break;
1750 case LSA_POLICY_INFO_PD:
1751 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_BUFFERS, &r->pd));
1752 break;
1754 case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
1755 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->account_domain));
1756 break;
1758 case LSA_POLICY_INFO_ROLE:
1759 break;
1761 case LSA_POLICY_INFO_REPLICA:
1762 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_BUFFERS, &r->replica));
1763 break;
1765 case LSA_POLICY_INFO_QUOTA:
1766 break;
1768 case LSA_POLICY_INFO_MOD:
1769 break;
1771 case LSA_POLICY_INFO_AUDIT_FULL_SET:
1772 break;
1774 case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
1775 break;
1777 case LSA_POLICY_INFO_DNS:
1778 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1779 break;
1781 case LSA_POLICY_INFO_DNS_INT:
1782 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1783 break;
1785 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
1786 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->l_account_domain));
1787 break;
1789 default:
1790 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1793 return NDR_ERR_SUCCESS;
1796 _PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char *name, const union lsa_PolicyInformation *r)
1798 int level;
1799 level = ndr_print_get_switch_value(ndr, r);
1800 ndr_print_union(ndr, name, level, "lsa_PolicyInformation");
1801 switch (level) {
1802 case LSA_POLICY_INFO_AUDIT_LOG:
1803 ndr_print_lsa_AuditLogInfo(ndr, "audit_log", &r->audit_log);
1804 break;
1806 case LSA_POLICY_INFO_AUDIT_EVENTS:
1807 ndr_print_lsa_AuditEventsInfo(ndr, "audit_events", &r->audit_events);
1808 break;
1810 case LSA_POLICY_INFO_DOMAIN:
1811 ndr_print_lsa_DomainInfo(ndr, "domain", &r->domain);
1812 break;
1814 case LSA_POLICY_INFO_PD:
1815 ndr_print_lsa_PDAccountInfo(ndr, "pd", &r->pd);
1816 break;
1818 case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
1819 ndr_print_lsa_DomainInfo(ndr, "account_domain", &r->account_domain);
1820 break;
1822 case LSA_POLICY_INFO_ROLE:
1823 ndr_print_lsa_ServerRole(ndr, "role", &r->role);
1824 break;
1826 case LSA_POLICY_INFO_REPLICA:
1827 ndr_print_lsa_ReplicaSourceInfo(ndr, "replica", &r->replica);
1828 break;
1830 case LSA_POLICY_INFO_QUOTA:
1831 ndr_print_lsa_DefaultQuotaInfo(ndr, "quota", &r->quota);
1832 break;
1834 case LSA_POLICY_INFO_MOD:
1835 ndr_print_lsa_ModificationInfo(ndr, "mod", &r->mod);
1836 break;
1838 case LSA_POLICY_INFO_AUDIT_FULL_SET:
1839 ndr_print_lsa_AuditFullSetInfo(ndr, "auditfullset", &r->auditfullset);
1840 break;
1842 case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
1843 ndr_print_lsa_AuditFullQueryInfo(ndr, "auditfullquery", &r->auditfullquery);
1844 break;
1846 case LSA_POLICY_INFO_DNS:
1847 ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
1848 break;
1850 case LSA_POLICY_INFO_DNS_INT:
1851 ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
1852 break;
1854 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
1855 ndr_print_lsa_DomainInfo(ndr, "l_account_domain", &r->l_account_domain);
1856 break;
1858 default:
1859 ndr_print_bad_level(ndr, name, level);
1863 static enum ndr_err_code ndr_push_lsa_SidPtr(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidPtr *r)
1865 if (ndr_flags & NDR_SCALARS) {
1866 NDR_CHECK(ndr_push_align(ndr, 5));
1867 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
1868 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1870 if (ndr_flags & NDR_BUFFERS) {
1871 if (r->sid) {
1872 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1875 return NDR_ERR_SUCCESS;
1878 static enum ndr_err_code ndr_pull_lsa_SidPtr(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidPtr *r)
1880 uint32_t _ptr_sid;
1881 TALLOC_CTX *_mem_save_sid_0;
1882 if (ndr_flags & NDR_SCALARS) {
1883 NDR_CHECK(ndr_pull_align(ndr, 5));
1884 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
1885 if (_ptr_sid) {
1886 NDR_PULL_ALLOC(ndr, r->sid);
1887 } else {
1888 r->sid = NULL;
1890 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1892 if (ndr_flags & NDR_BUFFERS) {
1893 if (r->sid) {
1894 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1895 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
1896 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1897 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
1900 return NDR_ERR_SUCCESS;
1903 _PUBLIC_ void ndr_print_lsa_SidPtr(struct ndr_print *ndr, const char *name, const struct lsa_SidPtr *r)
1905 ndr_print_struct(ndr, name, "lsa_SidPtr");
1906 ndr->depth++;
1907 ndr_print_ptr(ndr, "sid", r->sid);
1908 ndr->depth++;
1909 if (r->sid) {
1910 ndr_print_dom_sid2(ndr, "sid", r->sid);
1912 ndr->depth--;
1913 ndr->depth--;
1916 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidArray *r)
1918 uint32_t cntr_sids_1;
1919 if (ndr_flags & NDR_SCALARS) {
1920 NDR_CHECK(ndr_push_align(ndr, 5));
1921 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
1922 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
1923 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1925 if (ndr_flags & NDR_BUFFERS) {
1926 if (r->sids) {
1927 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_sids));
1928 for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
1929 NDR_CHECK(ndr_push_lsa_SidPtr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1931 for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
1932 NDR_CHECK(ndr_push_lsa_SidPtr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1936 return NDR_ERR_SUCCESS;
1939 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidArray *r)
1941 uint32_t _ptr_sids;
1942 uint32_t cntr_sids_1;
1943 TALLOC_CTX *_mem_save_sids_0;
1944 TALLOC_CTX *_mem_save_sids_1;
1945 if (ndr_flags & NDR_SCALARS) {
1946 NDR_CHECK(ndr_pull_align(ndr, 5));
1947 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
1948 if (r->num_sids > 20480) {
1949 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1951 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
1952 if (_ptr_sids) {
1953 NDR_PULL_ALLOC(ndr, r->sids);
1954 } else {
1955 r->sids = NULL;
1957 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1959 if (ndr_flags & NDR_BUFFERS) {
1960 if (r->sids) {
1961 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1962 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1963 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
1964 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
1965 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1966 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1967 for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
1968 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1970 for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
1971 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1973 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
1974 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
1976 if (r->sids) {
1977 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
1980 return NDR_ERR_SUCCESS;
1983 _PUBLIC_ void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, const struct lsa_SidArray *r)
1985 uint32_t cntr_sids_1;
1986 ndr_print_struct(ndr, name, "lsa_SidArray");
1987 ndr->depth++;
1988 ndr_print_uint32(ndr, "num_sids", r->num_sids);
1989 ndr_print_ptr(ndr, "sids", r->sids);
1990 ndr->depth++;
1991 if (r->sids) {
1992 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->num_sids);
1993 ndr->depth++;
1994 for (cntr_sids_1=0;cntr_sids_1<r->num_sids;cntr_sids_1++) {
1995 char *idx_1=NULL;
1996 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
1997 ndr_print_lsa_SidPtr(ndr, "sids", &r->sids[cntr_sids_1]);
1998 free(idx_1);
2001 ndr->depth--;
2003 ndr->depth--;
2004 ndr->depth--;
2007 static enum ndr_err_code ndr_push_lsa_DomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainList *r)
2009 uint32_t cntr_domains_1;
2010 if (ndr_flags & NDR_SCALARS) {
2011 NDR_CHECK(ndr_push_align(ndr, 5));
2012 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2013 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
2014 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2016 if (ndr_flags & NDR_BUFFERS) {
2017 if (r->domains) {
2018 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2019 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2020 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
2022 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2023 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
2027 return NDR_ERR_SUCCESS;
2030 static enum ndr_err_code ndr_pull_lsa_DomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainList *r)
2032 uint32_t _ptr_domains;
2033 uint32_t cntr_domains_1;
2034 TALLOC_CTX *_mem_save_domains_0;
2035 TALLOC_CTX *_mem_save_domains_1;
2036 if (ndr_flags & NDR_SCALARS) {
2037 NDR_CHECK(ndr_pull_align(ndr, 5));
2038 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2039 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
2040 if (_ptr_domains) {
2041 NDR_PULL_ALLOC(ndr, r->domains);
2042 } else {
2043 r->domains = NULL;
2045 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2047 if (ndr_flags & NDR_BUFFERS) {
2048 if (r->domains) {
2049 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
2050 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
2051 NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
2052 NDR_PULL_ALLOC_N(ndr, r->domains, ndr_get_array_size(ndr, &r->domains));
2053 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
2054 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
2055 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2056 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
2058 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2059 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
2061 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
2062 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
2064 if (r->domains) {
2065 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
2068 return NDR_ERR_SUCCESS;
2071 _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, const struct lsa_DomainList *r)
2073 uint32_t cntr_domains_1;
2074 ndr_print_struct(ndr, name, "lsa_DomainList");
2075 ndr->depth++;
2076 ndr_print_uint32(ndr, "count", r->count);
2077 ndr_print_ptr(ndr, "domains", r->domains);
2078 ndr->depth++;
2079 if (r->domains) {
2080 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
2081 ndr->depth++;
2082 for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
2083 char *idx_1=NULL;
2084 if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
2085 ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
2086 free(idx_1);
2089 ndr->depth--;
2091 ndr->depth--;
2092 ndr->depth--;
2095 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidType(struct ndr_push *ndr, int ndr_flags, enum lsa_SidType r)
2097 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
2098 return NDR_ERR_SUCCESS;
2101 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidType(struct ndr_pull *ndr, int ndr_flags, enum lsa_SidType *r)
2103 uint16_t v;
2104 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
2105 *r = v;
2106 return NDR_ERR_SUCCESS;
2109 _PUBLIC_ void ndr_print_lsa_SidType(struct ndr_print *ndr, const char *name, enum lsa_SidType r)
2111 const char *val = NULL;
2113 switch (r) {
2114 case SID_NAME_USE_NONE: val = "SID_NAME_USE_NONE"; break;
2115 case SID_NAME_USER: val = "SID_NAME_USER"; break;
2116 case SID_NAME_DOM_GRP: val = "SID_NAME_DOM_GRP"; break;
2117 case SID_NAME_DOMAIN: val = "SID_NAME_DOMAIN"; break;
2118 case SID_NAME_ALIAS: val = "SID_NAME_ALIAS"; break;
2119 case SID_NAME_WKN_GRP: val = "SID_NAME_WKN_GRP"; break;
2120 case SID_NAME_DELETED: val = "SID_NAME_DELETED"; break;
2121 case SID_NAME_INVALID: val = "SID_NAME_INVALID"; break;
2122 case SID_NAME_UNKNOWN: val = "SID_NAME_UNKNOWN"; break;
2123 case SID_NAME_COMPUTER: val = "SID_NAME_COMPUTER"; break;
2125 ndr_print_enum(ndr, name, "ENUM", val, r);
2128 static enum ndr_err_code ndr_push_lsa_TranslatedSid(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid *r)
2130 if (ndr_flags & NDR_SCALARS) {
2131 NDR_CHECK(ndr_push_align(ndr, 4));
2132 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
2133 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
2134 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
2135 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2137 if (ndr_flags & NDR_BUFFERS) {
2139 return NDR_ERR_SUCCESS;
2142 static enum ndr_err_code ndr_pull_lsa_TranslatedSid(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid *r)
2144 if (ndr_flags & NDR_SCALARS) {
2145 NDR_CHECK(ndr_pull_align(ndr, 4));
2146 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
2147 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
2148 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
2149 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2151 if (ndr_flags & NDR_BUFFERS) {
2153 return NDR_ERR_SUCCESS;
2156 _PUBLIC_ void ndr_print_lsa_TranslatedSid(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid *r)
2158 ndr_print_struct(ndr, name, "lsa_TranslatedSid");
2159 ndr->depth++;
2160 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
2161 ndr_print_uint32(ndr, "rid", r->rid);
2162 ndr_print_uint32(ndr, "sid_index", r->sid_index);
2163 ndr->depth--;
2166 static enum ndr_err_code ndr_push_lsa_TransSidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray *r)
2168 uint32_t cntr_sids_1;
2169 if (ndr_flags & NDR_SCALARS) {
2170 NDR_CHECK(ndr_push_align(ndr, 5));
2171 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2172 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
2173 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2175 if (ndr_flags & NDR_BUFFERS) {
2176 if (r->sids) {
2177 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2178 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
2179 NDR_CHECK(ndr_push_lsa_TranslatedSid(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
2183 return NDR_ERR_SUCCESS;
2186 static enum ndr_err_code ndr_pull_lsa_TransSidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray *r)
2188 uint32_t _ptr_sids;
2189 uint32_t cntr_sids_1;
2190 TALLOC_CTX *_mem_save_sids_0;
2191 TALLOC_CTX *_mem_save_sids_1;
2192 if (ndr_flags & NDR_SCALARS) {
2193 NDR_CHECK(ndr_pull_align(ndr, 5));
2194 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2195 if (r->count > 1000) {
2196 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2198 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
2199 if (_ptr_sids) {
2200 NDR_PULL_ALLOC(ndr, r->sids);
2201 } else {
2202 r->sids = NULL;
2204 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2206 if (ndr_flags & NDR_BUFFERS) {
2207 if (r->sids) {
2208 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
2209 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
2210 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
2211 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
2212 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
2213 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
2214 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
2215 NDR_CHECK(ndr_pull_lsa_TranslatedSid(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
2217 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
2218 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
2220 if (r->sids) {
2221 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
2224 return NDR_ERR_SUCCESS;
2227 _PUBLIC_ void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray *r)
2229 uint32_t cntr_sids_1;
2230 ndr_print_struct(ndr, name, "lsa_TransSidArray");
2231 ndr->depth++;
2232 ndr_print_uint32(ndr, "count", r->count);
2233 ndr_print_ptr(ndr, "sids", r->sids);
2234 ndr->depth++;
2235 if (r->sids) {
2236 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
2237 ndr->depth++;
2238 for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
2239 char *idx_1=NULL;
2240 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
2241 ndr_print_lsa_TranslatedSid(ndr, "sids", &r->sids[cntr_sids_1]);
2242 free(idx_1);
2245 ndr->depth--;
2247 ndr->depth--;
2248 ndr->depth--;
2251 static enum ndr_err_code ndr_push_lsa_RefDomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_RefDomainList *r)
2253 uint32_t cntr_domains_1;
2254 if (ndr_flags & NDR_SCALARS) {
2255 NDR_CHECK(ndr_push_align(ndr, 5));
2256 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2257 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
2258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_size));
2259 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2261 if (ndr_flags & NDR_BUFFERS) {
2262 if (r->domains) {
2263 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2264 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2265 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
2267 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2268 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
2272 return NDR_ERR_SUCCESS;
2275 static enum ndr_err_code ndr_pull_lsa_RefDomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_RefDomainList *r)
2277 uint32_t _ptr_domains;
2278 uint32_t cntr_domains_1;
2279 TALLOC_CTX *_mem_save_domains_0;
2280 TALLOC_CTX *_mem_save_domains_1;
2281 if (ndr_flags & NDR_SCALARS) {
2282 NDR_CHECK(ndr_pull_align(ndr, 5));
2283 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2284 if (r->count > 1000) {
2285 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2287 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
2288 if (_ptr_domains) {
2289 NDR_PULL_ALLOC(ndr, r->domains);
2290 } else {
2291 r->domains = NULL;
2293 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_size));
2294 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2296 if (ndr_flags & NDR_BUFFERS) {
2297 if (r->domains) {
2298 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
2299 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
2300 NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
2301 NDR_PULL_ALLOC_N(ndr, r->domains, ndr_get_array_size(ndr, &r->domains));
2302 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
2303 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
2304 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2305 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
2307 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2308 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
2310 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
2311 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
2313 if (r->domains) {
2314 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
2317 return NDR_ERR_SUCCESS;
2320 _PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *name, const struct lsa_RefDomainList *r)
2322 uint32_t cntr_domains_1;
2323 ndr_print_struct(ndr, name, "lsa_RefDomainList");
2324 ndr->depth++;
2325 ndr_print_uint32(ndr, "count", r->count);
2326 ndr_print_ptr(ndr, "domains", r->domains);
2327 ndr->depth++;
2328 if (r->domains) {
2329 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
2330 ndr->depth++;
2331 for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
2332 char *idx_1=NULL;
2333 if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
2334 ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
2335 free(idx_1);
2338 ndr->depth--;
2340 ndr->depth--;
2341 ndr_print_uint32(ndr, "max_size", r->max_size);
2342 ndr->depth--;
2345 static enum ndr_err_code ndr_push_lsa_LookupNamesLevel(struct ndr_push *ndr, int ndr_flags, enum lsa_LookupNamesLevel r)
2347 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
2348 return NDR_ERR_SUCCESS;
2351 static enum ndr_err_code ndr_pull_lsa_LookupNamesLevel(struct ndr_pull *ndr, int ndr_flags, enum lsa_LookupNamesLevel *r)
2353 uint16_t v;
2354 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
2355 *r = v;
2356 return NDR_ERR_SUCCESS;
2359 _PUBLIC_ void ndr_print_lsa_LookupNamesLevel(struct ndr_print *ndr, const char *name, enum lsa_LookupNamesLevel r)
2361 const char *val = NULL;
2363 switch (r) {
2364 case LSA_LOOKUP_NAMES_ALL: val = "LSA_LOOKUP_NAMES_ALL"; break;
2365 case LSA_LOOKUP_NAMES_DOMAINS_ONLY: val = "LSA_LOOKUP_NAMES_DOMAINS_ONLY"; break;
2366 case LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY: val = "LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY"; break;
2367 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY: val = "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY"; break;
2368 case LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY: val = "LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY"; break;
2369 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2: val = "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2"; break;
2370 case LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC: val = "LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC"; break;
2372 ndr_print_enum(ndr, name, "ENUM", val, r);
2375 static enum ndr_err_code ndr_push_lsa_TranslatedName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName *r)
2377 if (ndr_flags & NDR_SCALARS) {
2378 NDR_CHECK(ndr_push_align(ndr, 5));
2379 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
2380 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
2381 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
2382 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2384 if (ndr_flags & NDR_BUFFERS) {
2385 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
2387 return NDR_ERR_SUCCESS;
2390 static enum ndr_err_code ndr_pull_lsa_TranslatedName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName *r)
2392 if (ndr_flags & NDR_SCALARS) {
2393 NDR_CHECK(ndr_pull_align(ndr, 5));
2394 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
2395 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
2396 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
2397 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2399 if (ndr_flags & NDR_BUFFERS) {
2400 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
2402 return NDR_ERR_SUCCESS;
2405 _PUBLIC_ void ndr_print_lsa_TranslatedName(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName *r)
2407 ndr_print_struct(ndr, name, "lsa_TranslatedName");
2408 ndr->depth++;
2409 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
2410 ndr_print_lsa_String(ndr, "name", &r->name);
2411 ndr_print_uint32(ndr, "sid_index", r->sid_index);
2412 ndr->depth--;
2415 static enum ndr_err_code ndr_push_lsa_TransNameArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray *r)
2417 uint32_t cntr_names_1;
2418 if (ndr_flags & NDR_SCALARS) {
2419 NDR_CHECK(ndr_push_align(ndr, 5));
2420 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2421 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
2422 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2424 if (ndr_flags & NDR_BUFFERS) {
2425 if (r->names) {
2426 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2427 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
2428 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
2430 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
2431 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
2435 return NDR_ERR_SUCCESS;
2438 static enum ndr_err_code ndr_pull_lsa_TransNameArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray *r)
2440 uint32_t _ptr_names;
2441 uint32_t cntr_names_1;
2442 TALLOC_CTX *_mem_save_names_0;
2443 TALLOC_CTX *_mem_save_names_1;
2444 if (ndr_flags & NDR_SCALARS) {
2445 NDR_CHECK(ndr_pull_align(ndr, 5));
2446 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2447 if (r->count > 20480) {
2448 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2450 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
2451 if (_ptr_names) {
2452 NDR_PULL_ALLOC(ndr, r->names);
2453 } else {
2454 r->names = NULL;
2456 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2458 if (ndr_flags & NDR_BUFFERS) {
2459 if (r->names) {
2460 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
2461 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
2462 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
2463 NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
2464 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
2465 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
2466 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
2467 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
2469 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
2470 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
2472 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
2473 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
2475 if (r->names) {
2476 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
2479 return NDR_ERR_SUCCESS;
2482 _PUBLIC_ void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray *r)
2484 uint32_t cntr_names_1;
2485 ndr_print_struct(ndr, name, "lsa_TransNameArray");
2486 ndr->depth++;
2487 ndr_print_uint32(ndr, "count", r->count);
2488 ndr_print_ptr(ndr, "names", r->names);
2489 ndr->depth++;
2490 if (r->names) {
2491 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
2492 ndr->depth++;
2493 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
2494 char *idx_1=NULL;
2495 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
2496 ndr_print_lsa_TranslatedName(ndr, "names", &r->names[cntr_names_1]);
2497 free(idx_1);
2500 ndr->depth--;
2502 ndr->depth--;
2503 ndr->depth--;
2506 static enum ndr_err_code ndr_push_lsa_LUIDAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUIDAttribute *r)
2508 if (ndr_flags & NDR_SCALARS) {
2509 NDR_CHECK(ndr_push_align(ndr, 4));
2510 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
2511 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attribute));
2512 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2514 if (ndr_flags & NDR_BUFFERS) {
2516 return NDR_ERR_SUCCESS;
2519 static enum ndr_err_code ndr_pull_lsa_LUIDAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUIDAttribute *r)
2521 if (ndr_flags & NDR_SCALARS) {
2522 NDR_CHECK(ndr_pull_align(ndr, 4));
2523 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
2524 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attribute));
2525 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2527 if (ndr_flags & NDR_BUFFERS) {
2529 return NDR_ERR_SUCCESS;
2532 _PUBLIC_ void ndr_print_lsa_LUIDAttribute(struct ndr_print *ndr, const char *name, const struct lsa_LUIDAttribute *r)
2534 ndr_print_struct(ndr, name, "lsa_LUIDAttribute");
2535 ndr->depth++;
2536 ndr_print_lsa_LUID(ndr, "luid", &r->luid);
2537 ndr_print_uint32(ndr, "attribute", r->attribute);
2538 ndr->depth--;
2541 static enum ndr_err_code ndr_push_lsa_PrivilegeSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivilegeSet *r)
2543 uint32_t cntr_set_0;
2544 if (ndr_flags & NDR_SCALARS) {
2545 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2546 NDR_CHECK(ndr_push_align(ndr, 4));
2547 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2548 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
2549 for (cntr_set_0 = 0; cntr_set_0 < r->count; cntr_set_0++) {
2550 NDR_CHECK(ndr_push_lsa_LUIDAttribute(ndr, NDR_SCALARS, &r->set[cntr_set_0]));
2552 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2554 if (ndr_flags & NDR_BUFFERS) {
2556 return NDR_ERR_SUCCESS;
2559 static enum ndr_err_code ndr_pull_lsa_PrivilegeSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivilegeSet *r)
2561 uint32_t cntr_set_0;
2562 TALLOC_CTX *_mem_save_set_0;
2563 if (ndr_flags & NDR_SCALARS) {
2564 NDR_CHECK(ndr_pull_array_size(ndr, &r->set));
2565 NDR_CHECK(ndr_pull_align(ndr, 4));
2566 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2567 if (r->count > 1000) {
2568 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2570 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
2571 NDR_PULL_ALLOC_N(ndr, r->set, ndr_get_array_size(ndr, &r->set));
2572 _mem_save_set_0 = NDR_PULL_GET_MEM_CTX(ndr);
2573 NDR_PULL_SET_MEM_CTX(ndr, r->set, 0);
2574 for (cntr_set_0 = 0; cntr_set_0 < r->count; cntr_set_0++) {
2575 NDR_CHECK(ndr_pull_lsa_LUIDAttribute(ndr, NDR_SCALARS, &r->set[cntr_set_0]));
2577 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_set_0, 0);
2578 if (r->set) {
2579 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->set, r->count));
2581 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2583 if (ndr_flags & NDR_BUFFERS) {
2585 return NDR_ERR_SUCCESS;
2588 _PUBLIC_ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name, const struct lsa_PrivilegeSet *r)
2590 uint32_t cntr_set_0;
2591 ndr_print_struct(ndr, name, "lsa_PrivilegeSet");
2592 ndr->depth++;
2593 ndr_print_uint32(ndr, "count", r->count);
2594 ndr_print_uint32(ndr, "unknown", r->unknown);
2595 ndr->print(ndr, "%s: ARRAY(%d)", "set", (int)r->count);
2596 ndr->depth++;
2597 for (cntr_set_0=0;cntr_set_0<r->count;cntr_set_0++) {
2598 char *idx_0=NULL;
2599 if (asprintf(&idx_0, "[%d]", cntr_set_0) != -1) {
2600 ndr_print_lsa_LUIDAttribute(ndr, "set", &r->set[cntr_set_0]);
2601 free(idx_0);
2604 ndr->depth--;
2605 ndr->depth--;
2608 static enum ndr_err_code ndr_push_lsa_DATA_BUF(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF *r)
2611 uint32_t _flags_save_STRUCT = ndr->flags;
2612 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2613 if (ndr_flags & NDR_SCALARS) {
2614 NDR_CHECK(ndr_push_align(ndr, 5));
2615 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
2616 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2617 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
2618 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2620 if (ndr_flags & NDR_BUFFERS) {
2621 if (r->data) {
2622 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size));
2623 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2624 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
2625 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
2628 ndr->flags = _flags_save_STRUCT;
2630 return NDR_ERR_SUCCESS;
2633 static enum ndr_err_code ndr_pull_lsa_DATA_BUF(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF *r)
2635 uint32_t _ptr_data;
2636 TALLOC_CTX *_mem_save_data_0;
2638 uint32_t _flags_save_STRUCT = ndr->flags;
2639 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2640 if (ndr_flags & NDR_SCALARS) {
2641 NDR_CHECK(ndr_pull_align(ndr, 5));
2642 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
2643 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2644 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2645 if (_ptr_data) {
2646 NDR_PULL_ALLOC(ndr, r->data);
2647 } else {
2648 r->data = NULL;
2650 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2652 if (ndr_flags & NDR_BUFFERS) {
2653 if (r->data) {
2654 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2655 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
2656 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
2657 NDR_CHECK(ndr_pull_array_length(ndr, &r->data));
2658 if (ndr_get_array_length(ndr, &r->data) > ndr_get_array_size(ndr, &r->data)) {
2659 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->data), ndr_get_array_length(ndr, &r->data));
2661 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
2662 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_length(ndr, &r->data)));
2663 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2665 if (r->data) {
2666 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->size));
2668 if (r->data) {
2669 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->data, r->length));
2672 ndr->flags = _flags_save_STRUCT;
2674 return NDR_ERR_SUCCESS;
2677 _PUBLIC_ void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF *r)
2679 ndr_print_struct(ndr, name, "lsa_DATA_BUF");
2681 uint32_t _flags_save_STRUCT = ndr->flags;
2682 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2683 ndr->depth++;
2684 ndr_print_uint32(ndr, "length", r->length);
2685 ndr_print_uint32(ndr, "size", r->size);
2686 ndr_print_ptr(ndr, "data", r->data);
2687 ndr->depth++;
2688 if (r->data) {
2689 ndr_print_array_uint8(ndr, "data", r->data, r->length);
2691 ndr->depth--;
2692 ndr->depth--;
2693 ndr->flags = _flags_save_STRUCT;
2697 static enum ndr_err_code ndr_push_lsa_DATA_BUF2(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF2 *r)
2700 uint32_t _flags_save_STRUCT = ndr->flags;
2701 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2702 if (ndr_flags & NDR_SCALARS) {
2703 NDR_CHECK(ndr_push_align(ndr, 5));
2704 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2705 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
2706 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2708 if (ndr_flags & NDR_BUFFERS) {
2709 if (r->data) {
2710 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size));
2711 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->size));
2714 ndr->flags = _flags_save_STRUCT;
2716 return NDR_ERR_SUCCESS;
2719 static enum ndr_err_code ndr_pull_lsa_DATA_BUF2(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF2 *r)
2721 uint32_t _ptr_data;
2722 TALLOC_CTX *_mem_save_data_0;
2724 uint32_t _flags_save_STRUCT = ndr->flags;
2725 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2726 if (ndr_flags & NDR_SCALARS) {
2727 NDR_CHECK(ndr_pull_align(ndr, 5));
2728 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2729 if (r->size > 65536) {
2730 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2732 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2733 if (_ptr_data) {
2734 NDR_PULL_ALLOC(ndr, r->data);
2735 } else {
2736 r->data = NULL;
2738 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2740 if (ndr_flags & NDR_BUFFERS) {
2741 if (r->data) {
2742 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2743 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
2744 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
2745 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
2746 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
2747 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2749 if (r->data) {
2750 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->size));
2753 ndr->flags = _flags_save_STRUCT;
2755 return NDR_ERR_SUCCESS;
2758 _PUBLIC_ void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF2 *r)
2760 ndr_print_struct(ndr, name, "lsa_DATA_BUF2");
2762 uint32_t _flags_save_STRUCT = ndr->flags;
2763 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2764 ndr->depth++;
2765 ndr_print_uint32(ndr, "size", r->size);
2766 ndr_print_ptr(ndr, "data", r->data);
2767 ndr->depth++;
2768 if (r->data) {
2769 ndr_print_array_uint8(ndr, "data", r->data, r->size);
2771 ndr->depth--;
2772 ndr->depth--;
2773 ndr->flags = _flags_save_STRUCT;
2777 static enum ndr_err_code ndr_push_lsa_TrustDomInfoEnum(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum r)
2779 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
2780 return NDR_ERR_SUCCESS;
2783 static enum ndr_err_code ndr_pull_lsa_TrustDomInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum *r)
2785 uint16_t v;
2786 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
2787 *r = v;
2788 return NDR_ERR_SUCCESS;
2791 _PUBLIC_ void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *name, enum lsa_TrustDomInfoEnum r)
2793 const char *val = NULL;
2795 switch (r) {
2796 case LSA_TRUSTED_DOMAIN_INFO_NAME: val = "LSA_TRUSTED_DOMAIN_INFO_NAME"; break;
2797 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: val = "LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS"; break;
2798 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: val = "LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET"; break;
2799 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: val = "LSA_TRUSTED_DOMAIN_INFO_PASSWORD"; break;
2800 case LSA_TRUSTED_DOMAIN_INFO_BASIC: val = "LSA_TRUSTED_DOMAIN_INFO_BASIC"; break;
2801 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX"; break;
2802 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO"; break;
2803 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO"; break;
2804 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL"; break;
2805 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL"; break;
2806 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL"; break;
2807 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL"; break;
2808 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: val = "LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES"; break;
2810 ndr_print_enum(ndr, name, "ENUM", val, r);
2813 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustDirection(struct ndr_push *ndr, int ndr_flags, uint32_t r)
2815 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2816 return NDR_ERR_SUCCESS;
2819 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustDirection(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
2821 uint32_t v;
2822 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2823 *r = v;
2824 return NDR_ERR_SUCCESS;
2827 _PUBLIC_ void ndr_print_lsa_TrustDirection(struct ndr_print *ndr, const char *name, uint32_t r)
2829 ndr_print_uint32(ndr, name, r);
2830 ndr->depth++;
2831 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_DIRECTION_INBOUND", LSA_TRUST_DIRECTION_INBOUND, r);
2832 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_DIRECTION_OUTBOUND", LSA_TRUST_DIRECTION_OUTBOUND, r);
2833 ndr->depth--;
2836 static enum ndr_err_code ndr_push_lsa_TrustType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustType r)
2838 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
2839 return NDR_ERR_SUCCESS;
2842 static enum ndr_err_code ndr_pull_lsa_TrustType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustType *r)
2844 uint32_t v;
2845 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
2846 *r = v;
2847 return NDR_ERR_SUCCESS;
2850 _PUBLIC_ void ndr_print_lsa_TrustType(struct ndr_print *ndr, const char *name, enum lsa_TrustType r)
2852 const char *val = NULL;
2854 switch (r) {
2855 case LSA_TRUST_TYPE_DOWNLEVEL: val = "LSA_TRUST_TYPE_DOWNLEVEL"; break;
2856 case LSA_TRUST_TYPE_UPLEVEL: val = "LSA_TRUST_TYPE_UPLEVEL"; break;
2857 case LSA_TRUST_TYPE_MIT: val = "LSA_TRUST_TYPE_MIT"; break;
2859 ndr_print_enum(ndr, name, "ENUM", val, r);
2862 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r)
2864 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2865 return NDR_ERR_SUCCESS;
2868 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
2870 uint32_t v;
2871 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2872 *r = v;
2873 return NDR_ERR_SUCCESS;
2876 _PUBLIC_ void ndr_print_lsa_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r)
2878 ndr_print_uint32(ndr, name, r);
2879 ndr->depth++;
2880 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE", LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE, r);
2881 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY", LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY, r);
2882 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN", LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN, r);
2883 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE", LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE, r);
2884 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION", LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION, r);
2885 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_WITHIN_FOREST", LSA_TRUST_ATTRIBUTE_WITHIN_FOREST, r);
2886 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL", LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL, r);
2887 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION", LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION, r);
2888 ndr->depth--;
2891 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoName *r)
2893 if (ndr_flags & NDR_SCALARS) {
2894 NDR_CHECK(ndr_push_align(ndr, 5));
2895 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
2896 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2898 if (ndr_flags & NDR_BUFFERS) {
2899 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
2901 return NDR_ERR_SUCCESS;
2904 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoName *r)
2906 if (ndr_flags & NDR_SCALARS) {
2907 NDR_CHECK(ndr_pull_align(ndr, 5));
2908 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
2909 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2911 if (ndr_flags & NDR_BUFFERS) {
2912 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
2914 return NDR_ERR_SUCCESS;
2917 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoName *r)
2919 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoName");
2920 ndr->depth++;
2921 ndr_print_lsa_StringLarge(ndr, "netbios_name", &r->netbios_name);
2922 ndr->depth--;
2925 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoControllers(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoControllers *r)
2927 uint32_t cntr_netbios_names_1;
2928 if (ndr_flags & NDR_SCALARS) {
2929 NDR_CHECK(ndr_push_align(ndr, 5));
2930 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries));
2931 NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_names));
2932 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2934 if (ndr_flags & NDR_BUFFERS) {
2935 if (r->netbios_names) {
2936 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->entries));
2937 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
2938 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_names[cntr_netbios_names_1]));
2940 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
2941 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_names[cntr_netbios_names_1]));
2945 return NDR_ERR_SUCCESS;
2948 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoControllers(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoControllers *r)
2950 uint32_t _ptr_netbios_names;
2951 uint32_t cntr_netbios_names_1;
2952 TALLOC_CTX *_mem_save_netbios_names_0;
2953 TALLOC_CTX *_mem_save_netbios_names_1;
2954 if (ndr_flags & NDR_SCALARS) {
2955 NDR_CHECK(ndr_pull_align(ndr, 5));
2956 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->entries));
2957 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_names));
2958 if (_ptr_netbios_names) {
2959 NDR_PULL_ALLOC(ndr, r->netbios_names);
2960 } else {
2961 r->netbios_names = NULL;
2963 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2965 if (ndr_flags & NDR_BUFFERS) {
2966 if (r->netbios_names) {
2967 _mem_save_netbios_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
2968 NDR_PULL_SET_MEM_CTX(ndr, r->netbios_names, 0);
2969 NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_names));
2970 NDR_PULL_ALLOC_N(ndr, r->netbios_names, ndr_get_array_size(ndr, &r->netbios_names));
2971 _mem_save_netbios_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
2972 NDR_PULL_SET_MEM_CTX(ndr, r->netbios_names, 0);
2973 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
2974 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_names[cntr_netbios_names_1]));
2976 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
2977 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_names[cntr_netbios_names_1]));
2979 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_names_1, 0);
2980 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_names_0, 0);
2982 if (r->netbios_names) {
2983 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->netbios_names, r->entries));
2986 return NDR_ERR_SUCCESS;
2989 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoControllers(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoControllers *r)
2991 uint32_t cntr_netbios_names_1;
2992 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoControllers");
2993 ndr->depth++;
2994 ndr_print_uint32(ndr, "entries", r->entries);
2995 ndr_print_ptr(ndr, "netbios_names", r->netbios_names);
2996 ndr->depth++;
2997 if (r->netbios_names) {
2998 ndr->print(ndr, "%s: ARRAY(%d)", "netbios_names", (int)r->entries);
2999 ndr->depth++;
3000 for (cntr_netbios_names_1=0;cntr_netbios_names_1<r->entries;cntr_netbios_names_1++) {
3001 char *idx_1=NULL;
3002 if (asprintf(&idx_1, "[%d]", cntr_netbios_names_1) != -1) {
3003 ndr_print_lsa_StringLarge(ndr, "netbios_names", &r->netbios_names[cntr_netbios_names_1]);
3004 free(idx_1);
3007 ndr->depth--;
3009 ndr->depth--;
3010 ndr->depth--;
3013 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPosixOffset *r)
3015 if (ndr_flags & NDR_SCALARS) {
3016 NDR_CHECK(ndr_push_align(ndr, 4));
3017 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->posix_offset));
3018 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3020 if (ndr_flags & NDR_BUFFERS) {
3022 return NDR_ERR_SUCCESS;
3025 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoPosixOffset(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPosixOffset *r)
3027 if (ndr_flags & NDR_SCALARS) {
3028 NDR_CHECK(ndr_pull_align(ndr, 4));
3029 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->posix_offset));
3030 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3032 if (ndr_flags & NDR_BUFFERS) {
3034 return NDR_ERR_SUCCESS;
3037 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPosixOffset *r)
3039 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoPosixOffset");
3040 ndr->depth++;
3041 ndr_print_uint32(ndr, "posix_offset", r->posix_offset);
3042 ndr->depth--;
3045 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoPassword(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPassword *r)
3047 if (ndr_flags & NDR_SCALARS) {
3048 NDR_CHECK(ndr_push_align(ndr, 5));
3049 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
3050 NDR_CHECK(ndr_push_unique_ptr(ndr, r->old_password));
3051 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3053 if (ndr_flags & NDR_BUFFERS) {
3054 if (r->password) {
3055 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
3057 if (r->old_password) {
3058 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->old_password));
3061 return NDR_ERR_SUCCESS;
3064 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoPassword(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPassword *r)
3066 uint32_t _ptr_password;
3067 TALLOC_CTX *_mem_save_password_0;
3068 uint32_t _ptr_old_password;
3069 TALLOC_CTX *_mem_save_old_password_0;
3070 if (ndr_flags & NDR_SCALARS) {
3071 NDR_CHECK(ndr_pull_align(ndr, 5));
3072 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
3073 if (_ptr_password) {
3074 NDR_PULL_ALLOC(ndr, r->password);
3075 } else {
3076 r->password = NULL;
3078 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_password));
3079 if (_ptr_old_password) {
3080 NDR_PULL_ALLOC(ndr, r->old_password);
3081 } else {
3082 r->old_password = NULL;
3084 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3086 if (ndr_flags & NDR_BUFFERS) {
3087 if (r->password) {
3088 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
3089 NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
3090 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
3091 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
3093 if (r->old_password) {
3094 _mem_save_old_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
3095 NDR_PULL_SET_MEM_CTX(ndr, r->old_password, 0);
3096 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->old_password));
3097 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_password_0, 0);
3100 return NDR_ERR_SUCCESS;
3103 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPassword *r)
3105 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoPassword");
3106 ndr->depth++;
3107 ndr_print_ptr(ndr, "password", r->password);
3108 ndr->depth++;
3109 if (r->password) {
3110 ndr_print_lsa_DATA_BUF(ndr, "password", r->password);
3112 ndr->depth--;
3113 ndr_print_ptr(ndr, "old_password", r->old_password);
3114 ndr->depth++;
3115 if (r->old_password) {
3116 ndr_print_lsa_DATA_BUF(ndr, "old_password", r->old_password);
3118 ndr->depth--;
3119 ndr->depth--;
3122 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoBasic(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBasic *r)
3124 if (ndr_flags & NDR_SCALARS) {
3125 NDR_CHECK(ndr_push_align(ndr, 5));
3126 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->netbios_name));
3127 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
3128 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3130 if (ndr_flags & NDR_BUFFERS) {
3131 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->netbios_name));
3132 if (r->sid) {
3133 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3136 return NDR_ERR_SUCCESS;
3139 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoBasic(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBasic *r)
3141 uint32_t _ptr_sid;
3142 TALLOC_CTX *_mem_save_sid_0;
3143 if (ndr_flags & NDR_SCALARS) {
3144 NDR_CHECK(ndr_pull_align(ndr, 5));
3145 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->netbios_name));
3146 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
3147 if (_ptr_sid) {
3148 NDR_PULL_ALLOC(ndr, r->sid);
3149 } else {
3150 r->sid = NULL;
3152 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3154 if (ndr_flags & NDR_BUFFERS) {
3155 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->netbios_name));
3156 if (r->sid) {
3157 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
3158 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
3159 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3160 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
3163 return NDR_ERR_SUCCESS;
3166 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBasic *r)
3168 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoBasic");
3169 ndr->depth++;
3170 ndr_print_lsa_String(ndr, "netbios_name", &r->netbios_name);
3171 ndr_print_ptr(ndr, "sid", r->sid);
3172 ndr->depth++;
3173 if (r->sid) {
3174 ndr_print_dom_sid2(ndr, "sid", r->sid);
3176 ndr->depth--;
3177 ndr->depth--;
3180 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx *r)
3182 if (ndr_flags & NDR_SCALARS) {
3183 NDR_CHECK(ndr_push_align(ndr, 5));
3184 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain_name));
3185 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
3186 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
3187 NDR_CHECK(ndr_push_lsa_TrustDirection(ndr, NDR_SCALARS, r->trust_direction));
3188 NDR_CHECK(ndr_push_lsa_TrustType(ndr, NDR_SCALARS, r->trust_type));
3189 NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes));
3190 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3192 if (ndr_flags & NDR_BUFFERS) {
3193 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name));
3194 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
3195 if (r->sid) {
3196 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3199 return NDR_ERR_SUCCESS;
3202 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx *r)
3204 uint32_t _ptr_sid;
3205 TALLOC_CTX *_mem_save_sid_0;
3206 if (ndr_flags & NDR_SCALARS) {
3207 NDR_CHECK(ndr_pull_align(ndr, 5));
3208 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain_name));
3209 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
3210 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
3211 if (_ptr_sid) {
3212 NDR_PULL_ALLOC(ndr, r->sid);
3213 } else {
3214 r->sid = NULL;
3216 NDR_CHECK(ndr_pull_lsa_TrustDirection(ndr, NDR_SCALARS, &r->trust_direction));
3217 NDR_CHECK(ndr_pull_lsa_TrustType(ndr, NDR_SCALARS, &r->trust_type));
3218 NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes));
3219 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3221 if (ndr_flags & NDR_BUFFERS) {
3222 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name));
3223 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
3224 if (r->sid) {
3225 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
3226 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
3227 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3228 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
3231 return NDR_ERR_SUCCESS;
3234 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx *r)
3236 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoEx");
3237 ndr->depth++;
3238 ndr_print_lsa_StringLarge(ndr, "domain_name", &r->domain_name);
3239 ndr_print_lsa_StringLarge(ndr, "netbios_name", &r->netbios_name);
3240 ndr_print_ptr(ndr, "sid", r->sid);
3241 ndr->depth++;
3242 if (r->sid) {
3243 ndr_print_dom_sid2(ndr, "sid", r->sid);
3245 ndr->depth--;
3246 ndr_print_lsa_TrustDirection(ndr, "trust_direction", r->trust_direction);
3247 ndr_print_lsa_TrustType(ndr, "trust_type", r->trust_type);
3248 ndr_print_lsa_TrustAttributes(ndr, "trust_attributes", r->trust_attributes);
3249 ndr->depth--;
3252 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAuthType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustAuthType r)
3254 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
3255 return NDR_ERR_SUCCESS;
3258 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustAuthType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustAuthType *r)
3260 uint32_t v;
3261 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
3262 *r = v;
3263 return NDR_ERR_SUCCESS;
3266 _PUBLIC_ void ndr_print_lsa_TrustAuthType(struct ndr_print *ndr, const char *name, enum lsa_TrustAuthType r)
3268 const char *val = NULL;
3270 switch (r) {
3271 case TRUST_AUTH_TYPE_NONE: val = "TRUST_AUTH_TYPE_NONE"; break;
3272 case TRUST_AUTH_TYPE_NT4OWF: val = "TRUST_AUTH_TYPE_NT4OWF"; break;
3273 case TRUST_AUTH_TYPE_CLEAR: val = "TRUST_AUTH_TYPE_CLEAR"; break;
3274 case TRUST_AUTH_TYPE_VERSION: val = "TRUST_AUTH_TYPE_VERSION"; break;
3276 ndr_print_enum(ndr, name, "ENUM", val, r);
3279 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBuffer *r)
3281 if (ndr_flags & NDR_SCALARS) {
3282 NDR_CHECK(ndr_push_align(ndr, 8));
3283 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->last_update_time));
3284 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
3285 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data));
3286 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
3288 if (ndr_flags & NDR_BUFFERS) {
3289 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data));
3291 return NDR_ERR_SUCCESS;
3294 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBuffer *r)
3296 if (ndr_flags & NDR_SCALARS) {
3297 NDR_CHECK(ndr_pull_align(ndr, 8));
3298 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->last_update_time));
3299 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
3300 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data));
3301 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
3303 if (ndr_flags & NDR_BUFFERS) {
3304 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data));
3306 return NDR_ERR_SUCCESS;
3309 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBuffer *r)
3311 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoBuffer");
3312 ndr->depth++;
3313 ndr_print_NTTIME_hyper(ndr, "last_update_time", r->last_update_time);
3314 ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
3315 ndr_print_lsa_DATA_BUF2(ndr, "data", &r->data);
3316 ndr->depth--;
3319 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoAuthInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfo *r)
3321 if (ndr_flags & NDR_SCALARS) {
3322 NDR_CHECK(ndr_push_align(ndr, 5));
3323 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->incoming_count));
3324 NDR_CHECK(ndr_push_unique_ptr(ndr, r->incoming_current_auth_info));
3325 NDR_CHECK(ndr_push_unique_ptr(ndr, r->incoming_previous_auth_info));
3326 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->outgoing_count));
3327 NDR_CHECK(ndr_push_unique_ptr(ndr, r->outgoing_current_auth_info));
3328 NDR_CHECK(ndr_push_unique_ptr(ndr, r->outgoing_previous_auth_info));
3329 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3331 if (ndr_flags & NDR_BUFFERS) {
3332 if (r->incoming_current_auth_info) {
3333 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_current_auth_info));
3335 if (r->incoming_previous_auth_info) {
3336 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_previous_auth_info));
3338 if (r->outgoing_current_auth_info) {
3339 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_current_auth_info));
3341 if (r->outgoing_previous_auth_info) {
3342 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_previous_auth_info));
3345 return NDR_ERR_SUCCESS;
3348 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoAuthInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfo *r)
3350 uint32_t _ptr_incoming_current_auth_info;
3351 TALLOC_CTX *_mem_save_incoming_current_auth_info_0;
3352 uint32_t _ptr_incoming_previous_auth_info;
3353 TALLOC_CTX *_mem_save_incoming_previous_auth_info_0;
3354 uint32_t _ptr_outgoing_current_auth_info;
3355 TALLOC_CTX *_mem_save_outgoing_current_auth_info_0;
3356 uint32_t _ptr_outgoing_previous_auth_info;
3357 TALLOC_CTX *_mem_save_outgoing_previous_auth_info_0;
3358 if (ndr_flags & NDR_SCALARS) {
3359 NDR_CHECK(ndr_pull_align(ndr, 5));
3360 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->incoming_count));
3361 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_incoming_current_auth_info));
3362 if (_ptr_incoming_current_auth_info) {
3363 NDR_PULL_ALLOC(ndr, r->incoming_current_auth_info);
3364 } else {
3365 r->incoming_current_auth_info = NULL;
3367 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_incoming_previous_auth_info));
3368 if (_ptr_incoming_previous_auth_info) {
3369 NDR_PULL_ALLOC(ndr, r->incoming_previous_auth_info);
3370 } else {
3371 r->incoming_previous_auth_info = NULL;
3373 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->outgoing_count));
3374 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_outgoing_current_auth_info));
3375 if (_ptr_outgoing_current_auth_info) {
3376 NDR_PULL_ALLOC(ndr, r->outgoing_current_auth_info);
3377 } else {
3378 r->outgoing_current_auth_info = NULL;
3380 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_outgoing_previous_auth_info));
3381 if (_ptr_outgoing_previous_auth_info) {
3382 NDR_PULL_ALLOC(ndr, r->outgoing_previous_auth_info);
3383 } else {
3384 r->outgoing_previous_auth_info = NULL;
3386 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3388 if (ndr_flags & NDR_BUFFERS) {
3389 if (r->incoming_current_auth_info) {
3390 _mem_save_incoming_current_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3391 NDR_PULL_SET_MEM_CTX(ndr, r->incoming_current_auth_info, 0);
3392 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_current_auth_info));
3393 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_incoming_current_auth_info_0, 0);
3395 if (r->incoming_previous_auth_info) {
3396 _mem_save_incoming_previous_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3397 NDR_PULL_SET_MEM_CTX(ndr, r->incoming_previous_auth_info, 0);
3398 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_previous_auth_info));
3399 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_incoming_previous_auth_info_0, 0);
3401 if (r->outgoing_current_auth_info) {
3402 _mem_save_outgoing_current_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3403 NDR_PULL_SET_MEM_CTX(ndr, r->outgoing_current_auth_info, 0);
3404 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_current_auth_info));
3405 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_outgoing_current_auth_info_0, 0);
3407 if (r->outgoing_previous_auth_info) {
3408 _mem_save_outgoing_previous_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3409 NDR_PULL_SET_MEM_CTX(ndr, r->outgoing_previous_auth_info, 0);
3410 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_previous_auth_info));
3411 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_outgoing_previous_auth_info_0, 0);
3414 return NDR_ERR_SUCCESS;
3417 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfo *r)
3419 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoAuthInfo");
3420 ndr->depth++;
3421 ndr_print_uint32(ndr, "incoming_count", r->incoming_count);
3422 ndr_print_ptr(ndr, "incoming_current_auth_info", r->incoming_current_auth_info);
3423 ndr->depth++;
3424 if (r->incoming_current_auth_info) {
3425 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "incoming_current_auth_info", r->incoming_current_auth_info);
3427 ndr->depth--;
3428 ndr_print_ptr(ndr, "incoming_previous_auth_info", r->incoming_previous_auth_info);
3429 ndr->depth++;
3430 if (r->incoming_previous_auth_info) {
3431 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "incoming_previous_auth_info", r->incoming_previous_auth_info);
3433 ndr->depth--;
3434 ndr_print_uint32(ndr, "outgoing_count", r->outgoing_count);
3435 ndr_print_ptr(ndr, "outgoing_current_auth_info", r->outgoing_current_auth_info);
3436 ndr->depth++;
3437 if (r->outgoing_current_auth_info) {
3438 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "outgoing_current_auth_info", r->outgoing_current_auth_info);
3440 ndr->depth--;
3441 ndr_print_ptr(ndr, "outgoing_previous_auth_info", r->outgoing_previous_auth_info);
3442 ndr->depth++;
3443 if (r->outgoing_previous_auth_info) {
3444 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "outgoing_previous_auth_info", r->outgoing_previous_auth_info);
3446 ndr->depth--;
3447 ndr->depth--;
3450 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo *r)
3452 if (ndr_flags & NDR_SCALARS) {
3453 NDR_CHECK(ndr_push_align(ndr, 5));
3454 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3455 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3456 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3457 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3459 if (ndr_flags & NDR_BUFFERS) {
3460 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3461 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3463 return NDR_ERR_SUCCESS;
3466 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo *r)
3468 if (ndr_flags & NDR_SCALARS) {
3469 NDR_CHECK(ndr_pull_align(ndr, 5));
3470 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3471 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3472 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3473 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3475 if (ndr_flags & NDR_BUFFERS) {
3476 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3477 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3479 return NDR_ERR_SUCCESS;
3482 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo *r)
3484 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfo");
3485 ndr->depth++;
3486 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3487 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3488 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
3489 ndr->depth--;
3492 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfoInternal *r)
3494 if (ndr_flags & NDR_SCALARS) {
3495 NDR_CHECK(ndr_push_align(ndr, 5));
3496 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob));
3497 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3499 if (ndr_flags & NDR_BUFFERS) {
3500 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob));
3502 return NDR_ERR_SUCCESS;
3505 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfoInternal *r)
3507 if (ndr_flags & NDR_SCALARS) {
3508 NDR_CHECK(ndr_pull_align(ndr, 5));
3509 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob));
3510 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3512 if (ndr_flags & NDR_BUFFERS) {
3513 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob));
3515 return NDR_ERR_SUCCESS;
3518 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfoInternal *r)
3520 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoAuthInfoInternal");
3521 ndr->depth++;
3522 ndr_print_lsa_DATA_BUF2(ndr, "auth_blob", &r->auth_blob);
3523 ndr->depth--;
3526 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfoInternal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfoInternal *r)
3528 if (ndr_flags & NDR_SCALARS) {
3529 NDR_CHECK(ndr_push_align(ndr, 5));
3530 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3531 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3532 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info));
3533 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3535 if (ndr_flags & NDR_BUFFERS) {
3536 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3537 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info));
3539 return NDR_ERR_SUCCESS;
3542 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfoInternal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfoInternal *r)
3544 if (ndr_flags & NDR_SCALARS) {
3545 NDR_CHECK(ndr_pull_align(ndr, 5));
3546 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3547 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3548 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info));
3549 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3551 if (ndr_flags & NDR_BUFFERS) {
3552 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3553 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info));
3555 return NDR_ERR_SUCCESS;
3558 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfoInternal *r)
3560 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfoInternal");
3561 ndr->depth++;
3562 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3563 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3564 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", &r->auth_info);
3565 ndr->depth--;
3568 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx2Internal *r)
3570 if (ndr_flags & NDR_SCALARS) {
3571 NDR_CHECK(ndr_push_align(ndr, 5));
3572 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3573 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->forest_trust_length));
3574 NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest_trust_data));
3575 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3577 if (ndr_flags & NDR_BUFFERS) {
3578 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3579 if (r->forest_trust_data) {
3580 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->forest_trust_length));
3581 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->forest_trust_data, r->forest_trust_length));
3584 return NDR_ERR_SUCCESS;
3587 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx2Internal *r)
3589 uint32_t _ptr_forest_trust_data;
3590 TALLOC_CTX *_mem_save_forest_trust_data_0;
3591 if (ndr_flags & NDR_SCALARS) {
3592 NDR_CHECK(ndr_pull_align(ndr, 5));
3593 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3594 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->forest_trust_length));
3595 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_data));
3596 if (_ptr_forest_trust_data) {
3597 NDR_PULL_ALLOC(ndr, r->forest_trust_data);
3598 } else {
3599 r->forest_trust_data = NULL;
3601 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3603 if (ndr_flags & NDR_BUFFERS) {
3604 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3605 if (r->forest_trust_data) {
3606 _mem_save_forest_trust_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
3607 NDR_PULL_SET_MEM_CTX(ndr, r->forest_trust_data, 0);
3608 NDR_CHECK(ndr_pull_array_size(ndr, &r->forest_trust_data));
3609 NDR_PULL_ALLOC_N(ndr, r->forest_trust_data, ndr_get_array_size(ndr, &r->forest_trust_data));
3610 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->forest_trust_data, ndr_get_array_size(ndr, &r->forest_trust_data)));
3611 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_data_0, 0);
3613 if (r->forest_trust_data) {
3614 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->forest_trust_data, r->forest_trust_length));
3617 return NDR_ERR_SUCCESS;
3620 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx2Internal *r)
3622 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoEx2Internal");
3623 ndr->depth++;
3624 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3625 ndr_print_uint32(ndr, "forest_trust_length", r->forest_trust_length);
3626 ndr_print_ptr(ndr, "forest_trust_data", r->forest_trust_data);
3627 ndr->depth++;
3628 if (r->forest_trust_data) {
3629 ndr_print_array_uint8(ndr, "forest_trust_data", r->forest_trust_data, r->forest_trust_length);
3631 ndr->depth--;
3632 ndr->depth--;
3635 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo2Internal *r)
3637 if (ndr_flags & NDR_SCALARS) {
3638 NDR_CHECK(ndr_push_align(ndr, 5));
3639 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info));
3640 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3641 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3642 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3644 if (ndr_flags & NDR_BUFFERS) {
3645 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info));
3646 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3648 return NDR_ERR_SUCCESS;
3651 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo2Internal *r)
3653 if (ndr_flags & NDR_SCALARS) {
3654 NDR_CHECK(ndr_pull_align(ndr, 5));
3655 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info));
3656 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3657 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3658 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3660 if (ndr_flags & NDR_BUFFERS) {
3661 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info));
3662 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3664 return NDR_ERR_SUCCESS;
3667 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo2Internal *r)
3669 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfo2Internal");
3670 ndr->depth++;
3671 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr, "info", &r->info);
3672 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3673 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
3674 ndr->depth--;
3677 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoSupportedEncTypes *r)
3679 if (ndr_flags & NDR_SCALARS) {
3680 NDR_CHECK(ndr_push_align(ndr, 4));
3681 NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->enc_types));
3682 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3684 if (ndr_flags & NDR_BUFFERS) {
3686 return NDR_ERR_SUCCESS;
3689 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoSupportedEncTypes *r)
3691 if (ndr_flags & NDR_SCALARS) {
3692 NDR_CHECK(ndr_pull_align(ndr, 4));
3693 NDR_CHECK(ndr_pull_kerb_EncTypes(ndr, NDR_SCALARS, &r->enc_types));
3694 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3696 if (ndr_flags & NDR_BUFFERS) {
3698 return NDR_ERR_SUCCESS;
3701 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoSupportedEncTypes *r)
3703 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoSupportedEncTypes");
3704 ndr->depth++;
3705 ndr_print_kerb_EncTypes(ndr, "enc_types", r->enc_types);
3706 ndr->depth--;
3709 static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, int ndr_flags, const union lsa_TrustedDomainInfo *r)
3711 if (ndr_flags & NDR_SCALARS) {
3712 int level = ndr_push_get_switch_value(ndr, r);
3713 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, level));
3714 NDR_CHECK(ndr_push_union_align(ndr, 5));
3715 switch (level) {
3716 case LSA_TRUSTED_DOMAIN_INFO_NAME: {
3717 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name));
3718 break; }
3720 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: {
3721 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr, NDR_SCALARS, &r->controllers));
3722 break; }
3724 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: {
3725 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3726 break; }
3728 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: {
3729 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr, NDR_SCALARS, &r->password));
3730 break; }
3732 case LSA_TRUSTED_DOMAIN_INFO_BASIC: {
3733 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr, NDR_SCALARS, &r->info_basic));
3734 break; }
3736 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: {
3737 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3738 break; }
3740 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: {
3741 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3742 break; }
3744 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: {
3745 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info));
3746 break; }
3748 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: {
3749 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info_internal));
3750 break; }
3752 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: {
3753 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_SCALARS, &r->full_info_internal));
3754 break; }
3756 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: {
3757 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info_ex2_internal));
3758 break; }
3760 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: {
3761 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal));
3762 break; }
3764 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: {
3765 NDR_CHECK(ndr_push_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types));
3766 break; }
3768 default:
3769 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3772 if (ndr_flags & NDR_BUFFERS) {
3773 int level = ndr_push_get_switch_value(ndr, r);
3774 switch (level) {
3775 case LSA_TRUSTED_DOMAIN_INFO_NAME:
3776 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name));
3777 break;
3779 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
3780 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr, NDR_BUFFERS, &r->controllers));
3781 break;
3783 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
3784 break;
3786 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
3787 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr, NDR_BUFFERS, &r->password));
3788 break;
3790 case LSA_TRUSTED_DOMAIN_INFO_BASIC:
3791 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr, NDR_BUFFERS, &r->info_basic));
3792 break;
3794 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
3795 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3796 break;
3798 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
3799 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3800 break;
3802 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
3803 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info));
3804 break;
3806 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
3807 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info_internal));
3808 break;
3810 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
3811 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_BUFFERS, &r->full_info_internal));
3812 break;
3814 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
3815 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info_ex2_internal));
3816 break;
3818 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
3819 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal));
3820 break;
3822 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES:
3823 break;
3825 default:
3826 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3829 return NDR_ERR_SUCCESS;
3832 static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, int ndr_flags, union lsa_TrustedDomainInfo *r)
3834 int level;
3835 uint16_t _level;
3836 level = ndr_pull_get_switch_value(ndr, r);
3837 if (ndr_flags & NDR_SCALARS) {
3838 NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
3839 if (_level != level) {
3840 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3842 NDR_CHECK(ndr_pull_union_align(ndr, 5));
3843 switch (level) {
3844 case LSA_TRUSTED_DOMAIN_INFO_NAME: {
3845 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name));
3846 break; }
3848 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: {
3849 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr, NDR_SCALARS, &r->controllers));
3850 break; }
3852 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: {
3853 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3854 break; }
3856 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: {
3857 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr, NDR_SCALARS, &r->password));
3858 break; }
3860 case LSA_TRUSTED_DOMAIN_INFO_BASIC: {
3861 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr, NDR_SCALARS, &r->info_basic));
3862 break; }
3864 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: {
3865 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3866 break; }
3868 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: {
3869 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3870 break; }
3872 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: {
3873 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info));
3874 break; }
3876 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: {
3877 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info_internal));
3878 break; }
3880 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: {
3881 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_SCALARS, &r->full_info_internal));
3882 break; }
3884 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: {
3885 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info_ex2_internal));
3886 break; }
3888 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: {
3889 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal));
3890 break; }
3892 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: {
3893 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types));
3894 break; }
3896 default:
3897 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3900 if (ndr_flags & NDR_BUFFERS) {
3901 switch (level) {
3902 case LSA_TRUSTED_DOMAIN_INFO_NAME:
3903 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name));
3904 break;
3906 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
3907 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr, NDR_BUFFERS, &r->controllers));
3908 break;
3910 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
3911 break;
3913 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
3914 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr, NDR_BUFFERS, &r->password));
3915 break;
3917 case LSA_TRUSTED_DOMAIN_INFO_BASIC:
3918 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr, NDR_BUFFERS, &r->info_basic));
3919 break;
3921 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
3922 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3923 break;
3925 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
3926 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3927 break;
3929 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
3930 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info));
3931 break;
3933 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
3934 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info_internal));
3935 break;
3937 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
3938 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_BUFFERS, &r->full_info_internal));
3939 break;
3941 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
3942 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info_ex2_internal));
3943 break;
3945 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
3946 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal));
3947 break;
3949 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES:
3950 break;
3952 default:
3953 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3956 return NDR_ERR_SUCCESS;
3959 _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char *name, const union lsa_TrustedDomainInfo *r)
3961 int level;
3962 level = ndr_print_get_switch_value(ndr, r);
3963 ndr_print_union(ndr, name, level, "lsa_TrustedDomainInfo");
3964 switch (level) {
3965 case LSA_TRUSTED_DOMAIN_INFO_NAME:
3966 ndr_print_lsa_TrustDomainInfoName(ndr, "name", &r->name);
3967 break;
3969 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
3970 ndr_print_lsa_TrustDomainInfoControllers(ndr, "controllers", &r->controllers);
3971 break;
3973 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
3974 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3975 break;
3977 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
3978 ndr_print_lsa_TrustDomainInfoPassword(ndr, "password", &r->password);
3979 break;
3981 case LSA_TRUSTED_DOMAIN_INFO_BASIC:
3982 ndr_print_lsa_TrustDomainInfoBasic(ndr, "info_basic", &r->info_basic);
3983 break;
3985 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
3986 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3987 break;
3989 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
3990 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
3991 break;
3993 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
3994 ndr_print_lsa_TrustDomainInfoFullInfo(ndr, "full_info", &r->full_info);
3995 break;
3997 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
3998 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info_internal", &r->auth_info_internal);
3999 break;
4001 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
4002 ndr_print_lsa_TrustDomainInfoFullInfoInternal(ndr, "full_info_internal", &r->full_info_internal);
4003 break;
4005 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
4006 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr, "info_ex2_internal", &r->info_ex2_internal);
4007 break;
4009 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
4010 ndr_print_lsa_TrustDomainInfoFullInfo2Internal(ndr, "full_info2_internal", &r->full_info2_internal);
4011 break;
4013 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES:
4014 ndr_print_lsa_TrustDomainInfoSupportedEncTypes(ndr, "enc_types", &r->enc_types);
4015 break;
4017 default:
4018 ndr_print_bad_level(ndr, name, level);
4022 static enum ndr_err_code ndr_push_lsa_DATA_BUF_PTR(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF_PTR *r)
4024 if (ndr_flags & NDR_SCALARS) {
4025 NDR_CHECK(ndr_push_align(ndr, 5));
4026 NDR_CHECK(ndr_push_unique_ptr(ndr, r->buf));
4027 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4029 if (ndr_flags & NDR_BUFFERS) {
4030 if (r->buf) {
4031 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->buf));
4034 return NDR_ERR_SUCCESS;
4037 static enum ndr_err_code ndr_pull_lsa_DATA_BUF_PTR(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF_PTR *r)
4039 uint32_t _ptr_buf;
4040 TALLOC_CTX *_mem_save_buf_0;
4041 if (ndr_flags & NDR_SCALARS) {
4042 NDR_CHECK(ndr_pull_align(ndr, 5));
4043 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buf));
4044 if (_ptr_buf) {
4045 NDR_PULL_ALLOC(ndr, r->buf);
4046 } else {
4047 r->buf = NULL;
4049 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4051 if (ndr_flags & NDR_BUFFERS) {
4052 if (r->buf) {
4053 _mem_save_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
4054 NDR_PULL_SET_MEM_CTX(ndr, r->buf, 0);
4055 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->buf));
4056 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buf_0, 0);
4059 return NDR_ERR_SUCCESS;
4062 _PUBLIC_ void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF_PTR *r)
4064 ndr_print_struct(ndr, name, "lsa_DATA_BUF_PTR");
4065 ndr->depth++;
4066 ndr_print_ptr(ndr, "buf", r->buf);
4067 ndr->depth++;
4068 if (r->buf) {
4069 ndr_print_lsa_DATA_BUF(ndr, "buf", r->buf);
4071 ndr->depth--;
4072 ndr->depth--;
4075 static enum ndr_err_code ndr_push_lsa_RightSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_RightSet *r)
4077 uint32_t cntr_names_1;
4078 if (ndr_flags & NDR_SCALARS) {
4079 NDR_CHECK(ndr_push_align(ndr, 5));
4080 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4081 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
4082 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4084 if (ndr_flags & NDR_BUFFERS) {
4085 if (r->names) {
4086 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4087 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4088 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
4090 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4091 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
4095 return NDR_ERR_SUCCESS;
4098 static enum ndr_err_code ndr_pull_lsa_RightSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_RightSet *r)
4100 uint32_t _ptr_names;
4101 uint32_t cntr_names_1;
4102 TALLOC_CTX *_mem_save_names_0;
4103 TALLOC_CTX *_mem_save_names_1;
4104 if (ndr_flags & NDR_SCALARS) {
4105 NDR_CHECK(ndr_pull_align(ndr, 5));
4106 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4107 if (r->count > 256) {
4108 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4110 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
4111 if (_ptr_names) {
4112 NDR_PULL_ALLOC(ndr, r->names);
4113 } else {
4114 r->names = NULL;
4116 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4118 if (ndr_flags & NDR_BUFFERS) {
4119 if (r->names) {
4120 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
4121 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
4122 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
4123 NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
4124 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
4125 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
4126 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4127 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
4129 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4130 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
4132 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
4133 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
4135 if (r->names) {
4136 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
4139 return NDR_ERR_SUCCESS;
4142 _PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, const struct lsa_RightSet *r)
4144 uint32_t cntr_names_1;
4145 ndr_print_struct(ndr, name, "lsa_RightSet");
4146 ndr->depth++;
4147 ndr_print_uint32(ndr, "count", r->count);
4148 ndr_print_ptr(ndr, "names", r->names);
4149 ndr->depth++;
4150 if (r->names) {
4151 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
4152 ndr->depth++;
4153 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
4154 char *idx_1=NULL;
4155 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
4156 ndr_print_lsa_StringLarge(ndr, "names", &r->names[cntr_names_1]);
4157 free(idx_1);
4160 ndr->depth--;
4162 ndr->depth--;
4163 ndr->depth--;
4166 static enum ndr_err_code ndr_push_lsa_DomainListEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainListEx *r)
4168 uint32_t cntr_domains_1;
4169 if (ndr_flags & NDR_SCALARS) {
4170 NDR_CHECK(ndr_push_align(ndr, 5));
4171 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4172 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
4173 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4175 if (ndr_flags & NDR_BUFFERS) {
4176 if (r->domains) {
4177 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4178 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
4179 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
4181 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
4182 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
4186 return NDR_ERR_SUCCESS;
4189 static enum ndr_err_code ndr_pull_lsa_DomainListEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainListEx *r)
4191 uint32_t _ptr_domains;
4192 uint32_t cntr_domains_1;
4193 TALLOC_CTX *_mem_save_domains_0;
4194 TALLOC_CTX *_mem_save_domains_1;
4195 if (ndr_flags & NDR_SCALARS) {
4196 NDR_CHECK(ndr_pull_align(ndr, 5));
4197 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4198 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
4199 if (_ptr_domains) {
4200 NDR_PULL_ALLOC(ndr, r->domains);
4201 } else {
4202 r->domains = NULL;
4204 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4206 if (ndr_flags & NDR_BUFFERS) {
4207 if (r->domains) {
4208 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
4209 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
4210 NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
4211 NDR_PULL_ALLOC_N(ndr, r->domains, ndr_get_array_size(ndr, &r->domains));
4212 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
4213 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
4214 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
4215 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
4217 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
4218 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
4220 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
4221 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
4223 if (r->domains) {
4224 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
4227 return NDR_ERR_SUCCESS;
4230 _PUBLIC_ void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name, const struct lsa_DomainListEx *r)
4232 uint32_t cntr_domains_1;
4233 ndr_print_struct(ndr, name, "lsa_DomainListEx");
4234 ndr->depth++;
4235 ndr_print_uint32(ndr, "count", r->count);
4236 ndr_print_ptr(ndr, "domains", r->domains);
4237 ndr->depth++;
4238 if (r->domains) {
4239 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
4240 ndr->depth++;
4241 for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
4242 char *idx_1=NULL;
4243 if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
4244 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "domains", &r->domains[cntr_domains_1]);
4245 free(idx_1);
4248 ndr->depth--;
4250 ndr->depth--;
4251 ndr->depth--;
4254 static enum ndr_err_code ndr_push_lsa_DomainInfoKerberos(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoKerberos *r)
4256 if (ndr_flags & NDR_SCALARS) {
4257 NDR_CHECK(ndr_push_align(ndr, 8));
4258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enforce_restrictions));
4259 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->service_tkt_lifetime));
4260 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->user_tkt_lifetime));
4261 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->user_tkt_renewaltime));
4262 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->clock_skew));
4263 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown6));
4264 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
4266 if (ndr_flags & NDR_BUFFERS) {
4268 return NDR_ERR_SUCCESS;
4271 static enum ndr_err_code ndr_pull_lsa_DomainInfoKerberos(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoKerberos *r)
4273 if (ndr_flags & NDR_SCALARS) {
4274 NDR_CHECK(ndr_pull_align(ndr, 8));
4275 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enforce_restrictions));
4276 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->service_tkt_lifetime));
4277 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->user_tkt_lifetime));
4278 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->user_tkt_renewaltime));
4279 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->clock_skew));
4280 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown6));
4281 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
4283 if (ndr_flags & NDR_BUFFERS) {
4285 return NDR_ERR_SUCCESS;
4288 _PUBLIC_ void ndr_print_lsa_DomainInfoKerberos(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoKerberos *r)
4290 ndr_print_struct(ndr, name, "lsa_DomainInfoKerberos");
4291 ndr->depth++;
4292 ndr_print_uint32(ndr, "enforce_restrictions", r->enforce_restrictions);
4293 ndr_print_hyper(ndr, "service_tkt_lifetime", r->service_tkt_lifetime);
4294 ndr_print_hyper(ndr, "user_tkt_lifetime", r->user_tkt_lifetime);
4295 ndr_print_hyper(ndr, "user_tkt_renewaltime", r->user_tkt_renewaltime);
4296 ndr_print_hyper(ndr, "clock_skew", r->clock_skew);
4297 ndr_print_hyper(ndr, "unknown6", r->unknown6);
4298 ndr->depth--;
4301 static enum ndr_err_code ndr_push_lsa_DomainInfoEfs(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoEfs *r)
4303 if (ndr_flags & NDR_SCALARS) {
4304 NDR_CHECK(ndr_push_align(ndr, 5));
4305 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->blob_size));
4306 NDR_CHECK(ndr_push_unique_ptr(ndr, r->efs_blob));
4307 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4309 if (ndr_flags & NDR_BUFFERS) {
4310 if (r->efs_blob) {
4311 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->blob_size));
4312 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->efs_blob, r->blob_size));
4315 return NDR_ERR_SUCCESS;
4318 static enum ndr_err_code ndr_pull_lsa_DomainInfoEfs(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoEfs *r)
4320 uint32_t _ptr_efs_blob;
4321 TALLOC_CTX *_mem_save_efs_blob_0;
4322 if (ndr_flags & NDR_SCALARS) {
4323 NDR_CHECK(ndr_pull_align(ndr, 5));
4324 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blob_size));
4325 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_efs_blob));
4326 if (_ptr_efs_blob) {
4327 NDR_PULL_ALLOC(ndr, r->efs_blob);
4328 } else {
4329 r->efs_blob = NULL;
4331 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4333 if (ndr_flags & NDR_BUFFERS) {
4334 if (r->efs_blob) {
4335 _mem_save_efs_blob_0 = NDR_PULL_GET_MEM_CTX(ndr);
4336 NDR_PULL_SET_MEM_CTX(ndr, r->efs_blob, 0);
4337 NDR_CHECK(ndr_pull_array_size(ndr, &r->efs_blob));
4338 NDR_PULL_ALLOC_N(ndr, r->efs_blob, ndr_get_array_size(ndr, &r->efs_blob));
4339 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->efs_blob, ndr_get_array_size(ndr, &r->efs_blob)));
4340 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_efs_blob_0, 0);
4342 if (r->efs_blob) {
4343 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->efs_blob, r->blob_size));
4346 return NDR_ERR_SUCCESS;
4349 _PUBLIC_ void ndr_print_lsa_DomainInfoEfs(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoEfs *r)
4351 ndr_print_struct(ndr, name, "lsa_DomainInfoEfs");
4352 ndr->depth++;
4353 ndr_print_uint32(ndr, "blob_size", r->blob_size);
4354 ndr_print_ptr(ndr, "efs_blob", r->efs_blob);
4355 ndr->depth++;
4356 if (r->efs_blob) {
4357 ndr_print_array_uint8(ndr, "efs_blob", r->efs_blob, r->blob_size);
4359 ndr->depth--;
4360 ndr->depth--;
4363 static enum ndr_err_code ndr_push_lsa_DomainInformationPolicy(struct ndr_push *ndr, int ndr_flags, const union lsa_DomainInformationPolicy *r)
4365 if (ndr_flags & NDR_SCALARS) {
4366 int level = ndr_push_get_switch_value(ndr, r);
4367 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
4368 NDR_CHECK(ndr_push_union_align(ndr, 8));
4369 switch (level) {
4370 case LSA_DOMAIN_INFO_POLICY_EFS: {
4371 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info));
4372 break; }
4374 case LSA_DOMAIN_INFO_POLICY_KERBEROS: {
4375 NDR_CHECK(ndr_push_lsa_DomainInfoKerberos(ndr, NDR_SCALARS, &r->kerberos_info));
4376 break; }
4378 default:
4379 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4382 if (ndr_flags & NDR_BUFFERS) {
4383 int level = ndr_push_get_switch_value(ndr, r);
4384 switch (level) {
4385 case LSA_DOMAIN_INFO_POLICY_EFS:
4386 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr, NDR_BUFFERS, &r->efs_info));
4387 break;
4389 case LSA_DOMAIN_INFO_POLICY_KERBEROS:
4390 break;
4392 default:
4393 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4396 return NDR_ERR_SUCCESS;
4399 static enum ndr_err_code ndr_pull_lsa_DomainInformationPolicy(struct ndr_pull *ndr, int ndr_flags, union lsa_DomainInformationPolicy *r)
4401 int level;
4402 uint16_t _level;
4403 level = ndr_pull_get_switch_value(ndr, r);
4404 if (ndr_flags & NDR_SCALARS) {
4405 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
4406 if (_level != level) {
4407 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
4409 NDR_CHECK(ndr_pull_union_align(ndr, 8));
4410 switch (level) {
4411 case LSA_DOMAIN_INFO_POLICY_EFS: {
4412 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info));
4413 break; }
4415 case LSA_DOMAIN_INFO_POLICY_KERBEROS: {
4416 NDR_CHECK(ndr_pull_lsa_DomainInfoKerberos(ndr, NDR_SCALARS, &r->kerberos_info));
4417 break; }
4419 default:
4420 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4423 if (ndr_flags & NDR_BUFFERS) {
4424 switch (level) {
4425 case LSA_DOMAIN_INFO_POLICY_EFS:
4426 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr, NDR_BUFFERS, &r->efs_info));
4427 break;
4429 case LSA_DOMAIN_INFO_POLICY_KERBEROS:
4430 break;
4432 default:
4433 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4436 return NDR_ERR_SUCCESS;
4439 _PUBLIC_ void ndr_print_lsa_DomainInformationPolicy(struct ndr_print *ndr, const char *name, const union lsa_DomainInformationPolicy *r)
4441 int level;
4442 level = ndr_print_get_switch_value(ndr, r);
4443 ndr_print_union(ndr, name, level, "lsa_DomainInformationPolicy");
4444 switch (level) {
4445 case LSA_DOMAIN_INFO_POLICY_EFS:
4446 ndr_print_lsa_DomainInfoEfs(ndr, "efs_info", &r->efs_info);
4447 break;
4449 case LSA_DOMAIN_INFO_POLICY_KERBEROS:
4450 ndr_print_lsa_DomainInfoKerberos(ndr, "kerberos_info", &r->kerberos_info);
4451 break;
4453 default:
4454 ndr_print_bad_level(ndr, name, level);
4458 static enum ndr_err_code ndr_push_lsa_TranslatedName2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName2 *r)
4460 if (ndr_flags & NDR_SCALARS) {
4461 NDR_CHECK(ndr_push_align(ndr, 5));
4462 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
4463 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
4464 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
4465 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
4466 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4468 if (ndr_flags & NDR_BUFFERS) {
4469 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
4471 return NDR_ERR_SUCCESS;
4474 static enum ndr_err_code ndr_pull_lsa_TranslatedName2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName2 *r)
4476 if (ndr_flags & NDR_SCALARS) {
4477 NDR_CHECK(ndr_pull_align(ndr, 5));
4478 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
4479 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
4480 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
4481 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
4482 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4484 if (ndr_flags & NDR_BUFFERS) {
4485 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
4487 return NDR_ERR_SUCCESS;
4490 _PUBLIC_ void ndr_print_lsa_TranslatedName2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName2 *r)
4492 ndr_print_struct(ndr, name, "lsa_TranslatedName2");
4493 ndr->depth++;
4494 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
4495 ndr_print_lsa_String(ndr, "name", &r->name);
4496 ndr_print_uint32(ndr, "sid_index", r->sid_index);
4497 ndr_print_uint32(ndr, "unknown", r->unknown);
4498 ndr->depth--;
4501 static enum ndr_err_code ndr_push_lsa_TransNameArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray2 *r)
4503 uint32_t cntr_names_1;
4504 if (ndr_flags & NDR_SCALARS) {
4505 NDR_CHECK(ndr_push_align(ndr, 5));
4506 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4507 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
4508 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4510 if (ndr_flags & NDR_BUFFERS) {
4511 if (r->names) {
4512 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4513 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4514 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
4516 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4517 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
4521 return NDR_ERR_SUCCESS;
4524 static enum ndr_err_code ndr_pull_lsa_TransNameArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray2 *r)
4526 uint32_t _ptr_names;
4527 uint32_t cntr_names_1;
4528 TALLOC_CTX *_mem_save_names_0;
4529 TALLOC_CTX *_mem_save_names_1;
4530 if (ndr_flags & NDR_SCALARS) {
4531 NDR_CHECK(ndr_pull_align(ndr, 5));
4532 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4533 if (r->count > 1000) {
4534 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4536 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
4537 if (_ptr_names) {
4538 NDR_PULL_ALLOC(ndr, r->names);
4539 } else {
4540 r->names = NULL;
4542 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4544 if (ndr_flags & NDR_BUFFERS) {
4545 if (r->names) {
4546 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
4547 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
4548 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
4549 NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
4550 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
4551 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
4552 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4553 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
4555 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4556 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
4558 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
4559 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
4561 if (r->names) {
4562 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
4565 return NDR_ERR_SUCCESS;
4568 _PUBLIC_ void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray2 *r)
4570 uint32_t cntr_names_1;
4571 ndr_print_struct(ndr, name, "lsa_TransNameArray2");
4572 ndr->depth++;
4573 ndr_print_uint32(ndr, "count", r->count);
4574 ndr_print_ptr(ndr, "names", r->names);
4575 ndr->depth++;
4576 if (r->names) {
4577 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
4578 ndr->depth++;
4579 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
4580 char *idx_1=NULL;
4581 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
4582 ndr_print_lsa_TranslatedName2(ndr, "names", &r->names[cntr_names_1]);
4583 free(idx_1);
4586 ndr->depth--;
4588 ndr->depth--;
4589 ndr->depth--;
4592 static enum ndr_err_code ndr_push_lsa_LookupOptions(struct ndr_push *ndr, int ndr_flags, enum lsa_LookupOptions r)
4594 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
4595 return NDR_ERR_SUCCESS;
4598 static enum ndr_err_code ndr_pull_lsa_LookupOptions(struct ndr_pull *ndr, int ndr_flags, enum lsa_LookupOptions *r)
4600 uint32_t v;
4601 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
4602 *r = v;
4603 return NDR_ERR_SUCCESS;
4606 _PUBLIC_ void ndr_print_lsa_LookupOptions(struct ndr_print *ndr, const char *name, enum lsa_LookupOptions r)
4608 const char *val = NULL;
4610 switch (r) {
4611 case LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES: val = "LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES"; break;
4612 case LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL: val = "LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL"; break;
4614 ndr_print_enum(ndr, name, "ENUM", val, r);
4617 static enum ndr_err_code ndr_push_lsa_ClientRevision(struct ndr_push *ndr, int ndr_flags, enum lsa_ClientRevision r)
4619 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
4620 return NDR_ERR_SUCCESS;
4623 static enum ndr_err_code ndr_pull_lsa_ClientRevision(struct ndr_pull *ndr, int ndr_flags, enum lsa_ClientRevision *r)
4625 uint32_t v;
4626 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
4627 *r = v;
4628 return NDR_ERR_SUCCESS;
4631 _PUBLIC_ void ndr_print_lsa_ClientRevision(struct ndr_print *ndr, const char *name, enum lsa_ClientRevision r)
4633 const char *val = NULL;
4635 switch (r) {
4636 case LSA_CLIENT_REVISION_1: val = "LSA_CLIENT_REVISION_1"; break;
4637 case LSA_CLIENT_REVISION_2: val = "LSA_CLIENT_REVISION_2"; break;
4639 ndr_print_enum(ndr, name, "ENUM", val, r);
4642 static enum ndr_err_code ndr_push_lsa_TranslatedSid2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid2 *r)
4644 if (ndr_flags & NDR_SCALARS) {
4645 NDR_CHECK(ndr_push_align(ndr, 4));
4646 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
4647 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
4648 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
4649 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
4650 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
4652 if (ndr_flags & NDR_BUFFERS) {
4654 return NDR_ERR_SUCCESS;
4657 static enum ndr_err_code ndr_pull_lsa_TranslatedSid2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid2 *r)
4659 if (ndr_flags & NDR_SCALARS) {
4660 NDR_CHECK(ndr_pull_align(ndr, 4));
4661 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
4662 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
4663 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
4664 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
4665 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
4667 if (ndr_flags & NDR_BUFFERS) {
4669 return NDR_ERR_SUCCESS;
4672 _PUBLIC_ void ndr_print_lsa_TranslatedSid2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid2 *r)
4674 ndr_print_struct(ndr, name, "lsa_TranslatedSid2");
4675 ndr->depth++;
4676 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
4677 ndr_print_uint32(ndr, "rid", r->rid);
4678 ndr_print_uint32(ndr, "sid_index", r->sid_index);
4679 ndr_print_uint32(ndr, "unknown", r->unknown);
4680 ndr->depth--;
4683 static enum ndr_err_code ndr_push_lsa_TransSidArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray2 *r)
4685 uint32_t cntr_sids_1;
4686 if (ndr_flags & NDR_SCALARS) {
4687 NDR_CHECK(ndr_push_align(ndr, 5));
4688 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4689 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
4690 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4692 if (ndr_flags & NDR_BUFFERS) {
4693 if (r->sids) {
4694 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4695 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4696 NDR_CHECK(ndr_push_lsa_TranslatedSid2(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4700 return NDR_ERR_SUCCESS;
4703 static enum ndr_err_code ndr_pull_lsa_TransSidArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray2 *r)
4705 uint32_t _ptr_sids;
4706 uint32_t cntr_sids_1;
4707 TALLOC_CTX *_mem_save_sids_0;
4708 TALLOC_CTX *_mem_save_sids_1;
4709 if (ndr_flags & NDR_SCALARS) {
4710 NDR_CHECK(ndr_pull_align(ndr, 5));
4711 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4712 if (r->count > 1000) {
4713 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4715 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
4716 if (_ptr_sids) {
4717 NDR_PULL_ALLOC(ndr, r->sids);
4718 } else {
4719 r->sids = NULL;
4721 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4723 if (ndr_flags & NDR_BUFFERS) {
4724 if (r->sids) {
4725 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
4726 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4727 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
4728 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
4729 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
4730 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4731 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4732 NDR_CHECK(ndr_pull_lsa_TranslatedSid2(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
4735 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
4737 if (r->sids) {
4738 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
4741 return NDR_ERR_SUCCESS;
4744 _PUBLIC_ void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray2 *r)
4746 uint32_t cntr_sids_1;
4747 ndr_print_struct(ndr, name, "lsa_TransSidArray2");
4748 ndr->depth++;
4749 ndr_print_uint32(ndr, "count", r->count);
4750 ndr_print_ptr(ndr, "sids", r->sids);
4751 ndr->depth++;
4752 if (r->sids) {
4753 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
4754 ndr->depth++;
4755 for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
4756 char *idx_1=NULL;
4757 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
4758 ndr_print_lsa_TranslatedSid2(ndr, "sids", &r->sids[cntr_sids_1]);
4759 free(idx_1);
4762 ndr->depth--;
4764 ndr->depth--;
4765 ndr->depth--;
4768 static enum ndr_err_code ndr_push_lsa_TranslatedSid3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid3 *r)
4770 if (ndr_flags & NDR_SCALARS) {
4771 NDR_CHECK(ndr_push_align(ndr, 5));
4772 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
4773 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
4774 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
4775 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
4776 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4778 if (ndr_flags & NDR_BUFFERS) {
4779 if (r->sid) {
4780 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
4783 return NDR_ERR_SUCCESS;
4786 static enum ndr_err_code ndr_pull_lsa_TranslatedSid3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid3 *r)
4788 uint32_t _ptr_sid;
4789 TALLOC_CTX *_mem_save_sid_0;
4790 if (ndr_flags & NDR_SCALARS) {
4791 NDR_CHECK(ndr_pull_align(ndr, 5));
4792 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
4793 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
4794 if (_ptr_sid) {
4795 NDR_PULL_ALLOC(ndr, r->sid);
4796 } else {
4797 r->sid = NULL;
4799 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
4800 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
4801 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4803 if (ndr_flags & NDR_BUFFERS) {
4804 if (r->sid) {
4805 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
4806 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
4807 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
4808 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
4811 return NDR_ERR_SUCCESS;
4814 _PUBLIC_ void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid3 *r)
4816 ndr_print_struct(ndr, name, "lsa_TranslatedSid3");
4817 ndr->depth++;
4818 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
4819 ndr_print_ptr(ndr, "sid", r->sid);
4820 ndr->depth++;
4821 if (r->sid) {
4822 ndr_print_dom_sid2(ndr, "sid", r->sid);
4824 ndr->depth--;
4825 ndr_print_uint32(ndr, "sid_index", r->sid_index);
4826 ndr_print_uint32(ndr, "flags", r->flags);
4827 ndr->depth--;
4830 static enum ndr_err_code ndr_push_lsa_TransSidArray3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray3 *r)
4832 uint32_t cntr_sids_1;
4833 if (ndr_flags & NDR_SCALARS) {
4834 NDR_CHECK(ndr_push_align(ndr, 5));
4835 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4836 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
4837 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4839 if (ndr_flags & NDR_BUFFERS) {
4840 if (r->sids) {
4841 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4842 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4843 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4845 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4846 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
4850 return NDR_ERR_SUCCESS;
4853 static enum ndr_err_code ndr_pull_lsa_TransSidArray3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray3 *r)
4855 uint32_t _ptr_sids;
4856 uint32_t cntr_sids_1;
4857 TALLOC_CTX *_mem_save_sids_0;
4858 TALLOC_CTX *_mem_save_sids_1;
4859 if (ndr_flags & NDR_SCALARS) {
4860 NDR_CHECK(ndr_pull_align(ndr, 5));
4861 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4862 if (r->count > 1000) {
4863 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4865 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
4866 if (_ptr_sids) {
4867 NDR_PULL_ALLOC(ndr, r->sids);
4868 } else {
4869 r->sids = NULL;
4871 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4873 if (ndr_flags & NDR_BUFFERS) {
4874 if (r->sids) {
4875 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
4876 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4877 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
4878 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
4879 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
4880 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4881 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4882 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4884 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4885 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
4887 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
4888 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
4890 if (r->sids) {
4891 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
4894 return NDR_ERR_SUCCESS;
4897 _PUBLIC_ void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray3 *r)
4899 uint32_t cntr_sids_1;
4900 ndr_print_struct(ndr, name, "lsa_TransSidArray3");
4901 ndr->depth++;
4902 ndr_print_uint32(ndr, "count", r->count);
4903 ndr_print_ptr(ndr, "sids", r->sids);
4904 ndr->depth++;
4905 if (r->sids) {
4906 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
4907 ndr->depth++;
4908 for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
4909 char *idx_1=NULL;
4910 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
4911 ndr_print_lsa_TranslatedSid3(ndr, "sids", &r->sids[cntr_sids_1]);
4912 free(idx_1);
4915 ndr->depth--;
4917 ndr->depth--;
4918 ndr->depth--;
4921 static enum ndr_err_code ndr_push_lsa_ForestTrustBinaryData(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustBinaryData *r)
4923 if (ndr_flags & NDR_SCALARS) {
4924 NDR_CHECK(ndr_push_align(ndr, 5));
4925 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
4926 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
4927 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4929 if (ndr_flags & NDR_BUFFERS) {
4930 if (r->data) {
4931 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
4932 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
4935 return NDR_ERR_SUCCESS;
4938 static enum ndr_err_code ndr_pull_lsa_ForestTrustBinaryData(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustBinaryData *r)
4940 uint32_t _ptr_data;
4941 TALLOC_CTX *_mem_save_data_0;
4942 if (ndr_flags & NDR_SCALARS) {
4943 NDR_CHECK(ndr_pull_align(ndr, 5));
4944 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
4945 if (r->length > 131072) {
4946 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4948 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
4949 if (_ptr_data) {
4950 NDR_PULL_ALLOC(ndr, r->data);
4951 } else {
4952 r->data = NULL;
4954 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4956 if (ndr_flags & NDR_BUFFERS) {
4957 if (r->data) {
4958 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
4959 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
4960 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
4961 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
4962 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
4963 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
4965 if (r->data) {
4966 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
4969 return NDR_ERR_SUCCESS;
4972 _PUBLIC_ void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustBinaryData *r)
4974 ndr_print_struct(ndr, name, "lsa_ForestTrustBinaryData");
4975 ndr->depth++;
4976 ndr_print_uint32(ndr, "length", r->length);
4977 ndr_print_ptr(ndr, "data", r->data);
4978 ndr->depth++;
4979 if (r->data) {
4980 ndr_print_array_uint8(ndr, "data", r->data, r->length);
4982 ndr->depth--;
4983 ndr->depth--;
4986 static enum ndr_err_code ndr_push_lsa_ForestTrustDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustDomainInfo *r)
4988 if (ndr_flags & NDR_SCALARS) {
4989 NDR_CHECK(ndr_push_align(ndr, 5));
4990 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid));
4991 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain_name));
4992 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_domain_name));
4993 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4995 if (ndr_flags & NDR_BUFFERS) {
4996 if (r->domain_sid) {
4997 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
4999 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain_name));
5000 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_domain_name));
5002 return NDR_ERR_SUCCESS;
5005 static enum ndr_err_code ndr_pull_lsa_ForestTrustDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustDomainInfo *r)
5007 uint32_t _ptr_domain_sid;
5008 TALLOC_CTX *_mem_save_domain_sid_0;
5009 if (ndr_flags & NDR_SCALARS) {
5010 NDR_CHECK(ndr_pull_align(ndr, 5));
5011 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_sid));
5012 if (_ptr_domain_sid) {
5013 NDR_PULL_ALLOC(ndr, r->domain_sid);
5014 } else {
5015 r->domain_sid = NULL;
5017 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain_name));
5018 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_domain_name));
5019 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5021 if (ndr_flags & NDR_BUFFERS) {
5022 if (r->domain_sid) {
5023 _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
5024 NDR_PULL_SET_MEM_CTX(ndr, r->domain_sid, 0);
5025 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
5026 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, 0);
5028 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain_name));
5029 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_domain_name));
5031 return NDR_ERR_SUCCESS;
5034 _PUBLIC_ void ndr_print_lsa_ForestTrustDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustDomainInfo *r)
5036 ndr_print_struct(ndr, name, "lsa_ForestTrustDomainInfo");
5037 ndr->depth++;
5038 ndr_print_ptr(ndr, "domain_sid", r->domain_sid);
5039 ndr->depth++;
5040 if (r->domain_sid) {
5041 ndr_print_dom_sid2(ndr, "domain_sid", r->domain_sid);
5043 ndr->depth--;
5044 ndr_print_lsa_StringLarge(ndr, "dns_domain_name", &r->dns_domain_name);
5045 ndr_print_lsa_StringLarge(ndr, "netbios_domain_name", &r->netbios_domain_name);
5046 ndr->depth--;
5049 static enum ndr_err_code ndr_push_lsa_ForestTrustData(struct ndr_push *ndr, int ndr_flags, const union lsa_ForestTrustData *r)
5051 if (ndr_flags & NDR_SCALARS) {
5052 int level = ndr_push_get_switch_value(ndr, r);
5053 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5054 NDR_CHECK(ndr_push_union_align(ndr, 5));
5055 switch (level) {
5056 case LSA_FOREST_TRUST_TOP_LEVEL_NAME: {
5057 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->top_level_name));
5058 break; }
5060 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: {
5061 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name_ex));
5062 break; }
5064 case LSA_FOREST_TRUST_DOMAIN_INFO: {
5065 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr, NDR_SCALARS, &r->domain_info));
5066 break; }
5068 default: {
5069 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr, NDR_SCALARS, &r->data));
5070 break; }
5074 if (ndr_flags & NDR_BUFFERS) {
5075 int level = ndr_push_get_switch_value(ndr, r);
5076 switch (level) {
5077 case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
5078 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->top_level_name));
5079 break;
5081 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
5082 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->top_level_name_ex));
5083 break;
5085 case LSA_FOREST_TRUST_DOMAIN_INFO:
5086 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr, NDR_BUFFERS, &r->domain_info));
5087 break;
5089 default:
5090 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr, NDR_BUFFERS, &r->data));
5091 break;
5095 return NDR_ERR_SUCCESS;
5098 static enum ndr_err_code ndr_pull_lsa_ForestTrustData(struct ndr_pull *ndr, int ndr_flags, union lsa_ForestTrustData *r)
5100 int level;
5101 uint32_t _level;
5102 level = ndr_pull_get_switch_value(ndr, r);
5103 if (ndr_flags & NDR_SCALARS) {
5104 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5105 if (_level != level) {
5106 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
5108 NDR_CHECK(ndr_pull_union_align(ndr, 5));
5109 switch (level) {
5110 case LSA_FOREST_TRUST_TOP_LEVEL_NAME: {
5111 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->top_level_name));
5112 break; }
5114 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: {
5115 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name_ex));
5116 break; }
5118 case LSA_FOREST_TRUST_DOMAIN_INFO: {
5119 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr, NDR_SCALARS, &r->domain_info));
5120 break; }
5122 default: {
5123 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr, NDR_SCALARS, &r->data));
5124 break; }
5128 if (ndr_flags & NDR_BUFFERS) {
5129 switch (level) {
5130 case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
5131 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->top_level_name));
5132 break;
5134 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
5135 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->top_level_name_ex));
5136 break;
5138 case LSA_FOREST_TRUST_DOMAIN_INFO:
5139 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr, NDR_BUFFERS, &r->domain_info));
5140 break;
5142 default:
5143 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr, NDR_BUFFERS, &r->data));
5144 break;
5148 return NDR_ERR_SUCCESS;
5151 _PUBLIC_ void ndr_print_lsa_ForestTrustData(struct ndr_print *ndr, const char *name, const union lsa_ForestTrustData *r)
5153 int level;
5154 level = ndr_print_get_switch_value(ndr, r);
5155 ndr_print_union(ndr, name, level, "lsa_ForestTrustData");
5156 switch (level) {
5157 case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
5158 ndr_print_lsa_String(ndr, "top_level_name", &r->top_level_name);
5159 break;
5161 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
5162 ndr_print_lsa_StringLarge(ndr, "top_level_name_ex", &r->top_level_name_ex);
5163 break;
5165 case LSA_FOREST_TRUST_DOMAIN_INFO:
5166 ndr_print_lsa_ForestTrustDomainInfo(ndr, "domain_info", &r->domain_info);
5167 break;
5169 default:
5170 ndr_print_lsa_ForestTrustBinaryData(ndr, "data", &r->data);
5171 break;
5176 static enum ndr_err_code ndr_push_lsa_ForestTrustRecordType(struct ndr_push *ndr, int ndr_flags, enum lsa_ForestTrustRecordType r)
5178 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
5179 return NDR_ERR_SUCCESS;
5182 static enum ndr_err_code ndr_pull_lsa_ForestTrustRecordType(struct ndr_pull *ndr, int ndr_flags, enum lsa_ForestTrustRecordType *r)
5184 uint32_t v;
5185 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
5186 *r = v;
5187 return NDR_ERR_SUCCESS;
5190 _PUBLIC_ void ndr_print_lsa_ForestTrustRecordType(struct ndr_print *ndr, const char *name, enum lsa_ForestTrustRecordType r)
5192 const char *val = NULL;
5194 switch (r) {
5195 case LSA_FOREST_TRUST_TOP_LEVEL_NAME: val = "LSA_FOREST_TRUST_TOP_LEVEL_NAME"; break;
5196 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: val = "LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX"; break;
5197 case LSA_FOREST_TRUST_DOMAIN_INFO: val = "LSA_FOREST_TRUST_DOMAIN_INFO"; break;
5198 case LSA_FOREST_TRUST_RECORD_TYPE_LAST: val = "LSA_FOREST_TRUST_RECORD_TYPE_LAST"; break;
5200 ndr_print_enum(ndr, name, "ENUM", val, r);
5203 static enum ndr_err_code ndr_push_lsa_ForestTrustRecord(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustRecord *r)
5205 if (ndr_flags & NDR_SCALARS) {
5206 NDR_CHECK(ndr_push_align(ndr, 8));
5207 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
5208 NDR_CHECK(ndr_push_lsa_ForestTrustRecordType(ndr, NDR_SCALARS, r->level));
5209 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown));
5210 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->forest_trust_data, r->level));
5211 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr, NDR_SCALARS, &r->forest_trust_data));
5212 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
5214 if (ndr_flags & NDR_BUFFERS) {
5215 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr, NDR_BUFFERS, &r->forest_trust_data));
5217 return NDR_ERR_SUCCESS;
5220 static enum ndr_err_code ndr_pull_lsa_ForestTrustRecord(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustRecord *r)
5222 if (ndr_flags & NDR_SCALARS) {
5223 NDR_CHECK(ndr_pull_align(ndr, 8));
5224 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
5225 NDR_CHECK(ndr_pull_lsa_ForestTrustRecordType(ndr, NDR_SCALARS, &r->level));
5226 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown));
5227 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->forest_trust_data, r->level));
5228 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr, NDR_SCALARS, &r->forest_trust_data));
5229 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
5231 if (ndr_flags & NDR_BUFFERS) {
5232 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr, NDR_BUFFERS, &r->forest_trust_data));
5234 return NDR_ERR_SUCCESS;
5237 _PUBLIC_ void ndr_print_lsa_ForestTrustRecord(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustRecord *r)
5239 ndr_print_struct(ndr, name, "lsa_ForestTrustRecord");
5240 ndr->depth++;
5241 ndr_print_uint32(ndr, "flags", r->flags);
5242 ndr_print_lsa_ForestTrustRecordType(ndr, "level", r->level);
5243 ndr_print_hyper(ndr, "unknown", r->unknown);
5244 ndr_print_set_switch_value(ndr, &r->forest_trust_data, r->level);
5245 ndr_print_lsa_ForestTrustData(ndr, "forest_trust_data", &r->forest_trust_data);
5246 ndr->depth--;
5249 _PUBLIC_ enum ndr_err_code ndr_push_lsa_ForestTrustInformation(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustInformation *r)
5251 uint32_t cntr_entries_1;
5252 if (ndr_flags & NDR_SCALARS) {
5253 NDR_CHECK(ndr_push_align(ndr, 5));
5254 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5255 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
5256 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5258 if (ndr_flags & NDR_BUFFERS) {
5259 if (r->entries) {
5260 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5261 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
5262 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries[cntr_entries_1]));
5264 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
5265 if (r->entries[cntr_entries_1]) {
5266 NDR_CHECK(ndr_push_lsa_ForestTrustRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1]));
5271 return NDR_ERR_SUCCESS;
5274 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_ForestTrustInformation(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustInformation *r)
5276 uint32_t _ptr_entries;
5277 uint32_t cntr_entries_1;
5278 TALLOC_CTX *_mem_save_entries_0;
5279 TALLOC_CTX *_mem_save_entries_1;
5280 TALLOC_CTX *_mem_save_entries_2;
5281 if (ndr_flags & NDR_SCALARS) {
5282 NDR_CHECK(ndr_pull_align(ndr, 5));
5283 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5284 if (r->count > 4000) {
5285 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5287 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
5288 if (_ptr_entries) {
5289 NDR_PULL_ALLOC(ndr, r->entries);
5290 } else {
5291 r->entries = NULL;
5293 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5295 if (ndr_flags & NDR_BUFFERS) {
5296 if (r->entries) {
5297 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
5298 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
5299 NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
5300 NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
5301 _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
5302 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
5303 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
5304 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
5305 if (_ptr_entries) {
5306 NDR_PULL_ALLOC(ndr, r->entries[cntr_entries_1]);
5307 } else {
5308 r->entries[cntr_entries_1] = NULL;
5311 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
5312 if (r->entries[cntr_entries_1]) {
5313 _mem_save_entries_2 = NDR_PULL_GET_MEM_CTX(ndr);
5314 NDR_PULL_SET_MEM_CTX(ndr, r->entries[cntr_entries_1], 0);
5315 NDR_CHECK(ndr_pull_lsa_ForestTrustRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1]));
5316 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_2, 0);
5319 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
5320 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
5322 if (r->entries) {
5323 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
5326 return NDR_ERR_SUCCESS;
5329 _PUBLIC_ void ndr_print_lsa_ForestTrustInformation(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustInformation *r)
5331 uint32_t cntr_entries_1;
5332 ndr_print_struct(ndr, name, "lsa_ForestTrustInformation");
5333 ndr->depth++;
5334 ndr_print_uint32(ndr, "count", r->count);
5335 ndr_print_ptr(ndr, "entries", r->entries);
5336 ndr->depth++;
5337 if (r->entries) {
5338 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
5339 ndr->depth++;
5340 for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
5341 char *idx_1=NULL;
5342 if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
5343 ndr_print_ptr(ndr, "entries", r->entries[cntr_entries_1]);
5344 ndr->depth++;
5345 if (r->entries[cntr_entries_1]) {
5346 ndr_print_lsa_ForestTrustRecord(ndr, "entries", r->entries[cntr_entries_1]);
5348 ndr->depth--;
5349 free(idx_1);
5352 ndr->depth--;
5354 ndr->depth--;
5355 ndr->depth--;
5358 static enum ndr_err_code ndr_push_lsa_Close(struct ndr_push *ndr, int flags, const struct lsa_Close *r)
5360 if (flags & NDR_IN) {
5361 if (r->in.handle == NULL) {
5362 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5364 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5366 if (flags & NDR_OUT) {
5367 if (r->out.handle == NULL) {
5368 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5370 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5371 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5373 return NDR_ERR_SUCCESS;
5376 static enum ndr_err_code ndr_pull_lsa_Close(struct ndr_pull *ndr, int flags, struct lsa_Close *r)
5378 TALLOC_CTX *_mem_save_handle_0;
5379 if (flags & NDR_IN) {
5380 ZERO_STRUCT(r->out);
5382 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5383 NDR_PULL_ALLOC(ndr, r->in.handle);
5385 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5386 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5387 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5388 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5389 NDR_PULL_ALLOC(ndr, r->out.handle);
5390 *r->out.handle = *r->in.handle;
5392 if (flags & NDR_OUT) {
5393 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5394 NDR_PULL_ALLOC(ndr, r->out.handle);
5396 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5397 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5398 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5399 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5400 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5402 return NDR_ERR_SUCCESS;
5405 _PUBLIC_ void ndr_print_lsa_Close(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Close *r)
5407 ndr_print_struct(ndr, name, "lsa_Close");
5408 ndr->depth++;
5409 if (flags & NDR_SET_VALUES) {
5410 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5412 if (flags & NDR_IN) {
5413 ndr_print_struct(ndr, "in", "lsa_Close");
5414 ndr->depth++;
5415 ndr_print_ptr(ndr, "handle", r->in.handle);
5416 ndr->depth++;
5417 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5418 ndr->depth--;
5419 ndr->depth--;
5421 if (flags & NDR_OUT) {
5422 ndr_print_struct(ndr, "out", "lsa_Close");
5423 ndr->depth++;
5424 ndr_print_ptr(ndr, "handle", r->out.handle);
5425 ndr->depth++;
5426 ndr_print_policy_handle(ndr, "handle", r->out.handle);
5427 ndr->depth--;
5428 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5429 ndr->depth--;
5431 ndr->depth--;
5434 _PUBLIC_ enum ndr_err_code ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_Delete *r)
5436 if (flags & NDR_IN) {
5437 if (r->in.handle == NULL) {
5438 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5440 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5442 if (flags & NDR_OUT) {
5443 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5445 return NDR_ERR_SUCCESS;
5448 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, struct lsa_Delete *r)
5450 TALLOC_CTX *_mem_save_handle_0;
5451 if (flags & NDR_IN) {
5452 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5453 NDR_PULL_ALLOC(ndr, r->in.handle);
5455 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5456 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5457 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5458 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5460 if (flags & NDR_OUT) {
5461 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5463 return NDR_ERR_SUCCESS;
5466 _PUBLIC_ void ndr_print_lsa_Delete(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Delete *r)
5468 ndr_print_struct(ndr, name, "lsa_Delete");
5469 ndr->depth++;
5470 if (flags & NDR_SET_VALUES) {
5471 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5473 if (flags & NDR_IN) {
5474 ndr_print_struct(ndr, "in", "lsa_Delete");
5475 ndr->depth++;
5476 ndr_print_ptr(ndr, "handle", r->in.handle);
5477 ndr->depth++;
5478 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5479 ndr->depth--;
5480 ndr->depth--;
5482 if (flags & NDR_OUT) {
5483 ndr_print_struct(ndr, "out", "lsa_Delete");
5484 ndr->depth++;
5485 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5486 ndr->depth--;
5488 ndr->depth--;
5491 _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivs *r)
5493 if (flags & NDR_IN) {
5494 if (r->in.handle == NULL) {
5495 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5497 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5498 if (r->in.resume_handle == NULL) {
5499 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
5502 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_count));
5504 if (flags & NDR_OUT) {
5505 if (r->out.resume_handle == NULL) {
5506 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5508 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
5509 if (r->out.privs == NULL) {
5510 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5512 NDR_CHECK(ndr_push_lsa_PrivArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs));
5513 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5515 return NDR_ERR_SUCCESS;
5518 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivs *r)
5520 TALLOC_CTX *_mem_save_handle_0;
5521 TALLOC_CTX *_mem_save_resume_handle_0;
5522 TALLOC_CTX *_mem_save_privs_0;
5523 if (flags & NDR_IN) {
5524 ZERO_STRUCT(r->out);
5526 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5527 NDR_PULL_ALLOC(ndr, r->in.handle);
5529 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5530 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5531 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5532 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5533 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5534 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
5536 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5537 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
5538 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
5539 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
5540 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_count));
5541 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
5542 *r->out.resume_handle = *r->in.resume_handle;
5543 NDR_PULL_ALLOC(ndr, r->out.privs);
5544 ZERO_STRUCTP(r->out.privs);
5546 if (flags & NDR_OUT) {
5547 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5548 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
5550 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5551 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
5552 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
5553 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
5554 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5555 NDR_PULL_ALLOC(ndr, r->out.privs);
5557 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
5558 NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, LIBNDR_FLAG_REF_ALLOC);
5559 NDR_CHECK(ndr_pull_lsa_PrivArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs));
5560 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
5561 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5563 return NDR_ERR_SUCCESS;
5566 _PUBLIC_ void ndr_print_lsa_EnumPrivs(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivs *r)
5568 ndr_print_struct(ndr, name, "lsa_EnumPrivs");
5569 ndr->depth++;
5570 if (flags & NDR_SET_VALUES) {
5571 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5573 if (flags & NDR_IN) {
5574 ndr_print_struct(ndr, "in", "lsa_EnumPrivs");
5575 ndr->depth++;
5576 ndr_print_ptr(ndr, "handle", r->in.handle);
5577 ndr->depth++;
5578 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5579 ndr->depth--;
5580 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
5581 ndr->depth++;
5582 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
5583 ndr->depth--;
5584 ndr_print_uint32(ndr, "max_count", r->in.max_count);
5585 ndr->depth--;
5587 if (flags & NDR_OUT) {
5588 ndr_print_struct(ndr, "out", "lsa_EnumPrivs");
5589 ndr->depth++;
5590 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
5591 ndr->depth++;
5592 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
5593 ndr->depth--;
5594 ndr_print_ptr(ndr, "privs", r->out.privs);
5595 ndr->depth++;
5596 ndr_print_lsa_PrivArray(ndr, "privs", r->out.privs);
5597 ndr->depth--;
5598 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5599 ndr->depth--;
5601 ndr->depth--;
5604 static enum ndr_err_code ndr_push_lsa_QuerySecurity(struct ndr_push *ndr, int flags, const struct lsa_QuerySecurity *r)
5606 if (flags & NDR_IN) {
5607 if (r->in.handle == NULL) {
5608 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5610 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5611 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
5613 if (flags & NDR_OUT) {
5614 if (r->out.sdbuf == NULL) {
5615 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5617 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sdbuf));
5618 if (*r->out.sdbuf) {
5619 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
5621 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5623 return NDR_ERR_SUCCESS;
5626 static enum ndr_err_code ndr_pull_lsa_QuerySecurity(struct ndr_pull *ndr, int flags, struct lsa_QuerySecurity *r)
5628 uint32_t _ptr_sdbuf;
5629 TALLOC_CTX *_mem_save_handle_0;
5630 TALLOC_CTX *_mem_save_sdbuf_0;
5631 TALLOC_CTX *_mem_save_sdbuf_1;
5632 if (flags & NDR_IN) {
5633 ZERO_STRUCT(r->out);
5635 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5636 NDR_PULL_ALLOC(ndr, r->in.handle);
5638 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5639 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5640 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5641 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5642 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
5643 NDR_PULL_ALLOC(ndr, r->out.sdbuf);
5644 ZERO_STRUCTP(r->out.sdbuf);
5646 if (flags & NDR_OUT) {
5647 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5648 NDR_PULL_ALLOC(ndr, r->out.sdbuf);
5650 _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
5651 NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC);
5652 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sdbuf));
5653 if (_ptr_sdbuf) {
5654 NDR_PULL_ALLOC(ndr, *r->out.sdbuf);
5655 } else {
5656 *r->out.sdbuf = NULL;
5658 if (*r->out.sdbuf) {
5659 _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr);
5660 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, 0);
5661 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
5662 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, 0);
5664 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
5665 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5667 return NDR_ERR_SUCCESS;
5670 _PUBLIC_ void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecurity *r)
5672 ndr_print_struct(ndr, name, "lsa_QuerySecurity");
5673 ndr->depth++;
5674 if (flags & NDR_SET_VALUES) {
5675 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5677 if (flags & NDR_IN) {
5678 ndr_print_struct(ndr, "in", "lsa_QuerySecurity");
5679 ndr->depth++;
5680 ndr_print_ptr(ndr, "handle", r->in.handle);
5681 ndr->depth++;
5682 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5683 ndr->depth--;
5684 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
5685 ndr->depth--;
5687 if (flags & NDR_OUT) {
5688 ndr_print_struct(ndr, "out", "lsa_QuerySecurity");
5689 ndr->depth++;
5690 ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf);
5691 ndr->depth++;
5692 ndr_print_ptr(ndr, "sdbuf", *r->out.sdbuf);
5693 ndr->depth++;
5694 if (*r->out.sdbuf) {
5695 ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf);
5697 ndr->depth--;
5698 ndr->depth--;
5699 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5700 ndr->depth--;
5702 ndr->depth--;
5705 static enum ndr_err_code ndr_push_lsa_SetSecObj(struct ndr_push *ndr, int flags, const struct lsa_SetSecObj *r)
5707 if (flags & NDR_IN) {
5708 if (r->in.handle == NULL) {
5709 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5711 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5712 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
5713 if (r->in.sdbuf == NULL) {
5714 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5716 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
5718 if (flags & NDR_OUT) {
5719 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5721 return NDR_ERR_SUCCESS;
5724 static enum ndr_err_code ndr_pull_lsa_SetSecObj(struct ndr_pull *ndr, int flags, struct lsa_SetSecObj *r)
5726 TALLOC_CTX *_mem_save_handle_0;
5727 TALLOC_CTX *_mem_save_sdbuf_0;
5728 if (flags & NDR_IN) {
5729 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5730 NDR_PULL_ALLOC(ndr, r->in.handle);
5732 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5733 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5734 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5735 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5736 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
5737 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5738 NDR_PULL_ALLOC(ndr, r->in.sdbuf);
5740 _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
5741 NDR_PULL_SET_MEM_CTX(ndr, r->in.sdbuf, LIBNDR_FLAG_REF_ALLOC);
5742 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
5743 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
5745 if (flags & NDR_OUT) {
5746 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5748 return NDR_ERR_SUCCESS;
5751 _PUBLIC_ void ndr_print_lsa_SetSecObj(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecObj *r)
5753 ndr_print_struct(ndr, name, "lsa_SetSecObj");
5754 ndr->depth++;
5755 if (flags & NDR_SET_VALUES) {
5756 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5758 if (flags & NDR_IN) {
5759 ndr_print_struct(ndr, "in", "lsa_SetSecObj");
5760 ndr->depth++;
5761 ndr_print_ptr(ndr, "handle", r->in.handle);
5762 ndr->depth++;
5763 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5764 ndr->depth--;
5765 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
5766 ndr_print_ptr(ndr, "sdbuf", r->in.sdbuf);
5767 ndr->depth++;
5768 ndr_print_sec_desc_buf(ndr, "sdbuf", r->in.sdbuf);
5769 ndr->depth--;
5770 ndr->depth--;
5772 if (flags & NDR_OUT) {
5773 ndr_print_struct(ndr, "out", "lsa_SetSecObj");
5774 ndr->depth++;
5775 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5776 ndr->depth--;
5778 ndr->depth--;
5781 static enum ndr_err_code ndr_push_lsa_ChangePassword(struct ndr_push *ndr, int flags, const struct lsa_ChangePassword *r)
5783 if (flags & NDR_IN) {
5785 if (flags & NDR_OUT) {
5786 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5788 return NDR_ERR_SUCCESS;
5791 static enum ndr_err_code ndr_pull_lsa_ChangePassword(struct ndr_pull *ndr, int flags, struct lsa_ChangePassword *r)
5793 if (flags & NDR_IN) {
5795 if (flags & NDR_OUT) {
5796 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5798 return NDR_ERR_SUCCESS;
5801 _PUBLIC_ void ndr_print_lsa_ChangePassword(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ChangePassword *r)
5803 ndr_print_struct(ndr, name, "lsa_ChangePassword");
5804 ndr->depth++;
5805 if (flags & NDR_SET_VALUES) {
5806 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5808 if (flags & NDR_IN) {
5809 ndr_print_struct(ndr, "in", "lsa_ChangePassword");
5810 ndr->depth++;
5811 ndr->depth--;
5813 if (flags & NDR_OUT) {
5814 ndr_print_struct(ndr, "out", "lsa_ChangePassword");
5815 ndr->depth++;
5816 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5817 ndr->depth--;
5819 ndr->depth--;
5822 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy *r)
5824 if (flags & NDR_IN) {
5825 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
5826 if (r->in.system_name) {
5827 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
5829 if (r->in.attr == NULL) {
5830 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5832 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
5833 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
5835 if (flags & NDR_OUT) {
5836 if (r->out.handle == NULL) {
5837 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5839 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5840 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5842 return NDR_ERR_SUCCESS;
5845 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy *r)
5847 uint32_t _ptr_system_name;
5848 TALLOC_CTX *_mem_save_system_name_0;
5849 TALLOC_CTX *_mem_save_attr_0;
5850 TALLOC_CTX *_mem_save_handle_0;
5851 if (flags & NDR_IN) {
5852 ZERO_STRUCT(r->out);
5854 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
5855 if (_ptr_system_name) {
5856 NDR_PULL_ALLOC(ndr, r->in.system_name);
5857 } else {
5858 r->in.system_name = NULL;
5860 if (r->in.system_name) {
5861 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5862 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
5863 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
5864 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
5866 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5867 NDR_PULL_ALLOC(ndr, r->in.attr);
5869 _mem_save_attr_0 = NDR_PULL_GET_MEM_CTX(ndr);
5870 NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC);
5871 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
5872 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC);
5873 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
5874 NDR_PULL_ALLOC(ndr, r->out.handle);
5875 ZERO_STRUCTP(r->out.handle);
5877 if (flags & NDR_OUT) {
5878 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5879 NDR_PULL_ALLOC(ndr, r->out.handle);
5881 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5882 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5883 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5884 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5885 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5887 return NDR_ERR_SUCCESS;
5890 _PUBLIC_ void ndr_print_lsa_OpenPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy *r)
5892 ndr_print_struct(ndr, name, "lsa_OpenPolicy");
5893 ndr->depth++;
5894 if (flags & NDR_SET_VALUES) {
5895 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5897 if (flags & NDR_IN) {
5898 ndr_print_struct(ndr, "in", "lsa_OpenPolicy");
5899 ndr->depth++;
5900 ndr_print_ptr(ndr, "system_name", r->in.system_name);
5901 ndr->depth++;
5902 if (r->in.system_name) {
5903 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
5905 ndr->depth--;
5906 ndr_print_ptr(ndr, "attr", r->in.attr);
5907 ndr->depth++;
5908 ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr);
5909 ndr->depth--;
5910 ndr_print_lsa_PolicyAccessMask(ndr, "access_mask", r->in.access_mask);
5911 ndr->depth--;
5913 if (flags & NDR_OUT) {
5914 ndr_print_struct(ndr, "out", "lsa_OpenPolicy");
5915 ndr->depth++;
5916 ndr_print_ptr(ndr, "handle", r->out.handle);
5917 ndr->depth++;
5918 ndr_print_policy_handle(ndr, "handle", r->out.handle);
5919 ndr->depth--;
5920 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5921 ndr->depth--;
5923 ndr->depth--;
5926 static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy *r)
5928 if (flags & NDR_IN) {
5929 if (r->in.handle == NULL) {
5930 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5932 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5933 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
5935 if (flags & NDR_OUT) {
5936 if (r->out.info == NULL) {
5937 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5939 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
5940 if (*r->out.info) {
5941 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
5942 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
5944 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5946 return NDR_ERR_SUCCESS;
5949 static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy *r)
5951 uint32_t _ptr_info;
5952 TALLOC_CTX *_mem_save_handle_0;
5953 TALLOC_CTX *_mem_save_info_0;
5954 TALLOC_CTX *_mem_save_info_1;
5955 if (flags & NDR_IN) {
5956 ZERO_STRUCT(r->out);
5958 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5959 NDR_PULL_ALLOC(ndr, r->in.handle);
5961 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5962 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5963 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5964 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5965 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
5966 NDR_PULL_ALLOC(ndr, r->out.info);
5967 ZERO_STRUCTP(r->out.info);
5969 if (flags & NDR_OUT) {
5970 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5971 NDR_PULL_ALLOC(ndr, r->out.info);
5973 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5974 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
5975 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5976 if (_ptr_info) {
5977 NDR_PULL_ALLOC(ndr, *r->out.info);
5978 } else {
5979 *r->out.info = NULL;
5981 if (*r->out.info) {
5982 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
5983 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
5984 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
5985 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
5986 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
5988 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
5989 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5991 return NDR_ERR_SUCCESS;
5994 _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy *r)
5996 ndr_print_struct(ndr, name, "lsa_QueryInfoPolicy");
5997 ndr->depth++;
5998 if (flags & NDR_SET_VALUES) {
5999 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6001 if (flags & NDR_IN) {
6002 ndr_print_struct(ndr, "in", "lsa_QueryInfoPolicy");
6003 ndr->depth++;
6004 ndr_print_ptr(ndr, "handle", r->in.handle);
6005 ndr->depth++;
6006 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6007 ndr->depth--;
6008 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
6009 ndr->depth--;
6011 if (flags & NDR_OUT) {
6012 ndr_print_struct(ndr, "out", "lsa_QueryInfoPolicy");
6013 ndr->depth++;
6014 ndr_print_ptr(ndr, "info", r->out.info);
6015 ndr->depth++;
6016 ndr_print_ptr(ndr, "info", *r->out.info);
6017 ndr->depth++;
6018 if (*r->out.info) {
6019 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
6020 ndr_print_lsa_PolicyInformation(ndr, "info", *r->out.info);
6022 ndr->depth--;
6023 ndr->depth--;
6024 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6025 ndr->depth--;
6027 ndr->depth--;
6030 static enum ndr_err_code ndr_push_lsa_SetInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy *r)
6032 if (flags & NDR_IN) {
6033 if (r->in.handle == NULL) {
6034 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6036 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6037 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
6038 if (r->in.info == NULL) {
6039 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6041 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
6042 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6044 if (flags & NDR_OUT) {
6045 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6047 return NDR_ERR_SUCCESS;
6050 static enum ndr_err_code ndr_pull_lsa_SetInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy *r)
6052 TALLOC_CTX *_mem_save_handle_0;
6053 TALLOC_CTX *_mem_save_info_0;
6054 if (flags & NDR_IN) {
6055 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6056 NDR_PULL_ALLOC(ndr, r->in.handle);
6058 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6059 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6060 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6061 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6062 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
6063 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6064 NDR_PULL_ALLOC(ndr, r->in.info);
6066 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6067 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
6068 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
6069 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6070 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6072 if (flags & NDR_OUT) {
6073 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6075 return NDR_ERR_SUCCESS;
6078 _PUBLIC_ void ndr_print_lsa_SetInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy *r)
6080 ndr_print_struct(ndr, name, "lsa_SetInfoPolicy");
6081 ndr->depth++;
6082 if (flags & NDR_SET_VALUES) {
6083 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6085 if (flags & NDR_IN) {
6086 ndr_print_struct(ndr, "in", "lsa_SetInfoPolicy");
6087 ndr->depth++;
6088 ndr_print_ptr(ndr, "handle", r->in.handle);
6089 ndr->depth++;
6090 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6091 ndr->depth--;
6092 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
6093 ndr_print_ptr(ndr, "info", r->in.info);
6094 ndr->depth++;
6095 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
6096 ndr_print_lsa_PolicyInformation(ndr, "info", r->in.info);
6097 ndr->depth--;
6098 ndr->depth--;
6100 if (flags & NDR_OUT) {
6101 ndr_print_struct(ndr, "out", "lsa_SetInfoPolicy");
6102 ndr->depth++;
6103 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6104 ndr->depth--;
6106 ndr->depth--;
6109 static enum ndr_err_code ndr_push_lsa_ClearAuditLog(struct ndr_push *ndr, int flags, const struct lsa_ClearAuditLog *r)
6111 if (flags & NDR_IN) {
6113 if (flags & NDR_OUT) {
6114 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6116 return NDR_ERR_SUCCESS;
6119 static enum ndr_err_code ndr_pull_lsa_ClearAuditLog(struct ndr_pull *ndr, int flags, struct lsa_ClearAuditLog *r)
6121 if (flags & NDR_IN) {
6123 if (flags & NDR_OUT) {
6124 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6126 return NDR_ERR_SUCCESS;
6129 _PUBLIC_ void ndr_print_lsa_ClearAuditLog(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ClearAuditLog *r)
6131 ndr_print_struct(ndr, name, "lsa_ClearAuditLog");
6132 ndr->depth++;
6133 if (flags & NDR_SET_VALUES) {
6134 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6136 if (flags & NDR_IN) {
6137 ndr_print_struct(ndr, "in", "lsa_ClearAuditLog");
6138 ndr->depth++;
6139 ndr->depth--;
6141 if (flags & NDR_OUT) {
6142 ndr_print_struct(ndr, "out", "lsa_ClearAuditLog");
6143 ndr->depth++;
6144 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6145 ndr->depth--;
6147 ndr->depth--;
6150 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struct lsa_CreateAccount *r)
6152 if (flags & NDR_IN) {
6153 if (r->in.handle == NULL) {
6154 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6156 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6157 if (r->in.sid == NULL) {
6158 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6160 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6161 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6163 if (flags & NDR_OUT) {
6164 if (r->out.acct_handle == NULL) {
6165 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6167 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
6168 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6170 return NDR_ERR_SUCCESS;
6173 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r)
6175 TALLOC_CTX *_mem_save_handle_0;
6176 TALLOC_CTX *_mem_save_sid_0;
6177 TALLOC_CTX *_mem_save_acct_handle_0;
6178 if (flags & NDR_IN) {
6179 ZERO_STRUCT(r->out);
6181 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6182 NDR_PULL_ALLOC(ndr, r->in.handle);
6184 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6185 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6186 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6187 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6188 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6189 NDR_PULL_ALLOC(ndr, r->in.sid);
6191 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6192 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
6193 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6194 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
6195 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6196 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
6197 ZERO_STRUCTP(r->out.acct_handle);
6199 if (flags & NDR_OUT) {
6200 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6201 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
6203 _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6204 NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC);
6205 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
6206 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC);
6207 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6209 return NDR_ERR_SUCCESS;
6212 _PUBLIC_ void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateAccount *r)
6214 ndr_print_struct(ndr, name, "lsa_CreateAccount");
6215 ndr->depth++;
6216 if (flags & NDR_SET_VALUES) {
6217 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6219 if (flags & NDR_IN) {
6220 ndr_print_struct(ndr, "in", "lsa_CreateAccount");
6221 ndr->depth++;
6222 ndr_print_ptr(ndr, "handle", r->in.handle);
6223 ndr->depth++;
6224 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6225 ndr->depth--;
6226 ndr_print_ptr(ndr, "sid", r->in.sid);
6227 ndr->depth++;
6228 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
6229 ndr->depth--;
6230 ndr_print_lsa_AccountAccessMask(ndr, "access_mask", r->in.access_mask);
6231 ndr->depth--;
6233 if (flags & NDR_OUT) {
6234 ndr_print_struct(ndr, "out", "lsa_CreateAccount");
6235 ndr->depth++;
6236 ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle);
6237 ndr->depth++;
6238 ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle);
6239 ndr->depth--;
6240 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6241 ndr->depth--;
6243 ndr->depth--;
6246 _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct lsa_EnumAccounts *r)
6248 if (flags & NDR_IN) {
6249 if (r->in.handle == NULL) {
6250 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6252 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6253 if (r->in.resume_handle == NULL) {
6254 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6256 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6257 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_entries));
6259 if (flags & NDR_OUT) {
6260 if (r->out.resume_handle == NULL) {
6261 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6263 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6264 if (r->out.sids == NULL) {
6265 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6267 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6268 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6270 return NDR_ERR_SUCCESS;
6273 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int flags, struct lsa_EnumAccounts *r)
6275 TALLOC_CTX *_mem_save_handle_0;
6276 TALLOC_CTX *_mem_save_resume_handle_0;
6277 TALLOC_CTX *_mem_save_sids_0;
6278 if (flags & NDR_IN) {
6279 ZERO_STRUCT(r->out);
6281 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6282 NDR_PULL_ALLOC(ndr, r->in.handle);
6284 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6285 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6286 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6287 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6288 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6289 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6291 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6292 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6293 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6294 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6295 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_entries));
6296 if (r->in.num_entries > 8192) {
6297 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6299 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6300 *r->out.resume_handle = *r->in.resume_handle;
6301 NDR_PULL_ALLOC(ndr, r->out.sids);
6302 ZERO_STRUCTP(r->out.sids);
6304 if (flags & NDR_OUT) {
6305 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6306 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6308 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6309 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6310 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6311 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6312 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6313 NDR_PULL_ALLOC(ndr, r->out.sids);
6315 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6316 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
6317 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6318 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6319 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6321 return NDR_ERR_SUCCESS;
6324 _PUBLIC_ void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccounts *r)
6326 ndr_print_struct(ndr, name, "lsa_EnumAccounts");
6327 ndr->depth++;
6328 if (flags & NDR_SET_VALUES) {
6329 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6331 if (flags & NDR_IN) {
6332 ndr_print_struct(ndr, "in", "lsa_EnumAccounts");
6333 ndr->depth++;
6334 ndr_print_ptr(ndr, "handle", r->in.handle);
6335 ndr->depth++;
6336 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6337 ndr->depth--;
6338 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6339 ndr->depth++;
6340 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6341 ndr->depth--;
6342 ndr_print_uint32(ndr, "num_entries", r->in.num_entries);
6343 ndr->depth--;
6345 if (flags & NDR_OUT) {
6346 ndr_print_struct(ndr, "out", "lsa_EnumAccounts");
6347 ndr->depth++;
6348 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6349 ndr->depth++;
6350 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6351 ndr->depth--;
6352 ndr_print_ptr(ndr, "sids", r->out.sids);
6353 ndr->depth++;
6354 ndr_print_lsa_SidArray(ndr, "sids", r->out.sids);
6355 ndr->depth--;
6356 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6357 ndr->depth--;
6359 ndr->depth--;
6362 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *r)
6364 if (flags & NDR_IN) {
6365 if (r->in.policy_handle == NULL) {
6366 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6368 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
6369 if (r->in.info == NULL) {
6370 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6372 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6373 NDR_CHECK(ndr_push_lsa_TrustedAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6375 if (flags & NDR_OUT) {
6376 if (r->out.trustdom_handle == NULL) {
6377 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6379 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
6380 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6382 return NDR_ERR_SUCCESS;
6385 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r)
6387 TALLOC_CTX *_mem_save_policy_handle_0;
6388 TALLOC_CTX *_mem_save_info_0;
6389 TALLOC_CTX *_mem_save_trustdom_handle_0;
6390 if (flags & NDR_IN) {
6391 ZERO_STRUCT(r->out);
6393 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6394 NDR_PULL_ALLOC(ndr, r->in.policy_handle);
6396 _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6397 NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
6398 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
6399 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
6400 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6401 NDR_PULL_ALLOC(ndr, r->in.info);
6403 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6404 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
6405 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6406 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6407 NDR_CHECK(ndr_pull_lsa_TrustedAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6408 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
6409 ZERO_STRUCTP(r->out.trustdom_handle);
6411 if (flags & NDR_OUT) {
6412 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6413 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
6415 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6416 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
6417 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
6418 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
6419 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6421 return NDR_ERR_SUCCESS;
6424 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomain *r)
6426 ndr_print_struct(ndr, name, "lsa_CreateTrustedDomain");
6427 ndr->depth++;
6428 if (flags & NDR_SET_VALUES) {
6429 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6431 if (flags & NDR_IN) {
6432 ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomain");
6433 ndr->depth++;
6434 ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
6435 ndr->depth++;
6436 ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
6437 ndr->depth--;
6438 ndr_print_ptr(ndr, "info", r->in.info);
6439 ndr->depth++;
6440 ndr_print_lsa_DomainInfo(ndr, "info", r->in.info);
6441 ndr->depth--;
6442 ndr_print_lsa_TrustedAccessMask(ndr, "access_mask", r->in.access_mask);
6443 ndr->depth--;
6445 if (flags & NDR_OUT) {
6446 ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomain");
6447 ndr->depth++;
6448 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
6449 ndr->depth++;
6450 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
6451 ndr->depth--;
6452 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6453 ndr->depth--;
6455 ndr->depth--;
6458 static enum ndr_err_code ndr_push_lsa_EnumTrustDom(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustDom *r)
6460 if (flags & NDR_IN) {
6461 if (r->in.handle == NULL) {
6462 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6464 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6465 if (r->in.resume_handle == NULL) {
6466 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6468 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6469 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
6471 if (flags & NDR_OUT) {
6472 if (r->out.resume_handle == NULL) {
6473 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6475 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6476 if (r->out.domains == NULL) {
6477 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6479 NDR_CHECK(ndr_push_lsa_DomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
6480 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6482 return NDR_ERR_SUCCESS;
6485 static enum ndr_err_code ndr_pull_lsa_EnumTrustDom(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustDom *r)
6487 TALLOC_CTX *_mem_save_handle_0;
6488 TALLOC_CTX *_mem_save_resume_handle_0;
6489 TALLOC_CTX *_mem_save_domains_0;
6490 if (flags & NDR_IN) {
6491 ZERO_STRUCT(r->out);
6493 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6494 NDR_PULL_ALLOC(ndr, r->in.handle);
6496 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6497 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6498 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6499 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6500 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6501 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6503 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6504 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6505 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6506 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6507 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
6508 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6509 *r->out.resume_handle = *r->in.resume_handle;
6510 NDR_PULL_ALLOC(ndr, r->out.domains);
6511 ZERO_STRUCTP(r->out.domains);
6513 if (flags & NDR_OUT) {
6514 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6515 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6517 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6518 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6519 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6520 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6521 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6522 NDR_PULL_ALLOC(ndr, r->out.domains);
6524 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
6525 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
6526 NDR_CHECK(ndr_pull_lsa_DomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
6527 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
6528 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6530 return NDR_ERR_SUCCESS;
6533 _PUBLIC_ void ndr_print_lsa_EnumTrustDom(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustDom *r)
6535 ndr_print_struct(ndr, name, "lsa_EnumTrustDom");
6536 ndr->depth++;
6537 if (flags & NDR_SET_VALUES) {
6538 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6540 if (flags & NDR_IN) {
6541 ndr_print_struct(ndr, "in", "lsa_EnumTrustDom");
6542 ndr->depth++;
6543 ndr_print_ptr(ndr, "handle", r->in.handle);
6544 ndr->depth++;
6545 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6546 ndr->depth--;
6547 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6548 ndr->depth++;
6549 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6550 ndr->depth--;
6551 ndr_print_uint32(ndr, "max_size", r->in.max_size);
6552 ndr->depth--;
6554 if (flags & NDR_OUT) {
6555 ndr_print_struct(ndr, "out", "lsa_EnumTrustDom");
6556 ndr->depth++;
6557 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6558 ndr->depth++;
6559 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6560 ndr->depth--;
6561 ndr_print_ptr(ndr, "domains", r->out.domains);
6562 ndr->depth++;
6563 ndr_print_lsa_DomainList(ndr, "domains", r->out.domains);
6564 ndr->depth--;
6565 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6566 ndr->depth--;
6568 ndr->depth--;
6571 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct lsa_LookupNames *r)
6573 uint32_t cntr_names_0;
6574 if (flags & NDR_IN) {
6575 if (r->in.handle == NULL) {
6576 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6578 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6579 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
6580 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_names));
6581 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
6582 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
6584 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
6585 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
6587 if (r->in.sids == NULL) {
6588 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6590 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6591 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
6592 if (r->in.count == NULL) {
6593 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6595 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
6597 if (flags & NDR_OUT) {
6598 if (r->out.domains == NULL) {
6599 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6601 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
6602 if (*r->out.domains) {
6603 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6605 if (r->out.sids == NULL) {
6606 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6608 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6609 if (r->out.count == NULL) {
6610 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6612 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
6613 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6615 return NDR_ERR_SUCCESS;
6618 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flags, struct lsa_LookupNames *r)
6620 uint32_t cntr_names_0;
6621 uint32_t _ptr_domains;
6622 TALLOC_CTX *_mem_save_handle_0;
6623 TALLOC_CTX *_mem_save_names_0;
6624 TALLOC_CTX *_mem_save_domains_0;
6625 TALLOC_CTX *_mem_save_domains_1;
6626 TALLOC_CTX *_mem_save_sids_0;
6627 TALLOC_CTX *_mem_save_count_0;
6628 if (flags & NDR_IN) {
6629 ZERO_STRUCT(r->out);
6631 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6632 NDR_PULL_ALLOC(ndr, r->in.handle);
6634 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6635 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6636 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6637 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6638 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
6639 if (r->in.num_names > 1000) {
6640 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6642 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
6643 NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
6644 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
6645 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
6646 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
6647 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
6649 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
6650 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
6652 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
6653 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6654 NDR_PULL_ALLOC(ndr, r->in.sids);
6656 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6657 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
6658 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6659 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6660 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
6661 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6662 NDR_PULL_ALLOC(ndr, r->in.count);
6664 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6665 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
6666 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
6667 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6668 NDR_PULL_ALLOC(ndr, r->out.domains);
6669 ZERO_STRUCTP(r->out.domains);
6670 NDR_PULL_ALLOC(ndr, r->out.sids);
6671 *r->out.sids = *r->in.sids;
6672 NDR_PULL_ALLOC(ndr, r->out.count);
6673 *r->out.count = *r->in.count;
6674 if (r->in.names) {
6675 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
6678 if (flags & NDR_OUT) {
6679 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6680 NDR_PULL_ALLOC(ndr, r->out.domains);
6682 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
6683 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
6684 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
6685 if (_ptr_domains) {
6686 NDR_PULL_ALLOC(ndr, *r->out.domains);
6687 } else {
6688 *r->out.domains = NULL;
6690 if (*r->out.domains) {
6691 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
6692 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
6693 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6694 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
6696 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
6697 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6698 NDR_PULL_ALLOC(ndr, r->out.sids);
6700 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6701 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
6702 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6703 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6704 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6705 NDR_PULL_ALLOC(ndr, r->out.count);
6707 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6708 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
6709 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
6710 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6711 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6713 return NDR_ERR_SUCCESS;
6716 _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames *r)
6718 uint32_t cntr_names_0;
6719 ndr_print_struct(ndr, name, "lsa_LookupNames");
6720 ndr->depth++;
6721 if (flags & NDR_SET_VALUES) {
6722 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6724 if (flags & NDR_IN) {
6725 ndr_print_struct(ndr, "in", "lsa_LookupNames");
6726 ndr->depth++;
6727 ndr_print_ptr(ndr, "handle", r->in.handle);
6728 ndr->depth++;
6729 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6730 ndr->depth--;
6731 ndr_print_uint32(ndr, "num_names", r->in.num_names);
6732 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
6733 ndr->depth++;
6734 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
6735 char *idx_0=NULL;
6736 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
6737 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
6738 free(idx_0);
6741 ndr->depth--;
6742 ndr_print_ptr(ndr, "sids", r->in.sids);
6743 ndr->depth++;
6744 ndr_print_lsa_TransSidArray(ndr, "sids", r->in.sids);
6745 ndr->depth--;
6746 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
6747 ndr_print_ptr(ndr, "count", r->in.count);
6748 ndr->depth++;
6749 ndr_print_uint32(ndr, "count", *r->in.count);
6750 ndr->depth--;
6751 ndr->depth--;
6753 if (flags & NDR_OUT) {
6754 ndr_print_struct(ndr, "out", "lsa_LookupNames");
6755 ndr->depth++;
6756 ndr_print_ptr(ndr, "domains", r->out.domains);
6757 ndr->depth++;
6758 ndr_print_ptr(ndr, "domains", *r->out.domains);
6759 ndr->depth++;
6760 if (*r->out.domains) {
6761 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
6763 ndr->depth--;
6764 ndr->depth--;
6765 ndr_print_ptr(ndr, "sids", r->out.sids);
6766 ndr->depth++;
6767 ndr_print_lsa_TransSidArray(ndr, "sids", r->out.sids);
6768 ndr->depth--;
6769 ndr_print_ptr(ndr, "count", r->out.count);
6770 ndr->depth++;
6771 ndr_print_uint32(ndr, "count", *r->out.count);
6772 ndr->depth--;
6773 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6774 ndr->depth--;
6776 ndr->depth--;
6779 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct lsa_LookupSids *r)
6781 if (flags & NDR_IN) {
6782 if (r->in.handle == NULL) {
6783 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6785 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6786 if (r->in.sids == NULL) {
6787 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6789 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6790 if (r->in.names == NULL) {
6791 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6793 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
6794 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
6795 if (r->in.count == NULL) {
6796 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6798 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
6800 if (flags & NDR_OUT) {
6801 if (r->out.domains == NULL) {
6802 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6804 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
6805 if (*r->out.domains) {
6806 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6808 if (r->out.names == NULL) {
6809 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6811 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
6812 if (r->out.count == NULL) {
6813 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6815 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
6816 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6818 return NDR_ERR_SUCCESS;
6821 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int flags, struct lsa_LookupSids *r)
6823 uint32_t _ptr_domains;
6824 TALLOC_CTX *_mem_save_handle_0;
6825 TALLOC_CTX *_mem_save_sids_0;
6826 TALLOC_CTX *_mem_save_domains_0;
6827 TALLOC_CTX *_mem_save_domains_1;
6828 TALLOC_CTX *_mem_save_names_0;
6829 TALLOC_CTX *_mem_save_count_0;
6830 if (flags & NDR_IN) {
6831 ZERO_STRUCT(r->out);
6833 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6834 NDR_PULL_ALLOC(ndr, r->in.handle);
6836 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6837 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6838 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6839 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6840 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6841 NDR_PULL_ALLOC(ndr, r->in.sids);
6843 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6844 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
6845 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6846 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6847 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6848 NDR_PULL_ALLOC(ndr, r->in.names);
6850 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
6851 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
6852 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
6853 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
6854 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
6855 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6856 NDR_PULL_ALLOC(ndr, r->in.count);
6858 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6859 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
6860 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
6861 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6862 NDR_PULL_ALLOC(ndr, r->out.domains);
6863 ZERO_STRUCTP(r->out.domains);
6864 NDR_PULL_ALLOC(ndr, r->out.names);
6865 *r->out.names = *r->in.names;
6866 NDR_PULL_ALLOC(ndr, r->out.count);
6867 *r->out.count = *r->in.count;
6869 if (flags & NDR_OUT) {
6870 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6871 NDR_PULL_ALLOC(ndr, r->out.domains);
6873 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
6874 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
6875 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
6876 if (_ptr_domains) {
6877 NDR_PULL_ALLOC(ndr, *r->out.domains);
6878 } else {
6879 *r->out.domains = NULL;
6881 if (*r->out.domains) {
6882 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
6883 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
6884 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6885 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
6887 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
6888 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6889 NDR_PULL_ALLOC(ndr, r->out.names);
6891 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
6892 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
6893 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
6894 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
6895 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6896 NDR_PULL_ALLOC(ndr, r->out.count);
6898 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6899 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
6900 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
6901 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6902 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6904 return NDR_ERR_SUCCESS;
6907 _PUBLIC_ void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids *r)
6909 ndr_print_struct(ndr, name, "lsa_LookupSids");
6910 ndr->depth++;
6911 if (flags & NDR_SET_VALUES) {
6912 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6914 if (flags & NDR_IN) {
6915 ndr_print_struct(ndr, "in", "lsa_LookupSids");
6916 ndr->depth++;
6917 ndr_print_ptr(ndr, "handle", r->in.handle);
6918 ndr->depth++;
6919 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6920 ndr->depth--;
6921 ndr_print_ptr(ndr, "sids", r->in.sids);
6922 ndr->depth++;
6923 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
6924 ndr->depth--;
6925 ndr_print_ptr(ndr, "names", r->in.names);
6926 ndr->depth++;
6927 ndr_print_lsa_TransNameArray(ndr, "names", r->in.names);
6928 ndr->depth--;
6929 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
6930 ndr_print_ptr(ndr, "count", r->in.count);
6931 ndr->depth++;
6932 ndr_print_uint32(ndr, "count", *r->in.count);
6933 ndr->depth--;
6934 ndr->depth--;
6936 if (flags & NDR_OUT) {
6937 ndr_print_struct(ndr, "out", "lsa_LookupSids");
6938 ndr->depth++;
6939 ndr_print_ptr(ndr, "domains", r->out.domains);
6940 ndr->depth++;
6941 ndr_print_ptr(ndr, "domains", *r->out.domains);
6942 ndr->depth++;
6943 if (*r->out.domains) {
6944 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
6946 ndr->depth--;
6947 ndr->depth--;
6948 ndr_print_ptr(ndr, "names", r->out.names);
6949 ndr->depth++;
6950 ndr_print_lsa_TransNameArray(ndr, "names", r->out.names);
6951 ndr->depth--;
6952 ndr_print_ptr(ndr, "count", r->out.count);
6953 ndr->depth++;
6954 ndr_print_uint32(ndr, "count", *r->out.count);
6955 ndr->depth--;
6956 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6957 ndr->depth--;
6959 ndr->depth--;
6962 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct lsa_CreateSecret *r)
6964 if (flags & NDR_IN) {
6965 if (r->in.handle == NULL) {
6966 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6968 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6969 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
6970 NDR_CHECK(ndr_push_lsa_SecretAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6972 if (flags & NDR_OUT) {
6973 if (r->out.sec_handle == NULL) {
6974 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6976 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
6977 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6979 return NDR_ERR_SUCCESS;
6982 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int flags, struct lsa_CreateSecret *r)
6984 TALLOC_CTX *_mem_save_handle_0;
6985 TALLOC_CTX *_mem_save_sec_handle_0;
6986 if (flags & NDR_IN) {
6987 ZERO_STRUCT(r->out);
6989 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6990 NDR_PULL_ALLOC(ndr, r->in.handle);
6992 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6993 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6994 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6995 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6996 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
6997 NDR_CHECK(ndr_pull_lsa_SecretAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6998 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
6999 ZERO_STRUCTP(r->out.sec_handle);
7001 if (flags & NDR_OUT) {
7002 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7003 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
7005 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7006 NDR_PULL_SET_MEM_CTX(ndr, r->out.sec_handle, LIBNDR_FLAG_REF_ALLOC);
7007 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
7008 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
7009 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7011 return NDR_ERR_SUCCESS;
7014 _PUBLIC_ void ndr_print_lsa_CreateSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateSecret *r)
7016 ndr_print_struct(ndr, name, "lsa_CreateSecret");
7017 ndr->depth++;
7018 if (flags & NDR_SET_VALUES) {
7019 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7021 if (flags & NDR_IN) {
7022 ndr_print_struct(ndr, "in", "lsa_CreateSecret");
7023 ndr->depth++;
7024 ndr_print_ptr(ndr, "handle", r->in.handle);
7025 ndr->depth++;
7026 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7027 ndr->depth--;
7028 ndr_print_lsa_String(ndr, "name", &r->in.name);
7029 ndr_print_lsa_SecretAccessMask(ndr, "access_mask", r->in.access_mask);
7030 ndr->depth--;
7032 if (flags & NDR_OUT) {
7033 ndr_print_struct(ndr, "out", "lsa_CreateSecret");
7034 ndr->depth++;
7035 ndr_print_ptr(ndr, "sec_handle", r->out.sec_handle);
7036 ndr->depth++;
7037 ndr_print_policy_handle(ndr, "sec_handle", r->out.sec_handle);
7038 ndr->depth--;
7039 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7040 ndr->depth--;
7042 ndr->depth--;
7045 static enum ndr_err_code ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flags, const struct lsa_OpenAccount *r)
7047 if (flags & NDR_IN) {
7048 if (r->in.handle == NULL) {
7049 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7051 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7052 if (r->in.sid == NULL) {
7053 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7055 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
7056 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
7058 if (flags & NDR_OUT) {
7059 if (r->out.acct_handle == NULL) {
7060 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7062 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
7063 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7065 return NDR_ERR_SUCCESS;
7068 static enum ndr_err_code ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flags, struct lsa_OpenAccount *r)
7070 TALLOC_CTX *_mem_save_handle_0;
7071 TALLOC_CTX *_mem_save_sid_0;
7072 TALLOC_CTX *_mem_save_acct_handle_0;
7073 if (flags & NDR_IN) {
7074 ZERO_STRUCT(r->out);
7076 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7077 NDR_PULL_ALLOC(ndr, r->in.handle);
7079 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7080 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7081 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7082 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7083 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7084 NDR_PULL_ALLOC(ndr, r->in.sid);
7086 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
7087 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
7088 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
7089 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
7090 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
7091 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
7092 ZERO_STRUCTP(r->out.acct_handle);
7094 if (flags & NDR_OUT) {
7095 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7096 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
7098 _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7099 NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC);
7100 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
7101 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC);
7102 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7104 return NDR_ERR_SUCCESS;
7107 _PUBLIC_ void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenAccount *r)
7109 ndr_print_struct(ndr, name, "lsa_OpenAccount");
7110 ndr->depth++;
7111 if (flags & NDR_SET_VALUES) {
7112 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7114 if (flags & NDR_IN) {
7115 ndr_print_struct(ndr, "in", "lsa_OpenAccount");
7116 ndr->depth++;
7117 ndr_print_ptr(ndr, "handle", r->in.handle);
7118 ndr->depth++;
7119 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7120 ndr->depth--;
7121 ndr_print_ptr(ndr, "sid", r->in.sid);
7122 ndr->depth++;
7123 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
7124 ndr->depth--;
7125 ndr_print_lsa_AccountAccessMask(ndr, "access_mask", r->in.access_mask);
7126 ndr->depth--;
7128 if (flags & NDR_OUT) {
7129 ndr_print_struct(ndr, "out", "lsa_OpenAccount");
7130 ndr->depth++;
7131 ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle);
7132 ndr->depth++;
7133 ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle);
7134 ndr->depth--;
7135 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7136 ndr->depth--;
7138 ndr->depth--;
7141 static enum ndr_err_code ndr_push_lsa_EnumPrivsAccount(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivsAccount *r)
7143 if (flags & NDR_IN) {
7144 if (r->in.handle == NULL) {
7145 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7147 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7149 if (flags & NDR_OUT) {
7150 if (r->out.privs == NULL) {
7151 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7153 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.privs));
7154 if (*r->out.privs) {
7155 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs));
7157 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7159 return NDR_ERR_SUCCESS;
7162 static enum ndr_err_code ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivsAccount *r)
7164 uint32_t _ptr_privs;
7165 TALLOC_CTX *_mem_save_handle_0;
7166 TALLOC_CTX *_mem_save_privs_0;
7167 TALLOC_CTX *_mem_save_privs_1;
7168 if (flags & NDR_IN) {
7169 ZERO_STRUCT(r->out);
7171 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7172 NDR_PULL_ALLOC(ndr, r->in.handle);
7174 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7175 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7176 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7177 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7178 NDR_PULL_ALLOC(ndr, r->out.privs);
7179 ZERO_STRUCTP(r->out.privs);
7181 if (flags & NDR_OUT) {
7182 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7183 NDR_PULL_ALLOC(ndr, r->out.privs);
7185 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
7186 NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, LIBNDR_FLAG_REF_ALLOC);
7187 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
7188 if (_ptr_privs) {
7189 NDR_PULL_ALLOC(ndr, *r->out.privs);
7190 } else {
7191 *r->out.privs = NULL;
7193 if (*r->out.privs) {
7194 _mem_save_privs_1 = NDR_PULL_GET_MEM_CTX(ndr);
7195 NDR_PULL_SET_MEM_CTX(ndr, *r->out.privs, 0);
7196 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs));
7197 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_1, 0);
7199 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
7200 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7202 return NDR_ERR_SUCCESS;
7205 _PUBLIC_ void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivsAccount *r)
7207 ndr_print_struct(ndr, name, "lsa_EnumPrivsAccount");
7208 ndr->depth++;
7209 if (flags & NDR_SET_VALUES) {
7210 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7212 if (flags & NDR_IN) {
7213 ndr_print_struct(ndr, "in", "lsa_EnumPrivsAccount");
7214 ndr->depth++;
7215 ndr_print_ptr(ndr, "handle", r->in.handle);
7216 ndr->depth++;
7217 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7218 ndr->depth--;
7219 ndr->depth--;
7221 if (flags & NDR_OUT) {
7222 ndr_print_struct(ndr, "out", "lsa_EnumPrivsAccount");
7223 ndr->depth++;
7224 ndr_print_ptr(ndr, "privs", r->out.privs);
7225 ndr->depth++;
7226 ndr_print_ptr(ndr, "privs", *r->out.privs);
7227 ndr->depth++;
7228 if (*r->out.privs) {
7229 ndr_print_lsa_PrivilegeSet(ndr, "privs", *r->out.privs);
7231 ndr->depth--;
7232 ndr->depth--;
7233 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7234 ndr->depth--;
7236 ndr->depth--;
7239 static enum ndr_err_code ndr_push_lsa_AddPrivilegesToAccount(struct ndr_push *ndr, int flags, const struct lsa_AddPrivilegesToAccount *r)
7241 if (flags & NDR_IN) {
7242 if (r->in.handle == NULL) {
7243 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7245 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7246 if (r->in.privs == NULL) {
7247 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7249 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7251 if (flags & NDR_OUT) {
7252 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7254 return NDR_ERR_SUCCESS;
7257 static enum ndr_err_code ndr_pull_lsa_AddPrivilegesToAccount(struct ndr_pull *ndr, int flags, struct lsa_AddPrivilegesToAccount *r)
7259 TALLOC_CTX *_mem_save_handle_0;
7260 TALLOC_CTX *_mem_save_privs_0;
7261 if (flags & NDR_IN) {
7262 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7263 NDR_PULL_ALLOC(ndr, r->in.handle);
7265 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7266 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7267 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7268 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7269 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7270 NDR_PULL_ALLOC(ndr, r->in.privs);
7272 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
7273 NDR_PULL_SET_MEM_CTX(ndr, r->in.privs, LIBNDR_FLAG_REF_ALLOC);
7274 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7275 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
7277 if (flags & NDR_OUT) {
7278 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7280 return NDR_ERR_SUCCESS;
7283 _PUBLIC_ void ndr_print_lsa_AddPrivilegesToAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddPrivilegesToAccount *r)
7285 ndr_print_struct(ndr, name, "lsa_AddPrivilegesToAccount");
7286 ndr->depth++;
7287 if (flags & NDR_SET_VALUES) {
7288 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7290 if (flags & NDR_IN) {
7291 ndr_print_struct(ndr, "in", "lsa_AddPrivilegesToAccount");
7292 ndr->depth++;
7293 ndr_print_ptr(ndr, "handle", r->in.handle);
7294 ndr->depth++;
7295 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7296 ndr->depth--;
7297 ndr_print_ptr(ndr, "privs", r->in.privs);
7298 ndr->depth++;
7299 ndr_print_lsa_PrivilegeSet(ndr, "privs", r->in.privs);
7300 ndr->depth--;
7301 ndr->depth--;
7303 if (flags & NDR_OUT) {
7304 ndr_print_struct(ndr, "out", "lsa_AddPrivilegesToAccount");
7305 ndr->depth++;
7306 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7307 ndr->depth--;
7309 ndr->depth--;
7312 static enum ndr_err_code ndr_push_lsa_RemovePrivilegesFromAccount(struct ndr_push *ndr, int flags, const struct lsa_RemovePrivilegesFromAccount *r)
7314 if (flags & NDR_IN) {
7315 if (r->in.handle == NULL) {
7316 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7318 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7319 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.remove_all));
7320 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.privs));
7321 if (r->in.privs) {
7322 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7325 if (flags & NDR_OUT) {
7326 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7328 return NDR_ERR_SUCCESS;
7331 static enum ndr_err_code ndr_pull_lsa_RemovePrivilegesFromAccount(struct ndr_pull *ndr, int flags, struct lsa_RemovePrivilegesFromAccount *r)
7333 uint32_t _ptr_privs;
7334 TALLOC_CTX *_mem_save_handle_0;
7335 TALLOC_CTX *_mem_save_privs_0;
7336 if (flags & NDR_IN) {
7337 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7338 NDR_PULL_ALLOC(ndr, r->in.handle);
7340 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7341 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7342 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7343 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7344 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.remove_all));
7345 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
7346 if (_ptr_privs) {
7347 NDR_PULL_ALLOC(ndr, r->in.privs);
7348 } else {
7349 r->in.privs = NULL;
7351 if (r->in.privs) {
7352 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
7353 NDR_PULL_SET_MEM_CTX(ndr, r->in.privs, 0);
7354 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7355 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0);
7358 if (flags & NDR_OUT) {
7359 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7361 return NDR_ERR_SUCCESS;
7364 _PUBLIC_ void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemovePrivilegesFromAccount *r)
7366 ndr_print_struct(ndr, name, "lsa_RemovePrivilegesFromAccount");
7367 ndr->depth++;
7368 if (flags & NDR_SET_VALUES) {
7369 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7371 if (flags & NDR_IN) {
7372 ndr_print_struct(ndr, "in", "lsa_RemovePrivilegesFromAccount");
7373 ndr->depth++;
7374 ndr_print_ptr(ndr, "handle", r->in.handle);
7375 ndr->depth++;
7376 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7377 ndr->depth--;
7378 ndr_print_uint8(ndr, "remove_all", r->in.remove_all);
7379 ndr_print_ptr(ndr, "privs", r->in.privs);
7380 ndr->depth++;
7381 if (r->in.privs) {
7382 ndr_print_lsa_PrivilegeSet(ndr, "privs", r->in.privs);
7384 ndr->depth--;
7385 ndr->depth--;
7387 if (flags & NDR_OUT) {
7388 ndr_print_struct(ndr, "out", "lsa_RemovePrivilegesFromAccount");
7389 ndr->depth++;
7390 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7391 ndr->depth--;
7393 ndr->depth--;
7396 static enum ndr_err_code ndr_push_lsa_GetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_GetQuotasForAccount *r)
7398 if (flags & NDR_IN) {
7400 if (flags & NDR_OUT) {
7401 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7403 return NDR_ERR_SUCCESS;
7406 static enum ndr_err_code ndr_pull_lsa_GetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_GetQuotasForAccount *r)
7408 if (flags & NDR_IN) {
7410 if (flags & NDR_OUT) {
7411 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7413 return NDR_ERR_SUCCESS;
7416 _PUBLIC_ void ndr_print_lsa_GetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetQuotasForAccount *r)
7418 ndr_print_struct(ndr, name, "lsa_GetQuotasForAccount");
7419 ndr->depth++;
7420 if (flags & NDR_SET_VALUES) {
7421 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7423 if (flags & NDR_IN) {
7424 ndr_print_struct(ndr, "in", "lsa_GetQuotasForAccount");
7425 ndr->depth++;
7426 ndr->depth--;
7428 if (flags & NDR_OUT) {
7429 ndr_print_struct(ndr, "out", "lsa_GetQuotasForAccount");
7430 ndr->depth++;
7431 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7432 ndr->depth--;
7434 ndr->depth--;
7437 static enum ndr_err_code ndr_push_lsa_SetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_SetQuotasForAccount *r)
7439 if (flags & NDR_IN) {
7441 if (flags & NDR_OUT) {
7442 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7444 return NDR_ERR_SUCCESS;
7447 static enum ndr_err_code ndr_pull_lsa_SetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_SetQuotasForAccount *r)
7449 if (flags & NDR_IN) {
7451 if (flags & NDR_OUT) {
7452 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7454 return NDR_ERR_SUCCESS;
7457 _PUBLIC_ void ndr_print_lsa_SetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetQuotasForAccount *r)
7459 ndr_print_struct(ndr, name, "lsa_SetQuotasForAccount");
7460 ndr->depth++;
7461 if (flags & NDR_SET_VALUES) {
7462 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7464 if (flags & NDR_IN) {
7465 ndr_print_struct(ndr, "in", "lsa_SetQuotasForAccount");
7466 ndr->depth++;
7467 ndr->depth--;
7469 if (flags & NDR_OUT) {
7470 ndr_print_struct(ndr, "out", "lsa_SetQuotasForAccount");
7471 ndr->depth++;
7472 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7473 ndr->depth--;
7475 ndr->depth--;
7478 static enum ndr_err_code ndr_push_lsa_GetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_GetSystemAccessAccount *r)
7480 if (flags & NDR_IN) {
7481 if (r->in.handle == NULL) {
7482 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7484 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7486 if (flags & NDR_OUT) {
7487 if (r->out.access_mask == NULL) {
7488 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7490 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr, NDR_SCALARS, *r->out.access_mask));
7491 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7493 return NDR_ERR_SUCCESS;
7496 static enum ndr_err_code ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_GetSystemAccessAccount *r)
7498 TALLOC_CTX *_mem_save_handle_0;
7499 TALLOC_CTX *_mem_save_access_mask_0;
7500 if (flags & NDR_IN) {
7501 ZERO_STRUCT(r->out);
7503 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7504 NDR_PULL_ALLOC(ndr, r->in.handle);
7506 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7507 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7508 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7509 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7510 NDR_PULL_ALLOC(ndr, r->out.access_mask);
7511 ZERO_STRUCTP(r->out.access_mask);
7513 if (flags & NDR_OUT) {
7514 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7515 NDR_PULL_ALLOC(ndr, r->out.access_mask);
7517 _mem_save_access_mask_0 = NDR_PULL_GET_MEM_CTX(ndr);
7518 NDR_PULL_SET_MEM_CTX(ndr, r->out.access_mask, LIBNDR_FLAG_REF_ALLOC);
7519 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr, NDR_SCALARS, r->out.access_mask));
7520 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_access_mask_0, LIBNDR_FLAG_REF_ALLOC);
7521 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7523 return NDR_ERR_SUCCESS;
7526 _PUBLIC_ void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetSystemAccessAccount *r)
7528 ndr_print_struct(ndr, name, "lsa_GetSystemAccessAccount");
7529 ndr->depth++;
7530 if (flags & NDR_SET_VALUES) {
7531 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7533 if (flags & NDR_IN) {
7534 ndr_print_struct(ndr, "in", "lsa_GetSystemAccessAccount");
7535 ndr->depth++;
7536 ndr_print_ptr(ndr, "handle", r->in.handle);
7537 ndr->depth++;
7538 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7539 ndr->depth--;
7540 ndr->depth--;
7542 if (flags & NDR_OUT) {
7543 ndr_print_struct(ndr, "out", "lsa_GetSystemAccessAccount");
7544 ndr->depth++;
7545 ndr_print_ptr(ndr, "access_mask", r->out.access_mask);
7546 ndr->depth++;
7547 ndr_print_lsa_AccountAccessMask(ndr, "access_mask", *r->out.access_mask);
7548 ndr->depth--;
7549 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7550 ndr->depth--;
7552 ndr->depth--;
7555 static enum ndr_err_code ndr_push_lsa_SetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_SetSystemAccessAccount *r)
7557 if (flags & NDR_IN) {
7558 if (r->in.handle == NULL) {
7559 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7561 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7562 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
7564 if (flags & NDR_OUT) {
7565 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7567 return NDR_ERR_SUCCESS;
7570 static enum ndr_err_code ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_SetSystemAccessAccount *r)
7572 TALLOC_CTX *_mem_save_handle_0;
7573 if (flags & NDR_IN) {
7574 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7575 NDR_PULL_ALLOC(ndr, r->in.handle);
7577 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7578 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7579 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7580 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7581 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
7583 if (flags & NDR_OUT) {
7584 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7586 return NDR_ERR_SUCCESS;
7589 _PUBLIC_ void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSystemAccessAccount *r)
7591 ndr_print_struct(ndr, name, "lsa_SetSystemAccessAccount");
7592 ndr->depth++;
7593 if (flags & NDR_SET_VALUES) {
7594 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7596 if (flags & NDR_IN) {
7597 ndr_print_struct(ndr, "in", "lsa_SetSystemAccessAccount");
7598 ndr->depth++;
7599 ndr_print_ptr(ndr, "handle", r->in.handle);
7600 ndr->depth++;
7601 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7602 ndr->depth--;
7603 ndr_print_lsa_AccountAccessMask(ndr, "access_mask", r->in.access_mask);
7604 ndr->depth--;
7606 if (flags & NDR_OUT) {
7607 ndr_print_struct(ndr, "out", "lsa_SetSystemAccessAccount");
7608 ndr->depth++;
7609 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7610 ndr->depth--;
7612 ndr->depth--;
7615 static enum ndr_err_code ndr_push_lsa_OpenTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomain *r)
7617 if (flags & NDR_IN) {
7618 if (r->in.handle == NULL) {
7619 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7621 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7622 if (r->in.sid == NULL) {
7623 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7625 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
7626 NDR_CHECK(ndr_push_lsa_TrustedAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
7628 if (flags & NDR_OUT) {
7629 if (r->out.trustdom_handle == NULL) {
7630 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7632 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
7633 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7635 return NDR_ERR_SUCCESS;
7638 static enum ndr_err_code ndr_pull_lsa_OpenTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomain *r)
7640 TALLOC_CTX *_mem_save_handle_0;
7641 TALLOC_CTX *_mem_save_sid_0;
7642 TALLOC_CTX *_mem_save_trustdom_handle_0;
7643 if (flags & NDR_IN) {
7644 ZERO_STRUCT(r->out);
7646 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7647 NDR_PULL_ALLOC(ndr, r->in.handle);
7649 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7650 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7651 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7652 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7653 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7654 NDR_PULL_ALLOC(ndr, r->in.sid);
7656 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
7657 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
7658 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
7659 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
7660 NDR_CHECK(ndr_pull_lsa_TrustedAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
7661 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
7662 ZERO_STRUCTP(r->out.trustdom_handle);
7664 if (flags & NDR_OUT) {
7665 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7666 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
7668 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7669 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
7670 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
7671 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
7672 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7674 return NDR_ERR_SUCCESS;
7677 _PUBLIC_ void ndr_print_lsa_OpenTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomain *r)
7679 ndr_print_struct(ndr, name, "lsa_OpenTrustedDomain");
7680 ndr->depth++;
7681 if (flags & NDR_SET_VALUES) {
7682 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7684 if (flags & NDR_IN) {
7685 ndr_print_struct(ndr, "in", "lsa_OpenTrustedDomain");
7686 ndr->depth++;
7687 ndr_print_ptr(ndr, "handle", r->in.handle);
7688 ndr->depth++;
7689 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7690 ndr->depth--;
7691 ndr_print_ptr(ndr, "sid", r->in.sid);
7692 ndr->depth++;
7693 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
7694 ndr->depth--;
7695 ndr_print_lsa_TrustedAccessMask(ndr, "access_mask", r->in.access_mask);
7696 ndr->depth--;
7698 if (flags & NDR_OUT) {
7699 ndr_print_struct(ndr, "out", "lsa_OpenTrustedDomain");
7700 ndr->depth++;
7701 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
7702 ndr->depth++;
7703 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
7704 ndr->depth--;
7705 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7706 ndr->depth--;
7708 ndr->depth--;
7711 static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfo *r)
7713 if (flags & NDR_IN) {
7714 if (r->in.trustdom_handle == NULL) {
7715 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7717 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7718 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
7720 if (flags & NDR_OUT) {
7721 if (r->out.info == NULL) {
7722 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7724 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
7725 if (*r->out.info) {
7726 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
7727 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
7729 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7731 return NDR_ERR_SUCCESS;
7734 static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfo *r)
7736 uint32_t _ptr_info;
7737 TALLOC_CTX *_mem_save_trustdom_handle_0;
7738 TALLOC_CTX *_mem_save_info_0;
7739 TALLOC_CTX *_mem_save_info_1;
7740 if (flags & NDR_IN) {
7741 ZERO_STRUCT(r->out);
7743 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7744 NDR_PULL_ALLOC(ndr, r->in.trustdom_handle);
7746 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7747 NDR_PULL_SET_MEM_CTX(ndr, r->in.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
7748 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7749 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
7750 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
7751 NDR_PULL_ALLOC(ndr, r->out.info);
7752 ZERO_STRUCTP(r->out.info);
7754 if (flags & NDR_OUT) {
7755 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7756 NDR_PULL_ALLOC(ndr, r->out.info);
7758 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7759 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
7760 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
7761 if (_ptr_info) {
7762 NDR_PULL_ALLOC(ndr, *r->out.info);
7763 } else {
7764 *r->out.info = NULL;
7766 if (*r->out.info) {
7767 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
7768 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
7769 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
7770 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
7771 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
7773 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7774 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7776 return NDR_ERR_SUCCESS;
7779 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfo *r)
7781 ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfo");
7782 ndr->depth++;
7783 if (flags & NDR_SET_VALUES) {
7784 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7786 if (flags & NDR_IN) {
7787 ndr_print_struct(ndr, "in", "lsa_QueryTrustedDomainInfo");
7788 ndr->depth++;
7789 ndr_print_ptr(ndr, "trustdom_handle", r->in.trustdom_handle);
7790 ndr->depth++;
7791 ndr_print_policy_handle(ndr, "trustdom_handle", r->in.trustdom_handle);
7792 ndr->depth--;
7793 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
7794 ndr->depth--;
7796 if (flags & NDR_OUT) {
7797 ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfo");
7798 ndr->depth++;
7799 ndr_print_ptr(ndr, "info", r->out.info);
7800 ndr->depth++;
7801 ndr_print_ptr(ndr, "info", *r->out.info);
7802 ndr->depth++;
7803 if (*r->out.info) {
7804 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
7805 ndr_print_lsa_TrustedDomainInfo(ndr, "info", *r->out.info);
7807 ndr->depth--;
7808 ndr->depth--;
7809 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7810 ndr->depth--;
7812 ndr->depth--;
7815 static enum ndr_err_code ndr_push_lsa_SetInformationTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_SetInformationTrustedDomain *r)
7817 if (flags & NDR_IN) {
7818 if (r->in.trustdom_handle == NULL) {
7819 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7821 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7822 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
7823 if (r->in.info == NULL) {
7824 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7826 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
7827 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7829 if (flags & NDR_OUT) {
7830 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7832 return NDR_ERR_SUCCESS;
7835 static enum ndr_err_code ndr_pull_lsa_SetInformationTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_SetInformationTrustedDomain *r)
7837 TALLOC_CTX *_mem_save_trustdom_handle_0;
7838 TALLOC_CTX *_mem_save_info_0;
7839 if (flags & NDR_IN) {
7840 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7841 NDR_PULL_ALLOC(ndr, r->in.trustdom_handle);
7843 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7844 NDR_PULL_SET_MEM_CTX(ndr, r->in.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
7845 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7846 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
7847 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
7848 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7849 NDR_PULL_ALLOC(ndr, r->in.info);
7851 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7852 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
7853 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
7854 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7855 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7857 if (flags & NDR_OUT) {
7858 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7860 return NDR_ERR_SUCCESS;
7863 _PUBLIC_ void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInformationTrustedDomain *r)
7865 ndr_print_struct(ndr, name, "lsa_SetInformationTrustedDomain");
7866 ndr->depth++;
7867 if (flags & NDR_SET_VALUES) {
7868 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7870 if (flags & NDR_IN) {
7871 ndr_print_struct(ndr, "in", "lsa_SetInformationTrustedDomain");
7872 ndr->depth++;
7873 ndr_print_ptr(ndr, "trustdom_handle", r->in.trustdom_handle);
7874 ndr->depth++;
7875 ndr_print_policy_handle(ndr, "trustdom_handle", r->in.trustdom_handle);
7876 ndr->depth--;
7877 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
7878 ndr_print_ptr(ndr, "info", r->in.info);
7879 ndr->depth++;
7880 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
7881 ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
7882 ndr->depth--;
7883 ndr->depth--;
7885 if (flags & NDR_OUT) {
7886 ndr_print_struct(ndr, "out", "lsa_SetInformationTrustedDomain");
7887 ndr->depth++;
7888 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7889 ndr->depth--;
7891 ndr->depth--;
7894 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags, const struct lsa_OpenSecret *r)
7896 if (flags & NDR_IN) {
7897 if (r->in.handle == NULL) {
7898 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7900 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7901 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
7902 NDR_CHECK(ndr_push_lsa_SecretAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
7904 if (flags & NDR_OUT) {
7905 if (r->out.sec_handle == NULL) {
7906 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7908 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
7909 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7911 return NDR_ERR_SUCCESS;
7914 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenSecret(struct ndr_pull *ndr, int flags, struct lsa_OpenSecret *r)
7916 TALLOC_CTX *_mem_save_handle_0;
7917 TALLOC_CTX *_mem_save_sec_handle_0;
7918 if (flags & NDR_IN) {
7919 ZERO_STRUCT(r->out);
7921 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7922 NDR_PULL_ALLOC(ndr, r->in.handle);
7924 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7925 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7926 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7927 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7928 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
7929 NDR_CHECK(ndr_pull_lsa_SecretAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
7930 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
7931 ZERO_STRUCTP(r->out.sec_handle);
7933 if (flags & NDR_OUT) {
7934 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7935 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
7937 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7938 NDR_PULL_SET_MEM_CTX(ndr, r->out.sec_handle, LIBNDR_FLAG_REF_ALLOC);
7939 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
7940 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
7941 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7943 return NDR_ERR_SUCCESS;
7946 _PUBLIC_ void ndr_print_lsa_OpenSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenSecret *r)
7948 ndr_print_struct(ndr, name, "lsa_OpenSecret");
7949 ndr->depth++;
7950 if (flags & NDR_SET_VALUES) {
7951 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7953 if (flags & NDR_IN) {
7954 ndr_print_struct(ndr, "in", "lsa_OpenSecret");
7955 ndr->depth++;
7956 ndr_print_ptr(ndr, "handle", r->in.handle);
7957 ndr->depth++;
7958 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7959 ndr->depth--;
7960 ndr_print_lsa_String(ndr, "name", &r->in.name);
7961 ndr_print_lsa_SecretAccessMask(ndr, "access_mask", r->in.access_mask);
7962 ndr->depth--;
7964 if (flags & NDR_OUT) {
7965 ndr_print_struct(ndr, "out", "lsa_OpenSecret");
7966 ndr->depth++;
7967 ndr_print_ptr(ndr, "sec_handle", r->out.sec_handle);
7968 ndr->depth++;
7969 ndr_print_policy_handle(ndr, "sec_handle", r->out.sec_handle);
7970 ndr->depth--;
7971 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7972 ndr->depth--;
7974 ndr->depth--;
7977 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, const struct lsa_SetSecret *r)
7979 if (flags & NDR_IN) {
7980 if (r->in.sec_handle == NULL) {
7981 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7983 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
7984 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_val));
7985 if (r->in.new_val) {
7986 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
7988 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_val));
7989 if (r->in.old_val) {
7990 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
7993 if (flags & NDR_OUT) {
7994 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7996 return NDR_ERR_SUCCESS;
7999 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SetSecret(struct ndr_pull *ndr, int flags, struct lsa_SetSecret *r)
8001 uint32_t _ptr_new_val;
8002 uint32_t _ptr_old_val;
8003 TALLOC_CTX *_mem_save_sec_handle_0;
8004 TALLOC_CTX *_mem_save_new_val_0;
8005 TALLOC_CTX *_mem_save_old_val_0;
8006 if (flags & NDR_IN) {
8007 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8008 NDR_PULL_ALLOC(ndr, r->in.sec_handle);
8010 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8011 NDR_PULL_SET_MEM_CTX(ndr, r->in.sec_handle, LIBNDR_FLAG_REF_ALLOC);
8012 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
8013 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
8014 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val));
8015 if (_ptr_new_val) {
8016 NDR_PULL_ALLOC(ndr, r->in.new_val);
8017 } else {
8018 r->in.new_val = NULL;
8020 if (r->in.new_val) {
8021 _mem_save_new_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
8022 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_val, 0);
8023 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
8024 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_val_0, 0);
8026 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
8027 if (_ptr_old_val) {
8028 NDR_PULL_ALLOC(ndr, r->in.old_val);
8029 } else {
8030 r->in.old_val = NULL;
8032 if (r->in.old_val) {
8033 _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
8034 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_val, 0);
8035 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
8036 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
8039 if (flags & NDR_OUT) {
8040 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8042 return NDR_ERR_SUCCESS;
8045 _PUBLIC_ void ndr_print_lsa_SetSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecret *r)
8047 ndr_print_struct(ndr, name, "lsa_SetSecret");
8048 ndr->depth++;
8049 if (flags & NDR_SET_VALUES) {
8050 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8052 if (flags & NDR_IN) {
8053 ndr_print_struct(ndr, "in", "lsa_SetSecret");
8054 ndr->depth++;
8055 ndr_print_ptr(ndr, "sec_handle", r->in.sec_handle);
8056 ndr->depth++;
8057 ndr_print_policy_handle(ndr, "sec_handle", r->in.sec_handle);
8058 ndr->depth--;
8059 ndr_print_ptr(ndr, "new_val", r->in.new_val);
8060 ndr->depth++;
8061 if (r->in.new_val) {
8062 ndr_print_lsa_DATA_BUF(ndr, "new_val", r->in.new_val);
8064 ndr->depth--;
8065 ndr_print_ptr(ndr, "old_val", r->in.old_val);
8066 ndr->depth++;
8067 if (r->in.old_val) {
8068 ndr_print_lsa_DATA_BUF(ndr, "old_val", r->in.old_val);
8070 ndr->depth--;
8071 ndr->depth--;
8073 if (flags & NDR_OUT) {
8074 ndr_print_struct(ndr, "out", "lsa_SetSecret");
8075 ndr->depth++;
8076 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8077 ndr->depth--;
8079 ndr->depth--;
8082 _PUBLIC_ enum ndr_err_code ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flags, const struct lsa_QuerySecret *r)
8084 if (flags & NDR_IN) {
8085 if (r->in.sec_handle == NULL) {
8086 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8088 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
8089 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_val));
8090 if (r->in.new_val) {
8091 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
8093 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_mtime));
8094 if (r->in.new_mtime) {
8095 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->in.new_mtime));
8097 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_val));
8098 if (r->in.old_val) {
8099 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
8101 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_mtime));
8102 if (r->in.old_mtime) {
8103 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->in.old_mtime));
8106 if (flags & NDR_OUT) {
8107 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.new_val));
8108 if (r->out.new_val) {
8109 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_val));
8111 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.new_mtime));
8112 if (r->out.new_mtime) {
8113 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->out.new_mtime));
8115 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.old_val));
8116 if (r->out.old_val) {
8117 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.old_val));
8119 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.old_mtime));
8120 if (r->out.old_mtime) {
8121 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->out.old_mtime));
8123 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8125 return NDR_ERR_SUCCESS;
8128 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_QuerySecret(struct ndr_pull *ndr, int flags, struct lsa_QuerySecret *r)
8130 uint32_t _ptr_new_val;
8131 uint32_t _ptr_new_mtime;
8132 uint32_t _ptr_old_val;
8133 uint32_t _ptr_old_mtime;
8134 TALLOC_CTX *_mem_save_sec_handle_0;
8135 TALLOC_CTX *_mem_save_new_val_0;
8136 TALLOC_CTX *_mem_save_new_mtime_0;
8137 TALLOC_CTX *_mem_save_old_val_0;
8138 TALLOC_CTX *_mem_save_old_mtime_0;
8139 if (flags & NDR_IN) {
8140 ZERO_STRUCT(r->out);
8142 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8143 NDR_PULL_ALLOC(ndr, r->in.sec_handle);
8145 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8146 NDR_PULL_SET_MEM_CTX(ndr, r->in.sec_handle, LIBNDR_FLAG_REF_ALLOC);
8147 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
8148 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
8149 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val));
8150 if (_ptr_new_val) {
8151 NDR_PULL_ALLOC(ndr, r->in.new_val);
8152 } else {
8153 r->in.new_val = NULL;
8155 if (r->in.new_val) {
8156 _mem_save_new_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
8157 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_val, 0);
8158 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
8159 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_val_0, 0);
8161 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_mtime));
8162 if (_ptr_new_mtime) {
8163 NDR_PULL_ALLOC(ndr, r->in.new_mtime);
8164 } else {
8165 r->in.new_mtime = NULL;
8167 if (r->in.new_mtime) {
8168 _mem_save_new_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
8169 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_mtime, 0);
8170 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->in.new_mtime));
8171 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_mtime_0, 0);
8173 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
8174 if (_ptr_old_val) {
8175 NDR_PULL_ALLOC(ndr, r->in.old_val);
8176 } else {
8177 r->in.old_val = NULL;
8179 if (r->in.old_val) {
8180 _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
8181 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_val, 0);
8182 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
8183 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
8185 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_mtime));
8186 if (_ptr_old_mtime) {
8187 NDR_PULL_ALLOC(ndr, r->in.old_mtime);
8188 } else {
8189 r->in.old_mtime = NULL;
8191 if (r->in.old_mtime) {
8192 _mem_save_old_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
8193 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_mtime, 0);
8194 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->in.old_mtime));
8195 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_mtime_0, 0);
8198 if (flags & NDR_OUT) {
8199 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val));
8200 if (_ptr_new_val) {
8201 NDR_PULL_ALLOC(ndr, r->out.new_val);
8202 } else {
8203 r->out.new_val = NULL;
8205 if (r->out.new_val) {
8206 _mem_save_new_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
8207 NDR_PULL_SET_MEM_CTX(ndr, r->out.new_val, 0);
8208 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_val));
8209 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_val_0, 0);
8211 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_mtime));
8212 if (_ptr_new_mtime) {
8213 NDR_PULL_ALLOC(ndr, r->out.new_mtime);
8214 } else {
8215 r->out.new_mtime = NULL;
8217 if (r->out.new_mtime) {
8218 _mem_save_new_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
8219 NDR_PULL_SET_MEM_CTX(ndr, r->out.new_mtime, 0);
8220 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->out.new_mtime));
8221 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_mtime_0, 0);
8223 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
8224 if (_ptr_old_val) {
8225 NDR_PULL_ALLOC(ndr, r->out.old_val);
8226 } else {
8227 r->out.old_val = NULL;
8229 if (r->out.old_val) {
8230 _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
8231 NDR_PULL_SET_MEM_CTX(ndr, r->out.old_val, 0);
8232 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.old_val));
8233 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
8235 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_mtime));
8236 if (_ptr_old_mtime) {
8237 NDR_PULL_ALLOC(ndr, r->out.old_mtime);
8238 } else {
8239 r->out.old_mtime = NULL;
8241 if (r->out.old_mtime) {
8242 _mem_save_old_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
8243 NDR_PULL_SET_MEM_CTX(ndr, r->out.old_mtime, 0);
8244 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->out.old_mtime));
8245 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_mtime_0, 0);
8247 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8249 return NDR_ERR_SUCCESS;
8252 _PUBLIC_ void ndr_print_lsa_QuerySecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecret *r)
8254 ndr_print_struct(ndr, name, "lsa_QuerySecret");
8255 ndr->depth++;
8256 if (flags & NDR_SET_VALUES) {
8257 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8259 if (flags & NDR_IN) {
8260 ndr_print_struct(ndr, "in", "lsa_QuerySecret");
8261 ndr->depth++;
8262 ndr_print_ptr(ndr, "sec_handle", r->in.sec_handle);
8263 ndr->depth++;
8264 ndr_print_policy_handle(ndr, "sec_handle", r->in.sec_handle);
8265 ndr->depth--;
8266 ndr_print_ptr(ndr, "new_val", r->in.new_val);
8267 ndr->depth++;
8268 if (r->in.new_val) {
8269 ndr_print_lsa_DATA_BUF_PTR(ndr, "new_val", r->in.new_val);
8271 ndr->depth--;
8272 ndr_print_ptr(ndr, "new_mtime", r->in.new_mtime);
8273 ndr->depth++;
8274 if (r->in.new_mtime) {
8275 ndr_print_NTTIME_hyper(ndr, "new_mtime", *r->in.new_mtime);
8277 ndr->depth--;
8278 ndr_print_ptr(ndr, "old_val", r->in.old_val);
8279 ndr->depth++;
8280 if (r->in.old_val) {
8281 ndr_print_lsa_DATA_BUF_PTR(ndr, "old_val", r->in.old_val);
8283 ndr->depth--;
8284 ndr_print_ptr(ndr, "old_mtime", r->in.old_mtime);
8285 ndr->depth++;
8286 if (r->in.old_mtime) {
8287 ndr_print_NTTIME_hyper(ndr, "old_mtime", *r->in.old_mtime);
8289 ndr->depth--;
8290 ndr->depth--;
8292 if (flags & NDR_OUT) {
8293 ndr_print_struct(ndr, "out", "lsa_QuerySecret");
8294 ndr->depth++;
8295 ndr_print_ptr(ndr, "new_val", r->out.new_val);
8296 ndr->depth++;
8297 if (r->out.new_val) {
8298 ndr_print_lsa_DATA_BUF_PTR(ndr, "new_val", r->out.new_val);
8300 ndr->depth--;
8301 ndr_print_ptr(ndr, "new_mtime", r->out.new_mtime);
8302 ndr->depth++;
8303 if (r->out.new_mtime) {
8304 ndr_print_NTTIME_hyper(ndr, "new_mtime", *r->out.new_mtime);
8306 ndr->depth--;
8307 ndr_print_ptr(ndr, "old_val", r->out.old_val);
8308 ndr->depth++;
8309 if (r->out.old_val) {
8310 ndr_print_lsa_DATA_BUF_PTR(ndr, "old_val", r->out.old_val);
8312 ndr->depth--;
8313 ndr_print_ptr(ndr, "old_mtime", r->out.old_mtime);
8314 ndr->depth++;
8315 if (r->out.old_mtime) {
8316 ndr_print_NTTIME_hyper(ndr, "old_mtime", *r->out.old_mtime);
8318 ndr->depth--;
8319 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8320 ndr->depth--;
8322 ndr->depth--;
8325 static enum ndr_err_code ndr_push_lsa_LookupPrivValue(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivValue *r)
8327 if (flags & NDR_IN) {
8328 if (r->in.handle == NULL) {
8329 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8331 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8332 if (r->in.name == NULL) {
8333 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8335 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8337 if (flags & NDR_OUT) {
8338 if (r->out.luid == NULL) {
8339 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8341 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, r->out.luid));
8342 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8344 return NDR_ERR_SUCCESS;
8347 static enum ndr_err_code ndr_pull_lsa_LookupPrivValue(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivValue *r)
8349 TALLOC_CTX *_mem_save_handle_0;
8350 TALLOC_CTX *_mem_save_name_0;
8351 TALLOC_CTX *_mem_save_luid_0;
8352 if (flags & NDR_IN) {
8353 ZERO_STRUCT(r->out);
8355 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8356 NDR_PULL_ALLOC(ndr, r->in.handle);
8358 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8359 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8360 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8361 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8362 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8363 NDR_PULL_ALLOC(ndr, r->in.name);
8365 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8366 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
8367 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8368 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
8369 NDR_PULL_ALLOC(ndr, r->out.luid);
8370 ZERO_STRUCTP(r->out.luid);
8372 if (flags & NDR_OUT) {
8373 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8374 NDR_PULL_ALLOC(ndr, r->out.luid);
8376 _mem_save_luid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8377 NDR_PULL_SET_MEM_CTX(ndr, r->out.luid, LIBNDR_FLAG_REF_ALLOC);
8378 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, r->out.luid));
8379 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_luid_0, LIBNDR_FLAG_REF_ALLOC);
8380 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8382 return NDR_ERR_SUCCESS;
8385 _PUBLIC_ void ndr_print_lsa_LookupPrivValue(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivValue *r)
8387 ndr_print_struct(ndr, name, "lsa_LookupPrivValue");
8388 ndr->depth++;
8389 if (flags & NDR_SET_VALUES) {
8390 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8392 if (flags & NDR_IN) {
8393 ndr_print_struct(ndr, "in", "lsa_LookupPrivValue");
8394 ndr->depth++;
8395 ndr_print_ptr(ndr, "handle", r->in.handle);
8396 ndr->depth++;
8397 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8398 ndr->depth--;
8399 ndr_print_ptr(ndr, "name", r->in.name);
8400 ndr->depth++;
8401 ndr_print_lsa_String(ndr, "name", r->in.name);
8402 ndr->depth--;
8403 ndr->depth--;
8405 if (flags & NDR_OUT) {
8406 ndr_print_struct(ndr, "out", "lsa_LookupPrivValue");
8407 ndr->depth++;
8408 ndr_print_ptr(ndr, "luid", r->out.luid);
8409 ndr->depth++;
8410 ndr_print_lsa_LUID(ndr, "luid", r->out.luid);
8411 ndr->depth--;
8412 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8413 ndr->depth--;
8415 ndr->depth--;
8418 static enum ndr_err_code ndr_push_lsa_LookupPrivName(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivName *r)
8420 if (flags & NDR_IN) {
8421 if (r->in.handle == NULL) {
8422 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8424 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8425 if (r->in.luid == NULL) {
8426 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8428 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, r->in.luid));
8430 if (flags & NDR_OUT) {
8431 if (r->out.name == NULL) {
8432 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8434 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.name));
8435 if (*r->out.name) {
8436 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.name));
8438 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8440 return NDR_ERR_SUCCESS;
8443 static enum ndr_err_code ndr_pull_lsa_LookupPrivName(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivName *r)
8445 uint32_t _ptr_name;
8446 TALLOC_CTX *_mem_save_handle_0;
8447 TALLOC_CTX *_mem_save_luid_0;
8448 TALLOC_CTX *_mem_save_name_0;
8449 TALLOC_CTX *_mem_save_name_1;
8450 if (flags & NDR_IN) {
8451 ZERO_STRUCT(r->out);
8453 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8454 NDR_PULL_ALLOC(ndr, r->in.handle);
8456 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8457 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8458 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8459 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8460 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8461 NDR_PULL_ALLOC(ndr, r->in.luid);
8463 _mem_save_luid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8464 NDR_PULL_SET_MEM_CTX(ndr, r->in.luid, LIBNDR_FLAG_REF_ALLOC);
8465 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, r->in.luid));
8466 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_luid_0, LIBNDR_FLAG_REF_ALLOC);
8467 NDR_PULL_ALLOC(ndr, r->out.name);
8468 ZERO_STRUCTP(r->out.name);
8470 if (flags & NDR_OUT) {
8471 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8472 NDR_PULL_ALLOC(ndr, r->out.name);
8474 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8475 NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC);
8476 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
8477 if (_ptr_name) {
8478 NDR_PULL_ALLOC(ndr, *r->out.name);
8479 } else {
8480 *r->out.name = NULL;
8482 if (*r->out.name) {
8483 _mem_save_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
8484 NDR_PULL_SET_MEM_CTX(ndr, *r->out.name, 0);
8485 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.name));
8486 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_1, 0);
8488 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
8489 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8491 return NDR_ERR_SUCCESS;
8494 _PUBLIC_ void ndr_print_lsa_LookupPrivName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivName *r)
8496 ndr_print_struct(ndr, name, "lsa_LookupPrivName");
8497 ndr->depth++;
8498 if (flags & NDR_SET_VALUES) {
8499 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8501 if (flags & NDR_IN) {
8502 ndr_print_struct(ndr, "in", "lsa_LookupPrivName");
8503 ndr->depth++;
8504 ndr_print_ptr(ndr, "handle", r->in.handle);
8505 ndr->depth++;
8506 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8507 ndr->depth--;
8508 ndr_print_ptr(ndr, "luid", r->in.luid);
8509 ndr->depth++;
8510 ndr_print_lsa_LUID(ndr, "luid", r->in.luid);
8511 ndr->depth--;
8512 ndr->depth--;
8514 if (flags & NDR_OUT) {
8515 ndr_print_struct(ndr, "out", "lsa_LookupPrivName");
8516 ndr->depth++;
8517 ndr_print_ptr(ndr, "name", r->out.name);
8518 ndr->depth++;
8519 ndr_print_ptr(ndr, "name", *r->out.name);
8520 ndr->depth++;
8521 if (*r->out.name) {
8522 ndr_print_lsa_StringLarge(ndr, "name", *r->out.name);
8524 ndr->depth--;
8525 ndr->depth--;
8526 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8527 ndr->depth--;
8529 ndr->depth--;
8532 static enum ndr_err_code ndr_push_lsa_LookupPrivDisplayName(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivDisplayName *r)
8534 if (flags & NDR_IN) {
8535 if (r->in.handle == NULL) {
8536 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8538 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8539 if (r->in.name == NULL) {
8540 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8542 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8543 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.language_id));
8544 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.language_id_sys));
8546 if (flags & NDR_OUT) {
8547 if (r->out.disp_name == NULL) {
8548 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8550 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.disp_name));
8551 if (*r->out.disp_name) {
8552 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.disp_name));
8554 if (r->out.returned_language_id == NULL) {
8555 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8557 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.returned_language_id));
8558 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8560 return NDR_ERR_SUCCESS;
8563 static enum ndr_err_code ndr_pull_lsa_LookupPrivDisplayName(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivDisplayName *r)
8565 uint32_t _ptr_disp_name;
8566 TALLOC_CTX *_mem_save_handle_0;
8567 TALLOC_CTX *_mem_save_name_0;
8568 TALLOC_CTX *_mem_save_disp_name_0;
8569 TALLOC_CTX *_mem_save_disp_name_1;
8570 TALLOC_CTX *_mem_save_returned_language_id_0;
8571 if (flags & NDR_IN) {
8572 ZERO_STRUCT(r->out);
8574 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8575 NDR_PULL_ALLOC(ndr, r->in.handle);
8577 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8578 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8579 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8580 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8581 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8582 NDR_PULL_ALLOC(ndr, r->in.name);
8584 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8585 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
8586 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8587 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
8588 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.language_id));
8589 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.language_id_sys));
8590 NDR_PULL_ALLOC(ndr, r->out.disp_name);
8591 ZERO_STRUCTP(r->out.disp_name);
8592 NDR_PULL_ALLOC(ndr, r->out.returned_language_id);
8593 ZERO_STRUCTP(r->out.returned_language_id);
8595 if (flags & NDR_OUT) {
8596 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8597 NDR_PULL_ALLOC(ndr, r->out.disp_name);
8599 _mem_save_disp_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8600 NDR_PULL_SET_MEM_CTX(ndr, r->out.disp_name, LIBNDR_FLAG_REF_ALLOC);
8601 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_disp_name));
8602 if (_ptr_disp_name) {
8603 NDR_PULL_ALLOC(ndr, *r->out.disp_name);
8604 } else {
8605 *r->out.disp_name = NULL;
8607 if (*r->out.disp_name) {
8608 _mem_save_disp_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
8609 NDR_PULL_SET_MEM_CTX(ndr, *r->out.disp_name, 0);
8610 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.disp_name));
8611 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disp_name_1, 0);
8613 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disp_name_0, LIBNDR_FLAG_REF_ALLOC);
8614 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8615 NDR_PULL_ALLOC(ndr, r->out.returned_language_id);
8617 _mem_save_returned_language_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
8618 NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_language_id, LIBNDR_FLAG_REF_ALLOC);
8619 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.returned_language_id));
8620 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_language_id_0, LIBNDR_FLAG_REF_ALLOC);
8621 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8623 return NDR_ERR_SUCCESS;
8626 _PUBLIC_ void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivDisplayName *r)
8628 ndr_print_struct(ndr, name, "lsa_LookupPrivDisplayName");
8629 ndr->depth++;
8630 if (flags & NDR_SET_VALUES) {
8631 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8633 if (flags & NDR_IN) {
8634 ndr_print_struct(ndr, "in", "lsa_LookupPrivDisplayName");
8635 ndr->depth++;
8636 ndr_print_ptr(ndr, "handle", r->in.handle);
8637 ndr->depth++;
8638 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8639 ndr->depth--;
8640 ndr_print_ptr(ndr, "name", r->in.name);
8641 ndr->depth++;
8642 ndr_print_lsa_String(ndr, "name", r->in.name);
8643 ndr->depth--;
8644 ndr_print_uint16(ndr, "language_id", r->in.language_id);
8645 ndr_print_uint16(ndr, "language_id_sys", r->in.language_id_sys);
8646 ndr->depth--;
8648 if (flags & NDR_OUT) {
8649 ndr_print_struct(ndr, "out", "lsa_LookupPrivDisplayName");
8650 ndr->depth++;
8651 ndr_print_ptr(ndr, "disp_name", r->out.disp_name);
8652 ndr->depth++;
8653 ndr_print_ptr(ndr, "disp_name", *r->out.disp_name);
8654 ndr->depth++;
8655 if (*r->out.disp_name) {
8656 ndr_print_lsa_StringLarge(ndr, "disp_name", *r->out.disp_name);
8658 ndr->depth--;
8659 ndr->depth--;
8660 ndr_print_ptr(ndr, "returned_language_id", r->out.returned_language_id);
8661 ndr->depth++;
8662 ndr_print_uint16(ndr, "returned_language_id", *r->out.returned_language_id);
8663 ndr->depth--;
8664 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8665 ndr->depth--;
8667 ndr->depth--;
8670 static enum ndr_err_code ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int flags, const struct lsa_DeleteObject *r)
8672 if (flags & NDR_IN) {
8673 if (r->in.handle == NULL) {
8674 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8676 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8678 if (flags & NDR_OUT) {
8679 if (r->out.handle == NULL) {
8680 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8682 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
8683 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8685 return NDR_ERR_SUCCESS;
8688 static enum ndr_err_code ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int flags, struct lsa_DeleteObject *r)
8690 TALLOC_CTX *_mem_save_handle_0;
8691 if (flags & NDR_IN) {
8692 ZERO_STRUCT(r->out);
8694 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8695 NDR_PULL_ALLOC(ndr, r->in.handle);
8697 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8698 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8699 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8700 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8701 NDR_PULL_ALLOC(ndr, r->out.handle);
8702 *r->out.handle = *r->in.handle;
8704 if (flags & NDR_OUT) {
8705 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8706 NDR_PULL_ALLOC(ndr, r->out.handle);
8708 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8709 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
8710 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
8711 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8712 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8714 return NDR_ERR_SUCCESS;
8717 _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteObject *r)
8719 ndr_print_struct(ndr, name, "lsa_DeleteObject");
8720 ndr->depth++;
8721 if (flags & NDR_SET_VALUES) {
8722 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8724 if (flags & NDR_IN) {
8725 ndr_print_struct(ndr, "in", "lsa_DeleteObject");
8726 ndr->depth++;
8727 ndr_print_ptr(ndr, "handle", r->in.handle);
8728 ndr->depth++;
8729 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8730 ndr->depth--;
8731 ndr->depth--;
8733 if (flags & NDR_OUT) {
8734 ndr_print_struct(ndr, "out", "lsa_DeleteObject");
8735 ndr->depth++;
8736 ndr_print_ptr(ndr, "handle", r->out.handle);
8737 ndr->depth++;
8738 ndr_print_policy_handle(ndr, "handle", r->out.handle);
8739 ndr->depth--;
8740 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8741 ndr->depth--;
8743 ndr->depth--;
8746 static enum ndr_err_code ndr_push_lsa_EnumAccountsWithUserRight(struct ndr_push *ndr, int flags, const struct lsa_EnumAccountsWithUserRight *r)
8748 if (flags & NDR_IN) {
8749 if (r->in.handle == NULL) {
8750 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8752 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8753 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.name));
8754 if (r->in.name) {
8755 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8758 if (flags & NDR_OUT) {
8759 if (r->out.sids == NULL) {
8760 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8762 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
8763 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8765 return NDR_ERR_SUCCESS;
8768 static enum ndr_err_code ndr_pull_lsa_EnumAccountsWithUserRight(struct ndr_pull *ndr, int flags, struct lsa_EnumAccountsWithUserRight *r)
8770 uint32_t _ptr_name;
8771 TALLOC_CTX *_mem_save_handle_0;
8772 TALLOC_CTX *_mem_save_name_0;
8773 TALLOC_CTX *_mem_save_sids_0;
8774 if (flags & NDR_IN) {
8775 ZERO_STRUCT(r->out);
8777 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8778 NDR_PULL_ALLOC(ndr, r->in.handle);
8780 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8781 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8782 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8783 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8784 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
8785 if (_ptr_name) {
8786 NDR_PULL_ALLOC(ndr, r->in.name);
8787 } else {
8788 r->in.name = NULL;
8790 if (r->in.name) {
8791 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8792 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, 0);
8793 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8794 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
8796 NDR_PULL_ALLOC(ndr, r->out.sids);
8797 ZERO_STRUCTP(r->out.sids);
8799 if (flags & NDR_OUT) {
8800 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8801 NDR_PULL_ALLOC(ndr, r->out.sids);
8803 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
8804 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
8805 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
8806 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
8807 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8809 return NDR_ERR_SUCCESS;
8812 _PUBLIC_ void ndr_print_lsa_EnumAccountsWithUserRight(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountsWithUserRight *r)
8814 ndr_print_struct(ndr, name, "lsa_EnumAccountsWithUserRight");
8815 ndr->depth++;
8816 if (flags & NDR_SET_VALUES) {
8817 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8819 if (flags & NDR_IN) {
8820 ndr_print_struct(ndr, "in", "lsa_EnumAccountsWithUserRight");
8821 ndr->depth++;
8822 ndr_print_ptr(ndr, "handle", r->in.handle);
8823 ndr->depth++;
8824 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8825 ndr->depth--;
8826 ndr_print_ptr(ndr, "name", r->in.name);
8827 ndr->depth++;
8828 if (r->in.name) {
8829 ndr_print_lsa_String(ndr, "name", r->in.name);
8831 ndr->depth--;
8832 ndr->depth--;
8834 if (flags & NDR_OUT) {
8835 ndr_print_struct(ndr, "out", "lsa_EnumAccountsWithUserRight");
8836 ndr->depth++;
8837 ndr_print_ptr(ndr, "sids", r->out.sids);
8838 ndr->depth++;
8839 ndr_print_lsa_SidArray(ndr, "sids", r->out.sids);
8840 ndr->depth--;
8841 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8842 ndr->depth--;
8844 ndr->depth--;
8847 static enum ndr_err_code ndr_push_lsa_EnumAccountRights(struct ndr_push *ndr, int flags, const struct lsa_EnumAccountRights *r)
8849 if (flags & NDR_IN) {
8850 if (r->in.handle == NULL) {
8851 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8853 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8854 if (r->in.sid == NULL) {
8855 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8857 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8859 if (flags & NDR_OUT) {
8860 if (r->out.rights == NULL) {
8861 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8863 NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rights));
8864 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8866 return NDR_ERR_SUCCESS;
8869 static enum ndr_err_code ndr_pull_lsa_EnumAccountRights(struct ndr_pull *ndr, int flags, struct lsa_EnumAccountRights *r)
8871 TALLOC_CTX *_mem_save_handle_0;
8872 TALLOC_CTX *_mem_save_sid_0;
8873 TALLOC_CTX *_mem_save_rights_0;
8874 if (flags & NDR_IN) {
8875 ZERO_STRUCT(r->out);
8877 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8878 NDR_PULL_ALLOC(ndr, r->in.handle);
8880 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8881 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8882 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8883 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8884 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8885 NDR_PULL_ALLOC(ndr, r->in.sid);
8887 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8888 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8889 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8890 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8891 NDR_PULL_ALLOC(ndr, r->out.rights);
8892 ZERO_STRUCTP(r->out.rights);
8894 if (flags & NDR_OUT) {
8895 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8896 NDR_PULL_ALLOC(ndr, r->out.rights);
8898 _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
8899 NDR_PULL_SET_MEM_CTX(ndr, r->out.rights, LIBNDR_FLAG_REF_ALLOC);
8900 NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rights));
8901 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_0, LIBNDR_FLAG_REF_ALLOC);
8902 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8904 return NDR_ERR_SUCCESS;
8907 _PUBLIC_ void ndr_print_lsa_EnumAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountRights *r)
8909 ndr_print_struct(ndr, name, "lsa_EnumAccountRights");
8910 ndr->depth++;
8911 if (flags & NDR_SET_VALUES) {
8912 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8914 if (flags & NDR_IN) {
8915 ndr_print_struct(ndr, "in", "lsa_EnumAccountRights");
8916 ndr->depth++;
8917 ndr_print_ptr(ndr, "handle", r->in.handle);
8918 ndr->depth++;
8919 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8920 ndr->depth--;
8921 ndr_print_ptr(ndr, "sid", r->in.sid);
8922 ndr->depth++;
8923 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
8924 ndr->depth--;
8925 ndr->depth--;
8927 if (flags & NDR_OUT) {
8928 ndr_print_struct(ndr, "out", "lsa_EnumAccountRights");
8929 ndr->depth++;
8930 ndr_print_ptr(ndr, "rights", r->out.rights);
8931 ndr->depth++;
8932 ndr_print_lsa_RightSet(ndr, "rights", r->out.rights);
8933 ndr->depth--;
8934 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8935 ndr->depth--;
8937 ndr->depth--;
8940 static enum ndr_err_code ndr_push_lsa_AddAccountRights(struct ndr_push *ndr, int flags, const struct lsa_AddAccountRights *r)
8942 if (flags & NDR_IN) {
8943 if (r->in.handle == NULL) {
8944 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8946 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8947 if (r->in.sid == NULL) {
8948 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8950 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8951 if (r->in.rights == NULL) {
8952 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8954 NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
8956 if (flags & NDR_OUT) {
8957 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8959 return NDR_ERR_SUCCESS;
8962 static enum ndr_err_code ndr_pull_lsa_AddAccountRights(struct ndr_pull *ndr, int flags, struct lsa_AddAccountRights *r)
8964 TALLOC_CTX *_mem_save_handle_0;
8965 TALLOC_CTX *_mem_save_sid_0;
8966 TALLOC_CTX *_mem_save_rights_0;
8967 if (flags & NDR_IN) {
8968 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8969 NDR_PULL_ALLOC(ndr, r->in.handle);
8971 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8972 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8973 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8974 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8975 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8976 NDR_PULL_ALLOC(ndr, r->in.sid);
8978 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8979 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8980 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8981 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8982 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8983 NDR_PULL_ALLOC(ndr, r->in.rights);
8985 _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
8986 NDR_PULL_SET_MEM_CTX(ndr, r->in.rights, LIBNDR_FLAG_REF_ALLOC);
8987 NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
8988 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_0, LIBNDR_FLAG_REF_ALLOC);
8990 if (flags & NDR_OUT) {
8991 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8993 return NDR_ERR_SUCCESS;
8996 _PUBLIC_ void ndr_print_lsa_AddAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddAccountRights *r)
8998 ndr_print_struct(ndr, name, "lsa_AddAccountRights");
8999 ndr->depth++;
9000 if (flags & NDR_SET_VALUES) {
9001 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9003 if (flags & NDR_IN) {
9004 ndr_print_struct(ndr, "in", "lsa_AddAccountRights");
9005 ndr->depth++;
9006 ndr_print_ptr(ndr, "handle", r->in.handle);
9007 ndr->depth++;
9008 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9009 ndr->depth--;
9010 ndr_print_ptr(ndr, "sid", r->in.sid);
9011 ndr->depth++;
9012 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
9013 ndr->depth--;
9014 ndr_print_ptr(ndr, "rights", r->in.rights);
9015 ndr->depth++;
9016 ndr_print_lsa_RightSet(ndr, "rights", r->in.rights);
9017 ndr->depth--;
9018 ndr->depth--;
9020 if (flags & NDR_OUT) {
9021 ndr_print_struct(ndr, "out", "lsa_AddAccountRights");
9022 ndr->depth++;
9023 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9024 ndr->depth--;
9026 ndr->depth--;
9029 static enum ndr_err_code ndr_push_lsa_RemoveAccountRights(struct ndr_push *ndr, int flags, const struct lsa_RemoveAccountRights *r)
9031 if (flags & NDR_IN) {
9032 if (r->in.handle == NULL) {
9033 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9035 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9036 if (r->in.sid == NULL) {
9037 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9039 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
9040 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.remove_all));
9041 if (r->in.rights == NULL) {
9042 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9044 NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
9046 if (flags & NDR_OUT) {
9047 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9049 return NDR_ERR_SUCCESS;
9052 static enum ndr_err_code ndr_pull_lsa_RemoveAccountRights(struct ndr_pull *ndr, int flags, struct lsa_RemoveAccountRights *r)
9054 TALLOC_CTX *_mem_save_handle_0;
9055 TALLOC_CTX *_mem_save_sid_0;
9056 TALLOC_CTX *_mem_save_rights_0;
9057 if (flags & NDR_IN) {
9058 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9059 NDR_PULL_ALLOC(ndr, r->in.handle);
9061 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9062 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9063 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9064 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9065 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9066 NDR_PULL_ALLOC(ndr, r->in.sid);
9068 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9069 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
9070 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
9071 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
9072 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.remove_all));
9073 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9074 NDR_PULL_ALLOC(ndr, r->in.rights);
9076 _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
9077 NDR_PULL_SET_MEM_CTX(ndr, r->in.rights, LIBNDR_FLAG_REF_ALLOC);
9078 NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
9079 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_0, LIBNDR_FLAG_REF_ALLOC);
9081 if (flags & NDR_OUT) {
9082 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9084 return NDR_ERR_SUCCESS;
9087 _PUBLIC_ void ndr_print_lsa_RemoveAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemoveAccountRights *r)
9089 ndr_print_struct(ndr, name, "lsa_RemoveAccountRights");
9090 ndr->depth++;
9091 if (flags & NDR_SET_VALUES) {
9092 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9094 if (flags & NDR_IN) {
9095 ndr_print_struct(ndr, "in", "lsa_RemoveAccountRights");
9096 ndr->depth++;
9097 ndr_print_ptr(ndr, "handle", r->in.handle);
9098 ndr->depth++;
9099 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9100 ndr->depth--;
9101 ndr_print_ptr(ndr, "sid", r->in.sid);
9102 ndr->depth++;
9103 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
9104 ndr->depth--;
9105 ndr_print_uint8(ndr, "remove_all", r->in.remove_all);
9106 ndr_print_ptr(ndr, "rights", r->in.rights);
9107 ndr->depth++;
9108 ndr_print_lsa_RightSet(ndr, "rights", r->in.rights);
9109 ndr->depth--;
9110 ndr->depth--;
9112 if (flags & NDR_OUT) {
9113 ndr_print_struct(ndr, "out", "lsa_RemoveAccountRights");
9114 ndr->depth++;
9115 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9116 ndr->depth--;
9118 ndr->depth--;
9121 static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfoBySid(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r)
9123 if (flags & NDR_IN) {
9124 if (r->in.handle == NULL) {
9125 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9127 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9128 if (r->in.dom_sid == NULL) {
9129 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9131 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9132 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
9134 if (flags & NDR_OUT) {
9135 if (r->out.info == NULL) {
9136 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9138 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
9139 if (*r->out.info) {
9140 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
9141 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9143 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9145 return NDR_ERR_SUCCESS;
9148 static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfoBySid(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoBySid *r)
9150 uint32_t _ptr_info;
9151 TALLOC_CTX *_mem_save_handle_0;
9152 TALLOC_CTX *_mem_save_dom_sid_0;
9153 TALLOC_CTX *_mem_save_info_0;
9154 TALLOC_CTX *_mem_save_info_1;
9155 if (flags & NDR_IN) {
9156 ZERO_STRUCT(r->out);
9158 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9159 NDR_PULL_ALLOC(ndr, r->in.handle);
9161 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9162 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9163 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9164 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9165 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9166 NDR_PULL_ALLOC(ndr, r->in.dom_sid);
9168 _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9169 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
9170 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9171 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC);
9172 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
9173 NDR_PULL_ALLOC(ndr, r->out.info);
9174 ZERO_STRUCTP(r->out.info);
9176 if (flags & NDR_OUT) {
9177 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9178 NDR_PULL_ALLOC(ndr, r->out.info);
9180 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9181 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9182 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
9183 if (_ptr_info) {
9184 NDR_PULL_ALLOC(ndr, *r->out.info);
9185 } else {
9186 *r->out.info = NULL;
9188 if (*r->out.info) {
9189 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
9190 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
9191 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
9192 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9193 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
9195 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9196 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9198 return NDR_ERR_SUCCESS;
9201 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r)
9203 ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfoBySid");
9204 ndr->depth++;
9205 if (flags & NDR_SET_VALUES) {
9206 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9208 if (flags & NDR_IN) {
9209 ndr_print_struct(ndr, "in", "lsa_QueryTrustedDomainInfoBySid");
9210 ndr->depth++;
9211 ndr_print_ptr(ndr, "handle", r->in.handle);
9212 ndr->depth++;
9213 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9214 ndr->depth--;
9215 ndr_print_ptr(ndr, "dom_sid", r->in.dom_sid);
9216 ndr->depth++;
9217 ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
9218 ndr->depth--;
9219 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
9220 ndr->depth--;
9222 if (flags & NDR_OUT) {
9223 ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfoBySid");
9224 ndr->depth++;
9225 ndr_print_ptr(ndr, "info", r->out.info);
9226 ndr->depth++;
9227 ndr_print_ptr(ndr, "info", *r->out.info);
9228 ndr->depth++;
9229 if (*r->out.info) {
9230 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
9231 ndr_print_lsa_TrustedDomainInfo(ndr, "info", *r->out.info);
9233 ndr->depth--;
9234 ndr->depth--;
9235 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9236 ndr->depth--;
9238 ndr->depth--;
9241 static enum ndr_err_code ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfo *r)
9243 if (flags & NDR_IN) {
9244 if (r->in.handle == NULL) {
9245 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9247 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9248 if (r->in.dom_sid == NULL) {
9249 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9251 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9252 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
9253 if (r->in.info == NULL) {
9254 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9256 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
9257 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9259 if (flags & NDR_OUT) {
9260 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9262 return NDR_ERR_SUCCESS;
9265 static enum ndr_err_code ndr_pull_lsa_SetTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfo *r)
9267 TALLOC_CTX *_mem_save_handle_0;
9268 TALLOC_CTX *_mem_save_dom_sid_0;
9269 TALLOC_CTX *_mem_save_info_0;
9270 if (flags & NDR_IN) {
9271 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9272 NDR_PULL_ALLOC(ndr, r->in.handle);
9274 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9275 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9276 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9277 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9278 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9279 NDR_PULL_ALLOC(ndr, r->in.dom_sid);
9281 _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9282 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
9283 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9284 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC);
9285 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
9286 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9287 NDR_PULL_ALLOC(ndr, r->in.info);
9289 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9290 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
9291 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
9292 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9293 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9295 if (flags & NDR_OUT) {
9296 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9298 return NDR_ERR_SUCCESS;
9301 _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfo *r)
9303 ndr_print_struct(ndr, name, "lsa_SetTrustedDomainInfo");
9304 ndr->depth++;
9305 if (flags & NDR_SET_VALUES) {
9306 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9308 if (flags & NDR_IN) {
9309 ndr_print_struct(ndr, "in", "lsa_SetTrustedDomainInfo");
9310 ndr->depth++;
9311 ndr_print_ptr(ndr, "handle", r->in.handle);
9312 ndr->depth++;
9313 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9314 ndr->depth--;
9315 ndr_print_ptr(ndr, "dom_sid", r->in.dom_sid);
9316 ndr->depth++;
9317 ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
9318 ndr->depth--;
9319 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
9320 ndr_print_ptr(ndr, "info", r->in.info);
9321 ndr->depth++;
9322 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
9323 ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
9324 ndr->depth--;
9325 ndr->depth--;
9327 if (flags & NDR_OUT) {
9328 ndr_print_struct(ndr, "out", "lsa_SetTrustedDomainInfo");
9329 ndr->depth++;
9330 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9331 ndr->depth--;
9333 ndr->depth--;
9336 static enum ndr_err_code ndr_push_lsa_DeleteTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_DeleteTrustedDomain *r)
9338 if (flags & NDR_IN) {
9339 if (r->in.handle == NULL) {
9340 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9342 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9343 if (r->in.dom_sid == NULL) {
9344 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9346 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9348 if (flags & NDR_OUT) {
9349 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9351 return NDR_ERR_SUCCESS;
9354 static enum ndr_err_code ndr_pull_lsa_DeleteTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_DeleteTrustedDomain *r)
9356 TALLOC_CTX *_mem_save_handle_0;
9357 TALLOC_CTX *_mem_save_dom_sid_0;
9358 if (flags & NDR_IN) {
9359 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9360 NDR_PULL_ALLOC(ndr, r->in.handle);
9362 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9363 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9364 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9365 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9366 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9367 NDR_PULL_ALLOC(ndr, r->in.dom_sid);
9369 _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9370 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
9371 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9372 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC);
9374 if (flags & NDR_OUT) {
9375 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9377 return NDR_ERR_SUCCESS;
9380 _PUBLIC_ void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteTrustedDomain *r)
9382 ndr_print_struct(ndr, name, "lsa_DeleteTrustedDomain");
9383 ndr->depth++;
9384 if (flags & NDR_SET_VALUES) {
9385 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9387 if (flags & NDR_IN) {
9388 ndr_print_struct(ndr, "in", "lsa_DeleteTrustedDomain");
9389 ndr->depth++;
9390 ndr_print_ptr(ndr, "handle", r->in.handle);
9391 ndr->depth++;
9392 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9393 ndr->depth--;
9394 ndr_print_ptr(ndr, "dom_sid", r->in.dom_sid);
9395 ndr->depth++;
9396 ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
9397 ndr->depth--;
9398 ndr->depth--;
9400 if (flags & NDR_OUT) {
9401 ndr_print_struct(ndr, "out", "lsa_DeleteTrustedDomain");
9402 ndr->depth++;
9403 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9404 ndr->depth--;
9406 ndr->depth--;
9409 static enum ndr_err_code ndr_push_lsa_StorePrivateData(struct ndr_push *ndr, int flags, const struct lsa_StorePrivateData *r)
9411 if (flags & NDR_IN) {
9412 if (r->in.handle == NULL) {
9413 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9415 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9416 if (r->in.name == NULL) {
9417 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9419 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
9420 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.val));
9421 if (r->in.val) {
9422 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.val));
9425 if (flags & NDR_OUT) {
9426 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9428 return NDR_ERR_SUCCESS;
9431 static enum ndr_err_code ndr_pull_lsa_StorePrivateData(struct ndr_pull *ndr, int flags, struct lsa_StorePrivateData *r)
9433 uint32_t _ptr_val;
9434 TALLOC_CTX *_mem_save_handle_0;
9435 TALLOC_CTX *_mem_save_name_0;
9436 TALLOC_CTX *_mem_save_val_0;
9437 if (flags & NDR_IN) {
9438 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9439 NDR_PULL_ALLOC(ndr, r->in.handle);
9441 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9442 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9443 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9444 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9445 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9446 NDR_PULL_ALLOC(ndr, r->in.name);
9448 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9449 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
9450 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
9451 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
9452 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_val));
9453 if (_ptr_val) {
9454 NDR_PULL_ALLOC(ndr, r->in.val);
9455 } else {
9456 r->in.val = NULL;
9458 if (r->in.val) {
9459 _mem_save_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
9460 NDR_PULL_SET_MEM_CTX(ndr, r->in.val, 0);
9461 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.val));
9462 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_0, 0);
9465 if (flags & NDR_OUT) {
9466 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9468 return NDR_ERR_SUCCESS;
9471 _PUBLIC_ void ndr_print_lsa_StorePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_StorePrivateData *r)
9473 ndr_print_struct(ndr, name, "lsa_StorePrivateData");
9474 ndr->depth++;
9475 if (flags & NDR_SET_VALUES) {
9476 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9478 if (flags & NDR_IN) {
9479 ndr_print_struct(ndr, "in", "lsa_StorePrivateData");
9480 ndr->depth++;
9481 ndr_print_ptr(ndr, "handle", r->in.handle);
9482 ndr->depth++;
9483 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9484 ndr->depth--;
9485 ndr_print_ptr(ndr, "name", r->in.name);
9486 ndr->depth++;
9487 ndr_print_lsa_String(ndr, "name", r->in.name);
9488 ndr->depth--;
9489 ndr_print_ptr(ndr, "val", r->in.val);
9490 ndr->depth++;
9491 if (r->in.val) {
9492 ndr_print_lsa_DATA_BUF(ndr, "val", r->in.val);
9494 ndr->depth--;
9495 ndr->depth--;
9497 if (flags & NDR_OUT) {
9498 ndr_print_struct(ndr, "out", "lsa_StorePrivateData");
9499 ndr->depth++;
9500 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9501 ndr->depth--;
9503 ndr->depth--;
9506 static enum ndr_err_code ndr_push_lsa_RetrievePrivateData(struct ndr_push *ndr, int flags, const struct lsa_RetrievePrivateData *r)
9508 if (flags & NDR_IN) {
9509 if (r->in.handle == NULL) {
9510 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9512 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9513 if (r->in.name == NULL) {
9514 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9516 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
9517 if (r->in.val == NULL) {
9518 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9520 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.val));
9521 if (*r->in.val) {
9522 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.val));
9525 if (flags & NDR_OUT) {
9526 if (r->out.val == NULL) {
9527 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9529 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.val));
9530 if (*r->out.val) {
9531 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.val));
9533 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9535 return NDR_ERR_SUCCESS;
9538 static enum ndr_err_code ndr_pull_lsa_RetrievePrivateData(struct ndr_pull *ndr, int flags, struct lsa_RetrievePrivateData *r)
9540 uint32_t _ptr_val;
9541 TALLOC_CTX *_mem_save_handle_0;
9542 TALLOC_CTX *_mem_save_name_0;
9543 TALLOC_CTX *_mem_save_val_0;
9544 TALLOC_CTX *_mem_save_val_1;
9545 if (flags & NDR_IN) {
9546 ZERO_STRUCT(r->out);
9548 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9549 NDR_PULL_ALLOC(ndr, r->in.handle);
9551 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9552 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9553 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9554 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9555 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9556 NDR_PULL_ALLOC(ndr, r->in.name);
9558 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9559 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
9560 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
9561 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
9562 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9563 NDR_PULL_ALLOC(ndr, r->in.val);
9565 _mem_save_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
9566 NDR_PULL_SET_MEM_CTX(ndr, r->in.val, LIBNDR_FLAG_REF_ALLOC);
9567 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_val));
9568 if (_ptr_val) {
9569 NDR_PULL_ALLOC(ndr, *r->in.val);
9570 } else {
9571 *r->in.val = NULL;
9573 if (*r->in.val) {
9574 _mem_save_val_1 = NDR_PULL_GET_MEM_CTX(ndr);
9575 NDR_PULL_SET_MEM_CTX(ndr, *r->in.val, 0);
9576 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.val));
9577 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_1, 0);
9579 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_0, LIBNDR_FLAG_REF_ALLOC);
9580 NDR_PULL_ALLOC(ndr, r->out.val);
9581 *r->out.val = *r->in.val;
9583 if (flags & NDR_OUT) {
9584 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9585 NDR_PULL_ALLOC(ndr, r->out.val);
9587 _mem_save_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
9588 NDR_PULL_SET_MEM_CTX(ndr, r->out.val, LIBNDR_FLAG_REF_ALLOC);
9589 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_val));
9590 if (_ptr_val) {
9591 NDR_PULL_ALLOC(ndr, *r->out.val);
9592 } else {
9593 *r->out.val = NULL;
9595 if (*r->out.val) {
9596 _mem_save_val_1 = NDR_PULL_GET_MEM_CTX(ndr);
9597 NDR_PULL_SET_MEM_CTX(ndr, *r->out.val, 0);
9598 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.val));
9599 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_1, 0);
9601 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_0, LIBNDR_FLAG_REF_ALLOC);
9602 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9604 return NDR_ERR_SUCCESS;
9607 _PUBLIC_ void ndr_print_lsa_RetrievePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RetrievePrivateData *r)
9609 ndr_print_struct(ndr, name, "lsa_RetrievePrivateData");
9610 ndr->depth++;
9611 if (flags & NDR_SET_VALUES) {
9612 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9614 if (flags & NDR_IN) {
9615 ndr_print_struct(ndr, "in", "lsa_RetrievePrivateData");
9616 ndr->depth++;
9617 ndr_print_ptr(ndr, "handle", r->in.handle);
9618 ndr->depth++;
9619 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9620 ndr->depth--;
9621 ndr_print_ptr(ndr, "name", r->in.name);
9622 ndr->depth++;
9623 ndr_print_lsa_String(ndr, "name", r->in.name);
9624 ndr->depth--;
9625 ndr_print_ptr(ndr, "val", r->in.val);
9626 ndr->depth++;
9627 ndr_print_ptr(ndr, "val", *r->in.val);
9628 ndr->depth++;
9629 if (*r->in.val) {
9630 ndr_print_lsa_DATA_BUF(ndr, "val", *r->in.val);
9632 ndr->depth--;
9633 ndr->depth--;
9634 ndr->depth--;
9636 if (flags & NDR_OUT) {
9637 ndr_print_struct(ndr, "out", "lsa_RetrievePrivateData");
9638 ndr->depth++;
9639 ndr_print_ptr(ndr, "val", r->out.val);
9640 ndr->depth++;
9641 ndr_print_ptr(ndr, "val", *r->out.val);
9642 ndr->depth++;
9643 if (*r->out.val) {
9644 ndr_print_lsa_DATA_BUF(ndr, "val", *r->out.val);
9646 ndr->depth--;
9647 ndr->depth--;
9648 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9649 ndr->depth--;
9651 ndr->depth--;
9654 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy2 *r)
9656 if (flags & NDR_IN) {
9657 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
9658 if (r->in.system_name) {
9659 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9660 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9661 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9662 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9664 if (r->in.attr == NULL) {
9665 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9667 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
9668 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
9670 if (flags & NDR_OUT) {
9671 if (r->out.handle == NULL) {
9672 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9674 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
9675 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9677 return NDR_ERR_SUCCESS;
9680 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy2 *r)
9682 uint32_t _ptr_system_name;
9683 TALLOC_CTX *_mem_save_system_name_0;
9684 TALLOC_CTX *_mem_save_attr_0;
9685 TALLOC_CTX *_mem_save_handle_0;
9686 if (flags & NDR_IN) {
9687 ZERO_STRUCT(r->out);
9689 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
9690 if (_ptr_system_name) {
9691 NDR_PULL_ALLOC(ndr, r->in.system_name);
9692 } else {
9693 r->in.system_name = NULL;
9695 if (r->in.system_name) {
9696 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9697 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
9698 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
9699 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
9700 if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
9701 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name));
9703 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
9704 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16));
9705 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
9707 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9708 NDR_PULL_ALLOC(ndr, r->in.attr);
9710 _mem_save_attr_0 = NDR_PULL_GET_MEM_CTX(ndr);
9711 NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC);
9712 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
9713 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC);
9714 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
9715 NDR_PULL_ALLOC(ndr, r->out.handle);
9716 ZERO_STRUCTP(r->out.handle);
9718 if (flags & NDR_OUT) {
9719 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9720 NDR_PULL_ALLOC(ndr, r->out.handle);
9722 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9723 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
9724 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
9725 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9726 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9728 return NDR_ERR_SUCCESS;
9731 _PUBLIC_ void ndr_print_lsa_OpenPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy2 *r)
9733 ndr_print_struct(ndr, name, "lsa_OpenPolicy2");
9734 ndr->depth++;
9735 if (flags & NDR_SET_VALUES) {
9736 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9738 if (flags & NDR_IN) {
9739 ndr_print_struct(ndr, "in", "lsa_OpenPolicy2");
9740 ndr->depth++;
9741 ndr_print_ptr(ndr, "system_name", r->in.system_name);
9742 ndr->depth++;
9743 if (r->in.system_name) {
9744 ndr_print_string(ndr, "system_name", r->in.system_name);
9746 ndr->depth--;
9747 ndr_print_ptr(ndr, "attr", r->in.attr);
9748 ndr->depth++;
9749 ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr);
9750 ndr->depth--;
9751 ndr_print_lsa_PolicyAccessMask(ndr, "access_mask", r->in.access_mask);
9752 ndr->depth--;
9754 if (flags & NDR_OUT) {
9755 ndr_print_struct(ndr, "out", "lsa_OpenPolicy2");
9756 ndr->depth++;
9757 ndr_print_ptr(ndr, "handle", r->out.handle);
9758 ndr->depth++;
9759 ndr_print_policy_handle(ndr, "handle", r->out.handle);
9760 ndr->depth--;
9761 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9762 ndr->depth--;
9764 ndr->depth--;
9767 static enum ndr_err_code ndr_push_lsa_GetUserName(struct ndr_push *ndr, int flags, const struct lsa_GetUserName *r)
9769 if (flags & NDR_IN) {
9770 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
9771 if (r->in.system_name) {
9772 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9773 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9774 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9775 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9777 if (r->in.account_name == NULL) {
9778 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9780 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.account_name));
9781 if (*r->in.account_name) {
9782 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.account_name));
9784 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.authority_name));
9785 if (r->in.authority_name) {
9786 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.authority_name));
9787 if (*r->in.authority_name) {
9788 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.authority_name));
9792 if (flags & NDR_OUT) {
9793 if (r->out.account_name == NULL) {
9794 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9796 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.account_name));
9797 if (*r->out.account_name) {
9798 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.account_name));
9800 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.authority_name));
9801 if (r->out.authority_name) {
9802 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.authority_name));
9803 if (*r->out.authority_name) {
9804 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.authority_name));
9807 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9809 return NDR_ERR_SUCCESS;
9812 static enum ndr_err_code ndr_pull_lsa_GetUserName(struct ndr_pull *ndr, int flags, struct lsa_GetUserName *r)
9814 uint32_t _ptr_system_name;
9815 uint32_t _ptr_account_name;
9816 uint32_t _ptr_authority_name;
9817 TALLOC_CTX *_mem_save_system_name_0;
9818 TALLOC_CTX *_mem_save_account_name_0;
9819 TALLOC_CTX *_mem_save_account_name_1;
9820 TALLOC_CTX *_mem_save_authority_name_0;
9821 TALLOC_CTX *_mem_save_authority_name_1;
9822 if (flags & NDR_IN) {
9823 ZERO_STRUCT(r->out);
9825 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
9826 if (_ptr_system_name) {
9827 NDR_PULL_ALLOC(ndr, r->in.system_name);
9828 } else {
9829 r->in.system_name = NULL;
9831 if (r->in.system_name) {
9832 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9833 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
9834 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
9835 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
9836 if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
9837 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name));
9839 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
9840 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16));
9841 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
9843 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9844 NDR_PULL_ALLOC(ndr, r->in.account_name);
9846 _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9847 NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, LIBNDR_FLAG_REF_ALLOC);
9848 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
9849 if (_ptr_account_name) {
9850 NDR_PULL_ALLOC(ndr, *r->in.account_name);
9851 } else {
9852 *r->in.account_name = NULL;
9854 if (*r->in.account_name) {
9855 _mem_save_account_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9856 NDR_PULL_SET_MEM_CTX(ndr, *r->in.account_name, 0);
9857 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.account_name));
9858 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_1, 0);
9860 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC);
9861 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9862 if (_ptr_authority_name) {
9863 NDR_PULL_ALLOC(ndr, r->in.authority_name);
9864 } else {
9865 r->in.authority_name = NULL;
9867 if (r->in.authority_name) {
9868 _mem_save_authority_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9869 NDR_PULL_SET_MEM_CTX(ndr, r->in.authority_name, 0);
9870 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9871 if (_ptr_authority_name) {
9872 NDR_PULL_ALLOC(ndr, *r->in.authority_name);
9873 } else {
9874 *r->in.authority_name = NULL;
9876 if (*r->in.authority_name) {
9877 _mem_save_authority_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9878 NDR_PULL_SET_MEM_CTX(ndr, *r->in.authority_name, 0);
9879 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.authority_name));
9880 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_1, 0);
9882 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_0, 0);
9884 NDR_PULL_ALLOC(ndr, r->out.account_name);
9885 *r->out.account_name = *r->in.account_name;
9887 if (flags & NDR_OUT) {
9888 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9889 NDR_PULL_ALLOC(ndr, r->out.account_name);
9891 _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9892 NDR_PULL_SET_MEM_CTX(ndr, r->out.account_name, LIBNDR_FLAG_REF_ALLOC);
9893 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
9894 if (_ptr_account_name) {
9895 NDR_PULL_ALLOC(ndr, *r->out.account_name);
9896 } else {
9897 *r->out.account_name = NULL;
9899 if (*r->out.account_name) {
9900 _mem_save_account_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9901 NDR_PULL_SET_MEM_CTX(ndr, *r->out.account_name, 0);
9902 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.account_name));
9903 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_1, 0);
9905 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC);
9906 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9907 if (_ptr_authority_name) {
9908 NDR_PULL_ALLOC(ndr, r->out.authority_name);
9909 } else {
9910 r->out.authority_name = NULL;
9912 if (r->out.authority_name) {
9913 _mem_save_authority_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9914 NDR_PULL_SET_MEM_CTX(ndr, r->out.authority_name, 0);
9915 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9916 if (_ptr_authority_name) {
9917 NDR_PULL_ALLOC(ndr, *r->out.authority_name);
9918 } else {
9919 *r->out.authority_name = NULL;
9921 if (*r->out.authority_name) {
9922 _mem_save_authority_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9923 NDR_PULL_SET_MEM_CTX(ndr, *r->out.authority_name, 0);
9924 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.authority_name));
9925 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_1, 0);
9927 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_0, 0);
9929 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9931 return NDR_ERR_SUCCESS;
9934 _PUBLIC_ void ndr_print_lsa_GetUserName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetUserName *r)
9936 ndr_print_struct(ndr, name, "lsa_GetUserName");
9937 ndr->depth++;
9938 if (flags & NDR_SET_VALUES) {
9939 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9941 if (flags & NDR_IN) {
9942 ndr_print_struct(ndr, "in", "lsa_GetUserName");
9943 ndr->depth++;
9944 ndr_print_ptr(ndr, "system_name", r->in.system_name);
9945 ndr->depth++;
9946 if (r->in.system_name) {
9947 ndr_print_string(ndr, "system_name", r->in.system_name);
9949 ndr->depth--;
9950 ndr_print_ptr(ndr, "account_name", r->in.account_name);
9951 ndr->depth++;
9952 ndr_print_ptr(ndr, "account_name", *r->in.account_name);
9953 ndr->depth++;
9954 if (*r->in.account_name) {
9955 ndr_print_lsa_String(ndr, "account_name", *r->in.account_name);
9957 ndr->depth--;
9958 ndr->depth--;
9959 ndr_print_ptr(ndr, "authority_name", r->in.authority_name);
9960 ndr->depth++;
9961 if (r->in.authority_name) {
9962 ndr_print_ptr(ndr, "authority_name", *r->in.authority_name);
9963 ndr->depth++;
9964 if (*r->in.authority_name) {
9965 ndr_print_lsa_String(ndr, "authority_name", *r->in.authority_name);
9967 ndr->depth--;
9969 ndr->depth--;
9970 ndr->depth--;
9972 if (flags & NDR_OUT) {
9973 ndr_print_struct(ndr, "out", "lsa_GetUserName");
9974 ndr->depth++;
9975 ndr_print_ptr(ndr, "account_name", r->out.account_name);
9976 ndr->depth++;
9977 ndr_print_ptr(ndr, "account_name", *r->out.account_name);
9978 ndr->depth++;
9979 if (*r->out.account_name) {
9980 ndr_print_lsa_String(ndr, "account_name", *r->out.account_name);
9982 ndr->depth--;
9983 ndr->depth--;
9984 ndr_print_ptr(ndr, "authority_name", r->out.authority_name);
9985 ndr->depth++;
9986 if (r->out.authority_name) {
9987 ndr_print_ptr(ndr, "authority_name", *r->out.authority_name);
9988 ndr->depth++;
9989 if (*r->out.authority_name) {
9990 ndr_print_lsa_String(ndr, "authority_name", *r->out.authority_name);
9992 ndr->depth--;
9994 ndr->depth--;
9995 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9996 ndr->depth--;
9998 ndr->depth--;
10001 static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy2(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy2 *r)
10003 if (flags & NDR_IN) {
10004 if (r->in.handle == NULL) {
10005 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10007 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10008 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
10010 if (flags & NDR_OUT) {
10011 if (r->out.info == NULL) {
10012 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10014 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
10015 if (*r->out.info) {
10016 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
10017 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10019 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10021 return NDR_ERR_SUCCESS;
10024 static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy2 *r)
10026 uint32_t _ptr_info;
10027 TALLOC_CTX *_mem_save_handle_0;
10028 TALLOC_CTX *_mem_save_info_0;
10029 TALLOC_CTX *_mem_save_info_1;
10030 if (flags & NDR_IN) {
10031 ZERO_STRUCT(r->out);
10033 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10034 NDR_PULL_ALLOC(ndr, r->in.handle);
10036 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10037 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10038 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10039 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10040 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
10041 NDR_PULL_ALLOC(ndr, r->out.info);
10042 ZERO_STRUCTP(r->out.info);
10044 if (flags & NDR_OUT) {
10045 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10046 NDR_PULL_ALLOC(ndr, r->out.info);
10048 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10049 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10050 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10051 if (_ptr_info) {
10052 NDR_PULL_ALLOC(ndr, *r->out.info);
10053 } else {
10054 *r->out.info = NULL;
10056 if (*r->out.info) {
10057 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
10058 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
10059 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
10060 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10061 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
10063 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10064 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10066 return NDR_ERR_SUCCESS;
10069 _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy2 *r)
10071 ndr_print_struct(ndr, name, "lsa_QueryInfoPolicy2");
10072 ndr->depth++;
10073 if (flags & NDR_SET_VALUES) {
10074 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10076 if (flags & NDR_IN) {
10077 ndr_print_struct(ndr, "in", "lsa_QueryInfoPolicy2");
10078 ndr->depth++;
10079 ndr_print_ptr(ndr, "handle", r->in.handle);
10080 ndr->depth++;
10081 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10082 ndr->depth--;
10083 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
10084 ndr->depth--;
10086 if (flags & NDR_OUT) {
10087 ndr_print_struct(ndr, "out", "lsa_QueryInfoPolicy2");
10088 ndr->depth++;
10089 ndr_print_ptr(ndr, "info", r->out.info);
10090 ndr->depth++;
10091 ndr_print_ptr(ndr, "info", *r->out.info);
10092 ndr->depth++;
10093 if (*r->out.info) {
10094 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
10095 ndr_print_lsa_PolicyInformation(ndr, "info", *r->out.info);
10097 ndr->depth--;
10098 ndr->depth--;
10099 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10100 ndr->depth--;
10102 ndr->depth--;
10105 static enum ndr_err_code ndr_push_lsa_SetInfoPolicy2(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy2 *r)
10107 if (flags & NDR_IN) {
10108 if (r->in.handle == NULL) {
10109 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10111 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10112 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
10113 if (r->in.info == NULL) {
10114 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10116 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
10117 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10119 if (flags & NDR_OUT) {
10120 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10122 return NDR_ERR_SUCCESS;
10125 static enum ndr_err_code ndr_pull_lsa_SetInfoPolicy2(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy2 *r)
10127 TALLOC_CTX *_mem_save_handle_0;
10128 TALLOC_CTX *_mem_save_info_0;
10129 if (flags & NDR_IN) {
10130 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10131 NDR_PULL_ALLOC(ndr, r->in.handle);
10133 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10134 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10135 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10136 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10137 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
10138 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10139 NDR_PULL_ALLOC(ndr, r->in.info);
10141 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10142 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
10143 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
10144 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10145 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10147 if (flags & NDR_OUT) {
10148 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10150 return NDR_ERR_SUCCESS;
10153 _PUBLIC_ void ndr_print_lsa_SetInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy2 *r)
10155 ndr_print_struct(ndr, name, "lsa_SetInfoPolicy2");
10156 ndr->depth++;
10157 if (flags & NDR_SET_VALUES) {
10158 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10160 if (flags & NDR_IN) {
10161 ndr_print_struct(ndr, "in", "lsa_SetInfoPolicy2");
10162 ndr->depth++;
10163 ndr_print_ptr(ndr, "handle", r->in.handle);
10164 ndr->depth++;
10165 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10166 ndr->depth--;
10167 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
10168 ndr_print_ptr(ndr, "info", r->in.info);
10169 ndr->depth++;
10170 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
10171 ndr_print_lsa_PolicyInformation(ndr, "info", r->in.info);
10172 ndr->depth--;
10173 ndr->depth--;
10175 if (flags & NDR_OUT) {
10176 ndr_print_struct(ndr, "out", "lsa_SetInfoPolicy2");
10177 ndr->depth++;
10178 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10179 ndr->depth--;
10181 ndr->depth--;
10184 static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfoByName *r)
10186 if (flags & NDR_IN) {
10187 if (r->in.handle == NULL) {
10188 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10190 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10191 if (r->in.trusted_domain == NULL) {
10192 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10194 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain));
10195 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
10197 if (flags & NDR_OUT) {
10198 if (r->out.info == NULL) {
10199 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10201 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
10202 if (*r->out.info) {
10203 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
10204 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10206 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10208 return NDR_ERR_SUCCESS;
10211 static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoByName *r)
10213 uint32_t _ptr_info;
10214 TALLOC_CTX *_mem_save_handle_0;
10215 TALLOC_CTX *_mem_save_trusted_domain_0;
10216 TALLOC_CTX *_mem_save_info_0;
10217 TALLOC_CTX *_mem_save_info_1;
10218 if (flags & NDR_IN) {
10219 ZERO_STRUCT(r->out);
10221 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10222 NDR_PULL_ALLOC(ndr, r->in.handle);
10224 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10225 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10226 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10227 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10228 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10229 NDR_PULL_ALLOC(ndr, r->in.trusted_domain);
10231 _mem_save_trusted_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
10232 NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain, LIBNDR_FLAG_REF_ALLOC);
10233 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain));
10234 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_0, LIBNDR_FLAG_REF_ALLOC);
10235 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
10236 NDR_PULL_ALLOC(ndr, r->out.info);
10237 ZERO_STRUCTP(r->out.info);
10239 if (flags & NDR_OUT) {
10240 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10241 NDR_PULL_ALLOC(ndr, r->out.info);
10243 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10244 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10245 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10246 if (_ptr_info) {
10247 NDR_PULL_ALLOC(ndr, *r->out.info);
10248 } else {
10249 *r->out.info = NULL;
10251 if (*r->out.info) {
10252 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
10253 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
10254 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
10255 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10256 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
10258 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10259 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10261 return NDR_ERR_SUCCESS;
10264 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoByName *r)
10266 ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfoByName");
10267 ndr->depth++;
10268 if (flags & NDR_SET_VALUES) {
10269 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10271 if (flags & NDR_IN) {
10272 ndr_print_struct(ndr, "in", "lsa_QueryTrustedDomainInfoByName");
10273 ndr->depth++;
10274 ndr_print_ptr(ndr, "handle", r->in.handle);
10275 ndr->depth++;
10276 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10277 ndr->depth--;
10278 ndr_print_ptr(ndr, "trusted_domain", r->in.trusted_domain);
10279 ndr->depth++;
10280 ndr_print_lsa_String(ndr, "trusted_domain", r->in.trusted_domain);
10281 ndr->depth--;
10282 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
10283 ndr->depth--;
10285 if (flags & NDR_OUT) {
10286 ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfoByName");
10287 ndr->depth++;
10288 ndr_print_ptr(ndr, "info", r->out.info);
10289 ndr->depth++;
10290 ndr_print_ptr(ndr, "info", *r->out.info);
10291 ndr->depth++;
10292 if (*r->out.info) {
10293 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
10294 ndr_print_lsa_TrustedDomainInfo(ndr, "info", *r->out.info);
10296 ndr->depth--;
10297 ndr->depth--;
10298 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10299 ndr->depth--;
10301 ndr->depth--;
10304 static enum ndr_err_code ndr_push_lsa_SetTrustedDomainInfoByName(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfoByName *r)
10306 if (flags & NDR_IN) {
10307 if (r->in.handle == NULL) {
10308 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10310 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10311 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain));
10312 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
10313 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
10314 if (r->in.info) {
10315 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
10316 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10319 if (flags & NDR_OUT) {
10320 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10322 return NDR_ERR_SUCCESS;
10325 static enum ndr_err_code ndr_pull_lsa_SetTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfoByName *r)
10327 uint32_t _ptr_info;
10328 TALLOC_CTX *_mem_save_handle_0;
10329 TALLOC_CTX *_mem_save_info_0;
10330 if (flags & NDR_IN) {
10331 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10332 NDR_PULL_ALLOC(ndr, r->in.handle);
10334 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10335 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10336 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10337 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10338 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain));
10339 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
10340 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10341 if (_ptr_info) {
10342 NDR_PULL_ALLOC(ndr, r->in.info);
10343 } else {
10344 r->in.info = NULL;
10346 if (r->in.info) {
10347 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10348 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
10349 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
10350 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10351 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
10354 if (flags & NDR_OUT) {
10355 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10357 return NDR_ERR_SUCCESS;
10360 _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfoByName *r)
10362 ndr_print_struct(ndr, name, "lsa_SetTrustedDomainInfoByName");
10363 ndr->depth++;
10364 if (flags & NDR_SET_VALUES) {
10365 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10367 if (flags & NDR_IN) {
10368 ndr_print_struct(ndr, "in", "lsa_SetTrustedDomainInfoByName");
10369 ndr->depth++;
10370 ndr_print_ptr(ndr, "handle", r->in.handle);
10371 ndr->depth++;
10372 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10373 ndr->depth--;
10374 ndr_print_lsa_String(ndr, "trusted_domain", &r->in.trusted_domain);
10375 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
10376 ndr_print_ptr(ndr, "info", r->in.info);
10377 ndr->depth++;
10378 if (r->in.info) {
10379 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
10380 ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
10382 ndr->depth--;
10383 ndr->depth--;
10385 if (flags & NDR_OUT) {
10386 ndr_print_struct(ndr, "out", "lsa_SetTrustedDomainInfoByName");
10387 ndr->depth++;
10388 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10389 ndr->depth--;
10391 ndr->depth--;
10394 static enum ndr_err_code ndr_push_lsa_EnumTrustedDomainsEx(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustedDomainsEx *r)
10396 if (flags & NDR_IN) {
10397 if (r->in.handle == NULL) {
10398 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10400 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10401 if (r->in.resume_handle == NULL) {
10402 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10404 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
10405 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
10407 if (flags & NDR_OUT) {
10408 if (r->out.resume_handle == NULL) {
10409 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
10412 if (r->out.domains == NULL) {
10413 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10415 NDR_CHECK(ndr_push_lsa_DomainListEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
10416 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10418 return NDR_ERR_SUCCESS;
10421 static enum ndr_err_code ndr_pull_lsa_EnumTrustedDomainsEx(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustedDomainsEx *r)
10423 TALLOC_CTX *_mem_save_handle_0;
10424 TALLOC_CTX *_mem_save_resume_handle_0;
10425 TALLOC_CTX *_mem_save_domains_0;
10426 if (flags & NDR_IN) {
10427 ZERO_STRUCT(r->out);
10429 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10430 NDR_PULL_ALLOC(ndr, r->in.handle);
10432 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10433 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10434 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10435 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10436 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10437 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
10439 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10440 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
10441 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
10442 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
10443 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
10444 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
10445 *r->out.resume_handle = *r->in.resume_handle;
10446 NDR_PULL_ALLOC(ndr, r->out.domains);
10447 ZERO_STRUCTP(r->out.domains);
10449 if (flags & NDR_OUT) {
10450 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10451 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
10453 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10454 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
10455 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
10456 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
10457 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10458 NDR_PULL_ALLOC(ndr, r->out.domains);
10460 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
10461 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
10462 NDR_CHECK(ndr_pull_lsa_DomainListEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
10463 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
10464 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10466 return NDR_ERR_SUCCESS;
10469 _PUBLIC_ void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustedDomainsEx *r)
10471 ndr_print_struct(ndr, name, "lsa_EnumTrustedDomainsEx");
10472 ndr->depth++;
10473 if (flags & NDR_SET_VALUES) {
10474 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10476 if (flags & NDR_IN) {
10477 ndr_print_struct(ndr, "in", "lsa_EnumTrustedDomainsEx");
10478 ndr->depth++;
10479 ndr_print_ptr(ndr, "handle", r->in.handle);
10480 ndr->depth++;
10481 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10482 ndr->depth--;
10483 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
10484 ndr->depth++;
10485 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
10486 ndr->depth--;
10487 ndr_print_uint32(ndr, "max_size", r->in.max_size);
10488 ndr->depth--;
10490 if (flags & NDR_OUT) {
10491 ndr_print_struct(ndr, "out", "lsa_EnumTrustedDomainsEx");
10492 ndr->depth++;
10493 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
10494 ndr->depth++;
10495 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
10496 ndr->depth--;
10497 ndr_print_ptr(ndr, "domains", r->out.domains);
10498 ndr->depth++;
10499 ndr_print_lsa_DomainListEx(ndr, "domains", r->out.domains);
10500 ndr->depth--;
10501 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10502 ndr->depth--;
10504 ndr->depth--;
10507 static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx *r)
10509 if (flags & NDR_IN) {
10510 if (r->in.policy_handle == NULL) {
10511 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10513 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
10514 if (r->in.info == NULL) {
10515 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10517 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10518 if (r->in.auth_info == NULL) {
10519 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10521 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
10522 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
10524 if (flags & NDR_OUT) {
10525 if (r->out.trustdom_handle == NULL) {
10526 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10528 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10529 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10531 return NDR_ERR_SUCCESS;
10534 static enum ndr_err_code ndr_pull_lsa_CreateTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx *r)
10536 TALLOC_CTX *_mem_save_policy_handle_0;
10537 TALLOC_CTX *_mem_save_info_0;
10538 TALLOC_CTX *_mem_save_auth_info_0;
10539 TALLOC_CTX *_mem_save_trustdom_handle_0;
10540 if (flags & NDR_IN) {
10541 ZERO_STRUCT(r->out);
10543 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10544 NDR_PULL_ALLOC(ndr, r->in.policy_handle);
10546 _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10547 NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
10548 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
10549 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
10550 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10551 NDR_PULL_ALLOC(ndr, r->in.info);
10553 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10554 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
10555 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10556 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10557 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10558 NDR_PULL_ALLOC(ndr, r->in.auth_info);
10560 _mem_save_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10561 NDR_PULL_SET_MEM_CTX(ndr, r->in.auth_info, LIBNDR_FLAG_REF_ALLOC);
10562 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
10563 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_info_0, LIBNDR_FLAG_REF_ALLOC);
10564 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
10565 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10566 ZERO_STRUCTP(r->out.trustdom_handle);
10568 if (flags & NDR_OUT) {
10569 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10570 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10572 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10573 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
10574 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10575 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
10576 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10578 return NDR_ERR_SUCCESS;
10581 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx *r)
10583 ndr_print_struct(ndr, name, "lsa_CreateTrustedDomainEx");
10584 ndr->depth++;
10585 if (flags & NDR_SET_VALUES) {
10586 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10588 if (flags & NDR_IN) {
10589 ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomainEx");
10590 ndr->depth++;
10591 ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
10592 ndr->depth++;
10593 ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
10594 ndr->depth--;
10595 ndr_print_ptr(ndr, "info", r->in.info);
10596 ndr->depth++;
10597 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info", r->in.info);
10598 ndr->depth--;
10599 ndr_print_ptr(ndr, "auth_info", r->in.auth_info);
10600 ndr->depth++;
10601 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", r->in.auth_info);
10602 ndr->depth--;
10603 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
10604 ndr->depth--;
10606 if (flags & NDR_OUT) {
10607 ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomainEx");
10608 ndr->depth++;
10609 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
10610 ndr->depth++;
10611 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
10612 ndr->depth--;
10613 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10614 ndr->depth--;
10616 ndr->depth--;
10619 static enum ndr_err_code ndr_push_lsa_CloseTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CloseTrustedDomainEx *r)
10621 if (flags & NDR_IN) {
10622 if (r->in.handle == NULL) {
10623 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10625 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10627 if (flags & NDR_OUT) {
10628 if (r->out.handle == NULL) {
10629 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10631 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
10632 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10634 return NDR_ERR_SUCCESS;
10637 static enum ndr_err_code ndr_pull_lsa_CloseTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CloseTrustedDomainEx *r)
10639 TALLOC_CTX *_mem_save_handle_0;
10640 if (flags & NDR_IN) {
10641 ZERO_STRUCT(r->out);
10643 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10644 NDR_PULL_ALLOC(ndr, r->in.handle);
10646 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10647 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10648 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10649 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10650 NDR_PULL_ALLOC(ndr, r->out.handle);
10651 *r->out.handle = *r->in.handle;
10653 if (flags & NDR_OUT) {
10654 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10655 NDR_PULL_ALLOC(ndr, r->out.handle);
10657 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10658 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
10659 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
10660 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10661 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10663 return NDR_ERR_SUCCESS;
10666 _PUBLIC_ void ndr_print_lsa_CloseTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CloseTrustedDomainEx *r)
10668 ndr_print_struct(ndr, name, "lsa_CloseTrustedDomainEx");
10669 ndr->depth++;
10670 if (flags & NDR_SET_VALUES) {
10671 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10673 if (flags & NDR_IN) {
10674 ndr_print_struct(ndr, "in", "lsa_CloseTrustedDomainEx");
10675 ndr->depth++;
10676 ndr_print_ptr(ndr, "handle", r->in.handle);
10677 ndr->depth++;
10678 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10679 ndr->depth--;
10680 ndr->depth--;
10682 if (flags & NDR_OUT) {
10683 ndr_print_struct(ndr, "out", "lsa_CloseTrustedDomainEx");
10684 ndr->depth++;
10685 ndr_print_ptr(ndr, "handle", r->out.handle);
10686 ndr->depth++;
10687 ndr_print_policy_handle(ndr, "handle", r->out.handle);
10688 ndr->depth--;
10689 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10690 ndr->depth--;
10692 ndr->depth--;
10695 static enum ndr_err_code ndr_push_lsa_QueryDomainInformationPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryDomainInformationPolicy *r)
10697 if (flags & NDR_IN) {
10698 if (r->in.handle == NULL) {
10699 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10701 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10702 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10704 if (flags & NDR_OUT) {
10705 if (r->out.info == NULL) {
10706 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10708 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
10709 if (*r->out.info) {
10710 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
10711 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10713 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10715 return NDR_ERR_SUCCESS;
10718 static enum ndr_err_code ndr_pull_lsa_QueryDomainInformationPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryDomainInformationPolicy *r)
10720 uint32_t _ptr_info;
10721 TALLOC_CTX *_mem_save_handle_0;
10722 TALLOC_CTX *_mem_save_info_0;
10723 TALLOC_CTX *_mem_save_info_1;
10724 if (flags & NDR_IN) {
10725 ZERO_STRUCT(r->out);
10727 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10728 NDR_PULL_ALLOC(ndr, r->in.handle);
10730 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10731 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10732 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10733 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10734 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10735 NDR_PULL_ALLOC(ndr, r->out.info);
10736 ZERO_STRUCTP(r->out.info);
10738 if (flags & NDR_OUT) {
10739 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10740 NDR_PULL_ALLOC(ndr, r->out.info);
10742 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10743 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10744 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10745 if (_ptr_info) {
10746 NDR_PULL_ALLOC(ndr, *r->out.info);
10747 } else {
10748 *r->out.info = NULL;
10750 if (*r->out.info) {
10751 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
10752 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
10753 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
10754 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10755 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
10757 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10758 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10760 return NDR_ERR_SUCCESS;
10763 _PUBLIC_ void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryDomainInformationPolicy *r)
10765 ndr_print_struct(ndr, name, "lsa_QueryDomainInformationPolicy");
10766 ndr->depth++;
10767 if (flags & NDR_SET_VALUES) {
10768 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10770 if (flags & NDR_IN) {
10771 ndr_print_struct(ndr, "in", "lsa_QueryDomainInformationPolicy");
10772 ndr->depth++;
10773 ndr_print_ptr(ndr, "handle", r->in.handle);
10774 ndr->depth++;
10775 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10776 ndr->depth--;
10777 ndr_print_uint16(ndr, "level", r->in.level);
10778 ndr->depth--;
10780 if (flags & NDR_OUT) {
10781 ndr_print_struct(ndr, "out", "lsa_QueryDomainInformationPolicy");
10782 ndr->depth++;
10783 ndr_print_ptr(ndr, "info", r->out.info);
10784 ndr->depth++;
10785 ndr_print_ptr(ndr, "info", *r->out.info);
10786 ndr->depth++;
10787 if (*r->out.info) {
10788 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
10789 ndr_print_lsa_DomainInformationPolicy(ndr, "info", *r->out.info);
10791 ndr->depth--;
10792 ndr->depth--;
10793 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10794 ndr->depth--;
10796 ndr->depth--;
10799 static enum ndr_err_code ndr_push_lsa_SetDomainInformationPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetDomainInformationPolicy *r)
10801 if (flags & NDR_IN) {
10802 if (r->in.handle == NULL) {
10803 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10805 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10806 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10807 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
10808 if (r->in.info) {
10809 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
10810 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10813 if (flags & NDR_OUT) {
10814 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10816 return NDR_ERR_SUCCESS;
10819 static enum ndr_err_code ndr_pull_lsa_SetDomainInformationPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetDomainInformationPolicy *r)
10821 uint32_t _ptr_info;
10822 TALLOC_CTX *_mem_save_handle_0;
10823 TALLOC_CTX *_mem_save_info_0;
10824 if (flags & NDR_IN) {
10825 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10826 NDR_PULL_ALLOC(ndr, r->in.handle);
10828 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10829 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10830 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10831 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10832 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10833 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10834 if (_ptr_info) {
10835 NDR_PULL_ALLOC(ndr, r->in.info);
10836 } else {
10837 r->in.info = NULL;
10839 if (r->in.info) {
10840 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10841 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
10842 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
10843 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10844 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
10847 if (flags & NDR_OUT) {
10848 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10850 return NDR_ERR_SUCCESS;
10853 _PUBLIC_ void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetDomainInformationPolicy *r)
10855 ndr_print_struct(ndr, name, "lsa_SetDomainInformationPolicy");
10856 ndr->depth++;
10857 if (flags & NDR_SET_VALUES) {
10858 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10860 if (flags & NDR_IN) {
10861 ndr_print_struct(ndr, "in", "lsa_SetDomainInformationPolicy");
10862 ndr->depth++;
10863 ndr_print_ptr(ndr, "handle", r->in.handle);
10864 ndr->depth++;
10865 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10866 ndr->depth--;
10867 ndr_print_uint16(ndr, "level", r->in.level);
10868 ndr_print_ptr(ndr, "info", r->in.info);
10869 ndr->depth++;
10870 if (r->in.info) {
10871 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
10872 ndr_print_lsa_DomainInformationPolicy(ndr, "info", r->in.info);
10874 ndr->depth--;
10875 ndr->depth--;
10877 if (flags & NDR_OUT) {
10878 ndr_print_struct(ndr, "out", "lsa_SetDomainInformationPolicy");
10879 ndr->depth++;
10880 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10881 ndr->depth--;
10883 ndr->depth--;
10886 static enum ndr_err_code ndr_push_lsa_OpenTrustedDomainByName(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomainByName *r)
10888 if (flags & NDR_IN) {
10889 if (r->in.handle == NULL) {
10890 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10892 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10893 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
10894 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
10896 if (flags & NDR_OUT) {
10897 if (r->out.trustdom_handle == NULL) {
10898 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10900 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10901 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10903 return NDR_ERR_SUCCESS;
10906 static enum ndr_err_code ndr_pull_lsa_OpenTrustedDomainByName(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomainByName *r)
10908 TALLOC_CTX *_mem_save_handle_0;
10909 TALLOC_CTX *_mem_save_trustdom_handle_0;
10910 if (flags & NDR_IN) {
10911 ZERO_STRUCT(r->out);
10913 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10914 NDR_PULL_ALLOC(ndr, r->in.handle);
10916 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10917 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10918 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10919 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10920 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
10921 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
10922 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10923 ZERO_STRUCTP(r->out.trustdom_handle);
10925 if (flags & NDR_OUT) {
10926 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10927 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10929 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10930 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
10931 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10932 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
10933 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10935 return NDR_ERR_SUCCESS;
10938 _PUBLIC_ void ndr_print_lsa_OpenTrustedDomainByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomainByName *r)
10940 ndr_print_struct(ndr, name, "lsa_OpenTrustedDomainByName");
10941 ndr->depth++;
10942 if (flags & NDR_SET_VALUES) {
10943 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10945 if (flags & NDR_IN) {
10946 ndr_print_struct(ndr, "in", "lsa_OpenTrustedDomainByName");
10947 ndr->depth++;
10948 ndr_print_ptr(ndr, "handle", r->in.handle);
10949 ndr->depth++;
10950 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10951 ndr->depth--;
10952 ndr_print_lsa_String(ndr, "name", &r->in.name);
10953 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
10954 ndr->depth--;
10956 if (flags & NDR_OUT) {
10957 ndr_print_struct(ndr, "out", "lsa_OpenTrustedDomainByName");
10958 ndr->depth++;
10959 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
10960 ndr->depth++;
10961 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
10962 ndr->depth--;
10963 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10964 ndr->depth--;
10966 ndr->depth--;
10969 static enum ndr_err_code ndr_push_lsa_TestCall(struct ndr_push *ndr, int flags, const struct lsa_TestCall *r)
10971 if (flags & NDR_IN) {
10973 if (flags & NDR_OUT) {
10974 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10976 return NDR_ERR_SUCCESS;
10979 static enum ndr_err_code ndr_pull_lsa_TestCall(struct ndr_pull *ndr, int flags, struct lsa_TestCall *r)
10981 if (flags & NDR_IN) {
10983 if (flags & NDR_OUT) {
10984 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10986 return NDR_ERR_SUCCESS;
10989 _PUBLIC_ void ndr_print_lsa_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct lsa_TestCall *r)
10991 ndr_print_struct(ndr, name, "lsa_TestCall");
10992 ndr->depth++;
10993 if (flags & NDR_SET_VALUES) {
10994 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10996 if (flags & NDR_IN) {
10997 ndr_print_struct(ndr, "in", "lsa_TestCall");
10998 ndr->depth++;
10999 ndr->depth--;
11001 if (flags & NDR_OUT) {
11002 ndr_print_struct(ndr, "out", "lsa_TestCall");
11003 ndr->depth++;
11004 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11005 ndr->depth--;
11007 ndr->depth--;
11010 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flags, const struct lsa_LookupSids2 *r)
11012 if (flags & NDR_IN) {
11013 if (r->in.handle == NULL) {
11014 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11016 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11017 if (r->in.sids == NULL) {
11018 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11020 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11021 if (r->in.names == NULL) {
11022 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11024 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
11025 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
11026 if (r->in.count == NULL) {
11027 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11029 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
11030 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options));
11031 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision));
11033 if (flags & NDR_OUT) {
11034 if (r->out.domains == NULL) {
11035 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11037 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
11038 if (*r->out.domains) {
11039 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11041 if (r->out.names == NULL) {
11042 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11044 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
11045 if (r->out.count == NULL) {
11046 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11048 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
11049 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11051 return NDR_ERR_SUCCESS;
11054 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int flags, struct lsa_LookupSids2 *r)
11056 uint32_t _ptr_domains;
11057 TALLOC_CTX *_mem_save_handle_0;
11058 TALLOC_CTX *_mem_save_sids_0;
11059 TALLOC_CTX *_mem_save_domains_0;
11060 TALLOC_CTX *_mem_save_domains_1;
11061 TALLOC_CTX *_mem_save_names_0;
11062 TALLOC_CTX *_mem_save_count_0;
11063 if (flags & NDR_IN) {
11064 ZERO_STRUCT(r->out);
11066 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11067 NDR_PULL_ALLOC(ndr, r->in.handle);
11069 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11070 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
11071 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11072 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
11073 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11074 NDR_PULL_ALLOC(ndr, r->in.sids);
11076 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11077 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
11078 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11079 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11080 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11081 NDR_PULL_ALLOC(ndr, r->in.names);
11083 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
11084 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
11085 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
11086 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
11087 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
11088 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11089 NDR_PULL_ALLOC(ndr, r->in.count);
11091 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11092 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
11093 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
11094 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11095 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options));
11096 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision));
11097 NDR_PULL_ALLOC(ndr, r->out.domains);
11098 ZERO_STRUCTP(r->out.domains);
11099 NDR_PULL_ALLOC(ndr, r->out.names);
11100 *r->out.names = *r->in.names;
11101 NDR_PULL_ALLOC(ndr, r->out.count);
11102 *r->out.count = *r->in.count;
11104 if (flags & NDR_OUT) {
11105 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11106 NDR_PULL_ALLOC(ndr, r->out.domains);
11108 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
11109 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
11110 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
11111 if (_ptr_domains) {
11112 NDR_PULL_ALLOC(ndr, *r->out.domains);
11113 } else {
11114 *r->out.domains = NULL;
11116 if (*r->out.domains) {
11117 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
11118 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
11119 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11120 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
11122 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
11123 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11124 NDR_PULL_ALLOC(ndr, r->out.names);
11126 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
11127 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
11128 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
11129 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
11130 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11131 NDR_PULL_ALLOC(ndr, r->out.count);
11133 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11134 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
11135 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
11136 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11137 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11139 return NDR_ERR_SUCCESS;
11142 _PUBLIC_ void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids2 *r)
11144 ndr_print_struct(ndr, name, "lsa_LookupSids2");
11145 ndr->depth++;
11146 if (flags & NDR_SET_VALUES) {
11147 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11149 if (flags & NDR_IN) {
11150 ndr_print_struct(ndr, "in", "lsa_LookupSids2");
11151 ndr->depth++;
11152 ndr_print_ptr(ndr, "handle", r->in.handle);
11153 ndr->depth++;
11154 ndr_print_policy_handle(ndr, "handle", r->in.handle);
11155 ndr->depth--;
11156 ndr_print_ptr(ndr, "sids", r->in.sids);
11157 ndr->depth++;
11158 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
11159 ndr->depth--;
11160 ndr_print_ptr(ndr, "names", r->in.names);
11161 ndr->depth++;
11162 ndr_print_lsa_TransNameArray2(ndr, "names", r->in.names);
11163 ndr->depth--;
11164 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
11165 ndr_print_ptr(ndr, "count", r->in.count);
11166 ndr->depth++;
11167 ndr_print_uint32(ndr, "count", *r->in.count);
11168 ndr->depth--;
11169 ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options);
11170 ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision);
11171 ndr->depth--;
11173 if (flags & NDR_OUT) {
11174 ndr_print_struct(ndr, "out", "lsa_LookupSids2");
11175 ndr->depth++;
11176 ndr_print_ptr(ndr, "domains", r->out.domains);
11177 ndr->depth++;
11178 ndr_print_ptr(ndr, "domains", *r->out.domains);
11179 ndr->depth++;
11180 if (*r->out.domains) {
11181 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
11183 ndr->depth--;
11184 ndr->depth--;
11185 ndr_print_ptr(ndr, "names", r->out.names);
11186 ndr->depth++;
11187 ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names);
11188 ndr->depth--;
11189 ndr_print_ptr(ndr, "count", r->out.count);
11190 ndr->depth++;
11191 ndr_print_uint32(ndr, "count", *r->out.count);
11192 ndr->depth--;
11193 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11194 ndr->depth--;
11196 ndr->depth--;
11199 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int flags, const struct lsa_LookupNames2 *r)
11201 uint32_t cntr_names_0;
11202 if (flags & NDR_IN) {
11203 if (r->in.handle == NULL) {
11204 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11206 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11207 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
11208 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_names));
11209 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11210 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
11212 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11213 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
11215 if (r->in.sids == NULL) {
11216 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11218 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11219 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
11220 if (r->in.count == NULL) {
11221 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11223 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
11224 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options));
11225 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision));
11227 if (flags & NDR_OUT) {
11228 if (r->out.domains == NULL) {
11229 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11231 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
11232 if (*r->out.domains) {
11233 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11235 if (r->out.sids == NULL) {
11236 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11238 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
11239 if (r->out.count == NULL) {
11240 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11242 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
11243 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11245 return NDR_ERR_SUCCESS;
11248 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int flags, struct lsa_LookupNames2 *r)
11250 uint32_t cntr_names_0;
11251 uint32_t _ptr_domains;
11252 TALLOC_CTX *_mem_save_handle_0;
11253 TALLOC_CTX *_mem_save_names_0;
11254 TALLOC_CTX *_mem_save_domains_0;
11255 TALLOC_CTX *_mem_save_domains_1;
11256 TALLOC_CTX *_mem_save_sids_0;
11257 TALLOC_CTX *_mem_save_count_0;
11258 if (flags & NDR_IN) {
11259 ZERO_STRUCT(r->out);
11261 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11262 NDR_PULL_ALLOC(ndr, r->in.handle);
11264 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11265 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
11266 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11267 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
11268 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
11269 if (r->in.num_names > 1000) {
11270 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
11272 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
11273 NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
11274 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
11275 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
11276 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11277 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
11279 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11280 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
11282 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
11283 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11284 NDR_PULL_ALLOC(ndr, r->in.sids);
11286 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11287 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
11288 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11289 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11290 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
11291 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11292 NDR_PULL_ALLOC(ndr, r->in.count);
11294 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11295 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
11296 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
11297 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11298 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options));
11299 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision));
11300 NDR_PULL_ALLOC(ndr, r->out.domains);
11301 ZERO_STRUCTP(r->out.domains);
11302 NDR_PULL_ALLOC(ndr, r->out.sids);
11303 *r->out.sids = *r->in.sids;
11304 NDR_PULL_ALLOC(ndr, r->out.count);
11305 *r->out.count = *r->in.count;
11306 if (r->in.names) {
11307 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
11310 if (flags & NDR_OUT) {
11311 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11312 NDR_PULL_ALLOC(ndr, r->out.domains);
11314 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
11315 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
11316 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
11317 if (_ptr_domains) {
11318 NDR_PULL_ALLOC(ndr, *r->out.domains);
11319 } else {
11320 *r->out.domains = NULL;
11322 if (*r->out.domains) {
11323 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
11324 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
11325 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11326 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
11328 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
11329 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11330 NDR_PULL_ALLOC(ndr, r->out.sids);
11332 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11333 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
11334 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
11335 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11336 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11337 NDR_PULL_ALLOC(ndr, r->out.count);
11339 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11340 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
11341 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
11342 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11343 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11345 return NDR_ERR_SUCCESS;
11348 _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames2 *r)
11350 uint32_t cntr_names_0;
11351 ndr_print_struct(ndr, name, "lsa_LookupNames2");
11352 ndr->depth++;
11353 if (flags & NDR_SET_VALUES) {
11354 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11356 if (flags & NDR_IN) {
11357 ndr_print_struct(ndr, "in", "lsa_LookupNames2");
11358 ndr->depth++;
11359 ndr_print_ptr(ndr, "handle", r->in.handle);
11360 ndr->depth++;
11361 ndr_print_policy_handle(ndr, "handle", r->in.handle);
11362 ndr->depth--;
11363 ndr_print_uint32(ndr, "num_names", r->in.num_names);
11364 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
11365 ndr->depth++;
11366 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
11367 char *idx_0=NULL;
11368 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
11369 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
11370 free(idx_0);
11373 ndr->depth--;
11374 ndr_print_ptr(ndr, "sids", r->in.sids);
11375 ndr->depth++;
11376 ndr_print_lsa_TransSidArray2(ndr, "sids", r->in.sids);
11377 ndr->depth--;
11378 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
11379 ndr_print_ptr(ndr, "count", r->in.count);
11380 ndr->depth++;
11381 ndr_print_uint32(ndr, "count", *r->in.count);
11382 ndr->depth--;
11383 ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options);
11384 ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision);
11385 ndr->depth--;
11387 if (flags & NDR_OUT) {
11388 ndr_print_struct(ndr, "out", "lsa_LookupNames2");
11389 ndr->depth++;
11390 ndr_print_ptr(ndr, "domains", r->out.domains);
11391 ndr->depth++;
11392 ndr_print_ptr(ndr, "domains", *r->out.domains);
11393 ndr->depth++;
11394 if (*r->out.domains) {
11395 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
11397 ndr->depth--;
11398 ndr->depth--;
11399 ndr_print_ptr(ndr, "sids", r->out.sids);
11400 ndr->depth++;
11401 ndr_print_lsa_TransSidArray2(ndr, "sids", r->out.sids);
11402 ndr->depth--;
11403 ndr_print_ptr(ndr, "count", r->out.count);
11404 ndr->depth++;
11405 ndr_print_uint32(ndr, "count", *r->out.count);
11406 ndr->depth--;
11407 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11408 ndr->depth--;
11410 ndr->depth--;
11413 static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx2 *r)
11415 if (flags & NDR_IN) {
11416 if (r->in.policy_handle == NULL) {
11417 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11419 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
11420 if (r->in.info == NULL) {
11421 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11423 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
11424 if (r->in.auth_info == NULL) {
11425 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11427 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
11428 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
11430 if (flags & NDR_OUT) {
11431 if (r->out.trustdom_handle == NULL) {
11432 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11434 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
11435 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11437 return NDR_ERR_SUCCESS;
11440 static enum ndr_err_code ndr_pull_lsa_CreateTrustedDomainEx2(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx2 *r)
11442 TALLOC_CTX *_mem_save_policy_handle_0;
11443 TALLOC_CTX *_mem_save_info_0;
11444 TALLOC_CTX *_mem_save_auth_info_0;
11445 TALLOC_CTX *_mem_save_trustdom_handle_0;
11446 if (flags & NDR_IN) {
11447 ZERO_STRUCT(r->out);
11449 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11450 NDR_PULL_ALLOC(ndr, r->in.policy_handle);
11452 _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11453 NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
11454 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
11455 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
11456 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11457 NDR_PULL_ALLOC(ndr, r->in.info);
11459 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11460 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
11461 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
11462 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
11463 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11464 NDR_PULL_ALLOC(ndr, r->in.auth_info);
11466 _mem_save_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11467 NDR_PULL_SET_MEM_CTX(ndr, r->in.auth_info, LIBNDR_FLAG_REF_ALLOC);
11468 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
11469 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_info_0, LIBNDR_FLAG_REF_ALLOC);
11470 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
11471 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
11472 ZERO_STRUCTP(r->out.trustdom_handle);
11474 if (flags & NDR_OUT) {
11475 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11476 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
11478 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11479 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
11480 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
11481 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
11482 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11484 return NDR_ERR_SUCCESS;
11487 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx2 *r)
11489 ndr_print_struct(ndr, name, "lsa_CreateTrustedDomainEx2");
11490 ndr->depth++;
11491 if (flags & NDR_SET_VALUES) {
11492 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11494 if (flags & NDR_IN) {
11495 ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomainEx2");
11496 ndr->depth++;
11497 ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
11498 ndr->depth++;
11499 ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
11500 ndr->depth--;
11501 ndr_print_ptr(ndr, "info", r->in.info);
11502 ndr->depth++;
11503 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info", r->in.info);
11504 ndr->depth--;
11505 ndr_print_ptr(ndr, "auth_info", r->in.auth_info);
11506 ndr->depth++;
11507 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", r->in.auth_info);
11508 ndr->depth--;
11509 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
11510 ndr->depth--;
11512 if (flags & NDR_OUT) {
11513 ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomainEx2");
11514 ndr->depth++;
11515 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
11516 ndr->depth++;
11517 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
11518 ndr->depth--;
11519 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11520 ndr->depth--;
11522 ndr->depth--;
11525 static enum ndr_err_code ndr_push_lsa_CREDRWRITE(struct ndr_push *ndr, int flags, const struct lsa_CREDRWRITE *r)
11527 if (flags & NDR_IN) {
11529 if (flags & NDR_OUT) {
11530 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11532 return NDR_ERR_SUCCESS;
11535 static enum ndr_err_code ndr_pull_lsa_CREDRWRITE(struct ndr_pull *ndr, int flags, struct lsa_CREDRWRITE *r)
11537 if (flags & NDR_IN) {
11539 if (flags & NDR_OUT) {
11540 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11542 return NDR_ERR_SUCCESS;
11545 _PUBLIC_ void ndr_print_lsa_CREDRWRITE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITE *r)
11547 ndr_print_struct(ndr, name, "lsa_CREDRWRITE");
11548 ndr->depth++;
11549 if (flags & NDR_SET_VALUES) {
11550 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11552 if (flags & NDR_IN) {
11553 ndr_print_struct(ndr, "in", "lsa_CREDRWRITE");
11554 ndr->depth++;
11555 ndr->depth--;
11557 if (flags & NDR_OUT) {
11558 ndr_print_struct(ndr, "out", "lsa_CREDRWRITE");
11559 ndr->depth++;
11560 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11561 ndr->depth--;
11563 ndr->depth--;
11566 static enum ndr_err_code ndr_push_lsa_CREDRREAD(struct ndr_push *ndr, int flags, const struct lsa_CREDRREAD *r)
11568 if (flags & NDR_IN) {
11570 if (flags & NDR_OUT) {
11571 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11573 return NDR_ERR_SUCCESS;
11576 static enum ndr_err_code ndr_pull_lsa_CREDRREAD(struct ndr_pull *ndr, int flags, struct lsa_CREDRREAD *r)
11578 if (flags & NDR_IN) {
11580 if (flags & NDR_OUT) {
11581 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11583 return NDR_ERR_SUCCESS;
11586 _PUBLIC_ void ndr_print_lsa_CREDRREAD(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREAD *r)
11588 ndr_print_struct(ndr, name, "lsa_CREDRREAD");
11589 ndr->depth++;
11590 if (flags & NDR_SET_VALUES) {
11591 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11593 if (flags & NDR_IN) {
11594 ndr_print_struct(ndr, "in", "lsa_CREDRREAD");
11595 ndr->depth++;
11596 ndr->depth--;
11598 if (flags & NDR_OUT) {
11599 ndr_print_struct(ndr, "out", "lsa_CREDRREAD");
11600 ndr->depth++;
11601 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11602 ndr->depth--;
11604 ndr->depth--;
11607 static enum ndr_err_code ndr_push_lsa_CREDRENUMERATE(struct ndr_push *ndr, int flags, const struct lsa_CREDRENUMERATE *r)
11609 if (flags & NDR_IN) {
11611 if (flags & NDR_OUT) {
11612 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11614 return NDR_ERR_SUCCESS;
11617 static enum ndr_err_code ndr_pull_lsa_CREDRENUMERATE(struct ndr_pull *ndr, int flags, struct lsa_CREDRENUMERATE *r)
11619 if (flags & NDR_IN) {
11621 if (flags & NDR_OUT) {
11622 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11624 return NDR_ERR_SUCCESS;
11627 _PUBLIC_ void ndr_print_lsa_CREDRENUMERATE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRENUMERATE *r)
11629 ndr_print_struct(ndr, name, "lsa_CREDRENUMERATE");
11630 ndr->depth++;
11631 if (flags & NDR_SET_VALUES) {
11632 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11634 if (flags & NDR_IN) {
11635 ndr_print_struct(ndr, "in", "lsa_CREDRENUMERATE");
11636 ndr->depth++;
11637 ndr->depth--;
11639 if (flags & NDR_OUT) {
11640 ndr_print_struct(ndr, "out", "lsa_CREDRENUMERATE");
11641 ndr->depth++;
11642 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11643 ndr->depth--;
11645 ndr->depth--;
11648 static enum ndr_err_code ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_push *ndr, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
11650 if (flags & NDR_IN) {
11652 if (flags & NDR_OUT) {
11653 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11655 return NDR_ERR_SUCCESS;
11658 static enum ndr_err_code ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_pull *ndr, int flags, struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
11660 if (flags & NDR_IN) {
11662 if (flags & NDR_OUT) {
11663 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11665 return NDR_ERR_SUCCESS;
11668 _PUBLIC_ void ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
11670 ndr_print_struct(ndr, name, "lsa_CREDRWRITEDOMAINCREDENTIALS");
11671 ndr->depth++;
11672 if (flags & NDR_SET_VALUES) {
11673 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11675 if (flags & NDR_IN) {
11676 ndr_print_struct(ndr, "in", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11677 ndr->depth++;
11678 ndr->depth--;
11680 if (flags & NDR_OUT) {
11681 ndr_print_struct(ndr, "out", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11682 ndr->depth++;
11683 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11684 ndr->depth--;
11686 ndr->depth--;
11689 static enum ndr_err_code ndr_push_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_push *ndr, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r)
11691 if (flags & NDR_IN) {
11693 if (flags & NDR_OUT) {
11694 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11696 return NDR_ERR_SUCCESS;
11699 static enum ndr_err_code ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_pull *ndr, int flags, struct lsa_CREDRREADDOMAINCREDENTIALS *r)
11701 if (flags & NDR_IN) {
11703 if (flags & NDR_OUT) {
11704 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11706 return NDR_ERR_SUCCESS;
11709 _PUBLIC_ void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r)
11711 ndr_print_struct(ndr, name, "lsa_CREDRREADDOMAINCREDENTIALS");
11712 ndr->depth++;
11713 if (flags & NDR_SET_VALUES) {
11714 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11716 if (flags & NDR_IN) {
11717 ndr_print_struct(ndr, "in", "lsa_CREDRREADDOMAINCREDENTIALS");
11718 ndr->depth++;
11719 ndr->depth--;
11721 if (flags & NDR_OUT) {
11722 ndr_print_struct(ndr, "out", "lsa_CREDRREADDOMAINCREDENTIALS");
11723 ndr->depth++;
11724 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11725 ndr->depth--;
11727 ndr->depth--;
11730 static enum ndr_err_code ndr_push_lsa_CREDRDELETE(struct ndr_push *ndr, int flags, const struct lsa_CREDRDELETE *r)
11732 if (flags & NDR_IN) {
11734 if (flags & NDR_OUT) {
11735 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11737 return NDR_ERR_SUCCESS;
11740 static enum ndr_err_code ndr_pull_lsa_CREDRDELETE(struct ndr_pull *ndr, int flags, struct lsa_CREDRDELETE *r)
11742 if (flags & NDR_IN) {
11744 if (flags & NDR_OUT) {
11745 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11747 return NDR_ERR_SUCCESS;
11750 _PUBLIC_ void ndr_print_lsa_CREDRDELETE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRDELETE *r)
11752 ndr_print_struct(ndr, name, "lsa_CREDRDELETE");
11753 ndr->depth++;
11754 if (flags & NDR_SET_VALUES) {
11755 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11757 if (flags & NDR_IN) {
11758 ndr_print_struct(ndr, "in", "lsa_CREDRDELETE");
11759 ndr->depth++;
11760 ndr->depth--;
11762 if (flags & NDR_OUT) {
11763 ndr_print_struct(ndr, "out", "lsa_CREDRDELETE");
11764 ndr->depth++;
11765 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11766 ndr->depth--;
11768 ndr->depth--;
11771 static enum ndr_err_code ndr_push_lsa_CREDRGETTARGETINFO(struct ndr_push *ndr, int flags, const struct lsa_CREDRGETTARGETINFO *r)
11773 if (flags & NDR_IN) {
11775 if (flags & NDR_OUT) {
11776 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11778 return NDR_ERR_SUCCESS;
11781 static enum ndr_err_code ndr_pull_lsa_CREDRGETTARGETINFO(struct ndr_pull *ndr, int flags, struct lsa_CREDRGETTARGETINFO *r)
11783 if (flags & NDR_IN) {
11785 if (flags & NDR_OUT) {
11786 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11788 return NDR_ERR_SUCCESS;
11791 _PUBLIC_ void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETTARGETINFO *r)
11793 ndr_print_struct(ndr, name, "lsa_CREDRGETTARGETINFO");
11794 ndr->depth++;
11795 if (flags & NDR_SET_VALUES) {
11796 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11798 if (flags & NDR_IN) {
11799 ndr_print_struct(ndr, "in", "lsa_CREDRGETTARGETINFO");
11800 ndr->depth++;
11801 ndr->depth--;
11803 if (flags & NDR_OUT) {
11804 ndr_print_struct(ndr, "out", "lsa_CREDRGETTARGETINFO");
11805 ndr->depth++;
11806 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11807 ndr->depth--;
11809 ndr->depth--;
11812 static enum ndr_err_code ndr_push_lsa_CREDRPROFILELOADED(struct ndr_push *ndr, int flags, const struct lsa_CREDRPROFILELOADED *r)
11814 if (flags & NDR_IN) {
11816 if (flags & NDR_OUT) {
11817 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11819 return NDR_ERR_SUCCESS;
11822 static enum ndr_err_code ndr_pull_lsa_CREDRPROFILELOADED(struct ndr_pull *ndr, int flags, struct lsa_CREDRPROFILELOADED *r)
11824 if (flags & NDR_IN) {
11826 if (flags & NDR_OUT) {
11827 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11829 return NDR_ERR_SUCCESS;
11832 _PUBLIC_ void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRPROFILELOADED *r)
11834 ndr_print_struct(ndr, name, "lsa_CREDRPROFILELOADED");
11835 ndr->depth++;
11836 if (flags & NDR_SET_VALUES) {
11837 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11839 if (flags & NDR_IN) {
11840 ndr_print_struct(ndr, "in", "lsa_CREDRPROFILELOADED");
11841 ndr->depth++;
11842 ndr->depth--;
11844 if (flags & NDR_OUT) {
11845 ndr_print_struct(ndr, "out", "lsa_CREDRPROFILELOADED");
11846 ndr->depth++;
11847 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11848 ndr->depth--;
11850 ndr->depth--;
11853 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int flags, const struct lsa_LookupNames3 *r)
11855 uint32_t cntr_names_0;
11856 if (flags & NDR_IN) {
11857 if (r->in.handle == NULL) {
11858 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11860 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11861 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
11862 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_names));
11863 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11864 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
11866 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11867 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
11869 if (r->in.sids == NULL) {
11870 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11872 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11873 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
11874 if (r->in.count == NULL) {
11875 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11877 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
11878 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options));
11879 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision));
11881 if (flags & NDR_OUT) {
11882 if (r->out.domains == NULL) {
11883 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11885 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
11886 if (*r->out.domains) {
11887 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11889 if (r->out.sids == NULL) {
11890 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11892 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
11893 if (r->out.count == NULL) {
11894 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11896 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
11897 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11899 return NDR_ERR_SUCCESS;
11902 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r)
11904 uint32_t cntr_names_0;
11905 uint32_t _ptr_domains;
11906 TALLOC_CTX *_mem_save_handle_0;
11907 TALLOC_CTX *_mem_save_names_0;
11908 TALLOC_CTX *_mem_save_domains_0;
11909 TALLOC_CTX *_mem_save_domains_1;
11910 TALLOC_CTX *_mem_save_sids_0;
11911 TALLOC_CTX *_mem_save_count_0;
11912 if (flags & NDR_IN) {
11913 ZERO_STRUCT(r->out);
11915 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11916 NDR_PULL_ALLOC(ndr, r->in.handle);
11918 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11919 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
11920 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11921 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
11922 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
11923 if (r->in.num_names > 1000) {
11924 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
11926 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
11927 NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
11928 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
11929 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
11930 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11931 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
11933 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11934 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
11936 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
11937 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11938 NDR_PULL_ALLOC(ndr, r->in.sids);
11940 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11941 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
11942 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11943 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11944 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
11945 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11946 NDR_PULL_ALLOC(ndr, r->in.count);
11948 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11949 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
11950 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
11951 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11952 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options));
11953 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision));
11954 NDR_PULL_ALLOC(ndr, r->out.domains);
11955 ZERO_STRUCTP(r->out.domains);
11956 NDR_PULL_ALLOC(ndr, r->out.sids);
11957 *r->out.sids = *r->in.sids;
11958 NDR_PULL_ALLOC(ndr, r->out.count);
11959 *r->out.count = *r->in.count;
11960 if (r->in.names) {
11961 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
11964 if (flags & NDR_OUT) {
11965 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11966 NDR_PULL_ALLOC(ndr, r->out.domains);
11968 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
11969 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
11970 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
11971 if (_ptr_domains) {
11972 NDR_PULL_ALLOC(ndr, *r->out.domains);
11973 } else {
11974 *r->out.domains = NULL;
11976 if (*r->out.domains) {
11977 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
11978 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
11979 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11980 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
11982 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
11983 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11984 NDR_PULL_ALLOC(ndr, r->out.sids);
11986 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11987 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
11988 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
11989 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11990 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11991 NDR_PULL_ALLOC(ndr, r->out.count);
11993 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11994 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
11995 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
11996 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11997 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11999 return NDR_ERR_SUCCESS;
12002 _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames3 *r)
12004 uint32_t cntr_names_0;
12005 ndr_print_struct(ndr, name, "lsa_LookupNames3");
12006 ndr->depth++;
12007 if (flags & NDR_SET_VALUES) {
12008 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12010 if (flags & NDR_IN) {
12011 ndr_print_struct(ndr, "in", "lsa_LookupNames3");
12012 ndr->depth++;
12013 ndr_print_ptr(ndr, "handle", r->in.handle);
12014 ndr->depth++;
12015 ndr_print_policy_handle(ndr, "handle", r->in.handle);
12016 ndr->depth--;
12017 ndr_print_uint32(ndr, "num_names", r->in.num_names);
12018 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
12019 ndr->depth++;
12020 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
12021 char *idx_0=NULL;
12022 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
12023 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
12024 free(idx_0);
12027 ndr->depth--;
12028 ndr_print_ptr(ndr, "sids", r->in.sids);
12029 ndr->depth++;
12030 ndr_print_lsa_TransSidArray3(ndr, "sids", r->in.sids);
12031 ndr->depth--;
12032 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
12033 ndr_print_ptr(ndr, "count", r->in.count);
12034 ndr->depth++;
12035 ndr_print_uint32(ndr, "count", *r->in.count);
12036 ndr->depth--;
12037 ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options);
12038 ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision);
12039 ndr->depth--;
12041 if (flags & NDR_OUT) {
12042 ndr_print_struct(ndr, "out", "lsa_LookupNames3");
12043 ndr->depth++;
12044 ndr_print_ptr(ndr, "domains", r->out.domains);
12045 ndr->depth++;
12046 ndr_print_ptr(ndr, "domains", *r->out.domains);
12047 ndr->depth++;
12048 if (*r->out.domains) {
12049 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
12051 ndr->depth--;
12052 ndr->depth--;
12053 ndr_print_ptr(ndr, "sids", r->out.sids);
12054 ndr->depth++;
12055 ndr_print_lsa_TransSidArray3(ndr, "sids", r->out.sids);
12056 ndr->depth--;
12057 ndr_print_ptr(ndr, "count", r->out.count);
12058 ndr->depth++;
12059 ndr_print_uint32(ndr, "count", *r->out.count);
12060 ndr->depth--;
12061 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12062 ndr->depth--;
12064 ndr->depth--;
12067 static enum ndr_err_code ndr_push_lsa_CREDRGETSESSIONTYPES(struct ndr_push *ndr, int flags, const struct lsa_CREDRGETSESSIONTYPES *r)
12069 if (flags & NDR_IN) {
12071 if (flags & NDR_OUT) {
12072 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12074 return NDR_ERR_SUCCESS;
12077 static enum ndr_err_code ndr_pull_lsa_CREDRGETSESSIONTYPES(struct ndr_pull *ndr, int flags, struct lsa_CREDRGETSESSIONTYPES *r)
12079 if (flags & NDR_IN) {
12081 if (flags & NDR_OUT) {
12082 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12084 return NDR_ERR_SUCCESS;
12087 _PUBLIC_ void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETSESSIONTYPES *r)
12089 ndr_print_struct(ndr, name, "lsa_CREDRGETSESSIONTYPES");
12090 ndr->depth++;
12091 if (flags & NDR_SET_VALUES) {
12092 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12094 if (flags & NDR_IN) {
12095 ndr_print_struct(ndr, "in", "lsa_CREDRGETSESSIONTYPES");
12096 ndr->depth++;
12097 ndr->depth--;
12099 if (flags & NDR_OUT) {
12100 ndr_print_struct(ndr, "out", "lsa_CREDRGETSESSIONTYPES");
12101 ndr->depth++;
12102 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12103 ndr->depth--;
12105 ndr->depth--;
12108 static enum ndr_err_code ndr_push_lsa_LSARREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r)
12110 if (flags & NDR_IN) {
12112 if (flags & NDR_OUT) {
12113 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12115 return NDR_ERR_SUCCESS;
12118 static enum ndr_err_code ndr_pull_lsa_LSARREGISTERAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARREGISTERAUDITEVENT *r)
12120 if (flags & NDR_IN) {
12122 if (flags & NDR_OUT) {
12123 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12125 return NDR_ERR_SUCCESS;
12128 _PUBLIC_ void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r)
12130 ndr_print_struct(ndr, name, "lsa_LSARREGISTERAUDITEVENT");
12131 ndr->depth++;
12132 if (flags & NDR_SET_VALUES) {
12133 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12135 if (flags & NDR_IN) {
12136 ndr_print_struct(ndr, "in", "lsa_LSARREGISTERAUDITEVENT");
12137 ndr->depth++;
12138 ndr->depth--;
12140 if (flags & NDR_OUT) {
12141 ndr_print_struct(ndr, "out", "lsa_LSARREGISTERAUDITEVENT");
12142 ndr->depth++;
12143 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12144 ndr->depth--;
12146 ndr->depth--;
12149 static enum ndr_err_code ndr_push_lsa_LSARGENAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARGENAUDITEVENT *r)
12151 if (flags & NDR_IN) {
12153 if (flags & NDR_OUT) {
12154 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12156 return NDR_ERR_SUCCESS;
12159 static enum ndr_err_code ndr_pull_lsa_LSARGENAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARGENAUDITEVENT *r)
12161 if (flags & NDR_IN) {
12163 if (flags & NDR_OUT) {
12164 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12166 return NDR_ERR_SUCCESS;
12169 _PUBLIC_ void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARGENAUDITEVENT *r)
12171 ndr_print_struct(ndr, name, "lsa_LSARGENAUDITEVENT");
12172 ndr->depth++;
12173 if (flags & NDR_SET_VALUES) {
12174 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12176 if (flags & NDR_IN) {
12177 ndr_print_struct(ndr, "in", "lsa_LSARGENAUDITEVENT");
12178 ndr->depth++;
12179 ndr->depth--;
12181 if (flags & NDR_OUT) {
12182 ndr_print_struct(ndr, "out", "lsa_LSARGENAUDITEVENT");
12183 ndr->depth++;
12184 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12185 ndr->depth--;
12187 ndr->depth--;
12190 static enum ndr_err_code ndr_push_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r)
12192 if (flags & NDR_IN) {
12194 if (flags & NDR_OUT) {
12195 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12197 return NDR_ERR_SUCCESS;
12200 static enum ndr_err_code ndr_pull_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARUNREGISTERAUDITEVENT *r)
12202 if (flags & NDR_IN) {
12204 if (flags & NDR_OUT) {
12205 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12207 return NDR_ERR_SUCCESS;
12210 _PUBLIC_ void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r)
12212 ndr_print_struct(ndr, name, "lsa_LSARUNREGISTERAUDITEVENT");
12213 ndr->depth++;
12214 if (flags & NDR_SET_VALUES) {
12215 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12217 if (flags & NDR_IN) {
12218 ndr_print_struct(ndr, "in", "lsa_LSARUNREGISTERAUDITEVENT");
12219 ndr->depth++;
12220 ndr->depth--;
12222 if (flags & NDR_OUT) {
12223 ndr_print_struct(ndr, "out", "lsa_LSARUNREGISTERAUDITEVENT");
12224 ndr->depth++;
12225 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12226 ndr->depth--;
12228 ndr->depth--;
12231 static enum ndr_err_code ndr_push_lsa_lsaRQueryForestTrustInformation(struct ndr_push *ndr, int flags, const struct lsa_lsaRQueryForestTrustInformation *r)
12233 if (flags & NDR_IN) {
12234 if (r->in.handle == NULL) {
12235 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12237 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
12238 if (r->in.trusted_domain_name == NULL) {
12239 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12241 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain_name));
12242 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.unknown));
12244 if (flags & NDR_OUT) {
12245 if (r->out.forest_trust_info == NULL) {
12246 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12248 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.forest_trust_info));
12249 if (*r->out.forest_trust_info) {
12250 NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
12252 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12254 return NDR_ERR_SUCCESS;
12257 static enum ndr_err_code ndr_pull_lsa_lsaRQueryForestTrustInformation(struct ndr_pull *ndr, int flags, struct lsa_lsaRQueryForestTrustInformation *r)
12259 uint32_t _ptr_forest_trust_info;
12260 TALLOC_CTX *_mem_save_handle_0;
12261 TALLOC_CTX *_mem_save_trusted_domain_name_0;
12262 TALLOC_CTX *_mem_save_forest_trust_info_0;
12263 TALLOC_CTX *_mem_save_forest_trust_info_1;
12264 if (flags & NDR_IN) {
12265 ZERO_STRUCT(r->out);
12267 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12268 NDR_PULL_ALLOC(ndr, r->in.handle);
12270 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
12271 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
12272 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
12273 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
12274 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12275 NDR_PULL_ALLOC(ndr, r->in.trusted_domain_name);
12277 _mem_save_trusted_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12278 NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain_name, LIBNDR_FLAG_REF_ALLOC);
12279 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain_name));
12280 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_name_0, LIBNDR_FLAG_REF_ALLOC);
12281 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.unknown));
12282 NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
12283 ZERO_STRUCTP(r->out.forest_trust_info);
12285 if (flags & NDR_OUT) {
12286 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12287 NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
12289 _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
12290 NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC);
12291 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_info));
12292 if (_ptr_forest_trust_info) {
12293 NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info);
12294 } else {
12295 *r->out.forest_trust_info = NULL;
12297 if (*r->out.forest_trust_info) {
12298 _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
12299 NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, 0);
12300 NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
12301 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, 0);
12303 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC);
12304 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12306 return NDR_ERR_SUCCESS;
12309 _PUBLIC_ void ndr_print_lsa_lsaRQueryForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct lsa_lsaRQueryForestTrustInformation *r)
12311 ndr_print_struct(ndr, name, "lsa_lsaRQueryForestTrustInformation");
12312 ndr->depth++;
12313 if (flags & NDR_SET_VALUES) {
12314 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12316 if (flags & NDR_IN) {
12317 ndr_print_struct(ndr, "in", "lsa_lsaRQueryForestTrustInformation");
12318 ndr->depth++;
12319 ndr_print_ptr(ndr, "handle", r->in.handle);
12320 ndr->depth++;
12321 ndr_print_policy_handle(ndr, "handle", r->in.handle);
12322 ndr->depth--;
12323 ndr_print_ptr(ndr, "trusted_domain_name", r->in.trusted_domain_name);
12324 ndr->depth++;
12325 ndr_print_lsa_String(ndr, "trusted_domain_name", r->in.trusted_domain_name);
12326 ndr->depth--;
12327 ndr_print_uint16(ndr, "unknown", r->in.unknown);
12328 ndr->depth--;
12330 if (flags & NDR_OUT) {
12331 ndr_print_struct(ndr, "out", "lsa_lsaRQueryForestTrustInformation");
12332 ndr->depth++;
12333 ndr_print_ptr(ndr, "forest_trust_info", r->out.forest_trust_info);
12334 ndr->depth++;
12335 ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info);
12336 ndr->depth++;
12337 if (*r->out.forest_trust_info) {
12338 ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info);
12340 ndr->depth--;
12341 ndr->depth--;
12342 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12343 ndr->depth--;
12345 ndr->depth--;
12348 static enum ndr_err_code ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
12350 if (flags & NDR_IN) {
12352 if (flags & NDR_OUT) {
12353 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12355 return NDR_ERR_SUCCESS;
12358 static enum ndr_err_code ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
12360 if (flags & NDR_IN) {
12362 if (flags & NDR_OUT) {
12363 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12365 return NDR_ERR_SUCCESS;
12368 _PUBLIC_ void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
12370 ndr_print_struct(ndr, name, "lsa_LSARSETFORESTTRUSTINFORMATION");
12371 ndr->depth++;
12372 if (flags & NDR_SET_VALUES) {
12373 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12375 if (flags & NDR_IN) {
12376 ndr_print_struct(ndr, "in", "lsa_LSARSETFORESTTRUSTINFORMATION");
12377 ndr->depth++;
12378 ndr->depth--;
12380 if (flags & NDR_OUT) {
12381 ndr_print_struct(ndr, "out", "lsa_LSARSETFORESTTRUSTINFORMATION");
12382 ndr->depth++;
12383 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12384 ndr->depth--;
12386 ndr->depth--;
12389 static enum ndr_err_code ndr_push_lsa_CREDRRENAME(struct ndr_push *ndr, int flags, const struct lsa_CREDRRENAME *r)
12391 if (flags & NDR_IN) {
12393 if (flags & NDR_OUT) {
12394 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12396 return NDR_ERR_SUCCESS;
12399 static enum ndr_err_code ndr_pull_lsa_CREDRRENAME(struct ndr_pull *ndr, int flags, struct lsa_CREDRRENAME *r)
12401 if (flags & NDR_IN) {
12403 if (flags & NDR_OUT) {
12404 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12406 return NDR_ERR_SUCCESS;
12409 _PUBLIC_ void ndr_print_lsa_CREDRRENAME(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRRENAME *r)
12411 ndr_print_struct(ndr, name, "lsa_CREDRRENAME");
12412 ndr->depth++;
12413 if (flags & NDR_SET_VALUES) {
12414 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12416 if (flags & NDR_IN) {
12417 ndr_print_struct(ndr, "in", "lsa_CREDRRENAME");
12418 ndr->depth++;
12419 ndr->depth--;
12421 if (flags & NDR_OUT) {
12422 ndr_print_struct(ndr, "out", "lsa_CREDRRENAME");
12423 ndr->depth++;
12424 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12425 ndr->depth--;
12427 ndr->depth--;
12430 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flags, const struct lsa_LookupSids3 *r)
12432 if (flags & NDR_IN) {
12433 if (r->in.sids == NULL) {
12434 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12436 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12437 if (r->in.names == NULL) {
12438 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12440 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
12441 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
12442 if (r->in.count == NULL) {
12443 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12445 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
12446 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options));
12447 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision));
12449 if (flags & NDR_OUT) {
12450 if (r->out.domains == NULL) {
12451 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12453 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
12454 if (*r->out.domains) {
12455 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12457 if (r->out.names == NULL) {
12458 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12460 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
12461 if (r->out.count == NULL) {
12462 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12464 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
12465 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12467 return NDR_ERR_SUCCESS;
12470 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int flags, struct lsa_LookupSids3 *r)
12472 uint32_t _ptr_domains;
12473 TALLOC_CTX *_mem_save_sids_0;
12474 TALLOC_CTX *_mem_save_domains_0;
12475 TALLOC_CTX *_mem_save_domains_1;
12476 TALLOC_CTX *_mem_save_names_0;
12477 TALLOC_CTX *_mem_save_count_0;
12478 if (flags & NDR_IN) {
12479 ZERO_STRUCT(r->out);
12481 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12482 NDR_PULL_ALLOC(ndr, r->in.sids);
12484 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
12485 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
12486 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12487 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
12488 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12489 NDR_PULL_ALLOC(ndr, r->in.names);
12491 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
12492 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
12493 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
12494 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
12495 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
12496 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12497 NDR_PULL_ALLOC(ndr, r->in.count);
12499 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12500 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
12501 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
12502 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12503 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options));
12504 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision));
12505 NDR_PULL_ALLOC(ndr, r->out.domains);
12506 ZERO_STRUCTP(r->out.domains);
12507 NDR_PULL_ALLOC(ndr, r->out.names);
12508 *r->out.names = *r->in.names;
12509 NDR_PULL_ALLOC(ndr, r->out.count);
12510 *r->out.count = *r->in.count;
12512 if (flags & NDR_OUT) {
12513 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12514 NDR_PULL_ALLOC(ndr, r->out.domains);
12516 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
12517 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
12518 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
12519 if (_ptr_domains) {
12520 NDR_PULL_ALLOC(ndr, *r->out.domains);
12521 } else {
12522 *r->out.domains = NULL;
12524 if (*r->out.domains) {
12525 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
12526 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
12527 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12528 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
12530 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
12531 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12532 NDR_PULL_ALLOC(ndr, r->out.names);
12534 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
12535 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
12536 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
12537 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
12538 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12539 NDR_PULL_ALLOC(ndr, r->out.count);
12541 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12542 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
12543 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
12544 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12545 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12547 return NDR_ERR_SUCCESS;
12550 _PUBLIC_ void ndr_print_lsa_LookupSids3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids3 *r)
12552 ndr_print_struct(ndr, name, "lsa_LookupSids3");
12553 ndr->depth++;
12554 if (flags & NDR_SET_VALUES) {
12555 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12557 if (flags & NDR_IN) {
12558 ndr_print_struct(ndr, "in", "lsa_LookupSids3");
12559 ndr->depth++;
12560 ndr_print_ptr(ndr, "sids", r->in.sids);
12561 ndr->depth++;
12562 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
12563 ndr->depth--;
12564 ndr_print_ptr(ndr, "names", r->in.names);
12565 ndr->depth++;
12566 ndr_print_lsa_TransNameArray2(ndr, "names", r->in.names);
12567 ndr->depth--;
12568 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
12569 ndr_print_ptr(ndr, "count", r->in.count);
12570 ndr->depth++;
12571 ndr_print_uint32(ndr, "count", *r->in.count);
12572 ndr->depth--;
12573 ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options);
12574 ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision);
12575 ndr->depth--;
12577 if (flags & NDR_OUT) {
12578 ndr_print_struct(ndr, "out", "lsa_LookupSids3");
12579 ndr->depth++;
12580 ndr_print_ptr(ndr, "domains", r->out.domains);
12581 ndr->depth++;
12582 ndr_print_ptr(ndr, "domains", *r->out.domains);
12583 ndr->depth++;
12584 if (*r->out.domains) {
12585 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
12587 ndr->depth--;
12588 ndr->depth--;
12589 ndr_print_ptr(ndr, "names", r->out.names);
12590 ndr->depth++;
12591 ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names);
12592 ndr->depth--;
12593 ndr_print_ptr(ndr, "count", r->out.count);
12594 ndr->depth++;
12595 ndr_print_uint32(ndr, "count", *r->out.count);
12596 ndr->depth--;
12597 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12598 ndr->depth--;
12600 ndr->depth--;
12603 static enum ndr_err_code ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int flags, const struct lsa_LookupNames4 *r)
12605 uint32_t cntr_names_0;
12606 if (flags & NDR_IN) {
12607 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
12608 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_names));
12609 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
12610 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
12612 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
12613 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
12615 if (r->in.sids == NULL) {
12616 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12618 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12619 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
12620 if (r->in.count == NULL) {
12621 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12623 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
12624 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options));
12625 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision));
12627 if (flags & NDR_OUT) {
12628 if (r->out.domains == NULL) {
12629 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12631 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
12632 if (*r->out.domains) {
12633 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12635 if (r->out.sids == NULL) {
12636 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12638 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
12639 if (r->out.count == NULL) {
12640 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12642 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
12643 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12645 return NDR_ERR_SUCCESS;
12648 static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int flags, struct lsa_LookupNames4 *r)
12650 uint32_t cntr_names_0;
12651 uint32_t _ptr_domains;
12652 TALLOC_CTX *_mem_save_names_0;
12653 TALLOC_CTX *_mem_save_domains_0;
12654 TALLOC_CTX *_mem_save_domains_1;
12655 TALLOC_CTX *_mem_save_sids_0;
12656 TALLOC_CTX *_mem_save_count_0;
12657 if (flags & NDR_IN) {
12658 ZERO_STRUCT(r->out);
12660 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
12661 if (r->in.num_names > 1000) {
12662 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
12664 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
12665 NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
12666 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
12667 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
12668 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
12669 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
12671 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
12672 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
12674 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
12675 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12676 NDR_PULL_ALLOC(ndr, r->in.sids);
12678 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
12679 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
12680 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12681 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
12682 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
12683 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12684 NDR_PULL_ALLOC(ndr, r->in.count);
12686 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12687 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
12688 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
12689 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12690 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options));
12691 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision));
12692 NDR_PULL_ALLOC(ndr, r->out.domains);
12693 ZERO_STRUCTP(r->out.domains);
12694 NDR_PULL_ALLOC(ndr, r->out.sids);
12695 *r->out.sids = *r->in.sids;
12696 NDR_PULL_ALLOC(ndr, r->out.count);
12697 *r->out.count = *r->in.count;
12698 if (r->in.names) {
12699 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
12702 if (flags & NDR_OUT) {
12703 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12704 NDR_PULL_ALLOC(ndr, r->out.domains);
12706 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
12707 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
12708 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
12709 if (_ptr_domains) {
12710 NDR_PULL_ALLOC(ndr, *r->out.domains);
12711 } else {
12712 *r->out.domains = NULL;
12714 if (*r->out.domains) {
12715 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
12716 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
12717 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12718 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
12720 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
12721 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12722 NDR_PULL_ALLOC(ndr, r->out.sids);
12724 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
12725 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
12726 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
12727 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
12728 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12729 NDR_PULL_ALLOC(ndr, r->out.count);
12731 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12732 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
12733 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
12734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12735 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12737 return NDR_ERR_SUCCESS;
12740 _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames4 *r)
12742 uint32_t cntr_names_0;
12743 ndr_print_struct(ndr, name, "lsa_LookupNames4");
12744 ndr->depth++;
12745 if (flags & NDR_SET_VALUES) {
12746 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12748 if (flags & NDR_IN) {
12749 ndr_print_struct(ndr, "in", "lsa_LookupNames4");
12750 ndr->depth++;
12751 ndr_print_uint32(ndr, "num_names", r->in.num_names);
12752 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
12753 ndr->depth++;
12754 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
12755 char *idx_0=NULL;
12756 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
12757 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
12758 free(idx_0);
12761 ndr->depth--;
12762 ndr_print_ptr(ndr, "sids", r->in.sids);
12763 ndr->depth++;
12764 ndr_print_lsa_TransSidArray3(ndr, "sids", r->in.sids);
12765 ndr->depth--;
12766 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
12767 ndr_print_ptr(ndr, "count", r->in.count);
12768 ndr->depth++;
12769 ndr_print_uint32(ndr, "count", *r->in.count);
12770 ndr->depth--;
12771 ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options);
12772 ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision);
12773 ndr->depth--;
12775 if (flags & NDR_OUT) {
12776 ndr_print_struct(ndr, "out", "lsa_LookupNames4");
12777 ndr->depth++;
12778 ndr_print_ptr(ndr, "domains", r->out.domains);
12779 ndr->depth++;
12780 ndr_print_ptr(ndr, "domains", *r->out.domains);
12781 ndr->depth++;
12782 if (*r->out.domains) {
12783 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
12785 ndr->depth--;
12786 ndr->depth--;
12787 ndr_print_ptr(ndr, "sids", r->out.sids);
12788 ndr->depth++;
12789 ndr_print_lsa_TransSidArray3(ndr, "sids", r->out.sids);
12790 ndr->depth--;
12791 ndr_print_ptr(ndr, "count", r->out.count);
12792 ndr->depth++;
12793 ndr_print_uint32(ndr, "count", *r->out.count);
12794 ndr->depth--;
12795 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12796 ndr->depth--;
12798 ndr->depth--;
12801 static enum ndr_err_code ndr_push_lsa_LSAROPENPOLICYSCE(struct ndr_push *ndr, int flags, const struct lsa_LSAROPENPOLICYSCE *r)
12803 if (flags & NDR_IN) {
12805 if (flags & NDR_OUT) {
12806 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12808 return NDR_ERR_SUCCESS;
12811 static enum ndr_err_code ndr_pull_lsa_LSAROPENPOLICYSCE(struct ndr_pull *ndr, int flags, struct lsa_LSAROPENPOLICYSCE *r)
12813 if (flags & NDR_IN) {
12815 if (flags & NDR_OUT) {
12816 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12818 return NDR_ERR_SUCCESS;
12821 _PUBLIC_ void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSAROPENPOLICYSCE *r)
12823 ndr_print_struct(ndr, name, "lsa_LSAROPENPOLICYSCE");
12824 ndr->depth++;
12825 if (flags & NDR_SET_VALUES) {
12826 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12828 if (flags & NDR_IN) {
12829 ndr_print_struct(ndr, "in", "lsa_LSAROPENPOLICYSCE");
12830 ndr->depth++;
12831 ndr->depth--;
12833 if (flags & NDR_OUT) {
12834 ndr_print_struct(ndr, "out", "lsa_LSAROPENPOLICYSCE");
12835 ndr->depth++;
12836 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12837 ndr->depth--;
12839 ndr->depth--;
12842 static enum ndr_err_code ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
12844 if (flags & NDR_IN) {
12846 if (flags & NDR_OUT) {
12847 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12849 return NDR_ERR_SUCCESS;
12852 static enum ndr_err_code ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_pull *ndr, int flags, struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
12854 if (flags & NDR_IN) {
12856 if (flags & NDR_OUT) {
12857 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12859 return NDR_ERR_SUCCESS;
12862 _PUBLIC_ void ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
12864 ndr_print_struct(ndr, name, "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12865 ndr->depth++;
12866 if (flags & NDR_SET_VALUES) {
12867 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12869 if (flags & NDR_IN) {
12870 ndr_print_struct(ndr, "in", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12871 ndr->depth++;
12872 ndr->depth--;
12874 if (flags & NDR_OUT) {
12875 ndr_print_struct(ndr, "out", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12876 ndr->depth++;
12877 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12878 ndr->depth--;
12880 ndr->depth--;
12883 static enum ndr_err_code ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
12885 if (flags & NDR_IN) {
12887 if (flags & NDR_OUT) {
12888 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12890 return NDR_ERR_SUCCESS;
12893 static enum ndr_err_code ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_pull *ndr, int flags, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
12895 if (flags & NDR_IN) {
12897 if (flags & NDR_OUT) {
12898 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12900 return NDR_ERR_SUCCESS;
12903 _PUBLIC_ void ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
12905 ndr_print_struct(ndr, name, "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12906 ndr->depth++;
12907 if (flags & NDR_SET_VALUES) {
12908 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12910 if (flags & NDR_IN) {
12911 ndr_print_struct(ndr, "in", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12912 ndr->depth++;
12913 ndr->depth--;
12915 if (flags & NDR_OUT) {
12916 ndr_print_struct(ndr, "out", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12917 ndr->depth++;
12918 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12919 ndr->depth--;
12921 ndr->depth--;
12924 static enum ndr_err_code ndr_push_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r)
12926 if (flags & NDR_IN) {
12928 if (flags & NDR_OUT) {
12929 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12931 return NDR_ERR_SUCCESS;
12934 static enum ndr_err_code ndr_pull_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARADTREPORTSECURITYEVENT *r)
12936 if (flags & NDR_IN) {
12938 if (flags & NDR_OUT) {
12939 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12941 return NDR_ERR_SUCCESS;
12944 _PUBLIC_ void ndr_print_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r)
12946 ndr_print_struct(ndr, name, "lsa_LSARADTREPORTSECURITYEVENT");
12947 ndr->depth++;
12948 if (flags & NDR_SET_VALUES) {
12949 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12951 if (flags & NDR_IN) {
12952 ndr_print_struct(ndr, "in", "lsa_LSARADTREPORTSECURITYEVENT");
12953 ndr->depth++;
12954 ndr->depth--;
12956 if (flags & NDR_OUT) {
12957 ndr_print_struct(ndr, "out", "lsa_LSARADTREPORTSECURITYEVENT");
12958 ndr->depth++;
12959 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12960 ndr->depth--;
12962 ndr->depth--;
12965 static const struct ndr_interface_call lsarpc_calls[] = {
12967 "lsa_Close",
12968 sizeof(struct lsa_Close),
12969 (ndr_push_flags_fn_t) ndr_push_lsa_Close,
12970 (ndr_pull_flags_fn_t) ndr_pull_lsa_Close,
12971 (ndr_print_function_t) ndr_print_lsa_Close,
12972 false,
12975 "lsa_Delete",
12976 sizeof(struct lsa_Delete),
12977 (ndr_push_flags_fn_t) ndr_push_lsa_Delete,
12978 (ndr_pull_flags_fn_t) ndr_pull_lsa_Delete,
12979 (ndr_print_function_t) ndr_print_lsa_Delete,
12980 false,
12983 "lsa_EnumPrivs",
12984 sizeof(struct lsa_EnumPrivs),
12985 (ndr_push_flags_fn_t) ndr_push_lsa_EnumPrivs,
12986 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumPrivs,
12987 (ndr_print_function_t) ndr_print_lsa_EnumPrivs,
12988 false,
12991 "lsa_QuerySecurity",
12992 sizeof(struct lsa_QuerySecurity),
12993 (ndr_push_flags_fn_t) ndr_push_lsa_QuerySecurity,
12994 (ndr_pull_flags_fn_t) ndr_pull_lsa_QuerySecurity,
12995 (ndr_print_function_t) ndr_print_lsa_QuerySecurity,
12996 false,
12999 "lsa_SetSecObj",
13000 sizeof(struct lsa_SetSecObj),
13001 (ndr_push_flags_fn_t) ndr_push_lsa_SetSecObj,
13002 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSecObj,
13003 (ndr_print_function_t) ndr_print_lsa_SetSecObj,
13004 false,
13007 "lsa_ChangePassword",
13008 sizeof(struct lsa_ChangePassword),
13009 (ndr_push_flags_fn_t) ndr_push_lsa_ChangePassword,
13010 (ndr_pull_flags_fn_t) ndr_pull_lsa_ChangePassword,
13011 (ndr_print_function_t) ndr_print_lsa_ChangePassword,
13012 false,
13015 "lsa_OpenPolicy",
13016 sizeof(struct lsa_OpenPolicy),
13017 (ndr_push_flags_fn_t) ndr_push_lsa_OpenPolicy,
13018 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenPolicy,
13019 (ndr_print_function_t) ndr_print_lsa_OpenPolicy,
13020 false,
13023 "lsa_QueryInfoPolicy",
13024 sizeof(struct lsa_QueryInfoPolicy),
13025 (ndr_push_flags_fn_t) ndr_push_lsa_QueryInfoPolicy,
13026 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryInfoPolicy,
13027 (ndr_print_function_t) ndr_print_lsa_QueryInfoPolicy,
13028 false,
13031 "lsa_SetInfoPolicy",
13032 sizeof(struct lsa_SetInfoPolicy),
13033 (ndr_push_flags_fn_t) ndr_push_lsa_SetInfoPolicy,
13034 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInfoPolicy,
13035 (ndr_print_function_t) ndr_print_lsa_SetInfoPolicy,
13036 false,
13039 "lsa_ClearAuditLog",
13040 sizeof(struct lsa_ClearAuditLog),
13041 (ndr_push_flags_fn_t) ndr_push_lsa_ClearAuditLog,
13042 (ndr_pull_flags_fn_t) ndr_pull_lsa_ClearAuditLog,
13043 (ndr_print_function_t) ndr_print_lsa_ClearAuditLog,
13044 false,
13047 "lsa_CreateAccount",
13048 sizeof(struct lsa_CreateAccount),
13049 (ndr_push_flags_fn_t) ndr_push_lsa_CreateAccount,
13050 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateAccount,
13051 (ndr_print_function_t) ndr_print_lsa_CreateAccount,
13052 false,
13055 "lsa_EnumAccounts",
13056 sizeof(struct lsa_EnumAccounts),
13057 (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccounts,
13058 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccounts,
13059 (ndr_print_function_t) ndr_print_lsa_EnumAccounts,
13060 false,
13063 "lsa_CreateTrustedDomain",
13064 sizeof(struct lsa_CreateTrustedDomain),
13065 (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomain,
13066 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomain,
13067 (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomain,
13068 false,
13071 "lsa_EnumTrustDom",
13072 sizeof(struct lsa_EnumTrustDom),
13073 (ndr_push_flags_fn_t) ndr_push_lsa_EnumTrustDom,
13074 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumTrustDom,
13075 (ndr_print_function_t) ndr_print_lsa_EnumTrustDom,
13076 false,
13079 "lsa_LookupNames",
13080 sizeof(struct lsa_LookupNames),
13081 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames,
13082 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames,
13083 (ndr_print_function_t) ndr_print_lsa_LookupNames,
13084 false,
13087 "lsa_LookupSids",
13088 sizeof(struct lsa_LookupSids),
13089 (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids,
13090 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids,
13091 (ndr_print_function_t) ndr_print_lsa_LookupSids,
13092 false,
13095 "lsa_CreateSecret",
13096 sizeof(struct lsa_CreateSecret),
13097 (ndr_push_flags_fn_t) ndr_push_lsa_CreateSecret,
13098 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateSecret,
13099 (ndr_print_function_t) ndr_print_lsa_CreateSecret,
13100 false,
13103 "lsa_OpenAccount",
13104 sizeof(struct lsa_OpenAccount),
13105 (ndr_push_flags_fn_t) ndr_push_lsa_OpenAccount,
13106 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenAccount,
13107 (ndr_print_function_t) ndr_print_lsa_OpenAccount,
13108 false,
13111 "lsa_EnumPrivsAccount",
13112 sizeof(struct lsa_EnumPrivsAccount),
13113 (ndr_push_flags_fn_t) ndr_push_lsa_EnumPrivsAccount,
13114 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumPrivsAccount,
13115 (ndr_print_function_t) ndr_print_lsa_EnumPrivsAccount,
13116 false,
13119 "lsa_AddPrivilegesToAccount",
13120 sizeof(struct lsa_AddPrivilegesToAccount),
13121 (ndr_push_flags_fn_t) ndr_push_lsa_AddPrivilegesToAccount,
13122 (ndr_pull_flags_fn_t) ndr_pull_lsa_AddPrivilegesToAccount,
13123 (ndr_print_function_t) ndr_print_lsa_AddPrivilegesToAccount,
13124 false,
13127 "lsa_RemovePrivilegesFromAccount",
13128 sizeof(struct lsa_RemovePrivilegesFromAccount),
13129 (ndr_push_flags_fn_t) ndr_push_lsa_RemovePrivilegesFromAccount,
13130 (ndr_pull_flags_fn_t) ndr_pull_lsa_RemovePrivilegesFromAccount,
13131 (ndr_print_function_t) ndr_print_lsa_RemovePrivilegesFromAccount,
13132 false,
13135 "lsa_GetQuotasForAccount",
13136 sizeof(struct lsa_GetQuotasForAccount),
13137 (ndr_push_flags_fn_t) ndr_push_lsa_GetQuotasForAccount,
13138 (ndr_pull_flags_fn_t) ndr_pull_lsa_GetQuotasForAccount,
13139 (ndr_print_function_t) ndr_print_lsa_GetQuotasForAccount,
13140 false,
13143 "lsa_SetQuotasForAccount",
13144 sizeof(struct lsa_SetQuotasForAccount),
13145 (ndr_push_flags_fn_t) ndr_push_lsa_SetQuotasForAccount,
13146 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetQuotasForAccount,
13147 (ndr_print_function_t) ndr_print_lsa_SetQuotasForAccount,
13148 false,
13151 "lsa_GetSystemAccessAccount",
13152 sizeof(struct lsa_GetSystemAccessAccount),
13153 (ndr_push_flags_fn_t) ndr_push_lsa_GetSystemAccessAccount,
13154 (ndr_pull_flags_fn_t) ndr_pull_lsa_GetSystemAccessAccount,
13155 (ndr_print_function_t) ndr_print_lsa_GetSystemAccessAccount,
13156 false,
13159 "lsa_SetSystemAccessAccount",
13160 sizeof(struct lsa_SetSystemAccessAccount),
13161 (ndr_push_flags_fn_t) ndr_push_lsa_SetSystemAccessAccount,
13162 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSystemAccessAccount,
13163 (ndr_print_function_t) ndr_print_lsa_SetSystemAccessAccount,
13164 false,
13167 "lsa_OpenTrustedDomain",
13168 sizeof(struct lsa_OpenTrustedDomain),
13169 (ndr_push_flags_fn_t) ndr_push_lsa_OpenTrustedDomain,
13170 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenTrustedDomain,
13171 (ndr_print_function_t) ndr_print_lsa_OpenTrustedDomain,
13172 false,
13175 "lsa_QueryTrustedDomainInfo",
13176 sizeof(struct lsa_QueryTrustedDomainInfo),
13177 (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfo,
13178 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfo,
13179 (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfo,
13180 false,
13183 "lsa_SetInformationTrustedDomain",
13184 sizeof(struct lsa_SetInformationTrustedDomain),
13185 (ndr_push_flags_fn_t) ndr_push_lsa_SetInformationTrustedDomain,
13186 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInformationTrustedDomain,
13187 (ndr_print_function_t) ndr_print_lsa_SetInformationTrustedDomain,
13188 false,
13191 "lsa_OpenSecret",
13192 sizeof(struct lsa_OpenSecret),
13193 (ndr_push_flags_fn_t) ndr_push_lsa_OpenSecret,
13194 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenSecret,
13195 (ndr_print_function_t) ndr_print_lsa_OpenSecret,
13196 false,
13199 "lsa_SetSecret",
13200 sizeof(struct lsa_SetSecret),
13201 (ndr_push_flags_fn_t) ndr_push_lsa_SetSecret,
13202 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSecret,
13203 (ndr_print_function_t) ndr_print_lsa_SetSecret,
13204 false,
13207 "lsa_QuerySecret",
13208 sizeof(struct lsa_QuerySecret),
13209 (ndr_push_flags_fn_t) ndr_push_lsa_QuerySecret,
13210 (ndr_pull_flags_fn_t) ndr_pull_lsa_QuerySecret,
13211 (ndr_print_function_t) ndr_print_lsa_QuerySecret,
13212 false,
13215 "lsa_LookupPrivValue",
13216 sizeof(struct lsa_LookupPrivValue),
13217 (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivValue,
13218 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivValue,
13219 (ndr_print_function_t) ndr_print_lsa_LookupPrivValue,
13220 false,
13223 "lsa_LookupPrivName",
13224 sizeof(struct lsa_LookupPrivName),
13225 (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivName,
13226 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivName,
13227 (ndr_print_function_t) ndr_print_lsa_LookupPrivName,
13228 false,
13231 "lsa_LookupPrivDisplayName",
13232 sizeof(struct lsa_LookupPrivDisplayName),
13233 (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivDisplayName,
13234 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivDisplayName,
13235 (ndr_print_function_t) ndr_print_lsa_LookupPrivDisplayName,
13236 false,
13239 "lsa_DeleteObject",
13240 sizeof(struct lsa_DeleteObject),
13241 (ndr_push_flags_fn_t) ndr_push_lsa_DeleteObject,
13242 (ndr_pull_flags_fn_t) ndr_pull_lsa_DeleteObject,
13243 (ndr_print_function_t) ndr_print_lsa_DeleteObject,
13244 false,
13247 "lsa_EnumAccountsWithUserRight",
13248 sizeof(struct lsa_EnumAccountsWithUserRight),
13249 (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccountsWithUserRight,
13250 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccountsWithUserRight,
13251 (ndr_print_function_t) ndr_print_lsa_EnumAccountsWithUserRight,
13252 false,
13255 "lsa_EnumAccountRights",
13256 sizeof(struct lsa_EnumAccountRights),
13257 (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccountRights,
13258 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccountRights,
13259 (ndr_print_function_t) ndr_print_lsa_EnumAccountRights,
13260 false,
13263 "lsa_AddAccountRights",
13264 sizeof(struct lsa_AddAccountRights),
13265 (ndr_push_flags_fn_t) ndr_push_lsa_AddAccountRights,
13266 (ndr_pull_flags_fn_t) ndr_pull_lsa_AddAccountRights,
13267 (ndr_print_function_t) ndr_print_lsa_AddAccountRights,
13268 false,
13271 "lsa_RemoveAccountRights",
13272 sizeof(struct lsa_RemoveAccountRights),
13273 (ndr_push_flags_fn_t) ndr_push_lsa_RemoveAccountRights,
13274 (ndr_pull_flags_fn_t) ndr_pull_lsa_RemoveAccountRights,
13275 (ndr_print_function_t) ndr_print_lsa_RemoveAccountRights,
13276 false,
13279 "lsa_QueryTrustedDomainInfoBySid",
13280 sizeof(struct lsa_QueryTrustedDomainInfoBySid),
13281 (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfoBySid,
13282 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfoBySid,
13283 (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfoBySid,
13284 false,
13287 "lsa_SetTrustedDomainInfo",
13288 sizeof(struct lsa_SetTrustedDomainInfo),
13289 (ndr_push_flags_fn_t) ndr_push_lsa_SetTrustedDomainInfo,
13290 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetTrustedDomainInfo,
13291 (ndr_print_function_t) ndr_print_lsa_SetTrustedDomainInfo,
13292 false,
13295 "lsa_DeleteTrustedDomain",
13296 sizeof(struct lsa_DeleteTrustedDomain),
13297 (ndr_push_flags_fn_t) ndr_push_lsa_DeleteTrustedDomain,
13298 (ndr_pull_flags_fn_t) ndr_pull_lsa_DeleteTrustedDomain,
13299 (ndr_print_function_t) ndr_print_lsa_DeleteTrustedDomain,
13300 false,
13303 "lsa_StorePrivateData",
13304 sizeof(struct lsa_StorePrivateData),
13305 (ndr_push_flags_fn_t) ndr_push_lsa_StorePrivateData,
13306 (ndr_pull_flags_fn_t) ndr_pull_lsa_StorePrivateData,
13307 (ndr_print_function_t) ndr_print_lsa_StorePrivateData,
13308 false,
13311 "lsa_RetrievePrivateData",
13312 sizeof(struct lsa_RetrievePrivateData),
13313 (ndr_push_flags_fn_t) ndr_push_lsa_RetrievePrivateData,
13314 (ndr_pull_flags_fn_t) ndr_pull_lsa_RetrievePrivateData,
13315 (ndr_print_function_t) ndr_print_lsa_RetrievePrivateData,
13316 false,
13319 "lsa_OpenPolicy2",
13320 sizeof(struct lsa_OpenPolicy2),
13321 (ndr_push_flags_fn_t) ndr_push_lsa_OpenPolicy2,
13322 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenPolicy2,
13323 (ndr_print_function_t) ndr_print_lsa_OpenPolicy2,
13324 false,
13327 "lsa_GetUserName",
13328 sizeof(struct lsa_GetUserName),
13329 (ndr_push_flags_fn_t) ndr_push_lsa_GetUserName,
13330 (ndr_pull_flags_fn_t) ndr_pull_lsa_GetUserName,
13331 (ndr_print_function_t) ndr_print_lsa_GetUserName,
13332 false,
13335 "lsa_QueryInfoPolicy2",
13336 sizeof(struct lsa_QueryInfoPolicy2),
13337 (ndr_push_flags_fn_t) ndr_push_lsa_QueryInfoPolicy2,
13338 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryInfoPolicy2,
13339 (ndr_print_function_t) ndr_print_lsa_QueryInfoPolicy2,
13340 false,
13343 "lsa_SetInfoPolicy2",
13344 sizeof(struct lsa_SetInfoPolicy2),
13345 (ndr_push_flags_fn_t) ndr_push_lsa_SetInfoPolicy2,
13346 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInfoPolicy2,
13347 (ndr_print_function_t) ndr_print_lsa_SetInfoPolicy2,
13348 false,
13351 "lsa_QueryTrustedDomainInfoByName",
13352 sizeof(struct lsa_QueryTrustedDomainInfoByName),
13353 (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfoByName,
13354 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfoByName,
13355 (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfoByName,
13356 false,
13359 "lsa_SetTrustedDomainInfoByName",
13360 sizeof(struct lsa_SetTrustedDomainInfoByName),
13361 (ndr_push_flags_fn_t) ndr_push_lsa_SetTrustedDomainInfoByName,
13362 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetTrustedDomainInfoByName,
13363 (ndr_print_function_t) ndr_print_lsa_SetTrustedDomainInfoByName,
13364 false,
13367 "lsa_EnumTrustedDomainsEx",
13368 sizeof(struct lsa_EnumTrustedDomainsEx),
13369 (ndr_push_flags_fn_t) ndr_push_lsa_EnumTrustedDomainsEx,
13370 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumTrustedDomainsEx,
13371 (ndr_print_function_t) ndr_print_lsa_EnumTrustedDomainsEx,
13372 false,
13375 "lsa_CreateTrustedDomainEx",
13376 sizeof(struct lsa_CreateTrustedDomainEx),
13377 (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomainEx,
13378 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomainEx,
13379 (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomainEx,
13380 false,
13383 "lsa_CloseTrustedDomainEx",
13384 sizeof(struct lsa_CloseTrustedDomainEx),
13385 (ndr_push_flags_fn_t) ndr_push_lsa_CloseTrustedDomainEx,
13386 (ndr_pull_flags_fn_t) ndr_pull_lsa_CloseTrustedDomainEx,
13387 (ndr_print_function_t) ndr_print_lsa_CloseTrustedDomainEx,
13388 false,
13391 "lsa_QueryDomainInformationPolicy",
13392 sizeof(struct lsa_QueryDomainInformationPolicy),
13393 (ndr_push_flags_fn_t) ndr_push_lsa_QueryDomainInformationPolicy,
13394 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryDomainInformationPolicy,
13395 (ndr_print_function_t) ndr_print_lsa_QueryDomainInformationPolicy,
13396 false,
13399 "lsa_SetDomainInformationPolicy",
13400 sizeof(struct lsa_SetDomainInformationPolicy),
13401 (ndr_push_flags_fn_t) ndr_push_lsa_SetDomainInformationPolicy,
13402 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetDomainInformationPolicy,
13403 (ndr_print_function_t) ndr_print_lsa_SetDomainInformationPolicy,
13404 false,
13407 "lsa_OpenTrustedDomainByName",
13408 sizeof(struct lsa_OpenTrustedDomainByName),
13409 (ndr_push_flags_fn_t) ndr_push_lsa_OpenTrustedDomainByName,
13410 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenTrustedDomainByName,
13411 (ndr_print_function_t) ndr_print_lsa_OpenTrustedDomainByName,
13412 false,
13415 "lsa_TestCall",
13416 sizeof(struct lsa_TestCall),
13417 (ndr_push_flags_fn_t) ndr_push_lsa_TestCall,
13418 (ndr_pull_flags_fn_t) ndr_pull_lsa_TestCall,
13419 (ndr_print_function_t) ndr_print_lsa_TestCall,
13420 false,
13423 "lsa_LookupSids2",
13424 sizeof(struct lsa_LookupSids2),
13425 (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids2,
13426 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids2,
13427 (ndr_print_function_t) ndr_print_lsa_LookupSids2,
13428 false,
13431 "lsa_LookupNames2",
13432 sizeof(struct lsa_LookupNames2),
13433 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames2,
13434 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames2,
13435 (ndr_print_function_t) ndr_print_lsa_LookupNames2,
13436 false,
13439 "lsa_CreateTrustedDomainEx2",
13440 sizeof(struct lsa_CreateTrustedDomainEx2),
13441 (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomainEx2,
13442 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomainEx2,
13443 (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomainEx2,
13444 false,
13447 "lsa_CREDRWRITE",
13448 sizeof(struct lsa_CREDRWRITE),
13449 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRWRITE,
13450 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRWRITE,
13451 (ndr_print_function_t) ndr_print_lsa_CREDRWRITE,
13452 false,
13455 "lsa_CREDRREAD",
13456 sizeof(struct lsa_CREDRREAD),
13457 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRREAD,
13458 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRREAD,
13459 (ndr_print_function_t) ndr_print_lsa_CREDRREAD,
13460 false,
13463 "lsa_CREDRENUMERATE",
13464 sizeof(struct lsa_CREDRENUMERATE),
13465 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRENUMERATE,
13466 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRENUMERATE,
13467 (ndr_print_function_t) ndr_print_lsa_CREDRENUMERATE,
13468 false,
13471 "lsa_CREDRWRITEDOMAINCREDENTIALS",
13472 sizeof(struct lsa_CREDRWRITEDOMAINCREDENTIALS),
13473 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS,
13474 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS,
13475 (ndr_print_function_t) ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS,
13476 false,
13479 "lsa_CREDRREADDOMAINCREDENTIALS",
13480 sizeof(struct lsa_CREDRREADDOMAINCREDENTIALS),
13481 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRREADDOMAINCREDENTIALS,
13482 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS,
13483 (ndr_print_function_t) ndr_print_lsa_CREDRREADDOMAINCREDENTIALS,
13484 false,
13487 "lsa_CREDRDELETE",
13488 sizeof(struct lsa_CREDRDELETE),
13489 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRDELETE,
13490 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRDELETE,
13491 (ndr_print_function_t) ndr_print_lsa_CREDRDELETE,
13492 false,
13495 "lsa_CREDRGETTARGETINFO",
13496 sizeof(struct lsa_CREDRGETTARGETINFO),
13497 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRGETTARGETINFO,
13498 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRGETTARGETINFO,
13499 (ndr_print_function_t) ndr_print_lsa_CREDRGETTARGETINFO,
13500 false,
13503 "lsa_CREDRPROFILELOADED",
13504 sizeof(struct lsa_CREDRPROFILELOADED),
13505 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRPROFILELOADED,
13506 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRPROFILELOADED,
13507 (ndr_print_function_t) ndr_print_lsa_CREDRPROFILELOADED,
13508 false,
13511 "lsa_LookupNames3",
13512 sizeof(struct lsa_LookupNames3),
13513 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames3,
13514 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames3,
13515 (ndr_print_function_t) ndr_print_lsa_LookupNames3,
13516 false,
13519 "lsa_CREDRGETSESSIONTYPES",
13520 sizeof(struct lsa_CREDRGETSESSIONTYPES),
13521 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRGETSESSIONTYPES,
13522 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRGETSESSIONTYPES,
13523 (ndr_print_function_t) ndr_print_lsa_CREDRGETSESSIONTYPES,
13524 false,
13527 "lsa_LSARREGISTERAUDITEVENT",
13528 sizeof(struct lsa_LSARREGISTERAUDITEVENT),
13529 (ndr_push_flags_fn_t) ndr_push_lsa_LSARREGISTERAUDITEVENT,
13530 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARREGISTERAUDITEVENT,
13531 (ndr_print_function_t) ndr_print_lsa_LSARREGISTERAUDITEVENT,
13532 false,
13535 "lsa_LSARGENAUDITEVENT",
13536 sizeof(struct lsa_LSARGENAUDITEVENT),
13537 (ndr_push_flags_fn_t) ndr_push_lsa_LSARGENAUDITEVENT,
13538 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARGENAUDITEVENT,
13539 (ndr_print_function_t) ndr_print_lsa_LSARGENAUDITEVENT,
13540 false,
13543 "lsa_LSARUNREGISTERAUDITEVENT",
13544 sizeof(struct lsa_LSARUNREGISTERAUDITEVENT),
13545 (ndr_push_flags_fn_t) ndr_push_lsa_LSARUNREGISTERAUDITEVENT,
13546 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARUNREGISTERAUDITEVENT,
13547 (ndr_print_function_t) ndr_print_lsa_LSARUNREGISTERAUDITEVENT,
13548 false,
13551 "lsa_lsaRQueryForestTrustInformation",
13552 sizeof(struct lsa_lsaRQueryForestTrustInformation),
13553 (ndr_push_flags_fn_t) ndr_push_lsa_lsaRQueryForestTrustInformation,
13554 (ndr_pull_flags_fn_t) ndr_pull_lsa_lsaRQueryForestTrustInformation,
13555 (ndr_print_function_t) ndr_print_lsa_lsaRQueryForestTrustInformation,
13556 false,
13559 "lsa_LSARSETFORESTTRUSTINFORMATION",
13560 sizeof(struct lsa_LSARSETFORESTTRUSTINFORMATION),
13561 (ndr_push_flags_fn_t) ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION,
13562 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION,
13563 (ndr_print_function_t) ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION,
13564 false,
13567 "lsa_CREDRRENAME",
13568 sizeof(struct lsa_CREDRRENAME),
13569 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRRENAME,
13570 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRRENAME,
13571 (ndr_print_function_t) ndr_print_lsa_CREDRRENAME,
13572 false,
13575 "lsa_LookupSids3",
13576 sizeof(struct lsa_LookupSids3),
13577 (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids3,
13578 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids3,
13579 (ndr_print_function_t) ndr_print_lsa_LookupSids3,
13580 false,
13583 "lsa_LookupNames4",
13584 sizeof(struct lsa_LookupNames4),
13585 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames4,
13586 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames4,
13587 (ndr_print_function_t) ndr_print_lsa_LookupNames4,
13588 false,
13591 "lsa_LSAROPENPOLICYSCE",
13592 sizeof(struct lsa_LSAROPENPOLICYSCE),
13593 (ndr_push_flags_fn_t) ndr_push_lsa_LSAROPENPOLICYSCE,
13594 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSAROPENPOLICYSCE,
13595 (ndr_print_function_t) ndr_print_lsa_LSAROPENPOLICYSCE,
13596 false,
13599 "lsa_LSARADTREGISTERSECURITYEVENTSOURCE",
13600 sizeof(struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE),
13601 (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
13602 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
13603 (ndr_print_function_t) ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
13604 false,
13607 "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE",
13608 sizeof(struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE),
13609 (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
13610 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
13611 (ndr_print_function_t) ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
13612 false,
13615 "lsa_LSARADTREPORTSECURITYEVENT",
13616 sizeof(struct lsa_LSARADTREPORTSECURITYEVENT),
13617 (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTREPORTSECURITYEVENT,
13618 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTREPORTSECURITYEVENT,
13619 (ndr_print_function_t) ndr_print_lsa_LSARADTREPORTSECURITYEVENT,
13620 false,
13622 { NULL, 0, NULL, NULL, NULL, false }
13625 static const char * const lsarpc_endpoint_strings[] = {
13626 "ncacn_np:[\\pipe\\lsarpc]",
13627 "ncacn_np:[\\pipe\\netlogon]",
13628 "ncacn_np:[\\pipe\\lsass]",
13629 "ncacn_ip_tcp:",
13630 "ncalrpc:",
13633 static const struct ndr_interface_string_array lsarpc_endpoints = {
13634 .count = 5,
13635 .names = lsarpc_endpoint_strings
13638 static const char * const lsarpc_authservice_strings[] = {
13639 "host",
13642 static const struct ndr_interface_string_array lsarpc_authservices = {
13643 .count = 1,
13644 .names = lsarpc_authservice_strings
13648 const struct ndr_interface_table ndr_table_lsarpc = {
13649 .name = "lsarpc",
13650 .syntax_id = {
13651 {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xab}},
13652 NDR_LSARPC_VERSION
13654 .helpstring = NDR_LSARPC_HELPSTRING,
13655 .num_calls = 82,
13656 .calls = lsarpc_calls,
13657 .endpoints = &lsarpc_endpoints,
13658 .authservices = &lsarpc_authservices