rerun 'make samba3-idl'
[Samba.git] / librpc / gen_ndr / ndr_lsa.c
blob6ebc703f99e4e48fcd39823f4392f8ca9623ecec
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, 4));
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));
16 if (ndr_flags & NDR_BUFFERS) {
17 if (r->string) {
18 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
19 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
20 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
21 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2 * strlen_m(r->string) / 2, sizeof(uint16_t), CH_UTF16));
24 return NDR_ERR_SUCCESS;
27 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_String(struct ndr_pull *ndr, int ndr_flags, struct lsa_String *r)
29 uint32_t _ptr_string;
30 uint32_t size_string_1 = 0;
31 uint32_t length_string_1 = 0;
32 TALLOC_CTX *_mem_save_string_0;
33 if (ndr_flags & NDR_SCALARS) {
34 NDR_CHECK(ndr_pull_align(ndr, 4));
35 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
36 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
37 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
38 if (_ptr_string) {
39 NDR_PULL_ALLOC(ndr, r->string);
40 } else {
41 r->string = NULL;
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 size_string_1 = ndr_get_array_size(ndr, &r->string);
51 length_string_1 = ndr_get_array_length(ndr, &r->string);
52 if (length_string_1 > size_string_1) {
53 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_string_1, length_string_1);
55 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, length_string_1, sizeof(uint16_t), CH_UTF16));
56 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
58 if (r->string) {
59 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size / 2));
61 if (r->string) {
62 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length / 2));
65 return NDR_ERR_SUCCESS;
68 _PUBLIC_ void ndr_print_lsa_String(struct ndr_print *ndr, const char *name, const struct lsa_String *r)
70 ndr_print_struct(ndr, name, "lsa_String");
71 ndr->depth++;
72 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
73 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->size);
74 ndr_print_ptr(ndr, "string", r->string);
75 ndr->depth++;
76 if (r->string) {
77 ndr_print_string(ndr, "string", r->string);
79 ndr->depth--;
80 ndr->depth--;
83 _PUBLIC_ enum ndr_err_code ndr_push_lsa_StringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_StringLarge *r)
85 if (ndr_flags & NDR_SCALARS) {
86 NDR_CHECK(ndr_push_align(ndr, 4));
87 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
88 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m_term(r->string)));
89 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
91 if (ndr_flags & NDR_BUFFERS) {
92 if (r->string) {
93 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m_term(r->string) / 2));
94 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
95 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
96 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2 * strlen_m(r->string) / 2, sizeof(uint16_t), CH_UTF16));
99 return NDR_ERR_SUCCESS;
102 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_StringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_StringLarge *r)
104 uint32_t _ptr_string;
105 uint32_t size_string_1 = 0;
106 uint32_t length_string_1 = 0;
107 TALLOC_CTX *_mem_save_string_0;
108 if (ndr_flags & NDR_SCALARS) {
109 NDR_CHECK(ndr_pull_align(ndr, 4));
110 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
111 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
112 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
113 if (_ptr_string) {
114 NDR_PULL_ALLOC(ndr, r->string);
115 } else {
116 r->string = NULL;
119 if (ndr_flags & NDR_BUFFERS) {
120 if (r->string) {
121 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
122 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
123 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
124 NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
125 size_string_1 = ndr_get_array_size(ndr, &r->string);
126 length_string_1 = ndr_get_array_length(ndr, &r->string);
127 if (length_string_1 > size_string_1) {
128 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_string_1, length_string_1);
130 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, length_string_1, sizeof(uint16_t), CH_UTF16));
131 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
133 if (r->string) {
134 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size / 2));
136 if (r->string) {
137 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length / 2));
140 return NDR_ERR_SUCCESS;
143 _PUBLIC_ void ndr_print_lsa_StringLarge(struct ndr_print *ndr, const char *name, const struct lsa_StringLarge *r)
145 ndr_print_struct(ndr, name, "lsa_StringLarge");
146 ndr->depth++;
147 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
148 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->string):r->size);
149 ndr_print_ptr(ndr, "string", r->string);
150 ndr->depth++;
151 if (r->string) {
152 ndr_print_string(ndr, "string", r->string);
154 ndr->depth--;
155 ndr->depth--;
158 _PUBLIC_ enum ndr_err_code ndr_push_lsa_Strings(struct ndr_push *ndr, int ndr_flags, const struct lsa_Strings *r)
160 uint32_t cntr_names_1;
161 if (ndr_flags & NDR_SCALARS) {
162 NDR_CHECK(ndr_push_align(ndr, 4));
163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
164 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
166 if (ndr_flags & NDR_BUFFERS) {
167 if (r->names) {
168 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
169 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
170 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
172 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
173 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
177 return NDR_ERR_SUCCESS;
180 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Strings(struct ndr_pull *ndr, int ndr_flags, struct lsa_Strings *r)
182 uint32_t _ptr_names;
183 uint32_t size_names_1 = 0;
184 uint32_t cntr_names_1;
185 TALLOC_CTX *_mem_save_names_0;
186 TALLOC_CTX *_mem_save_names_1;
187 if (ndr_flags & NDR_SCALARS) {
188 NDR_CHECK(ndr_pull_align(ndr, 4));
189 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
190 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
191 if (_ptr_names) {
192 NDR_PULL_ALLOC(ndr, r->names);
193 } else {
194 r->names = NULL;
197 if (ndr_flags & NDR_BUFFERS) {
198 if (r->names) {
199 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
200 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
201 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
202 size_names_1 = ndr_get_array_size(ndr, &r->names);
203 NDR_PULL_ALLOC_N(ndr, r->names, size_names_1);
204 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
205 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
206 for (cntr_names_1 = 0; cntr_names_1 < size_names_1; cntr_names_1++) {
207 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
209 for (cntr_names_1 = 0; cntr_names_1 < size_names_1; cntr_names_1++) {
210 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
212 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
213 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
215 if (r->names) {
216 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
219 return NDR_ERR_SUCCESS;
222 _PUBLIC_ void ndr_print_lsa_Strings(struct ndr_print *ndr, const char *name, const struct lsa_Strings *r)
224 uint32_t cntr_names_1;
225 ndr_print_struct(ndr, name, "lsa_Strings");
226 ndr->depth++;
227 ndr_print_uint32(ndr, "count", r->count);
228 ndr_print_ptr(ndr, "names", r->names);
229 ndr->depth++;
230 if (r->names) {
231 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
232 ndr->depth++;
233 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
234 char *idx_1=NULL;
235 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
236 ndr_print_lsa_String(ndr, "names", &r->names[cntr_names_1]);
237 free(idx_1);
240 ndr->depth--;
242 ndr->depth--;
243 ndr->depth--;
246 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiString(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiString *r)
248 if (ndr_flags & NDR_SCALARS) {
249 NDR_CHECK(ndr_push_align(ndr, 4));
250 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
251 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
252 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
254 if (ndr_flags & NDR_BUFFERS) {
255 if (r->string) {
256 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->string)));
257 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->string)));
259 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, strlen_m(r->string), sizeof(uint8_t), CH_DOS));
262 return NDR_ERR_SUCCESS;
265 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiString(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiString *r)
267 uint32_t _ptr_string;
268 uint32_t size_string_1 = 0;
269 uint32_t length_string_1 = 0;
270 TALLOC_CTX *_mem_save_string_0;
271 if (ndr_flags & NDR_SCALARS) {
272 NDR_CHECK(ndr_pull_align(ndr, 4));
273 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
274 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
275 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
276 if (_ptr_string) {
277 NDR_PULL_ALLOC(ndr, r->string);
278 } else {
279 r->string = NULL;
282 if (ndr_flags & NDR_BUFFERS) {
283 if (r->string) {
284 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
285 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
286 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
287 NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
288 size_string_1 = ndr_get_array_size(ndr, &r->string);
289 length_string_1 = ndr_get_array_length(ndr, &r->string);
290 if (length_string_1 > size_string_1) {
291 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_string_1, length_string_1);
293 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, length_string_1, sizeof(uint8_t), CH_DOS));
294 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
296 if (r->string) {
297 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size));
299 if (r->string) {
300 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length));
303 return NDR_ERR_SUCCESS;
306 _PUBLIC_ void ndr_print_lsa_AsciiString(struct ndr_print *ndr, const char *name, const struct lsa_AsciiString *r)
308 ndr_print_struct(ndr, name, "lsa_AsciiString");
309 ndr->depth++;
310 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->length);
311 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->size);
312 ndr_print_ptr(ndr, "string", r->string);
313 ndr->depth++;
314 if (r->string) {
315 ndr_print_string(ndr, "string", r->string);
317 ndr->depth--;
318 ndr->depth--;
321 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiStringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiStringLarge *r)
323 if (ndr_flags & NDR_SCALARS) {
324 NDR_CHECK(ndr_push_align(ndr, 4));
325 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
326 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->string)));
327 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
329 if (ndr_flags & NDR_BUFFERS) {
330 if (r->string) {
331 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term(r->string)));
332 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
333 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->string)));
334 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, strlen_m(r->string), sizeof(uint8_t), CH_DOS));
337 return NDR_ERR_SUCCESS;
340 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiStringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiStringLarge *r)
342 uint32_t _ptr_string;
343 uint32_t size_string_1 = 0;
344 uint32_t length_string_1 = 0;
345 TALLOC_CTX *_mem_save_string_0;
346 if (ndr_flags & NDR_SCALARS) {
347 NDR_CHECK(ndr_pull_align(ndr, 4));
348 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
349 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
350 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
351 if (_ptr_string) {
352 NDR_PULL_ALLOC(ndr, r->string);
353 } else {
354 r->string = NULL;
357 if (ndr_flags & NDR_BUFFERS) {
358 if (r->string) {
359 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
360 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
361 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
362 NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
363 size_string_1 = ndr_get_array_size(ndr, &r->string);
364 length_string_1 = ndr_get_array_length(ndr, &r->string);
365 if (length_string_1 > size_string_1) {
366 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_string_1, length_string_1);
368 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, length_string_1, sizeof(uint8_t), CH_DOS));
369 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
371 if (r->string) {
372 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size));
374 if (r->string) {
375 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length));
378 return NDR_ERR_SUCCESS;
381 _PUBLIC_ void ndr_print_lsa_AsciiStringLarge(struct ndr_print *ndr, const char *name, const struct lsa_AsciiStringLarge *r)
383 ndr_print_struct(ndr, name, "lsa_AsciiStringLarge");
384 ndr->depth++;
385 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->length);
386 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->string):r->size);
387 ndr_print_ptr(ndr, "string", r->string);
388 ndr->depth++;
389 if (r->string) {
390 ndr_print_string(ndr, "string", r->string);
392 ndr->depth--;
393 ndr->depth--;
396 _PUBLIC_ enum ndr_err_code ndr_push_lsa_BinaryString(struct ndr_push *ndr, int ndr_flags, const struct lsa_BinaryString *r)
398 uint32_t cntr_array_1;
399 if (ndr_flags & NDR_SCALARS) {
400 NDR_CHECK(ndr_push_align(ndr, 4));
401 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
402 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
403 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
405 if (ndr_flags & NDR_BUFFERS) {
406 if (r->array) {
407 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size / 2));
408 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
409 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length / 2));
410 for (cntr_array_1 = 0; cntr_array_1 < r->length / 2; cntr_array_1++) {
411 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->array[cntr_array_1]));
415 return NDR_ERR_SUCCESS;
418 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_BinaryString(struct ndr_pull *ndr, int ndr_flags, struct lsa_BinaryString *r)
420 uint32_t _ptr_array;
421 uint32_t size_array_1 = 0;
422 uint32_t length_array_1 = 0;
423 uint32_t cntr_array_1;
424 TALLOC_CTX *_mem_save_array_0;
425 TALLOC_CTX *_mem_save_array_1;
426 if (ndr_flags & NDR_SCALARS) {
427 NDR_CHECK(ndr_pull_align(ndr, 4));
428 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
429 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
430 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
431 if (_ptr_array) {
432 NDR_PULL_ALLOC(ndr, r->array);
433 } else {
434 r->array = NULL;
437 if (ndr_flags & NDR_BUFFERS) {
438 if (r->array) {
439 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
440 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
441 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
442 NDR_CHECK(ndr_pull_array_length(ndr, &r->array));
443 size_array_1 = ndr_get_array_size(ndr, &r->array);
444 length_array_1 = ndr_get_array_length(ndr, &r->array);
445 if (length_array_1 > size_array_1) {
446 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_array_1, length_array_1);
448 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
449 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
450 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
451 for (cntr_array_1 = 0; cntr_array_1 < length_array_1; cntr_array_1++) {
452 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
454 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
455 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
457 if (r->array) {
458 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->size / 2));
460 if (r->array) {
461 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->array, r->length / 2));
464 return NDR_ERR_SUCCESS;
467 _PUBLIC_ void ndr_print_lsa_BinaryString(struct ndr_print *ndr, const char *name, const struct lsa_BinaryString *r)
469 uint32_t cntr_array_1;
470 ndr_print_struct(ndr, name, "lsa_BinaryString");
471 ndr->depth++;
472 ndr_print_uint16(ndr, "length", r->length);
473 ndr_print_uint16(ndr, "size", r->size);
474 ndr_print_ptr(ndr, "array", r->array);
475 ndr->depth++;
476 if (r->array) {
477 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->length / 2);
478 ndr->depth++;
479 for (cntr_array_1=0;cntr_array_1<r->length / 2;cntr_array_1++) {
480 char *idx_1=NULL;
481 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
482 ndr_print_uint16(ndr, "array", r->array[cntr_array_1]);
483 free(idx_1);
486 ndr->depth--;
488 ndr->depth--;
489 ndr->depth--;
492 static enum ndr_err_code ndr_push_lsa_LUID(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUID *r)
494 if (ndr_flags & NDR_SCALARS) {
495 NDR_CHECK(ndr_push_align(ndr, 4));
496 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->low));
497 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->high));
499 if (ndr_flags & NDR_BUFFERS) {
501 return NDR_ERR_SUCCESS;
504 static enum ndr_err_code ndr_pull_lsa_LUID(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUID *r)
506 if (ndr_flags & NDR_SCALARS) {
507 NDR_CHECK(ndr_pull_align(ndr, 4));
508 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->low));
509 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->high));
511 if (ndr_flags & NDR_BUFFERS) {
513 return NDR_ERR_SUCCESS;
516 _PUBLIC_ void ndr_print_lsa_LUID(struct ndr_print *ndr, const char *name, const struct lsa_LUID *r)
518 ndr_print_struct(ndr, name, "lsa_LUID");
519 ndr->depth++;
520 ndr_print_uint32(ndr, "low", r->low);
521 ndr_print_uint32(ndr, "high", r->high);
522 ndr->depth--;
525 static enum ndr_err_code ndr_push_lsa_PrivEntry(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivEntry *r)
527 if (ndr_flags & NDR_SCALARS) {
528 NDR_CHECK(ndr_push_align(ndr, 4));
529 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
530 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
532 if (ndr_flags & NDR_BUFFERS) {
533 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
535 return NDR_ERR_SUCCESS;
538 static enum ndr_err_code ndr_pull_lsa_PrivEntry(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivEntry *r)
540 if (ndr_flags & NDR_SCALARS) {
541 NDR_CHECK(ndr_pull_align(ndr, 4));
542 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
543 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
545 if (ndr_flags & NDR_BUFFERS) {
546 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
548 return NDR_ERR_SUCCESS;
551 _PUBLIC_ void ndr_print_lsa_PrivEntry(struct ndr_print *ndr, const char *name, const struct lsa_PrivEntry *r)
553 ndr_print_struct(ndr, name, "lsa_PrivEntry");
554 ndr->depth++;
555 ndr_print_lsa_StringLarge(ndr, "name", &r->name);
556 ndr_print_lsa_LUID(ndr, "luid", &r->luid);
557 ndr->depth--;
560 static enum ndr_err_code ndr_push_lsa_PrivArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivArray *r)
562 uint32_t cntr_privs_1;
563 if (ndr_flags & NDR_SCALARS) {
564 NDR_CHECK(ndr_push_align(ndr, 4));
565 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
566 NDR_CHECK(ndr_push_unique_ptr(ndr, r->privs));
568 if (ndr_flags & NDR_BUFFERS) {
569 if (r->privs) {
570 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
571 for (cntr_privs_1 = 0; cntr_privs_1 < r->count; cntr_privs_1++) {
572 NDR_CHECK(ndr_push_lsa_PrivEntry(ndr, NDR_SCALARS, &r->privs[cntr_privs_1]));
574 for (cntr_privs_1 = 0; cntr_privs_1 < r->count; cntr_privs_1++) {
575 NDR_CHECK(ndr_push_lsa_PrivEntry(ndr, NDR_BUFFERS, &r->privs[cntr_privs_1]));
579 return NDR_ERR_SUCCESS;
582 static enum ndr_err_code ndr_pull_lsa_PrivArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivArray *r)
584 uint32_t _ptr_privs;
585 uint32_t size_privs_1 = 0;
586 uint32_t cntr_privs_1;
587 TALLOC_CTX *_mem_save_privs_0;
588 TALLOC_CTX *_mem_save_privs_1;
589 if (ndr_flags & NDR_SCALARS) {
590 NDR_CHECK(ndr_pull_align(ndr, 4));
591 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
592 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
593 if (_ptr_privs) {
594 NDR_PULL_ALLOC(ndr, r->privs);
595 } else {
596 r->privs = NULL;
599 if (ndr_flags & NDR_BUFFERS) {
600 if (r->privs) {
601 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
602 NDR_PULL_SET_MEM_CTX(ndr, r->privs, 0);
603 NDR_CHECK(ndr_pull_array_size(ndr, &r->privs));
604 size_privs_1 = ndr_get_array_size(ndr, &r->privs);
605 NDR_PULL_ALLOC_N(ndr, r->privs, size_privs_1);
606 _mem_save_privs_1 = NDR_PULL_GET_MEM_CTX(ndr);
607 NDR_PULL_SET_MEM_CTX(ndr, r->privs, 0);
608 for (cntr_privs_1 = 0; cntr_privs_1 < size_privs_1; cntr_privs_1++) {
609 NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr, NDR_SCALARS, &r->privs[cntr_privs_1]));
611 for (cntr_privs_1 = 0; cntr_privs_1 < size_privs_1; cntr_privs_1++) {
612 NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr, NDR_BUFFERS, &r->privs[cntr_privs_1]));
614 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_1, 0);
615 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0);
617 if (r->privs) {
618 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->privs, r->count));
621 return NDR_ERR_SUCCESS;
624 _PUBLIC_ void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, const struct lsa_PrivArray *r)
626 uint32_t cntr_privs_1;
627 ndr_print_struct(ndr, name, "lsa_PrivArray");
628 ndr->depth++;
629 ndr_print_uint32(ndr, "count", r->count);
630 ndr_print_ptr(ndr, "privs", r->privs);
631 ndr->depth++;
632 if (r->privs) {
633 ndr->print(ndr, "%s: ARRAY(%d)", "privs", (int)r->count);
634 ndr->depth++;
635 for (cntr_privs_1=0;cntr_privs_1<r->count;cntr_privs_1++) {
636 char *idx_1=NULL;
637 if (asprintf(&idx_1, "[%d]", cntr_privs_1) != -1) {
638 ndr_print_lsa_PrivEntry(ndr, "privs", &r->privs[cntr_privs_1]);
639 free(idx_1);
642 ndr->depth--;
644 ndr->depth--;
645 ndr->depth--;
648 static enum ndr_err_code ndr_push_lsa_QosInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_QosInfo *r)
650 if (ndr_flags & NDR_SCALARS) {
651 NDR_CHECK(ndr_push_align(ndr, 4));
652 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
653 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->impersonation_level));
654 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->context_mode));
655 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->effective_only));
657 if (ndr_flags & NDR_BUFFERS) {
659 return NDR_ERR_SUCCESS;
662 static enum ndr_err_code ndr_pull_lsa_QosInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_QosInfo *r)
664 if (ndr_flags & NDR_SCALARS) {
665 NDR_CHECK(ndr_pull_align(ndr, 4));
666 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
667 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->impersonation_level));
668 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->context_mode));
669 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->effective_only));
671 if (ndr_flags & NDR_BUFFERS) {
673 return NDR_ERR_SUCCESS;
676 _PUBLIC_ void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, const struct lsa_QosInfo *r)
678 ndr_print_struct(ndr, name, "lsa_QosInfo");
679 ndr->depth++;
680 ndr_print_uint32(ndr, "len", r->len);
681 ndr_print_uint16(ndr, "impersonation_level", r->impersonation_level);
682 ndr_print_uint8(ndr, "context_mode", r->context_mode);
683 ndr_print_uint8(ndr, "effective_only", r->effective_only);
684 ndr->depth--;
687 static enum ndr_err_code ndr_push_lsa_ObjectAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_ObjectAttribute *r)
689 if (ndr_flags & NDR_SCALARS) {
690 NDR_CHECK(ndr_push_align(ndr, 4));
691 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
692 NDR_CHECK(ndr_push_unique_ptr(ndr, r->root_dir));
693 NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_name));
694 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attributes));
695 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sec_desc));
696 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sec_qos));
698 if (ndr_flags & NDR_BUFFERS) {
699 if (r->root_dir) {
700 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->root_dir));
702 if (r->object_name) {
703 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->object_name, CH_UTF16)));
704 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
705 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->object_name, CH_UTF16)));
706 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_name, ndr_charset_length(r->object_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
708 if (r->sec_desc) {
709 NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->sec_desc));
711 if (r->sec_qos) {
712 NDR_CHECK(ndr_push_lsa_QosInfo(ndr, NDR_SCALARS, r->sec_qos));
715 return NDR_ERR_SUCCESS;
718 static enum ndr_err_code ndr_pull_lsa_ObjectAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_ObjectAttribute *r)
720 uint32_t _ptr_root_dir;
721 TALLOC_CTX *_mem_save_root_dir_0;
722 uint32_t _ptr_object_name;
723 uint32_t size_object_name_1 = 0;
724 uint32_t length_object_name_1 = 0;
725 TALLOC_CTX *_mem_save_object_name_0;
726 uint32_t _ptr_sec_desc;
727 TALLOC_CTX *_mem_save_sec_desc_0;
728 uint32_t _ptr_sec_qos;
729 TALLOC_CTX *_mem_save_sec_qos_0;
730 if (ndr_flags & NDR_SCALARS) {
731 NDR_CHECK(ndr_pull_align(ndr, 4));
732 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
733 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_root_dir));
734 if (_ptr_root_dir) {
735 NDR_PULL_ALLOC(ndr, r->root_dir);
736 } else {
737 r->root_dir = NULL;
739 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_name));
740 if (_ptr_object_name) {
741 NDR_PULL_ALLOC(ndr, r->object_name);
742 } else {
743 r->object_name = NULL;
745 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attributes));
746 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sec_desc));
747 if (_ptr_sec_desc) {
748 NDR_PULL_ALLOC(ndr, r->sec_desc);
749 } else {
750 r->sec_desc = NULL;
752 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sec_qos));
753 if (_ptr_sec_qos) {
754 NDR_PULL_ALLOC(ndr, r->sec_qos);
755 } else {
756 r->sec_qos = NULL;
759 if (ndr_flags & NDR_BUFFERS) {
760 if (r->root_dir) {
761 _mem_save_root_dir_0 = NDR_PULL_GET_MEM_CTX(ndr);
762 NDR_PULL_SET_MEM_CTX(ndr, r->root_dir, 0);
763 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->root_dir));
764 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_root_dir_0, 0);
766 if (r->object_name) {
767 _mem_save_object_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
768 NDR_PULL_SET_MEM_CTX(ndr, r->object_name, 0);
769 NDR_CHECK(ndr_pull_array_size(ndr, &r->object_name));
770 NDR_CHECK(ndr_pull_array_length(ndr, &r->object_name));
771 size_object_name_1 = ndr_get_array_size(ndr, &r->object_name);
772 length_object_name_1 = ndr_get_array_length(ndr, &r->object_name);
773 if (length_object_name_1 > size_object_name_1) {
774 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_object_name_1, length_object_name_1);
776 NDR_CHECK(ndr_check_string_terminator(ndr, length_object_name_1, sizeof(uint16_t)));
777 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_name, length_object_name_1, sizeof(uint16_t), CH_UTF16));
778 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_name_0, 0);
780 if (r->sec_desc) {
781 _mem_save_sec_desc_0 = NDR_PULL_GET_MEM_CTX(ndr);
782 NDR_PULL_SET_MEM_CTX(ndr, r->sec_desc, 0);
783 NDR_CHECK(ndr_pull_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->sec_desc));
784 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_desc_0, 0);
786 if (r->sec_qos) {
787 _mem_save_sec_qos_0 = NDR_PULL_GET_MEM_CTX(ndr);
788 NDR_PULL_SET_MEM_CTX(ndr, r->sec_qos, 0);
789 NDR_CHECK(ndr_pull_lsa_QosInfo(ndr, NDR_SCALARS, r->sec_qos));
790 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_qos_0, 0);
793 return NDR_ERR_SUCCESS;
796 _PUBLIC_ void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *name, const struct lsa_ObjectAttribute *r)
798 ndr_print_struct(ndr, name, "lsa_ObjectAttribute");
799 ndr->depth++;
800 ndr_print_uint32(ndr, "len", r->len);
801 ndr_print_ptr(ndr, "root_dir", r->root_dir);
802 ndr->depth++;
803 if (r->root_dir) {
804 ndr_print_uint8(ndr, "root_dir", *r->root_dir);
806 ndr->depth--;
807 ndr_print_ptr(ndr, "object_name", r->object_name);
808 ndr->depth++;
809 if (r->object_name) {
810 ndr_print_string(ndr, "object_name", r->object_name);
812 ndr->depth--;
813 ndr_print_uint32(ndr, "attributes", r->attributes);
814 ndr_print_ptr(ndr, "sec_desc", r->sec_desc);
815 ndr->depth++;
816 if (r->sec_desc) {
817 ndr_print_security_descriptor(ndr, "sec_desc", r->sec_desc);
819 ndr->depth--;
820 ndr_print_ptr(ndr, "sec_qos", r->sec_qos);
821 ndr->depth++;
822 if (r->sec_qos) {
823 ndr_print_lsa_QosInfo(ndr, "sec_qos", r->sec_qos);
825 ndr->depth--;
826 ndr->depth--;
829 _PUBLIC_ enum ndr_err_code ndr_push_lsa_PolicyAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
831 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
832 return NDR_ERR_SUCCESS;
835 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_PolicyAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
837 uint32_t v;
838 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
839 *r = v;
840 return NDR_ERR_SUCCESS;
843 _PUBLIC_ void ndr_print_lsa_PolicyAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
845 ndr_print_uint32(ndr, name, r);
846 ndr->depth++;
847 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_VIEW_LOCAL_INFORMATION", LSA_POLICY_VIEW_LOCAL_INFORMATION, r);
848 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_VIEW_AUDIT_INFORMATION", LSA_POLICY_VIEW_AUDIT_INFORMATION, r);
849 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_GET_PRIVATE_INFORMATION", LSA_POLICY_GET_PRIVATE_INFORMATION, r);
850 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_TRUST_ADMIN", LSA_POLICY_TRUST_ADMIN, r);
851 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_ACCOUNT", LSA_POLICY_CREATE_ACCOUNT, r);
852 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_SECRET", LSA_POLICY_CREATE_SECRET, r);
853 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_PRIVILEGE", LSA_POLICY_CREATE_PRIVILEGE, r);
854 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS", LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS, r);
855 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SET_AUDIT_REQUIREMENTS", LSA_POLICY_SET_AUDIT_REQUIREMENTS, r);
856 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_AUDIT_LOG_ADMIN", LSA_POLICY_AUDIT_LOG_ADMIN, r);
857 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SERVER_ADMIN", LSA_POLICY_SERVER_ADMIN, r);
858 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_LOOKUP_NAMES", LSA_POLICY_LOOKUP_NAMES, r);
859 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_NOTIFICATION", LSA_POLICY_NOTIFICATION, r);
860 ndr->depth--;
863 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AccountAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
865 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
866 return NDR_ERR_SUCCESS;
869 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AccountAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
871 uint32_t v;
872 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
873 *r = v;
874 return NDR_ERR_SUCCESS;
877 _PUBLIC_ void ndr_print_lsa_AccountAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
879 ndr_print_uint32(ndr, name, r);
880 ndr->depth++;
881 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_VIEW", LSA_ACCOUNT_VIEW, r);
882 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_PRIVILEGES", LSA_ACCOUNT_ADJUST_PRIVILEGES, r);
883 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_QUOTAS", LSA_ACCOUNT_ADJUST_QUOTAS, r);
884 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS", LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS, r);
885 ndr->depth--;
888 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SecretAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
890 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
891 return NDR_ERR_SUCCESS;
894 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SecretAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
896 uint32_t v;
897 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
898 *r = v;
899 return NDR_ERR_SUCCESS;
902 _PUBLIC_ void ndr_print_lsa_SecretAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
904 ndr_print_uint32(ndr, name, r);
905 ndr->depth++;
906 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_SECRET_SET_VALUE", LSA_SECRET_SET_VALUE, r);
907 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_SECRET_QUERY_VALUE", LSA_SECRET_QUERY_VALUE, r);
908 ndr->depth--;
911 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustedAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
913 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
914 return NDR_ERR_SUCCESS;
917 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustedAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
919 uint32_t v;
920 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
921 *r = v;
922 return NDR_ERR_SUCCESS;
925 _PUBLIC_ void ndr_print_lsa_TrustedAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
927 ndr_print_uint32(ndr, name, r);
928 ndr->depth++;
929 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_DOMAIN_NAME", LSA_TRUSTED_QUERY_DOMAIN_NAME, r);
930 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_CONTROLLERS", LSA_TRUSTED_QUERY_CONTROLLERS, r);
931 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_SET_CONTROLLERS", LSA_TRUSTED_SET_CONTROLLERS, r);
932 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_POSIX", LSA_TRUSTED_QUERY_POSIX, r);
933 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_SET_POSIX", LSA_TRUSTED_SET_POSIX, r);
934 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_SET_AUTH", LSA_TRUSTED_SET_AUTH, r);
935 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_AUTH", LSA_TRUSTED_QUERY_AUTH, r);
936 ndr->depth--;
939 static enum ndr_err_code ndr_push_lsa_AuditLogInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditLogInfo *r)
941 if (ndr_flags & NDR_SCALARS) {
942 NDR_CHECK(ndr_push_align(ndr, 8));
943 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->percent_full));
944 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximum_log_size));
945 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->retention_time));
946 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_in_progress));
947 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->time_to_shutdown));
948 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->next_audit_record));
950 if (ndr_flags & NDR_BUFFERS) {
952 return NDR_ERR_SUCCESS;
955 static enum ndr_err_code ndr_pull_lsa_AuditLogInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditLogInfo *r)
957 if (ndr_flags & NDR_SCALARS) {
958 NDR_CHECK(ndr_pull_align(ndr, 8));
959 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->percent_full));
960 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximum_log_size));
961 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->retention_time));
962 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_in_progress));
963 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->time_to_shutdown));
964 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->next_audit_record));
966 if (ndr_flags & NDR_BUFFERS) {
968 return NDR_ERR_SUCCESS;
971 _PUBLIC_ void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditLogInfo *r)
973 ndr_print_struct(ndr, name, "lsa_AuditLogInfo");
974 ndr->depth++;
975 ndr_print_uint32(ndr, "percent_full", r->percent_full);
976 ndr_print_uint32(ndr, "maximum_log_size", r->maximum_log_size);
977 ndr_print_hyper(ndr, "retention_time", r->retention_time);
978 ndr_print_uint8(ndr, "shutdown_in_progress", r->shutdown_in_progress);
979 ndr_print_hyper(ndr, "time_to_shutdown", r->time_to_shutdown);
980 ndr_print_uint32(ndr, "next_audit_record", r->next_audit_record);
981 ndr->depth--;
984 static enum ndr_err_code ndr_push_lsa_PolicyAuditPolicy(struct ndr_push *ndr, int ndr_flags, enum lsa_PolicyAuditPolicy r)
986 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
987 return NDR_ERR_SUCCESS;
990 static enum ndr_err_code ndr_pull_lsa_PolicyAuditPolicy(struct ndr_pull *ndr, int ndr_flags, enum lsa_PolicyAuditPolicy *r)
992 uint32_t v;
993 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
994 *r = v;
995 return NDR_ERR_SUCCESS;
998 _PUBLIC_ void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print *ndr, const char *name, enum lsa_PolicyAuditPolicy r)
1000 const char *val = NULL;
1002 switch (r) {
1003 case LSA_AUDIT_POLICY_NONE: val = "LSA_AUDIT_POLICY_NONE"; break;
1004 case LSA_AUDIT_POLICY_SUCCESS: val = "LSA_AUDIT_POLICY_SUCCESS"; break;
1005 case LSA_AUDIT_POLICY_FAILURE: val = "LSA_AUDIT_POLICY_FAILURE"; break;
1006 case LSA_AUDIT_POLICY_ALL: val = "LSA_AUDIT_POLICY_ALL"; break;
1007 case LSA_AUDIT_POLICY_CLEAR: val = "LSA_AUDIT_POLICY_CLEAR"; break;
1009 ndr_print_enum(ndr, name, "ENUM", val, r);
1012 static enum ndr_err_code ndr_push_lsa_AuditEventsInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditEventsInfo *r)
1014 uint32_t cntr_settings_1;
1015 if (ndr_flags & NDR_SCALARS) {
1016 NDR_CHECK(ndr_push_align(ndr, 4));
1017 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditing_mode));
1018 NDR_CHECK(ndr_push_unique_ptr(ndr, r->settings));
1019 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1021 if (ndr_flags & NDR_BUFFERS) {
1022 if (r->settings) {
1023 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1024 for (cntr_settings_1 = 0; cntr_settings_1 < r->count; cntr_settings_1++) {
1025 NDR_CHECK(ndr_push_lsa_PolicyAuditPolicy(ndr, NDR_SCALARS, r->settings[cntr_settings_1]));
1029 return NDR_ERR_SUCCESS;
1032 static enum ndr_err_code ndr_pull_lsa_AuditEventsInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditEventsInfo *r)
1034 uint32_t _ptr_settings;
1035 uint32_t size_settings_1 = 0;
1036 uint32_t cntr_settings_1;
1037 TALLOC_CTX *_mem_save_settings_0;
1038 TALLOC_CTX *_mem_save_settings_1;
1039 if (ndr_flags & NDR_SCALARS) {
1040 NDR_CHECK(ndr_pull_align(ndr, 4));
1041 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditing_mode));
1042 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_settings));
1043 if (_ptr_settings) {
1044 NDR_PULL_ALLOC(ndr, r->settings);
1045 } else {
1046 r->settings = NULL;
1048 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1050 if (ndr_flags & NDR_BUFFERS) {
1051 if (r->settings) {
1052 _mem_save_settings_0 = NDR_PULL_GET_MEM_CTX(ndr);
1053 NDR_PULL_SET_MEM_CTX(ndr, r->settings, 0);
1054 NDR_CHECK(ndr_pull_array_size(ndr, &r->settings));
1055 size_settings_1 = ndr_get_array_size(ndr, &r->settings);
1056 NDR_PULL_ALLOC_N(ndr, r->settings, size_settings_1);
1057 _mem_save_settings_1 = NDR_PULL_GET_MEM_CTX(ndr);
1058 NDR_PULL_SET_MEM_CTX(ndr, r->settings, 0);
1059 for (cntr_settings_1 = 0; cntr_settings_1 < size_settings_1; cntr_settings_1++) {
1060 NDR_CHECK(ndr_pull_lsa_PolicyAuditPolicy(ndr, NDR_SCALARS, &r->settings[cntr_settings_1]));
1062 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_settings_1, 0);
1063 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_settings_0, 0);
1065 if (r->settings) {
1066 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->settings, r->count));
1069 return NDR_ERR_SUCCESS;
1072 _PUBLIC_ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditEventsInfo *r)
1074 uint32_t cntr_settings_1;
1075 ndr_print_struct(ndr, name, "lsa_AuditEventsInfo");
1076 ndr->depth++;
1077 ndr_print_uint32(ndr, "auditing_mode", r->auditing_mode);
1078 ndr_print_ptr(ndr, "settings", r->settings);
1079 ndr->depth++;
1080 if (r->settings) {
1081 ndr->print(ndr, "%s: ARRAY(%d)", "settings", (int)r->count);
1082 ndr->depth++;
1083 for (cntr_settings_1=0;cntr_settings_1<r->count;cntr_settings_1++) {
1084 char *idx_1=NULL;
1085 if (asprintf(&idx_1, "[%d]", cntr_settings_1) != -1) {
1086 ndr_print_lsa_PolicyAuditPolicy(ndr, "settings", r->settings[cntr_settings_1]);
1087 free(idx_1);
1090 ndr->depth--;
1092 ndr->depth--;
1093 ndr_print_uint32(ndr, "count", r->count);
1094 ndr->depth--;
1097 static enum ndr_err_code ndr_push_lsa_DomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfo *r)
1099 if (ndr_flags & NDR_SCALARS) {
1100 NDR_CHECK(ndr_push_align(ndr, 4));
1101 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1102 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
1104 if (ndr_flags & NDR_BUFFERS) {
1105 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1106 if (r->sid) {
1107 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1110 return NDR_ERR_SUCCESS;
1113 static enum ndr_err_code ndr_pull_lsa_DomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfo *r)
1115 uint32_t _ptr_sid;
1116 TALLOC_CTX *_mem_save_sid_0;
1117 if (ndr_flags & NDR_SCALARS) {
1118 NDR_CHECK(ndr_pull_align(ndr, 4));
1119 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1120 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
1121 if (_ptr_sid) {
1122 NDR_PULL_ALLOC(ndr, r->sid);
1123 } else {
1124 r->sid = NULL;
1127 if (ndr_flags & NDR_BUFFERS) {
1128 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1129 if (r->sid) {
1130 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1131 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
1132 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1133 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
1136 return NDR_ERR_SUCCESS;
1139 _PUBLIC_ void ndr_print_lsa_DomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfo *r)
1141 ndr_print_struct(ndr, name, "lsa_DomainInfo");
1142 ndr->depth++;
1143 ndr_print_lsa_StringLarge(ndr, "name", &r->name);
1144 ndr_print_ptr(ndr, "sid", r->sid);
1145 ndr->depth++;
1146 if (r->sid) {
1147 ndr_print_dom_sid2(ndr, "sid", r->sid);
1149 ndr->depth--;
1150 ndr->depth--;
1153 static enum ndr_err_code ndr_push_lsa_PDAccountInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_PDAccountInfo *r)
1155 if (ndr_flags & NDR_SCALARS) {
1156 NDR_CHECK(ndr_push_align(ndr, 4));
1157 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1159 if (ndr_flags & NDR_BUFFERS) {
1160 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1162 return NDR_ERR_SUCCESS;
1165 static enum ndr_err_code ndr_pull_lsa_PDAccountInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_PDAccountInfo *r)
1167 if (ndr_flags & NDR_SCALARS) {
1168 NDR_CHECK(ndr_pull_align(ndr, 4));
1169 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
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_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_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));
1216 if (ndr_flags & NDR_BUFFERS) {
1218 return NDR_ERR_SUCCESS;
1221 static enum ndr_err_code ndr_pull_lsa_ServerRole(struct ndr_pull *ndr, int ndr_flags, struct lsa_ServerRole *r)
1223 if (ndr_flags & NDR_SCALARS) {
1224 NDR_CHECK(ndr_pull_align(ndr, 4));
1225 NDR_CHECK(ndr_pull_lsa_Role(ndr, NDR_SCALARS, &r->role));
1227 if (ndr_flags & NDR_BUFFERS) {
1229 return NDR_ERR_SUCCESS;
1232 _PUBLIC_ void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, const struct lsa_ServerRole *r)
1234 ndr_print_struct(ndr, name, "lsa_ServerRole");
1235 ndr->depth++;
1236 ndr_print_lsa_Role(ndr, "role", r->role);
1237 ndr->depth--;
1240 static enum ndr_err_code ndr_push_lsa_ReplicaSourceInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ReplicaSourceInfo *r)
1242 if (ndr_flags & NDR_SCALARS) {
1243 NDR_CHECK(ndr_push_align(ndr, 4));
1244 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->source));
1245 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account));
1247 if (ndr_flags & NDR_BUFFERS) {
1248 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->source));
1249 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account));
1251 return NDR_ERR_SUCCESS;
1254 static enum ndr_err_code ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ReplicaSourceInfo *r)
1256 if (ndr_flags & NDR_SCALARS) {
1257 NDR_CHECK(ndr_pull_align(ndr, 4));
1258 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->source));
1259 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account));
1261 if (ndr_flags & NDR_BUFFERS) {
1262 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->source));
1263 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account));
1265 return NDR_ERR_SUCCESS;
1268 _PUBLIC_ void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print *ndr, const char *name, const struct lsa_ReplicaSourceInfo *r)
1270 ndr_print_struct(ndr, name, "lsa_ReplicaSourceInfo");
1271 ndr->depth++;
1272 ndr_print_lsa_String(ndr, "source", &r->source);
1273 ndr_print_lsa_String(ndr, "account", &r->account);
1274 ndr->depth--;
1277 static enum ndr_err_code ndr_push_lsa_DefaultQuotaInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DefaultQuotaInfo *r)
1279 if (ndr_flags & NDR_SCALARS) {
1280 NDR_CHECK(ndr_push_align(ndr, 8));
1281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->paged_pool));
1282 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->non_paged_pool));
1283 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->min_wss));
1284 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_wss));
1285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagefile));
1286 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown));
1288 if (ndr_flags & NDR_BUFFERS) {
1290 return NDR_ERR_SUCCESS;
1293 static enum ndr_err_code ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DefaultQuotaInfo *r)
1295 if (ndr_flags & NDR_SCALARS) {
1296 NDR_CHECK(ndr_pull_align(ndr, 8));
1297 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->paged_pool));
1298 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->non_paged_pool));
1299 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->min_wss));
1300 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_wss));
1301 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagefile));
1302 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown));
1304 if (ndr_flags & NDR_BUFFERS) {
1306 return NDR_ERR_SUCCESS;
1309 _PUBLIC_ void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print *ndr, const char *name, const struct lsa_DefaultQuotaInfo *r)
1311 ndr_print_struct(ndr, name, "lsa_DefaultQuotaInfo");
1312 ndr->depth++;
1313 ndr_print_uint32(ndr, "paged_pool", r->paged_pool);
1314 ndr_print_uint32(ndr, "non_paged_pool", r->non_paged_pool);
1315 ndr_print_uint32(ndr, "min_wss", r->min_wss);
1316 ndr_print_uint32(ndr, "max_wss", r->max_wss);
1317 ndr_print_uint32(ndr, "pagefile", r->pagefile);
1318 ndr_print_hyper(ndr, "unknown", r->unknown);
1319 ndr->depth--;
1322 static enum ndr_err_code ndr_push_lsa_ModificationInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ModificationInfo *r)
1324 if (ndr_flags & NDR_SCALARS) {
1325 NDR_CHECK(ndr_push_align(ndr, 8));
1326 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->modified_id));
1327 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->db_create_time));
1329 if (ndr_flags & NDR_BUFFERS) {
1331 return NDR_ERR_SUCCESS;
1334 static enum ndr_err_code ndr_pull_lsa_ModificationInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ModificationInfo *r)
1336 if (ndr_flags & NDR_SCALARS) {
1337 NDR_CHECK(ndr_pull_align(ndr, 8));
1338 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->modified_id));
1339 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->db_create_time));
1341 if (ndr_flags & NDR_BUFFERS) {
1343 return NDR_ERR_SUCCESS;
1346 _PUBLIC_ void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *name, const struct lsa_ModificationInfo *r)
1348 ndr_print_struct(ndr, name, "lsa_ModificationInfo");
1349 ndr->depth++;
1350 ndr_print_hyper(ndr, "modified_id", r->modified_id);
1351 ndr_print_NTTIME_hyper(ndr, "db_create_time", r->db_create_time);
1352 ndr->depth--;
1355 static enum ndr_err_code ndr_push_lsa_AuditFullSetInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullSetInfo *r)
1357 if (ndr_flags & NDR_SCALARS) {
1358 NDR_CHECK(ndr_push_align(ndr, 1));
1359 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full));
1361 if (ndr_flags & NDR_BUFFERS) {
1363 return NDR_ERR_SUCCESS;
1366 static enum ndr_err_code ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullSetInfo *r)
1368 if (ndr_flags & NDR_SCALARS) {
1369 NDR_CHECK(ndr_pull_align(ndr, 1));
1370 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full));
1372 if (ndr_flags & NDR_BUFFERS) {
1374 return NDR_ERR_SUCCESS;
1377 _PUBLIC_ void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullSetInfo *r)
1379 ndr_print_struct(ndr, name, "lsa_AuditFullSetInfo");
1380 ndr->depth++;
1381 ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full);
1382 ndr->depth--;
1385 static enum ndr_err_code ndr_push_lsa_AuditFullQueryInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullQueryInfo *r)
1387 if (ndr_flags & NDR_SCALARS) {
1388 NDR_CHECK(ndr_push_align(ndr, 1));
1389 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full));
1390 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->log_is_full));
1392 if (ndr_flags & NDR_BUFFERS) {
1394 return NDR_ERR_SUCCESS;
1397 static enum ndr_err_code ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullQueryInfo *r)
1399 if (ndr_flags & NDR_SCALARS) {
1400 NDR_CHECK(ndr_pull_align(ndr, 1));
1401 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full));
1402 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->log_is_full));
1404 if (ndr_flags & NDR_BUFFERS) {
1406 return NDR_ERR_SUCCESS;
1409 _PUBLIC_ void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullQueryInfo *r)
1411 ndr_print_struct(ndr, name, "lsa_AuditFullQueryInfo");
1412 ndr->depth++;
1413 ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full);
1414 ndr_print_uint8(ndr, "log_is_full", r->log_is_full);
1415 ndr->depth--;
1418 static enum ndr_err_code ndr_push_lsa_DnsDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DnsDomainInfo *r)
1420 if (ndr_flags & NDR_SCALARS) {
1421 NDR_CHECK(ndr_push_align(ndr, 4));
1422 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1423 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain));
1424 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forest));
1425 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
1426 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
1428 if (ndr_flags & NDR_BUFFERS) {
1429 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1430 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain));
1431 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forest));
1432 if (r->sid) {
1433 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1436 return NDR_ERR_SUCCESS;
1439 static enum ndr_err_code ndr_pull_lsa_DnsDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DnsDomainInfo *r)
1441 uint32_t _ptr_sid;
1442 TALLOC_CTX *_mem_save_sid_0;
1443 if (ndr_flags & NDR_SCALARS) {
1444 NDR_CHECK(ndr_pull_align(ndr, 4));
1445 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1446 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain));
1447 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forest));
1448 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
1449 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
1450 if (_ptr_sid) {
1451 NDR_PULL_ALLOC(ndr, r->sid);
1452 } else {
1453 r->sid = NULL;
1456 if (ndr_flags & NDR_BUFFERS) {
1457 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1458 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain));
1459 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forest));
1460 if (r->sid) {
1461 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1462 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
1463 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1464 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
1467 return NDR_ERR_SUCCESS;
1470 _PUBLIC_ void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DnsDomainInfo *r)
1472 ndr_print_struct(ndr, name, "lsa_DnsDomainInfo");
1473 ndr->depth++;
1474 ndr_print_lsa_StringLarge(ndr, "name", &r->name);
1475 ndr_print_lsa_StringLarge(ndr, "dns_domain", &r->dns_domain);
1476 ndr_print_lsa_StringLarge(ndr, "dns_forest", &r->dns_forest);
1477 ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
1478 ndr_print_ptr(ndr, "sid", r->sid);
1479 ndr->depth++;
1480 if (r->sid) {
1481 ndr_print_dom_sid2(ndr, "sid", r->sid);
1483 ndr->depth--;
1484 ndr->depth--;
1487 static enum ndr_err_code ndr_push_lsa_PolicyInfo(struct ndr_push *ndr, int ndr_flags, enum lsa_PolicyInfo r)
1489 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
1490 return NDR_ERR_SUCCESS;
1493 static enum ndr_err_code ndr_pull_lsa_PolicyInfo(struct ndr_pull *ndr, int ndr_flags, enum lsa_PolicyInfo *r)
1495 uint16_t v;
1496 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
1497 *r = v;
1498 return NDR_ERR_SUCCESS;
1501 _PUBLIC_ void ndr_print_lsa_PolicyInfo(struct ndr_print *ndr, const char *name, enum lsa_PolicyInfo r)
1503 const char *val = NULL;
1505 switch (r) {
1506 case LSA_POLICY_INFO_AUDIT_LOG: val = "LSA_POLICY_INFO_AUDIT_LOG"; break;
1507 case LSA_POLICY_INFO_AUDIT_EVENTS: val = "LSA_POLICY_INFO_AUDIT_EVENTS"; break;
1508 case LSA_POLICY_INFO_DOMAIN: val = "LSA_POLICY_INFO_DOMAIN"; break;
1509 case LSA_POLICY_INFO_PD: val = "LSA_POLICY_INFO_PD"; break;
1510 case LSA_POLICY_INFO_ACCOUNT_DOMAIN: val = "LSA_POLICY_INFO_ACCOUNT_DOMAIN"; break;
1511 case LSA_POLICY_INFO_ROLE: val = "LSA_POLICY_INFO_ROLE"; break;
1512 case LSA_POLICY_INFO_REPLICA: val = "LSA_POLICY_INFO_REPLICA"; break;
1513 case LSA_POLICY_INFO_QUOTA: val = "LSA_POLICY_INFO_QUOTA"; break;
1514 case LSA_POLICY_INFO_MOD: val = "LSA_POLICY_INFO_MOD"; break;
1515 case LSA_POLICY_INFO_AUDIT_FULL_SET: val = "LSA_POLICY_INFO_AUDIT_FULL_SET"; break;
1516 case LSA_POLICY_INFO_AUDIT_FULL_QUERY: val = "LSA_POLICY_INFO_AUDIT_FULL_QUERY"; break;
1517 case LSA_POLICY_INFO_DNS: val = "LSA_POLICY_INFO_DNS"; break;
1518 case LSA_POLICY_INFO_DNS_INT: val = "LSA_POLICY_INFO_DNS_INT"; break;
1519 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: val = "LSA_POLICY_INFO_L_ACCOUNT_DOMAIN"; break;
1521 ndr_print_enum(ndr, name, "ENUM", val, r);
1524 static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, int ndr_flags, const union lsa_PolicyInformation *r)
1526 if (ndr_flags & NDR_SCALARS) {
1527 int level = ndr_push_get_switch_value(ndr, r);
1528 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
1529 switch (level) {
1530 case LSA_POLICY_INFO_AUDIT_LOG: {
1531 NDR_CHECK(ndr_push_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log));
1532 break; }
1534 case LSA_POLICY_INFO_AUDIT_EVENTS: {
1535 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr, NDR_SCALARS, &r->audit_events));
1536 break; }
1538 case LSA_POLICY_INFO_DOMAIN: {
1539 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain));
1540 break; }
1542 case LSA_POLICY_INFO_PD: {
1543 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd));
1544 break; }
1546 case LSA_POLICY_INFO_ACCOUNT_DOMAIN: {
1547 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain));
1548 break; }
1550 case LSA_POLICY_INFO_ROLE: {
1551 NDR_CHECK(ndr_push_lsa_ServerRole(ndr, NDR_SCALARS, &r->role));
1552 break; }
1554 case LSA_POLICY_INFO_REPLICA: {
1555 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica));
1556 break; }
1558 case LSA_POLICY_INFO_QUOTA: {
1559 NDR_CHECK(ndr_push_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota));
1560 break; }
1562 case LSA_POLICY_INFO_MOD: {
1563 NDR_CHECK(ndr_push_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->mod));
1564 break; }
1566 case LSA_POLICY_INFO_AUDIT_FULL_SET: {
1567 NDR_CHECK(ndr_push_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset));
1568 break; }
1570 case LSA_POLICY_INFO_AUDIT_FULL_QUERY: {
1571 NDR_CHECK(ndr_push_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery));
1572 break; }
1574 case LSA_POLICY_INFO_DNS: {
1575 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1576 break; }
1578 case LSA_POLICY_INFO_DNS_INT: {
1579 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1580 break; }
1582 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: {
1583 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->l_account_domain));
1584 break; }
1586 default:
1587 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1590 if (ndr_flags & NDR_BUFFERS) {
1591 int level = ndr_push_get_switch_value(ndr, r);
1592 switch (level) {
1593 case LSA_POLICY_INFO_AUDIT_LOG:
1594 break;
1596 case LSA_POLICY_INFO_AUDIT_EVENTS:
1597 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr, NDR_BUFFERS, &r->audit_events));
1598 break;
1600 case LSA_POLICY_INFO_DOMAIN:
1601 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domain));
1602 break;
1604 case LSA_POLICY_INFO_PD:
1605 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr, NDR_BUFFERS, &r->pd));
1606 break;
1608 case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
1609 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->account_domain));
1610 break;
1612 case LSA_POLICY_INFO_ROLE:
1613 break;
1615 case LSA_POLICY_INFO_REPLICA:
1616 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr, NDR_BUFFERS, &r->replica));
1617 break;
1619 case LSA_POLICY_INFO_QUOTA:
1620 break;
1622 case LSA_POLICY_INFO_MOD:
1623 break;
1625 case LSA_POLICY_INFO_AUDIT_FULL_SET:
1626 break;
1628 case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
1629 break;
1631 case LSA_POLICY_INFO_DNS:
1632 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1633 break;
1635 case LSA_POLICY_INFO_DNS_INT:
1636 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1637 break;
1639 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
1640 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->l_account_domain));
1641 break;
1643 default:
1644 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1647 return NDR_ERR_SUCCESS;
1650 static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, int ndr_flags, union lsa_PolicyInformation *r)
1652 int level;
1653 uint16_t _level;
1654 level = ndr_pull_get_switch_value(ndr, r);
1655 if (ndr_flags & NDR_SCALARS) {
1656 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
1657 if (_level != level) {
1658 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1660 switch (level) {
1661 case LSA_POLICY_INFO_AUDIT_LOG: {
1662 NDR_CHECK(ndr_pull_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log));
1663 break; }
1665 case LSA_POLICY_INFO_AUDIT_EVENTS: {
1666 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr, NDR_SCALARS, &r->audit_events));
1667 break; }
1669 case LSA_POLICY_INFO_DOMAIN: {
1670 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain));
1671 break; }
1673 case LSA_POLICY_INFO_PD: {
1674 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd));
1675 break; }
1677 case LSA_POLICY_INFO_ACCOUNT_DOMAIN: {
1678 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain));
1679 break; }
1681 case LSA_POLICY_INFO_ROLE: {
1682 NDR_CHECK(ndr_pull_lsa_ServerRole(ndr, NDR_SCALARS, &r->role));
1683 break; }
1685 case LSA_POLICY_INFO_REPLICA: {
1686 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica));
1687 break; }
1689 case LSA_POLICY_INFO_QUOTA: {
1690 NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota));
1691 break; }
1693 case LSA_POLICY_INFO_MOD: {
1694 NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->mod));
1695 break; }
1697 case LSA_POLICY_INFO_AUDIT_FULL_SET: {
1698 NDR_CHECK(ndr_pull_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset));
1699 break; }
1701 case LSA_POLICY_INFO_AUDIT_FULL_QUERY: {
1702 NDR_CHECK(ndr_pull_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery));
1703 break; }
1705 case LSA_POLICY_INFO_DNS: {
1706 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1707 break; }
1709 case LSA_POLICY_INFO_DNS_INT: {
1710 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1711 break; }
1713 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: {
1714 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->l_account_domain));
1715 break; }
1717 default:
1718 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1721 if (ndr_flags & NDR_BUFFERS) {
1722 switch (level) {
1723 case LSA_POLICY_INFO_AUDIT_LOG:
1724 break;
1726 case LSA_POLICY_INFO_AUDIT_EVENTS:
1727 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr, NDR_BUFFERS, &r->audit_events));
1728 break;
1730 case LSA_POLICY_INFO_DOMAIN:
1731 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domain));
1732 break;
1734 case LSA_POLICY_INFO_PD:
1735 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_BUFFERS, &r->pd));
1736 break;
1738 case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
1739 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->account_domain));
1740 break;
1742 case LSA_POLICY_INFO_ROLE:
1743 break;
1745 case LSA_POLICY_INFO_REPLICA:
1746 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_BUFFERS, &r->replica));
1747 break;
1749 case LSA_POLICY_INFO_QUOTA:
1750 break;
1752 case LSA_POLICY_INFO_MOD:
1753 break;
1755 case LSA_POLICY_INFO_AUDIT_FULL_SET:
1756 break;
1758 case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
1759 break;
1761 case LSA_POLICY_INFO_DNS:
1762 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1763 break;
1765 case LSA_POLICY_INFO_DNS_INT:
1766 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1767 break;
1769 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
1770 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->l_account_domain));
1771 break;
1773 default:
1774 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1777 return NDR_ERR_SUCCESS;
1780 _PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char *name, const union lsa_PolicyInformation *r)
1782 int level;
1783 level = ndr_print_get_switch_value(ndr, r);
1784 ndr_print_union(ndr, name, level, "lsa_PolicyInformation");
1785 switch (level) {
1786 case LSA_POLICY_INFO_AUDIT_LOG:
1787 ndr_print_lsa_AuditLogInfo(ndr, "audit_log", &r->audit_log);
1788 break;
1790 case LSA_POLICY_INFO_AUDIT_EVENTS:
1791 ndr_print_lsa_AuditEventsInfo(ndr, "audit_events", &r->audit_events);
1792 break;
1794 case LSA_POLICY_INFO_DOMAIN:
1795 ndr_print_lsa_DomainInfo(ndr, "domain", &r->domain);
1796 break;
1798 case LSA_POLICY_INFO_PD:
1799 ndr_print_lsa_PDAccountInfo(ndr, "pd", &r->pd);
1800 break;
1802 case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
1803 ndr_print_lsa_DomainInfo(ndr, "account_domain", &r->account_domain);
1804 break;
1806 case LSA_POLICY_INFO_ROLE:
1807 ndr_print_lsa_ServerRole(ndr, "role", &r->role);
1808 break;
1810 case LSA_POLICY_INFO_REPLICA:
1811 ndr_print_lsa_ReplicaSourceInfo(ndr, "replica", &r->replica);
1812 break;
1814 case LSA_POLICY_INFO_QUOTA:
1815 ndr_print_lsa_DefaultQuotaInfo(ndr, "quota", &r->quota);
1816 break;
1818 case LSA_POLICY_INFO_MOD:
1819 ndr_print_lsa_ModificationInfo(ndr, "mod", &r->mod);
1820 break;
1822 case LSA_POLICY_INFO_AUDIT_FULL_SET:
1823 ndr_print_lsa_AuditFullSetInfo(ndr, "auditfullset", &r->auditfullset);
1824 break;
1826 case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
1827 ndr_print_lsa_AuditFullQueryInfo(ndr, "auditfullquery", &r->auditfullquery);
1828 break;
1830 case LSA_POLICY_INFO_DNS:
1831 ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
1832 break;
1834 case LSA_POLICY_INFO_DNS_INT:
1835 ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
1836 break;
1838 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
1839 ndr_print_lsa_DomainInfo(ndr, "l_account_domain", &r->l_account_domain);
1840 break;
1842 default:
1843 ndr_print_bad_level(ndr, name, level);
1847 static enum ndr_err_code ndr_push_lsa_SidPtr(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidPtr *r)
1849 if (ndr_flags & NDR_SCALARS) {
1850 NDR_CHECK(ndr_push_align(ndr, 4));
1851 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
1853 if (ndr_flags & NDR_BUFFERS) {
1854 if (r->sid) {
1855 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1858 return NDR_ERR_SUCCESS;
1861 static enum ndr_err_code ndr_pull_lsa_SidPtr(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidPtr *r)
1863 uint32_t _ptr_sid;
1864 TALLOC_CTX *_mem_save_sid_0;
1865 if (ndr_flags & NDR_SCALARS) {
1866 NDR_CHECK(ndr_pull_align(ndr, 4));
1867 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
1868 if (_ptr_sid) {
1869 NDR_PULL_ALLOC(ndr, r->sid);
1870 } else {
1871 r->sid = NULL;
1874 if (ndr_flags & NDR_BUFFERS) {
1875 if (r->sid) {
1876 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1877 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
1878 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1879 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
1882 return NDR_ERR_SUCCESS;
1885 _PUBLIC_ void ndr_print_lsa_SidPtr(struct ndr_print *ndr, const char *name, const struct lsa_SidPtr *r)
1887 ndr_print_struct(ndr, name, "lsa_SidPtr");
1888 ndr->depth++;
1889 ndr_print_ptr(ndr, "sid", r->sid);
1890 ndr->depth++;
1891 if (r->sid) {
1892 ndr_print_dom_sid2(ndr, "sid", r->sid);
1894 ndr->depth--;
1895 ndr->depth--;
1898 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidArray *r)
1900 uint32_t cntr_sids_1;
1901 if (ndr_flags & NDR_SCALARS) {
1902 NDR_CHECK(ndr_push_align(ndr, 4));
1903 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
1904 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
1906 if (ndr_flags & NDR_BUFFERS) {
1907 if (r->sids) {
1908 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
1909 for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
1910 NDR_CHECK(ndr_push_lsa_SidPtr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1912 for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
1913 NDR_CHECK(ndr_push_lsa_SidPtr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1917 return NDR_ERR_SUCCESS;
1920 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidArray *r)
1922 uint32_t _ptr_sids;
1923 uint32_t size_sids_1 = 0;
1924 uint32_t cntr_sids_1;
1925 TALLOC_CTX *_mem_save_sids_0;
1926 TALLOC_CTX *_mem_save_sids_1;
1927 if (ndr_flags & NDR_SCALARS) {
1928 NDR_CHECK(ndr_pull_align(ndr, 4));
1929 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
1930 if (r->num_sids > 1000) {
1931 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1933 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
1934 if (_ptr_sids) {
1935 NDR_PULL_ALLOC(ndr, r->sids);
1936 } else {
1937 r->sids = NULL;
1940 if (ndr_flags & NDR_BUFFERS) {
1941 if (r->sids) {
1942 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1943 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1944 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
1945 size_sids_1 = ndr_get_array_size(ndr, &r->sids);
1946 NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
1947 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1948 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1949 for (cntr_sids_1 = 0; cntr_sids_1 < size_sids_1; cntr_sids_1++) {
1950 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1952 for (cntr_sids_1 = 0; cntr_sids_1 < size_sids_1; cntr_sids_1++) {
1953 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1955 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
1956 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
1958 if (r->sids) {
1959 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
1962 return NDR_ERR_SUCCESS;
1965 _PUBLIC_ void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, const struct lsa_SidArray *r)
1967 uint32_t cntr_sids_1;
1968 ndr_print_struct(ndr, name, "lsa_SidArray");
1969 ndr->depth++;
1970 ndr_print_uint32(ndr, "num_sids", r->num_sids);
1971 ndr_print_ptr(ndr, "sids", r->sids);
1972 ndr->depth++;
1973 if (r->sids) {
1974 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->num_sids);
1975 ndr->depth++;
1976 for (cntr_sids_1=0;cntr_sids_1<r->num_sids;cntr_sids_1++) {
1977 char *idx_1=NULL;
1978 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
1979 ndr_print_lsa_SidPtr(ndr, "sids", &r->sids[cntr_sids_1]);
1980 free(idx_1);
1983 ndr->depth--;
1985 ndr->depth--;
1986 ndr->depth--;
1989 static enum ndr_err_code ndr_push_lsa_DomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainList *r)
1991 uint32_t cntr_domains_1;
1992 if (ndr_flags & NDR_SCALARS) {
1993 NDR_CHECK(ndr_push_align(ndr, 4));
1994 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1995 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
1997 if (ndr_flags & NDR_BUFFERS) {
1998 if (r->domains) {
1999 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2000 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2001 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
2003 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2004 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
2008 return NDR_ERR_SUCCESS;
2011 static enum ndr_err_code ndr_pull_lsa_DomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainList *r)
2013 uint32_t _ptr_domains;
2014 uint32_t size_domains_1 = 0;
2015 uint32_t cntr_domains_1;
2016 TALLOC_CTX *_mem_save_domains_0;
2017 TALLOC_CTX *_mem_save_domains_1;
2018 if (ndr_flags & NDR_SCALARS) {
2019 NDR_CHECK(ndr_pull_align(ndr, 4));
2020 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2021 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
2022 if (_ptr_domains) {
2023 NDR_PULL_ALLOC(ndr, r->domains);
2024 } else {
2025 r->domains = NULL;
2028 if (ndr_flags & NDR_BUFFERS) {
2029 if (r->domains) {
2030 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
2031 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
2032 NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
2033 size_domains_1 = ndr_get_array_size(ndr, &r->domains);
2034 NDR_PULL_ALLOC_N(ndr, r->domains, size_domains_1);
2035 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
2036 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
2037 for (cntr_domains_1 = 0; cntr_domains_1 < size_domains_1; cntr_domains_1++) {
2038 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
2040 for (cntr_domains_1 = 0; cntr_domains_1 < size_domains_1; cntr_domains_1++) {
2041 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
2043 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
2044 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
2046 if (r->domains) {
2047 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
2050 return NDR_ERR_SUCCESS;
2053 _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, const struct lsa_DomainList *r)
2055 uint32_t cntr_domains_1;
2056 ndr_print_struct(ndr, name, "lsa_DomainList");
2057 ndr->depth++;
2058 ndr_print_uint32(ndr, "count", r->count);
2059 ndr_print_ptr(ndr, "domains", r->domains);
2060 ndr->depth++;
2061 if (r->domains) {
2062 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
2063 ndr->depth++;
2064 for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
2065 char *idx_1=NULL;
2066 if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
2067 ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
2068 free(idx_1);
2071 ndr->depth--;
2073 ndr->depth--;
2074 ndr->depth--;
2077 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidType(struct ndr_push *ndr, int ndr_flags, enum lsa_SidType r)
2079 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
2080 return NDR_ERR_SUCCESS;
2083 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidType(struct ndr_pull *ndr, int ndr_flags, enum lsa_SidType *r)
2085 uint16_t v;
2086 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
2087 *r = v;
2088 return NDR_ERR_SUCCESS;
2091 _PUBLIC_ void ndr_print_lsa_SidType(struct ndr_print *ndr, const char *name, enum lsa_SidType r)
2093 const char *val = NULL;
2095 switch (r) {
2096 case SID_NAME_USE_NONE: val = "SID_NAME_USE_NONE"; break;
2097 case SID_NAME_USER: val = "SID_NAME_USER"; break;
2098 case SID_NAME_DOM_GRP: val = "SID_NAME_DOM_GRP"; break;
2099 case SID_NAME_DOMAIN: val = "SID_NAME_DOMAIN"; break;
2100 case SID_NAME_ALIAS: val = "SID_NAME_ALIAS"; break;
2101 case SID_NAME_WKN_GRP: val = "SID_NAME_WKN_GRP"; break;
2102 case SID_NAME_DELETED: val = "SID_NAME_DELETED"; break;
2103 case SID_NAME_INVALID: val = "SID_NAME_INVALID"; break;
2104 case SID_NAME_UNKNOWN: val = "SID_NAME_UNKNOWN"; break;
2105 case SID_NAME_COMPUTER: val = "SID_NAME_COMPUTER"; break;
2107 ndr_print_enum(ndr, name, "ENUM", val, r);
2110 static enum ndr_err_code ndr_push_lsa_TranslatedSid(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid *r)
2112 if (ndr_flags & NDR_SCALARS) {
2113 NDR_CHECK(ndr_push_align(ndr, 4));
2114 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
2115 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
2116 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
2118 if (ndr_flags & NDR_BUFFERS) {
2120 return NDR_ERR_SUCCESS;
2123 static enum ndr_err_code ndr_pull_lsa_TranslatedSid(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid *r)
2125 if (ndr_flags & NDR_SCALARS) {
2126 NDR_CHECK(ndr_pull_align(ndr, 4));
2127 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
2128 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
2129 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
2131 if (ndr_flags & NDR_BUFFERS) {
2133 return NDR_ERR_SUCCESS;
2136 _PUBLIC_ void ndr_print_lsa_TranslatedSid(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid *r)
2138 ndr_print_struct(ndr, name, "lsa_TranslatedSid");
2139 ndr->depth++;
2140 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
2141 ndr_print_uint32(ndr, "rid", r->rid);
2142 ndr_print_uint32(ndr, "sid_index", r->sid_index);
2143 ndr->depth--;
2146 static enum ndr_err_code ndr_push_lsa_TransSidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray *r)
2148 uint32_t cntr_sids_1;
2149 if (ndr_flags & NDR_SCALARS) {
2150 NDR_CHECK(ndr_push_align(ndr, 4));
2151 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2152 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
2154 if (ndr_flags & NDR_BUFFERS) {
2155 if (r->sids) {
2156 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2157 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
2158 NDR_CHECK(ndr_push_lsa_TranslatedSid(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
2162 return NDR_ERR_SUCCESS;
2165 static enum ndr_err_code ndr_pull_lsa_TransSidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray *r)
2167 uint32_t _ptr_sids;
2168 uint32_t size_sids_1 = 0;
2169 uint32_t cntr_sids_1;
2170 TALLOC_CTX *_mem_save_sids_0;
2171 TALLOC_CTX *_mem_save_sids_1;
2172 if (ndr_flags & NDR_SCALARS) {
2173 NDR_CHECK(ndr_pull_align(ndr, 4));
2174 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2175 if (r->count > 1000) {
2176 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2178 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
2179 if (_ptr_sids) {
2180 NDR_PULL_ALLOC(ndr, r->sids);
2181 } else {
2182 r->sids = NULL;
2185 if (ndr_flags & NDR_BUFFERS) {
2186 if (r->sids) {
2187 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
2188 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
2189 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
2190 size_sids_1 = ndr_get_array_size(ndr, &r->sids);
2191 NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
2192 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
2193 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
2194 for (cntr_sids_1 = 0; cntr_sids_1 < size_sids_1; cntr_sids_1++) {
2195 NDR_CHECK(ndr_pull_lsa_TranslatedSid(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
2197 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
2198 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
2200 if (r->sids) {
2201 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
2204 return NDR_ERR_SUCCESS;
2207 _PUBLIC_ void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray *r)
2209 uint32_t cntr_sids_1;
2210 ndr_print_struct(ndr, name, "lsa_TransSidArray");
2211 ndr->depth++;
2212 ndr_print_uint32(ndr, "count", r->count);
2213 ndr_print_ptr(ndr, "sids", r->sids);
2214 ndr->depth++;
2215 if (r->sids) {
2216 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
2217 ndr->depth++;
2218 for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
2219 char *idx_1=NULL;
2220 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
2221 ndr_print_lsa_TranslatedSid(ndr, "sids", &r->sids[cntr_sids_1]);
2222 free(idx_1);
2225 ndr->depth--;
2227 ndr->depth--;
2228 ndr->depth--;
2231 static enum ndr_err_code ndr_push_lsa_RefDomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_RefDomainList *r)
2233 uint32_t cntr_domains_1;
2234 if (ndr_flags & NDR_SCALARS) {
2235 NDR_CHECK(ndr_push_align(ndr, 4));
2236 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2237 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
2238 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_size));
2240 if (ndr_flags & NDR_BUFFERS) {
2241 if (r->domains) {
2242 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2243 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2244 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
2246 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2247 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
2251 return NDR_ERR_SUCCESS;
2254 static enum ndr_err_code ndr_pull_lsa_RefDomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_RefDomainList *r)
2256 uint32_t _ptr_domains;
2257 uint32_t size_domains_1 = 0;
2258 uint32_t cntr_domains_1;
2259 TALLOC_CTX *_mem_save_domains_0;
2260 TALLOC_CTX *_mem_save_domains_1;
2261 if (ndr_flags & NDR_SCALARS) {
2262 NDR_CHECK(ndr_pull_align(ndr, 4));
2263 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2264 if (r->count > 1000) {
2265 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2267 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
2268 if (_ptr_domains) {
2269 NDR_PULL_ALLOC(ndr, r->domains);
2270 } else {
2271 r->domains = NULL;
2273 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_size));
2275 if (ndr_flags & NDR_BUFFERS) {
2276 if (r->domains) {
2277 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
2278 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
2279 NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
2280 size_domains_1 = ndr_get_array_size(ndr, &r->domains);
2281 NDR_PULL_ALLOC_N(ndr, r->domains, size_domains_1);
2282 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
2283 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
2284 for (cntr_domains_1 = 0; cntr_domains_1 < size_domains_1; cntr_domains_1++) {
2285 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
2287 for (cntr_domains_1 = 0; cntr_domains_1 < size_domains_1; cntr_domains_1++) {
2288 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
2290 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
2291 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
2293 if (r->domains) {
2294 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
2297 return NDR_ERR_SUCCESS;
2300 _PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *name, const struct lsa_RefDomainList *r)
2302 uint32_t cntr_domains_1;
2303 ndr_print_struct(ndr, name, "lsa_RefDomainList");
2304 ndr->depth++;
2305 ndr_print_uint32(ndr, "count", r->count);
2306 ndr_print_ptr(ndr, "domains", r->domains);
2307 ndr->depth++;
2308 if (r->domains) {
2309 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
2310 ndr->depth++;
2311 for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
2312 char *idx_1=NULL;
2313 if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
2314 ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
2315 free(idx_1);
2318 ndr->depth--;
2320 ndr->depth--;
2321 ndr_print_uint32(ndr, "max_size", r->max_size);
2322 ndr->depth--;
2325 static enum ndr_err_code ndr_push_lsa_LookupNamesLevel(struct ndr_push *ndr, int ndr_flags, enum lsa_LookupNamesLevel r)
2327 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
2328 return NDR_ERR_SUCCESS;
2331 static enum ndr_err_code ndr_pull_lsa_LookupNamesLevel(struct ndr_pull *ndr, int ndr_flags, enum lsa_LookupNamesLevel *r)
2333 uint16_t v;
2334 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
2335 *r = v;
2336 return NDR_ERR_SUCCESS;
2339 _PUBLIC_ void ndr_print_lsa_LookupNamesLevel(struct ndr_print *ndr, const char *name, enum lsa_LookupNamesLevel r)
2341 const char *val = NULL;
2343 switch (r) {
2344 case LSA_LOOKUP_NAMES_ALL: val = "LSA_LOOKUP_NAMES_ALL"; break;
2345 case LSA_LOOKUP_NAMES_DOMAINS_ONLY: val = "LSA_LOOKUP_NAMES_DOMAINS_ONLY"; break;
2346 case LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY: val = "LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY"; break;
2347 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY: val = "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY"; break;
2348 case LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY: val = "LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY"; break;
2349 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2: val = "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2"; break;
2350 case LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC: val = "LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC"; break;
2352 ndr_print_enum(ndr, name, "ENUM", val, r);
2355 static enum ndr_err_code ndr_push_lsa_TranslatedName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName *r)
2357 if (ndr_flags & NDR_SCALARS) {
2358 NDR_CHECK(ndr_push_align(ndr, 4));
2359 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
2360 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
2361 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
2363 if (ndr_flags & NDR_BUFFERS) {
2364 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
2366 return NDR_ERR_SUCCESS;
2369 static enum ndr_err_code ndr_pull_lsa_TranslatedName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName *r)
2371 if (ndr_flags & NDR_SCALARS) {
2372 NDR_CHECK(ndr_pull_align(ndr, 4));
2373 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
2374 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
2375 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
2377 if (ndr_flags & NDR_BUFFERS) {
2378 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
2380 return NDR_ERR_SUCCESS;
2383 _PUBLIC_ void ndr_print_lsa_TranslatedName(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName *r)
2385 ndr_print_struct(ndr, name, "lsa_TranslatedName");
2386 ndr->depth++;
2387 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
2388 ndr_print_lsa_String(ndr, "name", &r->name);
2389 ndr_print_uint32(ndr, "sid_index", r->sid_index);
2390 ndr->depth--;
2393 static enum ndr_err_code ndr_push_lsa_TransNameArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray *r)
2395 uint32_t cntr_names_1;
2396 if (ndr_flags & NDR_SCALARS) {
2397 NDR_CHECK(ndr_push_align(ndr, 4));
2398 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2399 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
2401 if (ndr_flags & NDR_BUFFERS) {
2402 if (r->names) {
2403 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2404 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
2405 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
2407 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
2408 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
2412 return NDR_ERR_SUCCESS;
2415 static enum ndr_err_code ndr_pull_lsa_TransNameArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray *r)
2417 uint32_t _ptr_names;
2418 uint32_t size_names_1 = 0;
2419 uint32_t cntr_names_1;
2420 TALLOC_CTX *_mem_save_names_0;
2421 TALLOC_CTX *_mem_save_names_1;
2422 if (ndr_flags & NDR_SCALARS) {
2423 NDR_CHECK(ndr_pull_align(ndr, 4));
2424 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2425 if (r->count > 1000) {
2426 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2428 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
2429 if (_ptr_names) {
2430 NDR_PULL_ALLOC(ndr, r->names);
2431 } else {
2432 r->names = NULL;
2435 if (ndr_flags & NDR_BUFFERS) {
2436 if (r->names) {
2437 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
2438 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
2439 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
2440 size_names_1 = ndr_get_array_size(ndr, &r->names);
2441 NDR_PULL_ALLOC_N(ndr, r->names, size_names_1);
2442 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
2443 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
2444 for (cntr_names_1 = 0; cntr_names_1 < size_names_1; cntr_names_1++) {
2445 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
2447 for (cntr_names_1 = 0; cntr_names_1 < size_names_1; cntr_names_1++) {
2448 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
2450 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
2451 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
2453 if (r->names) {
2454 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
2457 return NDR_ERR_SUCCESS;
2460 _PUBLIC_ void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray *r)
2462 uint32_t cntr_names_1;
2463 ndr_print_struct(ndr, name, "lsa_TransNameArray");
2464 ndr->depth++;
2465 ndr_print_uint32(ndr, "count", r->count);
2466 ndr_print_ptr(ndr, "names", r->names);
2467 ndr->depth++;
2468 if (r->names) {
2469 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
2470 ndr->depth++;
2471 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
2472 char *idx_1=NULL;
2473 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
2474 ndr_print_lsa_TranslatedName(ndr, "names", &r->names[cntr_names_1]);
2475 free(idx_1);
2478 ndr->depth--;
2480 ndr->depth--;
2481 ndr->depth--;
2484 static enum ndr_err_code ndr_push_lsa_LUIDAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUIDAttribute *r)
2486 if (ndr_flags & NDR_SCALARS) {
2487 NDR_CHECK(ndr_push_align(ndr, 4));
2488 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
2489 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attribute));
2491 if (ndr_flags & NDR_BUFFERS) {
2493 return NDR_ERR_SUCCESS;
2496 static enum ndr_err_code ndr_pull_lsa_LUIDAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUIDAttribute *r)
2498 if (ndr_flags & NDR_SCALARS) {
2499 NDR_CHECK(ndr_pull_align(ndr, 4));
2500 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
2501 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attribute));
2503 if (ndr_flags & NDR_BUFFERS) {
2505 return NDR_ERR_SUCCESS;
2508 _PUBLIC_ void ndr_print_lsa_LUIDAttribute(struct ndr_print *ndr, const char *name, const struct lsa_LUIDAttribute *r)
2510 ndr_print_struct(ndr, name, "lsa_LUIDAttribute");
2511 ndr->depth++;
2512 ndr_print_lsa_LUID(ndr, "luid", &r->luid);
2513 ndr_print_uint32(ndr, "attribute", r->attribute);
2514 ndr->depth--;
2517 static enum ndr_err_code ndr_push_lsa_PrivilegeSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivilegeSet *r)
2519 uint32_t cntr_set_0;
2520 if (ndr_flags & NDR_SCALARS) {
2521 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2522 NDR_CHECK(ndr_push_align(ndr, 4));
2523 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2524 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
2525 for (cntr_set_0 = 0; cntr_set_0 < r->count; cntr_set_0++) {
2526 NDR_CHECK(ndr_push_lsa_LUIDAttribute(ndr, NDR_SCALARS, &r->set[cntr_set_0]));
2529 if (ndr_flags & NDR_BUFFERS) {
2531 return NDR_ERR_SUCCESS;
2534 static enum ndr_err_code ndr_pull_lsa_PrivilegeSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivilegeSet *r)
2536 uint32_t size_set_0 = 0;
2537 uint32_t cntr_set_0;
2538 TALLOC_CTX *_mem_save_set_0;
2539 if (ndr_flags & NDR_SCALARS) {
2540 NDR_CHECK(ndr_pull_array_size(ndr, &r->set));
2541 NDR_CHECK(ndr_pull_align(ndr, 4));
2542 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2543 if (r->count > 1000) {
2544 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2546 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
2547 size_set_0 = ndr_get_array_size(ndr, &r->set);
2548 NDR_PULL_ALLOC_N(ndr, r->set, size_set_0);
2549 _mem_save_set_0 = NDR_PULL_GET_MEM_CTX(ndr);
2550 NDR_PULL_SET_MEM_CTX(ndr, r->set, 0);
2551 for (cntr_set_0 = 0; cntr_set_0 < size_set_0; cntr_set_0++) {
2552 NDR_CHECK(ndr_pull_lsa_LUIDAttribute(ndr, NDR_SCALARS, &r->set[cntr_set_0]));
2554 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_set_0, 0);
2555 if (r->set) {
2556 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->set, r->count));
2559 if (ndr_flags & NDR_BUFFERS) {
2561 return NDR_ERR_SUCCESS;
2564 _PUBLIC_ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name, const struct lsa_PrivilegeSet *r)
2566 uint32_t cntr_set_0;
2567 ndr_print_struct(ndr, name, "lsa_PrivilegeSet");
2568 ndr->depth++;
2569 ndr_print_uint32(ndr, "count", r->count);
2570 ndr_print_uint32(ndr, "unknown", r->unknown);
2571 ndr->print(ndr, "%s: ARRAY(%d)", "set", (int)r->count);
2572 ndr->depth++;
2573 for (cntr_set_0=0;cntr_set_0<r->count;cntr_set_0++) {
2574 char *idx_0=NULL;
2575 if (asprintf(&idx_0, "[%d]", cntr_set_0) != -1) {
2576 ndr_print_lsa_LUIDAttribute(ndr, "set", &r->set[cntr_set_0]);
2577 free(idx_0);
2580 ndr->depth--;
2581 ndr->depth--;
2584 static enum ndr_err_code ndr_push_lsa_DATA_BUF(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF *r)
2587 uint32_t _flags_save_STRUCT = ndr->flags;
2588 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2589 if (ndr_flags & NDR_SCALARS) {
2590 NDR_CHECK(ndr_push_align(ndr, 4));
2591 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
2592 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2593 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
2595 if (ndr_flags & NDR_BUFFERS) {
2596 if (r->data) {
2597 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2598 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2599 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
2600 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
2603 ndr->flags = _flags_save_STRUCT;
2605 return NDR_ERR_SUCCESS;
2608 static enum ndr_err_code ndr_pull_lsa_DATA_BUF(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF *r)
2610 uint32_t _ptr_data;
2611 uint32_t size_data_1 = 0;
2612 uint32_t length_data_1 = 0;
2613 TALLOC_CTX *_mem_save_data_0;
2615 uint32_t _flags_save_STRUCT = ndr->flags;
2616 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2617 if (ndr_flags & NDR_SCALARS) {
2618 NDR_CHECK(ndr_pull_align(ndr, 4));
2619 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
2620 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2621 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2622 if (_ptr_data) {
2623 NDR_PULL_ALLOC(ndr, r->data);
2624 } else {
2625 r->data = NULL;
2628 if (ndr_flags & NDR_BUFFERS) {
2629 if (r->data) {
2630 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2631 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
2632 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
2633 NDR_CHECK(ndr_pull_array_length(ndr, &r->data));
2634 size_data_1 = ndr_get_array_size(ndr, &r->data);
2635 length_data_1 = ndr_get_array_length(ndr, &r->data);
2636 if (length_data_1 > size_data_1) {
2637 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_data_1, length_data_1);
2639 NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
2640 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, length_data_1));
2641 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2643 if (r->data) {
2644 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->size));
2646 if (r->data) {
2647 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->data, r->length));
2650 ndr->flags = _flags_save_STRUCT;
2652 return NDR_ERR_SUCCESS;
2655 _PUBLIC_ void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF *r)
2657 ndr_print_struct(ndr, name, "lsa_DATA_BUF");
2659 uint32_t _flags_save_STRUCT = ndr->flags;
2660 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2661 ndr->depth++;
2662 ndr_print_uint32(ndr, "length", r->length);
2663 ndr_print_uint32(ndr, "size", r->size);
2664 ndr_print_ptr(ndr, "data", r->data);
2665 ndr->depth++;
2666 if (r->data) {
2667 ndr_print_array_uint8(ndr, "data", r->data, r->length);
2669 ndr->depth--;
2670 ndr->depth--;
2671 ndr->flags = _flags_save_STRUCT;
2675 static enum ndr_err_code ndr_push_lsa_DATA_BUF2(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF2 *r)
2678 uint32_t _flags_save_STRUCT = ndr->flags;
2679 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2680 if (ndr_flags & NDR_SCALARS) {
2681 NDR_CHECK(ndr_push_align(ndr, 4));
2682 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2683 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
2685 if (ndr_flags & NDR_BUFFERS) {
2686 if (r->data) {
2687 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2688 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->size));
2691 ndr->flags = _flags_save_STRUCT;
2693 return NDR_ERR_SUCCESS;
2696 static enum ndr_err_code ndr_pull_lsa_DATA_BUF2(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF2 *r)
2698 uint32_t _ptr_data;
2699 uint32_t size_data_1 = 0;
2700 TALLOC_CTX *_mem_save_data_0;
2702 uint32_t _flags_save_STRUCT = ndr->flags;
2703 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2704 if (ndr_flags & NDR_SCALARS) {
2705 NDR_CHECK(ndr_pull_align(ndr, 4));
2706 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2707 if (r->size > 65536) {
2708 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2710 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2711 if (_ptr_data) {
2712 NDR_PULL_ALLOC(ndr, r->data);
2713 } else {
2714 r->data = NULL;
2717 if (ndr_flags & NDR_BUFFERS) {
2718 if (r->data) {
2719 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2720 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
2721 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
2722 size_data_1 = ndr_get_array_size(ndr, &r->data);
2723 NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
2724 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
2725 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2727 if (r->data) {
2728 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->size));
2731 ndr->flags = _flags_save_STRUCT;
2733 return NDR_ERR_SUCCESS;
2736 _PUBLIC_ void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF2 *r)
2738 ndr_print_struct(ndr, name, "lsa_DATA_BUF2");
2740 uint32_t _flags_save_STRUCT = ndr->flags;
2741 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2742 ndr->depth++;
2743 ndr_print_uint32(ndr, "size", r->size);
2744 ndr_print_ptr(ndr, "data", r->data);
2745 ndr->depth++;
2746 if (r->data) {
2747 ndr_print_array_uint8(ndr, "data", r->data, r->size);
2749 ndr->depth--;
2750 ndr->depth--;
2751 ndr->flags = _flags_save_STRUCT;
2755 static enum ndr_err_code ndr_push_lsa_TrustDomInfoEnum(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum r)
2757 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
2758 return NDR_ERR_SUCCESS;
2761 static enum ndr_err_code ndr_pull_lsa_TrustDomInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum *r)
2763 uint16_t v;
2764 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
2765 *r = v;
2766 return NDR_ERR_SUCCESS;
2769 _PUBLIC_ void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *name, enum lsa_TrustDomInfoEnum r)
2771 const char *val = NULL;
2773 switch (r) {
2774 case LSA_TRUSTED_DOMAIN_INFO_NAME: val = "LSA_TRUSTED_DOMAIN_INFO_NAME"; break;
2775 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: val = "LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS"; break;
2776 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: val = "LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET"; break;
2777 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: val = "LSA_TRUSTED_DOMAIN_INFO_PASSWORD"; break;
2778 case LSA_TRUSTED_DOMAIN_INFO_BASIC: val = "LSA_TRUSTED_DOMAIN_INFO_BASIC"; break;
2779 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX"; break;
2780 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO"; break;
2781 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO"; break;
2782 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL"; break;
2783 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL"; break;
2784 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL"; break;
2785 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL"; break;
2786 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: val = "LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES"; break;
2788 ndr_print_enum(ndr, name, "ENUM", val, r);
2791 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustDirection(struct ndr_push *ndr, int ndr_flags, uint32_t r)
2793 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2794 return NDR_ERR_SUCCESS;
2797 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustDirection(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
2799 uint32_t v;
2800 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2801 *r = v;
2802 return NDR_ERR_SUCCESS;
2805 _PUBLIC_ void ndr_print_lsa_TrustDirection(struct ndr_print *ndr, const char *name, uint32_t r)
2807 ndr_print_uint32(ndr, name, r);
2808 ndr->depth++;
2809 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_DIRECTION_INBOUND", LSA_TRUST_DIRECTION_INBOUND, r);
2810 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_DIRECTION_OUTBOUND", LSA_TRUST_DIRECTION_OUTBOUND, r);
2811 ndr->depth--;
2814 static enum ndr_err_code ndr_push_lsa_TrustType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustType r)
2816 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2817 return NDR_ERR_SUCCESS;
2820 static enum ndr_err_code ndr_pull_lsa_TrustType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustType *r)
2822 uint32_t v;
2823 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2824 *r = v;
2825 return NDR_ERR_SUCCESS;
2828 _PUBLIC_ void ndr_print_lsa_TrustType(struct ndr_print *ndr, const char *name, enum lsa_TrustType r)
2830 const char *val = NULL;
2832 switch (r) {
2833 case LSA_TRUST_TYPE_DOWNLEVEL: val = "LSA_TRUST_TYPE_DOWNLEVEL"; break;
2834 case LSA_TRUST_TYPE_UPLEVEL: val = "LSA_TRUST_TYPE_UPLEVEL"; break;
2835 case LSA_TRUST_TYPE_MIT: val = "LSA_TRUST_TYPE_MIT"; break;
2837 ndr_print_enum(ndr, name, "ENUM", val, r);
2840 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r)
2842 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2843 return NDR_ERR_SUCCESS;
2846 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
2848 uint32_t v;
2849 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2850 *r = v;
2851 return NDR_ERR_SUCCESS;
2854 _PUBLIC_ void ndr_print_lsa_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r)
2856 ndr_print_uint32(ndr, name, r);
2857 ndr->depth++;
2858 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE", LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE, r);
2859 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY", LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY, r);
2860 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN", LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN, r);
2861 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE", LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE, r);
2862 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION", LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION, r);
2863 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_WITHIN_FOREST", LSA_TRUST_ATTRIBUTE_WITHIN_FOREST, r);
2864 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL", LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL, r);
2865 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION", LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION, r);
2866 ndr->depth--;
2869 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoName *r)
2871 if (ndr_flags & NDR_SCALARS) {
2872 NDR_CHECK(ndr_push_align(ndr, 4));
2873 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
2875 if (ndr_flags & NDR_BUFFERS) {
2876 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
2878 return NDR_ERR_SUCCESS;
2881 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoName *r)
2883 if (ndr_flags & NDR_SCALARS) {
2884 NDR_CHECK(ndr_pull_align(ndr, 4));
2885 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
2887 if (ndr_flags & NDR_BUFFERS) {
2888 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
2890 return NDR_ERR_SUCCESS;
2893 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoName *r)
2895 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoName");
2896 ndr->depth++;
2897 ndr_print_lsa_StringLarge(ndr, "netbios_name", &r->netbios_name);
2898 ndr->depth--;
2901 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoControllers(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoControllers *r)
2903 uint32_t cntr_netbios_names_1;
2904 if (ndr_flags & NDR_SCALARS) {
2905 NDR_CHECK(ndr_push_align(ndr, 4));
2906 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries));
2907 NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_names));
2909 if (ndr_flags & NDR_BUFFERS) {
2910 if (r->netbios_names) {
2911 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries));
2912 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
2913 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_names[cntr_netbios_names_1]));
2915 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
2916 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_names[cntr_netbios_names_1]));
2920 return NDR_ERR_SUCCESS;
2923 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoControllers(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoControllers *r)
2925 uint32_t _ptr_netbios_names;
2926 uint32_t size_netbios_names_1 = 0;
2927 uint32_t cntr_netbios_names_1;
2928 TALLOC_CTX *_mem_save_netbios_names_0;
2929 TALLOC_CTX *_mem_save_netbios_names_1;
2930 if (ndr_flags & NDR_SCALARS) {
2931 NDR_CHECK(ndr_pull_align(ndr, 4));
2932 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->entries));
2933 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_names));
2934 if (_ptr_netbios_names) {
2935 NDR_PULL_ALLOC(ndr, r->netbios_names);
2936 } else {
2937 r->netbios_names = NULL;
2940 if (ndr_flags & NDR_BUFFERS) {
2941 if (r->netbios_names) {
2942 _mem_save_netbios_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
2943 NDR_PULL_SET_MEM_CTX(ndr, r->netbios_names, 0);
2944 NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_names));
2945 size_netbios_names_1 = ndr_get_array_size(ndr, &r->netbios_names);
2946 NDR_PULL_ALLOC_N(ndr, r->netbios_names, size_netbios_names_1);
2947 _mem_save_netbios_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
2948 NDR_PULL_SET_MEM_CTX(ndr, r->netbios_names, 0);
2949 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < size_netbios_names_1; cntr_netbios_names_1++) {
2950 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_names[cntr_netbios_names_1]));
2952 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < size_netbios_names_1; cntr_netbios_names_1++) {
2953 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_names[cntr_netbios_names_1]));
2955 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_names_1, 0);
2956 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_names_0, 0);
2958 if (r->netbios_names) {
2959 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->netbios_names, r->entries));
2962 return NDR_ERR_SUCCESS;
2965 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoControllers(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoControllers *r)
2967 uint32_t cntr_netbios_names_1;
2968 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoControllers");
2969 ndr->depth++;
2970 ndr_print_uint32(ndr, "entries", r->entries);
2971 ndr_print_ptr(ndr, "netbios_names", r->netbios_names);
2972 ndr->depth++;
2973 if (r->netbios_names) {
2974 ndr->print(ndr, "%s: ARRAY(%d)", "netbios_names", (int)r->entries);
2975 ndr->depth++;
2976 for (cntr_netbios_names_1=0;cntr_netbios_names_1<r->entries;cntr_netbios_names_1++) {
2977 char *idx_1=NULL;
2978 if (asprintf(&idx_1, "[%d]", cntr_netbios_names_1) != -1) {
2979 ndr_print_lsa_StringLarge(ndr, "netbios_names", &r->netbios_names[cntr_netbios_names_1]);
2980 free(idx_1);
2983 ndr->depth--;
2985 ndr->depth--;
2986 ndr->depth--;
2989 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPosixOffset *r)
2991 if (ndr_flags & NDR_SCALARS) {
2992 NDR_CHECK(ndr_push_align(ndr, 4));
2993 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->posix_offset));
2995 if (ndr_flags & NDR_BUFFERS) {
2997 return NDR_ERR_SUCCESS;
3000 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoPosixOffset(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPosixOffset *r)
3002 if (ndr_flags & NDR_SCALARS) {
3003 NDR_CHECK(ndr_pull_align(ndr, 4));
3004 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->posix_offset));
3006 if (ndr_flags & NDR_BUFFERS) {
3008 return NDR_ERR_SUCCESS;
3011 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPosixOffset *r)
3013 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoPosixOffset");
3014 ndr->depth++;
3015 ndr_print_uint32(ndr, "posix_offset", r->posix_offset);
3016 ndr->depth--;
3019 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoPassword(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPassword *r)
3021 if (ndr_flags & NDR_SCALARS) {
3022 NDR_CHECK(ndr_push_align(ndr, 4));
3023 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
3024 NDR_CHECK(ndr_push_unique_ptr(ndr, r->old_password));
3026 if (ndr_flags & NDR_BUFFERS) {
3027 if (r->password) {
3028 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
3030 if (r->old_password) {
3031 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->old_password));
3034 return NDR_ERR_SUCCESS;
3037 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoPassword(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPassword *r)
3039 uint32_t _ptr_password;
3040 TALLOC_CTX *_mem_save_password_0;
3041 uint32_t _ptr_old_password;
3042 TALLOC_CTX *_mem_save_old_password_0;
3043 if (ndr_flags & NDR_SCALARS) {
3044 NDR_CHECK(ndr_pull_align(ndr, 4));
3045 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
3046 if (_ptr_password) {
3047 NDR_PULL_ALLOC(ndr, r->password);
3048 } else {
3049 r->password = NULL;
3051 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_password));
3052 if (_ptr_old_password) {
3053 NDR_PULL_ALLOC(ndr, r->old_password);
3054 } else {
3055 r->old_password = NULL;
3058 if (ndr_flags & NDR_BUFFERS) {
3059 if (r->password) {
3060 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
3061 NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
3062 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
3063 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
3065 if (r->old_password) {
3066 _mem_save_old_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
3067 NDR_PULL_SET_MEM_CTX(ndr, r->old_password, 0);
3068 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->old_password));
3069 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_password_0, 0);
3072 return NDR_ERR_SUCCESS;
3075 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPassword *r)
3077 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoPassword");
3078 ndr->depth++;
3079 ndr_print_ptr(ndr, "password", r->password);
3080 ndr->depth++;
3081 if (r->password) {
3082 ndr_print_lsa_DATA_BUF(ndr, "password", r->password);
3084 ndr->depth--;
3085 ndr_print_ptr(ndr, "old_password", r->old_password);
3086 ndr->depth++;
3087 if (r->old_password) {
3088 ndr_print_lsa_DATA_BUF(ndr, "old_password", r->old_password);
3090 ndr->depth--;
3091 ndr->depth--;
3094 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoBasic(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBasic *r)
3096 if (ndr_flags & NDR_SCALARS) {
3097 NDR_CHECK(ndr_push_align(ndr, 4));
3098 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->netbios_name));
3099 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
3101 if (ndr_flags & NDR_BUFFERS) {
3102 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->netbios_name));
3103 if (r->sid) {
3104 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3107 return NDR_ERR_SUCCESS;
3110 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoBasic(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBasic *r)
3112 uint32_t _ptr_sid;
3113 TALLOC_CTX *_mem_save_sid_0;
3114 if (ndr_flags & NDR_SCALARS) {
3115 NDR_CHECK(ndr_pull_align(ndr, 4));
3116 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->netbios_name));
3117 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
3118 if (_ptr_sid) {
3119 NDR_PULL_ALLOC(ndr, r->sid);
3120 } else {
3121 r->sid = NULL;
3124 if (ndr_flags & NDR_BUFFERS) {
3125 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->netbios_name));
3126 if (r->sid) {
3127 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
3128 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
3129 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3130 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
3133 return NDR_ERR_SUCCESS;
3136 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBasic *r)
3138 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoBasic");
3139 ndr->depth++;
3140 ndr_print_lsa_String(ndr, "netbios_name", &r->netbios_name);
3141 ndr_print_ptr(ndr, "sid", r->sid);
3142 ndr->depth++;
3143 if (r->sid) {
3144 ndr_print_dom_sid2(ndr, "sid", r->sid);
3146 ndr->depth--;
3147 ndr->depth--;
3150 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx *r)
3152 if (ndr_flags & NDR_SCALARS) {
3153 NDR_CHECK(ndr_push_align(ndr, 4));
3154 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain_name));
3155 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
3156 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
3157 NDR_CHECK(ndr_push_lsa_TrustDirection(ndr, NDR_SCALARS, r->trust_direction));
3158 NDR_CHECK(ndr_push_lsa_TrustType(ndr, NDR_SCALARS, r->trust_type));
3159 NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes));
3161 if (ndr_flags & NDR_BUFFERS) {
3162 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name));
3163 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
3164 if (r->sid) {
3165 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3168 return NDR_ERR_SUCCESS;
3171 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx *r)
3173 uint32_t _ptr_sid;
3174 TALLOC_CTX *_mem_save_sid_0;
3175 if (ndr_flags & NDR_SCALARS) {
3176 NDR_CHECK(ndr_pull_align(ndr, 4));
3177 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain_name));
3178 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
3179 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
3180 if (_ptr_sid) {
3181 NDR_PULL_ALLOC(ndr, r->sid);
3182 } else {
3183 r->sid = NULL;
3185 NDR_CHECK(ndr_pull_lsa_TrustDirection(ndr, NDR_SCALARS, &r->trust_direction));
3186 NDR_CHECK(ndr_pull_lsa_TrustType(ndr, NDR_SCALARS, &r->trust_type));
3187 NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes));
3189 if (ndr_flags & NDR_BUFFERS) {
3190 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name));
3191 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
3192 if (r->sid) {
3193 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
3194 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
3195 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3196 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
3199 return NDR_ERR_SUCCESS;
3202 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx *r)
3204 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoEx");
3205 ndr->depth++;
3206 ndr_print_lsa_StringLarge(ndr, "domain_name", &r->domain_name);
3207 ndr_print_lsa_StringLarge(ndr, "netbios_name", &r->netbios_name);
3208 ndr_print_ptr(ndr, "sid", r->sid);
3209 ndr->depth++;
3210 if (r->sid) {
3211 ndr_print_dom_sid2(ndr, "sid", r->sid);
3213 ndr->depth--;
3214 ndr_print_lsa_TrustDirection(ndr, "trust_direction", r->trust_direction);
3215 ndr_print_lsa_TrustType(ndr, "trust_type", r->trust_type);
3216 ndr_print_lsa_TrustAttributes(ndr, "trust_attributes", r->trust_attributes);
3217 ndr->depth--;
3220 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAuthType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustAuthType r)
3222 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
3223 return NDR_ERR_SUCCESS;
3226 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustAuthType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustAuthType *r)
3228 uint32_t v;
3229 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
3230 *r = v;
3231 return NDR_ERR_SUCCESS;
3234 _PUBLIC_ void ndr_print_lsa_TrustAuthType(struct ndr_print *ndr, const char *name, enum lsa_TrustAuthType r)
3236 const char *val = NULL;
3238 switch (r) {
3239 case TRUST_AUTH_TYPE_NONE: val = "TRUST_AUTH_TYPE_NONE"; break;
3240 case TRUST_AUTH_TYPE_NT4OWF: val = "TRUST_AUTH_TYPE_NT4OWF"; break;
3241 case TRUST_AUTH_TYPE_CLEAR: val = "TRUST_AUTH_TYPE_CLEAR"; break;
3242 case TRUST_AUTH_TYPE_VERSION: val = "TRUST_AUTH_TYPE_VERSION"; break;
3244 ndr_print_enum(ndr, name, "ENUM", val, r);
3247 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBuffer *r)
3249 if (ndr_flags & NDR_SCALARS) {
3250 NDR_CHECK(ndr_push_align(ndr, 8));
3251 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->last_update_time));
3252 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
3253 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data));
3255 if (ndr_flags & NDR_BUFFERS) {
3256 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data));
3258 return NDR_ERR_SUCCESS;
3261 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBuffer *r)
3263 if (ndr_flags & NDR_SCALARS) {
3264 NDR_CHECK(ndr_pull_align(ndr, 8));
3265 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->last_update_time));
3266 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
3267 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data));
3269 if (ndr_flags & NDR_BUFFERS) {
3270 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data));
3272 return NDR_ERR_SUCCESS;
3275 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBuffer *r)
3277 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoBuffer");
3278 ndr->depth++;
3279 ndr_print_NTTIME_hyper(ndr, "last_update_time", r->last_update_time);
3280 ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
3281 ndr_print_lsa_DATA_BUF2(ndr, "data", &r->data);
3282 ndr->depth--;
3285 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoAuthInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfo *r)
3287 if (ndr_flags & NDR_SCALARS) {
3288 NDR_CHECK(ndr_push_align(ndr, 4));
3289 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->incoming_count));
3290 NDR_CHECK(ndr_push_unique_ptr(ndr, r->incoming_current_auth_info));
3291 NDR_CHECK(ndr_push_unique_ptr(ndr, r->incoming_previous_auth_info));
3292 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->outgoing_count));
3293 NDR_CHECK(ndr_push_unique_ptr(ndr, r->outgoing_current_auth_info));
3294 NDR_CHECK(ndr_push_unique_ptr(ndr, r->outgoing_previous_auth_info));
3296 if (ndr_flags & NDR_BUFFERS) {
3297 if (r->incoming_current_auth_info) {
3298 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_current_auth_info));
3300 if (r->incoming_previous_auth_info) {
3301 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_previous_auth_info));
3303 if (r->outgoing_current_auth_info) {
3304 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_current_auth_info));
3306 if (r->outgoing_previous_auth_info) {
3307 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_previous_auth_info));
3310 return NDR_ERR_SUCCESS;
3313 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoAuthInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfo *r)
3315 uint32_t _ptr_incoming_current_auth_info;
3316 TALLOC_CTX *_mem_save_incoming_current_auth_info_0;
3317 uint32_t _ptr_incoming_previous_auth_info;
3318 TALLOC_CTX *_mem_save_incoming_previous_auth_info_0;
3319 uint32_t _ptr_outgoing_current_auth_info;
3320 TALLOC_CTX *_mem_save_outgoing_current_auth_info_0;
3321 uint32_t _ptr_outgoing_previous_auth_info;
3322 TALLOC_CTX *_mem_save_outgoing_previous_auth_info_0;
3323 if (ndr_flags & NDR_SCALARS) {
3324 NDR_CHECK(ndr_pull_align(ndr, 4));
3325 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->incoming_count));
3326 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_incoming_current_auth_info));
3327 if (_ptr_incoming_current_auth_info) {
3328 NDR_PULL_ALLOC(ndr, r->incoming_current_auth_info);
3329 } else {
3330 r->incoming_current_auth_info = NULL;
3332 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_incoming_previous_auth_info));
3333 if (_ptr_incoming_previous_auth_info) {
3334 NDR_PULL_ALLOC(ndr, r->incoming_previous_auth_info);
3335 } else {
3336 r->incoming_previous_auth_info = NULL;
3338 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->outgoing_count));
3339 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_outgoing_current_auth_info));
3340 if (_ptr_outgoing_current_auth_info) {
3341 NDR_PULL_ALLOC(ndr, r->outgoing_current_auth_info);
3342 } else {
3343 r->outgoing_current_auth_info = NULL;
3345 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_outgoing_previous_auth_info));
3346 if (_ptr_outgoing_previous_auth_info) {
3347 NDR_PULL_ALLOC(ndr, r->outgoing_previous_auth_info);
3348 } else {
3349 r->outgoing_previous_auth_info = NULL;
3352 if (ndr_flags & NDR_BUFFERS) {
3353 if (r->incoming_current_auth_info) {
3354 _mem_save_incoming_current_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3355 NDR_PULL_SET_MEM_CTX(ndr, r->incoming_current_auth_info, 0);
3356 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_current_auth_info));
3357 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_incoming_current_auth_info_0, 0);
3359 if (r->incoming_previous_auth_info) {
3360 _mem_save_incoming_previous_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3361 NDR_PULL_SET_MEM_CTX(ndr, r->incoming_previous_auth_info, 0);
3362 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_previous_auth_info));
3363 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_incoming_previous_auth_info_0, 0);
3365 if (r->outgoing_current_auth_info) {
3366 _mem_save_outgoing_current_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3367 NDR_PULL_SET_MEM_CTX(ndr, r->outgoing_current_auth_info, 0);
3368 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_current_auth_info));
3369 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_outgoing_current_auth_info_0, 0);
3371 if (r->outgoing_previous_auth_info) {
3372 _mem_save_outgoing_previous_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3373 NDR_PULL_SET_MEM_CTX(ndr, r->outgoing_previous_auth_info, 0);
3374 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_previous_auth_info));
3375 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_outgoing_previous_auth_info_0, 0);
3378 return NDR_ERR_SUCCESS;
3381 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfo *r)
3383 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoAuthInfo");
3384 ndr->depth++;
3385 ndr_print_uint32(ndr, "incoming_count", r->incoming_count);
3386 ndr_print_ptr(ndr, "incoming_current_auth_info", r->incoming_current_auth_info);
3387 ndr->depth++;
3388 if (r->incoming_current_auth_info) {
3389 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "incoming_current_auth_info", r->incoming_current_auth_info);
3391 ndr->depth--;
3392 ndr_print_ptr(ndr, "incoming_previous_auth_info", r->incoming_previous_auth_info);
3393 ndr->depth++;
3394 if (r->incoming_previous_auth_info) {
3395 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "incoming_previous_auth_info", r->incoming_previous_auth_info);
3397 ndr->depth--;
3398 ndr_print_uint32(ndr, "outgoing_count", r->outgoing_count);
3399 ndr_print_ptr(ndr, "outgoing_current_auth_info", r->outgoing_current_auth_info);
3400 ndr->depth++;
3401 if (r->outgoing_current_auth_info) {
3402 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "outgoing_current_auth_info", r->outgoing_current_auth_info);
3404 ndr->depth--;
3405 ndr_print_ptr(ndr, "outgoing_previous_auth_info", r->outgoing_previous_auth_info);
3406 ndr->depth++;
3407 if (r->outgoing_previous_auth_info) {
3408 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "outgoing_previous_auth_info", r->outgoing_previous_auth_info);
3410 ndr->depth--;
3411 ndr->depth--;
3414 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo *r)
3416 if (ndr_flags & NDR_SCALARS) {
3417 NDR_CHECK(ndr_push_align(ndr, 4));
3418 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3419 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3420 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3422 if (ndr_flags & NDR_BUFFERS) {
3423 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3424 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3426 return NDR_ERR_SUCCESS;
3429 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo *r)
3431 if (ndr_flags & NDR_SCALARS) {
3432 NDR_CHECK(ndr_pull_align(ndr, 4));
3433 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3434 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3435 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3437 if (ndr_flags & NDR_BUFFERS) {
3438 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3439 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3441 return NDR_ERR_SUCCESS;
3444 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo *r)
3446 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfo");
3447 ndr->depth++;
3448 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3449 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3450 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
3451 ndr->depth--;
3454 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfoInternal *r)
3456 if (ndr_flags & NDR_SCALARS) {
3457 NDR_CHECK(ndr_push_align(ndr, 4));
3458 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob));
3460 if (ndr_flags & NDR_BUFFERS) {
3461 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob));
3463 return NDR_ERR_SUCCESS;
3466 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfoInternal *r)
3468 if (ndr_flags & NDR_SCALARS) {
3469 NDR_CHECK(ndr_pull_align(ndr, 4));
3470 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob));
3472 if (ndr_flags & NDR_BUFFERS) {
3473 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob));
3475 return NDR_ERR_SUCCESS;
3478 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfoInternal *r)
3480 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoAuthInfoInternal");
3481 ndr->depth++;
3482 ndr_print_lsa_DATA_BUF2(ndr, "auth_blob", &r->auth_blob);
3483 ndr->depth--;
3486 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfoInternal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfoInternal *r)
3488 if (ndr_flags & NDR_SCALARS) {
3489 NDR_CHECK(ndr_push_align(ndr, 4));
3490 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3491 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3492 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info));
3494 if (ndr_flags & NDR_BUFFERS) {
3495 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3496 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info));
3498 return NDR_ERR_SUCCESS;
3501 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfoInternal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfoInternal *r)
3503 if (ndr_flags & NDR_SCALARS) {
3504 NDR_CHECK(ndr_pull_align(ndr, 4));
3505 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3506 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3507 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info));
3509 if (ndr_flags & NDR_BUFFERS) {
3510 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3511 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info));
3513 return NDR_ERR_SUCCESS;
3516 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfoInternal *r)
3518 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfoInternal");
3519 ndr->depth++;
3520 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3521 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3522 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", &r->auth_info);
3523 ndr->depth--;
3526 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx2Internal *r)
3528 if (ndr_flags & NDR_SCALARS) {
3529 NDR_CHECK(ndr_push_align(ndr, 4));
3530 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3531 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->forest_trust_length));
3532 NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest_trust_data));
3534 if (ndr_flags & NDR_BUFFERS) {
3535 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3536 if (r->forest_trust_data) {
3537 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->forest_trust_length));
3538 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->forest_trust_data, r->forest_trust_length));
3541 return NDR_ERR_SUCCESS;
3544 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx2Internal *r)
3546 uint32_t _ptr_forest_trust_data;
3547 uint32_t size_forest_trust_data_1 = 0;
3548 TALLOC_CTX *_mem_save_forest_trust_data_0;
3549 if (ndr_flags & NDR_SCALARS) {
3550 NDR_CHECK(ndr_pull_align(ndr, 4));
3551 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3552 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->forest_trust_length));
3553 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_data));
3554 if (_ptr_forest_trust_data) {
3555 NDR_PULL_ALLOC(ndr, r->forest_trust_data);
3556 } else {
3557 r->forest_trust_data = NULL;
3560 if (ndr_flags & NDR_BUFFERS) {
3561 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3562 if (r->forest_trust_data) {
3563 _mem_save_forest_trust_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
3564 NDR_PULL_SET_MEM_CTX(ndr, r->forest_trust_data, 0);
3565 NDR_CHECK(ndr_pull_array_size(ndr, &r->forest_trust_data));
3566 size_forest_trust_data_1 = ndr_get_array_size(ndr, &r->forest_trust_data);
3567 NDR_PULL_ALLOC_N(ndr, r->forest_trust_data, size_forest_trust_data_1);
3568 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->forest_trust_data, size_forest_trust_data_1));
3569 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_data_0, 0);
3571 if (r->forest_trust_data) {
3572 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->forest_trust_data, r->forest_trust_length));
3575 return NDR_ERR_SUCCESS;
3578 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx2Internal *r)
3580 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoEx2Internal");
3581 ndr->depth++;
3582 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3583 ndr_print_uint32(ndr, "forest_trust_length", r->forest_trust_length);
3584 ndr_print_ptr(ndr, "forest_trust_data", r->forest_trust_data);
3585 ndr->depth++;
3586 if (r->forest_trust_data) {
3587 ndr_print_array_uint8(ndr, "forest_trust_data", r->forest_trust_data, r->forest_trust_length);
3589 ndr->depth--;
3590 ndr->depth--;
3593 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo2Internal *r)
3595 if (ndr_flags & NDR_SCALARS) {
3596 NDR_CHECK(ndr_push_align(ndr, 4));
3597 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info));
3598 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3599 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3601 if (ndr_flags & NDR_BUFFERS) {
3602 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info));
3603 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3605 return NDR_ERR_SUCCESS;
3608 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo2Internal *r)
3610 if (ndr_flags & NDR_SCALARS) {
3611 NDR_CHECK(ndr_pull_align(ndr, 4));
3612 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info));
3613 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3614 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3616 if (ndr_flags & NDR_BUFFERS) {
3617 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info));
3618 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3620 return NDR_ERR_SUCCESS;
3623 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo2Internal *r)
3625 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfo2Internal");
3626 ndr->depth++;
3627 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr, "info", &r->info);
3628 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3629 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
3630 ndr->depth--;
3633 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoSupportedEncTypes *r)
3635 if (ndr_flags & NDR_SCALARS) {
3636 NDR_CHECK(ndr_push_align(ndr, 4));
3637 NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->enc_types));
3639 if (ndr_flags & NDR_BUFFERS) {
3641 return NDR_ERR_SUCCESS;
3644 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoSupportedEncTypes *r)
3646 if (ndr_flags & NDR_SCALARS) {
3647 NDR_CHECK(ndr_pull_align(ndr, 4));
3648 NDR_CHECK(ndr_pull_kerb_EncTypes(ndr, NDR_SCALARS, &r->enc_types));
3650 if (ndr_flags & NDR_BUFFERS) {
3652 return NDR_ERR_SUCCESS;
3655 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoSupportedEncTypes *r)
3657 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoSupportedEncTypes");
3658 ndr->depth++;
3659 ndr_print_kerb_EncTypes(ndr, "enc_types", r->enc_types);
3660 ndr->depth--;
3663 static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, int ndr_flags, const union lsa_TrustedDomainInfo *r)
3665 if (ndr_flags & NDR_SCALARS) {
3666 int level = ndr_push_get_switch_value(ndr, r);
3667 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, level));
3668 switch (level) {
3669 case LSA_TRUSTED_DOMAIN_INFO_NAME: {
3670 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name));
3671 break; }
3673 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: {
3674 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr, NDR_SCALARS, &r->controllers));
3675 break; }
3677 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: {
3678 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3679 break; }
3681 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: {
3682 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr, NDR_SCALARS, &r->password));
3683 break; }
3685 case LSA_TRUSTED_DOMAIN_INFO_BASIC: {
3686 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr, NDR_SCALARS, &r->info_basic));
3687 break; }
3689 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: {
3690 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3691 break; }
3693 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: {
3694 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3695 break; }
3697 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: {
3698 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info));
3699 break; }
3701 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: {
3702 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info_internal));
3703 break; }
3705 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: {
3706 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_SCALARS, &r->full_info_internal));
3707 break; }
3709 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: {
3710 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info_ex2_internal));
3711 break; }
3713 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: {
3714 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal));
3715 break; }
3717 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: {
3718 NDR_CHECK(ndr_push_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types));
3719 break; }
3721 default:
3722 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3725 if (ndr_flags & NDR_BUFFERS) {
3726 int level = ndr_push_get_switch_value(ndr, r);
3727 switch (level) {
3728 case LSA_TRUSTED_DOMAIN_INFO_NAME:
3729 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name));
3730 break;
3732 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
3733 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr, NDR_BUFFERS, &r->controllers));
3734 break;
3736 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
3737 break;
3739 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
3740 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr, NDR_BUFFERS, &r->password));
3741 break;
3743 case LSA_TRUSTED_DOMAIN_INFO_BASIC:
3744 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr, NDR_BUFFERS, &r->info_basic));
3745 break;
3747 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
3748 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3749 break;
3751 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
3752 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3753 break;
3755 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
3756 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info));
3757 break;
3759 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
3760 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info_internal));
3761 break;
3763 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
3764 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_BUFFERS, &r->full_info_internal));
3765 break;
3767 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
3768 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info_ex2_internal));
3769 break;
3771 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
3772 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal));
3773 break;
3775 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES:
3776 break;
3778 default:
3779 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3782 return NDR_ERR_SUCCESS;
3785 static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, int ndr_flags, union lsa_TrustedDomainInfo *r)
3787 int level;
3788 uint16_t _level;
3789 level = ndr_pull_get_switch_value(ndr, r);
3790 if (ndr_flags & NDR_SCALARS) {
3791 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
3792 if (_level != level) {
3793 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
3795 switch (level) {
3796 case LSA_TRUSTED_DOMAIN_INFO_NAME: {
3797 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name));
3798 break; }
3800 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: {
3801 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr, NDR_SCALARS, &r->controllers));
3802 break; }
3804 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: {
3805 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3806 break; }
3808 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: {
3809 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr, NDR_SCALARS, &r->password));
3810 break; }
3812 case LSA_TRUSTED_DOMAIN_INFO_BASIC: {
3813 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr, NDR_SCALARS, &r->info_basic));
3814 break; }
3816 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: {
3817 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3818 break; }
3820 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: {
3821 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3822 break; }
3824 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: {
3825 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info));
3826 break; }
3828 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: {
3829 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info_internal));
3830 break; }
3832 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: {
3833 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_SCALARS, &r->full_info_internal));
3834 break; }
3836 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: {
3837 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info_ex2_internal));
3838 break; }
3840 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: {
3841 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal));
3842 break; }
3844 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: {
3845 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types));
3846 break; }
3848 default:
3849 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3852 if (ndr_flags & NDR_BUFFERS) {
3853 switch (level) {
3854 case LSA_TRUSTED_DOMAIN_INFO_NAME:
3855 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name));
3856 break;
3858 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
3859 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr, NDR_BUFFERS, &r->controllers));
3860 break;
3862 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
3863 break;
3865 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
3866 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr, NDR_BUFFERS, &r->password));
3867 break;
3869 case LSA_TRUSTED_DOMAIN_INFO_BASIC:
3870 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr, NDR_BUFFERS, &r->info_basic));
3871 break;
3873 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
3874 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3875 break;
3877 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
3878 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3879 break;
3881 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
3882 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info));
3883 break;
3885 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
3886 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info_internal));
3887 break;
3889 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
3890 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_BUFFERS, &r->full_info_internal));
3891 break;
3893 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
3894 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info_ex2_internal));
3895 break;
3897 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
3898 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal));
3899 break;
3901 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES:
3902 break;
3904 default:
3905 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3908 return NDR_ERR_SUCCESS;
3911 _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char *name, const union lsa_TrustedDomainInfo *r)
3913 int level;
3914 level = ndr_print_get_switch_value(ndr, r);
3915 ndr_print_union(ndr, name, level, "lsa_TrustedDomainInfo");
3916 switch (level) {
3917 case LSA_TRUSTED_DOMAIN_INFO_NAME:
3918 ndr_print_lsa_TrustDomainInfoName(ndr, "name", &r->name);
3919 break;
3921 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
3922 ndr_print_lsa_TrustDomainInfoControllers(ndr, "controllers", &r->controllers);
3923 break;
3925 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
3926 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3927 break;
3929 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
3930 ndr_print_lsa_TrustDomainInfoPassword(ndr, "password", &r->password);
3931 break;
3933 case LSA_TRUSTED_DOMAIN_INFO_BASIC:
3934 ndr_print_lsa_TrustDomainInfoBasic(ndr, "info_basic", &r->info_basic);
3935 break;
3937 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
3938 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3939 break;
3941 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
3942 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
3943 break;
3945 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
3946 ndr_print_lsa_TrustDomainInfoFullInfo(ndr, "full_info", &r->full_info);
3947 break;
3949 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
3950 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info_internal", &r->auth_info_internal);
3951 break;
3953 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
3954 ndr_print_lsa_TrustDomainInfoFullInfoInternal(ndr, "full_info_internal", &r->full_info_internal);
3955 break;
3957 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
3958 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr, "info_ex2_internal", &r->info_ex2_internal);
3959 break;
3961 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
3962 ndr_print_lsa_TrustDomainInfoFullInfo2Internal(ndr, "full_info2_internal", &r->full_info2_internal);
3963 break;
3965 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES:
3966 ndr_print_lsa_TrustDomainInfoSupportedEncTypes(ndr, "enc_types", &r->enc_types);
3967 break;
3969 default:
3970 ndr_print_bad_level(ndr, name, level);
3974 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)
3976 if (ndr_flags & NDR_SCALARS) {
3977 NDR_CHECK(ndr_push_align(ndr, 4));
3978 NDR_CHECK(ndr_push_unique_ptr(ndr, r->buf));
3980 if (ndr_flags & NDR_BUFFERS) {
3981 if (r->buf) {
3982 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->buf));
3985 return NDR_ERR_SUCCESS;
3988 static enum ndr_err_code ndr_pull_lsa_DATA_BUF_PTR(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF_PTR *r)
3990 uint32_t _ptr_buf;
3991 TALLOC_CTX *_mem_save_buf_0;
3992 if (ndr_flags & NDR_SCALARS) {
3993 NDR_CHECK(ndr_pull_align(ndr, 4));
3994 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buf));
3995 if (_ptr_buf) {
3996 NDR_PULL_ALLOC(ndr, r->buf);
3997 } else {
3998 r->buf = NULL;
4001 if (ndr_flags & NDR_BUFFERS) {
4002 if (r->buf) {
4003 _mem_save_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
4004 NDR_PULL_SET_MEM_CTX(ndr, r->buf, 0);
4005 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->buf));
4006 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buf_0, 0);
4009 return NDR_ERR_SUCCESS;
4012 _PUBLIC_ void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF_PTR *r)
4014 ndr_print_struct(ndr, name, "lsa_DATA_BUF_PTR");
4015 ndr->depth++;
4016 ndr_print_ptr(ndr, "buf", r->buf);
4017 ndr->depth++;
4018 if (r->buf) {
4019 ndr_print_lsa_DATA_BUF(ndr, "buf", r->buf);
4021 ndr->depth--;
4022 ndr->depth--;
4025 static enum ndr_err_code ndr_push_lsa_RightSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_RightSet *r)
4027 uint32_t cntr_names_1;
4028 if (ndr_flags & NDR_SCALARS) {
4029 NDR_CHECK(ndr_push_align(ndr, 4));
4030 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4031 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
4033 if (ndr_flags & NDR_BUFFERS) {
4034 if (r->names) {
4035 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4036 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4037 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
4039 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4040 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
4044 return NDR_ERR_SUCCESS;
4047 static enum ndr_err_code ndr_pull_lsa_RightSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_RightSet *r)
4049 uint32_t _ptr_names;
4050 uint32_t size_names_1 = 0;
4051 uint32_t cntr_names_1;
4052 TALLOC_CTX *_mem_save_names_0;
4053 TALLOC_CTX *_mem_save_names_1;
4054 if (ndr_flags & NDR_SCALARS) {
4055 NDR_CHECK(ndr_pull_align(ndr, 4));
4056 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4057 if (r->count > 256) {
4058 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4060 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
4061 if (_ptr_names) {
4062 NDR_PULL_ALLOC(ndr, r->names);
4063 } else {
4064 r->names = NULL;
4067 if (ndr_flags & NDR_BUFFERS) {
4068 if (r->names) {
4069 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
4070 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
4071 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
4072 size_names_1 = ndr_get_array_size(ndr, &r->names);
4073 NDR_PULL_ALLOC_N(ndr, r->names, size_names_1);
4074 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
4075 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
4076 for (cntr_names_1 = 0; cntr_names_1 < size_names_1; cntr_names_1++) {
4077 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
4079 for (cntr_names_1 = 0; cntr_names_1 < size_names_1; cntr_names_1++) {
4080 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
4082 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
4083 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
4085 if (r->names) {
4086 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
4089 return NDR_ERR_SUCCESS;
4092 _PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, const struct lsa_RightSet *r)
4094 uint32_t cntr_names_1;
4095 ndr_print_struct(ndr, name, "lsa_RightSet");
4096 ndr->depth++;
4097 ndr_print_uint32(ndr, "count", r->count);
4098 ndr_print_ptr(ndr, "names", r->names);
4099 ndr->depth++;
4100 if (r->names) {
4101 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
4102 ndr->depth++;
4103 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
4104 char *idx_1=NULL;
4105 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
4106 ndr_print_lsa_StringLarge(ndr, "names", &r->names[cntr_names_1]);
4107 free(idx_1);
4110 ndr->depth--;
4112 ndr->depth--;
4113 ndr->depth--;
4116 static enum ndr_err_code ndr_push_lsa_DomainListEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainListEx *r)
4118 uint32_t cntr_domains_1;
4119 if (ndr_flags & NDR_SCALARS) {
4120 NDR_CHECK(ndr_push_align(ndr, 4));
4121 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4122 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
4124 if (ndr_flags & NDR_BUFFERS) {
4125 if (r->domains) {
4126 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4127 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
4128 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
4130 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
4131 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
4135 return NDR_ERR_SUCCESS;
4138 static enum ndr_err_code ndr_pull_lsa_DomainListEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainListEx *r)
4140 uint32_t _ptr_domains;
4141 uint32_t size_domains_1 = 0;
4142 uint32_t cntr_domains_1;
4143 TALLOC_CTX *_mem_save_domains_0;
4144 TALLOC_CTX *_mem_save_domains_1;
4145 if (ndr_flags & NDR_SCALARS) {
4146 NDR_CHECK(ndr_pull_align(ndr, 4));
4147 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4148 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
4149 if (_ptr_domains) {
4150 NDR_PULL_ALLOC(ndr, r->domains);
4151 } else {
4152 r->domains = NULL;
4155 if (ndr_flags & NDR_BUFFERS) {
4156 if (r->domains) {
4157 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
4158 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
4159 NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
4160 size_domains_1 = ndr_get_array_size(ndr, &r->domains);
4161 NDR_PULL_ALLOC_N(ndr, r->domains, size_domains_1);
4162 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
4163 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
4164 for (cntr_domains_1 = 0; cntr_domains_1 < size_domains_1; cntr_domains_1++) {
4165 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
4167 for (cntr_domains_1 = 0; cntr_domains_1 < size_domains_1; cntr_domains_1++) {
4168 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
4170 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
4171 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
4173 if (r->domains) {
4174 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
4177 return NDR_ERR_SUCCESS;
4180 _PUBLIC_ void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name, const struct lsa_DomainListEx *r)
4182 uint32_t cntr_domains_1;
4183 ndr_print_struct(ndr, name, "lsa_DomainListEx");
4184 ndr->depth++;
4185 ndr_print_uint32(ndr, "count", r->count);
4186 ndr_print_ptr(ndr, "domains", r->domains);
4187 ndr->depth++;
4188 if (r->domains) {
4189 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
4190 ndr->depth++;
4191 for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
4192 char *idx_1=NULL;
4193 if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
4194 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "domains", &r->domains[cntr_domains_1]);
4195 free(idx_1);
4198 ndr->depth--;
4200 ndr->depth--;
4201 ndr->depth--;
4204 static enum ndr_err_code ndr_push_lsa_DomainInfoKerberos(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoKerberos *r)
4206 if (ndr_flags & NDR_SCALARS) {
4207 NDR_CHECK(ndr_push_align(ndr, 8));
4208 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enforce_restrictions));
4209 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->service_tkt_lifetime));
4210 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->user_tkt_lifetime));
4211 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->user_tkt_renewaltime));
4212 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->clock_skew));
4213 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown6));
4215 if (ndr_flags & NDR_BUFFERS) {
4217 return NDR_ERR_SUCCESS;
4220 static enum ndr_err_code ndr_pull_lsa_DomainInfoKerberos(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoKerberos *r)
4222 if (ndr_flags & NDR_SCALARS) {
4223 NDR_CHECK(ndr_pull_align(ndr, 8));
4224 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enforce_restrictions));
4225 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->service_tkt_lifetime));
4226 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->user_tkt_lifetime));
4227 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->user_tkt_renewaltime));
4228 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->clock_skew));
4229 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown6));
4231 if (ndr_flags & NDR_BUFFERS) {
4233 return NDR_ERR_SUCCESS;
4236 _PUBLIC_ void ndr_print_lsa_DomainInfoKerberos(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoKerberos *r)
4238 ndr_print_struct(ndr, name, "lsa_DomainInfoKerberos");
4239 ndr->depth++;
4240 ndr_print_uint32(ndr, "enforce_restrictions", r->enforce_restrictions);
4241 ndr_print_hyper(ndr, "service_tkt_lifetime", r->service_tkt_lifetime);
4242 ndr_print_hyper(ndr, "user_tkt_lifetime", r->user_tkt_lifetime);
4243 ndr_print_hyper(ndr, "user_tkt_renewaltime", r->user_tkt_renewaltime);
4244 ndr_print_hyper(ndr, "clock_skew", r->clock_skew);
4245 ndr_print_hyper(ndr, "unknown6", r->unknown6);
4246 ndr->depth--;
4249 static enum ndr_err_code ndr_push_lsa_DomainInfoEfs(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoEfs *r)
4251 if (ndr_flags & NDR_SCALARS) {
4252 NDR_CHECK(ndr_push_align(ndr, 4));
4253 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->blob_size));
4254 NDR_CHECK(ndr_push_unique_ptr(ndr, r->efs_blob));
4256 if (ndr_flags & NDR_BUFFERS) {
4257 if (r->efs_blob) {
4258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->blob_size));
4259 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->efs_blob, r->blob_size));
4262 return NDR_ERR_SUCCESS;
4265 static enum ndr_err_code ndr_pull_lsa_DomainInfoEfs(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoEfs *r)
4267 uint32_t _ptr_efs_blob;
4268 uint32_t size_efs_blob_1 = 0;
4269 TALLOC_CTX *_mem_save_efs_blob_0;
4270 if (ndr_flags & NDR_SCALARS) {
4271 NDR_CHECK(ndr_pull_align(ndr, 4));
4272 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blob_size));
4273 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_efs_blob));
4274 if (_ptr_efs_blob) {
4275 NDR_PULL_ALLOC(ndr, r->efs_blob);
4276 } else {
4277 r->efs_blob = NULL;
4280 if (ndr_flags & NDR_BUFFERS) {
4281 if (r->efs_blob) {
4282 _mem_save_efs_blob_0 = NDR_PULL_GET_MEM_CTX(ndr);
4283 NDR_PULL_SET_MEM_CTX(ndr, r->efs_blob, 0);
4284 NDR_CHECK(ndr_pull_array_size(ndr, &r->efs_blob));
4285 size_efs_blob_1 = ndr_get_array_size(ndr, &r->efs_blob);
4286 NDR_PULL_ALLOC_N(ndr, r->efs_blob, size_efs_blob_1);
4287 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->efs_blob, size_efs_blob_1));
4288 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_efs_blob_0, 0);
4290 if (r->efs_blob) {
4291 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->efs_blob, r->blob_size));
4294 return NDR_ERR_SUCCESS;
4297 _PUBLIC_ void ndr_print_lsa_DomainInfoEfs(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoEfs *r)
4299 ndr_print_struct(ndr, name, "lsa_DomainInfoEfs");
4300 ndr->depth++;
4301 ndr_print_uint32(ndr, "blob_size", r->blob_size);
4302 ndr_print_ptr(ndr, "efs_blob", r->efs_blob);
4303 ndr->depth++;
4304 if (r->efs_blob) {
4305 ndr_print_array_uint8(ndr, "efs_blob", r->efs_blob, r->blob_size);
4307 ndr->depth--;
4308 ndr->depth--;
4311 static enum ndr_err_code ndr_push_lsa_DomainInformationPolicy(struct ndr_push *ndr, int ndr_flags, const union lsa_DomainInformationPolicy *r)
4313 if (ndr_flags & NDR_SCALARS) {
4314 int level = ndr_push_get_switch_value(ndr, r);
4315 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
4316 switch (level) {
4317 case LSA_DOMAIN_INFO_POLICY_EFS: {
4318 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info));
4319 break; }
4321 case LSA_DOMAIN_INFO_POLICY_KERBEROS: {
4322 NDR_CHECK(ndr_push_lsa_DomainInfoKerberos(ndr, NDR_SCALARS, &r->kerberos_info));
4323 break; }
4325 default:
4326 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
4329 if (ndr_flags & NDR_BUFFERS) {
4330 int level = ndr_push_get_switch_value(ndr, r);
4331 switch (level) {
4332 case LSA_DOMAIN_INFO_POLICY_EFS:
4333 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr, NDR_BUFFERS, &r->efs_info));
4334 break;
4336 case LSA_DOMAIN_INFO_POLICY_KERBEROS:
4337 break;
4339 default:
4340 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
4343 return NDR_ERR_SUCCESS;
4346 static enum ndr_err_code ndr_pull_lsa_DomainInformationPolicy(struct ndr_pull *ndr, int ndr_flags, union lsa_DomainInformationPolicy *r)
4348 int level;
4349 uint16_t _level;
4350 level = ndr_pull_get_switch_value(ndr, r);
4351 if (ndr_flags & NDR_SCALARS) {
4352 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
4353 if (_level != level) {
4354 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
4356 switch (level) {
4357 case LSA_DOMAIN_INFO_POLICY_EFS: {
4358 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info));
4359 break; }
4361 case LSA_DOMAIN_INFO_POLICY_KERBEROS: {
4362 NDR_CHECK(ndr_pull_lsa_DomainInfoKerberos(ndr, NDR_SCALARS, &r->kerberos_info));
4363 break; }
4365 default:
4366 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
4369 if (ndr_flags & NDR_BUFFERS) {
4370 switch (level) {
4371 case LSA_DOMAIN_INFO_POLICY_EFS:
4372 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr, NDR_BUFFERS, &r->efs_info));
4373 break;
4375 case LSA_DOMAIN_INFO_POLICY_KERBEROS:
4376 break;
4378 default:
4379 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
4382 return NDR_ERR_SUCCESS;
4385 _PUBLIC_ void ndr_print_lsa_DomainInformationPolicy(struct ndr_print *ndr, const char *name, const union lsa_DomainInformationPolicy *r)
4387 int level;
4388 level = ndr_print_get_switch_value(ndr, r);
4389 ndr_print_union(ndr, name, level, "lsa_DomainInformationPolicy");
4390 switch (level) {
4391 case LSA_DOMAIN_INFO_POLICY_EFS:
4392 ndr_print_lsa_DomainInfoEfs(ndr, "efs_info", &r->efs_info);
4393 break;
4395 case LSA_DOMAIN_INFO_POLICY_KERBEROS:
4396 ndr_print_lsa_DomainInfoKerberos(ndr, "kerberos_info", &r->kerberos_info);
4397 break;
4399 default:
4400 ndr_print_bad_level(ndr, name, level);
4404 static enum ndr_err_code ndr_push_lsa_TranslatedName2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName2 *r)
4406 if (ndr_flags & NDR_SCALARS) {
4407 NDR_CHECK(ndr_push_align(ndr, 4));
4408 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
4409 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
4410 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
4411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
4413 if (ndr_flags & NDR_BUFFERS) {
4414 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
4416 return NDR_ERR_SUCCESS;
4419 static enum ndr_err_code ndr_pull_lsa_TranslatedName2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName2 *r)
4421 if (ndr_flags & NDR_SCALARS) {
4422 NDR_CHECK(ndr_pull_align(ndr, 4));
4423 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
4424 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
4425 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
4426 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
4428 if (ndr_flags & NDR_BUFFERS) {
4429 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
4431 return NDR_ERR_SUCCESS;
4434 _PUBLIC_ void ndr_print_lsa_TranslatedName2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName2 *r)
4436 ndr_print_struct(ndr, name, "lsa_TranslatedName2");
4437 ndr->depth++;
4438 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
4439 ndr_print_lsa_String(ndr, "name", &r->name);
4440 ndr_print_uint32(ndr, "sid_index", r->sid_index);
4441 ndr_print_uint32(ndr, "unknown", r->unknown);
4442 ndr->depth--;
4445 static enum ndr_err_code ndr_push_lsa_TransNameArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray2 *r)
4447 uint32_t cntr_names_1;
4448 if (ndr_flags & NDR_SCALARS) {
4449 NDR_CHECK(ndr_push_align(ndr, 4));
4450 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4451 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
4453 if (ndr_flags & NDR_BUFFERS) {
4454 if (r->names) {
4455 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4456 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4457 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
4459 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4460 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
4464 return NDR_ERR_SUCCESS;
4467 static enum ndr_err_code ndr_pull_lsa_TransNameArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray2 *r)
4469 uint32_t _ptr_names;
4470 uint32_t size_names_1 = 0;
4471 uint32_t cntr_names_1;
4472 TALLOC_CTX *_mem_save_names_0;
4473 TALLOC_CTX *_mem_save_names_1;
4474 if (ndr_flags & NDR_SCALARS) {
4475 NDR_CHECK(ndr_pull_align(ndr, 4));
4476 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4477 if (r->count > 1000) {
4478 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4480 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
4481 if (_ptr_names) {
4482 NDR_PULL_ALLOC(ndr, r->names);
4483 } else {
4484 r->names = NULL;
4487 if (ndr_flags & NDR_BUFFERS) {
4488 if (r->names) {
4489 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
4490 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
4491 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
4492 size_names_1 = ndr_get_array_size(ndr, &r->names);
4493 NDR_PULL_ALLOC_N(ndr, r->names, size_names_1);
4494 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
4495 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
4496 for (cntr_names_1 = 0; cntr_names_1 < size_names_1; cntr_names_1++) {
4497 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
4499 for (cntr_names_1 = 0; cntr_names_1 < size_names_1; cntr_names_1++) {
4500 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
4502 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
4503 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
4505 if (r->names) {
4506 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
4509 return NDR_ERR_SUCCESS;
4512 _PUBLIC_ void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray2 *r)
4514 uint32_t cntr_names_1;
4515 ndr_print_struct(ndr, name, "lsa_TransNameArray2");
4516 ndr->depth++;
4517 ndr_print_uint32(ndr, "count", r->count);
4518 ndr_print_ptr(ndr, "names", r->names);
4519 ndr->depth++;
4520 if (r->names) {
4521 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
4522 ndr->depth++;
4523 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
4524 char *idx_1=NULL;
4525 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
4526 ndr_print_lsa_TranslatedName2(ndr, "names", &r->names[cntr_names_1]);
4527 free(idx_1);
4530 ndr->depth--;
4532 ndr->depth--;
4533 ndr->depth--;
4536 static enum ndr_err_code ndr_push_lsa_TranslatedSid2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid2 *r)
4538 if (ndr_flags & NDR_SCALARS) {
4539 NDR_CHECK(ndr_push_align(ndr, 4));
4540 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
4541 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
4542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
4543 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
4545 if (ndr_flags & NDR_BUFFERS) {
4547 return NDR_ERR_SUCCESS;
4550 static enum ndr_err_code ndr_pull_lsa_TranslatedSid2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid2 *r)
4552 if (ndr_flags & NDR_SCALARS) {
4553 NDR_CHECK(ndr_pull_align(ndr, 4));
4554 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
4555 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
4556 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
4557 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
4559 if (ndr_flags & NDR_BUFFERS) {
4561 return NDR_ERR_SUCCESS;
4564 _PUBLIC_ void ndr_print_lsa_TranslatedSid2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid2 *r)
4566 ndr_print_struct(ndr, name, "lsa_TranslatedSid2");
4567 ndr->depth++;
4568 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
4569 ndr_print_uint32(ndr, "rid", r->rid);
4570 ndr_print_uint32(ndr, "sid_index", r->sid_index);
4571 ndr_print_uint32(ndr, "unknown", r->unknown);
4572 ndr->depth--;
4575 static enum ndr_err_code ndr_push_lsa_TransSidArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray2 *r)
4577 uint32_t cntr_sids_1;
4578 if (ndr_flags & NDR_SCALARS) {
4579 NDR_CHECK(ndr_push_align(ndr, 4));
4580 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4581 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
4583 if (ndr_flags & NDR_BUFFERS) {
4584 if (r->sids) {
4585 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4586 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4587 NDR_CHECK(ndr_push_lsa_TranslatedSid2(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4591 return NDR_ERR_SUCCESS;
4594 static enum ndr_err_code ndr_pull_lsa_TransSidArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray2 *r)
4596 uint32_t _ptr_sids;
4597 uint32_t size_sids_1 = 0;
4598 uint32_t cntr_sids_1;
4599 TALLOC_CTX *_mem_save_sids_0;
4600 TALLOC_CTX *_mem_save_sids_1;
4601 if (ndr_flags & NDR_SCALARS) {
4602 NDR_CHECK(ndr_pull_align(ndr, 4));
4603 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4604 if (r->count > 1000) {
4605 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4607 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
4608 if (_ptr_sids) {
4609 NDR_PULL_ALLOC(ndr, r->sids);
4610 } else {
4611 r->sids = NULL;
4614 if (ndr_flags & NDR_BUFFERS) {
4615 if (r->sids) {
4616 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
4617 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4618 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
4619 size_sids_1 = ndr_get_array_size(ndr, &r->sids);
4620 NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
4621 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
4622 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4623 for (cntr_sids_1 = 0; cntr_sids_1 < size_sids_1; cntr_sids_1++) {
4624 NDR_CHECK(ndr_pull_lsa_TranslatedSid2(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4626 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
4627 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
4629 if (r->sids) {
4630 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
4633 return NDR_ERR_SUCCESS;
4636 _PUBLIC_ void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray2 *r)
4638 uint32_t cntr_sids_1;
4639 ndr_print_struct(ndr, name, "lsa_TransSidArray2");
4640 ndr->depth++;
4641 ndr_print_uint32(ndr, "count", r->count);
4642 ndr_print_ptr(ndr, "sids", r->sids);
4643 ndr->depth++;
4644 if (r->sids) {
4645 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
4646 ndr->depth++;
4647 for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
4648 char *idx_1=NULL;
4649 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
4650 ndr_print_lsa_TranslatedSid2(ndr, "sids", &r->sids[cntr_sids_1]);
4651 free(idx_1);
4654 ndr->depth--;
4656 ndr->depth--;
4657 ndr->depth--;
4660 static enum ndr_err_code ndr_push_lsa_TranslatedSid3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid3 *r)
4662 if (ndr_flags & NDR_SCALARS) {
4663 NDR_CHECK(ndr_push_align(ndr, 4));
4664 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
4665 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
4666 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
4667 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
4669 if (ndr_flags & NDR_BUFFERS) {
4670 if (r->sid) {
4671 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
4674 return NDR_ERR_SUCCESS;
4677 static enum ndr_err_code ndr_pull_lsa_TranslatedSid3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid3 *r)
4679 uint32_t _ptr_sid;
4680 TALLOC_CTX *_mem_save_sid_0;
4681 if (ndr_flags & NDR_SCALARS) {
4682 NDR_CHECK(ndr_pull_align(ndr, 4));
4683 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
4684 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
4685 if (_ptr_sid) {
4686 NDR_PULL_ALLOC(ndr, r->sid);
4687 } else {
4688 r->sid = NULL;
4690 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
4691 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
4693 if (ndr_flags & NDR_BUFFERS) {
4694 if (r->sid) {
4695 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
4696 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
4697 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
4698 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
4701 return NDR_ERR_SUCCESS;
4704 _PUBLIC_ void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid3 *r)
4706 ndr_print_struct(ndr, name, "lsa_TranslatedSid3");
4707 ndr->depth++;
4708 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
4709 ndr_print_ptr(ndr, "sid", r->sid);
4710 ndr->depth++;
4711 if (r->sid) {
4712 ndr_print_dom_sid2(ndr, "sid", r->sid);
4714 ndr->depth--;
4715 ndr_print_uint32(ndr, "sid_index", r->sid_index);
4716 ndr_print_uint32(ndr, "flags", r->flags);
4717 ndr->depth--;
4720 static enum ndr_err_code ndr_push_lsa_TransSidArray3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray3 *r)
4722 uint32_t cntr_sids_1;
4723 if (ndr_flags & NDR_SCALARS) {
4724 NDR_CHECK(ndr_push_align(ndr, 4));
4725 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4726 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
4728 if (ndr_flags & NDR_BUFFERS) {
4729 if (r->sids) {
4730 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4731 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4732 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4734 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4735 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
4739 return NDR_ERR_SUCCESS;
4742 static enum ndr_err_code ndr_pull_lsa_TransSidArray3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray3 *r)
4744 uint32_t _ptr_sids;
4745 uint32_t size_sids_1 = 0;
4746 uint32_t cntr_sids_1;
4747 TALLOC_CTX *_mem_save_sids_0;
4748 TALLOC_CTX *_mem_save_sids_1;
4749 if (ndr_flags & NDR_SCALARS) {
4750 NDR_CHECK(ndr_pull_align(ndr, 4));
4751 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4752 if (r->count > 1000) {
4753 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4755 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
4756 if (_ptr_sids) {
4757 NDR_PULL_ALLOC(ndr, r->sids);
4758 } else {
4759 r->sids = NULL;
4762 if (ndr_flags & NDR_BUFFERS) {
4763 if (r->sids) {
4764 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
4765 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4766 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
4767 size_sids_1 = ndr_get_array_size(ndr, &r->sids);
4768 NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
4769 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
4770 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4771 for (cntr_sids_1 = 0; cntr_sids_1 < size_sids_1; cntr_sids_1++) {
4772 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4774 for (cntr_sids_1 = 0; cntr_sids_1 < size_sids_1; cntr_sids_1++) {
4775 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
4777 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
4778 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
4780 if (r->sids) {
4781 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
4784 return NDR_ERR_SUCCESS;
4787 _PUBLIC_ void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray3 *r)
4789 uint32_t cntr_sids_1;
4790 ndr_print_struct(ndr, name, "lsa_TransSidArray3");
4791 ndr->depth++;
4792 ndr_print_uint32(ndr, "count", r->count);
4793 ndr_print_ptr(ndr, "sids", r->sids);
4794 ndr->depth++;
4795 if (r->sids) {
4796 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
4797 ndr->depth++;
4798 for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
4799 char *idx_1=NULL;
4800 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
4801 ndr_print_lsa_TranslatedSid3(ndr, "sids", &r->sids[cntr_sids_1]);
4802 free(idx_1);
4805 ndr->depth--;
4807 ndr->depth--;
4808 ndr->depth--;
4811 static enum ndr_err_code ndr_push_lsa_ForestTrustBinaryData(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustBinaryData *r)
4813 if (ndr_flags & NDR_SCALARS) {
4814 NDR_CHECK(ndr_push_align(ndr, 4));
4815 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
4816 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
4818 if (ndr_flags & NDR_BUFFERS) {
4819 if (r->data) {
4820 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
4821 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
4824 return NDR_ERR_SUCCESS;
4827 static enum ndr_err_code ndr_pull_lsa_ForestTrustBinaryData(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustBinaryData *r)
4829 uint32_t _ptr_data;
4830 uint32_t size_data_1 = 0;
4831 TALLOC_CTX *_mem_save_data_0;
4832 if (ndr_flags & NDR_SCALARS) {
4833 NDR_CHECK(ndr_pull_align(ndr, 4));
4834 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
4835 if (r->length > 131072) {
4836 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4838 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
4839 if (_ptr_data) {
4840 NDR_PULL_ALLOC(ndr, r->data);
4841 } else {
4842 r->data = NULL;
4845 if (ndr_flags & NDR_BUFFERS) {
4846 if (r->data) {
4847 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
4848 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
4849 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
4850 size_data_1 = ndr_get_array_size(ndr, &r->data);
4851 NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
4852 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
4853 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
4855 if (r->data) {
4856 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
4859 return NDR_ERR_SUCCESS;
4862 _PUBLIC_ void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustBinaryData *r)
4864 ndr_print_struct(ndr, name, "lsa_ForestTrustBinaryData");
4865 ndr->depth++;
4866 ndr_print_uint32(ndr, "length", r->length);
4867 ndr_print_ptr(ndr, "data", r->data);
4868 ndr->depth++;
4869 if (r->data) {
4870 ndr_print_array_uint8(ndr, "data", r->data, r->length);
4872 ndr->depth--;
4873 ndr->depth--;
4876 static enum ndr_err_code ndr_push_lsa_ForestTrustDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustDomainInfo *r)
4878 if (ndr_flags & NDR_SCALARS) {
4879 NDR_CHECK(ndr_push_align(ndr, 4));
4880 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid));
4881 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain_name));
4882 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_domain_name));
4884 if (ndr_flags & NDR_BUFFERS) {
4885 if (r->domain_sid) {
4886 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
4888 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain_name));
4889 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_domain_name));
4891 return NDR_ERR_SUCCESS;
4894 static enum ndr_err_code ndr_pull_lsa_ForestTrustDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustDomainInfo *r)
4896 uint32_t _ptr_domain_sid;
4897 TALLOC_CTX *_mem_save_domain_sid_0;
4898 if (ndr_flags & NDR_SCALARS) {
4899 NDR_CHECK(ndr_pull_align(ndr, 4));
4900 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_sid));
4901 if (_ptr_domain_sid) {
4902 NDR_PULL_ALLOC(ndr, r->domain_sid);
4903 } else {
4904 r->domain_sid = NULL;
4906 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain_name));
4907 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_domain_name));
4909 if (ndr_flags & NDR_BUFFERS) {
4910 if (r->domain_sid) {
4911 _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
4912 NDR_PULL_SET_MEM_CTX(ndr, r->domain_sid, 0);
4913 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
4914 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, 0);
4916 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain_name));
4917 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_domain_name));
4919 return NDR_ERR_SUCCESS;
4922 _PUBLIC_ void ndr_print_lsa_ForestTrustDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustDomainInfo *r)
4924 ndr_print_struct(ndr, name, "lsa_ForestTrustDomainInfo");
4925 ndr->depth++;
4926 ndr_print_ptr(ndr, "domain_sid", r->domain_sid);
4927 ndr->depth++;
4928 if (r->domain_sid) {
4929 ndr_print_dom_sid2(ndr, "domain_sid", r->domain_sid);
4931 ndr->depth--;
4932 ndr_print_lsa_StringLarge(ndr, "dns_domain_name", &r->dns_domain_name);
4933 ndr_print_lsa_StringLarge(ndr, "netbios_domain_name", &r->netbios_domain_name);
4934 ndr->depth--;
4937 static enum ndr_err_code ndr_push_lsa_ForestTrustData(struct ndr_push *ndr, int ndr_flags, const union lsa_ForestTrustData *r)
4939 if (ndr_flags & NDR_SCALARS) {
4940 int level = ndr_push_get_switch_value(ndr, r);
4941 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
4942 switch (level) {
4943 case LSA_FOREST_TRUST_TOP_LEVEL_NAME: {
4944 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->top_level_name));
4945 break; }
4947 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: {
4948 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name_ex));
4949 break; }
4951 case LSA_FOREST_TRUST_DOMAIN_INFO: {
4952 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr, NDR_SCALARS, &r->domain_info));
4953 break; }
4955 default: {
4956 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr, NDR_SCALARS, &r->data));
4957 break; }
4961 if (ndr_flags & NDR_BUFFERS) {
4962 int level = ndr_push_get_switch_value(ndr, r);
4963 switch (level) {
4964 case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
4965 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->top_level_name));
4966 break;
4968 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
4969 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->top_level_name_ex));
4970 break;
4972 case LSA_FOREST_TRUST_DOMAIN_INFO:
4973 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr, NDR_BUFFERS, &r->domain_info));
4974 break;
4976 default:
4977 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr, NDR_BUFFERS, &r->data));
4978 break;
4982 return NDR_ERR_SUCCESS;
4985 static enum ndr_err_code ndr_pull_lsa_ForestTrustData(struct ndr_pull *ndr, int ndr_flags, union lsa_ForestTrustData *r)
4987 int level;
4988 uint32_t _level;
4989 level = ndr_pull_get_switch_value(ndr, r);
4990 if (ndr_flags & NDR_SCALARS) {
4991 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
4992 if (_level != level) {
4993 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
4995 switch (level) {
4996 case LSA_FOREST_TRUST_TOP_LEVEL_NAME: {
4997 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->top_level_name));
4998 break; }
5000 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: {
5001 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name_ex));
5002 break; }
5004 case LSA_FOREST_TRUST_DOMAIN_INFO: {
5005 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr, NDR_SCALARS, &r->domain_info));
5006 break; }
5008 default: {
5009 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr, NDR_SCALARS, &r->data));
5010 break; }
5014 if (ndr_flags & NDR_BUFFERS) {
5015 switch (level) {
5016 case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
5017 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->top_level_name));
5018 break;
5020 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
5021 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->top_level_name_ex));
5022 break;
5024 case LSA_FOREST_TRUST_DOMAIN_INFO:
5025 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr, NDR_BUFFERS, &r->domain_info));
5026 break;
5028 default:
5029 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr, NDR_BUFFERS, &r->data));
5030 break;
5034 return NDR_ERR_SUCCESS;
5037 _PUBLIC_ void ndr_print_lsa_ForestTrustData(struct ndr_print *ndr, const char *name, const union lsa_ForestTrustData *r)
5039 int level;
5040 level = ndr_print_get_switch_value(ndr, r);
5041 ndr_print_union(ndr, name, level, "lsa_ForestTrustData");
5042 switch (level) {
5043 case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
5044 ndr_print_lsa_String(ndr, "top_level_name", &r->top_level_name);
5045 break;
5047 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
5048 ndr_print_lsa_StringLarge(ndr, "top_level_name_ex", &r->top_level_name_ex);
5049 break;
5051 case LSA_FOREST_TRUST_DOMAIN_INFO:
5052 ndr_print_lsa_ForestTrustDomainInfo(ndr, "domain_info", &r->domain_info);
5053 break;
5055 default:
5056 ndr_print_lsa_ForestTrustBinaryData(ndr, "data", &r->data);
5057 break;
5062 static enum ndr_err_code ndr_push_lsa_ForestTrustRecordType(struct ndr_push *ndr, int ndr_flags, enum lsa_ForestTrustRecordType r)
5064 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
5065 return NDR_ERR_SUCCESS;
5068 static enum ndr_err_code ndr_pull_lsa_ForestTrustRecordType(struct ndr_pull *ndr, int ndr_flags, enum lsa_ForestTrustRecordType *r)
5070 uint32_t v;
5071 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
5072 *r = v;
5073 return NDR_ERR_SUCCESS;
5076 _PUBLIC_ void ndr_print_lsa_ForestTrustRecordType(struct ndr_print *ndr, const char *name, enum lsa_ForestTrustRecordType r)
5078 const char *val = NULL;
5080 switch (r) {
5081 case LSA_FOREST_TRUST_TOP_LEVEL_NAME: val = "LSA_FOREST_TRUST_TOP_LEVEL_NAME"; break;
5082 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: val = "LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX"; break;
5083 case LSA_FOREST_TRUST_DOMAIN_INFO: val = "LSA_FOREST_TRUST_DOMAIN_INFO"; break;
5084 case LSA_FOREST_TRUST_RECORD_TYPE_LAST: val = "LSA_FOREST_TRUST_RECORD_TYPE_LAST"; break;
5086 ndr_print_enum(ndr, name, "ENUM", val, r);
5089 static enum ndr_err_code ndr_push_lsa_ForestTrustRecord(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustRecord *r)
5091 if (ndr_flags & NDR_SCALARS) {
5092 NDR_CHECK(ndr_push_align(ndr, 8));
5093 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
5094 NDR_CHECK(ndr_push_lsa_ForestTrustRecordType(ndr, NDR_SCALARS, r->level));
5095 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown));
5096 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->forest_trust_data, r->level));
5097 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr, NDR_SCALARS, &r->forest_trust_data));
5099 if (ndr_flags & NDR_BUFFERS) {
5100 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr, NDR_BUFFERS, &r->forest_trust_data));
5102 return NDR_ERR_SUCCESS;
5105 static enum ndr_err_code ndr_pull_lsa_ForestTrustRecord(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustRecord *r)
5107 if (ndr_flags & NDR_SCALARS) {
5108 NDR_CHECK(ndr_pull_align(ndr, 8));
5109 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
5110 NDR_CHECK(ndr_pull_lsa_ForestTrustRecordType(ndr, NDR_SCALARS, &r->level));
5111 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown));
5112 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->forest_trust_data, r->level));
5113 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr, NDR_SCALARS, &r->forest_trust_data));
5115 if (ndr_flags & NDR_BUFFERS) {
5116 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr, NDR_BUFFERS, &r->forest_trust_data));
5118 return NDR_ERR_SUCCESS;
5121 _PUBLIC_ void ndr_print_lsa_ForestTrustRecord(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustRecord *r)
5123 ndr_print_struct(ndr, name, "lsa_ForestTrustRecord");
5124 ndr->depth++;
5125 ndr_print_uint32(ndr, "flags", r->flags);
5126 ndr_print_lsa_ForestTrustRecordType(ndr, "level", r->level);
5127 ndr_print_hyper(ndr, "unknown", r->unknown);
5128 ndr_print_set_switch_value(ndr, &r->forest_trust_data, r->level);
5129 ndr_print_lsa_ForestTrustData(ndr, "forest_trust_data", &r->forest_trust_data);
5130 ndr->depth--;
5133 _PUBLIC_ enum ndr_err_code ndr_push_lsa_ForestTrustInformation(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustInformation *r)
5135 uint32_t cntr_entries_1;
5136 if (ndr_flags & NDR_SCALARS) {
5137 NDR_CHECK(ndr_push_align(ndr, 4));
5138 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5139 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
5141 if (ndr_flags & NDR_BUFFERS) {
5142 if (r->entries) {
5143 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5144 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
5145 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries[cntr_entries_1]));
5147 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
5148 if (r->entries[cntr_entries_1]) {
5149 NDR_CHECK(ndr_push_lsa_ForestTrustRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1]));
5154 return NDR_ERR_SUCCESS;
5157 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_ForestTrustInformation(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustInformation *r)
5159 uint32_t _ptr_entries;
5160 uint32_t size_entries_1 = 0;
5161 uint32_t cntr_entries_1;
5162 TALLOC_CTX *_mem_save_entries_0;
5163 TALLOC_CTX *_mem_save_entries_1;
5164 TALLOC_CTX *_mem_save_entries_2;
5165 if (ndr_flags & NDR_SCALARS) {
5166 NDR_CHECK(ndr_pull_align(ndr, 4));
5167 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5168 if (r->count > 4000) {
5169 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5171 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
5172 if (_ptr_entries) {
5173 NDR_PULL_ALLOC(ndr, r->entries);
5174 } else {
5175 r->entries = NULL;
5178 if (ndr_flags & NDR_BUFFERS) {
5179 if (r->entries) {
5180 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
5181 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
5182 NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
5183 size_entries_1 = ndr_get_array_size(ndr, &r->entries);
5184 NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
5185 _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
5186 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
5187 for (cntr_entries_1 = 0; cntr_entries_1 < size_entries_1; cntr_entries_1++) {
5188 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
5189 if (_ptr_entries) {
5190 NDR_PULL_ALLOC(ndr, r->entries[cntr_entries_1]);
5191 } else {
5192 r->entries[cntr_entries_1] = NULL;
5195 for (cntr_entries_1 = 0; cntr_entries_1 < size_entries_1; cntr_entries_1++) {
5196 if (r->entries[cntr_entries_1]) {
5197 _mem_save_entries_2 = NDR_PULL_GET_MEM_CTX(ndr);
5198 NDR_PULL_SET_MEM_CTX(ndr, r->entries[cntr_entries_1], 0);
5199 NDR_CHECK(ndr_pull_lsa_ForestTrustRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1]));
5200 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_2, 0);
5203 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
5204 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
5206 if (r->entries) {
5207 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
5210 return NDR_ERR_SUCCESS;
5213 _PUBLIC_ void ndr_print_lsa_ForestTrustInformation(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustInformation *r)
5215 uint32_t cntr_entries_1;
5216 ndr_print_struct(ndr, name, "lsa_ForestTrustInformation");
5217 ndr->depth++;
5218 ndr_print_uint32(ndr, "count", r->count);
5219 ndr_print_ptr(ndr, "entries", r->entries);
5220 ndr->depth++;
5221 if (r->entries) {
5222 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
5223 ndr->depth++;
5224 for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
5225 char *idx_1=NULL;
5226 if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
5227 ndr_print_ptr(ndr, "entries", r->entries[cntr_entries_1]);
5228 ndr->depth++;
5229 if (r->entries[cntr_entries_1]) {
5230 ndr_print_lsa_ForestTrustRecord(ndr, "entries", r->entries[cntr_entries_1]);
5232 ndr->depth--;
5233 free(idx_1);
5236 ndr->depth--;
5238 ndr->depth--;
5239 ndr->depth--;
5242 static enum ndr_err_code ndr_push_lsa_Close(struct ndr_push *ndr, int flags, const struct lsa_Close *r)
5244 if (flags & NDR_IN) {
5245 if (r->in.handle == NULL) {
5246 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5248 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5250 if (flags & NDR_OUT) {
5251 if (r->out.handle == NULL) {
5252 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5254 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5255 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5257 return NDR_ERR_SUCCESS;
5260 static enum ndr_err_code ndr_pull_lsa_Close(struct ndr_pull *ndr, int flags, struct lsa_Close *r)
5262 TALLOC_CTX *_mem_save_handle_0;
5263 if (flags & NDR_IN) {
5264 ZERO_STRUCT(r->out);
5266 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5267 NDR_PULL_ALLOC(ndr, r->in.handle);
5269 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5270 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5271 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5272 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5273 NDR_PULL_ALLOC(ndr, r->out.handle);
5274 *r->out.handle = *r->in.handle;
5276 if (flags & NDR_OUT) {
5277 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5278 NDR_PULL_ALLOC(ndr, r->out.handle);
5280 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5281 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5282 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5283 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5284 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5286 return NDR_ERR_SUCCESS;
5289 _PUBLIC_ void ndr_print_lsa_Close(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Close *r)
5291 ndr_print_struct(ndr, name, "lsa_Close");
5292 ndr->depth++;
5293 if (flags & NDR_SET_VALUES) {
5294 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5296 if (flags & NDR_IN) {
5297 ndr_print_struct(ndr, "in", "lsa_Close");
5298 ndr->depth++;
5299 ndr_print_ptr(ndr, "handle", r->in.handle);
5300 ndr->depth++;
5301 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5302 ndr->depth--;
5303 ndr->depth--;
5305 if (flags & NDR_OUT) {
5306 ndr_print_struct(ndr, "out", "lsa_Close");
5307 ndr->depth++;
5308 ndr_print_ptr(ndr, "handle", r->out.handle);
5309 ndr->depth++;
5310 ndr_print_policy_handle(ndr, "handle", r->out.handle);
5311 ndr->depth--;
5312 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5313 ndr->depth--;
5315 ndr->depth--;
5318 _PUBLIC_ enum ndr_err_code ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_Delete *r)
5320 if (flags & NDR_IN) {
5321 if (r->in.handle == NULL) {
5322 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5324 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5326 if (flags & NDR_OUT) {
5327 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5329 return NDR_ERR_SUCCESS;
5332 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, struct lsa_Delete *r)
5334 TALLOC_CTX *_mem_save_handle_0;
5335 if (flags & NDR_IN) {
5336 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5337 NDR_PULL_ALLOC(ndr, r->in.handle);
5339 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5340 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5341 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5342 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5344 if (flags & NDR_OUT) {
5345 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5347 return NDR_ERR_SUCCESS;
5350 _PUBLIC_ void ndr_print_lsa_Delete(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Delete *r)
5352 ndr_print_struct(ndr, name, "lsa_Delete");
5353 ndr->depth++;
5354 if (flags & NDR_SET_VALUES) {
5355 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5357 if (flags & NDR_IN) {
5358 ndr_print_struct(ndr, "in", "lsa_Delete");
5359 ndr->depth++;
5360 ndr_print_ptr(ndr, "handle", r->in.handle);
5361 ndr->depth++;
5362 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5363 ndr->depth--;
5364 ndr->depth--;
5366 if (flags & NDR_OUT) {
5367 ndr_print_struct(ndr, "out", "lsa_Delete");
5368 ndr->depth++;
5369 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5370 ndr->depth--;
5372 ndr->depth--;
5375 _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivs *r)
5377 if (flags & NDR_IN) {
5378 if (r->in.handle == NULL) {
5379 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5381 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5382 if (r->in.resume_handle == NULL) {
5383 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5385 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
5386 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_count));
5388 if (flags & NDR_OUT) {
5389 if (r->out.resume_handle == NULL) {
5390 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5392 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
5393 if (r->out.privs == NULL) {
5394 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5396 NDR_CHECK(ndr_push_lsa_PrivArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs));
5397 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5399 return NDR_ERR_SUCCESS;
5402 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivs *r)
5404 TALLOC_CTX *_mem_save_handle_0;
5405 TALLOC_CTX *_mem_save_resume_handle_0;
5406 TALLOC_CTX *_mem_save_privs_0;
5407 if (flags & NDR_IN) {
5408 ZERO_STRUCT(r->out);
5410 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5411 NDR_PULL_ALLOC(ndr, r->in.handle);
5413 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5414 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5415 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5416 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5417 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5418 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
5420 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5421 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
5422 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
5423 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
5424 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_count));
5425 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
5426 *r->out.resume_handle = *r->in.resume_handle;
5427 NDR_PULL_ALLOC(ndr, r->out.privs);
5428 ZERO_STRUCTP(r->out.privs);
5430 if (flags & NDR_OUT) {
5431 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5432 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
5434 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5435 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
5436 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
5437 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
5438 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5439 NDR_PULL_ALLOC(ndr, r->out.privs);
5441 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
5442 NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, LIBNDR_FLAG_REF_ALLOC);
5443 NDR_CHECK(ndr_pull_lsa_PrivArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs));
5444 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
5445 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5447 return NDR_ERR_SUCCESS;
5450 _PUBLIC_ void ndr_print_lsa_EnumPrivs(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivs *r)
5452 ndr_print_struct(ndr, name, "lsa_EnumPrivs");
5453 ndr->depth++;
5454 if (flags & NDR_SET_VALUES) {
5455 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5457 if (flags & NDR_IN) {
5458 ndr_print_struct(ndr, "in", "lsa_EnumPrivs");
5459 ndr->depth++;
5460 ndr_print_ptr(ndr, "handle", r->in.handle);
5461 ndr->depth++;
5462 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5463 ndr->depth--;
5464 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
5465 ndr->depth++;
5466 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
5467 ndr->depth--;
5468 ndr_print_uint32(ndr, "max_count", r->in.max_count);
5469 ndr->depth--;
5471 if (flags & NDR_OUT) {
5472 ndr_print_struct(ndr, "out", "lsa_EnumPrivs");
5473 ndr->depth++;
5474 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
5475 ndr->depth++;
5476 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
5477 ndr->depth--;
5478 ndr_print_ptr(ndr, "privs", r->out.privs);
5479 ndr->depth++;
5480 ndr_print_lsa_PrivArray(ndr, "privs", r->out.privs);
5481 ndr->depth--;
5482 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5483 ndr->depth--;
5485 ndr->depth--;
5488 static enum ndr_err_code ndr_push_lsa_QuerySecurity(struct ndr_push *ndr, int flags, const struct lsa_QuerySecurity *r)
5490 if (flags & NDR_IN) {
5491 if (r->in.handle == NULL) {
5492 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5494 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5495 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
5497 if (flags & NDR_OUT) {
5498 if (r->out.sdbuf == NULL) {
5499 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5501 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sdbuf));
5502 if (*r->out.sdbuf) {
5503 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
5505 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5507 return NDR_ERR_SUCCESS;
5510 static enum ndr_err_code ndr_pull_lsa_QuerySecurity(struct ndr_pull *ndr, int flags, struct lsa_QuerySecurity *r)
5512 uint32_t _ptr_sdbuf;
5513 TALLOC_CTX *_mem_save_handle_0;
5514 TALLOC_CTX *_mem_save_sdbuf_0;
5515 TALLOC_CTX *_mem_save_sdbuf_1;
5516 if (flags & NDR_IN) {
5517 ZERO_STRUCT(r->out);
5519 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5520 NDR_PULL_ALLOC(ndr, r->in.handle);
5522 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5523 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5524 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5525 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5526 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
5527 NDR_PULL_ALLOC(ndr, r->out.sdbuf);
5528 ZERO_STRUCTP(r->out.sdbuf);
5530 if (flags & NDR_OUT) {
5531 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5532 NDR_PULL_ALLOC(ndr, r->out.sdbuf);
5534 _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
5535 NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC);
5536 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sdbuf));
5537 if (_ptr_sdbuf) {
5538 NDR_PULL_ALLOC(ndr, *r->out.sdbuf);
5539 } else {
5540 *r->out.sdbuf = NULL;
5542 if (*r->out.sdbuf) {
5543 _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr);
5544 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, 0);
5545 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
5546 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, 0);
5548 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
5549 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5551 return NDR_ERR_SUCCESS;
5554 _PUBLIC_ void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecurity *r)
5556 ndr_print_struct(ndr, name, "lsa_QuerySecurity");
5557 ndr->depth++;
5558 if (flags & NDR_SET_VALUES) {
5559 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5561 if (flags & NDR_IN) {
5562 ndr_print_struct(ndr, "in", "lsa_QuerySecurity");
5563 ndr->depth++;
5564 ndr_print_ptr(ndr, "handle", r->in.handle);
5565 ndr->depth++;
5566 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5567 ndr->depth--;
5568 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
5569 ndr->depth--;
5571 if (flags & NDR_OUT) {
5572 ndr_print_struct(ndr, "out", "lsa_QuerySecurity");
5573 ndr->depth++;
5574 ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf);
5575 ndr->depth++;
5576 ndr_print_ptr(ndr, "sdbuf", *r->out.sdbuf);
5577 ndr->depth++;
5578 if (*r->out.sdbuf) {
5579 ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf);
5581 ndr->depth--;
5582 ndr->depth--;
5583 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5584 ndr->depth--;
5586 ndr->depth--;
5589 static enum ndr_err_code ndr_push_lsa_SetSecObj(struct ndr_push *ndr, int flags, const struct lsa_SetSecObj *r)
5591 if (flags & NDR_IN) {
5592 if (r->in.handle == NULL) {
5593 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5595 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5596 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
5597 if (r->in.sdbuf == NULL) {
5598 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5600 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
5602 if (flags & NDR_OUT) {
5603 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5605 return NDR_ERR_SUCCESS;
5608 static enum ndr_err_code ndr_pull_lsa_SetSecObj(struct ndr_pull *ndr, int flags, struct lsa_SetSecObj *r)
5610 TALLOC_CTX *_mem_save_handle_0;
5611 TALLOC_CTX *_mem_save_sdbuf_0;
5612 if (flags & NDR_IN) {
5613 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5614 NDR_PULL_ALLOC(ndr, r->in.handle);
5616 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5617 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5618 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5619 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5620 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
5621 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5622 NDR_PULL_ALLOC(ndr, r->in.sdbuf);
5624 _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
5625 NDR_PULL_SET_MEM_CTX(ndr, r->in.sdbuf, LIBNDR_FLAG_REF_ALLOC);
5626 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
5627 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
5629 if (flags & NDR_OUT) {
5630 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5632 return NDR_ERR_SUCCESS;
5635 _PUBLIC_ void ndr_print_lsa_SetSecObj(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecObj *r)
5637 ndr_print_struct(ndr, name, "lsa_SetSecObj");
5638 ndr->depth++;
5639 if (flags & NDR_SET_VALUES) {
5640 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5642 if (flags & NDR_IN) {
5643 ndr_print_struct(ndr, "in", "lsa_SetSecObj");
5644 ndr->depth++;
5645 ndr_print_ptr(ndr, "handle", r->in.handle);
5646 ndr->depth++;
5647 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5648 ndr->depth--;
5649 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
5650 ndr_print_ptr(ndr, "sdbuf", r->in.sdbuf);
5651 ndr->depth++;
5652 ndr_print_sec_desc_buf(ndr, "sdbuf", r->in.sdbuf);
5653 ndr->depth--;
5654 ndr->depth--;
5656 if (flags & NDR_OUT) {
5657 ndr_print_struct(ndr, "out", "lsa_SetSecObj");
5658 ndr->depth++;
5659 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5660 ndr->depth--;
5662 ndr->depth--;
5665 static enum ndr_err_code ndr_push_lsa_ChangePassword(struct ndr_push *ndr, int flags, const struct lsa_ChangePassword *r)
5667 if (flags & NDR_IN) {
5669 if (flags & NDR_OUT) {
5670 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5672 return NDR_ERR_SUCCESS;
5675 static enum ndr_err_code ndr_pull_lsa_ChangePassword(struct ndr_pull *ndr, int flags, struct lsa_ChangePassword *r)
5677 if (flags & NDR_IN) {
5679 if (flags & NDR_OUT) {
5680 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5682 return NDR_ERR_SUCCESS;
5685 _PUBLIC_ void ndr_print_lsa_ChangePassword(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ChangePassword *r)
5687 ndr_print_struct(ndr, name, "lsa_ChangePassword");
5688 ndr->depth++;
5689 if (flags & NDR_SET_VALUES) {
5690 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5692 if (flags & NDR_IN) {
5693 ndr_print_struct(ndr, "in", "lsa_ChangePassword");
5694 ndr->depth++;
5695 ndr->depth--;
5697 if (flags & NDR_OUT) {
5698 ndr_print_struct(ndr, "out", "lsa_ChangePassword");
5699 ndr->depth++;
5700 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5701 ndr->depth--;
5703 ndr->depth--;
5706 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy *r)
5708 if (flags & NDR_IN) {
5709 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
5710 if (r->in.system_name) {
5711 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
5713 if (r->in.attr == NULL) {
5714 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5716 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
5717 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
5719 if (flags & NDR_OUT) {
5720 if (r->out.handle == NULL) {
5721 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5723 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5724 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5726 return NDR_ERR_SUCCESS;
5729 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy *r)
5731 uint32_t _ptr_system_name;
5732 TALLOC_CTX *_mem_save_system_name_0;
5733 TALLOC_CTX *_mem_save_attr_0;
5734 TALLOC_CTX *_mem_save_handle_0;
5735 if (flags & NDR_IN) {
5736 ZERO_STRUCT(r->out);
5738 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
5739 if (_ptr_system_name) {
5740 NDR_PULL_ALLOC(ndr, r->in.system_name);
5741 } else {
5742 r->in.system_name = NULL;
5744 if (r->in.system_name) {
5745 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5746 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
5747 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
5748 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
5750 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5751 NDR_PULL_ALLOC(ndr, r->in.attr);
5753 _mem_save_attr_0 = NDR_PULL_GET_MEM_CTX(ndr);
5754 NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC);
5755 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
5756 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC);
5757 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
5758 NDR_PULL_ALLOC(ndr, r->out.handle);
5759 ZERO_STRUCTP(r->out.handle);
5761 if (flags & NDR_OUT) {
5762 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5763 NDR_PULL_ALLOC(ndr, r->out.handle);
5765 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5766 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5767 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5768 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5769 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5771 return NDR_ERR_SUCCESS;
5774 _PUBLIC_ void ndr_print_lsa_OpenPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy *r)
5776 ndr_print_struct(ndr, name, "lsa_OpenPolicy");
5777 ndr->depth++;
5778 if (flags & NDR_SET_VALUES) {
5779 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5781 if (flags & NDR_IN) {
5782 ndr_print_struct(ndr, "in", "lsa_OpenPolicy");
5783 ndr->depth++;
5784 ndr_print_ptr(ndr, "system_name", r->in.system_name);
5785 ndr->depth++;
5786 if (r->in.system_name) {
5787 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
5789 ndr->depth--;
5790 ndr_print_ptr(ndr, "attr", r->in.attr);
5791 ndr->depth++;
5792 ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr);
5793 ndr->depth--;
5794 ndr_print_lsa_PolicyAccessMask(ndr, "access_mask", r->in.access_mask);
5795 ndr->depth--;
5797 if (flags & NDR_OUT) {
5798 ndr_print_struct(ndr, "out", "lsa_OpenPolicy");
5799 ndr->depth++;
5800 ndr_print_ptr(ndr, "handle", r->out.handle);
5801 ndr->depth++;
5802 ndr_print_policy_handle(ndr, "handle", r->out.handle);
5803 ndr->depth--;
5804 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5805 ndr->depth--;
5807 ndr->depth--;
5810 static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy *r)
5812 if (flags & NDR_IN) {
5813 if (r->in.handle == NULL) {
5814 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5816 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5817 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
5819 if (flags & NDR_OUT) {
5820 if (r->out.info == NULL) {
5821 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5823 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
5824 if (*r->out.info) {
5825 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
5826 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
5828 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5830 return NDR_ERR_SUCCESS;
5833 static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy *r)
5835 uint32_t _ptr_info;
5836 TALLOC_CTX *_mem_save_handle_0;
5837 TALLOC_CTX *_mem_save_info_0;
5838 TALLOC_CTX *_mem_save_info_1;
5839 if (flags & NDR_IN) {
5840 ZERO_STRUCT(r->out);
5842 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5843 NDR_PULL_ALLOC(ndr, r->in.handle);
5845 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5846 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5847 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5848 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5849 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
5850 NDR_PULL_ALLOC(ndr, r->out.info);
5851 ZERO_STRUCTP(r->out.info);
5853 if (flags & NDR_OUT) {
5854 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5855 NDR_PULL_ALLOC(ndr, r->out.info);
5857 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5858 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
5859 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5860 if (_ptr_info) {
5861 NDR_PULL_ALLOC(ndr, *r->out.info);
5862 } else {
5863 *r->out.info = NULL;
5865 if (*r->out.info) {
5866 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
5867 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
5868 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
5869 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
5870 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
5872 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
5873 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5875 return NDR_ERR_SUCCESS;
5878 _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy *r)
5880 ndr_print_struct(ndr, name, "lsa_QueryInfoPolicy");
5881 ndr->depth++;
5882 if (flags & NDR_SET_VALUES) {
5883 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5885 if (flags & NDR_IN) {
5886 ndr_print_struct(ndr, "in", "lsa_QueryInfoPolicy");
5887 ndr->depth++;
5888 ndr_print_ptr(ndr, "handle", r->in.handle);
5889 ndr->depth++;
5890 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5891 ndr->depth--;
5892 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
5893 ndr->depth--;
5895 if (flags & NDR_OUT) {
5896 ndr_print_struct(ndr, "out", "lsa_QueryInfoPolicy");
5897 ndr->depth++;
5898 ndr_print_ptr(ndr, "info", r->out.info);
5899 ndr->depth++;
5900 ndr_print_ptr(ndr, "info", *r->out.info);
5901 ndr->depth++;
5902 if (*r->out.info) {
5903 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
5904 ndr_print_lsa_PolicyInformation(ndr, "info", *r->out.info);
5906 ndr->depth--;
5907 ndr->depth--;
5908 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5909 ndr->depth--;
5911 ndr->depth--;
5914 static enum ndr_err_code ndr_push_lsa_SetInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy *r)
5916 if (flags & NDR_IN) {
5917 if (r->in.handle == NULL) {
5918 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5920 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5921 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
5922 if (r->in.info == NULL) {
5923 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5925 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
5926 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5928 if (flags & NDR_OUT) {
5929 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5931 return NDR_ERR_SUCCESS;
5934 static enum ndr_err_code ndr_pull_lsa_SetInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy *r)
5936 TALLOC_CTX *_mem_save_handle_0;
5937 TALLOC_CTX *_mem_save_info_0;
5938 if (flags & NDR_IN) {
5939 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5940 NDR_PULL_ALLOC(ndr, r->in.handle);
5942 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5943 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5944 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5945 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5946 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
5947 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5948 NDR_PULL_ALLOC(ndr, r->in.info);
5950 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5951 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
5952 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
5953 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5954 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
5956 if (flags & NDR_OUT) {
5957 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5959 return NDR_ERR_SUCCESS;
5962 _PUBLIC_ void ndr_print_lsa_SetInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy *r)
5964 ndr_print_struct(ndr, name, "lsa_SetInfoPolicy");
5965 ndr->depth++;
5966 if (flags & NDR_SET_VALUES) {
5967 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5969 if (flags & NDR_IN) {
5970 ndr_print_struct(ndr, "in", "lsa_SetInfoPolicy");
5971 ndr->depth++;
5972 ndr_print_ptr(ndr, "handle", r->in.handle);
5973 ndr->depth++;
5974 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5975 ndr->depth--;
5976 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
5977 ndr_print_ptr(ndr, "info", r->in.info);
5978 ndr->depth++;
5979 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
5980 ndr_print_lsa_PolicyInformation(ndr, "info", r->in.info);
5981 ndr->depth--;
5982 ndr->depth--;
5984 if (flags & NDR_OUT) {
5985 ndr_print_struct(ndr, "out", "lsa_SetInfoPolicy");
5986 ndr->depth++;
5987 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5988 ndr->depth--;
5990 ndr->depth--;
5993 static enum ndr_err_code ndr_push_lsa_ClearAuditLog(struct ndr_push *ndr, int flags, const struct lsa_ClearAuditLog *r)
5995 if (flags & NDR_IN) {
5997 if (flags & NDR_OUT) {
5998 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6000 return NDR_ERR_SUCCESS;
6003 static enum ndr_err_code ndr_pull_lsa_ClearAuditLog(struct ndr_pull *ndr, int flags, struct lsa_ClearAuditLog *r)
6005 if (flags & NDR_IN) {
6007 if (flags & NDR_OUT) {
6008 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6010 return NDR_ERR_SUCCESS;
6013 _PUBLIC_ void ndr_print_lsa_ClearAuditLog(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ClearAuditLog *r)
6015 ndr_print_struct(ndr, name, "lsa_ClearAuditLog");
6016 ndr->depth++;
6017 if (flags & NDR_SET_VALUES) {
6018 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6020 if (flags & NDR_IN) {
6021 ndr_print_struct(ndr, "in", "lsa_ClearAuditLog");
6022 ndr->depth++;
6023 ndr->depth--;
6025 if (flags & NDR_OUT) {
6026 ndr_print_struct(ndr, "out", "lsa_ClearAuditLog");
6027 ndr->depth++;
6028 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6029 ndr->depth--;
6031 ndr->depth--;
6034 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struct lsa_CreateAccount *r)
6036 if (flags & NDR_IN) {
6037 if (r->in.handle == NULL) {
6038 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6040 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6041 if (r->in.sid == NULL) {
6042 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6044 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6045 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
6047 if (flags & NDR_OUT) {
6048 if (r->out.acct_handle == NULL) {
6049 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6051 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
6052 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6054 return NDR_ERR_SUCCESS;
6057 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r)
6059 TALLOC_CTX *_mem_save_handle_0;
6060 TALLOC_CTX *_mem_save_sid_0;
6061 TALLOC_CTX *_mem_save_acct_handle_0;
6062 if (flags & NDR_IN) {
6063 ZERO_STRUCT(r->out);
6065 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6066 NDR_PULL_ALLOC(ndr, r->in.handle);
6068 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6069 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6070 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6071 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6072 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6073 NDR_PULL_ALLOC(ndr, r->in.sid);
6075 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6076 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
6077 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6078 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
6079 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
6080 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
6081 ZERO_STRUCTP(r->out.acct_handle);
6083 if (flags & NDR_OUT) {
6084 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6085 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
6087 _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6088 NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC);
6089 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
6090 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC);
6091 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6093 return NDR_ERR_SUCCESS;
6096 _PUBLIC_ void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateAccount *r)
6098 ndr_print_struct(ndr, name, "lsa_CreateAccount");
6099 ndr->depth++;
6100 if (flags & NDR_SET_VALUES) {
6101 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6103 if (flags & NDR_IN) {
6104 ndr_print_struct(ndr, "in", "lsa_CreateAccount");
6105 ndr->depth++;
6106 ndr_print_ptr(ndr, "handle", r->in.handle);
6107 ndr->depth++;
6108 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6109 ndr->depth--;
6110 ndr_print_ptr(ndr, "sid", r->in.sid);
6111 ndr->depth++;
6112 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
6113 ndr->depth--;
6114 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
6115 ndr->depth--;
6117 if (flags & NDR_OUT) {
6118 ndr_print_struct(ndr, "out", "lsa_CreateAccount");
6119 ndr->depth++;
6120 ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle);
6121 ndr->depth++;
6122 ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle);
6123 ndr->depth--;
6124 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6125 ndr->depth--;
6127 ndr->depth--;
6130 _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct lsa_EnumAccounts *r)
6132 if (flags & NDR_IN) {
6133 if (r->in.handle == NULL) {
6134 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6136 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6137 if (r->in.resume_handle == NULL) {
6138 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6140 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6141 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_entries));
6143 if (flags & NDR_OUT) {
6144 if (r->out.resume_handle == NULL) {
6145 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6147 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6148 if (r->out.sids == NULL) {
6149 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6151 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6152 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6154 return NDR_ERR_SUCCESS;
6157 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int flags, struct lsa_EnumAccounts *r)
6159 TALLOC_CTX *_mem_save_handle_0;
6160 TALLOC_CTX *_mem_save_resume_handle_0;
6161 TALLOC_CTX *_mem_save_sids_0;
6162 if (flags & NDR_IN) {
6163 ZERO_STRUCT(r->out);
6165 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6166 NDR_PULL_ALLOC(ndr, r->in.handle);
6168 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6169 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6170 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6171 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6172 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6173 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6175 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6176 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6177 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6178 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6179 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_entries));
6180 if (r->in.num_entries > 8192) {
6181 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6183 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6184 *r->out.resume_handle = *r->in.resume_handle;
6185 NDR_PULL_ALLOC(ndr, r->out.sids);
6186 ZERO_STRUCTP(r->out.sids);
6188 if (flags & NDR_OUT) {
6189 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6190 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6192 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6193 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6194 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6195 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6196 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6197 NDR_PULL_ALLOC(ndr, r->out.sids);
6199 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6200 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
6201 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6202 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6203 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6205 return NDR_ERR_SUCCESS;
6208 _PUBLIC_ void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccounts *r)
6210 ndr_print_struct(ndr, name, "lsa_EnumAccounts");
6211 ndr->depth++;
6212 if (flags & NDR_SET_VALUES) {
6213 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6215 if (flags & NDR_IN) {
6216 ndr_print_struct(ndr, "in", "lsa_EnumAccounts");
6217 ndr->depth++;
6218 ndr_print_ptr(ndr, "handle", r->in.handle);
6219 ndr->depth++;
6220 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6221 ndr->depth--;
6222 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6223 ndr->depth++;
6224 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6225 ndr->depth--;
6226 ndr_print_uint32(ndr, "num_entries", r->in.num_entries);
6227 ndr->depth--;
6229 if (flags & NDR_OUT) {
6230 ndr_print_struct(ndr, "out", "lsa_EnumAccounts");
6231 ndr->depth++;
6232 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6233 ndr->depth++;
6234 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6235 ndr->depth--;
6236 ndr_print_ptr(ndr, "sids", r->out.sids);
6237 ndr->depth++;
6238 ndr_print_lsa_SidArray(ndr, "sids", r->out.sids);
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_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *r)
6248 if (flags & NDR_IN) {
6249 if (r->in.policy_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.policy_handle));
6253 if (r->in.info == NULL) {
6254 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6256 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6257 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
6259 if (flags & NDR_OUT) {
6260 if (r->out.trustdom_handle == NULL) {
6261 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6263 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
6264 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6266 return NDR_ERR_SUCCESS;
6269 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r)
6271 TALLOC_CTX *_mem_save_policy_handle_0;
6272 TALLOC_CTX *_mem_save_info_0;
6273 TALLOC_CTX *_mem_save_trustdom_handle_0;
6274 if (flags & NDR_IN) {
6275 ZERO_STRUCT(r->out);
6277 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6278 NDR_PULL_ALLOC(ndr, r->in.policy_handle);
6280 _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6281 NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
6282 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
6283 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
6284 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6285 NDR_PULL_ALLOC(ndr, r->in.info);
6287 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6288 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
6289 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6290 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6291 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
6292 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
6293 ZERO_STRUCTP(r->out.trustdom_handle);
6295 if (flags & NDR_OUT) {
6296 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6297 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
6299 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6300 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
6301 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
6302 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
6303 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6305 return NDR_ERR_SUCCESS;
6308 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomain *r)
6310 ndr_print_struct(ndr, name, "lsa_CreateTrustedDomain");
6311 ndr->depth++;
6312 if (flags & NDR_SET_VALUES) {
6313 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6315 if (flags & NDR_IN) {
6316 ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomain");
6317 ndr->depth++;
6318 ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
6319 ndr->depth++;
6320 ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
6321 ndr->depth--;
6322 ndr_print_ptr(ndr, "info", r->in.info);
6323 ndr->depth++;
6324 ndr_print_lsa_DomainInfo(ndr, "info", r->in.info);
6325 ndr->depth--;
6326 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
6327 ndr->depth--;
6329 if (flags & NDR_OUT) {
6330 ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomain");
6331 ndr->depth++;
6332 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
6333 ndr->depth++;
6334 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
6335 ndr->depth--;
6336 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6337 ndr->depth--;
6339 ndr->depth--;
6342 static enum ndr_err_code ndr_push_lsa_EnumTrustDom(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustDom *r)
6344 if (flags & NDR_IN) {
6345 if (r->in.handle == NULL) {
6346 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6348 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6349 if (r->in.resume_handle == NULL) {
6350 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6352 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6353 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
6355 if (flags & NDR_OUT) {
6356 if (r->out.resume_handle == NULL) {
6357 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6359 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6360 if (r->out.domains == NULL) {
6361 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6363 NDR_CHECK(ndr_push_lsa_DomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
6364 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6366 return NDR_ERR_SUCCESS;
6369 static enum ndr_err_code ndr_pull_lsa_EnumTrustDom(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustDom *r)
6371 TALLOC_CTX *_mem_save_handle_0;
6372 TALLOC_CTX *_mem_save_resume_handle_0;
6373 TALLOC_CTX *_mem_save_domains_0;
6374 if (flags & NDR_IN) {
6375 ZERO_STRUCT(r->out);
6377 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6378 NDR_PULL_ALLOC(ndr, r->in.handle);
6380 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6381 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6382 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6383 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6384 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6385 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6387 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6388 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6389 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6390 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6391 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
6392 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6393 *r->out.resume_handle = *r->in.resume_handle;
6394 NDR_PULL_ALLOC(ndr, r->out.domains);
6395 ZERO_STRUCTP(r->out.domains);
6397 if (flags & NDR_OUT) {
6398 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6399 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6401 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6402 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6403 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6404 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6405 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6406 NDR_PULL_ALLOC(ndr, r->out.domains);
6408 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
6409 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
6410 NDR_CHECK(ndr_pull_lsa_DomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
6411 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
6412 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6414 return NDR_ERR_SUCCESS;
6417 _PUBLIC_ void ndr_print_lsa_EnumTrustDom(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustDom *r)
6419 ndr_print_struct(ndr, name, "lsa_EnumTrustDom");
6420 ndr->depth++;
6421 if (flags & NDR_SET_VALUES) {
6422 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6424 if (flags & NDR_IN) {
6425 ndr_print_struct(ndr, "in", "lsa_EnumTrustDom");
6426 ndr->depth++;
6427 ndr_print_ptr(ndr, "handle", r->in.handle);
6428 ndr->depth++;
6429 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6430 ndr->depth--;
6431 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6432 ndr->depth++;
6433 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6434 ndr->depth--;
6435 ndr_print_uint32(ndr, "max_size", r->in.max_size);
6436 ndr->depth--;
6438 if (flags & NDR_OUT) {
6439 ndr_print_struct(ndr, "out", "lsa_EnumTrustDom");
6440 ndr->depth++;
6441 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6442 ndr->depth++;
6443 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6444 ndr->depth--;
6445 ndr_print_ptr(ndr, "domains", r->out.domains);
6446 ndr->depth++;
6447 ndr_print_lsa_DomainList(ndr, "domains", r->out.domains);
6448 ndr->depth--;
6449 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6450 ndr->depth--;
6452 ndr->depth--;
6455 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct lsa_LookupNames *r)
6457 uint32_t cntr_names_0;
6458 if (flags & NDR_IN) {
6459 if (r->in.handle == NULL) {
6460 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6462 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6463 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
6464 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
6465 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
6466 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
6468 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
6469 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
6471 if (r->in.sids == NULL) {
6472 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6474 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6475 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
6476 if (r->in.count == NULL) {
6477 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6479 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
6481 if (flags & NDR_OUT) {
6482 if (r->out.domains == NULL) {
6483 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6485 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
6486 if (*r->out.domains) {
6487 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6489 if (r->out.sids == NULL) {
6490 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6492 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6493 if (r->out.count == NULL) {
6494 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6496 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
6497 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6499 return NDR_ERR_SUCCESS;
6502 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flags, struct lsa_LookupNames *r)
6504 uint32_t size_names_0 = 0;
6505 uint32_t cntr_names_0;
6506 uint32_t _ptr_domains;
6507 TALLOC_CTX *_mem_save_handle_0;
6508 TALLOC_CTX *_mem_save_names_0;
6509 TALLOC_CTX *_mem_save_domains_0;
6510 TALLOC_CTX *_mem_save_domains_1;
6511 TALLOC_CTX *_mem_save_sids_0;
6512 TALLOC_CTX *_mem_save_count_0;
6513 if (flags & NDR_IN) {
6514 ZERO_STRUCT(r->out);
6516 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6517 NDR_PULL_ALLOC(ndr, r->in.handle);
6519 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6520 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6521 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6522 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6523 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
6524 if (r->in.num_names > 1000) {
6525 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6527 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
6528 size_names_0 = ndr_get_array_size(ndr, &r->in.names);
6529 NDR_PULL_ALLOC_N(ndr, r->in.names, size_names_0);
6530 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
6531 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
6532 for (cntr_names_0 = 0; cntr_names_0 < size_names_0; cntr_names_0++) {
6533 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
6535 for (cntr_names_0 = 0; cntr_names_0 < size_names_0; cntr_names_0++) {
6536 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
6538 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
6539 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6540 NDR_PULL_ALLOC(ndr, r->in.sids);
6542 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6543 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
6544 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6545 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6546 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
6547 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6548 NDR_PULL_ALLOC(ndr, r->in.count);
6550 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6551 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
6552 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
6553 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6554 NDR_PULL_ALLOC(ndr, r->out.domains);
6555 ZERO_STRUCTP(r->out.domains);
6556 NDR_PULL_ALLOC(ndr, r->out.sids);
6557 *r->out.sids = *r->in.sids;
6558 NDR_PULL_ALLOC(ndr, r->out.count);
6559 *r->out.count = *r->in.count;
6560 if (r->in.names) {
6561 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
6564 if (flags & NDR_OUT) {
6565 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6566 NDR_PULL_ALLOC(ndr, r->out.domains);
6568 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
6569 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
6570 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
6571 if (_ptr_domains) {
6572 NDR_PULL_ALLOC(ndr, *r->out.domains);
6573 } else {
6574 *r->out.domains = NULL;
6576 if (*r->out.domains) {
6577 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
6578 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
6579 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6580 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
6582 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
6583 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6584 NDR_PULL_ALLOC(ndr, r->out.sids);
6586 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6587 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
6588 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6589 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6590 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6591 NDR_PULL_ALLOC(ndr, r->out.count);
6593 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6594 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
6595 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
6596 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6597 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6599 return NDR_ERR_SUCCESS;
6602 _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames *r)
6604 uint32_t cntr_names_0;
6605 ndr_print_struct(ndr, name, "lsa_LookupNames");
6606 ndr->depth++;
6607 if (flags & NDR_SET_VALUES) {
6608 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6610 if (flags & NDR_IN) {
6611 ndr_print_struct(ndr, "in", "lsa_LookupNames");
6612 ndr->depth++;
6613 ndr_print_ptr(ndr, "handle", r->in.handle);
6614 ndr->depth++;
6615 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6616 ndr->depth--;
6617 ndr_print_uint32(ndr, "num_names", r->in.num_names);
6618 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
6619 ndr->depth++;
6620 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
6621 char *idx_0=NULL;
6622 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
6623 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
6624 free(idx_0);
6627 ndr->depth--;
6628 ndr_print_ptr(ndr, "sids", r->in.sids);
6629 ndr->depth++;
6630 ndr_print_lsa_TransSidArray(ndr, "sids", r->in.sids);
6631 ndr->depth--;
6632 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
6633 ndr_print_ptr(ndr, "count", r->in.count);
6634 ndr->depth++;
6635 ndr_print_uint32(ndr, "count", *r->in.count);
6636 ndr->depth--;
6637 ndr->depth--;
6639 if (flags & NDR_OUT) {
6640 ndr_print_struct(ndr, "out", "lsa_LookupNames");
6641 ndr->depth++;
6642 ndr_print_ptr(ndr, "domains", r->out.domains);
6643 ndr->depth++;
6644 ndr_print_ptr(ndr, "domains", *r->out.domains);
6645 ndr->depth++;
6646 if (*r->out.domains) {
6647 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
6649 ndr->depth--;
6650 ndr->depth--;
6651 ndr_print_ptr(ndr, "sids", r->out.sids);
6652 ndr->depth++;
6653 ndr_print_lsa_TransSidArray(ndr, "sids", r->out.sids);
6654 ndr->depth--;
6655 ndr_print_ptr(ndr, "count", r->out.count);
6656 ndr->depth++;
6657 ndr_print_uint32(ndr, "count", *r->out.count);
6658 ndr->depth--;
6659 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6660 ndr->depth--;
6662 ndr->depth--;
6665 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct lsa_LookupSids *r)
6667 if (flags & NDR_IN) {
6668 if (r->in.handle == NULL) {
6669 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6671 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6672 if (r->in.sids == NULL) {
6673 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6675 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6676 if (r->in.names == NULL) {
6677 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6679 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
6680 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
6681 if (r->in.count == NULL) {
6682 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6684 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
6686 if (flags & NDR_OUT) {
6687 if (r->out.domains == NULL) {
6688 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6690 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
6691 if (*r->out.domains) {
6692 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6694 if (r->out.names == NULL) {
6695 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6697 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
6698 if (r->out.count == NULL) {
6699 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6701 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
6702 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6704 return NDR_ERR_SUCCESS;
6707 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int flags, struct lsa_LookupSids *r)
6709 uint32_t _ptr_domains;
6710 TALLOC_CTX *_mem_save_handle_0;
6711 TALLOC_CTX *_mem_save_sids_0;
6712 TALLOC_CTX *_mem_save_domains_0;
6713 TALLOC_CTX *_mem_save_domains_1;
6714 TALLOC_CTX *_mem_save_names_0;
6715 TALLOC_CTX *_mem_save_count_0;
6716 if (flags & NDR_IN) {
6717 ZERO_STRUCT(r->out);
6719 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6720 NDR_PULL_ALLOC(ndr, r->in.handle);
6722 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6723 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6724 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6725 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6726 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6727 NDR_PULL_ALLOC(ndr, r->in.sids);
6729 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6730 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
6731 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6732 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6733 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6734 NDR_PULL_ALLOC(ndr, r->in.names);
6736 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
6737 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
6738 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
6739 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
6740 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
6741 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6742 NDR_PULL_ALLOC(ndr, r->in.count);
6744 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6745 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
6746 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
6747 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6748 NDR_PULL_ALLOC(ndr, r->out.domains);
6749 ZERO_STRUCTP(r->out.domains);
6750 NDR_PULL_ALLOC(ndr, r->out.names);
6751 *r->out.names = *r->in.names;
6752 NDR_PULL_ALLOC(ndr, r->out.count);
6753 *r->out.count = *r->in.count;
6755 if (flags & NDR_OUT) {
6756 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6757 NDR_PULL_ALLOC(ndr, r->out.domains);
6759 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
6760 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
6761 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
6762 if (_ptr_domains) {
6763 NDR_PULL_ALLOC(ndr, *r->out.domains);
6764 } else {
6765 *r->out.domains = NULL;
6767 if (*r->out.domains) {
6768 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
6769 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
6770 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6771 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
6773 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
6774 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6775 NDR_PULL_ALLOC(ndr, r->out.names);
6777 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
6778 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
6779 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
6780 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
6781 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6782 NDR_PULL_ALLOC(ndr, r->out.count);
6784 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6785 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
6786 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
6787 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6788 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6790 return NDR_ERR_SUCCESS;
6793 _PUBLIC_ void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids *r)
6795 ndr_print_struct(ndr, name, "lsa_LookupSids");
6796 ndr->depth++;
6797 if (flags & NDR_SET_VALUES) {
6798 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6800 if (flags & NDR_IN) {
6801 ndr_print_struct(ndr, "in", "lsa_LookupSids");
6802 ndr->depth++;
6803 ndr_print_ptr(ndr, "handle", r->in.handle);
6804 ndr->depth++;
6805 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6806 ndr->depth--;
6807 ndr_print_ptr(ndr, "sids", r->in.sids);
6808 ndr->depth++;
6809 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
6810 ndr->depth--;
6811 ndr_print_ptr(ndr, "names", r->in.names);
6812 ndr->depth++;
6813 ndr_print_lsa_TransNameArray(ndr, "names", r->in.names);
6814 ndr->depth--;
6815 ndr_print_uint16(ndr, "level", r->in.level);
6816 ndr_print_ptr(ndr, "count", r->in.count);
6817 ndr->depth++;
6818 ndr_print_uint32(ndr, "count", *r->in.count);
6819 ndr->depth--;
6820 ndr->depth--;
6822 if (flags & NDR_OUT) {
6823 ndr_print_struct(ndr, "out", "lsa_LookupSids");
6824 ndr->depth++;
6825 ndr_print_ptr(ndr, "domains", r->out.domains);
6826 ndr->depth++;
6827 ndr_print_ptr(ndr, "domains", *r->out.domains);
6828 ndr->depth++;
6829 if (*r->out.domains) {
6830 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
6832 ndr->depth--;
6833 ndr->depth--;
6834 ndr_print_ptr(ndr, "names", r->out.names);
6835 ndr->depth++;
6836 ndr_print_lsa_TransNameArray(ndr, "names", r->out.names);
6837 ndr->depth--;
6838 ndr_print_ptr(ndr, "count", r->out.count);
6839 ndr->depth++;
6840 ndr_print_uint32(ndr, "count", *r->out.count);
6841 ndr->depth--;
6842 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6843 ndr->depth--;
6845 ndr->depth--;
6848 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct lsa_CreateSecret *r)
6850 if (flags & NDR_IN) {
6851 if (r->in.handle == NULL) {
6852 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6854 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6855 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
6856 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
6858 if (flags & NDR_OUT) {
6859 if (r->out.sec_handle == NULL) {
6860 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6862 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
6863 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6865 return NDR_ERR_SUCCESS;
6868 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int flags, struct lsa_CreateSecret *r)
6870 TALLOC_CTX *_mem_save_handle_0;
6871 TALLOC_CTX *_mem_save_sec_handle_0;
6872 if (flags & NDR_IN) {
6873 ZERO_STRUCT(r->out);
6875 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6876 NDR_PULL_ALLOC(ndr, r->in.handle);
6878 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6879 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6880 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6881 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6882 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
6883 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
6884 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
6885 ZERO_STRUCTP(r->out.sec_handle);
6887 if (flags & NDR_OUT) {
6888 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6889 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
6891 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6892 NDR_PULL_SET_MEM_CTX(ndr, r->out.sec_handle, LIBNDR_FLAG_REF_ALLOC);
6893 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
6894 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
6895 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6897 return NDR_ERR_SUCCESS;
6900 _PUBLIC_ void ndr_print_lsa_CreateSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateSecret *r)
6902 ndr_print_struct(ndr, name, "lsa_CreateSecret");
6903 ndr->depth++;
6904 if (flags & NDR_SET_VALUES) {
6905 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6907 if (flags & NDR_IN) {
6908 ndr_print_struct(ndr, "in", "lsa_CreateSecret");
6909 ndr->depth++;
6910 ndr_print_ptr(ndr, "handle", r->in.handle);
6911 ndr->depth++;
6912 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6913 ndr->depth--;
6914 ndr_print_lsa_String(ndr, "name", &r->in.name);
6915 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
6916 ndr->depth--;
6918 if (flags & NDR_OUT) {
6919 ndr_print_struct(ndr, "out", "lsa_CreateSecret");
6920 ndr->depth++;
6921 ndr_print_ptr(ndr, "sec_handle", r->out.sec_handle);
6922 ndr->depth++;
6923 ndr_print_policy_handle(ndr, "sec_handle", r->out.sec_handle);
6924 ndr->depth--;
6925 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6926 ndr->depth--;
6928 ndr->depth--;
6931 static enum ndr_err_code ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flags, const struct lsa_OpenAccount *r)
6933 if (flags & NDR_IN) {
6934 if (r->in.handle == NULL) {
6935 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6937 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6938 if (r->in.sid == NULL) {
6939 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6941 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6942 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
6944 if (flags & NDR_OUT) {
6945 if (r->out.acct_handle == NULL) {
6946 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6948 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
6949 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6951 return NDR_ERR_SUCCESS;
6954 static enum ndr_err_code ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flags, struct lsa_OpenAccount *r)
6956 TALLOC_CTX *_mem_save_handle_0;
6957 TALLOC_CTX *_mem_save_sid_0;
6958 TALLOC_CTX *_mem_save_acct_handle_0;
6959 if (flags & NDR_IN) {
6960 ZERO_STRUCT(r->out);
6962 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6963 NDR_PULL_ALLOC(ndr, r->in.handle);
6965 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6966 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6967 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6968 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6969 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6970 NDR_PULL_ALLOC(ndr, r->in.sid);
6972 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6973 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
6974 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6975 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
6976 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
6977 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
6978 ZERO_STRUCTP(r->out.acct_handle);
6980 if (flags & NDR_OUT) {
6981 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6982 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
6984 _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6985 NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC);
6986 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
6987 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC);
6988 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6990 return NDR_ERR_SUCCESS;
6993 _PUBLIC_ void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenAccount *r)
6995 ndr_print_struct(ndr, name, "lsa_OpenAccount");
6996 ndr->depth++;
6997 if (flags & NDR_SET_VALUES) {
6998 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7000 if (flags & NDR_IN) {
7001 ndr_print_struct(ndr, "in", "lsa_OpenAccount");
7002 ndr->depth++;
7003 ndr_print_ptr(ndr, "handle", r->in.handle);
7004 ndr->depth++;
7005 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7006 ndr->depth--;
7007 ndr_print_ptr(ndr, "sid", r->in.sid);
7008 ndr->depth++;
7009 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
7010 ndr->depth--;
7011 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
7012 ndr->depth--;
7014 if (flags & NDR_OUT) {
7015 ndr_print_struct(ndr, "out", "lsa_OpenAccount");
7016 ndr->depth++;
7017 ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle);
7018 ndr->depth++;
7019 ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle);
7020 ndr->depth--;
7021 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7022 ndr->depth--;
7024 ndr->depth--;
7027 static enum ndr_err_code ndr_push_lsa_EnumPrivsAccount(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivsAccount *r)
7029 if (flags & NDR_IN) {
7030 if (r->in.handle == NULL) {
7031 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7033 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7035 if (flags & NDR_OUT) {
7036 if (r->out.privs == NULL) {
7037 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7039 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.privs));
7040 if (*r->out.privs) {
7041 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs));
7043 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7045 return NDR_ERR_SUCCESS;
7048 static enum ndr_err_code ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivsAccount *r)
7050 uint32_t _ptr_privs;
7051 TALLOC_CTX *_mem_save_handle_0;
7052 TALLOC_CTX *_mem_save_privs_0;
7053 TALLOC_CTX *_mem_save_privs_1;
7054 if (flags & NDR_IN) {
7055 ZERO_STRUCT(r->out);
7057 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7058 NDR_PULL_ALLOC(ndr, r->in.handle);
7060 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7061 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7062 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7063 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7064 NDR_PULL_ALLOC(ndr, r->out.privs);
7065 ZERO_STRUCTP(r->out.privs);
7067 if (flags & NDR_OUT) {
7068 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7069 NDR_PULL_ALLOC(ndr, r->out.privs);
7071 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
7072 NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, LIBNDR_FLAG_REF_ALLOC);
7073 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
7074 if (_ptr_privs) {
7075 NDR_PULL_ALLOC(ndr, *r->out.privs);
7076 } else {
7077 *r->out.privs = NULL;
7079 if (*r->out.privs) {
7080 _mem_save_privs_1 = NDR_PULL_GET_MEM_CTX(ndr);
7081 NDR_PULL_SET_MEM_CTX(ndr, *r->out.privs, 0);
7082 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs));
7083 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_1, 0);
7085 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
7086 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7088 return NDR_ERR_SUCCESS;
7091 _PUBLIC_ void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivsAccount *r)
7093 ndr_print_struct(ndr, name, "lsa_EnumPrivsAccount");
7094 ndr->depth++;
7095 if (flags & NDR_SET_VALUES) {
7096 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7098 if (flags & NDR_IN) {
7099 ndr_print_struct(ndr, "in", "lsa_EnumPrivsAccount");
7100 ndr->depth++;
7101 ndr_print_ptr(ndr, "handle", r->in.handle);
7102 ndr->depth++;
7103 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7104 ndr->depth--;
7105 ndr->depth--;
7107 if (flags & NDR_OUT) {
7108 ndr_print_struct(ndr, "out", "lsa_EnumPrivsAccount");
7109 ndr->depth++;
7110 ndr_print_ptr(ndr, "privs", r->out.privs);
7111 ndr->depth++;
7112 ndr_print_ptr(ndr, "privs", *r->out.privs);
7113 ndr->depth++;
7114 if (*r->out.privs) {
7115 ndr_print_lsa_PrivilegeSet(ndr, "privs", *r->out.privs);
7117 ndr->depth--;
7118 ndr->depth--;
7119 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7120 ndr->depth--;
7122 ndr->depth--;
7125 static enum ndr_err_code ndr_push_lsa_AddPrivilegesToAccount(struct ndr_push *ndr, int flags, const struct lsa_AddPrivilegesToAccount *r)
7127 if (flags & NDR_IN) {
7128 if (r->in.handle == NULL) {
7129 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7131 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7132 if (r->in.privs == NULL) {
7133 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7135 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7137 if (flags & NDR_OUT) {
7138 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7140 return NDR_ERR_SUCCESS;
7143 static enum ndr_err_code ndr_pull_lsa_AddPrivilegesToAccount(struct ndr_pull *ndr, int flags, struct lsa_AddPrivilegesToAccount *r)
7145 TALLOC_CTX *_mem_save_handle_0;
7146 TALLOC_CTX *_mem_save_privs_0;
7147 if (flags & NDR_IN) {
7148 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7149 NDR_PULL_ALLOC(ndr, r->in.handle);
7151 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7152 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7153 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7154 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7155 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7156 NDR_PULL_ALLOC(ndr, r->in.privs);
7158 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
7159 NDR_PULL_SET_MEM_CTX(ndr, r->in.privs, LIBNDR_FLAG_REF_ALLOC);
7160 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7161 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
7163 if (flags & NDR_OUT) {
7164 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7166 return NDR_ERR_SUCCESS;
7169 _PUBLIC_ void ndr_print_lsa_AddPrivilegesToAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddPrivilegesToAccount *r)
7171 ndr_print_struct(ndr, name, "lsa_AddPrivilegesToAccount");
7172 ndr->depth++;
7173 if (flags & NDR_SET_VALUES) {
7174 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7176 if (flags & NDR_IN) {
7177 ndr_print_struct(ndr, "in", "lsa_AddPrivilegesToAccount");
7178 ndr->depth++;
7179 ndr_print_ptr(ndr, "handle", r->in.handle);
7180 ndr->depth++;
7181 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7182 ndr->depth--;
7183 ndr_print_ptr(ndr, "privs", r->in.privs);
7184 ndr->depth++;
7185 ndr_print_lsa_PrivilegeSet(ndr, "privs", r->in.privs);
7186 ndr->depth--;
7187 ndr->depth--;
7189 if (flags & NDR_OUT) {
7190 ndr_print_struct(ndr, "out", "lsa_AddPrivilegesToAccount");
7191 ndr->depth++;
7192 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7193 ndr->depth--;
7195 ndr->depth--;
7198 static enum ndr_err_code ndr_push_lsa_RemovePrivilegesFromAccount(struct ndr_push *ndr, int flags, const struct lsa_RemovePrivilegesFromAccount *r)
7200 if (flags & NDR_IN) {
7201 if (r->in.handle == NULL) {
7202 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7204 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7205 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.remove_all));
7206 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.privs));
7207 if (r->in.privs) {
7208 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7211 if (flags & NDR_OUT) {
7212 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7214 return NDR_ERR_SUCCESS;
7217 static enum ndr_err_code ndr_pull_lsa_RemovePrivilegesFromAccount(struct ndr_pull *ndr, int flags, struct lsa_RemovePrivilegesFromAccount *r)
7219 uint32_t _ptr_privs;
7220 TALLOC_CTX *_mem_save_handle_0;
7221 TALLOC_CTX *_mem_save_privs_0;
7222 if (flags & NDR_IN) {
7223 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7224 NDR_PULL_ALLOC(ndr, r->in.handle);
7226 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7227 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7228 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7229 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7230 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.remove_all));
7231 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
7232 if (_ptr_privs) {
7233 NDR_PULL_ALLOC(ndr, r->in.privs);
7234 } else {
7235 r->in.privs = NULL;
7237 if (r->in.privs) {
7238 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
7239 NDR_PULL_SET_MEM_CTX(ndr, r->in.privs, 0);
7240 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7241 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0);
7244 if (flags & NDR_OUT) {
7245 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7247 return NDR_ERR_SUCCESS;
7250 _PUBLIC_ void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemovePrivilegesFromAccount *r)
7252 ndr_print_struct(ndr, name, "lsa_RemovePrivilegesFromAccount");
7253 ndr->depth++;
7254 if (flags & NDR_SET_VALUES) {
7255 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7257 if (flags & NDR_IN) {
7258 ndr_print_struct(ndr, "in", "lsa_RemovePrivilegesFromAccount");
7259 ndr->depth++;
7260 ndr_print_ptr(ndr, "handle", r->in.handle);
7261 ndr->depth++;
7262 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7263 ndr->depth--;
7264 ndr_print_uint8(ndr, "remove_all", r->in.remove_all);
7265 ndr_print_ptr(ndr, "privs", r->in.privs);
7266 ndr->depth++;
7267 if (r->in.privs) {
7268 ndr_print_lsa_PrivilegeSet(ndr, "privs", r->in.privs);
7270 ndr->depth--;
7271 ndr->depth--;
7273 if (flags & NDR_OUT) {
7274 ndr_print_struct(ndr, "out", "lsa_RemovePrivilegesFromAccount");
7275 ndr->depth++;
7276 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7277 ndr->depth--;
7279 ndr->depth--;
7282 static enum ndr_err_code ndr_push_lsa_GetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_GetQuotasForAccount *r)
7284 if (flags & NDR_IN) {
7286 if (flags & NDR_OUT) {
7287 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7289 return NDR_ERR_SUCCESS;
7292 static enum ndr_err_code ndr_pull_lsa_GetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_GetQuotasForAccount *r)
7294 if (flags & NDR_IN) {
7296 if (flags & NDR_OUT) {
7297 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7299 return NDR_ERR_SUCCESS;
7302 _PUBLIC_ void ndr_print_lsa_GetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetQuotasForAccount *r)
7304 ndr_print_struct(ndr, name, "lsa_GetQuotasForAccount");
7305 ndr->depth++;
7306 if (flags & NDR_SET_VALUES) {
7307 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7309 if (flags & NDR_IN) {
7310 ndr_print_struct(ndr, "in", "lsa_GetQuotasForAccount");
7311 ndr->depth++;
7312 ndr->depth--;
7314 if (flags & NDR_OUT) {
7315 ndr_print_struct(ndr, "out", "lsa_GetQuotasForAccount");
7316 ndr->depth++;
7317 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7318 ndr->depth--;
7320 ndr->depth--;
7323 static enum ndr_err_code ndr_push_lsa_SetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_SetQuotasForAccount *r)
7325 if (flags & NDR_IN) {
7327 if (flags & NDR_OUT) {
7328 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7330 return NDR_ERR_SUCCESS;
7333 static enum ndr_err_code ndr_pull_lsa_SetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_SetQuotasForAccount *r)
7335 if (flags & NDR_IN) {
7337 if (flags & NDR_OUT) {
7338 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7340 return NDR_ERR_SUCCESS;
7343 _PUBLIC_ void ndr_print_lsa_SetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetQuotasForAccount *r)
7345 ndr_print_struct(ndr, name, "lsa_SetQuotasForAccount");
7346 ndr->depth++;
7347 if (flags & NDR_SET_VALUES) {
7348 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7350 if (flags & NDR_IN) {
7351 ndr_print_struct(ndr, "in", "lsa_SetQuotasForAccount");
7352 ndr->depth++;
7353 ndr->depth--;
7355 if (flags & NDR_OUT) {
7356 ndr_print_struct(ndr, "out", "lsa_SetQuotasForAccount");
7357 ndr->depth++;
7358 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7359 ndr->depth--;
7361 ndr->depth--;
7364 static enum ndr_err_code ndr_push_lsa_GetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_GetSystemAccessAccount *r)
7366 if (flags & NDR_IN) {
7367 if (r->in.handle == NULL) {
7368 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7370 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7372 if (flags & NDR_OUT) {
7373 if (r->out.access_mask == NULL) {
7374 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7376 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.access_mask));
7377 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7379 return NDR_ERR_SUCCESS;
7382 static enum ndr_err_code ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_GetSystemAccessAccount *r)
7384 TALLOC_CTX *_mem_save_handle_0;
7385 TALLOC_CTX *_mem_save_access_mask_0;
7386 if (flags & NDR_IN) {
7387 ZERO_STRUCT(r->out);
7389 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7390 NDR_PULL_ALLOC(ndr, r->in.handle);
7392 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7393 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7394 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7395 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7396 NDR_PULL_ALLOC(ndr, r->out.access_mask);
7397 ZERO_STRUCTP(r->out.access_mask);
7399 if (flags & NDR_OUT) {
7400 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7401 NDR_PULL_ALLOC(ndr, r->out.access_mask);
7403 _mem_save_access_mask_0 = NDR_PULL_GET_MEM_CTX(ndr);
7404 NDR_PULL_SET_MEM_CTX(ndr, r->out.access_mask, LIBNDR_FLAG_REF_ALLOC);
7405 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.access_mask));
7406 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_access_mask_0, LIBNDR_FLAG_REF_ALLOC);
7407 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7409 return NDR_ERR_SUCCESS;
7412 _PUBLIC_ void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetSystemAccessAccount *r)
7414 ndr_print_struct(ndr, name, "lsa_GetSystemAccessAccount");
7415 ndr->depth++;
7416 if (flags & NDR_SET_VALUES) {
7417 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7419 if (flags & NDR_IN) {
7420 ndr_print_struct(ndr, "in", "lsa_GetSystemAccessAccount");
7421 ndr->depth++;
7422 ndr_print_ptr(ndr, "handle", r->in.handle);
7423 ndr->depth++;
7424 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7425 ndr->depth--;
7426 ndr->depth--;
7428 if (flags & NDR_OUT) {
7429 ndr_print_struct(ndr, "out", "lsa_GetSystemAccessAccount");
7430 ndr->depth++;
7431 ndr_print_ptr(ndr, "access_mask", r->out.access_mask);
7432 ndr->depth++;
7433 ndr_print_uint32(ndr, "access_mask", *r->out.access_mask);
7434 ndr->depth--;
7435 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7436 ndr->depth--;
7438 ndr->depth--;
7441 static enum ndr_err_code ndr_push_lsa_SetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_SetSystemAccessAccount *r)
7443 if (flags & NDR_IN) {
7444 if (r->in.handle == NULL) {
7445 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7447 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7448 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
7450 if (flags & NDR_OUT) {
7451 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7453 return NDR_ERR_SUCCESS;
7456 static enum ndr_err_code ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_SetSystemAccessAccount *r)
7458 TALLOC_CTX *_mem_save_handle_0;
7459 if (flags & NDR_IN) {
7460 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7461 NDR_PULL_ALLOC(ndr, r->in.handle);
7463 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7464 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7465 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7466 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7467 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
7469 if (flags & NDR_OUT) {
7470 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7472 return NDR_ERR_SUCCESS;
7475 _PUBLIC_ void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSystemAccessAccount *r)
7477 ndr_print_struct(ndr, name, "lsa_SetSystemAccessAccount");
7478 ndr->depth++;
7479 if (flags & NDR_SET_VALUES) {
7480 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7482 if (flags & NDR_IN) {
7483 ndr_print_struct(ndr, "in", "lsa_SetSystemAccessAccount");
7484 ndr->depth++;
7485 ndr_print_ptr(ndr, "handle", r->in.handle);
7486 ndr->depth++;
7487 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7488 ndr->depth--;
7489 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
7490 ndr->depth--;
7492 if (flags & NDR_OUT) {
7493 ndr_print_struct(ndr, "out", "lsa_SetSystemAccessAccount");
7494 ndr->depth++;
7495 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7496 ndr->depth--;
7498 ndr->depth--;
7501 static enum ndr_err_code ndr_push_lsa_OpenTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomain *r)
7503 if (flags & NDR_IN) {
7504 if (r->in.handle == NULL) {
7505 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7507 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7508 if (r->in.sid == NULL) {
7509 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7511 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
7512 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
7514 if (flags & NDR_OUT) {
7515 if (r->out.trustdom_handle == NULL) {
7516 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7518 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
7519 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7521 return NDR_ERR_SUCCESS;
7524 static enum ndr_err_code ndr_pull_lsa_OpenTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomain *r)
7526 TALLOC_CTX *_mem_save_handle_0;
7527 TALLOC_CTX *_mem_save_sid_0;
7528 TALLOC_CTX *_mem_save_trustdom_handle_0;
7529 if (flags & NDR_IN) {
7530 ZERO_STRUCT(r->out);
7532 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7533 NDR_PULL_ALLOC(ndr, r->in.handle);
7535 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7536 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7537 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7538 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7539 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7540 NDR_PULL_ALLOC(ndr, r->in.sid);
7542 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
7543 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
7544 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
7545 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
7546 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
7547 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
7548 ZERO_STRUCTP(r->out.trustdom_handle);
7550 if (flags & NDR_OUT) {
7551 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7552 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
7554 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7555 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
7556 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
7557 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
7558 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7560 return NDR_ERR_SUCCESS;
7563 _PUBLIC_ void ndr_print_lsa_OpenTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomain *r)
7565 ndr_print_struct(ndr, name, "lsa_OpenTrustedDomain");
7566 ndr->depth++;
7567 if (flags & NDR_SET_VALUES) {
7568 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7570 if (flags & NDR_IN) {
7571 ndr_print_struct(ndr, "in", "lsa_OpenTrustedDomain");
7572 ndr->depth++;
7573 ndr_print_ptr(ndr, "handle", r->in.handle);
7574 ndr->depth++;
7575 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7576 ndr->depth--;
7577 ndr_print_ptr(ndr, "sid", r->in.sid);
7578 ndr->depth++;
7579 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
7580 ndr->depth--;
7581 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
7582 ndr->depth--;
7584 if (flags & NDR_OUT) {
7585 ndr_print_struct(ndr, "out", "lsa_OpenTrustedDomain");
7586 ndr->depth++;
7587 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
7588 ndr->depth++;
7589 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
7590 ndr->depth--;
7591 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7592 ndr->depth--;
7594 ndr->depth--;
7597 static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfo *r)
7599 if (flags & NDR_IN) {
7600 if (r->in.trustdom_handle == NULL) {
7601 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7603 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7604 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
7606 if (flags & NDR_OUT) {
7607 if (r->out.info == NULL) {
7608 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7610 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
7611 if (*r->out.info) {
7612 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
7613 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
7615 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7617 return NDR_ERR_SUCCESS;
7620 static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfo *r)
7622 uint32_t _ptr_info;
7623 TALLOC_CTX *_mem_save_trustdom_handle_0;
7624 TALLOC_CTX *_mem_save_info_0;
7625 TALLOC_CTX *_mem_save_info_1;
7626 if (flags & NDR_IN) {
7627 ZERO_STRUCT(r->out);
7629 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7630 NDR_PULL_ALLOC(ndr, r->in.trustdom_handle);
7632 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7633 NDR_PULL_SET_MEM_CTX(ndr, r->in.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
7634 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7635 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
7636 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
7637 NDR_PULL_ALLOC(ndr, r->out.info);
7638 ZERO_STRUCTP(r->out.info);
7640 if (flags & NDR_OUT) {
7641 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7642 NDR_PULL_ALLOC(ndr, r->out.info);
7644 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7645 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
7646 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
7647 if (_ptr_info) {
7648 NDR_PULL_ALLOC(ndr, *r->out.info);
7649 } else {
7650 *r->out.info = NULL;
7652 if (*r->out.info) {
7653 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
7654 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
7655 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
7656 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
7657 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
7659 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7660 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7662 return NDR_ERR_SUCCESS;
7665 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfo *r)
7667 ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfo");
7668 ndr->depth++;
7669 if (flags & NDR_SET_VALUES) {
7670 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7672 if (flags & NDR_IN) {
7673 ndr_print_struct(ndr, "in", "lsa_QueryTrustedDomainInfo");
7674 ndr->depth++;
7675 ndr_print_ptr(ndr, "trustdom_handle", r->in.trustdom_handle);
7676 ndr->depth++;
7677 ndr_print_policy_handle(ndr, "trustdom_handle", r->in.trustdom_handle);
7678 ndr->depth--;
7679 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
7680 ndr->depth--;
7682 if (flags & NDR_OUT) {
7683 ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfo");
7684 ndr->depth++;
7685 ndr_print_ptr(ndr, "info", r->out.info);
7686 ndr->depth++;
7687 ndr_print_ptr(ndr, "info", *r->out.info);
7688 ndr->depth++;
7689 if (*r->out.info) {
7690 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
7691 ndr_print_lsa_TrustedDomainInfo(ndr, "info", *r->out.info);
7693 ndr->depth--;
7694 ndr->depth--;
7695 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7696 ndr->depth--;
7698 ndr->depth--;
7701 static enum ndr_err_code ndr_push_lsa_SetInformationTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_SetInformationTrustedDomain *r)
7703 if (flags & NDR_IN) {
7704 if (r->in.trustdom_handle == NULL) {
7705 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7707 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7708 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
7709 if (r->in.info == NULL) {
7710 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7712 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
7713 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7715 if (flags & NDR_OUT) {
7716 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7718 return NDR_ERR_SUCCESS;
7721 static enum ndr_err_code ndr_pull_lsa_SetInformationTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_SetInformationTrustedDomain *r)
7723 TALLOC_CTX *_mem_save_trustdom_handle_0;
7724 TALLOC_CTX *_mem_save_info_0;
7725 if (flags & NDR_IN) {
7726 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7727 NDR_PULL_ALLOC(ndr, r->in.trustdom_handle);
7729 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7730 NDR_PULL_SET_MEM_CTX(ndr, r->in.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
7731 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7732 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
7733 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
7734 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7735 NDR_PULL_ALLOC(ndr, r->in.info);
7737 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7738 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
7739 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
7740 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7741 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7743 if (flags & NDR_OUT) {
7744 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7746 return NDR_ERR_SUCCESS;
7749 _PUBLIC_ void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInformationTrustedDomain *r)
7751 ndr_print_struct(ndr, name, "lsa_SetInformationTrustedDomain");
7752 ndr->depth++;
7753 if (flags & NDR_SET_VALUES) {
7754 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7756 if (flags & NDR_IN) {
7757 ndr_print_struct(ndr, "in", "lsa_SetInformationTrustedDomain");
7758 ndr->depth++;
7759 ndr_print_ptr(ndr, "trustdom_handle", r->in.trustdom_handle);
7760 ndr->depth++;
7761 ndr_print_policy_handle(ndr, "trustdom_handle", r->in.trustdom_handle);
7762 ndr->depth--;
7763 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
7764 ndr_print_ptr(ndr, "info", r->in.info);
7765 ndr->depth++;
7766 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
7767 ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
7768 ndr->depth--;
7769 ndr->depth--;
7771 if (flags & NDR_OUT) {
7772 ndr_print_struct(ndr, "out", "lsa_SetInformationTrustedDomain");
7773 ndr->depth++;
7774 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7775 ndr->depth--;
7777 ndr->depth--;
7780 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags, const struct lsa_OpenSecret *r)
7782 if (flags & NDR_IN) {
7783 if (r->in.handle == NULL) {
7784 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7786 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7787 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
7788 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
7790 if (flags & NDR_OUT) {
7791 if (r->out.sec_handle == NULL) {
7792 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7794 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
7795 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7797 return NDR_ERR_SUCCESS;
7800 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenSecret(struct ndr_pull *ndr, int flags, struct lsa_OpenSecret *r)
7802 TALLOC_CTX *_mem_save_handle_0;
7803 TALLOC_CTX *_mem_save_sec_handle_0;
7804 if (flags & NDR_IN) {
7805 ZERO_STRUCT(r->out);
7807 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7808 NDR_PULL_ALLOC(ndr, r->in.handle);
7810 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7811 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7812 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7813 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7814 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
7815 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
7816 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
7817 ZERO_STRUCTP(r->out.sec_handle);
7819 if (flags & NDR_OUT) {
7820 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7821 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
7823 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7824 NDR_PULL_SET_MEM_CTX(ndr, r->out.sec_handle, LIBNDR_FLAG_REF_ALLOC);
7825 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
7826 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
7827 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7829 return NDR_ERR_SUCCESS;
7832 _PUBLIC_ void ndr_print_lsa_OpenSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenSecret *r)
7834 ndr_print_struct(ndr, name, "lsa_OpenSecret");
7835 ndr->depth++;
7836 if (flags & NDR_SET_VALUES) {
7837 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7839 if (flags & NDR_IN) {
7840 ndr_print_struct(ndr, "in", "lsa_OpenSecret");
7841 ndr->depth++;
7842 ndr_print_ptr(ndr, "handle", r->in.handle);
7843 ndr->depth++;
7844 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7845 ndr->depth--;
7846 ndr_print_lsa_String(ndr, "name", &r->in.name);
7847 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
7848 ndr->depth--;
7850 if (flags & NDR_OUT) {
7851 ndr_print_struct(ndr, "out", "lsa_OpenSecret");
7852 ndr->depth++;
7853 ndr_print_ptr(ndr, "sec_handle", r->out.sec_handle);
7854 ndr->depth++;
7855 ndr_print_policy_handle(ndr, "sec_handle", r->out.sec_handle);
7856 ndr->depth--;
7857 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7858 ndr->depth--;
7860 ndr->depth--;
7863 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, const struct lsa_SetSecret *r)
7865 if (flags & NDR_IN) {
7866 if (r->in.sec_handle == NULL) {
7867 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7869 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
7870 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_val));
7871 if (r->in.new_val) {
7872 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
7874 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_val));
7875 if (r->in.old_val) {
7876 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
7879 if (flags & NDR_OUT) {
7880 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7882 return NDR_ERR_SUCCESS;
7885 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SetSecret(struct ndr_pull *ndr, int flags, struct lsa_SetSecret *r)
7887 uint32_t _ptr_new_val;
7888 uint32_t _ptr_old_val;
7889 TALLOC_CTX *_mem_save_sec_handle_0;
7890 TALLOC_CTX *_mem_save_new_val_0;
7891 TALLOC_CTX *_mem_save_old_val_0;
7892 if (flags & NDR_IN) {
7893 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7894 NDR_PULL_ALLOC(ndr, r->in.sec_handle);
7896 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7897 NDR_PULL_SET_MEM_CTX(ndr, r->in.sec_handle, LIBNDR_FLAG_REF_ALLOC);
7898 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
7899 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
7900 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val));
7901 if (_ptr_new_val) {
7902 NDR_PULL_ALLOC(ndr, r->in.new_val);
7903 } else {
7904 r->in.new_val = NULL;
7906 if (r->in.new_val) {
7907 _mem_save_new_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
7908 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_val, 0);
7909 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
7910 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_val_0, 0);
7912 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
7913 if (_ptr_old_val) {
7914 NDR_PULL_ALLOC(ndr, r->in.old_val);
7915 } else {
7916 r->in.old_val = NULL;
7918 if (r->in.old_val) {
7919 _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
7920 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_val, 0);
7921 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
7922 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
7925 if (flags & NDR_OUT) {
7926 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7928 return NDR_ERR_SUCCESS;
7931 _PUBLIC_ void ndr_print_lsa_SetSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecret *r)
7933 ndr_print_struct(ndr, name, "lsa_SetSecret");
7934 ndr->depth++;
7935 if (flags & NDR_SET_VALUES) {
7936 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7938 if (flags & NDR_IN) {
7939 ndr_print_struct(ndr, "in", "lsa_SetSecret");
7940 ndr->depth++;
7941 ndr_print_ptr(ndr, "sec_handle", r->in.sec_handle);
7942 ndr->depth++;
7943 ndr_print_policy_handle(ndr, "sec_handle", r->in.sec_handle);
7944 ndr->depth--;
7945 ndr_print_ptr(ndr, "new_val", r->in.new_val);
7946 ndr->depth++;
7947 if (r->in.new_val) {
7948 ndr_print_lsa_DATA_BUF(ndr, "new_val", r->in.new_val);
7950 ndr->depth--;
7951 ndr_print_ptr(ndr, "old_val", r->in.old_val);
7952 ndr->depth++;
7953 if (r->in.old_val) {
7954 ndr_print_lsa_DATA_BUF(ndr, "old_val", r->in.old_val);
7956 ndr->depth--;
7957 ndr->depth--;
7959 if (flags & NDR_OUT) {
7960 ndr_print_struct(ndr, "out", "lsa_SetSecret");
7961 ndr->depth++;
7962 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7963 ndr->depth--;
7965 ndr->depth--;
7968 _PUBLIC_ enum ndr_err_code ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flags, const struct lsa_QuerySecret *r)
7970 if (flags & NDR_IN) {
7971 if (r->in.sec_handle == NULL) {
7972 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7974 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
7975 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_val));
7976 if (r->in.new_val) {
7977 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
7979 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_mtime));
7980 if (r->in.new_mtime) {
7981 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->in.new_mtime));
7983 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_val));
7984 if (r->in.old_val) {
7985 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
7987 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_mtime));
7988 if (r->in.old_mtime) {
7989 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->in.old_mtime));
7992 if (flags & NDR_OUT) {
7993 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.new_val));
7994 if (r->out.new_val) {
7995 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_val));
7997 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.new_mtime));
7998 if (r->out.new_mtime) {
7999 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->out.new_mtime));
8001 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.old_val));
8002 if (r->out.old_val) {
8003 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.old_val));
8005 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.old_mtime));
8006 if (r->out.old_mtime) {
8007 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->out.old_mtime));
8009 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8011 return NDR_ERR_SUCCESS;
8014 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_QuerySecret(struct ndr_pull *ndr, int flags, struct lsa_QuerySecret *r)
8016 uint32_t _ptr_new_val;
8017 uint32_t _ptr_new_mtime;
8018 uint32_t _ptr_old_val;
8019 uint32_t _ptr_old_mtime;
8020 TALLOC_CTX *_mem_save_sec_handle_0;
8021 TALLOC_CTX *_mem_save_new_val_0;
8022 TALLOC_CTX *_mem_save_new_mtime_0;
8023 TALLOC_CTX *_mem_save_old_val_0;
8024 TALLOC_CTX *_mem_save_old_mtime_0;
8025 if (flags & NDR_IN) {
8026 ZERO_STRUCT(r->out);
8028 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8029 NDR_PULL_ALLOC(ndr, r->in.sec_handle);
8031 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8032 NDR_PULL_SET_MEM_CTX(ndr, r->in.sec_handle, LIBNDR_FLAG_REF_ALLOC);
8033 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
8034 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
8035 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val));
8036 if (_ptr_new_val) {
8037 NDR_PULL_ALLOC(ndr, r->in.new_val);
8038 } else {
8039 r->in.new_val = NULL;
8041 if (r->in.new_val) {
8042 _mem_save_new_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
8043 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_val, 0);
8044 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
8045 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_val_0, 0);
8047 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_mtime));
8048 if (_ptr_new_mtime) {
8049 NDR_PULL_ALLOC(ndr, r->in.new_mtime);
8050 } else {
8051 r->in.new_mtime = NULL;
8053 if (r->in.new_mtime) {
8054 _mem_save_new_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
8055 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_mtime, 0);
8056 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->in.new_mtime));
8057 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_mtime_0, 0);
8059 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
8060 if (_ptr_old_val) {
8061 NDR_PULL_ALLOC(ndr, r->in.old_val);
8062 } else {
8063 r->in.old_val = NULL;
8065 if (r->in.old_val) {
8066 _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
8067 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_val, 0);
8068 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
8069 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
8071 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_mtime));
8072 if (_ptr_old_mtime) {
8073 NDR_PULL_ALLOC(ndr, r->in.old_mtime);
8074 } else {
8075 r->in.old_mtime = NULL;
8077 if (r->in.old_mtime) {
8078 _mem_save_old_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
8079 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_mtime, 0);
8080 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->in.old_mtime));
8081 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_mtime_0, 0);
8084 if (flags & NDR_OUT) {
8085 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val));
8086 if (_ptr_new_val) {
8087 NDR_PULL_ALLOC(ndr, r->out.new_val);
8088 } else {
8089 r->out.new_val = NULL;
8091 if (r->out.new_val) {
8092 _mem_save_new_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
8093 NDR_PULL_SET_MEM_CTX(ndr, r->out.new_val, 0);
8094 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_val));
8095 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_val_0, 0);
8097 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_mtime));
8098 if (_ptr_new_mtime) {
8099 NDR_PULL_ALLOC(ndr, r->out.new_mtime);
8100 } else {
8101 r->out.new_mtime = NULL;
8103 if (r->out.new_mtime) {
8104 _mem_save_new_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
8105 NDR_PULL_SET_MEM_CTX(ndr, r->out.new_mtime, 0);
8106 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->out.new_mtime));
8107 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_mtime_0, 0);
8109 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
8110 if (_ptr_old_val) {
8111 NDR_PULL_ALLOC(ndr, r->out.old_val);
8112 } else {
8113 r->out.old_val = NULL;
8115 if (r->out.old_val) {
8116 _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
8117 NDR_PULL_SET_MEM_CTX(ndr, r->out.old_val, 0);
8118 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.old_val));
8119 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
8121 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_mtime));
8122 if (_ptr_old_mtime) {
8123 NDR_PULL_ALLOC(ndr, r->out.old_mtime);
8124 } else {
8125 r->out.old_mtime = NULL;
8127 if (r->out.old_mtime) {
8128 _mem_save_old_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
8129 NDR_PULL_SET_MEM_CTX(ndr, r->out.old_mtime, 0);
8130 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->out.old_mtime));
8131 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_mtime_0, 0);
8133 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8135 return NDR_ERR_SUCCESS;
8138 _PUBLIC_ void ndr_print_lsa_QuerySecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecret *r)
8140 ndr_print_struct(ndr, name, "lsa_QuerySecret");
8141 ndr->depth++;
8142 if (flags & NDR_SET_VALUES) {
8143 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8145 if (flags & NDR_IN) {
8146 ndr_print_struct(ndr, "in", "lsa_QuerySecret");
8147 ndr->depth++;
8148 ndr_print_ptr(ndr, "sec_handle", r->in.sec_handle);
8149 ndr->depth++;
8150 ndr_print_policy_handle(ndr, "sec_handle", r->in.sec_handle);
8151 ndr->depth--;
8152 ndr_print_ptr(ndr, "new_val", r->in.new_val);
8153 ndr->depth++;
8154 if (r->in.new_val) {
8155 ndr_print_lsa_DATA_BUF_PTR(ndr, "new_val", r->in.new_val);
8157 ndr->depth--;
8158 ndr_print_ptr(ndr, "new_mtime", r->in.new_mtime);
8159 ndr->depth++;
8160 if (r->in.new_mtime) {
8161 ndr_print_NTTIME_hyper(ndr, "new_mtime", *r->in.new_mtime);
8163 ndr->depth--;
8164 ndr_print_ptr(ndr, "old_val", r->in.old_val);
8165 ndr->depth++;
8166 if (r->in.old_val) {
8167 ndr_print_lsa_DATA_BUF_PTR(ndr, "old_val", r->in.old_val);
8169 ndr->depth--;
8170 ndr_print_ptr(ndr, "old_mtime", r->in.old_mtime);
8171 ndr->depth++;
8172 if (r->in.old_mtime) {
8173 ndr_print_NTTIME_hyper(ndr, "old_mtime", *r->in.old_mtime);
8175 ndr->depth--;
8176 ndr->depth--;
8178 if (flags & NDR_OUT) {
8179 ndr_print_struct(ndr, "out", "lsa_QuerySecret");
8180 ndr->depth++;
8181 ndr_print_ptr(ndr, "new_val", r->out.new_val);
8182 ndr->depth++;
8183 if (r->out.new_val) {
8184 ndr_print_lsa_DATA_BUF_PTR(ndr, "new_val", r->out.new_val);
8186 ndr->depth--;
8187 ndr_print_ptr(ndr, "new_mtime", r->out.new_mtime);
8188 ndr->depth++;
8189 if (r->out.new_mtime) {
8190 ndr_print_NTTIME_hyper(ndr, "new_mtime", *r->out.new_mtime);
8192 ndr->depth--;
8193 ndr_print_ptr(ndr, "old_val", r->out.old_val);
8194 ndr->depth++;
8195 if (r->out.old_val) {
8196 ndr_print_lsa_DATA_BUF_PTR(ndr, "old_val", r->out.old_val);
8198 ndr->depth--;
8199 ndr_print_ptr(ndr, "old_mtime", r->out.old_mtime);
8200 ndr->depth++;
8201 if (r->out.old_mtime) {
8202 ndr_print_NTTIME_hyper(ndr, "old_mtime", *r->out.old_mtime);
8204 ndr->depth--;
8205 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8206 ndr->depth--;
8208 ndr->depth--;
8211 static enum ndr_err_code ndr_push_lsa_LookupPrivValue(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivValue *r)
8213 if (flags & NDR_IN) {
8214 if (r->in.handle == NULL) {
8215 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8217 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8218 if (r->in.name == NULL) {
8219 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8221 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8223 if (flags & NDR_OUT) {
8224 if (r->out.luid == NULL) {
8225 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8227 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, r->out.luid));
8228 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8230 return NDR_ERR_SUCCESS;
8233 static enum ndr_err_code ndr_pull_lsa_LookupPrivValue(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivValue *r)
8235 TALLOC_CTX *_mem_save_handle_0;
8236 TALLOC_CTX *_mem_save_name_0;
8237 TALLOC_CTX *_mem_save_luid_0;
8238 if (flags & NDR_IN) {
8239 ZERO_STRUCT(r->out);
8241 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8242 NDR_PULL_ALLOC(ndr, r->in.handle);
8244 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8245 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8246 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8247 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8248 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8249 NDR_PULL_ALLOC(ndr, r->in.name);
8251 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8252 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
8253 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8254 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
8255 NDR_PULL_ALLOC(ndr, r->out.luid);
8256 ZERO_STRUCTP(r->out.luid);
8258 if (flags & NDR_OUT) {
8259 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8260 NDR_PULL_ALLOC(ndr, r->out.luid);
8262 _mem_save_luid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8263 NDR_PULL_SET_MEM_CTX(ndr, r->out.luid, LIBNDR_FLAG_REF_ALLOC);
8264 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, r->out.luid));
8265 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_luid_0, LIBNDR_FLAG_REF_ALLOC);
8266 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8268 return NDR_ERR_SUCCESS;
8271 _PUBLIC_ void ndr_print_lsa_LookupPrivValue(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivValue *r)
8273 ndr_print_struct(ndr, name, "lsa_LookupPrivValue");
8274 ndr->depth++;
8275 if (flags & NDR_SET_VALUES) {
8276 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8278 if (flags & NDR_IN) {
8279 ndr_print_struct(ndr, "in", "lsa_LookupPrivValue");
8280 ndr->depth++;
8281 ndr_print_ptr(ndr, "handle", r->in.handle);
8282 ndr->depth++;
8283 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8284 ndr->depth--;
8285 ndr_print_ptr(ndr, "name", r->in.name);
8286 ndr->depth++;
8287 ndr_print_lsa_String(ndr, "name", r->in.name);
8288 ndr->depth--;
8289 ndr->depth--;
8291 if (flags & NDR_OUT) {
8292 ndr_print_struct(ndr, "out", "lsa_LookupPrivValue");
8293 ndr->depth++;
8294 ndr_print_ptr(ndr, "luid", r->out.luid);
8295 ndr->depth++;
8296 ndr_print_lsa_LUID(ndr, "luid", r->out.luid);
8297 ndr->depth--;
8298 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8299 ndr->depth--;
8301 ndr->depth--;
8304 static enum ndr_err_code ndr_push_lsa_LookupPrivName(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivName *r)
8306 if (flags & NDR_IN) {
8307 if (r->in.handle == NULL) {
8308 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8310 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8311 if (r->in.luid == NULL) {
8312 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8314 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, r->in.luid));
8316 if (flags & NDR_OUT) {
8317 if (r->out.name == NULL) {
8318 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8320 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.name));
8321 if (*r->out.name) {
8322 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.name));
8324 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8326 return NDR_ERR_SUCCESS;
8329 static enum ndr_err_code ndr_pull_lsa_LookupPrivName(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivName *r)
8331 uint32_t _ptr_name;
8332 TALLOC_CTX *_mem_save_handle_0;
8333 TALLOC_CTX *_mem_save_luid_0;
8334 TALLOC_CTX *_mem_save_name_0;
8335 TALLOC_CTX *_mem_save_name_1;
8336 if (flags & NDR_IN) {
8337 ZERO_STRUCT(r->out);
8339 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8340 NDR_PULL_ALLOC(ndr, r->in.handle);
8342 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8343 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8344 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8345 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8346 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8347 NDR_PULL_ALLOC(ndr, r->in.luid);
8349 _mem_save_luid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8350 NDR_PULL_SET_MEM_CTX(ndr, r->in.luid, LIBNDR_FLAG_REF_ALLOC);
8351 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, r->in.luid));
8352 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_luid_0, LIBNDR_FLAG_REF_ALLOC);
8353 NDR_PULL_ALLOC(ndr, r->out.name);
8354 ZERO_STRUCTP(r->out.name);
8356 if (flags & NDR_OUT) {
8357 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8358 NDR_PULL_ALLOC(ndr, r->out.name);
8360 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8361 NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC);
8362 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
8363 if (_ptr_name) {
8364 NDR_PULL_ALLOC(ndr, *r->out.name);
8365 } else {
8366 *r->out.name = NULL;
8368 if (*r->out.name) {
8369 _mem_save_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
8370 NDR_PULL_SET_MEM_CTX(ndr, *r->out.name, 0);
8371 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.name));
8372 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_1, 0);
8374 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
8375 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8377 return NDR_ERR_SUCCESS;
8380 _PUBLIC_ void ndr_print_lsa_LookupPrivName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivName *r)
8382 ndr_print_struct(ndr, name, "lsa_LookupPrivName");
8383 ndr->depth++;
8384 if (flags & NDR_SET_VALUES) {
8385 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8387 if (flags & NDR_IN) {
8388 ndr_print_struct(ndr, "in", "lsa_LookupPrivName");
8389 ndr->depth++;
8390 ndr_print_ptr(ndr, "handle", r->in.handle);
8391 ndr->depth++;
8392 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8393 ndr->depth--;
8394 ndr_print_ptr(ndr, "luid", r->in.luid);
8395 ndr->depth++;
8396 ndr_print_lsa_LUID(ndr, "luid", r->in.luid);
8397 ndr->depth--;
8398 ndr->depth--;
8400 if (flags & NDR_OUT) {
8401 ndr_print_struct(ndr, "out", "lsa_LookupPrivName");
8402 ndr->depth++;
8403 ndr_print_ptr(ndr, "name", r->out.name);
8404 ndr->depth++;
8405 ndr_print_ptr(ndr, "name", *r->out.name);
8406 ndr->depth++;
8407 if (*r->out.name) {
8408 ndr_print_lsa_StringLarge(ndr, "name", *r->out.name);
8410 ndr->depth--;
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_LookupPrivDisplayName(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivDisplayName *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.name == NULL) {
8426 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8428 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8429 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.language_id));
8430 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.language_id_sys));
8432 if (flags & NDR_OUT) {
8433 if (r->out.disp_name == NULL) {
8434 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8436 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.disp_name));
8437 if (*r->out.disp_name) {
8438 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.disp_name));
8440 if (r->out.returned_language_id == NULL) {
8441 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8443 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.returned_language_id));
8444 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8446 return NDR_ERR_SUCCESS;
8449 static enum ndr_err_code ndr_pull_lsa_LookupPrivDisplayName(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivDisplayName *r)
8451 uint32_t _ptr_disp_name;
8452 TALLOC_CTX *_mem_save_handle_0;
8453 TALLOC_CTX *_mem_save_name_0;
8454 TALLOC_CTX *_mem_save_disp_name_0;
8455 TALLOC_CTX *_mem_save_disp_name_1;
8456 TALLOC_CTX *_mem_save_returned_language_id_0;
8457 if (flags & NDR_IN) {
8458 ZERO_STRUCT(r->out);
8460 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8461 NDR_PULL_ALLOC(ndr, r->in.handle);
8463 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8464 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8465 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8466 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8467 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8468 NDR_PULL_ALLOC(ndr, r->in.name);
8470 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8471 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
8472 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8473 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
8474 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.language_id));
8475 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.language_id_sys));
8476 NDR_PULL_ALLOC(ndr, r->out.disp_name);
8477 ZERO_STRUCTP(r->out.disp_name);
8478 NDR_PULL_ALLOC(ndr, r->out.returned_language_id);
8479 ZERO_STRUCTP(r->out.returned_language_id);
8481 if (flags & NDR_OUT) {
8482 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8483 NDR_PULL_ALLOC(ndr, r->out.disp_name);
8485 _mem_save_disp_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8486 NDR_PULL_SET_MEM_CTX(ndr, r->out.disp_name, LIBNDR_FLAG_REF_ALLOC);
8487 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_disp_name));
8488 if (_ptr_disp_name) {
8489 NDR_PULL_ALLOC(ndr, *r->out.disp_name);
8490 } else {
8491 *r->out.disp_name = NULL;
8493 if (*r->out.disp_name) {
8494 _mem_save_disp_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
8495 NDR_PULL_SET_MEM_CTX(ndr, *r->out.disp_name, 0);
8496 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.disp_name));
8497 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disp_name_1, 0);
8499 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disp_name_0, LIBNDR_FLAG_REF_ALLOC);
8500 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8501 NDR_PULL_ALLOC(ndr, r->out.returned_language_id);
8503 _mem_save_returned_language_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
8504 NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_language_id, LIBNDR_FLAG_REF_ALLOC);
8505 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.returned_language_id));
8506 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_language_id_0, LIBNDR_FLAG_REF_ALLOC);
8507 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8509 return NDR_ERR_SUCCESS;
8512 _PUBLIC_ void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivDisplayName *r)
8514 ndr_print_struct(ndr, name, "lsa_LookupPrivDisplayName");
8515 ndr->depth++;
8516 if (flags & NDR_SET_VALUES) {
8517 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8519 if (flags & NDR_IN) {
8520 ndr_print_struct(ndr, "in", "lsa_LookupPrivDisplayName");
8521 ndr->depth++;
8522 ndr_print_ptr(ndr, "handle", r->in.handle);
8523 ndr->depth++;
8524 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8525 ndr->depth--;
8526 ndr_print_ptr(ndr, "name", r->in.name);
8527 ndr->depth++;
8528 ndr_print_lsa_String(ndr, "name", r->in.name);
8529 ndr->depth--;
8530 ndr_print_uint16(ndr, "language_id", r->in.language_id);
8531 ndr_print_uint16(ndr, "language_id_sys", r->in.language_id_sys);
8532 ndr->depth--;
8534 if (flags & NDR_OUT) {
8535 ndr_print_struct(ndr, "out", "lsa_LookupPrivDisplayName");
8536 ndr->depth++;
8537 ndr_print_ptr(ndr, "disp_name", r->out.disp_name);
8538 ndr->depth++;
8539 ndr_print_ptr(ndr, "disp_name", *r->out.disp_name);
8540 ndr->depth++;
8541 if (*r->out.disp_name) {
8542 ndr_print_lsa_StringLarge(ndr, "disp_name", *r->out.disp_name);
8544 ndr->depth--;
8545 ndr->depth--;
8546 ndr_print_ptr(ndr, "returned_language_id", r->out.returned_language_id);
8547 ndr->depth++;
8548 ndr_print_uint16(ndr, "returned_language_id", *r->out.returned_language_id);
8549 ndr->depth--;
8550 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8551 ndr->depth--;
8553 ndr->depth--;
8556 static enum ndr_err_code ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int flags, const struct lsa_DeleteObject *r)
8558 if (flags & NDR_IN) {
8559 if (r->in.handle == NULL) {
8560 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8562 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8564 if (flags & NDR_OUT) {
8565 if (r->out.handle == NULL) {
8566 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8568 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
8569 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8571 return NDR_ERR_SUCCESS;
8574 static enum ndr_err_code ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int flags, struct lsa_DeleteObject *r)
8576 TALLOC_CTX *_mem_save_handle_0;
8577 if (flags & NDR_IN) {
8578 ZERO_STRUCT(r->out);
8580 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8581 NDR_PULL_ALLOC(ndr, r->in.handle);
8583 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8584 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8585 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8586 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8587 NDR_PULL_ALLOC(ndr, r->out.handle);
8588 *r->out.handle = *r->in.handle;
8590 if (flags & NDR_OUT) {
8591 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8592 NDR_PULL_ALLOC(ndr, r->out.handle);
8594 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8595 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
8596 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
8597 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8598 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8600 return NDR_ERR_SUCCESS;
8603 _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteObject *r)
8605 ndr_print_struct(ndr, name, "lsa_DeleteObject");
8606 ndr->depth++;
8607 if (flags & NDR_SET_VALUES) {
8608 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8610 if (flags & NDR_IN) {
8611 ndr_print_struct(ndr, "in", "lsa_DeleteObject");
8612 ndr->depth++;
8613 ndr_print_ptr(ndr, "handle", r->in.handle);
8614 ndr->depth++;
8615 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8616 ndr->depth--;
8617 ndr->depth--;
8619 if (flags & NDR_OUT) {
8620 ndr_print_struct(ndr, "out", "lsa_DeleteObject");
8621 ndr->depth++;
8622 ndr_print_ptr(ndr, "handle", r->out.handle);
8623 ndr->depth++;
8624 ndr_print_policy_handle(ndr, "handle", r->out.handle);
8625 ndr->depth--;
8626 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8627 ndr->depth--;
8629 ndr->depth--;
8632 static enum ndr_err_code ndr_push_lsa_EnumAccountsWithUserRight(struct ndr_push *ndr, int flags, const struct lsa_EnumAccountsWithUserRight *r)
8634 if (flags & NDR_IN) {
8635 if (r->in.handle == NULL) {
8636 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8638 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8639 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.name));
8640 if (r->in.name) {
8641 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8644 if (flags & NDR_OUT) {
8645 if (r->out.sids == NULL) {
8646 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8648 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
8649 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8651 return NDR_ERR_SUCCESS;
8654 static enum ndr_err_code ndr_pull_lsa_EnumAccountsWithUserRight(struct ndr_pull *ndr, int flags, struct lsa_EnumAccountsWithUserRight *r)
8656 uint32_t _ptr_name;
8657 TALLOC_CTX *_mem_save_handle_0;
8658 TALLOC_CTX *_mem_save_name_0;
8659 TALLOC_CTX *_mem_save_sids_0;
8660 if (flags & NDR_IN) {
8661 ZERO_STRUCT(r->out);
8663 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8664 NDR_PULL_ALLOC(ndr, r->in.handle);
8666 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8667 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8668 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8669 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8670 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
8671 if (_ptr_name) {
8672 NDR_PULL_ALLOC(ndr, r->in.name);
8673 } else {
8674 r->in.name = NULL;
8676 if (r->in.name) {
8677 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8678 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, 0);
8679 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8680 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
8682 NDR_PULL_ALLOC(ndr, r->out.sids);
8683 ZERO_STRUCTP(r->out.sids);
8685 if (flags & NDR_OUT) {
8686 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8687 NDR_PULL_ALLOC(ndr, r->out.sids);
8689 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
8690 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
8691 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
8692 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
8693 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8695 return NDR_ERR_SUCCESS;
8698 _PUBLIC_ void ndr_print_lsa_EnumAccountsWithUserRight(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountsWithUserRight *r)
8700 ndr_print_struct(ndr, name, "lsa_EnumAccountsWithUserRight");
8701 ndr->depth++;
8702 if (flags & NDR_SET_VALUES) {
8703 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8705 if (flags & NDR_IN) {
8706 ndr_print_struct(ndr, "in", "lsa_EnumAccountsWithUserRight");
8707 ndr->depth++;
8708 ndr_print_ptr(ndr, "handle", r->in.handle);
8709 ndr->depth++;
8710 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8711 ndr->depth--;
8712 ndr_print_ptr(ndr, "name", r->in.name);
8713 ndr->depth++;
8714 if (r->in.name) {
8715 ndr_print_lsa_String(ndr, "name", r->in.name);
8717 ndr->depth--;
8718 ndr->depth--;
8720 if (flags & NDR_OUT) {
8721 ndr_print_struct(ndr, "out", "lsa_EnumAccountsWithUserRight");
8722 ndr->depth++;
8723 ndr_print_ptr(ndr, "sids", r->out.sids);
8724 ndr->depth++;
8725 ndr_print_lsa_SidArray(ndr, "sids", r->out.sids);
8726 ndr->depth--;
8727 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8728 ndr->depth--;
8730 ndr->depth--;
8733 static enum ndr_err_code ndr_push_lsa_EnumAccountRights(struct ndr_push *ndr, int flags, const struct lsa_EnumAccountRights *r)
8735 if (flags & NDR_IN) {
8736 if (r->in.handle == NULL) {
8737 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8739 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8740 if (r->in.sid == NULL) {
8741 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8743 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8745 if (flags & NDR_OUT) {
8746 if (r->out.rights == NULL) {
8747 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8749 NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rights));
8750 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8752 return NDR_ERR_SUCCESS;
8755 static enum ndr_err_code ndr_pull_lsa_EnumAccountRights(struct ndr_pull *ndr, int flags, struct lsa_EnumAccountRights *r)
8757 TALLOC_CTX *_mem_save_handle_0;
8758 TALLOC_CTX *_mem_save_sid_0;
8759 TALLOC_CTX *_mem_save_rights_0;
8760 if (flags & NDR_IN) {
8761 ZERO_STRUCT(r->out);
8763 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8764 NDR_PULL_ALLOC(ndr, r->in.handle);
8766 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8767 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8768 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8769 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8770 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8771 NDR_PULL_ALLOC(ndr, r->in.sid);
8773 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8774 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8775 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8776 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8777 NDR_PULL_ALLOC(ndr, r->out.rights);
8778 ZERO_STRUCTP(r->out.rights);
8780 if (flags & NDR_OUT) {
8781 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8782 NDR_PULL_ALLOC(ndr, r->out.rights);
8784 _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
8785 NDR_PULL_SET_MEM_CTX(ndr, r->out.rights, LIBNDR_FLAG_REF_ALLOC);
8786 NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rights));
8787 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_0, LIBNDR_FLAG_REF_ALLOC);
8788 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8790 return NDR_ERR_SUCCESS;
8793 _PUBLIC_ void ndr_print_lsa_EnumAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountRights *r)
8795 ndr_print_struct(ndr, name, "lsa_EnumAccountRights");
8796 ndr->depth++;
8797 if (flags & NDR_SET_VALUES) {
8798 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8800 if (flags & NDR_IN) {
8801 ndr_print_struct(ndr, "in", "lsa_EnumAccountRights");
8802 ndr->depth++;
8803 ndr_print_ptr(ndr, "handle", r->in.handle);
8804 ndr->depth++;
8805 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8806 ndr->depth--;
8807 ndr_print_ptr(ndr, "sid", r->in.sid);
8808 ndr->depth++;
8809 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
8810 ndr->depth--;
8811 ndr->depth--;
8813 if (flags & NDR_OUT) {
8814 ndr_print_struct(ndr, "out", "lsa_EnumAccountRights");
8815 ndr->depth++;
8816 ndr_print_ptr(ndr, "rights", r->out.rights);
8817 ndr->depth++;
8818 ndr_print_lsa_RightSet(ndr, "rights", r->out.rights);
8819 ndr->depth--;
8820 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8821 ndr->depth--;
8823 ndr->depth--;
8826 static enum ndr_err_code ndr_push_lsa_AddAccountRights(struct ndr_push *ndr, int flags, const struct lsa_AddAccountRights *r)
8828 if (flags & NDR_IN) {
8829 if (r->in.handle == NULL) {
8830 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8832 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8833 if (r->in.sid == NULL) {
8834 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8836 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8837 if (r->in.rights == NULL) {
8838 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8840 NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
8842 if (flags & NDR_OUT) {
8843 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8845 return NDR_ERR_SUCCESS;
8848 static enum ndr_err_code ndr_pull_lsa_AddAccountRights(struct ndr_pull *ndr, int flags, struct lsa_AddAccountRights *r)
8850 TALLOC_CTX *_mem_save_handle_0;
8851 TALLOC_CTX *_mem_save_sid_0;
8852 TALLOC_CTX *_mem_save_rights_0;
8853 if (flags & NDR_IN) {
8854 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8855 NDR_PULL_ALLOC(ndr, r->in.handle);
8857 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8858 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8859 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8860 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8861 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8862 NDR_PULL_ALLOC(ndr, r->in.sid);
8864 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8865 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8866 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8867 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8868 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8869 NDR_PULL_ALLOC(ndr, r->in.rights);
8871 _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
8872 NDR_PULL_SET_MEM_CTX(ndr, r->in.rights, LIBNDR_FLAG_REF_ALLOC);
8873 NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
8874 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_0, LIBNDR_FLAG_REF_ALLOC);
8876 if (flags & NDR_OUT) {
8877 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8879 return NDR_ERR_SUCCESS;
8882 _PUBLIC_ void ndr_print_lsa_AddAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddAccountRights *r)
8884 ndr_print_struct(ndr, name, "lsa_AddAccountRights");
8885 ndr->depth++;
8886 if (flags & NDR_SET_VALUES) {
8887 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8889 if (flags & NDR_IN) {
8890 ndr_print_struct(ndr, "in", "lsa_AddAccountRights");
8891 ndr->depth++;
8892 ndr_print_ptr(ndr, "handle", r->in.handle);
8893 ndr->depth++;
8894 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8895 ndr->depth--;
8896 ndr_print_ptr(ndr, "sid", r->in.sid);
8897 ndr->depth++;
8898 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
8899 ndr->depth--;
8900 ndr_print_ptr(ndr, "rights", r->in.rights);
8901 ndr->depth++;
8902 ndr_print_lsa_RightSet(ndr, "rights", r->in.rights);
8903 ndr->depth--;
8904 ndr->depth--;
8906 if (flags & NDR_OUT) {
8907 ndr_print_struct(ndr, "out", "lsa_AddAccountRights");
8908 ndr->depth++;
8909 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8910 ndr->depth--;
8912 ndr->depth--;
8915 static enum ndr_err_code ndr_push_lsa_RemoveAccountRights(struct ndr_push *ndr, int flags, const struct lsa_RemoveAccountRights *r)
8917 if (flags & NDR_IN) {
8918 if (r->in.handle == NULL) {
8919 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8921 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8922 if (r->in.sid == NULL) {
8923 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8925 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8926 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.remove_all));
8927 if (r->in.rights == NULL) {
8928 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8930 NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
8932 if (flags & NDR_OUT) {
8933 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8935 return NDR_ERR_SUCCESS;
8938 static enum ndr_err_code ndr_pull_lsa_RemoveAccountRights(struct ndr_pull *ndr, int flags, struct lsa_RemoveAccountRights *r)
8940 TALLOC_CTX *_mem_save_handle_0;
8941 TALLOC_CTX *_mem_save_sid_0;
8942 TALLOC_CTX *_mem_save_rights_0;
8943 if (flags & NDR_IN) {
8944 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8945 NDR_PULL_ALLOC(ndr, r->in.handle);
8947 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8948 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8949 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8950 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8951 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8952 NDR_PULL_ALLOC(ndr, r->in.sid);
8954 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8955 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8956 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8957 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8958 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.remove_all));
8959 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8960 NDR_PULL_ALLOC(ndr, r->in.rights);
8962 _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
8963 NDR_PULL_SET_MEM_CTX(ndr, r->in.rights, LIBNDR_FLAG_REF_ALLOC);
8964 NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
8965 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_0, LIBNDR_FLAG_REF_ALLOC);
8967 if (flags & NDR_OUT) {
8968 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8970 return NDR_ERR_SUCCESS;
8973 _PUBLIC_ void ndr_print_lsa_RemoveAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemoveAccountRights *r)
8975 ndr_print_struct(ndr, name, "lsa_RemoveAccountRights");
8976 ndr->depth++;
8977 if (flags & NDR_SET_VALUES) {
8978 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8980 if (flags & NDR_IN) {
8981 ndr_print_struct(ndr, "in", "lsa_RemoveAccountRights");
8982 ndr->depth++;
8983 ndr_print_ptr(ndr, "handle", r->in.handle);
8984 ndr->depth++;
8985 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8986 ndr->depth--;
8987 ndr_print_ptr(ndr, "sid", r->in.sid);
8988 ndr->depth++;
8989 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
8990 ndr->depth--;
8991 ndr_print_uint8(ndr, "remove_all", r->in.remove_all);
8992 ndr_print_ptr(ndr, "rights", r->in.rights);
8993 ndr->depth++;
8994 ndr_print_lsa_RightSet(ndr, "rights", r->in.rights);
8995 ndr->depth--;
8996 ndr->depth--;
8998 if (flags & NDR_OUT) {
8999 ndr_print_struct(ndr, "out", "lsa_RemoveAccountRights");
9000 ndr->depth++;
9001 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9002 ndr->depth--;
9004 ndr->depth--;
9007 static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfoBySid(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r)
9009 if (flags & NDR_IN) {
9010 if (r->in.handle == NULL) {
9011 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9013 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9014 if (r->in.dom_sid == NULL) {
9015 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9017 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9018 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
9020 if (flags & NDR_OUT) {
9021 if (r->out.info == NULL) {
9022 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9024 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
9025 if (*r->out.info) {
9026 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
9027 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9029 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9031 return NDR_ERR_SUCCESS;
9034 static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfoBySid(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoBySid *r)
9036 uint32_t _ptr_info;
9037 TALLOC_CTX *_mem_save_handle_0;
9038 TALLOC_CTX *_mem_save_dom_sid_0;
9039 TALLOC_CTX *_mem_save_info_0;
9040 TALLOC_CTX *_mem_save_info_1;
9041 if (flags & NDR_IN) {
9042 ZERO_STRUCT(r->out);
9044 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9045 NDR_PULL_ALLOC(ndr, r->in.handle);
9047 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9048 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9049 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9050 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9051 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9052 NDR_PULL_ALLOC(ndr, r->in.dom_sid);
9054 _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9055 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
9056 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9057 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC);
9058 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
9059 NDR_PULL_ALLOC(ndr, r->out.info);
9060 ZERO_STRUCTP(r->out.info);
9062 if (flags & NDR_OUT) {
9063 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9064 NDR_PULL_ALLOC(ndr, r->out.info);
9066 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9067 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9068 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
9069 if (_ptr_info) {
9070 NDR_PULL_ALLOC(ndr, *r->out.info);
9071 } else {
9072 *r->out.info = NULL;
9074 if (*r->out.info) {
9075 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
9076 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
9077 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
9078 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9079 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
9081 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9082 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9084 return NDR_ERR_SUCCESS;
9087 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r)
9089 ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfoBySid");
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_QueryTrustedDomainInfoBySid");
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, "dom_sid", r->in.dom_sid);
9102 ndr->depth++;
9103 ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
9104 ndr->depth--;
9105 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
9106 ndr->depth--;
9108 if (flags & NDR_OUT) {
9109 ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfoBySid");
9110 ndr->depth++;
9111 ndr_print_ptr(ndr, "info", r->out.info);
9112 ndr->depth++;
9113 ndr_print_ptr(ndr, "info", *r->out.info);
9114 ndr->depth++;
9115 if (*r->out.info) {
9116 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
9117 ndr_print_lsa_TrustedDomainInfo(ndr, "info", *r->out.info);
9119 ndr->depth--;
9120 ndr->depth--;
9121 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9122 ndr->depth--;
9124 ndr->depth--;
9127 static enum ndr_err_code ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfo *r)
9129 if (flags & NDR_IN) {
9130 if (r->in.handle == NULL) {
9131 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9133 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9134 if (r->in.dom_sid == NULL) {
9135 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9137 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9138 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
9139 if (r->in.info == NULL) {
9140 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9142 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
9143 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9145 if (flags & NDR_OUT) {
9146 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9148 return NDR_ERR_SUCCESS;
9151 static enum ndr_err_code ndr_pull_lsa_SetTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfo *r)
9153 TALLOC_CTX *_mem_save_handle_0;
9154 TALLOC_CTX *_mem_save_dom_sid_0;
9155 TALLOC_CTX *_mem_save_info_0;
9156 if (flags & NDR_IN) {
9157 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9158 NDR_PULL_ALLOC(ndr, r->in.handle);
9160 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9161 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9162 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9163 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9164 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9165 NDR_PULL_ALLOC(ndr, r->in.dom_sid);
9167 _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9168 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
9169 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9170 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC);
9171 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
9172 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9173 NDR_PULL_ALLOC(ndr, r->in.info);
9175 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9176 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
9177 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
9178 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9179 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9181 if (flags & NDR_OUT) {
9182 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9184 return NDR_ERR_SUCCESS;
9187 _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfo *r)
9189 ndr_print_struct(ndr, name, "lsa_SetTrustedDomainInfo");
9190 ndr->depth++;
9191 if (flags & NDR_SET_VALUES) {
9192 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9194 if (flags & NDR_IN) {
9195 ndr_print_struct(ndr, "in", "lsa_SetTrustedDomainInfo");
9196 ndr->depth++;
9197 ndr_print_ptr(ndr, "handle", r->in.handle);
9198 ndr->depth++;
9199 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9200 ndr->depth--;
9201 ndr_print_ptr(ndr, "dom_sid", r->in.dom_sid);
9202 ndr->depth++;
9203 ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
9204 ndr->depth--;
9205 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
9206 ndr_print_ptr(ndr, "info", r->in.info);
9207 ndr->depth++;
9208 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
9209 ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
9210 ndr->depth--;
9211 ndr->depth--;
9213 if (flags & NDR_OUT) {
9214 ndr_print_struct(ndr, "out", "lsa_SetTrustedDomainInfo");
9215 ndr->depth++;
9216 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9217 ndr->depth--;
9219 ndr->depth--;
9222 static enum ndr_err_code ndr_push_lsa_DeleteTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_DeleteTrustedDomain *r)
9224 if (flags & NDR_IN) {
9225 if (r->in.handle == NULL) {
9226 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9228 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9229 if (r->in.dom_sid == NULL) {
9230 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9232 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9234 if (flags & NDR_OUT) {
9235 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9237 return NDR_ERR_SUCCESS;
9240 static enum ndr_err_code ndr_pull_lsa_DeleteTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_DeleteTrustedDomain *r)
9242 TALLOC_CTX *_mem_save_handle_0;
9243 TALLOC_CTX *_mem_save_dom_sid_0;
9244 if (flags & NDR_IN) {
9245 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9246 NDR_PULL_ALLOC(ndr, r->in.handle);
9248 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9249 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9250 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9251 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9252 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9253 NDR_PULL_ALLOC(ndr, r->in.dom_sid);
9255 _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9256 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
9257 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9258 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC);
9260 if (flags & NDR_OUT) {
9261 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9263 return NDR_ERR_SUCCESS;
9266 _PUBLIC_ void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteTrustedDomain *r)
9268 ndr_print_struct(ndr, name, "lsa_DeleteTrustedDomain");
9269 ndr->depth++;
9270 if (flags & NDR_SET_VALUES) {
9271 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9273 if (flags & NDR_IN) {
9274 ndr_print_struct(ndr, "in", "lsa_DeleteTrustedDomain");
9275 ndr->depth++;
9276 ndr_print_ptr(ndr, "handle", r->in.handle);
9277 ndr->depth++;
9278 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9279 ndr->depth--;
9280 ndr_print_ptr(ndr, "dom_sid", r->in.dom_sid);
9281 ndr->depth++;
9282 ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
9283 ndr->depth--;
9284 ndr->depth--;
9286 if (flags & NDR_OUT) {
9287 ndr_print_struct(ndr, "out", "lsa_DeleteTrustedDomain");
9288 ndr->depth++;
9289 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9290 ndr->depth--;
9292 ndr->depth--;
9295 static enum ndr_err_code ndr_push_lsa_StorePrivateData(struct ndr_push *ndr, int flags, const struct lsa_StorePrivateData *r)
9297 if (flags & NDR_IN) {
9299 if (flags & NDR_OUT) {
9300 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9302 return NDR_ERR_SUCCESS;
9305 static enum ndr_err_code ndr_pull_lsa_StorePrivateData(struct ndr_pull *ndr, int flags, struct lsa_StorePrivateData *r)
9307 if (flags & NDR_IN) {
9309 if (flags & NDR_OUT) {
9310 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9312 return NDR_ERR_SUCCESS;
9315 _PUBLIC_ void ndr_print_lsa_StorePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_StorePrivateData *r)
9317 ndr_print_struct(ndr, name, "lsa_StorePrivateData");
9318 ndr->depth++;
9319 if (flags & NDR_SET_VALUES) {
9320 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9322 if (flags & NDR_IN) {
9323 ndr_print_struct(ndr, "in", "lsa_StorePrivateData");
9324 ndr->depth++;
9325 ndr->depth--;
9327 if (flags & NDR_OUT) {
9328 ndr_print_struct(ndr, "out", "lsa_StorePrivateData");
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_RetrievePrivateData(struct ndr_push *ndr, int flags, const struct lsa_RetrievePrivateData *r)
9338 if (flags & NDR_IN) {
9340 if (flags & NDR_OUT) {
9341 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9343 return NDR_ERR_SUCCESS;
9346 static enum ndr_err_code ndr_pull_lsa_RetrievePrivateData(struct ndr_pull *ndr, int flags, struct lsa_RetrievePrivateData *r)
9348 if (flags & NDR_IN) {
9350 if (flags & NDR_OUT) {
9351 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9353 return NDR_ERR_SUCCESS;
9356 _PUBLIC_ void ndr_print_lsa_RetrievePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RetrievePrivateData *r)
9358 ndr_print_struct(ndr, name, "lsa_RetrievePrivateData");
9359 ndr->depth++;
9360 if (flags & NDR_SET_VALUES) {
9361 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9363 if (flags & NDR_IN) {
9364 ndr_print_struct(ndr, "in", "lsa_RetrievePrivateData");
9365 ndr->depth++;
9366 ndr->depth--;
9368 if (flags & NDR_OUT) {
9369 ndr_print_struct(ndr, "out", "lsa_RetrievePrivateData");
9370 ndr->depth++;
9371 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9372 ndr->depth--;
9374 ndr->depth--;
9377 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy2 *r)
9379 if (flags & NDR_IN) {
9380 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
9381 if (r->in.system_name) {
9382 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9384 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9385 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));
9387 if (r->in.attr == NULL) {
9388 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9390 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
9391 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
9393 if (flags & NDR_OUT) {
9394 if (r->out.handle == NULL) {
9395 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9397 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
9398 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9400 return NDR_ERR_SUCCESS;
9403 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy2 *r)
9405 uint32_t _ptr_system_name;
9406 uint32_t size_system_name_1 = 0;
9407 uint32_t length_system_name_1 = 0;
9408 TALLOC_CTX *_mem_save_system_name_0;
9409 TALLOC_CTX *_mem_save_attr_0;
9410 TALLOC_CTX *_mem_save_handle_0;
9411 if (flags & NDR_IN) {
9412 ZERO_STRUCT(r->out);
9414 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
9415 if (_ptr_system_name) {
9416 NDR_PULL_ALLOC(ndr, r->in.system_name);
9417 } else {
9418 r->in.system_name = NULL;
9420 if (r->in.system_name) {
9421 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9422 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
9423 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
9424 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
9425 size_system_name_1 = ndr_get_array_size(ndr, &r->in.system_name);
9426 length_system_name_1 = ndr_get_array_length(ndr, &r->in.system_name);
9427 if (length_system_name_1 > size_system_name_1) {
9428 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_system_name_1, length_system_name_1);
9430 NDR_CHECK(ndr_check_string_terminator(ndr, length_system_name_1, sizeof(uint16_t)));
9431 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, length_system_name_1, sizeof(uint16_t), CH_UTF16));
9432 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
9434 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9435 NDR_PULL_ALLOC(ndr, r->in.attr);
9437 _mem_save_attr_0 = NDR_PULL_GET_MEM_CTX(ndr);
9438 NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC);
9439 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
9440 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC);
9441 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
9442 NDR_PULL_ALLOC(ndr, r->out.handle);
9443 ZERO_STRUCTP(r->out.handle);
9445 if (flags & NDR_OUT) {
9446 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9447 NDR_PULL_ALLOC(ndr, r->out.handle);
9449 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9450 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
9451 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
9452 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9453 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9455 return NDR_ERR_SUCCESS;
9458 _PUBLIC_ void ndr_print_lsa_OpenPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy2 *r)
9460 ndr_print_struct(ndr, name, "lsa_OpenPolicy2");
9461 ndr->depth++;
9462 if (flags & NDR_SET_VALUES) {
9463 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9465 if (flags & NDR_IN) {
9466 ndr_print_struct(ndr, "in", "lsa_OpenPolicy2");
9467 ndr->depth++;
9468 ndr_print_ptr(ndr, "system_name", r->in.system_name);
9469 ndr->depth++;
9470 if (r->in.system_name) {
9471 ndr_print_string(ndr, "system_name", r->in.system_name);
9473 ndr->depth--;
9474 ndr_print_ptr(ndr, "attr", r->in.attr);
9475 ndr->depth++;
9476 ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr);
9477 ndr->depth--;
9478 ndr_print_lsa_PolicyAccessMask(ndr, "access_mask", r->in.access_mask);
9479 ndr->depth--;
9481 if (flags & NDR_OUT) {
9482 ndr_print_struct(ndr, "out", "lsa_OpenPolicy2");
9483 ndr->depth++;
9484 ndr_print_ptr(ndr, "handle", r->out.handle);
9485 ndr->depth++;
9486 ndr_print_policy_handle(ndr, "handle", r->out.handle);
9487 ndr->depth--;
9488 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9489 ndr->depth--;
9491 ndr->depth--;
9494 static enum ndr_err_code ndr_push_lsa_GetUserName(struct ndr_push *ndr, int flags, const struct lsa_GetUserName *r)
9496 if (flags & NDR_IN) {
9497 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
9498 if (r->in.system_name) {
9499 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9500 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9502 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));
9504 if (r->in.account_name == NULL) {
9505 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9507 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.account_name));
9508 if (*r->in.account_name) {
9509 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.account_name));
9511 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.authority_name));
9512 if (r->in.authority_name) {
9513 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.authority_name));
9514 if (*r->in.authority_name) {
9515 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.authority_name));
9519 if (flags & NDR_OUT) {
9520 if (r->out.account_name == NULL) {
9521 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9523 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.account_name));
9524 if (*r->out.account_name) {
9525 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.account_name));
9527 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.authority_name));
9528 if (r->out.authority_name) {
9529 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.authority_name));
9530 if (*r->out.authority_name) {
9531 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.authority_name));
9534 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9536 return NDR_ERR_SUCCESS;
9539 static enum ndr_err_code ndr_pull_lsa_GetUserName(struct ndr_pull *ndr, int flags, struct lsa_GetUserName *r)
9541 uint32_t _ptr_system_name;
9542 uint32_t size_system_name_1 = 0;
9543 uint32_t length_system_name_1 = 0;
9544 uint32_t _ptr_account_name;
9545 uint32_t _ptr_authority_name;
9546 TALLOC_CTX *_mem_save_system_name_0;
9547 TALLOC_CTX *_mem_save_account_name_0;
9548 TALLOC_CTX *_mem_save_account_name_1;
9549 TALLOC_CTX *_mem_save_authority_name_0;
9550 TALLOC_CTX *_mem_save_authority_name_1;
9551 if (flags & NDR_IN) {
9552 ZERO_STRUCT(r->out);
9554 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
9555 if (_ptr_system_name) {
9556 NDR_PULL_ALLOC(ndr, r->in.system_name);
9557 } else {
9558 r->in.system_name = NULL;
9560 if (r->in.system_name) {
9561 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9562 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
9563 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
9564 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
9565 size_system_name_1 = ndr_get_array_size(ndr, &r->in.system_name);
9566 length_system_name_1 = ndr_get_array_length(ndr, &r->in.system_name);
9567 if (length_system_name_1 > size_system_name_1) {
9568 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_system_name_1, length_system_name_1);
9570 NDR_CHECK(ndr_check_string_terminator(ndr, length_system_name_1, sizeof(uint16_t)));
9571 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, length_system_name_1, sizeof(uint16_t), CH_UTF16));
9572 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
9574 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9575 NDR_PULL_ALLOC(ndr, r->in.account_name);
9577 _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9578 NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, LIBNDR_FLAG_REF_ALLOC);
9579 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
9580 if (_ptr_account_name) {
9581 NDR_PULL_ALLOC(ndr, *r->in.account_name);
9582 } else {
9583 *r->in.account_name = NULL;
9585 if (*r->in.account_name) {
9586 _mem_save_account_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9587 NDR_PULL_SET_MEM_CTX(ndr, *r->in.account_name, 0);
9588 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.account_name));
9589 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_1, 0);
9591 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC);
9592 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9593 if (_ptr_authority_name) {
9594 NDR_PULL_ALLOC(ndr, r->in.authority_name);
9595 } else {
9596 r->in.authority_name = NULL;
9598 if (r->in.authority_name) {
9599 _mem_save_authority_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9600 NDR_PULL_SET_MEM_CTX(ndr, r->in.authority_name, 0);
9601 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9602 if (_ptr_authority_name) {
9603 NDR_PULL_ALLOC(ndr, *r->in.authority_name);
9604 } else {
9605 *r->in.authority_name = NULL;
9607 if (*r->in.authority_name) {
9608 _mem_save_authority_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9609 NDR_PULL_SET_MEM_CTX(ndr, *r->in.authority_name, 0);
9610 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.authority_name));
9611 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_1, 0);
9613 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_0, 0);
9615 NDR_PULL_ALLOC(ndr, r->out.account_name);
9616 *r->out.account_name = *r->in.account_name;
9618 if (flags & NDR_OUT) {
9619 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9620 NDR_PULL_ALLOC(ndr, r->out.account_name);
9622 _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9623 NDR_PULL_SET_MEM_CTX(ndr, r->out.account_name, LIBNDR_FLAG_REF_ALLOC);
9624 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
9625 if (_ptr_account_name) {
9626 NDR_PULL_ALLOC(ndr, *r->out.account_name);
9627 } else {
9628 *r->out.account_name = NULL;
9630 if (*r->out.account_name) {
9631 _mem_save_account_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9632 NDR_PULL_SET_MEM_CTX(ndr, *r->out.account_name, 0);
9633 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.account_name));
9634 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_1, 0);
9636 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC);
9637 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9638 if (_ptr_authority_name) {
9639 NDR_PULL_ALLOC(ndr, r->out.authority_name);
9640 } else {
9641 r->out.authority_name = NULL;
9643 if (r->out.authority_name) {
9644 _mem_save_authority_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9645 NDR_PULL_SET_MEM_CTX(ndr, r->out.authority_name, 0);
9646 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9647 if (_ptr_authority_name) {
9648 NDR_PULL_ALLOC(ndr, *r->out.authority_name);
9649 } else {
9650 *r->out.authority_name = NULL;
9652 if (*r->out.authority_name) {
9653 _mem_save_authority_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9654 NDR_PULL_SET_MEM_CTX(ndr, *r->out.authority_name, 0);
9655 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.authority_name));
9656 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_1, 0);
9658 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_0, 0);
9660 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9662 return NDR_ERR_SUCCESS;
9665 _PUBLIC_ void ndr_print_lsa_GetUserName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetUserName *r)
9667 ndr_print_struct(ndr, name, "lsa_GetUserName");
9668 ndr->depth++;
9669 if (flags & NDR_SET_VALUES) {
9670 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9672 if (flags & NDR_IN) {
9673 ndr_print_struct(ndr, "in", "lsa_GetUserName");
9674 ndr->depth++;
9675 ndr_print_ptr(ndr, "system_name", r->in.system_name);
9676 ndr->depth++;
9677 if (r->in.system_name) {
9678 ndr_print_string(ndr, "system_name", r->in.system_name);
9680 ndr->depth--;
9681 ndr_print_ptr(ndr, "account_name", r->in.account_name);
9682 ndr->depth++;
9683 ndr_print_ptr(ndr, "account_name", *r->in.account_name);
9684 ndr->depth++;
9685 if (*r->in.account_name) {
9686 ndr_print_lsa_String(ndr, "account_name", *r->in.account_name);
9688 ndr->depth--;
9689 ndr->depth--;
9690 ndr_print_ptr(ndr, "authority_name", r->in.authority_name);
9691 ndr->depth++;
9692 if (r->in.authority_name) {
9693 ndr_print_ptr(ndr, "authority_name", *r->in.authority_name);
9694 ndr->depth++;
9695 if (*r->in.authority_name) {
9696 ndr_print_lsa_String(ndr, "authority_name", *r->in.authority_name);
9698 ndr->depth--;
9700 ndr->depth--;
9701 ndr->depth--;
9703 if (flags & NDR_OUT) {
9704 ndr_print_struct(ndr, "out", "lsa_GetUserName");
9705 ndr->depth++;
9706 ndr_print_ptr(ndr, "account_name", r->out.account_name);
9707 ndr->depth++;
9708 ndr_print_ptr(ndr, "account_name", *r->out.account_name);
9709 ndr->depth++;
9710 if (*r->out.account_name) {
9711 ndr_print_lsa_String(ndr, "account_name", *r->out.account_name);
9713 ndr->depth--;
9714 ndr->depth--;
9715 ndr_print_ptr(ndr, "authority_name", r->out.authority_name);
9716 ndr->depth++;
9717 if (r->out.authority_name) {
9718 ndr_print_ptr(ndr, "authority_name", *r->out.authority_name);
9719 ndr->depth++;
9720 if (*r->out.authority_name) {
9721 ndr_print_lsa_String(ndr, "authority_name", *r->out.authority_name);
9723 ndr->depth--;
9725 ndr->depth--;
9726 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9727 ndr->depth--;
9729 ndr->depth--;
9732 static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy2(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy2 *r)
9734 if (flags & NDR_IN) {
9735 if (r->in.handle == NULL) {
9736 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9738 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9739 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
9741 if (flags & NDR_OUT) {
9742 if (r->out.info == NULL) {
9743 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9745 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
9746 if (*r->out.info) {
9747 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
9748 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9750 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9752 return NDR_ERR_SUCCESS;
9755 static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy2 *r)
9757 uint32_t _ptr_info;
9758 TALLOC_CTX *_mem_save_handle_0;
9759 TALLOC_CTX *_mem_save_info_0;
9760 TALLOC_CTX *_mem_save_info_1;
9761 if (flags & NDR_IN) {
9762 ZERO_STRUCT(r->out);
9764 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9765 NDR_PULL_ALLOC(ndr, r->in.handle);
9767 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9768 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9769 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9770 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9771 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
9772 NDR_PULL_ALLOC(ndr, r->out.info);
9773 ZERO_STRUCTP(r->out.info);
9775 if (flags & NDR_OUT) {
9776 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9777 NDR_PULL_ALLOC(ndr, r->out.info);
9779 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9780 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9781 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
9782 if (_ptr_info) {
9783 NDR_PULL_ALLOC(ndr, *r->out.info);
9784 } else {
9785 *r->out.info = NULL;
9787 if (*r->out.info) {
9788 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
9789 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
9790 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
9791 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9792 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
9794 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9795 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9797 return NDR_ERR_SUCCESS;
9800 _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy2 *r)
9802 ndr_print_struct(ndr, name, "lsa_QueryInfoPolicy2");
9803 ndr->depth++;
9804 if (flags & NDR_SET_VALUES) {
9805 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9807 if (flags & NDR_IN) {
9808 ndr_print_struct(ndr, "in", "lsa_QueryInfoPolicy2");
9809 ndr->depth++;
9810 ndr_print_ptr(ndr, "handle", r->in.handle);
9811 ndr->depth++;
9812 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9813 ndr->depth--;
9814 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
9815 ndr->depth--;
9817 if (flags & NDR_OUT) {
9818 ndr_print_struct(ndr, "out", "lsa_QueryInfoPolicy2");
9819 ndr->depth++;
9820 ndr_print_ptr(ndr, "info", r->out.info);
9821 ndr->depth++;
9822 ndr_print_ptr(ndr, "info", *r->out.info);
9823 ndr->depth++;
9824 if (*r->out.info) {
9825 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
9826 ndr_print_lsa_PolicyInformation(ndr, "info", *r->out.info);
9828 ndr->depth--;
9829 ndr->depth--;
9830 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9831 ndr->depth--;
9833 ndr->depth--;
9836 static enum ndr_err_code ndr_push_lsa_SetInfoPolicy2(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy2 *r)
9838 if (flags & NDR_IN) {
9839 if (r->in.handle == NULL) {
9840 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9842 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9843 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
9844 if (r->in.info == NULL) {
9845 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9847 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
9848 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9850 if (flags & NDR_OUT) {
9851 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9853 return NDR_ERR_SUCCESS;
9856 static enum ndr_err_code ndr_pull_lsa_SetInfoPolicy2(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy2 *r)
9858 TALLOC_CTX *_mem_save_handle_0;
9859 TALLOC_CTX *_mem_save_info_0;
9860 if (flags & NDR_IN) {
9861 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9862 NDR_PULL_ALLOC(ndr, r->in.handle);
9864 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9865 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9866 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9867 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9868 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
9869 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9870 NDR_PULL_ALLOC(ndr, r->in.info);
9872 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9873 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
9874 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
9875 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9876 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9878 if (flags & NDR_OUT) {
9879 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9881 return NDR_ERR_SUCCESS;
9884 _PUBLIC_ void ndr_print_lsa_SetInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy2 *r)
9886 ndr_print_struct(ndr, name, "lsa_SetInfoPolicy2");
9887 ndr->depth++;
9888 if (flags & NDR_SET_VALUES) {
9889 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9891 if (flags & NDR_IN) {
9892 ndr_print_struct(ndr, "in", "lsa_SetInfoPolicy2");
9893 ndr->depth++;
9894 ndr_print_ptr(ndr, "handle", r->in.handle);
9895 ndr->depth++;
9896 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9897 ndr->depth--;
9898 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
9899 ndr_print_ptr(ndr, "info", r->in.info);
9900 ndr->depth++;
9901 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
9902 ndr_print_lsa_PolicyInformation(ndr, "info", r->in.info);
9903 ndr->depth--;
9904 ndr->depth--;
9906 if (flags & NDR_OUT) {
9907 ndr_print_struct(ndr, "out", "lsa_SetInfoPolicy2");
9908 ndr->depth++;
9909 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9910 ndr->depth--;
9912 ndr->depth--;
9915 static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfoByName *r)
9917 if (flags & NDR_IN) {
9918 if (r->in.handle == NULL) {
9919 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9921 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9922 if (r->in.trusted_domain == NULL) {
9923 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9925 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain));
9926 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
9928 if (flags & NDR_OUT) {
9929 if (r->out.info == NULL) {
9930 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9932 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
9933 if (*r->out.info) {
9934 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
9935 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9937 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9939 return NDR_ERR_SUCCESS;
9942 static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoByName *r)
9944 uint32_t _ptr_info;
9945 TALLOC_CTX *_mem_save_handle_0;
9946 TALLOC_CTX *_mem_save_trusted_domain_0;
9947 TALLOC_CTX *_mem_save_info_0;
9948 TALLOC_CTX *_mem_save_info_1;
9949 if (flags & NDR_IN) {
9950 ZERO_STRUCT(r->out);
9952 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9953 NDR_PULL_ALLOC(ndr, r->in.handle);
9955 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9956 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9957 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9958 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9959 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9960 NDR_PULL_ALLOC(ndr, r->in.trusted_domain);
9962 _mem_save_trusted_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
9963 NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain, LIBNDR_FLAG_REF_ALLOC);
9964 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain));
9965 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_0, LIBNDR_FLAG_REF_ALLOC);
9966 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
9967 NDR_PULL_ALLOC(ndr, r->out.info);
9968 ZERO_STRUCTP(r->out.info);
9970 if (flags & NDR_OUT) {
9971 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9972 NDR_PULL_ALLOC(ndr, r->out.info);
9974 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9975 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9976 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
9977 if (_ptr_info) {
9978 NDR_PULL_ALLOC(ndr, *r->out.info);
9979 } else {
9980 *r->out.info = NULL;
9982 if (*r->out.info) {
9983 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
9984 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
9985 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
9986 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9987 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
9989 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9990 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9992 return NDR_ERR_SUCCESS;
9995 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoByName *r)
9997 ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfoByName");
9998 ndr->depth++;
9999 if (flags & NDR_SET_VALUES) {
10000 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10002 if (flags & NDR_IN) {
10003 ndr_print_struct(ndr, "in", "lsa_QueryTrustedDomainInfoByName");
10004 ndr->depth++;
10005 ndr_print_ptr(ndr, "handle", r->in.handle);
10006 ndr->depth++;
10007 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10008 ndr->depth--;
10009 ndr_print_ptr(ndr, "trusted_domain", r->in.trusted_domain);
10010 ndr->depth++;
10011 ndr_print_lsa_String(ndr, "trusted_domain", r->in.trusted_domain);
10012 ndr->depth--;
10013 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
10014 ndr->depth--;
10016 if (flags & NDR_OUT) {
10017 ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfoByName");
10018 ndr->depth++;
10019 ndr_print_ptr(ndr, "info", r->out.info);
10020 ndr->depth++;
10021 ndr_print_ptr(ndr, "info", *r->out.info);
10022 ndr->depth++;
10023 if (*r->out.info) {
10024 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
10025 ndr_print_lsa_TrustedDomainInfo(ndr, "info", *r->out.info);
10027 ndr->depth--;
10028 ndr->depth--;
10029 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10030 ndr->depth--;
10032 ndr->depth--;
10035 static enum ndr_err_code ndr_push_lsa_SetTrustedDomainInfoByName(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfoByName *r)
10037 if (flags & NDR_IN) {
10038 if (r->in.handle == NULL) {
10039 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10041 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10042 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain));
10043 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
10044 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
10045 if (r->in.info) {
10046 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
10047 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10050 if (flags & NDR_OUT) {
10051 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10053 return NDR_ERR_SUCCESS;
10056 static enum ndr_err_code ndr_pull_lsa_SetTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfoByName *r)
10058 uint32_t _ptr_info;
10059 TALLOC_CTX *_mem_save_handle_0;
10060 TALLOC_CTX *_mem_save_info_0;
10061 if (flags & NDR_IN) {
10062 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10063 NDR_PULL_ALLOC(ndr, r->in.handle);
10065 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10066 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10067 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10068 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10069 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain));
10070 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
10071 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10072 if (_ptr_info) {
10073 NDR_PULL_ALLOC(ndr, r->in.info);
10074 } else {
10075 r->in.info = NULL;
10077 if (r->in.info) {
10078 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10079 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
10080 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
10081 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10082 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
10085 if (flags & NDR_OUT) {
10086 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10088 return NDR_ERR_SUCCESS;
10091 _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfoByName *r)
10093 ndr_print_struct(ndr, name, "lsa_SetTrustedDomainInfoByName");
10094 ndr->depth++;
10095 if (flags & NDR_SET_VALUES) {
10096 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10098 if (flags & NDR_IN) {
10099 ndr_print_struct(ndr, "in", "lsa_SetTrustedDomainInfoByName");
10100 ndr->depth++;
10101 ndr_print_ptr(ndr, "handle", r->in.handle);
10102 ndr->depth++;
10103 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10104 ndr->depth--;
10105 ndr_print_lsa_String(ndr, "trusted_domain", &r->in.trusted_domain);
10106 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
10107 ndr_print_ptr(ndr, "info", r->in.info);
10108 ndr->depth++;
10109 if (r->in.info) {
10110 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
10111 ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
10113 ndr->depth--;
10114 ndr->depth--;
10116 if (flags & NDR_OUT) {
10117 ndr_print_struct(ndr, "out", "lsa_SetTrustedDomainInfoByName");
10118 ndr->depth++;
10119 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10120 ndr->depth--;
10122 ndr->depth--;
10125 static enum ndr_err_code ndr_push_lsa_EnumTrustedDomainsEx(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustedDomainsEx *r)
10127 if (flags & NDR_IN) {
10128 if (r->in.handle == NULL) {
10129 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10131 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10132 if (r->in.resume_handle == NULL) {
10133 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10135 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
10136 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
10138 if (flags & NDR_OUT) {
10139 if (r->out.resume_handle == NULL) {
10140 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10142 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
10143 if (r->out.domains == NULL) {
10144 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10146 NDR_CHECK(ndr_push_lsa_DomainListEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
10147 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10149 return NDR_ERR_SUCCESS;
10152 static enum ndr_err_code ndr_pull_lsa_EnumTrustedDomainsEx(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustedDomainsEx *r)
10154 TALLOC_CTX *_mem_save_handle_0;
10155 TALLOC_CTX *_mem_save_resume_handle_0;
10156 TALLOC_CTX *_mem_save_domains_0;
10157 if (flags & NDR_IN) {
10158 ZERO_STRUCT(r->out);
10160 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10161 NDR_PULL_ALLOC(ndr, r->in.handle);
10163 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10164 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10165 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10166 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10167 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10168 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
10170 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10171 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
10172 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
10173 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
10174 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
10175 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
10176 *r->out.resume_handle = *r->in.resume_handle;
10177 NDR_PULL_ALLOC(ndr, r->out.domains);
10178 ZERO_STRUCTP(r->out.domains);
10180 if (flags & NDR_OUT) {
10181 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10182 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
10184 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10185 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
10186 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
10187 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
10188 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10189 NDR_PULL_ALLOC(ndr, r->out.domains);
10191 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
10192 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
10193 NDR_CHECK(ndr_pull_lsa_DomainListEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
10194 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
10195 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10197 return NDR_ERR_SUCCESS;
10200 _PUBLIC_ void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustedDomainsEx *r)
10202 ndr_print_struct(ndr, name, "lsa_EnumTrustedDomainsEx");
10203 ndr->depth++;
10204 if (flags & NDR_SET_VALUES) {
10205 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10207 if (flags & NDR_IN) {
10208 ndr_print_struct(ndr, "in", "lsa_EnumTrustedDomainsEx");
10209 ndr->depth++;
10210 ndr_print_ptr(ndr, "handle", r->in.handle);
10211 ndr->depth++;
10212 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10213 ndr->depth--;
10214 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
10215 ndr->depth++;
10216 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
10217 ndr->depth--;
10218 ndr_print_uint32(ndr, "max_size", r->in.max_size);
10219 ndr->depth--;
10221 if (flags & NDR_OUT) {
10222 ndr_print_struct(ndr, "out", "lsa_EnumTrustedDomainsEx");
10223 ndr->depth++;
10224 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
10225 ndr->depth++;
10226 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
10227 ndr->depth--;
10228 ndr_print_ptr(ndr, "domains", r->out.domains);
10229 ndr->depth++;
10230 ndr_print_lsa_DomainListEx(ndr, "domains", r->out.domains);
10231 ndr->depth--;
10232 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10233 ndr->depth--;
10235 ndr->depth--;
10238 static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx *r)
10240 if (flags & NDR_IN) {
10241 if (r->in.policy_handle == NULL) {
10242 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10244 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
10245 if (r->in.info == NULL) {
10246 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10248 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10249 if (r->in.auth_info == NULL) {
10250 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10252 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
10253 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
10255 if (flags & NDR_OUT) {
10256 if (r->out.trustdom_handle == NULL) {
10257 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10259 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10260 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10262 return NDR_ERR_SUCCESS;
10265 static enum ndr_err_code ndr_pull_lsa_CreateTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx *r)
10267 TALLOC_CTX *_mem_save_policy_handle_0;
10268 TALLOC_CTX *_mem_save_info_0;
10269 TALLOC_CTX *_mem_save_auth_info_0;
10270 TALLOC_CTX *_mem_save_trustdom_handle_0;
10271 if (flags & NDR_IN) {
10272 ZERO_STRUCT(r->out);
10274 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10275 NDR_PULL_ALLOC(ndr, r->in.policy_handle);
10277 _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10278 NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
10279 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
10280 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
10281 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10282 NDR_PULL_ALLOC(ndr, r->in.info);
10284 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10285 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
10286 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10287 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10288 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10289 NDR_PULL_ALLOC(ndr, r->in.auth_info);
10291 _mem_save_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10292 NDR_PULL_SET_MEM_CTX(ndr, r->in.auth_info, LIBNDR_FLAG_REF_ALLOC);
10293 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
10294 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_info_0, LIBNDR_FLAG_REF_ALLOC);
10295 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
10296 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10297 ZERO_STRUCTP(r->out.trustdom_handle);
10299 if (flags & NDR_OUT) {
10300 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10301 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10303 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10304 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
10305 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10306 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
10307 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10309 return NDR_ERR_SUCCESS;
10312 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx *r)
10314 ndr_print_struct(ndr, name, "lsa_CreateTrustedDomainEx");
10315 ndr->depth++;
10316 if (flags & NDR_SET_VALUES) {
10317 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10319 if (flags & NDR_IN) {
10320 ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomainEx");
10321 ndr->depth++;
10322 ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
10323 ndr->depth++;
10324 ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
10325 ndr->depth--;
10326 ndr_print_ptr(ndr, "info", r->in.info);
10327 ndr->depth++;
10328 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info", r->in.info);
10329 ndr->depth--;
10330 ndr_print_ptr(ndr, "auth_info", r->in.auth_info);
10331 ndr->depth++;
10332 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", r->in.auth_info);
10333 ndr->depth--;
10334 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
10335 ndr->depth--;
10337 if (flags & NDR_OUT) {
10338 ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomainEx");
10339 ndr->depth++;
10340 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
10341 ndr->depth++;
10342 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
10343 ndr->depth--;
10344 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10345 ndr->depth--;
10347 ndr->depth--;
10350 static enum ndr_err_code ndr_push_lsa_CloseTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CloseTrustedDomainEx *r)
10352 if (flags & NDR_IN) {
10353 if (r->in.handle == NULL) {
10354 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10356 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10358 if (flags & NDR_OUT) {
10359 if (r->out.handle == NULL) {
10360 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10362 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
10363 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10365 return NDR_ERR_SUCCESS;
10368 static enum ndr_err_code ndr_pull_lsa_CloseTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CloseTrustedDomainEx *r)
10370 TALLOC_CTX *_mem_save_handle_0;
10371 if (flags & NDR_IN) {
10372 ZERO_STRUCT(r->out);
10374 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10375 NDR_PULL_ALLOC(ndr, r->in.handle);
10377 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10378 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10379 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10380 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10381 NDR_PULL_ALLOC(ndr, r->out.handle);
10382 *r->out.handle = *r->in.handle;
10384 if (flags & NDR_OUT) {
10385 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10386 NDR_PULL_ALLOC(ndr, r->out.handle);
10388 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10389 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
10390 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
10391 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10392 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10394 return NDR_ERR_SUCCESS;
10397 _PUBLIC_ void ndr_print_lsa_CloseTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CloseTrustedDomainEx *r)
10399 ndr_print_struct(ndr, name, "lsa_CloseTrustedDomainEx");
10400 ndr->depth++;
10401 if (flags & NDR_SET_VALUES) {
10402 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10404 if (flags & NDR_IN) {
10405 ndr_print_struct(ndr, "in", "lsa_CloseTrustedDomainEx");
10406 ndr->depth++;
10407 ndr_print_ptr(ndr, "handle", r->in.handle);
10408 ndr->depth++;
10409 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10410 ndr->depth--;
10411 ndr->depth--;
10413 if (flags & NDR_OUT) {
10414 ndr_print_struct(ndr, "out", "lsa_CloseTrustedDomainEx");
10415 ndr->depth++;
10416 ndr_print_ptr(ndr, "handle", r->out.handle);
10417 ndr->depth++;
10418 ndr_print_policy_handle(ndr, "handle", r->out.handle);
10419 ndr->depth--;
10420 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10421 ndr->depth--;
10423 ndr->depth--;
10426 static enum ndr_err_code ndr_push_lsa_QueryDomainInformationPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryDomainInformationPolicy *r)
10428 if (flags & NDR_IN) {
10429 if (r->in.handle == NULL) {
10430 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10432 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10433 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10435 if (flags & NDR_OUT) {
10436 if (r->out.info == NULL) {
10437 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10439 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
10440 if (*r->out.info) {
10441 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
10442 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10444 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10446 return NDR_ERR_SUCCESS;
10449 static enum ndr_err_code ndr_pull_lsa_QueryDomainInformationPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryDomainInformationPolicy *r)
10451 uint32_t _ptr_info;
10452 TALLOC_CTX *_mem_save_handle_0;
10453 TALLOC_CTX *_mem_save_info_0;
10454 TALLOC_CTX *_mem_save_info_1;
10455 if (flags & NDR_IN) {
10456 ZERO_STRUCT(r->out);
10458 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10459 NDR_PULL_ALLOC(ndr, r->in.handle);
10461 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10462 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10463 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10464 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10465 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10466 NDR_PULL_ALLOC(ndr, r->out.info);
10467 ZERO_STRUCTP(r->out.info);
10469 if (flags & NDR_OUT) {
10470 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10471 NDR_PULL_ALLOC(ndr, r->out.info);
10473 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10474 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10475 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10476 if (_ptr_info) {
10477 NDR_PULL_ALLOC(ndr, *r->out.info);
10478 } else {
10479 *r->out.info = NULL;
10481 if (*r->out.info) {
10482 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
10483 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
10484 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
10485 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10486 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
10488 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10489 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10491 return NDR_ERR_SUCCESS;
10494 _PUBLIC_ void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryDomainInformationPolicy *r)
10496 ndr_print_struct(ndr, name, "lsa_QueryDomainInformationPolicy");
10497 ndr->depth++;
10498 if (flags & NDR_SET_VALUES) {
10499 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10501 if (flags & NDR_IN) {
10502 ndr_print_struct(ndr, "in", "lsa_QueryDomainInformationPolicy");
10503 ndr->depth++;
10504 ndr_print_ptr(ndr, "handle", r->in.handle);
10505 ndr->depth++;
10506 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10507 ndr->depth--;
10508 ndr_print_uint16(ndr, "level", r->in.level);
10509 ndr->depth--;
10511 if (flags & NDR_OUT) {
10512 ndr_print_struct(ndr, "out", "lsa_QueryDomainInformationPolicy");
10513 ndr->depth++;
10514 ndr_print_ptr(ndr, "info", r->out.info);
10515 ndr->depth++;
10516 ndr_print_ptr(ndr, "info", *r->out.info);
10517 ndr->depth++;
10518 if (*r->out.info) {
10519 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
10520 ndr_print_lsa_DomainInformationPolicy(ndr, "info", *r->out.info);
10522 ndr->depth--;
10523 ndr->depth--;
10524 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10525 ndr->depth--;
10527 ndr->depth--;
10530 static enum ndr_err_code ndr_push_lsa_SetDomainInformationPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetDomainInformationPolicy *r)
10532 if (flags & NDR_IN) {
10533 if (r->in.handle == NULL) {
10534 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10536 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10537 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10538 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
10539 if (r->in.info) {
10540 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
10541 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10544 if (flags & NDR_OUT) {
10545 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10547 return NDR_ERR_SUCCESS;
10550 static enum ndr_err_code ndr_pull_lsa_SetDomainInformationPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetDomainInformationPolicy *r)
10552 uint32_t _ptr_info;
10553 TALLOC_CTX *_mem_save_handle_0;
10554 TALLOC_CTX *_mem_save_info_0;
10555 if (flags & NDR_IN) {
10556 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10557 NDR_PULL_ALLOC(ndr, r->in.handle);
10559 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10560 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10561 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10562 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10563 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10564 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10565 if (_ptr_info) {
10566 NDR_PULL_ALLOC(ndr, r->in.info);
10567 } else {
10568 r->in.info = NULL;
10570 if (r->in.info) {
10571 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10572 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
10573 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
10574 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10575 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
10578 if (flags & NDR_OUT) {
10579 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10581 return NDR_ERR_SUCCESS;
10584 _PUBLIC_ void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetDomainInformationPolicy *r)
10586 ndr_print_struct(ndr, name, "lsa_SetDomainInformationPolicy");
10587 ndr->depth++;
10588 if (flags & NDR_SET_VALUES) {
10589 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10591 if (flags & NDR_IN) {
10592 ndr_print_struct(ndr, "in", "lsa_SetDomainInformationPolicy");
10593 ndr->depth++;
10594 ndr_print_ptr(ndr, "handle", r->in.handle);
10595 ndr->depth++;
10596 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10597 ndr->depth--;
10598 ndr_print_uint16(ndr, "level", r->in.level);
10599 ndr_print_ptr(ndr, "info", r->in.info);
10600 ndr->depth++;
10601 if (r->in.info) {
10602 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
10603 ndr_print_lsa_DomainInformationPolicy(ndr, "info", r->in.info);
10605 ndr->depth--;
10606 ndr->depth--;
10608 if (flags & NDR_OUT) {
10609 ndr_print_struct(ndr, "out", "lsa_SetDomainInformationPolicy");
10610 ndr->depth++;
10611 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10612 ndr->depth--;
10614 ndr->depth--;
10617 static enum ndr_err_code ndr_push_lsa_OpenTrustedDomainByName(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomainByName *r)
10619 if (flags & NDR_IN) {
10620 if (r->in.handle == NULL) {
10621 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10623 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10624 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
10625 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
10627 if (flags & NDR_OUT) {
10628 if (r->out.trustdom_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.trustdom_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_OpenTrustedDomainByName(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomainByName *r)
10639 TALLOC_CTX *_mem_save_handle_0;
10640 TALLOC_CTX *_mem_save_trustdom_handle_0;
10641 if (flags & NDR_IN) {
10642 ZERO_STRUCT(r->out);
10644 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10645 NDR_PULL_ALLOC(ndr, r->in.handle);
10647 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10648 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10649 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10650 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10651 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
10652 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
10653 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10654 ZERO_STRUCTP(r->out.trustdom_handle);
10656 if (flags & NDR_OUT) {
10657 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10658 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10660 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10661 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
10662 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10663 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
10664 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10666 return NDR_ERR_SUCCESS;
10669 _PUBLIC_ void ndr_print_lsa_OpenTrustedDomainByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomainByName *r)
10671 ndr_print_struct(ndr, name, "lsa_OpenTrustedDomainByName");
10672 ndr->depth++;
10673 if (flags & NDR_SET_VALUES) {
10674 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10676 if (flags & NDR_IN) {
10677 ndr_print_struct(ndr, "in", "lsa_OpenTrustedDomainByName");
10678 ndr->depth++;
10679 ndr_print_ptr(ndr, "handle", r->in.handle);
10680 ndr->depth++;
10681 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10682 ndr->depth--;
10683 ndr_print_lsa_String(ndr, "name", &r->in.name);
10684 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
10685 ndr->depth--;
10687 if (flags & NDR_OUT) {
10688 ndr_print_struct(ndr, "out", "lsa_OpenTrustedDomainByName");
10689 ndr->depth++;
10690 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
10691 ndr->depth++;
10692 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
10693 ndr->depth--;
10694 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10695 ndr->depth--;
10697 ndr->depth--;
10700 static enum ndr_err_code ndr_push_lsa_TestCall(struct ndr_push *ndr, int flags, const struct lsa_TestCall *r)
10702 if (flags & NDR_IN) {
10704 if (flags & NDR_OUT) {
10705 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10707 return NDR_ERR_SUCCESS;
10710 static enum ndr_err_code ndr_pull_lsa_TestCall(struct ndr_pull *ndr, int flags, struct lsa_TestCall *r)
10712 if (flags & NDR_IN) {
10714 if (flags & NDR_OUT) {
10715 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10717 return NDR_ERR_SUCCESS;
10720 _PUBLIC_ void ndr_print_lsa_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct lsa_TestCall *r)
10722 ndr_print_struct(ndr, name, "lsa_TestCall");
10723 ndr->depth++;
10724 if (flags & NDR_SET_VALUES) {
10725 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10727 if (flags & NDR_IN) {
10728 ndr_print_struct(ndr, "in", "lsa_TestCall");
10729 ndr->depth++;
10730 ndr->depth--;
10732 if (flags & NDR_OUT) {
10733 ndr_print_struct(ndr, "out", "lsa_TestCall");
10734 ndr->depth++;
10735 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10736 ndr->depth--;
10738 ndr->depth--;
10741 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flags, const struct lsa_LookupSids2 *r)
10743 if (flags & NDR_IN) {
10744 if (r->in.handle == NULL) {
10745 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10747 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10748 if (r->in.sids == NULL) {
10749 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10751 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10752 if (r->in.names == NULL) {
10753 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10755 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
10756 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10757 if (r->in.count == NULL) {
10758 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10760 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
10761 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
10762 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
10764 if (flags & NDR_OUT) {
10765 if (r->out.domains == NULL) {
10766 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10768 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
10769 if (*r->out.domains) {
10770 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
10772 if (r->out.names == NULL) {
10773 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10775 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
10776 if (r->out.count == NULL) {
10777 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10779 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
10780 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10782 return NDR_ERR_SUCCESS;
10785 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int flags, struct lsa_LookupSids2 *r)
10787 uint32_t _ptr_domains;
10788 TALLOC_CTX *_mem_save_handle_0;
10789 TALLOC_CTX *_mem_save_sids_0;
10790 TALLOC_CTX *_mem_save_domains_0;
10791 TALLOC_CTX *_mem_save_domains_1;
10792 TALLOC_CTX *_mem_save_names_0;
10793 TALLOC_CTX *_mem_save_count_0;
10794 if (flags & NDR_IN) {
10795 ZERO_STRUCT(r->out);
10797 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10798 NDR_PULL_ALLOC(ndr, r->in.handle);
10800 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10801 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10802 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10803 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10804 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10805 NDR_PULL_ALLOC(ndr, r->in.sids);
10807 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
10808 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
10809 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10810 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
10811 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10812 NDR_PULL_ALLOC(ndr, r->in.names);
10814 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
10815 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
10816 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
10817 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
10818 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10819 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10820 NDR_PULL_ALLOC(ndr, r->in.count);
10822 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
10823 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
10824 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
10825 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
10826 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
10827 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
10828 NDR_PULL_ALLOC(ndr, r->out.domains);
10829 ZERO_STRUCTP(r->out.domains);
10830 NDR_PULL_ALLOC(ndr, r->out.names);
10831 *r->out.names = *r->in.names;
10832 NDR_PULL_ALLOC(ndr, r->out.count);
10833 *r->out.count = *r->in.count;
10835 if (flags & NDR_OUT) {
10836 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10837 NDR_PULL_ALLOC(ndr, r->out.domains);
10839 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
10840 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
10841 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
10842 if (_ptr_domains) {
10843 NDR_PULL_ALLOC(ndr, *r->out.domains);
10844 } else {
10845 *r->out.domains = NULL;
10847 if (*r->out.domains) {
10848 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
10849 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
10850 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
10851 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
10853 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
10854 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10855 NDR_PULL_ALLOC(ndr, r->out.names);
10857 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
10858 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
10859 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
10860 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
10861 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10862 NDR_PULL_ALLOC(ndr, r->out.count);
10864 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
10865 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
10866 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
10867 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
10868 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10870 return NDR_ERR_SUCCESS;
10873 _PUBLIC_ void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids2 *r)
10875 ndr_print_struct(ndr, name, "lsa_LookupSids2");
10876 ndr->depth++;
10877 if (flags & NDR_SET_VALUES) {
10878 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10880 if (flags & NDR_IN) {
10881 ndr_print_struct(ndr, "in", "lsa_LookupSids2");
10882 ndr->depth++;
10883 ndr_print_ptr(ndr, "handle", r->in.handle);
10884 ndr->depth++;
10885 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10886 ndr->depth--;
10887 ndr_print_ptr(ndr, "sids", r->in.sids);
10888 ndr->depth++;
10889 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
10890 ndr->depth--;
10891 ndr_print_ptr(ndr, "names", r->in.names);
10892 ndr->depth++;
10893 ndr_print_lsa_TransNameArray2(ndr, "names", r->in.names);
10894 ndr->depth--;
10895 ndr_print_uint16(ndr, "level", r->in.level);
10896 ndr_print_ptr(ndr, "count", r->in.count);
10897 ndr->depth++;
10898 ndr_print_uint32(ndr, "count", *r->in.count);
10899 ndr->depth--;
10900 ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
10901 ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
10902 ndr->depth--;
10904 if (flags & NDR_OUT) {
10905 ndr_print_struct(ndr, "out", "lsa_LookupSids2");
10906 ndr->depth++;
10907 ndr_print_ptr(ndr, "domains", r->out.domains);
10908 ndr->depth++;
10909 ndr_print_ptr(ndr, "domains", *r->out.domains);
10910 ndr->depth++;
10911 if (*r->out.domains) {
10912 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
10914 ndr->depth--;
10915 ndr->depth--;
10916 ndr_print_ptr(ndr, "names", r->out.names);
10917 ndr->depth++;
10918 ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names);
10919 ndr->depth--;
10920 ndr_print_ptr(ndr, "count", r->out.count);
10921 ndr->depth++;
10922 ndr_print_uint32(ndr, "count", *r->out.count);
10923 ndr->depth--;
10924 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10925 ndr->depth--;
10927 ndr->depth--;
10930 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int flags, const struct lsa_LookupNames2 *r)
10932 uint32_t cntr_names_0;
10933 if (flags & NDR_IN) {
10934 if (r->in.handle == NULL) {
10935 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10937 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10938 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
10939 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
10940 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
10941 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
10943 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
10944 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
10946 if (r->in.sids == NULL) {
10947 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10949 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10950 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
10951 if (r->in.count == NULL) {
10952 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10954 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
10955 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lookup_options));
10956 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision));
10958 if (flags & NDR_OUT) {
10959 if (r->out.domains == NULL) {
10960 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10962 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
10963 if (*r->out.domains) {
10964 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
10966 if (r->out.sids == NULL) {
10967 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10969 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
10970 if (r->out.count == NULL) {
10971 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10973 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
10974 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10976 return NDR_ERR_SUCCESS;
10979 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int flags, struct lsa_LookupNames2 *r)
10981 uint32_t size_names_0 = 0;
10982 uint32_t cntr_names_0;
10983 uint32_t _ptr_domains;
10984 TALLOC_CTX *_mem_save_handle_0;
10985 TALLOC_CTX *_mem_save_names_0;
10986 TALLOC_CTX *_mem_save_domains_0;
10987 TALLOC_CTX *_mem_save_domains_1;
10988 TALLOC_CTX *_mem_save_sids_0;
10989 TALLOC_CTX *_mem_save_count_0;
10990 if (flags & NDR_IN) {
10991 ZERO_STRUCT(r->out);
10993 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10994 NDR_PULL_ALLOC(ndr, r->in.handle);
10996 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10997 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10998 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10999 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
11000 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
11001 if (r->in.num_names > 1000) {
11002 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
11004 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
11005 size_names_0 = ndr_get_array_size(ndr, &r->in.names);
11006 NDR_PULL_ALLOC_N(ndr, r->in.names, size_names_0);
11007 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
11008 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
11009 for (cntr_names_0 = 0; cntr_names_0 < size_names_0; cntr_names_0++) {
11010 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
11012 for (cntr_names_0 = 0; cntr_names_0 < size_names_0; cntr_names_0++) {
11013 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
11015 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
11016 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11017 NDR_PULL_ALLOC(ndr, r->in.sids);
11019 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11020 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
11021 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11022 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11023 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
11024 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11025 NDR_PULL_ALLOC(ndr, r->in.count);
11027 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11028 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
11029 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
11030 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11031 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lookup_options));
11032 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision));
11033 NDR_PULL_ALLOC(ndr, r->out.domains);
11034 ZERO_STRUCTP(r->out.domains);
11035 NDR_PULL_ALLOC(ndr, r->out.sids);
11036 *r->out.sids = *r->in.sids;
11037 NDR_PULL_ALLOC(ndr, r->out.count);
11038 *r->out.count = *r->in.count;
11039 if (r->in.names) {
11040 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
11043 if (flags & NDR_OUT) {
11044 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11045 NDR_PULL_ALLOC(ndr, r->out.domains);
11047 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
11048 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
11049 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
11050 if (_ptr_domains) {
11051 NDR_PULL_ALLOC(ndr, *r->out.domains);
11052 } else {
11053 *r->out.domains = NULL;
11055 if (*r->out.domains) {
11056 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
11057 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
11058 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11059 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
11061 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
11062 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11063 NDR_PULL_ALLOC(ndr, r->out.sids);
11065 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11066 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
11067 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
11068 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11069 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11070 NDR_PULL_ALLOC(ndr, r->out.count);
11072 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11073 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
11074 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
11075 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11076 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11078 return NDR_ERR_SUCCESS;
11081 _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames2 *r)
11083 uint32_t cntr_names_0;
11084 ndr_print_struct(ndr, name, "lsa_LookupNames2");
11085 ndr->depth++;
11086 if (flags & NDR_SET_VALUES) {
11087 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11089 if (flags & NDR_IN) {
11090 ndr_print_struct(ndr, "in", "lsa_LookupNames2");
11091 ndr->depth++;
11092 ndr_print_ptr(ndr, "handle", r->in.handle);
11093 ndr->depth++;
11094 ndr_print_policy_handle(ndr, "handle", r->in.handle);
11095 ndr->depth--;
11096 ndr_print_uint32(ndr, "num_names", r->in.num_names);
11097 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
11098 ndr->depth++;
11099 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
11100 char *idx_0=NULL;
11101 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
11102 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
11103 free(idx_0);
11106 ndr->depth--;
11107 ndr_print_ptr(ndr, "sids", r->in.sids);
11108 ndr->depth++;
11109 ndr_print_lsa_TransSidArray2(ndr, "sids", r->in.sids);
11110 ndr->depth--;
11111 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
11112 ndr_print_ptr(ndr, "count", r->in.count);
11113 ndr->depth++;
11114 ndr_print_uint32(ndr, "count", *r->in.count);
11115 ndr->depth--;
11116 ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options);
11117 ndr_print_uint32(ndr, "client_revision", r->in.client_revision);
11118 ndr->depth--;
11120 if (flags & NDR_OUT) {
11121 ndr_print_struct(ndr, "out", "lsa_LookupNames2");
11122 ndr->depth++;
11123 ndr_print_ptr(ndr, "domains", r->out.domains);
11124 ndr->depth++;
11125 ndr_print_ptr(ndr, "domains", *r->out.domains);
11126 ndr->depth++;
11127 if (*r->out.domains) {
11128 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
11130 ndr->depth--;
11131 ndr->depth--;
11132 ndr_print_ptr(ndr, "sids", r->out.sids);
11133 ndr->depth++;
11134 ndr_print_lsa_TransSidArray2(ndr, "sids", r->out.sids);
11135 ndr->depth--;
11136 ndr_print_ptr(ndr, "count", r->out.count);
11137 ndr->depth++;
11138 ndr_print_uint32(ndr, "count", *r->out.count);
11139 ndr->depth--;
11140 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11141 ndr->depth--;
11143 ndr->depth--;
11146 static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx2 *r)
11148 if (flags & NDR_IN) {
11149 if (r->in.policy_handle == NULL) {
11150 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11152 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
11153 if (r->in.info == NULL) {
11154 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11156 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
11157 if (r->in.auth_info == NULL) {
11158 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11160 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
11161 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
11163 if (flags & NDR_OUT) {
11164 if (r->out.trustdom_handle == NULL) {
11165 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11167 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
11168 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11170 return NDR_ERR_SUCCESS;
11173 static enum ndr_err_code ndr_pull_lsa_CreateTrustedDomainEx2(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx2 *r)
11175 TALLOC_CTX *_mem_save_policy_handle_0;
11176 TALLOC_CTX *_mem_save_info_0;
11177 TALLOC_CTX *_mem_save_auth_info_0;
11178 TALLOC_CTX *_mem_save_trustdom_handle_0;
11179 if (flags & NDR_IN) {
11180 ZERO_STRUCT(r->out);
11182 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11183 NDR_PULL_ALLOC(ndr, r->in.policy_handle);
11185 _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11186 NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
11187 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
11188 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
11189 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11190 NDR_PULL_ALLOC(ndr, r->in.info);
11192 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11193 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
11194 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
11195 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
11196 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11197 NDR_PULL_ALLOC(ndr, r->in.auth_info);
11199 _mem_save_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11200 NDR_PULL_SET_MEM_CTX(ndr, r->in.auth_info, LIBNDR_FLAG_REF_ALLOC);
11201 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
11202 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_info_0, LIBNDR_FLAG_REF_ALLOC);
11203 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
11204 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
11205 ZERO_STRUCTP(r->out.trustdom_handle);
11207 if (flags & NDR_OUT) {
11208 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11209 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
11211 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11212 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
11213 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
11214 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
11215 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11217 return NDR_ERR_SUCCESS;
11220 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx2 *r)
11222 ndr_print_struct(ndr, name, "lsa_CreateTrustedDomainEx2");
11223 ndr->depth++;
11224 if (flags & NDR_SET_VALUES) {
11225 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11227 if (flags & NDR_IN) {
11228 ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomainEx2");
11229 ndr->depth++;
11230 ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
11231 ndr->depth++;
11232 ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
11233 ndr->depth--;
11234 ndr_print_ptr(ndr, "info", r->in.info);
11235 ndr->depth++;
11236 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info", r->in.info);
11237 ndr->depth--;
11238 ndr_print_ptr(ndr, "auth_info", r->in.auth_info);
11239 ndr->depth++;
11240 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", r->in.auth_info);
11241 ndr->depth--;
11242 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
11243 ndr->depth--;
11245 if (flags & NDR_OUT) {
11246 ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomainEx2");
11247 ndr->depth++;
11248 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
11249 ndr->depth++;
11250 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
11251 ndr->depth--;
11252 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11253 ndr->depth--;
11255 ndr->depth--;
11258 static enum ndr_err_code ndr_push_lsa_CREDRWRITE(struct ndr_push *ndr, int flags, const struct lsa_CREDRWRITE *r)
11260 if (flags & NDR_IN) {
11262 if (flags & NDR_OUT) {
11263 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11265 return NDR_ERR_SUCCESS;
11268 static enum ndr_err_code ndr_pull_lsa_CREDRWRITE(struct ndr_pull *ndr, int flags, struct lsa_CREDRWRITE *r)
11270 if (flags & NDR_IN) {
11272 if (flags & NDR_OUT) {
11273 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11275 return NDR_ERR_SUCCESS;
11278 _PUBLIC_ void ndr_print_lsa_CREDRWRITE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITE *r)
11280 ndr_print_struct(ndr, name, "lsa_CREDRWRITE");
11281 ndr->depth++;
11282 if (flags & NDR_SET_VALUES) {
11283 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11285 if (flags & NDR_IN) {
11286 ndr_print_struct(ndr, "in", "lsa_CREDRWRITE");
11287 ndr->depth++;
11288 ndr->depth--;
11290 if (flags & NDR_OUT) {
11291 ndr_print_struct(ndr, "out", "lsa_CREDRWRITE");
11292 ndr->depth++;
11293 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11294 ndr->depth--;
11296 ndr->depth--;
11299 static enum ndr_err_code ndr_push_lsa_CREDRREAD(struct ndr_push *ndr, int flags, const struct lsa_CREDRREAD *r)
11301 if (flags & NDR_IN) {
11303 if (flags & NDR_OUT) {
11304 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11306 return NDR_ERR_SUCCESS;
11309 static enum ndr_err_code ndr_pull_lsa_CREDRREAD(struct ndr_pull *ndr, int flags, struct lsa_CREDRREAD *r)
11311 if (flags & NDR_IN) {
11313 if (flags & NDR_OUT) {
11314 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11316 return NDR_ERR_SUCCESS;
11319 _PUBLIC_ void ndr_print_lsa_CREDRREAD(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREAD *r)
11321 ndr_print_struct(ndr, name, "lsa_CREDRREAD");
11322 ndr->depth++;
11323 if (flags & NDR_SET_VALUES) {
11324 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11326 if (flags & NDR_IN) {
11327 ndr_print_struct(ndr, "in", "lsa_CREDRREAD");
11328 ndr->depth++;
11329 ndr->depth--;
11331 if (flags & NDR_OUT) {
11332 ndr_print_struct(ndr, "out", "lsa_CREDRREAD");
11333 ndr->depth++;
11334 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11335 ndr->depth--;
11337 ndr->depth--;
11340 static enum ndr_err_code ndr_push_lsa_CREDRENUMERATE(struct ndr_push *ndr, int flags, const struct lsa_CREDRENUMERATE *r)
11342 if (flags & NDR_IN) {
11344 if (flags & NDR_OUT) {
11345 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11347 return NDR_ERR_SUCCESS;
11350 static enum ndr_err_code ndr_pull_lsa_CREDRENUMERATE(struct ndr_pull *ndr, int flags, struct lsa_CREDRENUMERATE *r)
11352 if (flags & NDR_IN) {
11354 if (flags & NDR_OUT) {
11355 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11357 return NDR_ERR_SUCCESS;
11360 _PUBLIC_ void ndr_print_lsa_CREDRENUMERATE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRENUMERATE *r)
11362 ndr_print_struct(ndr, name, "lsa_CREDRENUMERATE");
11363 ndr->depth++;
11364 if (flags & NDR_SET_VALUES) {
11365 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11367 if (flags & NDR_IN) {
11368 ndr_print_struct(ndr, "in", "lsa_CREDRENUMERATE");
11369 ndr->depth++;
11370 ndr->depth--;
11372 if (flags & NDR_OUT) {
11373 ndr_print_struct(ndr, "out", "lsa_CREDRENUMERATE");
11374 ndr->depth++;
11375 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11376 ndr->depth--;
11378 ndr->depth--;
11381 static enum ndr_err_code ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_push *ndr, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
11383 if (flags & NDR_IN) {
11385 if (flags & NDR_OUT) {
11386 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11388 return NDR_ERR_SUCCESS;
11391 static enum ndr_err_code ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_pull *ndr, int flags, struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
11393 if (flags & NDR_IN) {
11395 if (flags & NDR_OUT) {
11396 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11398 return NDR_ERR_SUCCESS;
11401 _PUBLIC_ void ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
11403 ndr_print_struct(ndr, name, "lsa_CREDRWRITEDOMAINCREDENTIALS");
11404 ndr->depth++;
11405 if (flags & NDR_SET_VALUES) {
11406 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11408 if (flags & NDR_IN) {
11409 ndr_print_struct(ndr, "in", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11410 ndr->depth++;
11411 ndr->depth--;
11413 if (flags & NDR_OUT) {
11414 ndr_print_struct(ndr, "out", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11415 ndr->depth++;
11416 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11417 ndr->depth--;
11419 ndr->depth--;
11422 static enum ndr_err_code ndr_push_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_push *ndr, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r)
11424 if (flags & NDR_IN) {
11426 if (flags & NDR_OUT) {
11427 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11429 return NDR_ERR_SUCCESS;
11432 static enum ndr_err_code ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_pull *ndr, int flags, struct lsa_CREDRREADDOMAINCREDENTIALS *r)
11434 if (flags & NDR_IN) {
11436 if (flags & NDR_OUT) {
11437 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11439 return NDR_ERR_SUCCESS;
11442 _PUBLIC_ void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r)
11444 ndr_print_struct(ndr, name, "lsa_CREDRREADDOMAINCREDENTIALS");
11445 ndr->depth++;
11446 if (flags & NDR_SET_VALUES) {
11447 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11449 if (flags & NDR_IN) {
11450 ndr_print_struct(ndr, "in", "lsa_CREDRREADDOMAINCREDENTIALS");
11451 ndr->depth++;
11452 ndr->depth--;
11454 if (flags & NDR_OUT) {
11455 ndr_print_struct(ndr, "out", "lsa_CREDRREADDOMAINCREDENTIALS");
11456 ndr->depth++;
11457 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11458 ndr->depth--;
11460 ndr->depth--;
11463 static enum ndr_err_code ndr_push_lsa_CREDRDELETE(struct ndr_push *ndr, int flags, const struct lsa_CREDRDELETE *r)
11465 if (flags & NDR_IN) {
11467 if (flags & NDR_OUT) {
11468 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11470 return NDR_ERR_SUCCESS;
11473 static enum ndr_err_code ndr_pull_lsa_CREDRDELETE(struct ndr_pull *ndr, int flags, struct lsa_CREDRDELETE *r)
11475 if (flags & NDR_IN) {
11477 if (flags & NDR_OUT) {
11478 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11480 return NDR_ERR_SUCCESS;
11483 _PUBLIC_ void ndr_print_lsa_CREDRDELETE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRDELETE *r)
11485 ndr_print_struct(ndr, name, "lsa_CREDRDELETE");
11486 ndr->depth++;
11487 if (flags & NDR_SET_VALUES) {
11488 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11490 if (flags & NDR_IN) {
11491 ndr_print_struct(ndr, "in", "lsa_CREDRDELETE");
11492 ndr->depth++;
11493 ndr->depth--;
11495 if (flags & NDR_OUT) {
11496 ndr_print_struct(ndr, "out", "lsa_CREDRDELETE");
11497 ndr->depth++;
11498 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11499 ndr->depth--;
11501 ndr->depth--;
11504 static enum ndr_err_code ndr_push_lsa_CREDRGETTARGETINFO(struct ndr_push *ndr, int flags, const struct lsa_CREDRGETTARGETINFO *r)
11506 if (flags & NDR_IN) {
11508 if (flags & NDR_OUT) {
11509 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11511 return NDR_ERR_SUCCESS;
11514 static enum ndr_err_code ndr_pull_lsa_CREDRGETTARGETINFO(struct ndr_pull *ndr, int flags, struct lsa_CREDRGETTARGETINFO *r)
11516 if (flags & NDR_IN) {
11518 if (flags & NDR_OUT) {
11519 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11521 return NDR_ERR_SUCCESS;
11524 _PUBLIC_ void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETTARGETINFO *r)
11526 ndr_print_struct(ndr, name, "lsa_CREDRGETTARGETINFO");
11527 ndr->depth++;
11528 if (flags & NDR_SET_VALUES) {
11529 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11531 if (flags & NDR_IN) {
11532 ndr_print_struct(ndr, "in", "lsa_CREDRGETTARGETINFO");
11533 ndr->depth++;
11534 ndr->depth--;
11536 if (flags & NDR_OUT) {
11537 ndr_print_struct(ndr, "out", "lsa_CREDRGETTARGETINFO");
11538 ndr->depth++;
11539 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11540 ndr->depth--;
11542 ndr->depth--;
11545 static enum ndr_err_code ndr_push_lsa_CREDRPROFILELOADED(struct ndr_push *ndr, int flags, const struct lsa_CREDRPROFILELOADED *r)
11547 if (flags & NDR_IN) {
11549 if (flags & NDR_OUT) {
11550 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11552 return NDR_ERR_SUCCESS;
11555 static enum ndr_err_code ndr_pull_lsa_CREDRPROFILELOADED(struct ndr_pull *ndr, int flags, struct lsa_CREDRPROFILELOADED *r)
11557 if (flags & NDR_IN) {
11559 if (flags & NDR_OUT) {
11560 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11562 return NDR_ERR_SUCCESS;
11565 _PUBLIC_ void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRPROFILELOADED *r)
11567 ndr_print_struct(ndr, name, "lsa_CREDRPROFILELOADED");
11568 ndr->depth++;
11569 if (flags & NDR_SET_VALUES) {
11570 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11572 if (flags & NDR_IN) {
11573 ndr_print_struct(ndr, "in", "lsa_CREDRPROFILELOADED");
11574 ndr->depth++;
11575 ndr->depth--;
11577 if (flags & NDR_OUT) {
11578 ndr_print_struct(ndr, "out", "lsa_CREDRPROFILELOADED");
11579 ndr->depth++;
11580 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11581 ndr->depth--;
11583 ndr->depth--;
11586 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int flags, const struct lsa_LookupNames3 *r)
11588 uint32_t cntr_names_0;
11589 if (flags & NDR_IN) {
11590 if (r->in.handle == NULL) {
11591 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11593 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11594 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
11595 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
11596 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11597 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
11599 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11600 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
11602 if (r->in.sids == NULL) {
11603 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11605 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11606 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
11607 if (r->in.count == NULL) {
11608 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11610 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
11611 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lookup_options));
11612 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision));
11614 if (flags & NDR_OUT) {
11615 if (r->out.domains == NULL) {
11616 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11618 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
11619 if (*r->out.domains) {
11620 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11622 if (r->out.sids == NULL) {
11623 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11625 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
11626 if (r->out.count == NULL) {
11627 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11629 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
11630 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11632 return NDR_ERR_SUCCESS;
11635 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r)
11637 uint32_t size_names_0 = 0;
11638 uint32_t cntr_names_0;
11639 uint32_t _ptr_domains;
11640 TALLOC_CTX *_mem_save_handle_0;
11641 TALLOC_CTX *_mem_save_names_0;
11642 TALLOC_CTX *_mem_save_domains_0;
11643 TALLOC_CTX *_mem_save_domains_1;
11644 TALLOC_CTX *_mem_save_sids_0;
11645 TALLOC_CTX *_mem_save_count_0;
11646 if (flags & NDR_IN) {
11647 ZERO_STRUCT(r->out);
11649 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11650 NDR_PULL_ALLOC(ndr, r->in.handle);
11652 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11653 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
11654 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11655 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
11656 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
11657 if (r->in.num_names > 1000) {
11658 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
11660 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
11661 size_names_0 = ndr_get_array_size(ndr, &r->in.names);
11662 NDR_PULL_ALLOC_N(ndr, r->in.names, size_names_0);
11663 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
11664 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
11665 for (cntr_names_0 = 0; cntr_names_0 < size_names_0; cntr_names_0++) {
11666 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
11668 for (cntr_names_0 = 0; cntr_names_0 < size_names_0; cntr_names_0++) {
11669 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
11671 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
11672 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11673 NDR_PULL_ALLOC(ndr, r->in.sids);
11675 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11676 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
11677 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11678 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11679 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
11680 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11681 NDR_PULL_ALLOC(ndr, r->in.count);
11683 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11684 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
11685 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
11686 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11687 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lookup_options));
11688 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision));
11689 NDR_PULL_ALLOC(ndr, r->out.domains);
11690 ZERO_STRUCTP(r->out.domains);
11691 NDR_PULL_ALLOC(ndr, r->out.sids);
11692 *r->out.sids = *r->in.sids;
11693 NDR_PULL_ALLOC(ndr, r->out.count);
11694 *r->out.count = *r->in.count;
11695 if (r->in.names) {
11696 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
11699 if (flags & NDR_OUT) {
11700 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11701 NDR_PULL_ALLOC(ndr, r->out.domains);
11703 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
11704 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
11705 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
11706 if (_ptr_domains) {
11707 NDR_PULL_ALLOC(ndr, *r->out.domains);
11708 } else {
11709 *r->out.domains = NULL;
11711 if (*r->out.domains) {
11712 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
11713 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
11714 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11715 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
11717 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
11718 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11719 NDR_PULL_ALLOC(ndr, r->out.sids);
11721 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11722 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
11723 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
11724 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11725 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11726 NDR_PULL_ALLOC(ndr, r->out.count);
11728 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11729 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
11730 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
11731 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11732 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11734 return NDR_ERR_SUCCESS;
11737 _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames3 *r)
11739 uint32_t cntr_names_0;
11740 ndr_print_struct(ndr, name, "lsa_LookupNames3");
11741 ndr->depth++;
11742 if (flags & NDR_SET_VALUES) {
11743 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11745 if (flags & NDR_IN) {
11746 ndr_print_struct(ndr, "in", "lsa_LookupNames3");
11747 ndr->depth++;
11748 ndr_print_ptr(ndr, "handle", r->in.handle);
11749 ndr->depth++;
11750 ndr_print_policy_handle(ndr, "handle", r->in.handle);
11751 ndr->depth--;
11752 ndr_print_uint32(ndr, "num_names", r->in.num_names);
11753 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
11754 ndr->depth++;
11755 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
11756 char *idx_0=NULL;
11757 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
11758 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
11759 free(idx_0);
11762 ndr->depth--;
11763 ndr_print_ptr(ndr, "sids", r->in.sids);
11764 ndr->depth++;
11765 ndr_print_lsa_TransSidArray3(ndr, "sids", r->in.sids);
11766 ndr->depth--;
11767 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
11768 ndr_print_ptr(ndr, "count", r->in.count);
11769 ndr->depth++;
11770 ndr_print_uint32(ndr, "count", *r->in.count);
11771 ndr->depth--;
11772 ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options);
11773 ndr_print_uint32(ndr, "client_revision", r->in.client_revision);
11774 ndr->depth--;
11776 if (flags & NDR_OUT) {
11777 ndr_print_struct(ndr, "out", "lsa_LookupNames3");
11778 ndr->depth++;
11779 ndr_print_ptr(ndr, "domains", r->out.domains);
11780 ndr->depth++;
11781 ndr_print_ptr(ndr, "domains", *r->out.domains);
11782 ndr->depth++;
11783 if (*r->out.domains) {
11784 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
11786 ndr->depth--;
11787 ndr->depth--;
11788 ndr_print_ptr(ndr, "sids", r->out.sids);
11789 ndr->depth++;
11790 ndr_print_lsa_TransSidArray3(ndr, "sids", r->out.sids);
11791 ndr->depth--;
11792 ndr_print_ptr(ndr, "count", r->out.count);
11793 ndr->depth++;
11794 ndr_print_uint32(ndr, "count", *r->out.count);
11795 ndr->depth--;
11796 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11797 ndr->depth--;
11799 ndr->depth--;
11802 static enum ndr_err_code ndr_push_lsa_CREDRGETSESSIONTYPES(struct ndr_push *ndr, int flags, const struct lsa_CREDRGETSESSIONTYPES *r)
11804 if (flags & NDR_IN) {
11806 if (flags & NDR_OUT) {
11807 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11809 return NDR_ERR_SUCCESS;
11812 static enum ndr_err_code ndr_pull_lsa_CREDRGETSESSIONTYPES(struct ndr_pull *ndr, int flags, struct lsa_CREDRGETSESSIONTYPES *r)
11814 if (flags & NDR_IN) {
11816 if (flags & NDR_OUT) {
11817 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11819 return NDR_ERR_SUCCESS;
11822 _PUBLIC_ void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETSESSIONTYPES *r)
11824 ndr_print_struct(ndr, name, "lsa_CREDRGETSESSIONTYPES");
11825 ndr->depth++;
11826 if (flags & NDR_SET_VALUES) {
11827 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11829 if (flags & NDR_IN) {
11830 ndr_print_struct(ndr, "in", "lsa_CREDRGETSESSIONTYPES");
11831 ndr->depth++;
11832 ndr->depth--;
11834 if (flags & NDR_OUT) {
11835 ndr_print_struct(ndr, "out", "lsa_CREDRGETSESSIONTYPES");
11836 ndr->depth++;
11837 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11838 ndr->depth--;
11840 ndr->depth--;
11843 static enum ndr_err_code ndr_push_lsa_LSARREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r)
11845 if (flags & NDR_IN) {
11847 if (flags & NDR_OUT) {
11848 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11850 return NDR_ERR_SUCCESS;
11853 static enum ndr_err_code ndr_pull_lsa_LSARREGISTERAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARREGISTERAUDITEVENT *r)
11855 if (flags & NDR_IN) {
11857 if (flags & NDR_OUT) {
11858 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11860 return NDR_ERR_SUCCESS;
11863 _PUBLIC_ void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r)
11865 ndr_print_struct(ndr, name, "lsa_LSARREGISTERAUDITEVENT");
11866 ndr->depth++;
11867 if (flags & NDR_SET_VALUES) {
11868 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11870 if (flags & NDR_IN) {
11871 ndr_print_struct(ndr, "in", "lsa_LSARREGISTERAUDITEVENT");
11872 ndr->depth++;
11873 ndr->depth--;
11875 if (flags & NDR_OUT) {
11876 ndr_print_struct(ndr, "out", "lsa_LSARREGISTERAUDITEVENT");
11877 ndr->depth++;
11878 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11879 ndr->depth--;
11881 ndr->depth--;
11884 static enum ndr_err_code ndr_push_lsa_LSARGENAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARGENAUDITEVENT *r)
11886 if (flags & NDR_IN) {
11888 if (flags & NDR_OUT) {
11889 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11891 return NDR_ERR_SUCCESS;
11894 static enum ndr_err_code ndr_pull_lsa_LSARGENAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARGENAUDITEVENT *r)
11896 if (flags & NDR_IN) {
11898 if (flags & NDR_OUT) {
11899 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11901 return NDR_ERR_SUCCESS;
11904 _PUBLIC_ void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARGENAUDITEVENT *r)
11906 ndr_print_struct(ndr, name, "lsa_LSARGENAUDITEVENT");
11907 ndr->depth++;
11908 if (flags & NDR_SET_VALUES) {
11909 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11911 if (flags & NDR_IN) {
11912 ndr_print_struct(ndr, "in", "lsa_LSARGENAUDITEVENT");
11913 ndr->depth++;
11914 ndr->depth--;
11916 if (flags & NDR_OUT) {
11917 ndr_print_struct(ndr, "out", "lsa_LSARGENAUDITEVENT");
11918 ndr->depth++;
11919 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11920 ndr->depth--;
11922 ndr->depth--;
11925 static enum ndr_err_code ndr_push_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r)
11927 if (flags & NDR_IN) {
11929 if (flags & NDR_OUT) {
11930 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11932 return NDR_ERR_SUCCESS;
11935 static enum ndr_err_code ndr_pull_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARUNREGISTERAUDITEVENT *r)
11937 if (flags & NDR_IN) {
11939 if (flags & NDR_OUT) {
11940 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11942 return NDR_ERR_SUCCESS;
11945 _PUBLIC_ void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r)
11947 ndr_print_struct(ndr, name, "lsa_LSARUNREGISTERAUDITEVENT");
11948 ndr->depth++;
11949 if (flags & NDR_SET_VALUES) {
11950 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11952 if (flags & NDR_IN) {
11953 ndr_print_struct(ndr, "in", "lsa_LSARUNREGISTERAUDITEVENT");
11954 ndr->depth++;
11955 ndr->depth--;
11957 if (flags & NDR_OUT) {
11958 ndr_print_struct(ndr, "out", "lsa_LSARUNREGISTERAUDITEVENT");
11959 ndr->depth++;
11960 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11961 ndr->depth--;
11963 ndr->depth--;
11966 static enum ndr_err_code ndr_push_lsa_lsaRQueryForestTrustInformation(struct ndr_push *ndr, int flags, const struct lsa_lsaRQueryForestTrustInformation *r)
11968 if (flags & NDR_IN) {
11969 if (r->in.handle == NULL) {
11970 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11972 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11973 if (r->in.trusted_domain_name == NULL) {
11974 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11976 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain_name));
11977 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.unknown));
11979 if (flags & NDR_OUT) {
11980 if (r->out.forest_trust_info == NULL) {
11981 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11983 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.forest_trust_info));
11984 if (*r->out.forest_trust_info) {
11985 NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
11987 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11989 return NDR_ERR_SUCCESS;
11992 static enum ndr_err_code ndr_pull_lsa_lsaRQueryForestTrustInformation(struct ndr_pull *ndr, int flags, struct lsa_lsaRQueryForestTrustInformation *r)
11994 uint32_t _ptr_forest_trust_info;
11995 TALLOC_CTX *_mem_save_handle_0;
11996 TALLOC_CTX *_mem_save_trusted_domain_name_0;
11997 TALLOC_CTX *_mem_save_forest_trust_info_0;
11998 TALLOC_CTX *_mem_save_forest_trust_info_1;
11999 if (flags & NDR_IN) {
12000 ZERO_STRUCT(r->out);
12002 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12003 NDR_PULL_ALLOC(ndr, r->in.handle);
12005 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
12006 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
12007 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
12008 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
12009 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12010 NDR_PULL_ALLOC(ndr, r->in.trusted_domain_name);
12012 _mem_save_trusted_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12013 NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain_name, LIBNDR_FLAG_REF_ALLOC);
12014 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain_name));
12015 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_name_0, LIBNDR_FLAG_REF_ALLOC);
12016 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.unknown));
12017 NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
12018 ZERO_STRUCTP(r->out.forest_trust_info);
12020 if (flags & NDR_OUT) {
12021 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12022 NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
12024 _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
12025 NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC);
12026 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_info));
12027 if (_ptr_forest_trust_info) {
12028 NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info);
12029 } else {
12030 *r->out.forest_trust_info = NULL;
12032 if (*r->out.forest_trust_info) {
12033 _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
12034 NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, 0);
12035 NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
12036 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, 0);
12038 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC);
12039 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12041 return NDR_ERR_SUCCESS;
12044 _PUBLIC_ void ndr_print_lsa_lsaRQueryForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct lsa_lsaRQueryForestTrustInformation *r)
12046 ndr_print_struct(ndr, name, "lsa_lsaRQueryForestTrustInformation");
12047 ndr->depth++;
12048 if (flags & NDR_SET_VALUES) {
12049 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12051 if (flags & NDR_IN) {
12052 ndr_print_struct(ndr, "in", "lsa_lsaRQueryForestTrustInformation");
12053 ndr->depth++;
12054 ndr_print_ptr(ndr, "handle", r->in.handle);
12055 ndr->depth++;
12056 ndr_print_policy_handle(ndr, "handle", r->in.handle);
12057 ndr->depth--;
12058 ndr_print_ptr(ndr, "trusted_domain_name", r->in.trusted_domain_name);
12059 ndr->depth++;
12060 ndr_print_lsa_String(ndr, "trusted_domain_name", r->in.trusted_domain_name);
12061 ndr->depth--;
12062 ndr_print_uint16(ndr, "unknown", r->in.unknown);
12063 ndr->depth--;
12065 if (flags & NDR_OUT) {
12066 ndr_print_struct(ndr, "out", "lsa_lsaRQueryForestTrustInformation");
12067 ndr->depth++;
12068 ndr_print_ptr(ndr, "forest_trust_info", r->out.forest_trust_info);
12069 ndr->depth++;
12070 ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info);
12071 ndr->depth++;
12072 if (*r->out.forest_trust_info) {
12073 ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info);
12075 ndr->depth--;
12076 ndr->depth--;
12077 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12078 ndr->depth--;
12080 ndr->depth--;
12083 static enum ndr_err_code ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
12085 if (flags & NDR_IN) {
12087 if (flags & NDR_OUT) {
12088 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12090 return NDR_ERR_SUCCESS;
12093 static enum ndr_err_code ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
12095 if (flags & NDR_IN) {
12097 if (flags & NDR_OUT) {
12098 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12100 return NDR_ERR_SUCCESS;
12103 _PUBLIC_ void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
12105 ndr_print_struct(ndr, name, "lsa_LSARSETFORESTTRUSTINFORMATION");
12106 ndr->depth++;
12107 if (flags & NDR_SET_VALUES) {
12108 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12110 if (flags & NDR_IN) {
12111 ndr_print_struct(ndr, "in", "lsa_LSARSETFORESTTRUSTINFORMATION");
12112 ndr->depth++;
12113 ndr->depth--;
12115 if (flags & NDR_OUT) {
12116 ndr_print_struct(ndr, "out", "lsa_LSARSETFORESTTRUSTINFORMATION");
12117 ndr->depth++;
12118 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12119 ndr->depth--;
12121 ndr->depth--;
12124 static enum ndr_err_code ndr_push_lsa_CREDRRENAME(struct ndr_push *ndr, int flags, const struct lsa_CREDRRENAME *r)
12126 if (flags & NDR_IN) {
12128 if (flags & NDR_OUT) {
12129 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12131 return NDR_ERR_SUCCESS;
12134 static enum ndr_err_code ndr_pull_lsa_CREDRRENAME(struct ndr_pull *ndr, int flags, struct lsa_CREDRRENAME *r)
12136 if (flags & NDR_IN) {
12138 if (flags & NDR_OUT) {
12139 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12141 return NDR_ERR_SUCCESS;
12144 _PUBLIC_ void ndr_print_lsa_CREDRRENAME(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRRENAME *r)
12146 ndr_print_struct(ndr, name, "lsa_CREDRRENAME");
12147 ndr->depth++;
12148 if (flags & NDR_SET_VALUES) {
12149 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12151 if (flags & NDR_IN) {
12152 ndr_print_struct(ndr, "in", "lsa_CREDRRENAME");
12153 ndr->depth++;
12154 ndr->depth--;
12156 if (flags & NDR_OUT) {
12157 ndr_print_struct(ndr, "out", "lsa_CREDRRENAME");
12158 ndr->depth++;
12159 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12160 ndr->depth--;
12162 ndr->depth--;
12165 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flags, const struct lsa_LookupSids3 *r)
12167 if (flags & NDR_IN) {
12168 if (r->in.sids == NULL) {
12169 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12171 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12172 if (r->in.names == NULL) {
12173 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12175 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
12176 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
12177 if (r->in.count == NULL) {
12178 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12180 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
12181 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
12182 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
12184 if (flags & NDR_OUT) {
12185 if (r->out.domains == NULL) {
12186 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12188 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
12189 if (*r->out.domains) {
12190 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12192 if (r->out.names == NULL) {
12193 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12195 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
12196 if (r->out.count == NULL) {
12197 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12199 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
12200 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12202 return NDR_ERR_SUCCESS;
12205 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int flags, struct lsa_LookupSids3 *r)
12207 uint32_t _ptr_domains;
12208 TALLOC_CTX *_mem_save_sids_0;
12209 TALLOC_CTX *_mem_save_domains_0;
12210 TALLOC_CTX *_mem_save_domains_1;
12211 TALLOC_CTX *_mem_save_names_0;
12212 TALLOC_CTX *_mem_save_count_0;
12213 if (flags & NDR_IN) {
12214 ZERO_STRUCT(r->out);
12216 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12217 NDR_PULL_ALLOC(ndr, r->in.sids);
12219 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
12220 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
12221 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12222 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
12223 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12224 NDR_PULL_ALLOC(ndr, r->in.names);
12226 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
12227 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
12228 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
12229 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
12230 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
12231 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12232 NDR_PULL_ALLOC(ndr, r->in.count);
12234 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12235 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
12236 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
12237 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12238 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
12239 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
12240 NDR_PULL_ALLOC(ndr, r->out.domains);
12241 ZERO_STRUCTP(r->out.domains);
12242 NDR_PULL_ALLOC(ndr, r->out.names);
12243 *r->out.names = *r->in.names;
12244 NDR_PULL_ALLOC(ndr, r->out.count);
12245 *r->out.count = *r->in.count;
12247 if (flags & NDR_OUT) {
12248 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12249 NDR_PULL_ALLOC(ndr, r->out.domains);
12251 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
12252 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
12253 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
12254 if (_ptr_domains) {
12255 NDR_PULL_ALLOC(ndr, *r->out.domains);
12256 } else {
12257 *r->out.domains = NULL;
12259 if (*r->out.domains) {
12260 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
12261 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
12262 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12263 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
12265 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
12266 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12267 NDR_PULL_ALLOC(ndr, r->out.names);
12269 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
12270 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
12271 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
12272 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
12273 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12274 NDR_PULL_ALLOC(ndr, r->out.count);
12276 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12277 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
12278 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
12279 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12280 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12282 return NDR_ERR_SUCCESS;
12285 _PUBLIC_ void ndr_print_lsa_LookupSids3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids3 *r)
12287 ndr_print_struct(ndr, name, "lsa_LookupSids3");
12288 ndr->depth++;
12289 if (flags & NDR_SET_VALUES) {
12290 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12292 if (flags & NDR_IN) {
12293 ndr_print_struct(ndr, "in", "lsa_LookupSids3");
12294 ndr->depth++;
12295 ndr_print_ptr(ndr, "sids", r->in.sids);
12296 ndr->depth++;
12297 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
12298 ndr->depth--;
12299 ndr_print_ptr(ndr, "names", r->in.names);
12300 ndr->depth++;
12301 ndr_print_lsa_TransNameArray2(ndr, "names", r->in.names);
12302 ndr->depth--;
12303 ndr_print_uint16(ndr, "level", r->in.level);
12304 ndr_print_ptr(ndr, "count", r->in.count);
12305 ndr->depth++;
12306 ndr_print_uint32(ndr, "count", *r->in.count);
12307 ndr->depth--;
12308 ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
12309 ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
12310 ndr->depth--;
12312 if (flags & NDR_OUT) {
12313 ndr_print_struct(ndr, "out", "lsa_LookupSids3");
12314 ndr->depth++;
12315 ndr_print_ptr(ndr, "domains", r->out.domains);
12316 ndr->depth++;
12317 ndr_print_ptr(ndr, "domains", *r->out.domains);
12318 ndr->depth++;
12319 if (*r->out.domains) {
12320 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
12322 ndr->depth--;
12323 ndr->depth--;
12324 ndr_print_ptr(ndr, "names", r->out.names);
12325 ndr->depth++;
12326 ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names);
12327 ndr->depth--;
12328 ndr_print_ptr(ndr, "count", r->out.count);
12329 ndr->depth++;
12330 ndr_print_uint32(ndr, "count", *r->out.count);
12331 ndr->depth--;
12332 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12333 ndr->depth--;
12335 ndr->depth--;
12338 static enum ndr_err_code ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int flags, const struct lsa_LookupNames4 *r)
12340 uint32_t cntr_names_0;
12341 if (flags & NDR_IN) {
12342 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
12343 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
12344 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
12345 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
12347 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
12348 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
12350 if (r->in.sids == NULL) {
12351 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12353 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12354 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
12355 if (r->in.count == NULL) {
12356 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12358 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
12359 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lookup_options));
12360 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision));
12362 if (flags & NDR_OUT) {
12363 if (r->out.domains == NULL) {
12364 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12366 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
12367 if (*r->out.domains) {
12368 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12370 if (r->out.sids == NULL) {
12371 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12373 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
12374 if (r->out.count == NULL) {
12375 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12377 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
12378 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12380 return NDR_ERR_SUCCESS;
12383 static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int flags, struct lsa_LookupNames4 *r)
12385 uint32_t size_names_0 = 0;
12386 uint32_t cntr_names_0;
12387 uint32_t _ptr_domains;
12388 TALLOC_CTX *_mem_save_names_0;
12389 TALLOC_CTX *_mem_save_domains_0;
12390 TALLOC_CTX *_mem_save_domains_1;
12391 TALLOC_CTX *_mem_save_sids_0;
12392 TALLOC_CTX *_mem_save_count_0;
12393 if (flags & NDR_IN) {
12394 ZERO_STRUCT(r->out);
12396 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
12397 if (r->in.num_names > 1000) {
12398 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
12400 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
12401 size_names_0 = ndr_get_array_size(ndr, &r->in.names);
12402 NDR_PULL_ALLOC_N(ndr, r->in.names, size_names_0);
12403 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
12404 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
12405 for (cntr_names_0 = 0; cntr_names_0 < size_names_0; cntr_names_0++) {
12406 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
12408 for (cntr_names_0 = 0; cntr_names_0 < size_names_0; cntr_names_0++) {
12409 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
12411 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
12412 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12413 NDR_PULL_ALLOC(ndr, r->in.sids);
12415 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
12416 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
12417 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12418 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
12419 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
12420 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12421 NDR_PULL_ALLOC(ndr, r->in.count);
12423 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12424 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
12425 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
12426 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12427 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lookup_options));
12428 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision));
12429 NDR_PULL_ALLOC(ndr, r->out.domains);
12430 ZERO_STRUCTP(r->out.domains);
12431 NDR_PULL_ALLOC(ndr, r->out.sids);
12432 *r->out.sids = *r->in.sids;
12433 NDR_PULL_ALLOC(ndr, r->out.count);
12434 *r->out.count = *r->in.count;
12435 if (r->in.names) {
12436 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
12439 if (flags & NDR_OUT) {
12440 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12441 NDR_PULL_ALLOC(ndr, r->out.domains);
12443 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
12444 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
12445 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
12446 if (_ptr_domains) {
12447 NDR_PULL_ALLOC(ndr, *r->out.domains);
12448 } else {
12449 *r->out.domains = NULL;
12451 if (*r->out.domains) {
12452 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
12453 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
12454 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12455 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
12457 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
12458 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12459 NDR_PULL_ALLOC(ndr, r->out.sids);
12461 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
12462 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
12463 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
12464 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
12465 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12466 NDR_PULL_ALLOC(ndr, r->out.count);
12468 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12469 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
12470 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
12471 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12472 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12474 return NDR_ERR_SUCCESS;
12477 _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames4 *r)
12479 uint32_t cntr_names_0;
12480 ndr_print_struct(ndr, name, "lsa_LookupNames4");
12481 ndr->depth++;
12482 if (flags & NDR_SET_VALUES) {
12483 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12485 if (flags & NDR_IN) {
12486 ndr_print_struct(ndr, "in", "lsa_LookupNames4");
12487 ndr->depth++;
12488 ndr_print_uint32(ndr, "num_names", r->in.num_names);
12489 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
12490 ndr->depth++;
12491 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
12492 char *idx_0=NULL;
12493 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
12494 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
12495 free(idx_0);
12498 ndr->depth--;
12499 ndr_print_ptr(ndr, "sids", r->in.sids);
12500 ndr->depth++;
12501 ndr_print_lsa_TransSidArray3(ndr, "sids", r->in.sids);
12502 ndr->depth--;
12503 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
12504 ndr_print_ptr(ndr, "count", r->in.count);
12505 ndr->depth++;
12506 ndr_print_uint32(ndr, "count", *r->in.count);
12507 ndr->depth--;
12508 ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options);
12509 ndr_print_uint32(ndr, "client_revision", r->in.client_revision);
12510 ndr->depth--;
12512 if (flags & NDR_OUT) {
12513 ndr_print_struct(ndr, "out", "lsa_LookupNames4");
12514 ndr->depth++;
12515 ndr_print_ptr(ndr, "domains", r->out.domains);
12516 ndr->depth++;
12517 ndr_print_ptr(ndr, "domains", *r->out.domains);
12518 ndr->depth++;
12519 if (*r->out.domains) {
12520 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
12522 ndr->depth--;
12523 ndr->depth--;
12524 ndr_print_ptr(ndr, "sids", r->out.sids);
12525 ndr->depth++;
12526 ndr_print_lsa_TransSidArray3(ndr, "sids", r->out.sids);
12527 ndr->depth--;
12528 ndr_print_ptr(ndr, "count", r->out.count);
12529 ndr->depth++;
12530 ndr_print_uint32(ndr, "count", *r->out.count);
12531 ndr->depth--;
12532 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12533 ndr->depth--;
12535 ndr->depth--;
12538 static enum ndr_err_code ndr_push_lsa_LSAROPENPOLICYSCE(struct ndr_push *ndr, int flags, const struct lsa_LSAROPENPOLICYSCE *r)
12540 if (flags & NDR_IN) {
12542 if (flags & NDR_OUT) {
12543 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12545 return NDR_ERR_SUCCESS;
12548 static enum ndr_err_code ndr_pull_lsa_LSAROPENPOLICYSCE(struct ndr_pull *ndr, int flags, struct lsa_LSAROPENPOLICYSCE *r)
12550 if (flags & NDR_IN) {
12552 if (flags & NDR_OUT) {
12553 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12555 return NDR_ERR_SUCCESS;
12558 _PUBLIC_ void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSAROPENPOLICYSCE *r)
12560 ndr_print_struct(ndr, name, "lsa_LSAROPENPOLICYSCE");
12561 ndr->depth++;
12562 if (flags & NDR_SET_VALUES) {
12563 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12565 if (flags & NDR_IN) {
12566 ndr_print_struct(ndr, "in", "lsa_LSAROPENPOLICYSCE");
12567 ndr->depth++;
12568 ndr->depth--;
12570 if (flags & NDR_OUT) {
12571 ndr_print_struct(ndr, "out", "lsa_LSAROPENPOLICYSCE");
12572 ndr->depth++;
12573 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12574 ndr->depth--;
12576 ndr->depth--;
12579 static enum ndr_err_code ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
12581 if (flags & NDR_IN) {
12583 if (flags & NDR_OUT) {
12584 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12586 return NDR_ERR_SUCCESS;
12589 static enum ndr_err_code ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_pull *ndr, int flags, struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
12591 if (flags & NDR_IN) {
12593 if (flags & NDR_OUT) {
12594 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12596 return NDR_ERR_SUCCESS;
12599 _PUBLIC_ void ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
12601 ndr_print_struct(ndr, name, "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12602 ndr->depth++;
12603 if (flags & NDR_SET_VALUES) {
12604 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12606 if (flags & NDR_IN) {
12607 ndr_print_struct(ndr, "in", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12608 ndr->depth++;
12609 ndr->depth--;
12611 if (flags & NDR_OUT) {
12612 ndr_print_struct(ndr, "out", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12613 ndr->depth++;
12614 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12615 ndr->depth--;
12617 ndr->depth--;
12620 static enum ndr_err_code ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
12622 if (flags & NDR_IN) {
12624 if (flags & NDR_OUT) {
12625 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12627 return NDR_ERR_SUCCESS;
12630 static enum ndr_err_code ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_pull *ndr, int flags, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
12632 if (flags & NDR_IN) {
12634 if (flags & NDR_OUT) {
12635 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12637 return NDR_ERR_SUCCESS;
12640 _PUBLIC_ void ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
12642 ndr_print_struct(ndr, name, "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12643 ndr->depth++;
12644 if (flags & NDR_SET_VALUES) {
12645 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12647 if (flags & NDR_IN) {
12648 ndr_print_struct(ndr, "in", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12649 ndr->depth++;
12650 ndr->depth--;
12652 if (flags & NDR_OUT) {
12653 ndr_print_struct(ndr, "out", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12654 ndr->depth++;
12655 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12656 ndr->depth--;
12658 ndr->depth--;
12661 static enum ndr_err_code ndr_push_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r)
12663 if (flags & NDR_IN) {
12665 if (flags & NDR_OUT) {
12666 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12668 return NDR_ERR_SUCCESS;
12671 static enum ndr_err_code ndr_pull_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARADTREPORTSECURITYEVENT *r)
12673 if (flags & NDR_IN) {
12675 if (flags & NDR_OUT) {
12676 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12678 return NDR_ERR_SUCCESS;
12681 _PUBLIC_ void ndr_print_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r)
12683 ndr_print_struct(ndr, name, "lsa_LSARADTREPORTSECURITYEVENT");
12684 ndr->depth++;
12685 if (flags & NDR_SET_VALUES) {
12686 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12688 if (flags & NDR_IN) {
12689 ndr_print_struct(ndr, "in", "lsa_LSARADTREPORTSECURITYEVENT");
12690 ndr->depth++;
12691 ndr->depth--;
12693 if (flags & NDR_OUT) {
12694 ndr_print_struct(ndr, "out", "lsa_LSARADTREPORTSECURITYEVENT");
12695 ndr->depth++;
12696 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12697 ndr->depth--;
12699 ndr->depth--;
12702 static const struct ndr_interface_call lsarpc_calls[] = {
12704 "lsa_Close",
12705 sizeof(struct lsa_Close),
12706 (ndr_push_flags_fn_t) ndr_push_lsa_Close,
12707 (ndr_pull_flags_fn_t) ndr_pull_lsa_Close,
12708 (ndr_print_function_t) ndr_print_lsa_Close,
12709 false,
12712 "lsa_Delete",
12713 sizeof(struct lsa_Delete),
12714 (ndr_push_flags_fn_t) ndr_push_lsa_Delete,
12715 (ndr_pull_flags_fn_t) ndr_pull_lsa_Delete,
12716 (ndr_print_function_t) ndr_print_lsa_Delete,
12717 false,
12720 "lsa_EnumPrivs",
12721 sizeof(struct lsa_EnumPrivs),
12722 (ndr_push_flags_fn_t) ndr_push_lsa_EnumPrivs,
12723 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumPrivs,
12724 (ndr_print_function_t) ndr_print_lsa_EnumPrivs,
12725 false,
12728 "lsa_QuerySecurity",
12729 sizeof(struct lsa_QuerySecurity),
12730 (ndr_push_flags_fn_t) ndr_push_lsa_QuerySecurity,
12731 (ndr_pull_flags_fn_t) ndr_pull_lsa_QuerySecurity,
12732 (ndr_print_function_t) ndr_print_lsa_QuerySecurity,
12733 false,
12736 "lsa_SetSecObj",
12737 sizeof(struct lsa_SetSecObj),
12738 (ndr_push_flags_fn_t) ndr_push_lsa_SetSecObj,
12739 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSecObj,
12740 (ndr_print_function_t) ndr_print_lsa_SetSecObj,
12741 false,
12744 "lsa_ChangePassword",
12745 sizeof(struct lsa_ChangePassword),
12746 (ndr_push_flags_fn_t) ndr_push_lsa_ChangePassword,
12747 (ndr_pull_flags_fn_t) ndr_pull_lsa_ChangePassword,
12748 (ndr_print_function_t) ndr_print_lsa_ChangePassword,
12749 false,
12752 "lsa_OpenPolicy",
12753 sizeof(struct lsa_OpenPolicy),
12754 (ndr_push_flags_fn_t) ndr_push_lsa_OpenPolicy,
12755 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenPolicy,
12756 (ndr_print_function_t) ndr_print_lsa_OpenPolicy,
12757 false,
12760 "lsa_QueryInfoPolicy",
12761 sizeof(struct lsa_QueryInfoPolicy),
12762 (ndr_push_flags_fn_t) ndr_push_lsa_QueryInfoPolicy,
12763 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryInfoPolicy,
12764 (ndr_print_function_t) ndr_print_lsa_QueryInfoPolicy,
12765 false,
12768 "lsa_SetInfoPolicy",
12769 sizeof(struct lsa_SetInfoPolicy),
12770 (ndr_push_flags_fn_t) ndr_push_lsa_SetInfoPolicy,
12771 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInfoPolicy,
12772 (ndr_print_function_t) ndr_print_lsa_SetInfoPolicy,
12773 false,
12776 "lsa_ClearAuditLog",
12777 sizeof(struct lsa_ClearAuditLog),
12778 (ndr_push_flags_fn_t) ndr_push_lsa_ClearAuditLog,
12779 (ndr_pull_flags_fn_t) ndr_pull_lsa_ClearAuditLog,
12780 (ndr_print_function_t) ndr_print_lsa_ClearAuditLog,
12781 false,
12784 "lsa_CreateAccount",
12785 sizeof(struct lsa_CreateAccount),
12786 (ndr_push_flags_fn_t) ndr_push_lsa_CreateAccount,
12787 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateAccount,
12788 (ndr_print_function_t) ndr_print_lsa_CreateAccount,
12789 false,
12792 "lsa_EnumAccounts",
12793 sizeof(struct lsa_EnumAccounts),
12794 (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccounts,
12795 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccounts,
12796 (ndr_print_function_t) ndr_print_lsa_EnumAccounts,
12797 false,
12800 "lsa_CreateTrustedDomain",
12801 sizeof(struct lsa_CreateTrustedDomain),
12802 (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomain,
12803 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomain,
12804 (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomain,
12805 false,
12808 "lsa_EnumTrustDom",
12809 sizeof(struct lsa_EnumTrustDom),
12810 (ndr_push_flags_fn_t) ndr_push_lsa_EnumTrustDom,
12811 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumTrustDom,
12812 (ndr_print_function_t) ndr_print_lsa_EnumTrustDom,
12813 false,
12816 "lsa_LookupNames",
12817 sizeof(struct lsa_LookupNames),
12818 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames,
12819 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames,
12820 (ndr_print_function_t) ndr_print_lsa_LookupNames,
12821 false,
12824 "lsa_LookupSids",
12825 sizeof(struct lsa_LookupSids),
12826 (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids,
12827 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids,
12828 (ndr_print_function_t) ndr_print_lsa_LookupSids,
12829 false,
12832 "lsa_CreateSecret",
12833 sizeof(struct lsa_CreateSecret),
12834 (ndr_push_flags_fn_t) ndr_push_lsa_CreateSecret,
12835 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateSecret,
12836 (ndr_print_function_t) ndr_print_lsa_CreateSecret,
12837 false,
12840 "lsa_OpenAccount",
12841 sizeof(struct lsa_OpenAccount),
12842 (ndr_push_flags_fn_t) ndr_push_lsa_OpenAccount,
12843 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenAccount,
12844 (ndr_print_function_t) ndr_print_lsa_OpenAccount,
12845 false,
12848 "lsa_EnumPrivsAccount",
12849 sizeof(struct lsa_EnumPrivsAccount),
12850 (ndr_push_flags_fn_t) ndr_push_lsa_EnumPrivsAccount,
12851 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumPrivsAccount,
12852 (ndr_print_function_t) ndr_print_lsa_EnumPrivsAccount,
12853 false,
12856 "lsa_AddPrivilegesToAccount",
12857 sizeof(struct lsa_AddPrivilegesToAccount),
12858 (ndr_push_flags_fn_t) ndr_push_lsa_AddPrivilegesToAccount,
12859 (ndr_pull_flags_fn_t) ndr_pull_lsa_AddPrivilegesToAccount,
12860 (ndr_print_function_t) ndr_print_lsa_AddPrivilegesToAccount,
12861 false,
12864 "lsa_RemovePrivilegesFromAccount",
12865 sizeof(struct lsa_RemovePrivilegesFromAccount),
12866 (ndr_push_flags_fn_t) ndr_push_lsa_RemovePrivilegesFromAccount,
12867 (ndr_pull_flags_fn_t) ndr_pull_lsa_RemovePrivilegesFromAccount,
12868 (ndr_print_function_t) ndr_print_lsa_RemovePrivilegesFromAccount,
12869 false,
12872 "lsa_GetQuotasForAccount",
12873 sizeof(struct lsa_GetQuotasForAccount),
12874 (ndr_push_flags_fn_t) ndr_push_lsa_GetQuotasForAccount,
12875 (ndr_pull_flags_fn_t) ndr_pull_lsa_GetQuotasForAccount,
12876 (ndr_print_function_t) ndr_print_lsa_GetQuotasForAccount,
12877 false,
12880 "lsa_SetQuotasForAccount",
12881 sizeof(struct lsa_SetQuotasForAccount),
12882 (ndr_push_flags_fn_t) ndr_push_lsa_SetQuotasForAccount,
12883 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetQuotasForAccount,
12884 (ndr_print_function_t) ndr_print_lsa_SetQuotasForAccount,
12885 false,
12888 "lsa_GetSystemAccessAccount",
12889 sizeof(struct lsa_GetSystemAccessAccount),
12890 (ndr_push_flags_fn_t) ndr_push_lsa_GetSystemAccessAccount,
12891 (ndr_pull_flags_fn_t) ndr_pull_lsa_GetSystemAccessAccount,
12892 (ndr_print_function_t) ndr_print_lsa_GetSystemAccessAccount,
12893 false,
12896 "lsa_SetSystemAccessAccount",
12897 sizeof(struct lsa_SetSystemAccessAccount),
12898 (ndr_push_flags_fn_t) ndr_push_lsa_SetSystemAccessAccount,
12899 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSystemAccessAccount,
12900 (ndr_print_function_t) ndr_print_lsa_SetSystemAccessAccount,
12901 false,
12904 "lsa_OpenTrustedDomain",
12905 sizeof(struct lsa_OpenTrustedDomain),
12906 (ndr_push_flags_fn_t) ndr_push_lsa_OpenTrustedDomain,
12907 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenTrustedDomain,
12908 (ndr_print_function_t) ndr_print_lsa_OpenTrustedDomain,
12909 false,
12912 "lsa_QueryTrustedDomainInfo",
12913 sizeof(struct lsa_QueryTrustedDomainInfo),
12914 (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfo,
12915 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfo,
12916 (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfo,
12917 false,
12920 "lsa_SetInformationTrustedDomain",
12921 sizeof(struct lsa_SetInformationTrustedDomain),
12922 (ndr_push_flags_fn_t) ndr_push_lsa_SetInformationTrustedDomain,
12923 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInformationTrustedDomain,
12924 (ndr_print_function_t) ndr_print_lsa_SetInformationTrustedDomain,
12925 false,
12928 "lsa_OpenSecret",
12929 sizeof(struct lsa_OpenSecret),
12930 (ndr_push_flags_fn_t) ndr_push_lsa_OpenSecret,
12931 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenSecret,
12932 (ndr_print_function_t) ndr_print_lsa_OpenSecret,
12933 false,
12936 "lsa_SetSecret",
12937 sizeof(struct lsa_SetSecret),
12938 (ndr_push_flags_fn_t) ndr_push_lsa_SetSecret,
12939 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSecret,
12940 (ndr_print_function_t) ndr_print_lsa_SetSecret,
12941 false,
12944 "lsa_QuerySecret",
12945 sizeof(struct lsa_QuerySecret),
12946 (ndr_push_flags_fn_t) ndr_push_lsa_QuerySecret,
12947 (ndr_pull_flags_fn_t) ndr_pull_lsa_QuerySecret,
12948 (ndr_print_function_t) ndr_print_lsa_QuerySecret,
12949 false,
12952 "lsa_LookupPrivValue",
12953 sizeof(struct lsa_LookupPrivValue),
12954 (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivValue,
12955 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivValue,
12956 (ndr_print_function_t) ndr_print_lsa_LookupPrivValue,
12957 false,
12960 "lsa_LookupPrivName",
12961 sizeof(struct lsa_LookupPrivName),
12962 (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivName,
12963 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivName,
12964 (ndr_print_function_t) ndr_print_lsa_LookupPrivName,
12965 false,
12968 "lsa_LookupPrivDisplayName",
12969 sizeof(struct lsa_LookupPrivDisplayName),
12970 (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivDisplayName,
12971 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivDisplayName,
12972 (ndr_print_function_t) ndr_print_lsa_LookupPrivDisplayName,
12973 false,
12976 "lsa_DeleteObject",
12977 sizeof(struct lsa_DeleteObject),
12978 (ndr_push_flags_fn_t) ndr_push_lsa_DeleteObject,
12979 (ndr_pull_flags_fn_t) ndr_pull_lsa_DeleteObject,
12980 (ndr_print_function_t) ndr_print_lsa_DeleteObject,
12981 false,
12984 "lsa_EnumAccountsWithUserRight",
12985 sizeof(struct lsa_EnumAccountsWithUserRight),
12986 (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccountsWithUserRight,
12987 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccountsWithUserRight,
12988 (ndr_print_function_t) ndr_print_lsa_EnumAccountsWithUserRight,
12989 false,
12992 "lsa_EnumAccountRights",
12993 sizeof(struct lsa_EnumAccountRights),
12994 (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccountRights,
12995 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccountRights,
12996 (ndr_print_function_t) ndr_print_lsa_EnumAccountRights,
12997 false,
13000 "lsa_AddAccountRights",
13001 sizeof(struct lsa_AddAccountRights),
13002 (ndr_push_flags_fn_t) ndr_push_lsa_AddAccountRights,
13003 (ndr_pull_flags_fn_t) ndr_pull_lsa_AddAccountRights,
13004 (ndr_print_function_t) ndr_print_lsa_AddAccountRights,
13005 false,
13008 "lsa_RemoveAccountRights",
13009 sizeof(struct lsa_RemoveAccountRights),
13010 (ndr_push_flags_fn_t) ndr_push_lsa_RemoveAccountRights,
13011 (ndr_pull_flags_fn_t) ndr_pull_lsa_RemoveAccountRights,
13012 (ndr_print_function_t) ndr_print_lsa_RemoveAccountRights,
13013 false,
13016 "lsa_QueryTrustedDomainInfoBySid",
13017 sizeof(struct lsa_QueryTrustedDomainInfoBySid),
13018 (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfoBySid,
13019 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfoBySid,
13020 (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfoBySid,
13021 false,
13024 "lsa_SetTrustedDomainInfo",
13025 sizeof(struct lsa_SetTrustedDomainInfo),
13026 (ndr_push_flags_fn_t) ndr_push_lsa_SetTrustedDomainInfo,
13027 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetTrustedDomainInfo,
13028 (ndr_print_function_t) ndr_print_lsa_SetTrustedDomainInfo,
13029 false,
13032 "lsa_DeleteTrustedDomain",
13033 sizeof(struct lsa_DeleteTrustedDomain),
13034 (ndr_push_flags_fn_t) ndr_push_lsa_DeleteTrustedDomain,
13035 (ndr_pull_flags_fn_t) ndr_pull_lsa_DeleteTrustedDomain,
13036 (ndr_print_function_t) ndr_print_lsa_DeleteTrustedDomain,
13037 false,
13040 "lsa_StorePrivateData",
13041 sizeof(struct lsa_StorePrivateData),
13042 (ndr_push_flags_fn_t) ndr_push_lsa_StorePrivateData,
13043 (ndr_pull_flags_fn_t) ndr_pull_lsa_StorePrivateData,
13044 (ndr_print_function_t) ndr_print_lsa_StorePrivateData,
13045 false,
13048 "lsa_RetrievePrivateData",
13049 sizeof(struct lsa_RetrievePrivateData),
13050 (ndr_push_flags_fn_t) ndr_push_lsa_RetrievePrivateData,
13051 (ndr_pull_flags_fn_t) ndr_pull_lsa_RetrievePrivateData,
13052 (ndr_print_function_t) ndr_print_lsa_RetrievePrivateData,
13053 false,
13056 "lsa_OpenPolicy2",
13057 sizeof(struct lsa_OpenPolicy2),
13058 (ndr_push_flags_fn_t) ndr_push_lsa_OpenPolicy2,
13059 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenPolicy2,
13060 (ndr_print_function_t) ndr_print_lsa_OpenPolicy2,
13061 false,
13064 "lsa_GetUserName",
13065 sizeof(struct lsa_GetUserName),
13066 (ndr_push_flags_fn_t) ndr_push_lsa_GetUserName,
13067 (ndr_pull_flags_fn_t) ndr_pull_lsa_GetUserName,
13068 (ndr_print_function_t) ndr_print_lsa_GetUserName,
13069 false,
13072 "lsa_QueryInfoPolicy2",
13073 sizeof(struct lsa_QueryInfoPolicy2),
13074 (ndr_push_flags_fn_t) ndr_push_lsa_QueryInfoPolicy2,
13075 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryInfoPolicy2,
13076 (ndr_print_function_t) ndr_print_lsa_QueryInfoPolicy2,
13077 false,
13080 "lsa_SetInfoPolicy2",
13081 sizeof(struct lsa_SetInfoPolicy2),
13082 (ndr_push_flags_fn_t) ndr_push_lsa_SetInfoPolicy2,
13083 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInfoPolicy2,
13084 (ndr_print_function_t) ndr_print_lsa_SetInfoPolicy2,
13085 false,
13088 "lsa_QueryTrustedDomainInfoByName",
13089 sizeof(struct lsa_QueryTrustedDomainInfoByName),
13090 (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfoByName,
13091 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfoByName,
13092 (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfoByName,
13093 false,
13096 "lsa_SetTrustedDomainInfoByName",
13097 sizeof(struct lsa_SetTrustedDomainInfoByName),
13098 (ndr_push_flags_fn_t) ndr_push_lsa_SetTrustedDomainInfoByName,
13099 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetTrustedDomainInfoByName,
13100 (ndr_print_function_t) ndr_print_lsa_SetTrustedDomainInfoByName,
13101 false,
13104 "lsa_EnumTrustedDomainsEx",
13105 sizeof(struct lsa_EnumTrustedDomainsEx),
13106 (ndr_push_flags_fn_t) ndr_push_lsa_EnumTrustedDomainsEx,
13107 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumTrustedDomainsEx,
13108 (ndr_print_function_t) ndr_print_lsa_EnumTrustedDomainsEx,
13109 false,
13112 "lsa_CreateTrustedDomainEx",
13113 sizeof(struct lsa_CreateTrustedDomainEx),
13114 (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomainEx,
13115 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomainEx,
13116 (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomainEx,
13117 false,
13120 "lsa_CloseTrustedDomainEx",
13121 sizeof(struct lsa_CloseTrustedDomainEx),
13122 (ndr_push_flags_fn_t) ndr_push_lsa_CloseTrustedDomainEx,
13123 (ndr_pull_flags_fn_t) ndr_pull_lsa_CloseTrustedDomainEx,
13124 (ndr_print_function_t) ndr_print_lsa_CloseTrustedDomainEx,
13125 false,
13128 "lsa_QueryDomainInformationPolicy",
13129 sizeof(struct lsa_QueryDomainInformationPolicy),
13130 (ndr_push_flags_fn_t) ndr_push_lsa_QueryDomainInformationPolicy,
13131 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryDomainInformationPolicy,
13132 (ndr_print_function_t) ndr_print_lsa_QueryDomainInformationPolicy,
13133 false,
13136 "lsa_SetDomainInformationPolicy",
13137 sizeof(struct lsa_SetDomainInformationPolicy),
13138 (ndr_push_flags_fn_t) ndr_push_lsa_SetDomainInformationPolicy,
13139 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetDomainInformationPolicy,
13140 (ndr_print_function_t) ndr_print_lsa_SetDomainInformationPolicy,
13141 false,
13144 "lsa_OpenTrustedDomainByName",
13145 sizeof(struct lsa_OpenTrustedDomainByName),
13146 (ndr_push_flags_fn_t) ndr_push_lsa_OpenTrustedDomainByName,
13147 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenTrustedDomainByName,
13148 (ndr_print_function_t) ndr_print_lsa_OpenTrustedDomainByName,
13149 false,
13152 "lsa_TestCall",
13153 sizeof(struct lsa_TestCall),
13154 (ndr_push_flags_fn_t) ndr_push_lsa_TestCall,
13155 (ndr_pull_flags_fn_t) ndr_pull_lsa_TestCall,
13156 (ndr_print_function_t) ndr_print_lsa_TestCall,
13157 false,
13160 "lsa_LookupSids2",
13161 sizeof(struct lsa_LookupSids2),
13162 (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids2,
13163 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids2,
13164 (ndr_print_function_t) ndr_print_lsa_LookupSids2,
13165 false,
13168 "lsa_LookupNames2",
13169 sizeof(struct lsa_LookupNames2),
13170 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames2,
13171 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames2,
13172 (ndr_print_function_t) ndr_print_lsa_LookupNames2,
13173 false,
13176 "lsa_CreateTrustedDomainEx2",
13177 sizeof(struct lsa_CreateTrustedDomainEx2),
13178 (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomainEx2,
13179 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomainEx2,
13180 (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomainEx2,
13181 false,
13184 "lsa_CREDRWRITE",
13185 sizeof(struct lsa_CREDRWRITE),
13186 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRWRITE,
13187 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRWRITE,
13188 (ndr_print_function_t) ndr_print_lsa_CREDRWRITE,
13189 false,
13192 "lsa_CREDRREAD",
13193 sizeof(struct lsa_CREDRREAD),
13194 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRREAD,
13195 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRREAD,
13196 (ndr_print_function_t) ndr_print_lsa_CREDRREAD,
13197 false,
13200 "lsa_CREDRENUMERATE",
13201 sizeof(struct lsa_CREDRENUMERATE),
13202 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRENUMERATE,
13203 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRENUMERATE,
13204 (ndr_print_function_t) ndr_print_lsa_CREDRENUMERATE,
13205 false,
13208 "lsa_CREDRWRITEDOMAINCREDENTIALS",
13209 sizeof(struct lsa_CREDRWRITEDOMAINCREDENTIALS),
13210 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS,
13211 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS,
13212 (ndr_print_function_t) ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS,
13213 false,
13216 "lsa_CREDRREADDOMAINCREDENTIALS",
13217 sizeof(struct lsa_CREDRREADDOMAINCREDENTIALS),
13218 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRREADDOMAINCREDENTIALS,
13219 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS,
13220 (ndr_print_function_t) ndr_print_lsa_CREDRREADDOMAINCREDENTIALS,
13221 false,
13224 "lsa_CREDRDELETE",
13225 sizeof(struct lsa_CREDRDELETE),
13226 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRDELETE,
13227 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRDELETE,
13228 (ndr_print_function_t) ndr_print_lsa_CREDRDELETE,
13229 false,
13232 "lsa_CREDRGETTARGETINFO",
13233 sizeof(struct lsa_CREDRGETTARGETINFO),
13234 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRGETTARGETINFO,
13235 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRGETTARGETINFO,
13236 (ndr_print_function_t) ndr_print_lsa_CREDRGETTARGETINFO,
13237 false,
13240 "lsa_CREDRPROFILELOADED",
13241 sizeof(struct lsa_CREDRPROFILELOADED),
13242 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRPROFILELOADED,
13243 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRPROFILELOADED,
13244 (ndr_print_function_t) ndr_print_lsa_CREDRPROFILELOADED,
13245 false,
13248 "lsa_LookupNames3",
13249 sizeof(struct lsa_LookupNames3),
13250 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames3,
13251 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames3,
13252 (ndr_print_function_t) ndr_print_lsa_LookupNames3,
13253 false,
13256 "lsa_CREDRGETSESSIONTYPES",
13257 sizeof(struct lsa_CREDRGETSESSIONTYPES),
13258 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRGETSESSIONTYPES,
13259 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRGETSESSIONTYPES,
13260 (ndr_print_function_t) ndr_print_lsa_CREDRGETSESSIONTYPES,
13261 false,
13264 "lsa_LSARREGISTERAUDITEVENT",
13265 sizeof(struct lsa_LSARREGISTERAUDITEVENT),
13266 (ndr_push_flags_fn_t) ndr_push_lsa_LSARREGISTERAUDITEVENT,
13267 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARREGISTERAUDITEVENT,
13268 (ndr_print_function_t) ndr_print_lsa_LSARREGISTERAUDITEVENT,
13269 false,
13272 "lsa_LSARGENAUDITEVENT",
13273 sizeof(struct lsa_LSARGENAUDITEVENT),
13274 (ndr_push_flags_fn_t) ndr_push_lsa_LSARGENAUDITEVENT,
13275 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARGENAUDITEVENT,
13276 (ndr_print_function_t) ndr_print_lsa_LSARGENAUDITEVENT,
13277 false,
13280 "lsa_LSARUNREGISTERAUDITEVENT",
13281 sizeof(struct lsa_LSARUNREGISTERAUDITEVENT),
13282 (ndr_push_flags_fn_t) ndr_push_lsa_LSARUNREGISTERAUDITEVENT,
13283 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARUNREGISTERAUDITEVENT,
13284 (ndr_print_function_t) ndr_print_lsa_LSARUNREGISTERAUDITEVENT,
13285 false,
13288 "lsa_lsaRQueryForestTrustInformation",
13289 sizeof(struct lsa_lsaRQueryForestTrustInformation),
13290 (ndr_push_flags_fn_t) ndr_push_lsa_lsaRQueryForestTrustInformation,
13291 (ndr_pull_flags_fn_t) ndr_pull_lsa_lsaRQueryForestTrustInformation,
13292 (ndr_print_function_t) ndr_print_lsa_lsaRQueryForestTrustInformation,
13293 false,
13296 "lsa_LSARSETFORESTTRUSTINFORMATION",
13297 sizeof(struct lsa_LSARSETFORESTTRUSTINFORMATION),
13298 (ndr_push_flags_fn_t) ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION,
13299 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION,
13300 (ndr_print_function_t) ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION,
13301 false,
13304 "lsa_CREDRRENAME",
13305 sizeof(struct lsa_CREDRRENAME),
13306 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRRENAME,
13307 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRRENAME,
13308 (ndr_print_function_t) ndr_print_lsa_CREDRRENAME,
13309 false,
13312 "lsa_LookupSids3",
13313 sizeof(struct lsa_LookupSids3),
13314 (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids3,
13315 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids3,
13316 (ndr_print_function_t) ndr_print_lsa_LookupSids3,
13317 false,
13320 "lsa_LookupNames4",
13321 sizeof(struct lsa_LookupNames4),
13322 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames4,
13323 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames4,
13324 (ndr_print_function_t) ndr_print_lsa_LookupNames4,
13325 false,
13328 "lsa_LSAROPENPOLICYSCE",
13329 sizeof(struct lsa_LSAROPENPOLICYSCE),
13330 (ndr_push_flags_fn_t) ndr_push_lsa_LSAROPENPOLICYSCE,
13331 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSAROPENPOLICYSCE,
13332 (ndr_print_function_t) ndr_print_lsa_LSAROPENPOLICYSCE,
13333 false,
13336 "lsa_LSARADTREGISTERSECURITYEVENTSOURCE",
13337 sizeof(struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE),
13338 (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
13339 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
13340 (ndr_print_function_t) ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
13341 false,
13344 "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE",
13345 sizeof(struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE),
13346 (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
13347 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
13348 (ndr_print_function_t) ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
13349 false,
13352 "lsa_LSARADTREPORTSECURITYEVENT",
13353 sizeof(struct lsa_LSARADTREPORTSECURITYEVENT),
13354 (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTREPORTSECURITYEVENT,
13355 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTREPORTSECURITYEVENT,
13356 (ndr_print_function_t) ndr_print_lsa_LSARADTREPORTSECURITYEVENT,
13357 false,
13359 { NULL, 0, NULL, NULL, NULL, false }
13362 static const char * const lsarpc_endpoint_strings[] = {
13363 "ncacn_np:[\\pipe\\lsarpc]",
13364 "ncacn_np:[\\pipe\\netlogon]",
13365 "ncacn_np:[\\pipe\\lsass]",
13366 "ncacn_ip_tcp:",
13367 "ncalrpc:",
13370 static const struct ndr_interface_string_array lsarpc_endpoints = {
13371 .count = 5,
13372 .names = lsarpc_endpoint_strings
13375 static const char * const lsarpc_authservice_strings[] = {
13376 "host",
13379 static const struct ndr_interface_string_array lsarpc_authservices = {
13380 .count = 1,
13381 .names = lsarpc_authservice_strings
13385 const struct ndr_interface_table ndr_table_lsarpc = {
13386 .name = "lsarpc",
13387 .syntax_id = {
13388 {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xab}},
13389 NDR_LSARPC_VERSION
13391 .helpstring = NDR_LSARPC_HELPSTRING,
13392 .num_calls = 82,
13393 .calls = lsarpc_calls,
13394 .endpoints = &lsarpc_endpoints,
13395 .authservices = &lsarpc_authservices