s3/smbldap: add option to disable following LDAP refs
[Samba.git] / librpc / gen_ndr / ndr_lsa.c
blob37784dab371f418d0c090d62fe3e6db03fc40f04
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_lsa.h"
6 #include "librpc/gen_ndr/ndr_misc.h"
7 #include "librpc/gen_ndr/ndr_security.h"
8 _PUBLIC_ enum ndr_err_code ndr_push_lsa_String(struct ndr_push *ndr, int ndr_flags, const struct lsa_String *r)
10 if (ndr_flags & NDR_SCALARS) {
11 NDR_CHECK(ndr_push_align(ndr, 5));
12 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
13 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
14 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
16 if (ndr_flags & NDR_BUFFERS) {
17 if (r->string) {
18 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
19 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
20 NDR_CHECK(ndr_push_uint3264(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 TALLOC_CTX *_mem_save_string_0;
31 if (ndr_flags & NDR_SCALARS) {
32 NDR_CHECK(ndr_pull_align(ndr, 5));
33 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
34 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
35 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
36 if (_ptr_string) {
37 NDR_PULL_ALLOC(ndr, r->string);
38 } else {
39 r->string = NULL;
42 if (ndr_flags & NDR_BUFFERS) {
43 if (r->string) {
44 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
45 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
46 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
47 NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
48 if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
49 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string));
51 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
52 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
54 if (r->string) {
55 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size / 2));
57 if (r->string) {
58 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length / 2));
61 return NDR_ERR_SUCCESS;
64 _PUBLIC_ void ndr_print_lsa_String(struct ndr_print *ndr, const char *name, const struct lsa_String *r)
66 ndr_print_struct(ndr, name, "lsa_String");
67 ndr->depth++;
68 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
69 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->size);
70 ndr_print_ptr(ndr, "string", r->string);
71 ndr->depth++;
72 if (r->string) {
73 ndr_print_string(ndr, "string", r->string);
75 ndr->depth--;
76 ndr->depth--;
79 _PUBLIC_ enum ndr_err_code ndr_push_lsa_StringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_StringLarge *r)
81 if (ndr_flags & NDR_SCALARS) {
82 NDR_CHECK(ndr_push_align(ndr, 5));
83 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
84 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m_term(r->string)));
85 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
87 if (ndr_flags & NDR_BUFFERS) {
88 if (r->string) {
89 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 2 * strlen_m_term(r->string) / 2));
90 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
91 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
92 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2 * strlen_m(r->string) / 2, sizeof(uint16_t), CH_UTF16));
95 return NDR_ERR_SUCCESS;
98 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_StringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_StringLarge *r)
100 uint32_t _ptr_string;
101 TALLOC_CTX *_mem_save_string_0;
102 if (ndr_flags & NDR_SCALARS) {
103 NDR_CHECK(ndr_pull_align(ndr, 5));
104 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
105 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
106 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
107 if (_ptr_string) {
108 NDR_PULL_ALLOC(ndr, r->string);
109 } else {
110 r->string = NULL;
113 if (ndr_flags & NDR_BUFFERS) {
114 if (r->string) {
115 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
116 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
117 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
118 NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
119 if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
120 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string));
122 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
123 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
125 if (r->string) {
126 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size / 2));
128 if (r->string) {
129 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length / 2));
132 return NDR_ERR_SUCCESS;
135 _PUBLIC_ void ndr_print_lsa_StringLarge(struct ndr_print *ndr, const char *name, const struct lsa_StringLarge *r)
137 ndr_print_struct(ndr, name, "lsa_StringLarge");
138 ndr->depth++;
139 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
140 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->string):r->size);
141 ndr_print_ptr(ndr, "string", r->string);
142 ndr->depth++;
143 if (r->string) {
144 ndr_print_string(ndr, "string", r->string);
146 ndr->depth--;
147 ndr->depth--;
150 _PUBLIC_ enum ndr_err_code ndr_push_lsa_Strings(struct ndr_push *ndr, int ndr_flags, const struct lsa_Strings *r)
152 uint32_t cntr_names_1;
153 if (ndr_flags & NDR_SCALARS) {
154 NDR_CHECK(ndr_push_align(ndr, 5));
155 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
156 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
158 if (ndr_flags & NDR_BUFFERS) {
159 if (r->names) {
160 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
161 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
162 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
164 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
165 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
169 return NDR_ERR_SUCCESS;
172 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Strings(struct ndr_pull *ndr, int ndr_flags, struct lsa_Strings *r)
174 uint32_t _ptr_names;
175 uint32_t cntr_names_1;
176 TALLOC_CTX *_mem_save_names_0;
177 TALLOC_CTX *_mem_save_names_1;
178 if (ndr_flags & NDR_SCALARS) {
179 NDR_CHECK(ndr_pull_align(ndr, 5));
180 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
181 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
182 if (_ptr_names) {
183 NDR_PULL_ALLOC(ndr, r->names);
184 } else {
185 r->names = NULL;
188 if (ndr_flags & NDR_BUFFERS) {
189 if (r->names) {
190 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
191 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
192 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
193 NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
194 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
195 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
196 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
197 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
199 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
200 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
202 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
203 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
205 if (r->names) {
206 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
209 return NDR_ERR_SUCCESS;
212 _PUBLIC_ void ndr_print_lsa_Strings(struct ndr_print *ndr, const char *name, const struct lsa_Strings *r)
214 uint32_t cntr_names_1;
215 ndr_print_struct(ndr, name, "lsa_Strings");
216 ndr->depth++;
217 ndr_print_uint32(ndr, "count", r->count);
218 ndr_print_ptr(ndr, "names", r->names);
219 ndr->depth++;
220 if (r->names) {
221 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
222 ndr->depth++;
223 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
224 char *idx_1=NULL;
225 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
226 ndr_print_lsa_String(ndr, "names", &r->names[cntr_names_1]);
227 free(idx_1);
230 ndr->depth--;
232 ndr->depth--;
233 ndr->depth--;
236 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiString(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiString *r)
238 if (ndr_flags & NDR_SCALARS) {
239 NDR_CHECK(ndr_push_align(ndr, 5));
240 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
241 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
242 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
244 if (ndr_flags & NDR_BUFFERS) {
245 if (r->string) {
246 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m(r->string)));
247 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
248 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m(r->string)));
249 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, strlen_m(r->string), sizeof(uint8_t), CH_DOS));
252 return NDR_ERR_SUCCESS;
255 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiString(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiString *r)
257 uint32_t _ptr_string;
258 TALLOC_CTX *_mem_save_string_0;
259 if (ndr_flags & NDR_SCALARS) {
260 NDR_CHECK(ndr_pull_align(ndr, 5));
261 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
262 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
263 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
264 if (_ptr_string) {
265 NDR_PULL_ALLOC(ndr, r->string);
266 } else {
267 r->string = NULL;
270 if (ndr_flags & NDR_BUFFERS) {
271 if (r->string) {
272 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
273 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
274 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
275 NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
276 if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
277 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string));
279 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint8_t), CH_DOS));
280 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
282 if (r->string) {
283 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size));
285 if (r->string) {
286 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length));
289 return NDR_ERR_SUCCESS;
292 _PUBLIC_ void ndr_print_lsa_AsciiString(struct ndr_print *ndr, const char *name, const struct lsa_AsciiString *r)
294 ndr_print_struct(ndr, name, "lsa_AsciiString");
295 ndr->depth++;
296 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->length);
297 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->size);
298 ndr_print_ptr(ndr, "string", r->string);
299 ndr->depth++;
300 if (r->string) {
301 ndr_print_string(ndr, "string", r->string);
303 ndr->depth--;
304 ndr->depth--;
307 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiStringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiStringLarge *r)
309 if (ndr_flags & NDR_SCALARS) {
310 NDR_CHECK(ndr_push_align(ndr, 5));
311 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
312 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->string)));
313 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
315 if (ndr_flags & NDR_BUFFERS) {
316 if (r->string) {
317 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m_term(r->string)));
318 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
319 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m(r->string)));
320 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, strlen_m(r->string), sizeof(uint8_t), CH_DOS));
323 return NDR_ERR_SUCCESS;
326 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiStringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiStringLarge *r)
328 uint32_t _ptr_string;
329 TALLOC_CTX *_mem_save_string_0;
330 if (ndr_flags & NDR_SCALARS) {
331 NDR_CHECK(ndr_pull_align(ndr, 5));
332 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
333 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
334 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
335 if (_ptr_string) {
336 NDR_PULL_ALLOC(ndr, r->string);
337 } else {
338 r->string = NULL;
341 if (ndr_flags & NDR_BUFFERS) {
342 if (r->string) {
343 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
344 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
345 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
346 NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
347 if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
348 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string));
350 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint8_t), CH_DOS));
351 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
353 if (r->string) {
354 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size));
356 if (r->string) {
357 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length));
360 return NDR_ERR_SUCCESS;
363 _PUBLIC_ void ndr_print_lsa_AsciiStringLarge(struct ndr_print *ndr, const char *name, const struct lsa_AsciiStringLarge *r)
365 ndr_print_struct(ndr, name, "lsa_AsciiStringLarge");
366 ndr->depth++;
367 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->length);
368 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->string):r->size);
369 ndr_print_ptr(ndr, "string", r->string);
370 ndr->depth++;
371 if (r->string) {
372 ndr_print_string(ndr, "string", r->string);
374 ndr->depth--;
375 ndr->depth--;
378 _PUBLIC_ enum ndr_err_code ndr_push_lsa_BinaryString(struct ndr_push *ndr, int ndr_flags, const struct lsa_BinaryString *r)
380 uint32_t cntr_array_1;
381 if (ndr_flags & NDR_SCALARS) {
382 NDR_CHECK(ndr_push_align(ndr, 5));
383 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
384 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
385 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
387 if (ndr_flags & NDR_BUFFERS) {
388 if (r->array) {
389 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size / 2));
390 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
391 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length / 2));
392 for (cntr_array_1 = 0; cntr_array_1 < r->length / 2; cntr_array_1++) {
393 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->array[cntr_array_1]));
397 return NDR_ERR_SUCCESS;
400 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_BinaryString(struct ndr_pull *ndr, int ndr_flags, struct lsa_BinaryString *r)
402 uint32_t _ptr_array;
403 uint32_t cntr_array_1;
404 TALLOC_CTX *_mem_save_array_0;
405 TALLOC_CTX *_mem_save_array_1;
406 if (ndr_flags & NDR_SCALARS) {
407 NDR_CHECK(ndr_pull_align(ndr, 5));
408 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
409 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
410 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
411 if (_ptr_array) {
412 NDR_PULL_ALLOC(ndr, r->array);
413 } else {
414 r->array = NULL;
417 if (ndr_flags & NDR_BUFFERS) {
418 if (r->array) {
419 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
420 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
421 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
422 NDR_CHECK(ndr_pull_array_length(ndr, &r->array));
423 if (ndr_get_array_length(ndr, &r->array) > ndr_get_array_size(ndr, &r->array)) {
424 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->array), ndr_get_array_length(ndr, &r->array));
426 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
427 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
428 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
429 for (cntr_array_1 = 0; cntr_array_1 < ndr_get_array_length(ndr, &r->array); cntr_array_1++) {
430 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
432 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
433 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
435 if (r->array) {
436 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->size / 2));
438 if (r->array) {
439 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->array, r->length / 2));
442 return NDR_ERR_SUCCESS;
445 _PUBLIC_ void ndr_print_lsa_BinaryString(struct ndr_print *ndr, const char *name, const struct lsa_BinaryString *r)
447 uint32_t cntr_array_1;
448 ndr_print_struct(ndr, name, "lsa_BinaryString");
449 ndr->depth++;
450 ndr_print_uint16(ndr, "length", r->length);
451 ndr_print_uint16(ndr, "size", r->size);
452 ndr_print_ptr(ndr, "array", r->array);
453 ndr->depth++;
454 if (r->array) {
455 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->length / 2);
456 ndr->depth++;
457 for (cntr_array_1=0;cntr_array_1<r->length / 2;cntr_array_1++) {
458 char *idx_1=NULL;
459 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
460 ndr_print_uint16(ndr, "array", r->array[cntr_array_1]);
461 free(idx_1);
464 ndr->depth--;
466 ndr->depth--;
467 ndr->depth--;
470 static enum ndr_err_code ndr_push_lsa_LUID(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUID *r)
472 if (ndr_flags & NDR_SCALARS) {
473 NDR_CHECK(ndr_push_align(ndr, 4));
474 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->low));
475 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->high));
477 if (ndr_flags & NDR_BUFFERS) {
479 return NDR_ERR_SUCCESS;
482 static enum ndr_err_code ndr_pull_lsa_LUID(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUID *r)
484 if (ndr_flags & NDR_SCALARS) {
485 NDR_CHECK(ndr_pull_align(ndr, 4));
486 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->low));
487 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->high));
489 if (ndr_flags & NDR_BUFFERS) {
491 return NDR_ERR_SUCCESS;
494 _PUBLIC_ void ndr_print_lsa_LUID(struct ndr_print *ndr, const char *name, const struct lsa_LUID *r)
496 ndr_print_struct(ndr, name, "lsa_LUID");
497 ndr->depth++;
498 ndr_print_uint32(ndr, "low", r->low);
499 ndr_print_uint32(ndr, "high", r->high);
500 ndr->depth--;
503 static enum ndr_err_code ndr_push_lsa_PrivEntry(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivEntry *r)
505 if (ndr_flags & NDR_SCALARS) {
506 NDR_CHECK(ndr_push_align(ndr, 5));
507 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
508 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
510 if (ndr_flags & NDR_BUFFERS) {
511 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
513 return NDR_ERR_SUCCESS;
516 static enum ndr_err_code ndr_pull_lsa_PrivEntry(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivEntry *r)
518 if (ndr_flags & NDR_SCALARS) {
519 NDR_CHECK(ndr_pull_align(ndr, 5));
520 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
521 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
523 if (ndr_flags & NDR_BUFFERS) {
524 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
526 return NDR_ERR_SUCCESS;
529 _PUBLIC_ void ndr_print_lsa_PrivEntry(struct ndr_print *ndr, const char *name, const struct lsa_PrivEntry *r)
531 ndr_print_struct(ndr, name, "lsa_PrivEntry");
532 ndr->depth++;
533 ndr_print_lsa_StringLarge(ndr, "name", &r->name);
534 ndr_print_lsa_LUID(ndr, "luid", &r->luid);
535 ndr->depth--;
538 static enum ndr_err_code ndr_push_lsa_PrivArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivArray *r)
540 uint32_t cntr_privs_1;
541 if (ndr_flags & NDR_SCALARS) {
542 NDR_CHECK(ndr_push_align(ndr, 5));
543 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
544 NDR_CHECK(ndr_push_unique_ptr(ndr, r->privs));
546 if (ndr_flags & NDR_BUFFERS) {
547 if (r->privs) {
548 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
549 for (cntr_privs_1 = 0; cntr_privs_1 < r->count; cntr_privs_1++) {
550 NDR_CHECK(ndr_push_lsa_PrivEntry(ndr, NDR_SCALARS, &r->privs[cntr_privs_1]));
552 for (cntr_privs_1 = 0; cntr_privs_1 < r->count; cntr_privs_1++) {
553 NDR_CHECK(ndr_push_lsa_PrivEntry(ndr, NDR_BUFFERS, &r->privs[cntr_privs_1]));
557 return NDR_ERR_SUCCESS;
560 static enum ndr_err_code ndr_pull_lsa_PrivArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivArray *r)
562 uint32_t _ptr_privs;
563 uint32_t cntr_privs_1;
564 TALLOC_CTX *_mem_save_privs_0;
565 TALLOC_CTX *_mem_save_privs_1;
566 if (ndr_flags & NDR_SCALARS) {
567 NDR_CHECK(ndr_pull_align(ndr, 5));
568 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
569 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
570 if (_ptr_privs) {
571 NDR_PULL_ALLOC(ndr, r->privs);
572 } else {
573 r->privs = NULL;
576 if (ndr_flags & NDR_BUFFERS) {
577 if (r->privs) {
578 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
579 NDR_PULL_SET_MEM_CTX(ndr, r->privs, 0);
580 NDR_CHECK(ndr_pull_array_size(ndr, &r->privs));
581 NDR_PULL_ALLOC_N(ndr, r->privs, ndr_get_array_size(ndr, &r->privs));
582 _mem_save_privs_1 = NDR_PULL_GET_MEM_CTX(ndr);
583 NDR_PULL_SET_MEM_CTX(ndr, r->privs, 0);
584 for (cntr_privs_1 = 0; cntr_privs_1 < r->count; cntr_privs_1++) {
585 NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr, NDR_SCALARS, &r->privs[cntr_privs_1]));
587 for (cntr_privs_1 = 0; cntr_privs_1 < r->count; cntr_privs_1++) {
588 NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr, NDR_BUFFERS, &r->privs[cntr_privs_1]));
590 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_1, 0);
591 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0);
593 if (r->privs) {
594 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->privs, r->count));
597 return NDR_ERR_SUCCESS;
600 _PUBLIC_ void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, const struct lsa_PrivArray *r)
602 uint32_t cntr_privs_1;
603 ndr_print_struct(ndr, name, "lsa_PrivArray");
604 ndr->depth++;
605 ndr_print_uint32(ndr, "count", r->count);
606 ndr_print_ptr(ndr, "privs", r->privs);
607 ndr->depth++;
608 if (r->privs) {
609 ndr->print(ndr, "%s: ARRAY(%d)", "privs", (int)r->count);
610 ndr->depth++;
611 for (cntr_privs_1=0;cntr_privs_1<r->count;cntr_privs_1++) {
612 char *idx_1=NULL;
613 if (asprintf(&idx_1, "[%d]", cntr_privs_1) != -1) {
614 ndr_print_lsa_PrivEntry(ndr, "privs", &r->privs[cntr_privs_1]);
615 free(idx_1);
618 ndr->depth--;
620 ndr->depth--;
621 ndr->depth--;
624 static enum ndr_err_code ndr_push_lsa_QosInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_QosInfo *r)
626 if (ndr_flags & NDR_SCALARS) {
627 NDR_CHECK(ndr_push_align(ndr, 4));
628 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
629 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->impersonation_level));
630 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->context_mode));
631 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->effective_only));
633 if (ndr_flags & NDR_BUFFERS) {
635 return NDR_ERR_SUCCESS;
638 static enum ndr_err_code ndr_pull_lsa_QosInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_QosInfo *r)
640 if (ndr_flags & NDR_SCALARS) {
641 NDR_CHECK(ndr_pull_align(ndr, 4));
642 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
643 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->impersonation_level));
644 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->context_mode));
645 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->effective_only));
647 if (ndr_flags & NDR_BUFFERS) {
649 return NDR_ERR_SUCCESS;
652 _PUBLIC_ void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, const struct lsa_QosInfo *r)
654 ndr_print_struct(ndr, name, "lsa_QosInfo");
655 ndr->depth++;
656 ndr_print_uint32(ndr, "len", r->len);
657 ndr_print_uint16(ndr, "impersonation_level", r->impersonation_level);
658 ndr_print_uint8(ndr, "context_mode", r->context_mode);
659 ndr_print_uint8(ndr, "effective_only", r->effective_only);
660 ndr->depth--;
663 static enum ndr_err_code ndr_push_lsa_ObjectAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_ObjectAttribute *r)
665 if (ndr_flags & NDR_SCALARS) {
666 NDR_CHECK(ndr_push_align(ndr, 5));
667 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
668 NDR_CHECK(ndr_push_unique_ptr(ndr, r->root_dir));
669 NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_name));
670 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attributes));
671 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sec_desc));
672 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sec_qos));
674 if (ndr_flags & NDR_BUFFERS) {
675 if (r->root_dir) {
676 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->root_dir));
678 if (r->object_name) {
679 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_name, CH_UTF16)));
680 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
681 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_name, CH_UTF16)));
682 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_name, ndr_charset_length(r->object_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
684 if (r->sec_desc) {
685 NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->sec_desc));
687 if (r->sec_qos) {
688 NDR_CHECK(ndr_push_lsa_QosInfo(ndr, NDR_SCALARS, r->sec_qos));
691 return NDR_ERR_SUCCESS;
694 static enum ndr_err_code ndr_pull_lsa_ObjectAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_ObjectAttribute *r)
696 uint32_t _ptr_root_dir;
697 TALLOC_CTX *_mem_save_root_dir_0;
698 uint32_t _ptr_object_name;
699 TALLOC_CTX *_mem_save_object_name_0;
700 uint32_t _ptr_sec_desc;
701 TALLOC_CTX *_mem_save_sec_desc_0;
702 uint32_t _ptr_sec_qos;
703 TALLOC_CTX *_mem_save_sec_qos_0;
704 if (ndr_flags & NDR_SCALARS) {
705 NDR_CHECK(ndr_pull_align(ndr, 5));
706 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
707 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_root_dir));
708 if (_ptr_root_dir) {
709 NDR_PULL_ALLOC(ndr, r->root_dir);
710 } else {
711 r->root_dir = NULL;
713 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_name));
714 if (_ptr_object_name) {
715 NDR_PULL_ALLOC(ndr, r->object_name);
716 } else {
717 r->object_name = NULL;
719 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attributes));
720 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sec_desc));
721 if (_ptr_sec_desc) {
722 NDR_PULL_ALLOC(ndr, r->sec_desc);
723 } else {
724 r->sec_desc = NULL;
726 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sec_qos));
727 if (_ptr_sec_qos) {
728 NDR_PULL_ALLOC(ndr, r->sec_qos);
729 } else {
730 r->sec_qos = NULL;
733 if (ndr_flags & NDR_BUFFERS) {
734 if (r->root_dir) {
735 _mem_save_root_dir_0 = NDR_PULL_GET_MEM_CTX(ndr);
736 NDR_PULL_SET_MEM_CTX(ndr, r->root_dir, 0);
737 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->root_dir));
738 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_root_dir_0, 0);
740 if (r->object_name) {
741 _mem_save_object_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
742 NDR_PULL_SET_MEM_CTX(ndr, r->object_name, 0);
743 NDR_CHECK(ndr_pull_array_size(ndr, &r->object_name));
744 NDR_CHECK(ndr_pull_array_length(ndr, &r->object_name));
745 if (ndr_get_array_length(ndr, &r->object_name) > ndr_get_array_size(ndr, &r->object_name)) {
746 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->object_name), ndr_get_array_length(ndr, &r->object_name));
748 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->object_name), sizeof(uint16_t)));
749 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_name, ndr_get_array_length(ndr, &r->object_name), sizeof(uint16_t), CH_UTF16));
750 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_name_0, 0);
752 if (r->sec_desc) {
753 _mem_save_sec_desc_0 = NDR_PULL_GET_MEM_CTX(ndr);
754 NDR_PULL_SET_MEM_CTX(ndr, r->sec_desc, 0);
755 NDR_CHECK(ndr_pull_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->sec_desc));
756 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_desc_0, 0);
758 if (r->sec_qos) {
759 _mem_save_sec_qos_0 = NDR_PULL_GET_MEM_CTX(ndr);
760 NDR_PULL_SET_MEM_CTX(ndr, r->sec_qos, 0);
761 NDR_CHECK(ndr_pull_lsa_QosInfo(ndr, NDR_SCALARS, r->sec_qos));
762 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_qos_0, 0);
765 return NDR_ERR_SUCCESS;
768 _PUBLIC_ void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *name, const struct lsa_ObjectAttribute *r)
770 ndr_print_struct(ndr, name, "lsa_ObjectAttribute");
771 ndr->depth++;
772 ndr_print_uint32(ndr, "len", r->len);
773 ndr_print_ptr(ndr, "root_dir", r->root_dir);
774 ndr->depth++;
775 if (r->root_dir) {
776 ndr_print_uint8(ndr, "root_dir", *r->root_dir);
778 ndr->depth--;
779 ndr_print_ptr(ndr, "object_name", r->object_name);
780 ndr->depth++;
781 if (r->object_name) {
782 ndr_print_string(ndr, "object_name", r->object_name);
784 ndr->depth--;
785 ndr_print_uint32(ndr, "attributes", r->attributes);
786 ndr_print_ptr(ndr, "sec_desc", r->sec_desc);
787 ndr->depth++;
788 if (r->sec_desc) {
789 ndr_print_security_descriptor(ndr, "sec_desc", r->sec_desc);
791 ndr->depth--;
792 ndr_print_ptr(ndr, "sec_qos", r->sec_qos);
793 ndr->depth++;
794 if (r->sec_qos) {
795 ndr_print_lsa_QosInfo(ndr, "sec_qos", r->sec_qos);
797 ndr->depth--;
798 ndr->depth--;
801 _PUBLIC_ enum ndr_err_code ndr_push_lsa_PolicyAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
803 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
804 return NDR_ERR_SUCCESS;
807 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_PolicyAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
809 uint32_t v;
810 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
811 *r = v;
812 return NDR_ERR_SUCCESS;
815 _PUBLIC_ void ndr_print_lsa_PolicyAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
817 ndr_print_uint32(ndr, name, r);
818 ndr->depth++;
819 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_VIEW_LOCAL_INFORMATION", LSA_POLICY_VIEW_LOCAL_INFORMATION, r);
820 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_VIEW_AUDIT_INFORMATION", LSA_POLICY_VIEW_AUDIT_INFORMATION, r);
821 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_GET_PRIVATE_INFORMATION", LSA_POLICY_GET_PRIVATE_INFORMATION, r);
822 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_TRUST_ADMIN", LSA_POLICY_TRUST_ADMIN, r);
823 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_ACCOUNT", LSA_POLICY_CREATE_ACCOUNT, r);
824 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_SECRET", LSA_POLICY_CREATE_SECRET, r);
825 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_PRIVILEGE", LSA_POLICY_CREATE_PRIVILEGE, r);
826 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS", LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS, r);
827 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SET_AUDIT_REQUIREMENTS", LSA_POLICY_SET_AUDIT_REQUIREMENTS, r);
828 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_AUDIT_LOG_ADMIN", LSA_POLICY_AUDIT_LOG_ADMIN, r);
829 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SERVER_ADMIN", LSA_POLICY_SERVER_ADMIN, r);
830 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_LOOKUP_NAMES", LSA_POLICY_LOOKUP_NAMES, r);
831 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_NOTIFICATION", LSA_POLICY_NOTIFICATION, r);
832 ndr->depth--;
835 _PUBLIC_ enum ndr_err_code ndr_push_lsa_AccountAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
837 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
838 return NDR_ERR_SUCCESS;
841 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AccountAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
843 uint32_t v;
844 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
845 *r = v;
846 return NDR_ERR_SUCCESS;
849 _PUBLIC_ void ndr_print_lsa_AccountAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
851 ndr_print_uint32(ndr, name, r);
852 ndr->depth++;
853 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_VIEW", LSA_ACCOUNT_VIEW, r);
854 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_PRIVILEGES", LSA_ACCOUNT_ADJUST_PRIVILEGES, r);
855 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_QUOTAS", LSA_ACCOUNT_ADJUST_QUOTAS, r);
856 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS", LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS, r);
857 ndr->depth--;
860 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SecretAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
862 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
863 return NDR_ERR_SUCCESS;
866 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SecretAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
868 uint32_t v;
869 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
870 *r = v;
871 return NDR_ERR_SUCCESS;
874 _PUBLIC_ void ndr_print_lsa_SecretAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
876 ndr_print_uint32(ndr, name, r);
877 ndr->depth++;
878 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_SECRET_SET_VALUE", LSA_SECRET_SET_VALUE, r);
879 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_SECRET_QUERY_VALUE", LSA_SECRET_QUERY_VALUE, r);
880 ndr->depth--;
883 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustedAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
885 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
886 return NDR_ERR_SUCCESS;
889 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustedAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
891 uint32_t v;
892 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
893 *r = v;
894 return NDR_ERR_SUCCESS;
897 _PUBLIC_ void ndr_print_lsa_TrustedAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
899 ndr_print_uint32(ndr, name, r);
900 ndr->depth++;
901 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_DOMAIN_NAME", LSA_TRUSTED_QUERY_DOMAIN_NAME, r);
902 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_CONTROLLERS", LSA_TRUSTED_QUERY_CONTROLLERS, r);
903 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_SET_CONTROLLERS", LSA_TRUSTED_SET_CONTROLLERS, r);
904 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_POSIX", LSA_TRUSTED_QUERY_POSIX, r);
905 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_SET_POSIX", LSA_TRUSTED_SET_POSIX, r);
906 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_SET_AUTH", LSA_TRUSTED_SET_AUTH, r);
907 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUSTED_QUERY_AUTH", LSA_TRUSTED_QUERY_AUTH, r);
908 ndr->depth--;
911 static enum ndr_err_code ndr_push_lsa_AuditLogInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditLogInfo *r)
913 if (ndr_flags & NDR_SCALARS) {
914 NDR_CHECK(ndr_push_align(ndr, 8));
915 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->percent_full));
916 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximum_log_size));
917 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->retention_time));
918 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_in_progress));
919 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->time_to_shutdown));
920 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->next_audit_record));
922 if (ndr_flags & NDR_BUFFERS) {
924 return NDR_ERR_SUCCESS;
927 static enum ndr_err_code ndr_pull_lsa_AuditLogInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditLogInfo *r)
929 if (ndr_flags & NDR_SCALARS) {
930 NDR_CHECK(ndr_pull_align(ndr, 8));
931 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->percent_full));
932 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximum_log_size));
933 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->retention_time));
934 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_in_progress));
935 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->time_to_shutdown));
936 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->next_audit_record));
938 if (ndr_flags & NDR_BUFFERS) {
940 return NDR_ERR_SUCCESS;
943 _PUBLIC_ void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditLogInfo *r)
945 ndr_print_struct(ndr, name, "lsa_AuditLogInfo");
946 ndr->depth++;
947 ndr_print_uint32(ndr, "percent_full", r->percent_full);
948 ndr_print_uint32(ndr, "maximum_log_size", r->maximum_log_size);
949 ndr_print_hyper(ndr, "retention_time", r->retention_time);
950 ndr_print_uint8(ndr, "shutdown_in_progress", r->shutdown_in_progress);
951 ndr_print_hyper(ndr, "time_to_shutdown", r->time_to_shutdown);
952 ndr_print_uint32(ndr, "next_audit_record", r->next_audit_record);
953 ndr->depth--;
956 static enum ndr_err_code ndr_push_lsa_PolicyAuditPolicy(struct ndr_push *ndr, int ndr_flags, enum lsa_PolicyAuditPolicy r)
958 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
959 return NDR_ERR_SUCCESS;
962 static enum ndr_err_code ndr_pull_lsa_PolicyAuditPolicy(struct ndr_pull *ndr, int ndr_flags, enum lsa_PolicyAuditPolicy *r)
964 uint32_t v;
965 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
966 *r = v;
967 return NDR_ERR_SUCCESS;
970 _PUBLIC_ void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print *ndr, const char *name, enum lsa_PolicyAuditPolicy r)
972 const char *val = NULL;
974 switch (r) {
975 case LSA_AUDIT_POLICY_NONE: val = "LSA_AUDIT_POLICY_NONE"; break;
976 case LSA_AUDIT_POLICY_SUCCESS: val = "LSA_AUDIT_POLICY_SUCCESS"; break;
977 case LSA_AUDIT_POLICY_FAILURE: val = "LSA_AUDIT_POLICY_FAILURE"; break;
978 case LSA_AUDIT_POLICY_ALL: val = "LSA_AUDIT_POLICY_ALL"; break;
979 case LSA_AUDIT_POLICY_CLEAR: val = "LSA_AUDIT_POLICY_CLEAR"; break;
981 ndr_print_enum(ndr, name, "ENUM", val, r);
984 static enum ndr_err_code ndr_push_lsa_AuditEventsInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditEventsInfo *r)
986 uint32_t cntr_settings_1;
987 if (ndr_flags & NDR_SCALARS) {
988 NDR_CHECK(ndr_push_align(ndr, 5));
989 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditing_mode));
990 NDR_CHECK(ndr_push_unique_ptr(ndr, r->settings));
991 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
993 if (ndr_flags & NDR_BUFFERS) {
994 if (r->settings) {
995 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
996 for (cntr_settings_1 = 0; cntr_settings_1 < r->count; cntr_settings_1++) {
997 NDR_CHECK(ndr_push_lsa_PolicyAuditPolicy(ndr, NDR_SCALARS, r->settings[cntr_settings_1]));
1001 return NDR_ERR_SUCCESS;
1004 static enum ndr_err_code ndr_pull_lsa_AuditEventsInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditEventsInfo *r)
1006 uint32_t _ptr_settings;
1007 uint32_t cntr_settings_1;
1008 TALLOC_CTX *_mem_save_settings_0;
1009 TALLOC_CTX *_mem_save_settings_1;
1010 if (ndr_flags & NDR_SCALARS) {
1011 NDR_CHECK(ndr_pull_align(ndr, 5));
1012 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditing_mode));
1013 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_settings));
1014 if (_ptr_settings) {
1015 NDR_PULL_ALLOC(ndr, r->settings);
1016 } else {
1017 r->settings = NULL;
1019 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1021 if (ndr_flags & NDR_BUFFERS) {
1022 if (r->settings) {
1023 _mem_save_settings_0 = NDR_PULL_GET_MEM_CTX(ndr);
1024 NDR_PULL_SET_MEM_CTX(ndr, r->settings, 0);
1025 NDR_CHECK(ndr_pull_array_size(ndr, &r->settings));
1026 NDR_PULL_ALLOC_N(ndr, r->settings, ndr_get_array_size(ndr, &r->settings));
1027 _mem_save_settings_1 = NDR_PULL_GET_MEM_CTX(ndr);
1028 NDR_PULL_SET_MEM_CTX(ndr, r->settings, 0);
1029 for (cntr_settings_1 = 0; cntr_settings_1 < r->count; cntr_settings_1++) {
1030 NDR_CHECK(ndr_pull_lsa_PolicyAuditPolicy(ndr, NDR_SCALARS, &r->settings[cntr_settings_1]));
1032 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_settings_1, 0);
1033 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_settings_0, 0);
1035 if (r->settings) {
1036 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->settings, r->count));
1039 return NDR_ERR_SUCCESS;
1042 _PUBLIC_ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditEventsInfo *r)
1044 uint32_t cntr_settings_1;
1045 ndr_print_struct(ndr, name, "lsa_AuditEventsInfo");
1046 ndr->depth++;
1047 ndr_print_uint32(ndr, "auditing_mode", r->auditing_mode);
1048 ndr_print_ptr(ndr, "settings", r->settings);
1049 ndr->depth++;
1050 if (r->settings) {
1051 ndr->print(ndr, "%s: ARRAY(%d)", "settings", (int)r->count);
1052 ndr->depth++;
1053 for (cntr_settings_1=0;cntr_settings_1<r->count;cntr_settings_1++) {
1054 char *idx_1=NULL;
1055 if (asprintf(&idx_1, "[%d]", cntr_settings_1) != -1) {
1056 ndr_print_lsa_PolicyAuditPolicy(ndr, "settings", r->settings[cntr_settings_1]);
1057 free(idx_1);
1060 ndr->depth--;
1062 ndr->depth--;
1063 ndr_print_uint32(ndr, "count", r->count);
1064 ndr->depth--;
1067 static enum ndr_err_code ndr_push_lsa_DomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfo *r)
1069 if (ndr_flags & NDR_SCALARS) {
1070 NDR_CHECK(ndr_push_align(ndr, 5));
1071 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1072 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
1074 if (ndr_flags & NDR_BUFFERS) {
1075 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1076 if (r->sid) {
1077 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1080 return NDR_ERR_SUCCESS;
1083 static enum ndr_err_code ndr_pull_lsa_DomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfo *r)
1085 uint32_t _ptr_sid;
1086 TALLOC_CTX *_mem_save_sid_0;
1087 if (ndr_flags & NDR_SCALARS) {
1088 NDR_CHECK(ndr_pull_align(ndr, 5));
1089 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1090 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
1091 if (_ptr_sid) {
1092 NDR_PULL_ALLOC(ndr, r->sid);
1093 } else {
1094 r->sid = NULL;
1097 if (ndr_flags & NDR_BUFFERS) {
1098 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1099 if (r->sid) {
1100 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1101 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
1102 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1103 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
1106 return NDR_ERR_SUCCESS;
1109 _PUBLIC_ void ndr_print_lsa_DomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfo *r)
1111 ndr_print_struct(ndr, name, "lsa_DomainInfo");
1112 ndr->depth++;
1113 ndr_print_lsa_StringLarge(ndr, "name", &r->name);
1114 ndr_print_ptr(ndr, "sid", r->sid);
1115 ndr->depth++;
1116 if (r->sid) {
1117 ndr_print_dom_sid2(ndr, "sid", r->sid);
1119 ndr->depth--;
1120 ndr->depth--;
1123 static enum ndr_err_code ndr_push_lsa_PDAccountInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_PDAccountInfo *r)
1125 if (ndr_flags & NDR_SCALARS) {
1126 NDR_CHECK(ndr_push_align(ndr, 5));
1127 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1129 if (ndr_flags & NDR_BUFFERS) {
1130 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1132 return NDR_ERR_SUCCESS;
1135 static enum ndr_err_code ndr_pull_lsa_PDAccountInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_PDAccountInfo *r)
1137 if (ndr_flags & NDR_SCALARS) {
1138 NDR_CHECK(ndr_pull_align(ndr, 5));
1139 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1141 if (ndr_flags & NDR_BUFFERS) {
1142 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1144 return NDR_ERR_SUCCESS;
1147 _PUBLIC_ void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *name, const struct lsa_PDAccountInfo *r)
1149 ndr_print_struct(ndr, name, "lsa_PDAccountInfo");
1150 ndr->depth++;
1151 ndr_print_lsa_String(ndr, "name", &r->name);
1152 ndr->depth--;
1155 static enum ndr_err_code ndr_push_lsa_Role(struct ndr_push *ndr, int ndr_flags, enum lsa_Role r)
1157 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1158 return NDR_ERR_SUCCESS;
1161 static enum ndr_err_code ndr_pull_lsa_Role(struct ndr_pull *ndr, int ndr_flags, enum lsa_Role *r)
1163 uint32_t v;
1164 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1165 *r = v;
1166 return NDR_ERR_SUCCESS;
1169 _PUBLIC_ void ndr_print_lsa_Role(struct ndr_print *ndr, const char *name, enum lsa_Role r)
1171 const char *val = NULL;
1173 switch (r) {
1174 case LSA_ROLE_BACKUP: val = "LSA_ROLE_BACKUP"; break;
1175 case LSA_ROLE_PRIMARY: val = "LSA_ROLE_PRIMARY"; break;
1177 ndr_print_enum(ndr, name, "ENUM", val, r);
1180 static enum ndr_err_code ndr_push_lsa_ServerRole(struct ndr_push *ndr, int ndr_flags, const struct lsa_ServerRole *r)
1182 if (ndr_flags & NDR_SCALARS) {
1183 NDR_CHECK(ndr_push_align(ndr, 4));
1184 NDR_CHECK(ndr_push_lsa_Role(ndr, NDR_SCALARS, r->role));
1186 if (ndr_flags & NDR_BUFFERS) {
1188 return NDR_ERR_SUCCESS;
1191 static enum ndr_err_code ndr_pull_lsa_ServerRole(struct ndr_pull *ndr, int ndr_flags, struct lsa_ServerRole *r)
1193 if (ndr_flags & NDR_SCALARS) {
1194 NDR_CHECK(ndr_pull_align(ndr, 4));
1195 NDR_CHECK(ndr_pull_lsa_Role(ndr, NDR_SCALARS, &r->role));
1197 if (ndr_flags & NDR_BUFFERS) {
1199 return NDR_ERR_SUCCESS;
1202 _PUBLIC_ void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, const struct lsa_ServerRole *r)
1204 ndr_print_struct(ndr, name, "lsa_ServerRole");
1205 ndr->depth++;
1206 ndr_print_lsa_Role(ndr, "role", r->role);
1207 ndr->depth--;
1210 static enum ndr_err_code ndr_push_lsa_ReplicaSourceInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ReplicaSourceInfo *r)
1212 if (ndr_flags & NDR_SCALARS) {
1213 NDR_CHECK(ndr_push_align(ndr, 5));
1214 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->source));
1215 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account));
1217 if (ndr_flags & NDR_BUFFERS) {
1218 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->source));
1219 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account));
1221 return NDR_ERR_SUCCESS;
1224 static enum ndr_err_code ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ReplicaSourceInfo *r)
1226 if (ndr_flags & NDR_SCALARS) {
1227 NDR_CHECK(ndr_pull_align(ndr, 5));
1228 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->source));
1229 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account));
1231 if (ndr_flags & NDR_BUFFERS) {
1232 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->source));
1233 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account));
1235 return NDR_ERR_SUCCESS;
1238 _PUBLIC_ void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print *ndr, const char *name, const struct lsa_ReplicaSourceInfo *r)
1240 ndr_print_struct(ndr, name, "lsa_ReplicaSourceInfo");
1241 ndr->depth++;
1242 ndr_print_lsa_String(ndr, "source", &r->source);
1243 ndr_print_lsa_String(ndr, "account", &r->account);
1244 ndr->depth--;
1247 static enum ndr_err_code ndr_push_lsa_DefaultQuotaInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DefaultQuotaInfo *r)
1249 if (ndr_flags & NDR_SCALARS) {
1250 NDR_CHECK(ndr_push_align(ndr, 8));
1251 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->paged_pool));
1252 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->non_paged_pool));
1253 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->min_wss));
1254 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_wss));
1255 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagefile));
1256 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown));
1258 if (ndr_flags & NDR_BUFFERS) {
1260 return NDR_ERR_SUCCESS;
1263 static enum ndr_err_code ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DefaultQuotaInfo *r)
1265 if (ndr_flags & NDR_SCALARS) {
1266 NDR_CHECK(ndr_pull_align(ndr, 8));
1267 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->paged_pool));
1268 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->non_paged_pool));
1269 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->min_wss));
1270 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_wss));
1271 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagefile));
1272 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown));
1274 if (ndr_flags & NDR_BUFFERS) {
1276 return NDR_ERR_SUCCESS;
1279 _PUBLIC_ void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print *ndr, const char *name, const struct lsa_DefaultQuotaInfo *r)
1281 ndr_print_struct(ndr, name, "lsa_DefaultQuotaInfo");
1282 ndr->depth++;
1283 ndr_print_uint32(ndr, "paged_pool", r->paged_pool);
1284 ndr_print_uint32(ndr, "non_paged_pool", r->non_paged_pool);
1285 ndr_print_uint32(ndr, "min_wss", r->min_wss);
1286 ndr_print_uint32(ndr, "max_wss", r->max_wss);
1287 ndr_print_uint32(ndr, "pagefile", r->pagefile);
1288 ndr_print_hyper(ndr, "unknown", r->unknown);
1289 ndr->depth--;
1292 static enum ndr_err_code ndr_push_lsa_ModificationInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ModificationInfo *r)
1294 if (ndr_flags & NDR_SCALARS) {
1295 NDR_CHECK(ndr_push_align(ndr, 8));
1296 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->modified_id));
1297 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->db_create_time));
1299 if (ndr_flags & NDR_BUFFERS) {
1301 return NDR_ERR_SUCCESS;
1304 static enum ndr_err_code ndr_pull_lsa_ModificationInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ModificationInfo *r)
1306 if (ndr_flags & NDR_SCALARS) {
1307 NDR_CHECK(ndr_pull_align(ndr, 8));
1308 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->modified_id));
1309 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->db_create_time));
1311 if (ndr_flags & NDR_BUFFERS) {
1313 return NDR_ERR_SUCCESS;
1316 _PUBLIC_ void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *name, const struct lsa_ModificationInfo *r)
1318 ndr_print_struct(ndr, name, "lsa_ModificationInfo");
1319 ndr->depth++;
1320 ndr_print_hyper(ndr, "modified_id", r->modified_id);
1321 ndr_print_NTTIME_hyper(ndr, "db_create_time", r->db_create_time);
1322 ndr->depth--;
1325 static enum ndr_err_code ndr_push_lsa_AuditFullSetInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullSetInfo *r)
1327 if (ndr_flags & NDR_SCALARS) {
1328 NDR_CHECK(ndr_push_align(ndr, 1));
1329 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full));
1331 if (ndr_flags & NDR_BUFFERS) {
1333 return NDR_ERR_SUCCESS;
1336 static enum ndr_err_code ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullSetInfo *r)
1338 if (ndr_flags & NDR_SCALARS) {
1339 NDR_CHECK(ndr_pull_align(ndr, 1));
1340 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full));
1342 if (ndr_flags & NDR_BUFFERS) {
1344 return NDR_ERR_SUCCESS;
1347 _PUBLIC_ void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullSetInfo *r)
1349 ndr_print_struct(ndr, name, "lsa_AuditFullSetInfo");
1350 ndr->depth++;
1351 ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full);
1352 ndr->depth--;
1355 static enum ndr_err_code ndr_push_lsa_AuditFullQueryInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullQueryInfo *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));
1360 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->log_is_full));
1362 if (ndr_flags & NDR_BUFFERS) {
1364 return NDR_ERR_SUCCESS;
1367 static enum ndr_err_code ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullQueryInfo *r)
1369 if (ndr_flags & NDR_SCALARS) {
1370 NDR_CHECK(ndr_pull_align(ndr, 1));
1371 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full));
1372 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->log_is_full));
1374 if (ndr_flags & NDR_BUFFERS) {
1376 return NDR_ERR_SUCCESS;
1379 _PUBLIC_ void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullQueryInfo *r)
1381 ndr_print_struct(ndr, name, "lsa_AuditFullQueryInfo");
1382 ndr->depth++;
1383 ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full);
1384 ndr_print_uint8(ndr, "log_is_full", r->log_is_full);
1385 ndr->depth--;
1388 static enum ndr_err_code ndr_push_lsa_DnsDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DnsDomainInfo *r)
1390 if (ndr_flags & NDR_SCALARS) {
1391 NDR_CHECK(ndr_push_align(ndr, 5));
1392 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1393 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain));
1394 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forest));
1395 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
1396 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
1398 if (ndr_flags & NDR_BUFFERS) {
1399 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1400 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain));
1401 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forest));
1402 if (r->sid) {
1403 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1406 return NDR_ERR_SUCCESS;
1409 static enum ndr_err_code ndr_pull_lsa_DnsDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DnsDomainInfo *r)
1411 uint32_t _ptr_sid;
1412 TALLOC_CTX *_mem_save_sid_0;
1413 if (ndr_flags & NDR_SCALARS) {
1414 NDR_CHECK(ndr_pull_align(ndr, 5));
1415 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1416 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain));
1417 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forest));
1418 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
1419 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
1420 if (_ptr_sid) {
1421 NDR_PULL_ALLOC(ndr, r->sid);
1422 } else {
1423 r->sid = NULL;
1426 if (ndr_flags & NDR_BUFFERS) {
1427 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1428 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain));
1429 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forest));
1430 if (r->sid) {
1431 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1432 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
1433 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1434 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
1437 return NDR_ERR_SUCCESS;
1440 _PUBLIC_ void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DnsDomainInfo *r)
1442 ndr_print_struct(ndr, name, "lsa_DnsDomainInfo");
1443 ndr->depth++;
1444 ndr_print_lsa_StringLarge(ndr, "name", &r->name);
1445 ndr_print_lsa_StringLarge(ndr, "dns_domain", &r->dns_domain);
1446 ndr_print_lsa_StringLarge(ndr, "dns_forest", &r->dns_forest);
1447 ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
1448 ndr_print_ptr(ndr, "sid", r->sid);
1449 ndr->depth++;
1450 if (r->sid) {
1451 ndr_print_dom_sid2(ndr, "sid", r->sid);
1453 ndr->depth--;
1454 ndr->depth--;
1457 static enum ndr_err_code ndr_push_lsa_PolicyInfo(struct ndr_push *ndr, int ndr_flags, enum lsa_PolicyInfo r)
1459 NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
1460 return NDR_ERR_SUCCESS;
1463 static enum ndr_err_code ndr_pull_lsa_PolicyInfo(struct ndr_pull *ndr, int ndr_flags, enum lsa_PolicyInfo *r)
1465 uint16_t v;
1466 NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
1467 *r = v;
1468 return NDR_ERR_SUCCESS;
1471 _PUBLIC_ void ndr_print_lsa_PolicyInfo(struct ndr_print *ndr, const char *name, enum lsa_PolicyInfo r)
1473 const char *val = NULL;
1475 switch (r) {
1476 case LSA_POLICY_INFO_AUDIT_LOG: val = "LSA_POLICY_INFO_AUDIT_LOG"; break;
1477 case LSA_POLICY_INFO_AUDIT_EVENTS: val = "LSA_POLICY_INFO_AUDIT_EVENTS"; break;
1478 case LSA_POLICY_INFO_DOMAIN: val = "LSA_POLICY_INFO_DOMAIN"; break;
1479 case LSA_POLICY_INFO_PD: val = "LSA_POLICY_INFO_PD"; break;
1480 case LSA_POLICY_INFO_ACCOUNT_DOMAIN: val = "LSA_POLICY_INFO_ACCOUNT_DOMAIN"; break;
1481 case LSA_POLICY_INFO_ROLE: val = "LSA_POLICY_INFO_ROLE"; break;
1482 case LSA_POLICY_INFO_REPLICA: val = "LSA_POLICY_INFO_REPLICA"; break;
1483 case LSA_POLICY_INFO_QUOTA: val = "LSA_POLICY_INFO_QUOTA"; break;
1484 case LSA_POLICY_INFO_MOD: val = "LSA_POLICY_INFO_MOD"; break;
1485 case LSA_POLICY_INFO_AUDIT_FULL_SET: val = "LSA_POLICY_INFO_AUDIT_FULL_SET"; break;
1486 case LSA_POLICY_INFO_AUDIT_FULL_QUERY: val = "LSA_POLICY_INFO_AUDIT_FULL_QUERY"; break;
1487 case LSA_POLICY_INFO_DNS: val = "LSA_POLICY_INFO_DNS"; break;
1488 case LSA_POLICY_INFO_DNS_INT: val = "LSA_POLICY_INFO_DNS_INT"; break;
1489 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: val = "LSA_POLICY_INFO_L_ACCOUNT_DOMAIN"; break;
1491 ndr_print_enum(ndr, name, "ENUM", val, r);
1494 static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, int ndr_flags, const union lsa_PolicyInformation *r)
1496 if (ndr_flags & NDR_SCALARS) {
1497 int level = ndr_push_get_switch_value(ndr, r);
1498 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
1499 NDR_CHECK(ndr_push_union_align(ndr, 8));
1500 switch (level) {
1501 case LSA_POLICY_INFO_AUDIT_LOG: {
1502 NDR_CHECK(ndr_push_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log));
1503 break; }
1505 case LSA_POLICY_INFO_AUDIT_EVENTS: {
1506 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr, NDR_SCALARS, &r->audit_events));
1507 break; }
1509 case LSA_POLICY_INFO_DOMAIN: {
1510 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain));
1511 break; }
1513 case LSA_POLICY_INFO_PD: {
1514 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd));
1515 break; }
1517 case LSA_POLICY_INFO_ACCOUNT_DOMAIN: {
1518 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain));
1519 break; }
1521 case LSA_POLICY_INFO_ROLE: {
1522 NDR_CHECK(ndr_push_lsa_ServerRole(ndr, NDR_SCALARS, &r->role));
1523 break; }
1525 case LSA_POLICY_INFO_REPLICA: {
1526 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica));
1527 break; }
1529 case LSA_POLICY_INFO_QUOTA: {
1530 NDR_CHECK(ndr_push_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota));
1531 break; }
1533 case LSA_POLICY_INFO_MOD: {
1534 NDR_CHECK(ndr_push_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->mod));
1535 break; }
1537 case LSA_POLICY_INFO_AUDIT_FULL_SET: {
1538 NDR_CHECK(ndr_push_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset));
1539 break; }
1541 case LSA_POLICY_INFO_AUDIT_FULL_QUERY: {
1542 NDR_CHECK(ndr_push_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery));
1543 break; }
1545 case LSA_POLICY_INFO_DNS: {
1546 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1547 break; }
1549 case LSA_POLICY_INFO_DNS_INT: {
1550 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1551 break; }
1553 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: {
1554 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->l_account_domain));
1555 break; }
1557 default:
1558 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1561 if (ndr_flags & NDR_BUFFERS) {
1562 int level = ndr_push_get_switch_value(ndr, r);
1563 switch (level) {
1564 case LSA_POLICY_INFO_AUDIT_LOG:
1565 break;
1567 case LSA_POLICY_INFO_AUDIT_EVENTS:
1568 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr, NDR_BUFFERS, &r->audit_events));
1569 break;
1571 case LSA_POLICY_INFO_DOMAIN:
1572 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domain));
1573 break;
1575 case LSA_POLICY_INFO_PD:
1576 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr, NDR_BUFFERS, &r->pd));
1577 break;
1579 case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
1580 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->account_domain));
1581 break;
1583 case LSA_POLICY_INFO_ROLE:
1584 break;
1586 case LSA_POLICY_INFO_REPLICA:
1587 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr, NDR_BUFFERS, &r->replica));
1588 break;
1590 case LSA_POLICY_INFO_QUOTA:
1591 break;
1593 case LSA_POLICY_INFO_MOD:
1594 break;
1596 case LSA_POLICY_INFO_AUDIT_FULL_SET:
1597 break;
1599 case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
1600 break;
1602 case LSA_POLICY_INFO_DNS:
1603 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1604 break;
1606 case LSA_POLICY_INFO_DNS_INT:
1607 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1608 break;
1610 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
1611 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->l_account_domain));
1612 break;
1614 default:
1615 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1618 return NDR_ERR_SUCCESS;
1621 static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, int ndr_flags, union lsa_PolicyInformation *r)
1623 int level;
1624 uint16_t _level;
1625 level = ndr_pull_get_switch_value(ndr, r);
1626 if (ndr_flags & NDR_SCALARS) {
1627 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
1628 if (_level != level) {
1629 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1631 NDR_CHECK(ndr_pull_union_align(ndr, 8));
1632 switch (level) {
1633 case LSA_POLICY_INFO_AUDIT_LOG: {
1634 NDR_CHECK(ndr_pull_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log));
1635 break; }
1637 case LSA_POLICY_INFO_AUDIT_EVENTS: {
1638 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr, NDR_SCALARS, &r->audit_events));
1639 break; }
1641 case LSA_POLICY_INFO_DOMAIN: {
1642 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain));
1643 break; }
1645 case LSA_POLICY_INFO_PD: {
1646 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd));
1647 break; }
1649 case LSA_POLICY_INFO_ACCOUNT_DOMAIN: {
1650 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain));
1651 break; }
1653 case LSA_POLICY_INFO_ROLE: {
1654 NDR_CHECK(ndr_pull_lsa_ServerRole(ndr, NDR_SCALARS, &r->role));
1655 break; }
1657 case LSA_POLICY_INFO_REPLICA: {
1658 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica));
1659 break; }
1661 case LSA_POLICY_INFO_QUOTA: {
1662 NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota));
1663 break; }
1665 case LSA_POLICY_INFO_MOD: {
1666 NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->mod));
1667 break; }
1669 case LSA_POLICY_INFO_AUDIT_FULL_SET: {
1670 NDR_CHECK(ndr_pull_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset));
1671 break; }
1673 case LSA_POLICY_INFO_AUDIT_FULL_QUERY: {
1674 NDR_CHECK(ndr_pull_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery));
1675 break; }
1677 case LSA_POLICY_INFO_DNS: {
1678 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1679 break; }
1681 case LSA_POLICY_INFO_DNS_INT: {
1682 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1683 break; }
1685 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: {
1686 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->l_account_domain));
1687 break; }
1689 default:
1690 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1693 if (ndr_flags & NDR_BUFFERS) {
1694 switch (level) {
1695 case LSA_POLICY_INFO_AUDIT_LOG:
1696 break;
1698 case LSA_POLICY_INFO_AUDIT_EVENTS:
1699 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr, NDR_BUFFERS, &r->audit_events));
1700 break;
1702 case LSA_POLICY_INFO_DOMAIN:
1703 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domain));
1704 break;
1706 case LSA_POLICY_INFO_PD:
1707 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_BUFFERS, &r->pd));
1708 break;
1710 case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
1711 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->account_domain));
1712 break;
1714 case LSA_POLICY_INFO_ROLE:
1715 break;
1717 case LSA_POLICY_INFO_REPLICA:
1718 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_BUFFERS, &r->replica));
1719 break;
1721 case LSA_POLICY_INFO_QUOTA:
1722 break;
1724 case LSA_POLICY_INFO_MOD:
1725 break;
1727 case LSA_POLICY_INFO_AUDIT_FULL_SET:
1728 break;
1730 case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
1731 break;
1733 case LSA_POLICY_INFO_DNS:
1734 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1735 break;
1737 case LSA_POLICY_INFO_DNS_INT:
1738 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1739 break;
1741 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
1742 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->l_account_domain));
1743 break;
1745 default:
1746 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1749 return NDR_ERR_SUCCESS;
1752 _PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char *name, const union lsa_PolicyInformation *r)
1754 int level;
1755 level = ndr_print_get_switch_value(ndr, r);
1756 ndr_print_union(ndr, name, level, "lsa_PolicyInformation");
1757 switch (level) {
1758 case LSA_POLICY_INFO_AUDIT_LOG:
1759 ndr_print_lsa_AuditLogInfo(ndr, "audit_log", &r->audit_log);
1760 break;
1762 case LSA_POLICY_INFO_AUDIT_EVENTS:
1763 ndr_print_lsa_AuditEventsInfo(ndr, "audit_events", &r->audit_events);
1764 break;
1766 case LSA_POLICY_INFO_DOMAIN:
1767 ndr_print_lsa_DomainInfo(ndr, "domain", &r->domain);
1768 break;
1770 case LSA_POLICY_INFO_PD:
1771 ndr_print_lsa_PDAccountInfo(ndr, "pd", &r->pd);
1772 break;
1774 case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
1775 ndr_print_lsa_DomainInfo(ndr, "account_domain", &r->account_domain);
1776 break;
1778 case LSA_POLICY_INFO_ROLE:
1779 ndr_print_lsa_ServerRole(ndr, "role", &r->role);
1780 break;
1782 case LSA_POLICY_INFO_REPLICA:
1783 ndr_print_lsa_ReplicaSourceInfo(ndr, "replica", &r->replica);
1784 break;
1786 case LSA_POLICY_INFO_QUOTA:
1787 ndr_print_lsa_DefaultQuotaInfo(ndr, "quota", &r->quota);
1788 break;
1790 case LSA_POLICY_INFO_MOD:
1791 ndr_print_lsa_ModificationInfo(ndr, "mod", &r->mod);
1792 break;
1794 case LSA_POLICY_INFO_AUDIT_FULL_SET:
1795 ndr_print_lsa_AuditFullSetInfo(ndr, "auditfullset", &r->auditfullset);
1796 break;
1798 case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
1799 ndr_print_lsa_AuditFullQueryInfo(ndr, "auditfullquery", &r->auditfullquery);
1800 break;
1802 case LSA_POLICY_INFO_DNS:
1803 ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
1804 break;
1806 case LSA_POLICY_INFO_DNS_INT:
1807 ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
1808 break;
1810 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
1811 ndr_print_lsa_DomainInfo(ndr, "l_account_domain", &r->l_account_domain);
1812 break;
1814 default:
1815 ndr_print_bad_level(ndr, name, level);
1819 static enum ndr_err_code ndr_push_lsa_SidPtr(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidPtr *r)
1821 if (ndr_flags & NDR_SCALARS) {
1822 NDR_CHECK(ndr_push_align(ndr, 5));
1823 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
1825 if (ndr_flags & NDR_BUFFERS) {
1826 if (r->sid) {
1827 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1830 return NDR_ERR_SUCCESS;
1833 static enum ndr_err_code ndr_pull_lsa_SidPtr(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidPtr *r)
1835 uint32_t _ptr_sid;
1836 TALLOC_CTX *_mem_save_sid_0;
1837 if (ndr_flags & NDR_SCALARS) {
1838 NDR_CHECK(ndr_pull_align(ndr, 5));
1839 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
1840 if (_ptr_sid) {
1841 NDR_PULL_ALLOC(ndr, r->sid);
1842 } else {
1843 r->sid = NULL;
1846 if (ndr_flags & NDR_BUFFERS) {
1847 if (r->sid) {
1848 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1849 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
1850 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1851 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
1854 return NDR_ERR_SUCCESS;
1857 _PUBLIC_ void ndr_print_lsa_SidPtr(struct ndr_print *ndr, const char *name, const struct lsa_SidPtr *r)
1859 ndr_print_struct(ndr, name, "lsa_SidPtr");
1860 ndr->depth++;
1861 ndr_print_ptr(ndr, "sid", r->sid);
1862 ndr->depth++;
1863 if (r->sid) {
1864 ndr_print_dom_sid2(ndr, "sid", r->sid);
1866 ndr->depth--;
1867 ndr->depth--;
1870 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidArray *r)
1872 uint32_t cntr_sids_1;
1873 if (ndr_flags & NDR_SCALARS) {
1874 NDR_CHECK(ndr_push_align(ndr, 5));
1875 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
1876 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
1878 if (ndr_flags & NDR_BUFFERS) {
1879 if (r->sids) {
1880 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_sids));
1881 for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
1882 NDR_CHECK(ndr_push_lsa_SidPtr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1884 for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
1885 NDR_CHECK(ndr_push_lsa_SidPtr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1889 return NDR_ERR_SUCCESS;
1892 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidArray *r)
1894 uint32_t _ptr_sids;
1895 uint32_t cntr_sids_1;
1896 TALLOC_CTX *_mem_save_sids_0;
1897 TALLOC_CTX *_mem_save_sids_1;
1898 if (ndr_flags & NDR_SCALARS) {
1899 NDR_CHECK(ndr_pull_align(ndr, 5));
1900 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
1901 if (r->num_sids > 1000) {
1902 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1904 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
1905 if (_ptr_sids) {
1906 NDR_PULL_ALLOC(ndr, r->sids);
1907 } else {
1908 r->sids = NULL;
1911 if (ndr_flags & NDR_BUFFERS) {
1912 if (r->sids) {
1913 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1914 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1915 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
1916 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
1917 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1918 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1919 for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
1920 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1922 for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
1923 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1925 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
1926 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
1928 if (r->sids) {
1929 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
1932 return NDR_ERR_SUCCESS;
1935 _PUBLIC_ void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, const struct lsa_SidArray *r)
1937 uint32_t cntr_sids_1;
1938 ndr_print_struct(ndr, name, "lsa_SidArray");
1939 ndr->depth++;
1940 ndr_print_uint32(ndr, "num_sids", r->num_sids);
1941 ndr_print_ptr(ndr, "sids", r->sids);
1942 ndr->depth++;
1943 if (r->sids) {
1944 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->num_sids);
1945 ndr->depth++;
1946 for (cntr_sids_1=0;cntr_sids_1<r->num_sids;cntr_sids_1++) {
1947 char *idx_1=NULL;
1948 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
1949 ndr_print_lsa_SidPtr(ndr, "sids", &r->sids[cntr_sids_1]);
1950 free(idx_1);
1953 ndr->depth--;
1955 ndr->depth--;
1956 ndr->depth--;
1959 static enum ndr_err_code ndr_push_lsa_DomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainList *r)
1961 uint32_t cntr_domains_1;
1962 if (ndr_flags & NDR_SCALARS) {
1963 NDR_CHECK(ndr_push_align(ndr, 5));
1964 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1965 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
1967 if (ndr_flags & NDR_BUFFERS) {
1968 if (r->domains) {
1969 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1970 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
1971 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
1973 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
1974 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
1978 return NDR_ERR_SUCCESS;
1981 static enum ndr_err_code ndr_pull_lsa_DomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainList *r)
1983 uint32_t _ptr_domains;
1984 uint32_t cntr_domains_1;
1985 TALLOC_CTX *_mem_save_domains_0;
1986 TALLOC_CTX *_mem_save_domains_1;
1987 if (ndr_flags & NDR_SCALARS) {
1988 NDR_CHECK(ndr_pull_align(ndr, 5));
1989 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1990 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
1991 if (_ptr_domains) {
1992 NDR_PULL_ALLOC(ndr, r->domains);
1993 } else {
1994 r->domains = NULL;
1997 if (ndr_flags & NDR_BUFFERS) {
1998 if (r->domains) {
1999 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
2000 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
2001 NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
2002 NDR_PULL_ALLOC_N(ndr, r->domains, ndr_get_array_size(ndr, &r->domains));
2003 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
2004 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
2005 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2006 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
2008 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2009 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
2011 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
2012 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
2014 if (r->domains) {
2015 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
2018 return NDR_ERR_SUCCESS;
2021 _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, const struct lsa_DomainList *r)
2023 uint32_t cntr_domains_1;
2024 ndr_print_struct(ndr, name, "lsa_DomainList");
2025 ndr->depth++;
2026 ndr_print_uint32(ndr, "count", r->count);
2027 ndr_print_ptr(ndr, "domains", r->domains);
2028 ndr->depth++;
2029 if (r->domains) {
2030 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
2031 ndr->depth++;
2032 for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
2033 char *idx_1=NULL;
2034 if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
2035 ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
2036 free(idx_1);
2039 ndr->depth--;
2041 ndr->depth--;
2042 ndr->depth--;
2045 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidType(struct ndr_push *ndr, int ndr_flags, enum lsa_SidType r)
2047 NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
2048 return NDR_ERR_SUCCESS;
2051 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidType(struct ndr_pull *ndr, int ndr_flags, enum lsa_SidType *r)
2053 uint16_t v;
2054 NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
2055 *r = v;
2056 return NDR_ERR_SUCCESS;
2059 _PUBLIC_ void ndr_print_lsa_SidType(struct ndr_print *ndr, const char *name, enum lsa_SidType r)
2061 const char *val = NULL;
2063 switch (r) {
2064 case SID_NAME_USE_NONE: val = "SID_NAME_USE_NONE"; break;
2065 case SID_NAME_USER: val = "SID_NAME_USER"; break;
2066 case SID_NAME_DOM_GRP: val = "SID_NAME_DOM_GRP"; break;
2067 case SID_NAME_DOMAIN: val = "SID_NAME_DOMAIN"; break;
2068 case SID_NAME_ALIAS: val = "SID_NAME_ALIAS"; break;
2069 case SID_NAME_WKN_GRP: val = "SID_NAME_WKN_GRP"; break;
2070 case SID_NAME_DELETED: val = "SID_NAME_DELETED"; break;
2071 case SID_NAME_INVALID: val = "SID_NAME_INVALID"; break;
2072 case SID_NAME_UNKNOWN: val = "SID_NAME_UNKNOWN"; break;
2073 case SID_NAME_COMPUTER: val = "SID_NAME_COMPUTER"; break;
2075 ndr_print_enum(ndr, name, "ENUM", val, r);
2078 static enum ndr_err_code ndr_push_lsa_TranslatedSid(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid *r)
2080 if (ndr_flags & NDR_SCALARS) {
2081 NDR_CHECK(ndr_push_align(ndr, 4));
2082 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
2083 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
2084 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
2086 if (ndr_flags & NDR_BUFFERS) {
2088 return NDR_ERR_SUCCESS;
2091 static enum ndr_err_code ndr_pull_lsa_TranslatedSid(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid *r)
2093 if (ndr_flags & NDR_SCALARS) {
2094 NDR_CHECK(ndr_pull_align(ndr, 4));
2095 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
2096 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
2097 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
2099 if (ndr_flags & NDR_BUFFERS) {
2101 return NDR_ERR_SUCCESS;
2104 _PUBLIC_ void ndr_print_lsa_TranslatedSid(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid *r)
2106 ndr_print_struct(ndr, name, "lsa_TranslatedSid");
2107 ndr->depth++;
2108 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
2109 ndr_print_uint32(ndr, "rid", r->rid);
2110 ndr_print_uint32(ndr, "sid_index", r->sid_index);
2111 ndr->depth--;
2114 static enum ndr_err_code ndr_push_lsa_TransSidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray *r)
2116 uint32_t cntr_sids_1;
2117 if (ndr_flags & NDR_SCALARS) {
2118 NDR_CHECK(ndr_push_align(ndr, 5));
2119 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2120 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
2122 if (ndr_flags & NDR_BUFFERS) {
2123 if (r->sids) {
2124 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2125 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
2126 NDR_CHECK(ndr_push_lsa_TranslatedSid(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
2130 return NDR_ERR_SUCCESS;
2133 static enum ndr_err_code ndr_pull_lsa_TransSidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray *r)
2135 uint32_t _ptr_sids;
2136 uint32_t cntr_sids_1;
2137 TALLOC_CTX *_mem_save_sids_0;
2138 TALLOC_CTX *_mem_save_sids_1;
2139 if (ndr_flags & NDR_SCALARS) {
2140 NDR_CHECK(ndr_pull_align(ndr, 5));
2141 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2142 if (r->count > 1000) {
2143 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2145 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
2146 if (_ptr_sids) {
2147 NDR_PULL_ALLOC(ndr, r->sids);
2148 } else {
2149 r->sids = NULL;
2152 if (ndr_flags & NDR_BUFFERS) {
2153 if (r->sids) {
2154 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
2155 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
2156 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
2157 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
2158 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
2159 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
2160 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
2161 NDR_CHECK(ndr_pull_lsa_TranslatedSid(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
2163 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
2164 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
2166 if (r->sids) {
2167 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
2170 return NDR_ERR_SUCCESS;
2173 _PUBLIC_ void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray *r)
2175 uint32_t cntr_sids_1;
2176 ndr_print_struct(ndr, name, "lsa_TransSidArray");
2177 ndr->depth++;
2178 ndr_print_uint32(ndr, "count", r->count);
2179 ndr_print_ptr(ndr, "sids", r->sids);
2180 ndr->depth++;
2181 if (r->sids) {
2182 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
2183 ndr->depth++;
2184 for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
2185 char *idx_1=NULL;
2186 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
2187 ndr_print_lsa_TranslatedSid(ndr, "sids", &r->sids[cntr_sids_1]);
2188 free(idx_1);
2191 ndr->depth--;
2193 ndr->depth--;
2194 ndr->depth--;
2197 static enum ndr_err_code ndr_push_lsa_RefDomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_RefDomainList *r)
2199 uint32_t cntr_domains_1;
2200 if (ndr_flags & NDR_SCALARS) {
2201 NDR_CHECK(ndr_push_align(ndr, 5));
2202 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2203 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
2204 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_size));
2206 if (ndr_flags & NDR_BUFFERS) {
2207 if (r->domains) {
2208 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2209 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2210 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
2212 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2213 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
2217 return NDR_ERR_SUCCESS;
2220 static enum ndr_err_code ndr_pull_lsa_RefDomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_RefDomainList *r)
2222 uint32_t _ptr_domains;
2223 uint32_t cntr_domains_1;
2224 TALLOC_CTX *_mem_save_domains_0;
2225 TALLOC_CTX *_mem_save_domains_1;
2226 if (ndr_flags & NDR_SCALARS) {
2227 NDR_CHECK(ndr_pull_align(ndr, 5));
2228 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2229 if (r->count > 1000) {
2230 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2232 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
2233 if (_ptr_domains) {
2234 NDR_PULL_ALLOC(ndr, r->domains);
2235 } else {
2236 r->domains = NULL;
2238 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_size));
2240 if (ndr_flags & NDR_BUFFERS) {
2241 if (r->domains) {
2242 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
2243 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
2244 NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
2245 NDR_PULL_ALLOC_N(ndr, r->domains, ndr_get_array_size(ndr, &r->domains));
2246 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
2247 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
2248 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2249 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
2251 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2252 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
2254 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
2255 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
2257 if (r->domains) {
2258 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
2261 return NDR_ERR_SUCCESS;
2264 _PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *name, const struct lsa_RefDomainList *r)
2266 uint32_t cntr_domains_1;
2267 ndr_print_struct(ndr, name, "lsa_RefDomainList");
2268 ndr->depth++;
2269 ndr_print_uint32(ndr, "count", r->count);
2270 ndr_print_ptr(ndr, "domains", r->domains);
2271 ndr->depth++;
2272 if (r->domains) {
2273 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
2274 ndr->depth++;
2275 for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
2276 char *idx_1=NULL;
2277 if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
2278 ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
2279 free(idx_1);
2282 ndr->depth--;
2284 ndr->depth--;
2285 ndr_print_uint32(ndr, "max_size", r->max_size);
2286 ndr->depth--;
2289 static enum ndr_err_code ndr_push_lsa_LookupNamesLevel(struct ndr_push *ndr, int ndr_flags, enum lsa_LookupNamesLevel r)
2291 NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
2292 return NDR_ERR_SUCCESS;
2295 static enum ndr_err_code ndr_pull_lsa_LookupNamesLevel(struct ndr_pull *ndr, int ndr_flags, enum lsa_LookupNamesLevel *r)
2297 uint16_t v;
2298 NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
2299 *r = v;
2300 return NDR_ERR_SUCCESS;
2303 _PUBLIC_ void ndr_print_lsa_LookupNamesLevel(struct ndr_print *ndr, const char *name, enum lsa_LookupNamesLevel r)
2305 const char *val = NULL;
2307 switch (r) {
2308 case LSA_LOOKUP_NAMES_ALL: val = "LSA_LOOKUP_NAMES_ALL"; break;
2309 case LSA_LOOKUP_NAMES_DOMAINS_ONLY: val = "LSA_LOOKUP_NAMES_DOMAINS_ONLY"; break;
2310 case LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY: val = "LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY"; break;
2311 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY: val = "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY"; break;
2312 case LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY: val = "LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY"; break;
2313 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2: val = "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2"; break;
2314 case LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC: val = "LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC"; break;
2316 ndr_print_enum(ndr, name, "ENUM", val, r);
2319 static enum ndr_err_code ndr_push_lsa_TranslatedName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName *r)
2321 if (ndr_flags & NDR_SCALARS) {
2322 NDR_CHECK(ndr_push_align(ndr, 5));
2323 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
2324 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
2325 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
2327 if (ndr_flags & NDR_BUFFERS) {
2328 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
2330 return NDR_ERR_SUCCESS;
2333 static enum ndr_err_code ndr_pull_lsa_TranslatedName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName *r)
2335 if (ndr_flags & NDR_SCALARS) {
2336 NDR_CHECK(ndr_pull_align(ndr, 5));
2337 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
2338 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
2339 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
2341 if (ndr_flags & NDR_BUFFERS) {
2342 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
2344 return NDR_ERR_SUCCESS;
2347 _PUBLIC_ void ndr_print_lsa_TranslatedName(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName *r)
2349 ndr_print_struct(ndr, name, "lsa_TranslatedName");
2350 ndr->depth++;
2351 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
2352 ndr_print_lsa_String(ndr, "name", &r->name);
2353 ndr_print_uint32(ndr, "sid_index", r->sid_index);
2354 ndr->depth--;
2357 static enum ndr_err_code ndr_push_lsa_TransNameArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray *r)
2359 uint32_t cntr_names_1;
2360 if (ndr_flags & NDR_SCALARS) {
2361 NDR_CHECK(ndr_push_align(ndr, 5));
2362 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2363 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
2365 if (ndr_flags & NDR_BUFFERS) {
2366 if (r->names) {
2367 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2368 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
2369 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
2371 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
2372 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
2376 return NDR_ERR_SUCCESS;
2379 static enum ndr_err_code ndr_pull_lsa_TransNameArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray *r)
2381 uint32_t _ptr_names;
2382 uint32_t cntr_names_1;
2383 TALLOC_CTX *_mem_save_names_0;
2384 TALLOC_CTX *_mem_save_names_1;
2385 if (ndr_flags & NDR_SCALARS) {
2386 NDR_CHECK(ndr_pull_align(ndr, 5));
2387 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2388 if (r->count > 1000) {
2389 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2391 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
2392 if (_ptr_names) {
2393 NDR_PULL_ALLOC(ndr, r->names);
2394 } else {
2395 r->names = NULL;
2398 if (ndr_flags & NDR_BUFFERS) {
2399 if (r->names) {
2400 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
2401 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
2402 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
2403 NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
2404 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
2405 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
2406 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
2407 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
2409 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
2410 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
2412 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
2413 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
2415 if (r->names) {
2416 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
2419 return NDR_ERR_SUCCESS;
2422 _PUBLIC_ void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray *r)
2424 uint32_t cntr_names_1;
2425 ndr_print_struct(ndr, name, "lsa_TransNameArray");
2426 ndr->depth++;
2427 ndr_print_uint32(ndr, "count", r->count);
2428 ndr_print_ptr(ndr, "names", r->names);
2429 ndr->depth++;
2430 if (r->names) {
2431 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
2432 ndr->depth++;
2433 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
2434 char *idx_1=NULL;
2435 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
2436 ndr_print_lsa_TranslatedName(ndr, "names", &r->names[cntr_names_1]);
2437 free(idx_1);
2440 ndr->depth--;
2442 ndr->depth--;
2443 ndr->depth--;
2446 static enum ndr_err_code ndr_push_lsa_LUIDAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUIDAttribute *r)
2448 if (ndr_flags & NDR_SCALARS) {
2449 NDR_CHECK(ndr_push_align(ndr, 4));
2450 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
2451 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attribute));
2453 if (ndr_flags & NDR_BUFFERS) {
2455 return NDR_ERR_SUCCESS;
2458 static enum ndr_err_code ndr_pull_lsa_LUIDAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUIDAttribute *r)
2460 if (ndr_flags & NDR_SCALARS) {
2461 NDR_CHECK(ndr_pull_align(ndr, 4));
2462 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
2463 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attribute));
2465 if (ndr_flags & NDR_BUFFERS) {
2467 return NDR_ERR_SUCCESS;
2470 _PUBLIC_ void ndr_print_lsa_LUIDAttribute(struct ndr_print *ndr, const char *name, const struct lsa_LUIDAttribute *r)
2472 ndr_print_struct(ndr, name, "lsa_LUIDAttribute");
2473 ndr->depth++;
2474 ndr_print_lsa_LUID(ndr, "luid", &r->luid);
2475 ndr_print_uint32(ndr, "attribute", r->attribute);
2476 ndr->depth--;
2479 static enum ndr_err_code ndr_push_lsa_PrivilegeSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivilegeSet *r)
2481 uint32_t cntr_set_0;
2482 if (ndr_flags & NDR_SCALARS) {
2483 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2484 NDR_CHECK(ndr_push_align(ndr, 4));
2485 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2486 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
2487 for (cntr_set_0 = 0; cntr_set_0 < r->count; cntr_set_0++) {
2488 NDR_CHECK(ndr_push_lsa_LUIDAttribute(ndr, NDR_SCALARS, &r->set[cntr_set_0]));
2491 if (ndr_flags & NDR_BUFFERS) {
2493 return NDR_ERR_SUCCESS;
2496 static enum ndr_err_code ndr_pull_lsa_PrivilegeSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivilegeSet *r)
2498 uint32_t cntr_set_0;
2499 TALLOC_CTX *_mem_save_set_0;
2500 if (ndr_flags & NDR_SCALARS) {
2501 NDR_CHECK(ndr_pull_array_size(ndr, &r->set));
2502 NDR_CHECK(ndr_pull_align(ndr, 4));
2503 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2504 if (r->count > 1000) {
2505 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2507 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
2508 NDR_PULL_ALLOC_N(ndr, r->set, ndr_get_array_size(ndr, &r->set));
2509 _mem_save_set_0 = NDR_PULL_GET_MEM_CTX(ndr);
2510 NDR_PULL_SET_MEM_CTX(ndr, r->set, 0);
2511 for (cntr_set_0 = 0; cntr_set_0 < r->count; cntr_set_0++) {
2512 NDR_CHECK(ndr_pull_lsa_LUIDAttribute(ndr, NDR_SCALARS, &r->set[cntr_set_0]));
2514 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_set_0, 0);
2515 if (r->set) {
2516 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->set, r->count));
2519 if (ndr_flags & NDR_BUFFERS) {
2521 return NDR_ERR_SUCCESS;
2524 _PUBLIC_ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name, const struct lsa_PrivilegeSet *r)
2526 uint32_t cntr_set_0;
2527 ndr_print_struct(ndr, name, "lsa_PrivilegeSet");
2528 ndr->depth++;
2529 ndr_print_uint32(ndr, "count", r->count);
2530 ndr_print_uint32(ndr, "unknown", r->unknown);
2531 ndr->print(ndr, "%s: ARRAY(%d)", "set", (int)r->count);
2532 ndr->depth++;
2533 for (cntr_set_0=0;cntr_set_0<r->count;cntr_set_0++) {
2534 char *idx_0=NULL;
2535 if (asprintf(&idx_0, "[%d]", cntr_set_0) != -1) {
2536 ndr_print_lsa_LUIDAttribute(ndr, "set", &r->set[cntr_set_0]);
2537 free(idx_0);
2540 ndr->depth--;
2541 ndr->depth--;
2544 static enum ndr_err_code ndr_push_lsa_DATA_BUF(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF *r)
2547 uint32_t _flags_save_STRUCT = ndr->flags;
2548 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2549 if (ndr_flags & NDR_SCALARS) {
2550 NDR_CHECK(ndr_push_align(ndr, 5));
2551 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
2552 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2553 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
2555 if (ndr_flags & NDR_BUFFERS) {
2556 if (r->data) {
2557 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size));
2558 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2559 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
2560 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
2563 ndr->flags = _flags_save_STRUCT;
2565 return NDR_ERR_SUCCESS;
2568 static enum ndr_err_code ndr_pull_lsa_DATA_BUF(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF *r)
2570 uint32_t _ptr_data;
2571 TALLOC_CTX *_mem_save_data_0;
2573 uint32_t _flags_save_STRUCT = ndr->flags;
2574 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2575 if (ndr_flags & NDR_SCALARS) {
2576 NDR_CHECK(ndr_pull_align(ndr, 5));
2577 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
2578 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2579 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2580 if (_ptr_data) {
2581 NDR_PULL_ALLOC(ndr, r->data);
2582 } else {
2583 r->data = NULL;
2586 if (ndr_flags & NDR_BUFFERS) {
2587 if (r->data) {
2588 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2589 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
2590 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
2591 NDR_CHECK(ndr_pull_array_length(ndr, &r->data));
2592 if (ndr_get_array_length(ndr, &r->data) > ndr_get_array_size(ndr, &r->data)) {
2593 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->data), ndr_get_array_length(ndr, &r->data));
2595 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
2596 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_length(ndr, &r->data)));
2597 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2599 if (r->data) {
2600 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->size));
2602 if (r->data) {
2603 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->data, r->length));
2606 ndr->flags = _flags_save_STRUCT;
2608 return NDR_ERR_SUCCESS;
2611 _PUBLIC_ void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF *r)
2613 ndr_print_struct(ndr, name, "lsa_DATA_BUF");
2615 uint32_t _flags_save_STRUCT = ndr->flags;
2616 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2617 ndr->depth++;
2618 ndr_print_uint32(ndr, "length", r->length);
2619 ndr_print_uint32(ndr, "size", r->size);
2620 ndr_print_ptr(ndr, "data", r->data);
2621 ndr->depth++;
2622 if (r->data) {
2623 ndr_print_array_uint8(ndr, "data", r->data, r->length);
2625 ndr->depth--;
2626 ndr->depth--;
2627 ndr->flags = _flags_save_STRUCT;
2631 static enum ndr_err_code ndr_push_lsa_DATA_BUF2(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF2 *r)
2634 uint32_t _flags_save_STRUCT = ndr->flags;
2635 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2636 if (ndr_flags & NDR_SCALARS) {
2637 NDR_CHECK(ndr_push_align(ndr, 5));
2638 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2639 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
2641 if (ndr_flags & NDR_BUFFERS) {
2642 if (r->data) {
2643 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size));
2644 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->size));
2647 ndr->flags = _flags_save_STRUCT;
2649 return NDR_ERR_SUCCESS;
2652 static enum ndr_err_code ndr_pull_lsa_DATA_BUF2(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF2 *r)
2654 uint32_t _ptr_data;
2655 TALLOC_CTX *_mem_save_data_0;
2657 uint32_t _flags_save_STRUCT = ndr->flags;
2658 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2659 if (ndr_flags & NDR_SCALARS) {
2660 NDR_CHECK(ndr_pull_align(ndr, 5));
2661 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2662 if (r->size > 65536) {
2663 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2665 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2666 if (_ptr_data) {
2667 NDR_PULL_ALLOC(ndr, r->data);
2668 } else {
2669 r->data = NULL;
2672 if (ndr_flags & NDR_BUFFERS) {
2673 if (r->data) {
2674 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2675 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
2676 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
2677 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
2678 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
2679 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2681 if (r->data) {
2682 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->size));
2685 ndr->flags = _flags_save_STRUCT;
2687 return NDR_ERR_SUCCESS;
2690 _PUBLIC_ void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF2 *r)
2692 ndr_print_struct(ndr, name, "lsa_DATA_BUF2");
2694 uint32_t _flags_save_STRUCT = ndr->flags;
2695 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2696 ndr->depth++;
2697 ndr_print_uint32(ndr, "size", r->size);
2698 ndr_print_ptr(ndr, "data", r->data);
2699 ndr->depth++;
2700 if (r->data) {
2701 ndr_print_array_uint8(ndr, "data", r->data, r->size);
2703 ndr->depth--;
2704 ndr->depth--;
2705 ndr->flags = _flags_save_STRUCT;
2709 static enum ndr_err_code ndr_push_lsa_TrustDomInfoEnum(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum r)
2711 NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
2712 return NDR_ERR_SUCCESS;
2715 static enum ndr_err_code ndr_pull_lsa_TrustDomInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum *r)
2717 uint16_t v;
2718 NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
2719 *r = v;
2720 return NDR_ERR_SUCCESS;
2723 _PUBLIC_ void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *name, enum lsa_TrustDomInfoEnum r)
2725 const char *val = NULL;
2727 switch (r) {
2728 case LSA_TRUSTED_DOMAIN_INFO_NAME: val = "LSA_TRUSTED_DOMAIN_INFO_NAME"; break;
2729 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: val = "LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS"; break;
2730 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: val = "LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET"; break;
2731 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: val = "LSA_TRUSTED_DOMAIN_INFO_PASSWORD"; break;
2732 case LSA_TRUSTED_DOMAIN_INFO_BASIC: val = "LSA_TRUSTED_DOMAIN_INFO_BASIC"; break;
2733 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX"; break;
2734 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO"; break;
2735 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO"; break;
2736 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL"; break;
2737 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL"; break;
2738 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL"; break;
2739 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL"; break;
2740 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: val = "LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES"; break;
2742 ndr_print_enum(ndr, name, "ENUM", val, r);
2745 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustDirection(struct ndr_push *ndr, int ndr_flags, uint32_t r)
2747 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2748 return NDR_ERR_SUCCESS;
2751 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustDirection(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
2753 uint32_t v;
2754 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2755 *r = v;
2756 return NDR_ERR_SUCCESS;
2759 _PUBLIC_ void ndr_print_lsa_TrustDirection(struct ndr_print *ndr, const char *name, uint32_t r)
2761 ndr_print_uint32(ndr, name, r);
2762 ndr->depth++;
2763 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_DIRECTION_INBOUND", LSA_TRUST_DIRECTION_INBOUND, r);
2764 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_DIRECTION_OUTBOUND", LSA_TRUST_DIRECTION_OUTBOUND, r);
2765 ndr->depth--;
2768 static enum ndr_err_code ndr_push_lsa_TrustType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustType r)
2770 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
2771 return NDR_ERR_SUCCESS;
2774 static enum ndr_err_code ndr_pull_lsa_TrustType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustType *r)
2776 uint32_t v;
2777 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
2778 *r = v;
2779 return NDR_ERR_SUCCESS;
2782 _PUBLIC_ void ndr_print_lsa_TrustType(struct ndr_print *ndr, const char *name, enum lsa_TrustType r)
2784 const char *val = NULL;
2786 switch (r) {
2787 case LSA_TRUST_TYPE_DOWNLEVEL: val = "LSA_TRUST_TYPE_DOWNLEVEL"; break;
2788 case LSA_TRUST_TYPE_UPLEVEL: val = "LSA_TRUST_TYPE_UPLEVEL"; break;
2789 case LSA_TRUST_TYPE_MIT: val = "LSA_TRUST_TYPE_MIT"; break;
2791 ndr_print_enum(ndr, name, "ENUM", val, r);
2794 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r)
2796 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2797 return NDR_ERR_SUCCESS;
2800 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
2802 uint32_t v;
2803 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2804 *r = v;
2805 return NDR_ERR_SUCCESS;
2808 _PUBLIC_ void ndr_print_lsa_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r)
2810 ndr_print_uint32(ndr, name, r);
2811 ndr->depth++;
2812 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE", LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE, r);
2813 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY", LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY, r);
2814 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN", LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN, r);
2815 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE", LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE, r);
2816 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION", LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION, r);
2817 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_WITHIN_FOREST", LSA_TRUST_ATTRIBUTE_WITHIN_FOREST, r);
2818 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL", LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL, r);
2819 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION", LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION, r);
2820 ndr->depth--;
2823 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoName *r)
2825 if (ndr_flags & NDR_SCALARS) {
2826 NDR_CHECK(ndr_push_align(ndr, 5));
2827 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
2829 if (ndr_flags & NDR_BUFFERS) {
2830 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
2832 return NDR_ERR_SUCCESS;
2835 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoName *r)
2837 if (ndr_flags & NDR_SCALARS) {
2838 NDR_CHECK(ndr_pull_align(ndr, 5));
2839 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
2841 if (ndr_flags & NDR_BUFFERS) {
2842 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
2844 return NDR_ERR_SUCCESS;
2847 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoName *r)
2849 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoName");
2850 ndr->depth++;
2851 ndr_print_lsa_StringLarge(ndr, "netbios_name", &r->netbios_name);
2852 ndr->depth--;
2855 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoControllers(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoControllers *r)
2857 uint32_t cntr_netbios_names_1;
2858 if (ndr_flags & NDR_SCALARS) {
2859 NDR_CHECK(ndr_push_align(ndr, 5));
2860 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries));
2861 NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_names));
2863 if (ndr_flags & NDR_BUFFERS) {
2864 if (r->netbios_names) {
2865 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->entries));
2866 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
2867 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_names[cntr_netbios_names_1]));
2869 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
2870 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_names[cntr_netbios_names_1]));
2874 return NDR_ERR_SUCCESS;
2877 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoControllers(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoControllers *r)
2879 uint32_t _ptr_netbios_names;
2880 uint32_t cntr_netbios_names_1;
2881 TALLOC_CTX *_mem_save_netbios_names_0;
2882 TALLOC_CTX *_mem_save_netbios_names_1;
2883 if (ndr_flags & NDR_SCALARS) {
2884 NDR_CHECK(ndr_pull_align(ndr, 5));
2885 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->entries));
2886 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_names));
2887 if (_ptr_netbios_names) {
2888 NDR_PULL_ALLOC(ndr, r->netbios_names);
2889 } else {
2890 r->netbios_names = NULL;
2893 if (ndr_flags & NDR_BUFFERS) {
2894 if (r->netbios_names) {
2895 _mem_save_netbios_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
2896 NDR_PULL_SET_MEM_CTX(ndr, r->netbios_names, 0);
2897 NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_names));
2898 NDR_PULL_ALLOC_N(ndr, r->netbios_names, ndr_get_array_size(ndr, &r->netbios_names));
2899 _mem_save_netbios_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
2900 NDR_PULL_SET_MEM_CTX(ndr, r->netbios_names, 0);
2901 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
2902 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_names[cntr_netbios_names_1]));
2904 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
2905 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_names[cntr_netbios_names_1]));
2907 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_names_1, 0);
2908 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_names_0, 0);
2910 if (r->netbios_names) {
2911 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->netbios_names, r->entries));
2914 return NDR_ERR_SUCCESS;
2917 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoControllers(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoControllers *r)
2919 uint32_t cntr_netbios_names_1;
2920 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoControllers");
2921 ndr->depth++;
2922 ndr_print_uint32(ndr, "entries", r->entries);
2923 ndr_print_ptr(ndr, "netbios_names", r->netbios_names);
2924 ndr->depth++;
2925 if (r->netbios_names) {
2926 ndr->print(ndr, "%s: ARRAY(%d)", "netbios_names", (int)r->entries);
2927 ndr->depth++;
2928 for (cntr_netbios_names_1=0;cntr_netbios_names_1<r->entries;cntr_netbios_names_1++) {
2929 char *idx_1=NULL;
2930 if (asprintf(&idx_1, "[%d]", cntr_netbios_names_1) != -1) {
2931 ndr_print_lsa_StringLarge(ndr, "netbios_names", &r->netbios_names[cntr_netbios_names_1]);
2932 free(idx_1);
2935 ndr->depth--;
2937 ndr->depth--;
2938 ndr->depth--;
2941 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPosixOffset *r)
2943 if (ndr_flags & NDR_SCALARS) {
2944 NDR_CHECK(ndr_push_align(ndr, 4));
2945 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->posix_offset));
2947 if (ndr_flags & NDR_BUFFERS) {
2949 return NDR_ERR_SUCCESS;
2952 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoPosixOffset(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPosixOffset *r)
2954 if (ndr_flags & NDR_SCALARS) {
2955 NDR_CHECK(ndr_pull_align(ndr, 4));
2956 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->posix_offset));
2958 if (ndr_flags & NDR_BUFFERS) {
2960 return NDR_ERR_SUCCESS;
2963 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPosixOffset *r)
2965 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoPosixOffset");
2966 ndr->depth++;
2967 ndr_print_uint32(ndr, "posix_offset", r->posix_offset);
2968 ndr->depth--;
2971 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoPassword(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPassword *r)
2973 if (ndr_flags & NDR_SCALARS) {
2974 NDR_CHECK(ndr_push_align(ndr, 5));
2975 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
2976 NDR_CHECK(ndr_push_unique_ptr(ndr, r->old_password));
2978 if (ndr_flags & NDR_BUFFERS) {
2979 if (r->password) {
2980 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
2982 if (r->old_password) {
2983 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->old_password));
2986 return NDR_ERR_SUCCESS;
2989 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoPassword(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPassword *r)
2991 uint32_t _ptr_password;
2992 TALLOC_CTX *_mem_save_password_0;
2993 uint32_t _ptr_old_password;
2994 TALLOC_CTX *_mem_save_old_password_0;
2995 if (ndr_flags & NDR_SCALARS) {
2996 NDR_CHECK(ndr_pull_align(ndr, 5));
2997 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
2998 if (_ptr_password) {
2999 NDR_PULL_ALLOC(ndr, r->password);
3000 } else {
3001 r->password = NULL;
3003 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_password));
3004 if (_ptr_old_password) {
3005 NDR_PULL_ALLOC(ndr, r->old_password);
3006 } else {
3007 r->old_password = NULL;
3010 if (ndr_flags & NDR_BUFFERS) {
3011 if (r->password) {
3012 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
3013 NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
3014 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
3015 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
3017 if (r->old_password) {
3018 _mem_save_old_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
3019 NDR_PULL_SET_MEM_CTX(ndr, r->old_password, 0);
3020 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->old_password));
3021 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_password_0, 0);
3024 return NDR_ERR_SUCCESS;
3027 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPassword *r)
3029 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoPassword");
3030 ndr->depth++;
3031 ndr_print_ptr(ndr, "password", r->password);
3032 ndr->depth++;
3033 if (r->password) {
3034 ndr_print_lsa_DATA_BUF(ndr, "password", r->password);
3036 ndr->depth--;
3037 ndr_print_ptr(ndr, "old_password", r->old_password);
3038 ndr->depth++;
3039 if (r->old_password) {
3040 ndr_print_lsa_DATA_BUF(ndr, "old_password", r->old_password);
3042 ndr->depth--;
3043 ndr->depth--;
3046 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoBasic(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBasic *r)
3048 if (ndr_flags & NDR_SCALARS) {
3049 NDR_CHECK(ndr_push_align(ndr, 5));
3050 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->netbios_name));
3051 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
3053 if (ndr_flags & NDR_BUFFERS) {
3054 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->netbios_name));
3055 if (r->sid) {
3056 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3059 return NDR_ERR_SUCCESS;
3062 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoBasic(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBasic *r)
3064 uint32_t _ptr_sid;
3065 TALLOC_CTX *_mem_save_sid_0;
3066 if (ndr_flags & NDR_SCALARS) {
3067 NDR_CHECK(ndr_pull_align(ndr, 5));
3068 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->netbios_name));
3069 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
3070 if (_ptr_sid) {
3071 NDR_PULL_ALLOC(ndr, r->sid);
3072 } else {
3073 r->sid = NULL;
3076 if (ndr_flags & NDR_BUFFERS) {
3077 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->netbios_name));
3078 if (r->sid) {
3079 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
3080 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
3081 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3082 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
3085 return NDR_ERR_SUCCESS;
3088 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBasic *r)
3090 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoBasic");
3091 ndr->depth++;
3092 ndr_print_lsa_String(ndr, "netbios_name", &r->netbios_name);
3093 ndr_print_ptr(ndr, "sid", r->sid);
3094 ndr->depth++;
3095 if (r->sid) {
3096 ndr_print_dom_sid2(ndr, "sid", r->sid);
3098 ndr->depth--;
3099 ndr->depth--;
3102 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx *r)
3104 if (ndr_flags & NDR_SCALARS) {
3105 NDR_CHECK(ndr_push_align(ndr, 5));
3106 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain_name));
3107 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
3108 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
3109 NDR_CHECK(ndr_push_lsa_TrustDirection(ndr, NDR_SCALARS, r->trust_direction));
3110 NDR_CHECK(ndr_push_lsa_TrustType(ndr, NDR_SCALARS, r->trust_type));
3111 NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes));
3113 if (ndr_flags & NDR_BUFFERS) {
3114 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name));
3115 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
3116 if (r->sid) {
3117 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3120 return NDR_ERR_SUCCESS;
3123 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx *r)
3125 uint32_t _ptr_sid;
3126 TALLOC_CTX *_mem_save_sid_0;
3127 if (ndr_flags & NDR_SCALARS) {
3128 NDR_CHECK(ndr_pull_align(ndr, 5));
3129 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain_name));
3130 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
3131 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
3132 if (_ptr_sid) {
3133 NDR_PULL_ALLOC(ndr, r->sid);
3134 } else {
3135 r->sid = NULL;
3137 NDR_CHECK(ndr_pull_lsa_TrustDirection(ndr, NDR_SCALARS, &r->trust_direction));
3138 NDR_CHECK(ndr_pull_lsa_TrustType(ndr, NDR_SCALARS, &r->trust_type));
3139 NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes));
3141 if (ndr_flags & NDR_BUFFERS) {
3142 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name));
3143 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
3144 if (r->sid) {
3145 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
3146 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
3147 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3148 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
3151 return NDR_ERR_SUCCESS;
3154 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx *r)
3156 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoEx");
3157 ndr->depth++;
3158 ndr_print_lsa_StringLarge(ndr, "domain_name", &r->domain_name);
3159 ndr_print_lsa_StringLarge(ndr, "netbios_name", &r->netbios_name);
3160 ndr_print_ptr(ndr, "sid", r->sid);
3161 ndr->depth++;
3162 if (r->sid) {
3163 ndr_print_dom_sid2(ndr, "sid", r->sid);
3165 ndr->depth--;
3166 ndr_print_lsa_TrustDirection(ndr, "trust_direction", r->trust_direction);
3167 ndr_print_lsa_TrustType(ndr, "trust_type", r->trust_type);
3168 ndr_print_lsa_TrustAttributes(ndr, "trust_attributes", r->trust_attributes);
3169 ndr->depth--;
3172 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAuthType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustAuthType r)
3174 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
3175 return NDR_ERR_SUCCESS;
3178 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustAuthType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustAuthType *r)
3180 uint32_t v;
3181 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
3182 *r = v;
3183 return NDR_ERR_SUCCESS;
3186 _PUBLIC_ void ndr_print_lsa_TrustAuthType(struct ndr_print *ndr, const char *name, enum lsa_TrustAuthType r)
3188 const char *val = NULL;
3190 switch (r) {
3191 case TRUST_AUTH_TYPE_NONE: val = "TRUST_AUTH_TYPE_NONE"; break;
3192 case TRUST_AUTH_TYPE_NT4OWF: val = "TRUST_AUTH_TYPE_NT4OWF"; break;
3193 case TRUST_AUTH_TYPE_CLEAR: val = "TRUST_AUTH_TYPE_CLEAR"; break;
3194 case TRUST_AUTH_TYPE_VERSION: val = "TRUST_AUTH_TYPE_VERSION"; break;
3196 ndr_print_enum(ndr, name, "ENUM", val, r);
3199 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBuffer *r)
3201 if (ndr_flags & NDR_SCALARS) {
3202 NDR_CHECK(ndr_push_align(ndr, 8));
3203 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->last_update_time));
3204 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
3205 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data));
3207 if (ndr_flags & NDR_BUFFERS) {
3208 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data));
3210 return NDR_ERR_SUCCESS;
3213 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBuffer *r)
3215 if (ndr_flags & NDR_SCALARS) {
3216 NDR_CHECK(ndr_pull_align(ndr, 8));
3217 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->last_update_time));
3218 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
3219 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data));
3221 if (ndr_flags & NDR_BUFFERS) {
3222 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data));
3224 return NDR_ERR_SUCCESS;
3227 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBuffer *r)
3229 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoBuffer");
3230 ndr->depth++;
3231 ndr_print_NTTIME_hyper(ndr, "last_update_time", r->last_update_time);
3232 ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
3233 ndr_print_lsa_DATA_BUF2(ndr, "data", &r->data);
3234 ndr->depth--;
3237 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoAuthInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfo *r)
3239 if (ndr_flags & NDR_SCALARS) {
3240 NDR_CHECK(ndr_push_align(ndr, 5));
3241 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->incoming_count));
3242 NDR_CHECK(ndr_push_unique_ptr(ndr, r->incoming_current_auth_info));
3243 NDR_CHECK(ndr_push_unique_ptr(ndr, r->incoming_previous_auth_info));
3244 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->outgoing_count));
3245 NDR_CHECK(ndr_push_unique_ptr(ndr, r->outgoing_current_auth_info));
3246 NDR_CHECK(ndr_push_unique_ptr(ndr, r->outgoing_previous_auth_info));
3248 if (ndr_flags & NDR_BUFFERS) {
3249 if (r->incoming_current_auth_info) {
3250 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_current_auth_info));
3252 if (r->incoming_previous_auth_info) {
3253 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_previous_auth_info));
3255 if (r->outgoing_current_auth_info) {
3256 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_current_auth_info));
3258 if (r->outgoing_previous_auth_info) {
3259 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_previous_auth_info));
3262 return NDR_ERR_SUCCESS;
3265 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoAuthInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfo *r)
3267 uint32_t _ptr_incoming_current_auth_info;
3268 TALLOC_CTX *_mem_save_incoming_current_auth_info_0;
3269 uint32_t _ptr_incoming_previous_auth_info;
3270 TALLOC_CTX *_mem_save_incoming_previous_auth_info_0;
3271 uint32_t _ptr_outgoing_current_auth_info;
3272 TALLOC_CTX *_mem_save_outgoing_current_auth_info_0;
3273 uint32_t _ptr_outgoing_previous_auth_info;
3274 TALLOC_CTX *_mem_save_outgoing_previous_auth_info_0;
3275 if (ndr_flags & NDR_SCALARS) {
3276 NDR_CHECK(ndr_pull_align(ndr, 5));
3277 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->incoming_count));
3278 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_incoming_current_auth_info));
3279 if (_ptr_incoming_current_auth_info) {
3280 NDR_PULL_ALLOC(ndr, r->incoming_current_auth_info);
3281 } else {
3282 r->incoming_current_auth_info = NULL;
3284 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_incoming_previous_auth_info));
3285 if (_ptr_incoming_previous_auth_info) {
3286 NDR_PULL_ALLOC(ndr, r->incoming_previous_auth_info);
3287 } else {
3288 r->incoming_previous_auth_info = NULL;
3290 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->outgoing_count));
3291 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_outgoing_current_auth_info));
3292 if (_ptr_outgoing_current_auth_info) {
3293 NDR_PULL_ALLOC(ndr, r->outgoing_current_auth_info);
3294 } else {
3295 r->outgoing_current_auth_info = NULL;
3297 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_outgoing_previous_auth_info));
3298 if (_ptr_outgoing_previous_auth_info) {
3299 NDR_PULL_ALLOC(ndr, r->outgoing_previous_auth_info);
3300 } else {
3301 r->outgoing_previous_auth_info = NULL;
3304 if (ndr_flags & NDR_BUFFERS) {
3305 if (r->incoming_current_auth_info) {
3306 _mem_save_incoming_current_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3307 NDR_PULL_SET_MEM_CTX(ndr, r->incoming_current_auth_info, 0);
3308 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_current_auth_info));
3309 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_incoming_current_auth_info_0, 0);
3311 if (r->incoming_previous_auth_info) {
3312 _mem_save_incoming_previous_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3313 NDR_PULL_SET_MEM_CTX(ndr, r->incoming_previous_auth_info, 0);
3314 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_previous_auth_info));
3315 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_incoming_previous_auth_info_0, 0);
3317 if (r->outgoing_current_auth_info) {
3318 _mem_save_outgoing_current_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3319 NDR_PULL_SET_MEM_CTX(ndr, r->outgoing_current_auth_info, 0);
3320 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_current_auth_info));
3321 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_outgoing_current_auth_info_0, 0);
3323 if (r->outgoing_previous_auth_info) {
3324 _mem_save_outgoing_previous_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3325 NDR_PULL_SET_MEM_CTX(ndr, r->outgoing_previous_auth_info, 0);
3326 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_previous_auth_info));
3327 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_outgoing_previous_auth_info_0, 0);
3330 return NDR_ERR_SUCCESS;
3333 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfo *r)
3335 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoAuthInfo");
3336 ndr->depth++;
3337 ndr_print_uint32(ndr, "incoming_count", r->incoming_count);
3338 ndr_print_ptr(ndr, "incoming_current_auth_info", r->incoming_current_auth_info);
3339 ndr->depth++;
3340 if (r->incoming_current_auth_info) {
3341 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "incoming_current_auth_info", r->incoming_current_auth_info);
3343 ndr->depth--;
3344 ndr_print_ptr(ndr, "incoming_previous_auth_info", r->incoming_previous_auth_info);
3345 ndr->depth++;
3346 if (r->incoming_previous_auth_info) {
3347 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "incoming_previous_auth_info", r->incoming_previous_auth_info);
3349 ndr->depth--;
3350 ndr_print_uint32(ndr, "outgoing_count", r->outgoing_count);
3351 ndr_print_ptr(ndr, "outgoing_current_auth_info", r->outgoing_current_auth_info);
3352 ndr->depth++;
3353 if (r->outgoing_current_auth_info) {
3354 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "outgoing_current_auth_info", r->outgoing_current_auth_info);
3356 ndr->depth--;
3357 ndr_print_ptr(ndr, "outgoing_previous_auth_info", r->outgoing_previous_auth_info);
3358 ndr->depth++;
3359 if (r->outgoing_previous_auth_info) {
3360 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "outgoing_previous_auth_info", r->outgoing_previous_auth_info);
3362 ndr->depth--;
3363 ndr->depth--;
3366 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo *r)
3368 if (ndr_flags & NDR_SCALARS) {
3369 NDR_CHECK(ndr_push_align(ndr, 5));
3370 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3371 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3372 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3374 if (ndr_flags & NDR_BUFFERS) {
3375 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3376 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3378 return NDR_ERR_SUCCESS;
3381 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo *r)
3383 if (ndr_flags & NDR_SCALARS) {
3384 NDR_CHECK(ndr_pull_align(ndr, 5));
3385 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3386 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3387 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3389 if (ndr_flags & NDR_BUFFERS) {
3390 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3391 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3393 return NDR_ERR_SUCCESS;
3396 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo *r)
3398 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfo");
3399 ndr->depth++;
3400 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3401 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3402 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
3403 ndr->depth--;
3406 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfoInternal *r)
3408 if (ndr_flags & NDR_SCALARS) {
3409 NDR_CHECK(ndr_push_align(ndr, 5));
3410 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob));
3412 if (ndr_flags & NDR_BUFFERS) {
3413 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob));
3415 return NDR_ERR_SUCCESS;
3418 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfoInternal *r)
3420 if (ndr_flags & NDR_SCALARS) {
3421 NDR_CHECK(ndr_pull_align(ndr, 5));
3422 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob));
3424 if (ndr_flags & NDR_BUFFERS) {
3425 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob));
3427 return NDR_ERR_SUCCESS;
3430 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfoInternal *r)
3432 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoAuthInfoInternal");
3433 ndr->depth++;
3434 ndr_print_lsa_DATA_BUF2(ndr, "auth_blob", &r->auth_blob);
3435 ndr->depth--;
3438 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfoInternal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfoInternal *r)
3440 if (ndr_flags & NDR_SCALARS) {
3441 NDR_CHECK(ndr_push_align(ndr, 5));
3442 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3443 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3444 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info));
3446 if (ndr_flags & NDR_BUFFERS) {
3447 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3448 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info));
3450 return NDR_ERR_SUCCESS;
3453 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfoInternal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfoInternal *r)
3455 if (ndr_flags & NDR_SCALARS) {
3456 NDR_CHECK(ndr_pull_align(ndr, 5));
3457 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3458 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3459 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info));
3461 if (ndr_flags & NDR_BUFFERS) {
3462 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3463 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info));
3465 return NDR_ERR_SUCCESS;
3468 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfoInternal *r)
3470 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfoInternal");
3471 ndr->depth++;
3472 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3473 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3474 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", &r->auth_info);
3475 ndr->depth--;
3478 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx2Internal *r)
3480 if (ndr_flags & NDR_SCALARS) {
3481 NDR_CHECK(ndr_push_align(ndr, 5));
3482 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3483 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->forest_trust_length));
3484 NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest_trust_data));
3486 if (ndr_flags & NDR_BUFFERS) {
3487 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3488 if (r->forest_trust_data) {
3489 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->forest_trust_length));
3490 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->forest_trust_data, r->forest_trust_length));
3493 return NDR_ERR_SUCCESS;
3496 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx2Internal *r)
3498 uint32_t _ptr_forest_trust_data;
3499 TALLOC_CTX *_mem_save_forest_trust_data_0;
3500 if (ndr_flags & NDR_SCALARS) {
3501 NDR_CHECK(ndr_pull_align(ndr, 5));
3502 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3503 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->forest_trust_length));
3504 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_data));
3505 if (_ptr_forest_trust_data) {
3506 NDR_PULL_ALLOC(ndr, r->forest_trust_data);
3507 } else {
3508 r->forest_trust_data = NULL;
3511 if (ndr_flags & NDR_BUFFERS) {
3512 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3513 if (r->forest_trust_data) {
3514 _mem_save_forest_trust_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
3515 NDR_PULL_SET_MEM_CTX(ndr, r->forest_trust_data, 0);
3516 NDR_CHECK(ndr_pull_array_size(ndr, &r->forest_trust_data));
3517 NDR_PULL_ALLOC_N(ndr, r->forest_trust_data, ndr_get_array_size(ndr, &r->forest_trust_data));
3518 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->forest_trust_data, ndr_get_array_size(ndr, &r->forest_trust_data)));
3519 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_data_0, 0);
3521 if (r->forest_trust_data) {
3522 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->forest_trust_data, r->forest_trust_length));
3525 return NDR_ERR_SUCCESS;
3528 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx2Internal *r)
3530 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoEx2Internal");
3531 ndr->depth++;
3532 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3533 ndr_print_uint32(ndr, "forest_trust_length", r->forest_trust_length);
3534 ndr_print_ptr(ndr, "forest_trust_data", r->forest_trust_data);
3535 ndr->depth++;
3536 if (r->forest_trust_data) {
3537 ndr_print_array_uint8(ndr, "forest_trust_data", r->forest_trust_data, r->forest_trust_length);
3539 ndr->depth--;
3540 ndr->depth--;
3543 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo2Internal *r)
3545 if (ndr_flags & NDR_SCALARS) {
3546 NDR_CHECK(ndr_push_align(ndr, 5));
3547 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info));
3548 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3549 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3551 if (ndr_flags & NDR_BUFFERS) {
3552 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info));
3553 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3555 return NDR_ERR_SUCCESS;
3558 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo2Internal *r)
3560 if (ndr_flags & NDR_SCALARS) {
3561 NDR_CHECK(ndr_pull_align(ndr, 5));
3562 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info));
3563 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3564 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3566 if (ndr_flags & NDR_BUFFERS) {
3567 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info));
3568 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3570 return NDR_ERR_SUCCESS;
3573 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo2Internal *r)
3575 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfo2Internal");
3576 ndr->depth++;
3577 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr, "info", &r->info);
3578 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3579 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
3580 ndr->depth--;
3583 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoSupportedEncTypes *r)
3585 if (ndr_flags & NDR_SCALARS) {
3586 NDR_CHECK(ndr_push_align(ndr, 4));
3587 NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->enc_types));
3589 if (ndr_flags & NDR_BUFFERS) {
3591 return NDR_ERR_SUCCESS;
3594 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoSupportedEncTypes *r)
3596 if (ndr_flags & NDR_SCALARS) {
3597 NDR_CHECK(ndr_pull_align(ndr, 4));
3598 NDR_CHECK(ndr_pull_kerb_EncTypes(ndr, NDR_SCALARS, &r->enc_types));
3600 if (ndr_flags & NDR_BUFFERS) {
3602 return NDR_ERR_SUCCESS;
3605 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoSupportedEncTypes *r)
3607 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoSupportedEncTypes");
3608 ndr->depth++;
3609 ndr_print_kerb_EncTypes(ndr, "enc_types", r->enc_types);
3610 ndr->depth--;
3613 static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, int ndr_flags, const union lsa_TrustedDomainInfo *r)
3615 if (ndr_flags & NDR_SCALARS) {
3616 int level = ndr_push_get_switch_value(ndr, r);
3617 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, level));
3618 NDR_CHECK(ndr_push_union_align(ndr, 5));
3619 switch (level) {
3620 case LSA_TRUSTED_DOMAIN_INFO_NAME: {
3621 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name));
3622 break; }
3624 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: {
3625 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr, NDR_SCALARS, &r->controllers));
3626 break; }
3628 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: {
3629 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3630 break; }
3632 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: {
3633 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr, NDR_SCALARS, &r->password));
3634 break; }
3636 case LSA_TRUSTED_DOMAIN_INFO_BASIC: {
3637 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr, NDR_SCALARS, &r->info_basic));
3638 break; }
3640 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: {
3641 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3642 break; }
3644 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: {
3645 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3646 break; }
3648 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: {
3649 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info));
3650 break; }
3652 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: {
3653 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info_internal));
3654 break; }
3656 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: {
3657 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_SCALARS, &r->full_info_internal));
3658 break; }
3660 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: {
3661 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info_ex2_internal));
3662 break; }
3664 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: {
3665 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal));
3666 break; }
3668 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: {
3669 NDR_CHECK(ndr_push_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types));
3670 break; }
3672 default:
3673 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3676 if (ndr_flags & NDR_BUFFERS) {
3677 int level = ndr_push_get_switch_value(ndr, r);
3678 switch (level) {
3679 case LSA_TRUSTED_DOMAIN_INFO_NAME:
3680 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name));
3681 break;
3683 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
3684 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr, NDR_BUFFERS, &r->controllers));
3685 break;
3687 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
3688 break;
3690 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
3691 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr, NDR_BUFFERS, &r->password));
3692 break;
3694 case LSA_TRUSTED_DOMAIN_INFO_BASIC:
3695 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr, NDR_BUFFERS, &r->info_basic));
3696 break;
3698 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
3699 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3700 break;
3702 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
3703 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3704 break;
3706 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
3707 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info));
3708 break;
3710 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
3711 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info_internal));
3712 break;
3714 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
3715 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_BUFFERS, &r->full_info_internal));
3716 break;
3718 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
3719 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info_ex2_internal));
3720 break;
3722 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
3723 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal));
3724 break;
3726 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES:
3727 break;
3729 default:
3730 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3733 return NDR_ERR_SUCCESS;
3736 static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, int ndr_flags, union lsa_TrustedDomainInfo *r)
3738 int level;
3739 uint16_t _level;
3740 level = ndr_pull_get_switch_value(ndr, r);
3741 if (ndr_flags & NDR_SCALARS) {
3742 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
3743 if (_level != level) {
3744 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3746 NDR_CHECK(ndr_pull_union_align(ndr, 5));
3747 switch (level) {
3748 case LSA_TRUSTED_DOMAIN_INFO_NAME: {
3749 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name));
3750 break; }
3752 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: {
3753 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr, NDR_SCALARS, &r->controllers));
3754 break; }
3756 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: {
3757 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3758 break; }
3760 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: {
3761 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr, NDR_SCALARS, &r->password));
3762 break; }
3764 case LSA_TRUSTED_DOMAIN_INFO_BASIC: {
3765 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr, NDR_SCALARS, &r->info_basic));
3766 break; }
3768 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: {
3769 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3770 break; }
3772 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: {
3773 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3774 break; }
3776 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: {
3777 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info));
3778 break; }
3780 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: {
3781 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info_internal));
3782 break; }
3784 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: {
3785 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_SCALARS, &r->full_info_internal));
3786 break; }
3788 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: {
3789 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info_ex2_internal));
3790 break; }
3792 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: {
3793 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal));
3794 break; }
3796 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES: {
3797 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types));
3798 break; }
3800 default:
3801 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3804 if (ndr_flags & NDR_BUFFERS) {
3805 switch (level) {
3806 case LSA_TRUSTED_DOMAIN_INFO_NAME:
3807 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name));
3808 break;
3810 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
3811 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr, NDR_BUFFERS, &r->controllers));
3812 break;
3814 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
3815 break;
3817 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
3818 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr, NDR_BUFFERS, &r->password));
3819 break;
3821 case LSA_TRUSTED_DOMAIN_INFO_BASIC:
3822 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr, NDR_BUFFERS, &r->info_basic));
3823 break;
3825 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
3826 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3827 break;
3829 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
3830 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3831 break;
3833 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
3834 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info));
3835 break;
3837 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
3838 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info_internal));
3839 break;
3841 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
3842 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_BUFFERS, &r->full_info_internal));
3843 break;
3845 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
3846 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info_ex2_internal));
3847 break;
3849 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
3850 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal));
3851 break;
3853 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES:
3854 break;
3856 default:
3857 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3860 return NDR_ERR_SUCCESS;
3863 _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char *name, const union lsa_TrustedDomainInfo *r)
3865 int level;
3866 level = ndr_print_get_switch_value(ndr, r);
3867 ndr_print_union(ndr, name, level, "lsa_TrustedDomainInfo");
3868 switch (level) {
3869 case LSA_TRUSTED_DOMAIN_INFO_NAME:
3870 ndr_print_lsa_TrustDomainInfoName(ndr, "name", &r->name);
3871 break;
3873 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
3874 ndr_print_lsa_TrustDomainInfoControllers(ndr, "controllers", &r->controllers);
3875 break;
3877 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
3878 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3879 break;
3881 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
3882 ndr_print_lsa_TrustDomainInfoPassword(ndr, "password", &r->password);
3883 break;
3885 case LSA_TRUSTED_DOMAIN_INFO_BASIC:
3886 ndr_print_lsa_TrustDomainInfoBasic(ndr, "info_basic", &r->info_basic);
3887 break;
3889 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
3890 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3891 break;
3893 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
3894 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
3895 break;
3897 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
3898 ndr_print_lsa_TrustDomainInfoFullInfo(ndr, "full_info", &r->full_info);
3899 break;
3901 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
3902 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info_internal", &r->auth_info_internal);
3903 break;
3905 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
3906 ndr_print_lsa_TrustDomainInfoFullInfoInternal(ndr, "full_info_internal", &r->full_info_internal);
3907 break;
3909 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
3910 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr, "info_ex2_internal", &r->info_ex2_internal);
3911 break;
3913 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
3914 ndr_print_lsa_TrustDomainInfoFullInfo2Internal(ndr, "full_info2_internal", &r->full_info2_internal);
3915 break;
3917 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES:
3918 ndr_print_lsa_TrustDomainInfoSupportedEncTypes(ndr, "enc_types", &r->enc_types);
3919 break;
3921 default:
3922 ndr_print_bad_level(ndr, name, level);
3926 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)
3928 if (ndr_flags & NDR_SCALARS) {
3929 NDR_CHECK(ndr_push_align(ndr, 5));
3930 NDR_CHECK(ndr_push_unique_ptr(ndr, r->buf));
3932 if (ndr_flags & NDR_BUFFERS) {
3933 if (r->buf) {
3934 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->buf));
3937 return NDR_ERR_SUCCESS;
3940 static enum ndr_err_code ndr_pull_lsa_DATA_BUF_PTR(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF_PTR *r)
3942 uint32_t _ptr_buf;
3943 TALLOC_CTX *_mem_save_buf_0;
3944 if (ndr_flags & NDR_SCALARS) {
3945 NDR_CHECK(ndr_pull_align(ndr, 5));
3946 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buf));
3947 if (_ptr_buf) {
3948 NDR_PULL_ALLOC(ndr, r->buf);
3949 } else {
3950 r->buf = NULL;
3953 if (ndr_flags & NDR_BUFFERS) {
3954 if (r->buf) {
3955 _mem_save_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
3956 NDR_PULL_SET_MEM_CTX(ndr, r->buf, 0);
3957 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->buf));
3958 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buf_0, 0);
3961 return NDR_ERR_SUCCESS;
3964 _PUBLIC_ void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF_PTR *r)
3966 ndr_print_struct(ndr, name, "lsa_DATA_BUF_PTR");
3967 ndr->depth++;
3968 ndr_print_ptr(ndr, "buf", r->buf);
3969 ndr->depth++;
3970 if (r->buf) {
3971 ndr_print_lsa_DATA_BUF(ndr, "buf", r->buf);
3973 ndr->depth--;
3974 ndr->depth--;
3977 static enum ndr_err_code ndr_push_lsa_RightSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_RightSet *r)
3979 uint32_t cntr_names_1;
3980 if (ndr_flags & NDR_SCALARS) {
3981 NDR_CHECK(ndr_push_align(ndr, 5));
3982 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3983 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
3985 if (ndr_flags & NDR_BUFFERS) {
3986 if (r->names) {
3987 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
3988 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
3989 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
3991 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
3992 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
3996 return NDR_ERR_SUCCESS;
3999 static enum ndr_err_code ndr_pull_lsa_RightSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_RightSet *r)
4001 uint32_t _ptr_names;
4002 uint32_t cntr_names_1;
4003 TALLOC_CTX *_mem_save_names_0;
4004 TALLOC_CTX *_mem_save_names_1;
4005 if (ndr_flags & NDR_SCALARS) {
4006 NDR_CHECK(ndr_pull_align(ndr, 5));
4007 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4008 if (r->count > 256) {
4009 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4011 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
4012 if (_ptr_names) {
4013 NDR_PULL_ALLOC(ndr, r->names);
4014 } else {
4015 r->names = NULL;
4018 if (ndr_flags & NDR_BUFFERS) {
4019 if (r->names) {
4020 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
4021 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
4022 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
4023 NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
4024 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
4025 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
4026 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4027 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
4029 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4030 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
4032 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
4033 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
4035 if (r->names) {
4036 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
4039 return NDR_ERR_SUCCESS;
4042 _PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, const struct lsa_RightSet *r)
4044 uint32_t cntr_names_1;
4045 ndr_print_struct(ndr, name, "lsa_RightSet");
4046 ndr->depth++;
4047 ndr_print_uint32(ndr, "count", r->count);
4048 ndr_print_ptr(ndr, "names", r->names);
4049 ndr->depth++;
4050 if (r->names) {
4051 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
4052 ndr->depth++;
4053 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
4054 char *idx_1=NULL;
4055 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
4056 ndr_print_lsa_StringLarge(ndr, "names", &r->names[cntr_names_1]);
4057 free(idx_1);
4060 ndr->depth--;
4062 ndr->depth--;
4063 ndr->depth--;
4066 static enum ndr_err_code ndr_push_lsa_DomainListEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainListEx *r)
4068 uint32_t cntr_domains_1;
4069 if (ndr_flags & NDR_SCALARS) {
4070 NDR_CHECK(ndr_push_align(ndr, 5));
4071 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4072 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
4074 if (ndr_flags & NDR_BUFFERS) {
4075 if (r->domains) {
4076 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4077 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
4078 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
4080 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
4081 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
4085 return NDR_ERR_SUCCESS;
4088 static enum ndr_err_code ndr_pull_lsa_DomainListEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainListEx *r)
4090 uint32_t _ptr_domains;
4091 uint32_t cntr_domains_1;
4092 TALLOC_CTX *_mem_save_domains_0;
4093 TALLOC_CTX *_mem_save_domains_1;
4094 if (ndr_flags & NDR_SCALARS) {
4095 NDR_CHECK(ndr_pull_align(ndr, 5));
4096 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4097 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
4098 if (_ptr_domains) {
4099 NDR_PULL_ALLOC(ndr, r->domains);
4100 } else {
4101 r->domains = NULL;
4104 if (ndr_flags & NDR_BUFFERS) {
4105 if (r->domains) {
4106 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
4107 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
4108 NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
4109 NDR_PULL_ALLOC_N(ndr, r->domains, ndr_get_array_size(ndr, &r->domains));
4110 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
4111 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
4112 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
4113 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
4115 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
4116 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
4118 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
4119 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
4121 if (r->domains) {
4122 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
4125 return NDR_ERR_SUCCESS;
4128 _PUBLIC_ void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name, const struct lsa_DomainListEx *r)
4130 uint32_t cntr_domains_1;
4131 ndr_print_struct(ndr, name, "lsa_DomainListEx");
4132 ndr->depth++;
4133 ndr_print_uint32(ndr, "count", r->count);
4134 ndr_print_ptr(ndr, "domains", r->domains);
4135 ndr->depth++;
4136 if (r->domains) {
4137 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
4138 ndr->depth++;
4139 for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
4140 char *idx_1=NULL;
4141 if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
4142 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "domains", &r->domains[cntr_domains_1]);
4143 free(idx_1);
4146 ndr->depth--;
4148 ndr->depth--;
4149 ndr->depth--;
4152 static enum ndr_err_code ndr_push_lsa_DomainInfoKerberos(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoKerberos *r)
4154 if (ndr_flags & NDR_SCALARS) {
4155 NDR_CHECK(ndr_push_align(ndr, 8));
4156 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enforce_restrictions));
4157 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->service_tkt_lifetime));
4158 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->user_tkt_lifetime));
4159 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->user_tkt_renewaltime));
4160 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->clock_skew));
4161 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown6));
4163 if (ndr_flags & NDR_BUFFERS) {
4165 return NDR_ERR_SUCCESS;
4168 static enum ndr_err_code ndr_pull_lsa_DomainInfoKerberos(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoKerberos *r)
4170 if (ndr_flags & NDR_SCALARS) {
4171 NDR_CHECK(ndr_pull_align(ndr, 8));
4172 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enforce_restrictions));
4173 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->service_tkt_lifetime));
4174 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->user_tkt_lifetime));
4175 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->user_tkt_renewaltime));
4176 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->clock_skew));
4177 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown6));
4179 if (ndr_flags & NDR_BUFFERS) {
4181 return NDR_ERR_SUCCESS;
4184 _PUBLIC_ void ndr_print_lsa_DomainInfoKerberos(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoKerberos *r)
4186 ndr_print_struct(ndr, name, "lsa_DomainInfoKerberos");
4187 ndr->depth++;
4188 ndr_print_uint32(ndr, "enforce_restrictions", r->enforce_restrictions);
4189 ndr_print_hyper(ndr, "service_tkt_lifetime", r->service_tkt_lifetime);
4190 ndr_print_hyper(ndr, "user_tkt_lifetime", r->user_tkt_lifetime);
4191 ndr_print_hyper(ndr, "user_tkt_renewaltime", r->user_tkt_renewaltime);
4192 ndr_print_hyper(ndr, "clock_skew", r->clock_skew);
4193 ndr_print_hyper(ndr, "unknown6", r->unknown6);
4194 ndr->depth--;
4197 static enum ndr_err_code ndr_push_lsa_DomainInfoEfs(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoEfs *r)
4199 if (ndr_flags & NDR_SCALARS) {
4200 NDR_CHECK(ndr_push_align(ndr, 5));
4201 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->blob_size));
4202 NDR_CHECK(ndr_push_unique_ptr(ndr, r->efs_blob));
4204 if (ndr_flags & NDR_BUFFERS) {
4205 if (r->efs_blob) {
4206 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->blob_size));
4207 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->efs_blob, r->blob_size));
4210 return NDR_ERR_SUCCESS;
4213 static enum ndr_err_code ndr_pull_lsa_DomainInfoEfs(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoEfs *r)
4215 uint32_t _ptr_efs_blob;
4216 TALLOC_CTX *_mem_save_efs_blob_0;
4217 if (ndr_flags & NDR_SCALARS) {
4218 NDR_CHECK(ndr_pull_align(ndr, 5));
4219 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blob_size));
4220 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_efs_blob));
4221 if (_ptr_efs_blob) {
4222 NDR_PULL_ALLOC(ndr, r->efs_blob);
4223 } else {
4224 r->efs_blob = NULL;
4227 if (ndr_flags & NDR_BUFFERS) {
4228 if (r->efs_blob) {
4229 _mem_save_efs_blob_0 = NDR_PULL_GET_MEM_CTX(ndr);
4230 NDR_PULL_SET_MEM_CTX(ndr, r->efs_blob, 0);
4231 NDR_CHECK(ndr_pull_array_size(ndr, &r->efs_blob));
4232 NDR_PULL_ALLOC_N(ndr, r->efs_blob, ndr_get_array_size(ndr, &r->efs_blob));
4233 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->efs_blob, ndr_get_array_size(ndr, &r->efs_blob)));
4234 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_efs_blob_0, 0);
4236 if (r->efs_blob) {
4237 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->efs_blob, r->blob_size));
4240 return NDR_ERR_SUCCESS;
4243 _PUBLIC_ void ndr_print_lsa_DomainInfoEfs(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoEfs *r)
4245 ndr_print_struct(ndr, name, "lsa_DomainInfoEfs");
4246 ndr->depth++;
4247 ndr_print_uint32(ndr, "blob_size", r->blob_size);
4248 ndr_print_ptr(ndr, "efs_blob", r->efs_blob);
4249 ndr->depth++;
4250 if (r->efs_blob) {
4251 ndr_print_array_uint8(ndr, "efs_blob", r->efs_blob, r->blob_size);
4253 ndr->depth--;
4254 ndr->depth--;
4257 static enum ndr_err_code ndr_push_lsa_DomainInformationPolicy(struct ndr_push *ndr, int ndr_flags, const union lsa_DomainInformationPolicy *r)
4259 if (ndr_flags & NDR_SCALARS) {
4260 int level = ndr_push_get_switch_value(ndr, r);
4261 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
4262 NDR_CHECK(ndr_push_union_align(ndr, 8));
4263 switch (level) {
4264 case LSA_DOMAIN_INFO_POLICY_EFS: {
4265 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info));
4266 break; }
4268 case LSA_DOMAIN_INFO_POLICY_KERBEROS: {
4269 NDR_CHECK(ndr_push_lsa_DomainInfoKerberos(ndr, NDR_SCALARS, &r->kerberos_info));
4270 break; }
4272 default:
4273 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4276 if (ndr_flags & NDR_BUFFERS) {
4277 int level = ndr_push_get_switch_value(ndr, r);
4278 switch (level) {
4279 case LSA_DOMAIN_INFO_POLICY_EFS:
4280 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr, NDR_BUFFERS, &r->efs_info));
4281 break;
4283 case LSA_DOMAIN_INFO_POLICY_KERBEROS:
4284 break;
4286 default:
4287 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4290 return NDR_ERR_SUCCESS;
4293 static enum ndr_err_code ndr_pull_lsa_DomainInformationPolicy(struct ndr_pull *ndr, int ndr_flags, union lsa_DomainInformationPolicy *r)
4295 int level;
4296 uint16_t _level;
4297 level = ndr_pull_get_switch_value(ndr, r);
4298 if (ndr_flags & NDR_SCALARS) {
4299 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
4300 if (_level != level) {
4301 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
4303 NDR_CHECK(ndr_pull_union_align(ndr, 8));
4304 switch (level) {
4305 case LSA_DOMAIN_INFO_POLICY_EFS: {
4306 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info));
4307 break; }
4309 case LSA_DOMAIN_INFO_POLICY_KERBEROS: {
4310 NDR_CHECK(ndr_pull_lsa_DomainInfoKerberos(ndr, NDR_SCALARS, &r->kerberos_info));
4311 break; }
4313 default:
4314 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4317 if (ndr_flags & NDR_BUFFERS) {
4318 switch (level) {
4319 case LSA_DOMAIN_INFO_POLICY_EFS:
4320 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr, NDR_BUFFERS, &r->efs_info));
4321 break;
4323 case LSA_DOMAIN_INFO_POLICY_KERBEROS:
4324 break;
4326 default:
4327 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
4330 return NDR_ERR_SUCCESS;
4333 _PUBLIC_ void ndr_print_lsa_DomainInformationPolicy(struct ndr_print *ndr, const char *name, const union lsa_DomainInformationPolicy *r)
4335 int level;
4336 level = ndr_print_get_switch_value(ndr, r);
4337 ndr_print_union(ndr, name, level, "lsa_DomainInformationPolicy");
4338 switch (level) {
4339 case LSA_DOMAIN_INFO_POLICY_EFS:
4340 ndr_print_lsa_DomainInfoEfs(ndr, "efs_info", &r->efs_info);
4341 break;
4343 case LSA_DOMAIN_INFO_POLICY_KERBEROS:
4344 ndr_print_lsa_DomainInfoKerberos(ndr, "kerberos_info", &r->kerberos_info);
4345 break;
4347 default:
4348 ndr_print_bad_level(ndr, name, level);
4352 static enum ndr_err_code ndr_push_lsa_TranslatedName2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName2 *r)
4354 if (ndr_flags & NDR_SCALARS) {
4355 NDR_CHECK(ndr_push_align(ndr, 5));
4356 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
4357 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
4358 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
4359 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
4361 if (ndr_flags & NDR_BUFFERS) {
4362 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
4364 return NDR_ERR_SUCCESS;
4367 static enum ndr_err_code ndr_pull_lsa_TranslatedName2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName2 *r)
4369 if (ndr_flags & NDR_SCALARS) {
4370 NDR_CHECK(ndr_pull_align(ndr, 5));
4371 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
4372 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
4373 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
4374 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
4376 if (ndr_flags & NDR_BUFFERS) {
4377 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
4379 return NDR_ERR_SUCCESS;
4382 _PUBLIC_ void ndr_print_lsa_TranslatedName2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName2 *r)
4384 ndr_print_struct(ndr, name, "lsa_TranslatedName2");
4385 ndr->depth++;
4386 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
4387 ndr_print_lsa_String(ndr, "name", &r->name);
4388 ndr_print_uint32(ndr, "sid_index", r->sid_index);
4389 ndr_print_uint32(ndr, "unknown", r->unknown);
4390 ndr->depth--;
4393 static enum ndr_err_code ndr_push_lsa_TransNameArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray2 *r)
4395 uint32_t cntr_names_1;
4396 if (ndr_flags & NDR_SCALARS) {
4397 NDR_CHECK(ndr_push_align(ndr, 5));
4398 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4399 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
4401 if (ndr_flags & NDR_BUFFERS) {
4402 if (r->names) {
4403 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4404 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4405 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
4407 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4408 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
4412 return NDR_ERR_SUCCESS;
4415 static enum ndr_err_code ndr_pull_lsa_TransNameArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray2 *r)
4417 uint32_t _ptr_names;
4418 uint32_t cntr_names_1;
4419 TALLOC_CTX *_mem_save_names_0;
4420 TALLOC_CTX *_mem_save_names_1;
4421 if (ndr_flags & NDR_SCALARS) {
4422 NDR_CHECK(ndr_pull_align(ndr, 5));
4423 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4424 if (r->count > 1000) {
4425 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4427 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
4428 if (_ptr_names) {
4429 NDR_PULL_ALLOC(ndr, r->names);
4430 } else {
4431 r->names = NULL;
4434 if (ndr_flags & NDR_BUFFERS) {
4435 if (r->names) {
4436 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
4437 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
4438 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
4439 NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
4440 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
4441 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
4442 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4443 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
4445 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4446 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
4448 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
4449 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
4451 if (r->names) {
4452 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
4455 return NDR_ERR_SUCCESS;
4458 _PUBLIC_ void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray2 *r)
4460 uint32_t cntr_names_1;
4461 ndr_print_struct(ndr, name, "lsa_TransNameArray2");
4462 ndr->depth++;
4463 ndr_print_uint32(ndr, "count", r->count);
4464 ndr_print_ptr(ndr, "names", r->names);
4465 ndr->depth++;
4466 if (r->names) {
4467 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
4468 ndr->depth++;
4469 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
4470 char *idx_1=NULL;
4471 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
4472 ndr_print_lsa_TranslatedName2(ndr, "names", &r->names[cntr_names_1]);
4473 free(idx_1);
4476 ndr->depth--;
4478 ndr->depth--;
4479 ndr->depth--;
4482 static enum ndr_err_code ndr_push_lsa_LookupOptions(struct ndr_push *ndr, int ndr_flags, enum lsa_LookupOptions r)
4484 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
4485 return NDR_ERR_SUCCESS;
4488 static enum ndr_err_code ndr_pull_lsa_LookupOptions(struct ndr_pull *ndr, int ndr_flags, enum lsa_LookupOptions *r)
4490 uint32_t v;
4491 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
4492 *r = v;
4493 return NDR_ERR_SUCCESS;
4496 _PUBLIC_ void ndr_print_lsa_LookupOptions(struct ndr_print *ndr, const char *name, enum lsa_LookupOptions r)
4498 const char *val = NULL;
4500 switch (r) {
4501 case LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES: val = "LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES"; break;
4502 case LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL: val = "LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL"; break;
4504 ndr_print_enum(ndr, name, "ENUM", val, r);
4507 static enum ndr_err_code ndr_push_lsa_ClientRevision(struct ndr_push *ndr, int ndr_flags, enum lsa_ClientRevision r)
4509 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
4510 return NDR_ERR_SUCCESS;
4513 static enum ndr_err_code ndr_pull_lsa_ClientRevision(struct ndr_pull *ndr, int ndr_flags, enum lsa_ClientRevision *r)
4515 uint32_t v;
4516 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
4517 *r = v;
4518 return NDR_ERR_SUCCESS;
4521 _PUBLIC_ void ndr_print_lsa_ClientRevision(struct ndr_print *ndr, const char *name, enum lsa_ClientRevision r)
4523 const char *val = NULL;
4525 switch (r) {
4526 case LSA_CLIENT_REVISION_1: val = "LSA_CLIENT_REVISION_1"; break;
4527 case LSA_CLIENT_REVISION_2: val = "LSA_CLIENT_REVISION_2"; break;
4529 ndr_print_enum(ndr, name, "ENUM", val, r);
4532 static enum ndr_err_code ndr_push_lsa_TranslatedSid2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid2 *r)
4534 if (ndr_flags & NDR_SCALARS) {
4535 NDR_CHECK(ndr_push_align(ndr, 4));
4536 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
4537 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
4538 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
4539 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
4541 if (ndr_flags & NDR_BUFFERS) {
4543 return NDR_ERR_SUCCESS;
4546 static enum ndr_err_code ndr_pull_lsa_TranslatedSid2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid2 *r)
4548 if (ndr_flags & NDR_SCALARS) {
4549 NDR_CHECK(ndr_pull_align(ndr, 4));
4550 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
4551 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
4552 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
4553 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
4555 if (ndr_flags & NDR_BUFFERS) {
4557 return NDR_ERR_SUCCESS;
4560 _PUBLIC_ void ndr_print_lsa_TranslatedSid2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid2 *r)
4562 ndr_print_struct(ndr, name, "lsa_TranslatedSid2");
4563 ndr->depth++;
4564 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
4565 ndr_print_uint32(ndr, "rid", r->rid);
4566 ndr_print_uint32(ndr, "sid_index", r->sid_index);
4567 ndr_print_uint32(ndr, "unknown", r->unknown);
4568 ndr->depth--;
4571 static enum ndr_err_code ndr_push_lsa_TransSidArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray2 *r)
4573 uint32_t cntr_sids_1;
4574 if (ndr_flags & NDR_SCALARS) {
4575 NDR_CHECK(ndr_push_align(ndr, 5));
4576 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4577 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
4579 if (ndr_flags & NDR_BUFFERS) {
4580 if (r->sids) {
4581 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4582 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4583 NDR_CHECK(ndr_push_lsa_TranslatedSid2(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4587 return NDR_ERR_SUCCESS;
4590 static enum ndr_err_code ndr_pull_lsa_TransSidArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray2 *r)
4592 uint32_t _ptr_sids;
4593 uint32_t cntr_sids_1;
4594 TALLOC_CTX *_mem_save_sids_0;
4595 TALLOC_CTX *_mem_save_sids_1;
4596 if (ndr_flags & NDR_SCALARS) {
4597 NDR_CHECK(ndr_pull_align(ndr, 5));
4598 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4599 if (r->count > 1000) {
4600 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4602 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
4603 if (_ptr_sids) {
4604 NDR_PULL_ALLOC(ndr, r->sids);
4605 } else {
4606 r->sids = NULL;
4609 if (ndr_flags & NDR_BUFFERS) {
4610 if (r->sids) {
4611 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
4612 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4613 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
4614 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
4615 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
4616 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4617 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4618 NDR_CHECK(ndr_pull_lsa_TranslatedSid2(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4620 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
4621 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
4623 if (r->sids) {
4624 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
4627 return NDR_ERR_SUCCESS;
4630 _PUBLIC_ void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray2 *r)
4632 uint32_t cntr_sids_1;
4633 ndr_print_struct(ndr, name, "lsa_TransSidArray2");
4634 ndr->depth++;
4635 ndr_print_uint32(ndr, "count", r->count);
4636 ndr_print_ptr(ndr, "sids", r->sids);
4637 ndr->depth++;
4638 if (r->sids) {
4639 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
4640 ndr->depth++;
4641 for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
4642 char *idx_1=NULL;
4643 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
4644 ndr_print_lsa_TranslatedSid2(ndr, "sids", &r->sids[cntr_sids_1]);
4645 free(idx_1);
4648 ndr->depth--;
4650 ndr->depth--;
4651 ndr->depth--;
4654 static enum ndr_err_code ndr_push_lsa_TranslatedSid3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid3 *r)
4656 if (ndr_flags & NDR_SCALARS) {
4657 NDR_CHECK(ndr_push_align(ndr, 5));
4658 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
4659 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
4660 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
4661 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
4663 if (ndr_flags & NDR_BUFFERS) {
4664 if (r->sid) {
4665 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
4668 return NDR_ERR_SUCCESS;
4671 static enum ndr_err_code ndr_pull_lsa_TranslatedSid3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid3 *r)
4673 uint32_t _ptr_sid;
4674 TALLOC_CTX *_mem_save_sid_0;
4675 if (ndr_flags & NDR_SCALARS) {
4676 NDR_CHECK(ndr_pull_align(ndr, 5));
4677 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
4678 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
4679 if (_ptr_sid) {
4680 NDR_PULL_ALLOC(ndr, r->sid);
4681 } else {
4682 r->sid = NULL;
4684 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
4685 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
4687 if (ndr_flags & NDR_BUFFERS) {
4688 if (r->sid) {
4689 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
4690 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
4691 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
4692 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
4695 return NDR_ERR_SUCCESS;
4698 _PUBLIC_ void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid3 *r)
4700 ndr_print_struct(ndr, name, "lsa_TranslatedSid3");
4701 ndr->depth++;
4702 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
4703 ndr_print_ptr(ndr, "sid", r->sid);
4704 ndr->depth++;
4705 if (r->sid) {
4706 ndr_print_dom_sid2(ndr, "sid", r->sid);
4708 ndr->depth--;
4709 ndr_print_uint32(ndr, "sid_index", r->sid_index);
4710 ndr_print_uint32(ndr, "flags", r->flags);
4711 ndr->depth--;
4714 static enum ndr_err_code ndr_push_lsa_TransSidArray3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray3 *r)
4716 uint32_t cntr_sids_1;
4717 if (ndr_flags & NDR_SCALARS) {
4718 NDR_CHECK(ndr_push_align(ndr, 5));
4719 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4720 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
4722 if (ndr_flags & NDR_BUFFERS) {
4723 if (r->sids) {
4724 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4725 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4726 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4728 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4729 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
4733 return NDR_ERR_SUCCESS;
4736 static enum ndr_err_code ndr_pull_lsa_TransSidArray3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray3 *r)
4738 uint32_t _ptr_sids;
4739 uint32_t cntr_sids_1;
4740 TALLOC_CTX *_mem_save_sids_0;
4741 TALLOC_CTX *_mem_save_sids_1;
4742 if (ndr_flags & NDR_SCALARS) {
4743 NDR_CHECK(ndr_pull_align(ndr, 5));
4744 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4745 if (r->count > 1000) {
4746 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4748 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
4749 if (_ptr_sids) {
4750 NDR_PULL_ALLOC(ndr, r->sids);
4751 } else {
4752 r->sids = NULL;
4755 if (ndr_flags & NDR_BUFFERS) {
4756 if (r->sids) {
4757 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
4758 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4759 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
4760 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
4761 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
4762 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4763 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4764 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4766 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4767 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
4769 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
4770 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
4772 if (r->sids) {
4773 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
4776 return NDR_ERR_SUCCESS;
4779 _PUBLIC_ void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray3 *r)
4781 uint32_t cntr_sids_1;
4782 ndr_print_struct(ndr, name, "lsa_TransSidArray3");
4783 ndr->depth++;
4784 ndr_print_uint32(ndr, "count", r->count);
4785 ndr_print_ptr(ndr, "sids", r->sids);
4786 ndr->depth++;
4787 if (r->sids) {
4788 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
4789 ndr->depth++;
4790 for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
4791 char *idx_1=NULL;
4792 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
4793 ndr_print_lsa_TranslatedSid3(ndr, "sids", &r->sids[cntr_sids_1]);
4794 free(idx_1);
4797 ndr->depth--;
4799 ndr->depth--;
4800 ndr->depth--;
4803 static enum ndr_err_code ndr_push_lsa_ForestTrustBinaryData(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustBinaryData *r)
4805 if (ndr_flags & NDR_SCALARS) {
4806 NDR_CHECK(ndr_push_align(ndr, 5));
4807 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
4808 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
4810 if (ndr_flags & NDR_BUFFERS) {
4811 if (r->data) {
4812 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
4813 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
4816 return NDR_ERR_SUCCESS;
4819 static enum ndr_err_code ndr_pull_lsa_ForestTrustBinaryData(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustBinaryData *r)
4821 uint32_t _ptr_data;
4822 TALLOC_CTX *_mem_save_data_0;
4823 if (ndr_flags & NDR_SCALARS) {
4824 NDR_CHECK(ndr_pull_align(ndr, 5));
4825 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
4826 if (r->length > 131072) {
4827 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4829 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
4830 if (_ptr_data) {
4831 NDR_PULL_ALLOC(ndr, r->data);
4832 } else {
4833 r->data = NULL;
4836 if (ndr_flags & NDR_BUFFERS) {
4837 if (r->data) {
4838 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
4839 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
4840 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
4841 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
4842 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
4843 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
4845 if (r->data) {
4846 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
4849 return NDR_ERR_SUCCESS;
4852 _PUBLIC_ void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustBinaryData *r)
4854 ndr_print_struct(ndr, name, "lsa_ForestTrustBinaryData");
4855 ndr->depth++;
4856 ndr_print_uint32(ndr, "length", r->length);
4857 ndr_print_ptr(ndr, "data", r->data);
4858 ndr->depth++;
4859 if (r->data) {
4860 ndr_print_array_uint8(ndr, "data", r->data, r->length);
4862 ndr->depth--;
4863 ndr->depth--;
4866 static enum ndr_err_code ndr_push_lsa_ForestTrustDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustDomainInfo *r)
4868 if (ndr_flags & NDR_SCALARS) {
4869 NDR_CHECK(ndr_push_align(ndr, 5));
4870 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid));
4871 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain_name));
4872 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_domain_name));
4874 if (ndr_flags & NDR_BUFFERS) {
4875 if (r->domain_sid) {
4876 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
4878 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain_name));
4879 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_domain_name));
4881 return NDR_ERR_SUCCESS;
4884 static enum ndr_err_code ndr_pull_lsa_ForestTrustDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustDomainInfo *r)
4886 uint32_t _ptr_domain_sid;
4887 TALLOC_CTX *_mem_save_domain_sid_0;
4888 if (ndr_flags & NDR_SCALARS) {
4889 NDR_CHECK(ndr_pull_align(ndr, 5));
4890 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_sid));
4891 if (_ptr_domain_sid) {
4892 NDR_PULL_ALLOC(ndr, r->domain_sid);
4893 } else {
4894 r->domain_sid = NULL;
4896 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain_name));
4897 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_domain_name));
4899 if (ndr_flags & NDR_BUFFERS) {
4900 if (r->domain_sid) {
4901 _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
4902 NDR_PULL_SET_MEM_CTX(ndr, r->domain_sid, 0);
4903 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
4904 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, 0);
4906 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain_name));
4907 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_domain_name));
4909 return NDR_ERR_SUCCESS;
4912 _PUBLIC_ void ndr_print_lsa_ForestTrustDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustDomainInfo *r)
4914 ndr_print_struct(ndr, name, "lsa_ForestTrustDomainInfo");
4915 ndr->depth++;
4916 ndr_print_ptr(ndr, "domain_sid", r->domain_sid);
4917 ndr->depth++;
4918 if (r->domain_sid) {
4919 ndr_print_dom_sid2(ndr, "domain_sid", r->domain_sid);
4921 ndr->depth--;
4922 ndr_print_lsa_StringLarge(ndr, "dns_domain_name", &r->dns_domain_name);
4923 ndr_print_lsa_StringLarge(ndr, "netbios_domain_name", &r->netbios_domain_name);
4924 ndr->depth--;
4927 static enum ndr_err_code ndr_push_lsa_ForestTrustData(struct ndr_push *ndr, int ndr_flags, const union lsa_ForestTrustData *r)
4929 if (ndr_flags & NDR_SCALARS) {
4930 int level = ndr_push_get_switch_value(ndr, r);
4931 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
4932 NDR_CHECK(ndr_push_union_align(ndr, 5));
4933 switch (level) {
4934 case LSA_FOREST_TRUST_TOP_LEVEL_NAME: {
4935 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->top_level_name));
4936 break; }
4938 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: {
4939 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name_ex));
4940 break; }
4942 case LSA_FOREST_TRUST_DOMAIN_INFO: {
4943 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr, NDR_SCALARS, &r->domain_info));
4944 break; }
4946 default: {
4947 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr, NDR_SCALARS, &r->data));
4948 break; }
4952 if (ndr_flags & NDR_BUFFERS) {
4953 int level = ndr_push_get_switch_value(ndr, r);
4954 switch (level) {
4955 case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
4956 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->top_level_name));
4957 break;
4959 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
4960 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->top_level_name_ex));
4961 break;
4963 case LSA_FOREST_TRUST_DOMAIN_INFO:
4964 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr, NDR_BUFFERS, &r->domain_info));
4965 break;
4967 default:
4968 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr, NDR_BUFFERS, &r->data));
4969 break;
4973 return NDR_ERR_SUCCESS;
4976 static enum ndr_err_code ndr_pull_lsa_ForestTrustData(struct ndr_pull *ndr, int ndr_flags, union lsa_ForestTrustData *r)
4978 int level;
4979 uint32_t _level;
4980 level = ndr_pull_get_switch_value(ndr, r);
4981 if (ndr_flags & NDR_SCALARS) {
4982 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
4983 if (_level != level) {
4984 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
4986 NDR_CHECK(ndr_pull_union_align(ndr, 5));
4987 switch (level) {
4988 case LSA_FOREST_TRUST_TOP_LEVEL_NAME: {
4989 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->top_level_name));
4990 break; }
4992 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: {
4993 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name_ex));
4994 break; }
4996 case LSA_FOREST_TRUST_DOMAIN_INFO: {
4997 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr, NDR_SCALARS, &r->domain_info));
4998 break; }
5000 default: {
5001 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr, NDR_SCALARS, &r->data));
5002 break; }
5006 if (ndr_flags & NDR_BUFFERS) {
5007 switch (level) {
5008 case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
5009 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->top_level_name));
5010 break;
5012 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
5013 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->top_level_name_ex));
5014 break;
5016 case LSA_FOREST_TRUST_DOMAIN_INFO:
5017 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr, NDR_BUFFERS, &r->domain_info));
5018 break;
5020 default:
5021 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr, NDR_BUFFERS, &r->data));
5022 break;
5026 return NDR_ERR_SUCCESS;
5029 _PUBLIC_ void ndr_print_lsa_ForestTrustData(struct ndr_print *ndr, const char *name, const union lsa_ForestTrustData *r)
5031 int level;
5032 level = ndr_print_get_switch_value(ndr, r);
5033 ndr_print_union(ndr, name, level, "lsa_ForestTrustData");
5034 switch (level) {
5035 case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
5036 ndr_print_lsa_String(ndr, "top_level_name", &r->top_level_name);
5037 break;
5039 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
5040 ndr_print_lsa_StringLarge(ndr, "top_level_name_ex", &r->top_level_name_ex);
5041 break;
5043 case LSA_FOREST_TRUST_DOMAIN_INFO:
5044 ndr_print_lsa_ForestTrustDomainInfo(ndr, "domain_info", &r->domain_info);
5045 break;
5047 default:
5048 ndr_print_lsa_ForestTrustBinaryData(ndr, "data", &r->data);
5049 break;
5054 static enum ndr_err_code ndr_push_lsa_ForestTrustRecordType(struct ndr_push *ndr, int ndr_flags, enum lsa_ForestTrustRecordType r)
5056 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
5057 return NDR_ERR_SUCCESS;
5060 static enum ndr_err_code ndr_pull_lsa_ForestTrustRecordType(struct ndr_pull *ndr, int ndr_flags, enum lsa_ForestTrustRecordType *r)
5062 uint32_t v;
5063 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
5064 *r = v;
5065 return NDR_ERR_SUCCESS;
5068 _PUBLIC_ void ndr_print_lsa_ForestTrustRecordType(struct ndr_print *ndr, const char *name, enum lsa_ForestTrustRecordType r)
5070 const char *val = NULL;
5072 switch (r) {
5073 case LSA_FOREST_TRUST_TOP_LEVEL_NAME: val = "LSA_FOREST_TRUST_TOP_LEVEL_NAME"; break;
5074 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: val = "LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX"; break;
5075 case LSA_FOREST_TRUST_DOMAIN_INFO: val = "LSA_FOREST_TRUST_DOMAIN_INFO"; break;
5076 case LSA_FOREST_TRUST_RECORD_TYPE_LAST: val = "LSA_FOREST_TRUST_RECORD_TYPE_LAST"; break;
5078 ndr_print_enum(ndr, name, "ENUM", val, r);
5081 static enum ndr_err_code ndr_push_lsa_ForestTrustRecord(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustRecord *r)
5083 if (ndr_flags & NDR_SCALARS) {
5084 NDR_CHECK(ndr_push_align(ndr, 8));
5085 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
5086 NDR_CHECK(ndr_push_lsa_ForestTrustRecordType(ndr, NDR_SCALARS, r->level));
5087 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown));
5088 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->forest_trust_data, r->level));
5089 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr, NDR_SCALARS, &r->forest_trust_data));
5091 if (ndr_flags & NDR_BUFFERS) {
5092 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr, NDR_BUFFERS, &r->forest_trust_data));
5094 return NDR_ERR_SUCCESS;
5097 static enum ndr_err_code ndr_pull_lsa_ForestTrustRecord(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustRecord *r)
5099 if (ndr_flags & NDR_SCALARS) {
5100 NDR_CHECK(ndr_pull_align(ndr, 8));
5101 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
5102 NDR_CHECK(ndr_pull_lsa_ForestTrustRecordType(ndr, NDR_SCALARS, &r->level));
5103 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown));
5104 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->forest_trust_data, r->level));
5105 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr, NDR_SCALARS, &r->forest_trust_data));
5107 if (ndr_flags & NDR_BUFFERS) {
5108 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr, NDR_BUFFERS, &r->forest_trust_data));
5110 return NDR_ERR_SUCCESS;
5113 _PUBLIC_ void ndr_print_lsa_ForestTrustRecord(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustRecord *r)
5115 ndr_print_struct(ndr, name, "lsa_ForestTrustRecord");
5116 ndr->depth++;
5117 ndr_print_uint32(ndr, "flags", r->flags);
5118 ndr_print_lsa_ForestTrustRecordType(ndr, "level", r->level);
5119 ndr_print_hyper(ndr, "unknown", r->unknown);
5120 ndr_print_set_switch_value(ndr, &r->forest_trust_data, r->level);
5121 ndr_print_lsa_ForestTrustData(ndr, "forest_trust_data", &r->forest_trust_data);
5122 ndr->depth--;
5125 _PUBLIC_ enum ndr_err_code ndr_push_lsa_ForestTrustInformation(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustInformation *r)
5127 uint32_t cntr_entries_1;
5128 if (ndr_flags & NDR_SCALARS) {
5129 NDR_CHECK(ndr_push_align(ndr, 5));
5130 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5131 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
5133 if (ndr_flags & NDR_BUFFERS) {
5134 if (r->entries) {
5135 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5136 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
5137 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries[cntr_entries_1]));
5139 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
5140 if (r->entries[cntr_entries_1]) {
5141 NDR_CHECK(ndr_push_lsa_ForestTrustRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1]));
5146 return NDR_ERR_SUCCESS;
5149 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_ForestTrustInformation(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustInformation *r)
5151 uint32_t _ptr_entries;
5152 uint32_t cntr_entries_1;
5153 TALLOC_CTX *_mem_save_entries_0;
5154 TALLOC_CTX *_mem_save_entries_1;
5155 TALLOC_CTX *_mem_save_entries_2;
5156 if (ndr_flags & NDR_SCALARS) {
5157 NDR_CHECK(ndr_pull_align(ndr, 5));
5158 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5159 if (r->count > 4000) {
5160 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5162 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
5163 if (_ptr_entries) {
5164 NDR_PULL_ALLOC(ndr, r->entries);
5165 } else {
5166 r->entries = NULL;
5169 if (ndr_flags & NDR_BUFFERS) {
5170 if (r->entries) {
5171 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
5172 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
5173 NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
5174 NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
5175 _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
5176 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
5177 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
5178 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
5179 if (_ptr_entries) {
5180 NDR_PULL_ALLOC(ndr, r->entries[cntr_entries_1]);
5181 } else {
5182 r->entries[cntr_entries_1] = NULL;
5185 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
5186 if (r->entries[cntr_entries_1]) {
5187 _mem_save_entries_2 = NDR_PULL_GET_MEM_CTX(ndr);
5188 NDR_PULL_SET_MEM_CTX(ndr, r->entries[cntr_entries_1], 0);
5189 NDR_CHECK(ndr_pull_lsa_ForestTrustRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1]));
5190 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_2, 0);
5193 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
5194 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
5196 if (r->entries) {
5197 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
5200 return NDR_ERR_SUCCESS;
5203 _PUBLIC_ void ndr_print_lsa_ForestTrustInformation(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustInformation *r)
5205 uint32_t cntr_entries_1;
5206 ndr_print_struct(ndr, name, "lsa_ForestTrustInformation");
5207 ndr->depth++;
5208 ndr_print_uint32(ndr, "count", r->count);
5209 ndr_print_ptr(ndr, "entries", r->entries);
5210 ndr->depth++;
5211 if (r->entries) {
5212 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
5213 ndr->depth++;
5214 for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
5215 char *idx_1=NULL;
5216 if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
5217 ndr_print_ptr(ndr, "entries", r->entries[cntr_entries_1]);
5218 ndr->depth++;
5219 if (r->entries[cntr_entries_1]) {
5220 ndr_print_lsa_ForestTrustRecord(ndr, "entries", r->entries[cntr_entries_1]);
5222 ndr->depth--;
5223 free(idx_1);
5226 ndr->depth--;
5228 ndr->depth--;
5229 ndr->depth--;
5232 static enum ndr_err_code ndr_push_lsa_Close(struct ndr_push *ndr, int flags, const struct lsa_Close *r)
5234 if (flags & NDR_IN) {
5235 if (r->in.handle == NULL) {
5236 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5238 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5240 if (flags & NDR_OUT) {
5241 if (r->out.handle == NULL) {
5242 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5244 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5245 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5247 return NDR_ERR_SUCCESS;
5250 static enum ndr_err_code ndr_pull_lsa_Close(struct ndr_pull *ndr, int flags, struct lsa_Close *r)
5252 TALLOC_CTX *_mem_save_handle_0;
5253 if (flags & NDR_IN) {
5254 ZERO_STRUCT(r->out);
5256 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5257 NDR_PULL_ALLOC(ndr, r->in.handle);
5259 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5260 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5261 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5262 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5263 NDR_PULL_ALLOC(ndr, r->out.handle);
5264 *r->out.handle = *r->in.handle;
5266 if (flags & NDR_OUT) {
5267 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5268 NDR_PULL_ALLOC(ndr, r->out.handle);
5270 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5271 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5272 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5273 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5274 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5276 return NDR_ERR_SUCCESS;
5279 _PUBLIC_ void ndr_print_lsa_Close(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Close *r)
5281 ndr_print_struct(ndr, name, "lsa_Close");
5282 ndr->depth++;
5283 if (flags & NDR_SET_VALUES) {
5284 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5286 if (flags & NDR_IN) {
5287 ndr_print_struct(ndr, "in", "lsa_Close");
5288 ndr->depth++;
5289 ndr_print_ptr(ndr, "handle", r->in.handle);
5290 ndr->depth++;
5291 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5292 ndr->depth--;
5293 ndr->depth--;
5295 if (flags & NDR_OUT) {
5296 ndr_print_struct(ndr, "out", "lsa_Close");
5297 ndr->depth++;
5298 ndr_print_ptr(ndr, "handle", r->out.handle);
5299 ndr->depth++;
5300 ndr_print_policy_handle(ndr, "handle", r->out.handle);
5301 ndr->depth--;
5302 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5303 ndr->depth--;
5305 ndr->depth--;
5308 _PUBLIC_ enum ndr_err_code ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_Delete *r)
5310 if (flags & NDR_IN) {
5311 if (r->in.handle == NULL) {
5312 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5314 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5316 if (flags & NDR_OUT) {
5317 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5319 return NDR_ERR_SUCCESS;
5322 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, struct lsa_Delete *r)
5324 TALLOC_CTX *_mem_save_handle_0;
5325 if (flags & NDR_IN) {
5326 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5327 NDR_PULL_ALLOC(ndr, r->in.handle);
5329 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5330 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5331 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5332 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5334 if (flags & NDR_OUT) {
5335 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5337 return NDR_ERR_SUCCESS;
5340 _PUBLIC_ void ndr_print_lsa_Delete(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Delete *r)
5342 ndr_print_struct(ndr, name, "lsa_Delete");
5343 ndr->depth++;
5344 if (flags & NDR_SET_VALUES) {
5345 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5347 if (flags & NDR_IN) {
5348 ndr_print_struct(ndr, "in", "lsa_Delete");
5349 ndr->depth++;
5350 ndr_print_ptr(ndr, "handle", r->in.handle);
5351 ndr->depth++;
5352 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5353 ndr->depth--;
5354 ndr->depth--;
5356 if (flags & NDR_OUT) {
5357 ndr_print_struct(ndr, "out", "lsa_Delete");
5358 ndr->depth++;
5359 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5360 ndr->depth--;
5362 ndr->depth--;
5365 _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivs *r)
5367 if (flags & NDR_IN) {
5368 if (r->in.handle == NULL) {
5369 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5371 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5372 if (r->in.resume_handle == NULL) {
5373 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5375 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
5376 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_count));
5378 if (flags & NDR_OUT) {
5379 if (r->out.resume_handle == NULL) {
5380 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5382 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
5383 if (r->out.privs == NULL) {
5384 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5386 NDR_CHECK(ndr_push_lsa_PrivArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs));
5387 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5389 return NDR_ERR_SUCCESS;
5392 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivs *r)
5394 TALLOC_CTX *_mem_save_handle_0;
5395 TALLOC_CTX *_mem_save_resume_handle_0;
5396 TALLOC_CTX *_mem_save_privs_0;
5397 if (flags & NDR_IN) {
5398 ZERO_STRUCT(r->out);
5400 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5401 NDR_PULL_ALLOC(ndr, r->in.handle);
5403 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5404 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5405 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5406 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5407 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5408 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
5410 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5411 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
5412 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
5413 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
5414 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_count));
5415 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
5416 *r->out.resume_handle = *r->in.resume_handle;
5417 NDR_PULL_ALLOC(ndr, r->out.privs);
5418 ZERO_STRUCTP(r->out.privs);
5420 if (flags & NDR_OUT) {
5421 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5422 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
5424 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5425 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
5426 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
5427 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
5428 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5429 NDR_PULL_ALLOC(ndr, r->out.privs);
5431 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
5432 NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, LIBNDR_FLAG_REF_ALLOC);
5433 NDR_CHECK(ndr_pull_lsa_PrivArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs));
5434 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
5435 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5437 return NDR_ERR_SUCCESS;
5440 _PUBLIC_ void ndr_print_lsa_EnumPrivs(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivs *r)
5442 ndr_print_struct(ndr, name, "lsa_EnumPrivs");
5443 ndr->depth++;
5444 if (flags & NDR_SET_VALUES) {
5445 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5447 if (flags & NDR_IN) {
5448 ndr_print_struct(ndr, "in", "lsa_EnumPrivs");
5449 ndr->depth++;
5450 ndr_print_ptr(ndr, "handle", r->in.handle);
5451 ndr->depth++;
5452 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5453 ndr->depth--;
5454 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
5455 ndr->depth++;
5456 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
5457 ndr->depth--;
5458 ndr_print_uint32(ndr, "max_count", r->in.max_count);
5459 ndr->depth--;
5461 if (flags & NDR_OUT) {
5462 ndr_print_struct(ndr, "out", "lsa_EnumPrivs");
5463 ndr->depth++;
5464 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
5465 ndr->depth++;
5466 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
5467 ndr->depth--;
5468 ndr_print_ptr(ndr, "privs", r->out.privs);
5469 ndr->depth++;
5470 ndr_print_lsa_PrivArray(ndr, "privs", r->out.privs);
5471 ndr->depth--;
5472 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5473 ndr->depth--;
5475 ndr->depth--;
5478 static enum ndr_err_code ndr_push_lsa_QuerySecurity(struct ndr_push *ndr, int flags, const struct lsa_QuerySecurity *r)
5480 if (flags & NDR_IN) {
5481 if (r->in.handle == NULL) {
5482 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5484 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5485 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
5487 if (flags & NDR_OUT) {
5488 if (r->out.sdbuf == NULL) {
5489 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5491 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sdbuf));
5492 if (*r->out.sdbuf) {
5493 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
5495 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5497 return NDR_ERR_SUCCESS;
5500 static enum ndr_err_code ndr_pull_lsa_QuerySecurity(struct ndr_pull *ndr, int flags, struct lsa_QuerySecurity *r)
5502 uint32_t _ptr_sdbuf;
5503 TALLOC_CTX *_mem_save_handle_0;
5504 TALLOC_CTX *_mem_save_sdbuf_0;
5505 TALLOC_CTX *_mem_save_sdbuf_1;
5506 if (flags & NDR_IN) {
5507 ZERO_STRUCT(r->out);
5509 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5510 NDR_PULL_ALLOC(ndr, r->in.handle);
5512 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5513 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5514 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5515 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5516 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
5517 NDR_PULL_ALLOC(ndr, r->out.sdbuf);
5518 ZERO_STRUCTP(r->out.sdbuf);
5520 if (flags & NDR_OUT) {
5521 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5522 NDR_PULL_ALLOC(ndr, r->out.sdbuf);
5524 _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
5525 NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC);
5526 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sdbuf));
5527 if (_ptr_sdbuf) {
5528 NDR_PULL_ALLOC(ndr, *r->out.sdbuf);
5529 } else {
5530 *r->out.sdbuf = NULL;
5532 if (*r->out.sdbuf) {
5533 _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr);
5534 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, 0);
5535 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
5536 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, 0);
5538 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
5539 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5541 return NDR_ERR_SUCCESS;
5544 _PUBLIC_ void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecurity *r)
5546 ndr_print_struct(ndr, name, "lsa_QuerySecurity");
5547 ndr->depth++;
5548 if (flags & NDR_SET_VALUES) {
5549 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5551 if (flags & NDR_IN) {
5552 ndr_print_struct(ndr, "in", "lsa_QuerySecurity");
5553 ndr->depth++;
5554 ndr_print_ptr(ndr, "handle", r->in.handle);
5555 ndr->depth++;
5556 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5557 ndr->depth--;
5558 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
5559 ndr->depth--;
5561 if (flags & NDR_OUT) {
5562 ndr_print_struct(ndr, "out", "lsa_QuerySecurity");
5563 ndr->depth++;
5564 ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf);
5565 ndr->depth++;
5566 ndr_print_ptr(ndr, "sdbuf", *r->out.sdbuf);
5567 ndr->depth++;
5568 if (*r->out.sdbuf) {
5569 ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf);
5571 ndr->depth--;
5572 ndr->depth--;
5573 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5574 ndr->depth--;
5576 ndr->depth--;
5579 static enum ndr_err_code ndr_push_lsa_SetSecObj(struct ndr_push *ndr, int flags, const struct lsa_SetSecObj *r)
5581 if (flags & NDR_IN) {
5582 if (r->in.handle == NULL) {
5583 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5585 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5586 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
5587 if (r->in.sdbuf == NULL) {
5588 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5590 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
5592 if (flags & NDR_OUT) {
5593 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5595 return NDR_ERR_SUCCESS;
5598 static enum ndr_err_code ndr_pull_lsa_SetSecObj(struct ndr_pull *ndr, int flags, struct lsa_SetSecObj *r)
5600 TALLOC_CTX *_mem_save_handle_0;
5601 TALLOC_CTX *_mem_save_sdbuf_0;
5602 if (flags & NDR_IN) {
5603 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5604 NDR_PULL_ALLOC(ndr, r->in.handle);
5606 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5607 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5608 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5609 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5610 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
5611 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5612 NDR_PULL_ALLOC(ndr, r->in.sdbuf);
5614 _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
5615 NDR_PULL_SET_MEM_CTX(ndr, r->in.sdbuf, LIBNDR_FLAG_REF_ALLOC);
5616 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
5617 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
5619 if (flags & NDR_OUT) {
5620 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5622 return NDR_ERR_SUCCESS;
5625 _PUBLIC_ void ndr_print_lsa_SetSecObj(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecObj *r)
5627 ndr_print_struct(ndr, name, "lsa_SetSecObj");
5628 ndr->depth++;
5629 if (flags & NDR_SET_VALUES) {
5630 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5632 if (flags & NDR_IN) {
5633 ndr_print_struct(ndr, "in", "lsa_SetSecObj");
5634 ndr->depth++;
5635 ndr_print_ptr(ndr, "handle", r->in.handle);
5636 ndr->depth++;
5637 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5638 ndr->depth--;
5639 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
5640 ndr_print_ptr(ndr, "sdbuf", r->in.sdbuf);
5641 ndr->depth++;
5642 ndr_print_sec_desc_buf(ndr, "sdbuf", r->in.sdbuf);
5643 ndr->depth--;
5644 ndr->depth--;
5646 if (flags & NDR_OUT) {
5647 ndr_print_struct(ndr, "out", "lsa_SetSecObj");
5648 ndr->depth++;
5649 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5650 ndr->depth--;
5652 ndr->depth--;
5655 static enum ndr_err_code ndr_push_lsa_ChangePassword(struct ndr_push *ndr, int flags, const struct lsa_ChangePassword *r)
5657 if (flags & NDR_IN) {
5659 if (flags & NDR_OUT) {
5660 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5662 return NDR_ERR_SUCCESS;
5665 static enum ndr_err_code ndr_pull_lsa_ChangePassword(struct ndr_pull *ndr, int flags, struct lsa_ChangePassword *r)
5667 if (flags & NDR_IN) {
5669 if (flags & NDR_OUT) {
5670 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5672 return NDR_ERR_SUCCESS;
5675 _PUBLIC_ void ndr_print_lsa_ChangePassword(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ChangePassword *r)
5677 ndr_print_struct(ndr, name, "lsa_ChangePassword");
5678 ndr->depth++;
5679 if (flags & NDR_SET_VALUES) {
5680 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5682 if (flags & NDR_IN) {
5683 ndr_print_struct(ndr, "in", "lsa_ChangePassword");
5684 ndr->depth++;
5685 ndr->depth--;
5687 if (flags & NDR_OUT) {
5688 ndr_print_struct(ndr, "out", "lsa_ChangePassword");
5689 ndr->depth++;
5690 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5691 ndr->depth--;
5693 ndr->depth--;
5696 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy *r)
5698 if (flags & NDR_IN) {
5699 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
5700 if (r->in.system_name) {
5701 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
5703 if (r->in.attr == NULL) {
5704 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5706 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
5707 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
5709 if (flags & NDR_OUT) {
5710 if (r->out.handle == NULL) {
5711 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5713 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5714 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5716 return NDR_ERR_SUCCESS;
5719 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy *r)
5721 uint32_t _ptr_system_name;
5722 TALLOC_CTX *_mem_save_system_name_0;
5723 TALLOC_CTX *_mem_save_attr_0;
5724 TALLOC_CTX *_mem_save_handle_0;
5725 if (flags & NDR_IN) {
5726 ZERO_STRUCT(r->out);
5728 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
5729 if (_ptr_system_name) {
5730 NDR_PULL_ALLOC(ndr, r->in.system_name);
5731 } else {
5732 r->in.system_name = NULL;
5734 if (r->in.system_name) {
5735 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5736 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
5737 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
5738 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
5740 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5741 NDR_PULL_ALLOC(ndr, r->in.attr);
5743 _mem_save_attr_0 = NDR_PULL_GET_MEM_CTX(ndr);
5744 NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC);
5745 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
5746 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC);
5747 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
5748 NDR_PULL_ALLOC(ndr, r->out.handle);
5749 ZERO_STRUCTP(r->out.handle);
5751 if (flags & NDR_OUT) {
5752 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5753 NDR_PULL_ALLOC(ndr, r->out.handle);
5755 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5756 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5757 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5758 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5759 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5761 return NDR_ERR_SUCCESS;
5764 _PUBLIC_ void ndr_print_lsa_OpenPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy *r)
5766 ndr_print_struct(ndr, name, "lsa_OpenPolicy");
5767 ndr->depth++;
5768 if (flags & NDR_SET_VALUES) {
5769 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5771 if (flags & NDR_IN) {
5772 ndr_print_struct(ndr, "in", "lsa_OpenPolicy");
5773 ndr->depth++;
5774 ndr_print_ptr(ndr, "system_name", r->in.system_name);
5775 ndr->depth++;
5776 if (r->in.system_name) {
5777 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
5779 ndr->depth--;
5780 ndr_print_ptr(ndr, "attr", r->in.attr);
5781 ndr->depth++;
5782 ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr);
5783 ndr->depth--;
5784 ndr_print_lsa_PolicyAccessMask(ndr, "access_mask", r->in.access_mask);
5785 ndr->depth--;
5787 if (flags & NDR_OUT) {
5788 ndr_print_struct(ndr, "out", "lsa_OpenPolicy");
5789 ndr->depth++;
5790 ndr_print_ptr(ndr, "handle", r->out.handle);
5791 ndr->depth++;
5792 ndr_print_policy_handle(ndr, "handle", r->out.handle);
5793 ndr->depth--;
5794 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5795 ndr->depth--;
5797 ndr->depth--;
5800 static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy *r)
5802 if (flags & NDR_IN) {
5803 if (r->in.handle == NULL) {
5804 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5806 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5807 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
5809 if (flags & NDR_OUT) {
5810 if (r->out.info == NULL) {
5811 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5813 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
5814 if (*r->out.info) {
5815 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
5816 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
5818 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5820 return NDR_ERR_SUCCESS;
5823 static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy *r)
5825 uint32_t _ptr_info;
5826 TALLOC_CTX *_mem_save_handle_0;
5827 TALLOC_CTX *_mem_save_info_0;
5828 TALLOC_CTX *_mem_save_info_1;
5829 if (flags & NDR_IN) {
5830 ZERO_STRUCT(r->out);
5832 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5833 NDR_PULL_ALLOC(ndr, r->in.handle);
5835 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5836 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5837 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5838 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5839 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
5840 NDR_PULL_ALLOC(ndr, r->out.info);
5841 ZERO_STRUCTP(r->out.info);
5843 if (flags & NDR_OUT) {
5844 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5845 NDR_PULL_ALLOC(ndr, r->out.info);
5847 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5848 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
5849 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5850 if (_ptr_info) {
5851 NDR_PULL_ALLOC(ndr, *r->out.info);
5852 } else {
5853 *r->out.info = NULL;
5855 if (*r->out.info) {
5856 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
5857 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
5858 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
5859 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
5860 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
5862 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
5863 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5865 return NDR_ERR_SUCCESS;
5868 _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy *r)
5870 ndr_print_struct(ndr, name, "lsa_QueryInfoPolicy");
5871 ndr->depth++;
5872 if (flags & NDR_SET_VALUES) {
5873 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5875 if (flags & NDR_IN) {
5876 ndr_print_struct(ndr, "in", "lsa_QueryInfoPolicy");
5877 ndr->depth++;
5878 ndr_print_ptr(ndr, "handle", r->in.handle);
5879 ndr->depth++;
5880 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5881 ndr->depth--;
5882 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
5883 ndr->depth--;
5885 if (flags & NDR_OUT) {
5886 ndr_print_struct(ndr, "out", "lsa_QueryInfoPolicy");
5887 ndr->depth++;
5888 ndr_print_ptr(ndr, "info", r->out.info);
5889 ndr->depth++;
5890 ndr_print_ptr(ndr, "info", *r->out.info);
5891 ndr->depth++;
5892 if (*r->out.info) {
5893 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
5894 ndr_print_lsa_PolicyInformation(ndr, "info", *r->out.info);
5896 ndr->depth--;
5897 ndr->depth--;
5898 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5899 ndr->depth--;
5901 ndr->depth--;
5904 static enum ndr_err_code ndr_push_lsa_SetInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy *r)
5906 if (flags & NDR_IN) {
5907 if (r->in.handle == NULL) {
5908 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5910 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5911 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
5912 if (r->in.info == NULL) {
5913 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5915 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
5916 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5918 if (flags & NDR_OUT) {
5919 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5921 return NDR_ERR_SUCCESS;
5924 static enum ndr_err_code ndr_pull_lsa_SetInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy *r)
5926 TALLOC_CTX *_mem_save_handle_0;
5927 TALLOC_CTX *_mem_save_info_0;
5928 if (flags & NDR_IN) {
5929 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5930 NDR_PULL_ALLOC(ndr, r->in.handle);
5932 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5933 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5934 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5935 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5936 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
5937 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5938 NDR_PULL_ALLOC(ndr, r->in.info);
5940 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5941 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
5942 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
5943 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5944 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
5946 if (flags & NDR_OUT) {
5947 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5949 return NDR_ERR_SUCCESS;
5952 _PUBLIC_ void ndr_print_lsa_SetInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy *r)
5954 ndr_print_struct(ndr, name, "lsa_SetInfoPolicy");
5955 ndr->depth++;
5956 if (flags & NDR_SET_VALUES) {
5957 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5959 if (flags & NDR_IN) {
5960 ndr_print_struct(ndr, "in", "lsa_SetInfoPolicy");
5961 ndr->depth++;
5962 ndr_print_ptr(ndr, "handle", r->in.handle);
5963 ndr->depth++;
5964 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5965 ndr->depth--;
5966 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
5967 ndr_print_ptr(ndr, "info", r->in.info);
5968 ndr->depth++;
5969 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
5970 ndr_print_lsa_PolicyInformation(ndr, "info", r->in.info);
5971 ndr->depth--;
5972 ndr->depth--;
5974 if (flags & NDR_OUT) {
5975 ndr_print_struct(ndr, "out", "lsa_SetInfoPolicy");
5976 ndr->depth++;
5977 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5978 ndr->depth--;
5980 ndr->depth--;
5983 static enum ndr_err_code ndr_push_lsa_ClearAuditLog(struct ndr_push *ndr, int flags, const struct lsa_ClearAuditLog *r)
5985 if (flags & NDR_IN) {
5987 if (flags & NDR_OUT) {
5988 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5990 return NDR_ERR_SUCCESS;
5993 static enum ndr_err_code ndr_pull_lsa_ClearAuditLog(struct ndr_pull *ndr, int flags, struct lsa_ClearAuditLog *r)
5995 if (flags & NDR_IN) {
5997 if (flags & NDR_OUT) {
5998 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6000 return NDR_ERR_SUCCESS;
6003 _PUBLIC_ void ndr_print_lsa_ClearAuditLog(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ClearAuditLog *r)
6005 ndr_print_struct(ndr, name, "lsa_ClearAuditLog");
6006 ndr->depth++;
6007 if (flags & NDR_SET_VALUES) {
6008 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6010 if (flags & NDR_IN) {
6011 ndr_print_struct(ndr, "in", "lsa_ClearAuditLog");
6012 ndr->depth++;
6013 ndr->depth--;
6015 if (flags & NDR_OUT) {
6016 ndr_print_struct(ndr, "out", "lsa_ClearAuditLog");
6017 ndr->depth++;
6018 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6019 ndr->depth--;
6021 ndr->depth--;
6024 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struct lsa_CreateAccount *r)
6026 if (flags & NDR_IN) {
6027 if (r->in.handle == NULL) {
6028 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6030 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6031 if (r->in.sid == NULL) {
6032 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6034 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6035 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6037 if (flags & NDR_OUT) {
6038 if (r->out.acct_handle == NULL) {
6039 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6041 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
6042 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6044 return NDR_ERR_SUCCESS;
6047 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r)
6049 TALLOC_CTX *_mem_save_handle_0;
6050 TALLOC_CTX *_mem_save_sid_0;
6051 TALLOC_CTX *_mem_save_acct_handle_0;
6052 if (flags & NDR_IN) {
6053 ZERO_STRUCT(r->out);
6055 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6056 NDR_PULL_ALLOC(ndr, r->in.handle);
6058 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6059 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6060 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6061 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6062 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6063 NDR_PULL_ALLOC(ndr, r->in.sid);
6065 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6066 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
6067 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6068 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
6069 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6070 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
6071 ZERO_STRUCTP(r->out.acct_handle);
6073 if (flags & NDR_OUT) {
6074 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6075 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
6077 _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6078 NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC);
6079 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
6080 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC);
6081 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6083 return NDR_ERR_SUCCESS;
6086 _PUBLIC_ void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateAccount *r)
6088 ndr_print_struct(ndr, name, "lsa_CreateAccount");
6089 ndr->depth++;
6090 if (flags & NDR_SET_VALUES) {
6091 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6093 if (flags & NDR_IN) {
6094 ndr_print_struct(ndr, "in", "lsa_CreateAccount");
6095 ndr->depth++;
6096 ndr_print_ptr(ndr, "handle", r->in.handle);
6097 ndr->depth++;
6098 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6099 ndr->depth--;
6100 ndr_print_ptr(ndr, "sid", r->in.sid);
6101 ndr->depth++;
6102 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
6103 ndr->depth--;
6104 ndr_print_lsa_AccountAccessMask(ndr, "access_mask", r->in.access_mask);
6105 ndr->depth--;
6107 if (flags & NDR_OUT) {
6108 ndr_print_struct(ndr, "out", "lsa_CreateAccount");
6109 ndr->depth++;
6110 ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle);
6111 ndr->depth++;
6112 ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle);
6113 ndr->depth--;
6114 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6115 ndr->depth--;
6117 ndr->depth--;
6120 _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct lsa_EnumAccounts *r)
6122 if (flags & NDR_IN) {
6123 if (r->in.handle == NULL) {
6124 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6126 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6127 if (r->in.resume_handle == NULL) {
6128 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6130 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6131 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_entries));
6133 if (flags & NDR_OUT) {
6134 if (r->out.resume_handle == NULL) {
6135 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6137 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6138 if (r->out.sids == NULL) {
6139 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6141 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6142 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6144 return NDR_ERR_SUCCESS;
6147 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int flags, struct lsa_EnumAccounts *r)
6149 TALLOC_CTX *_mem_save_handle_0;
6150 TALLOC_CTX *_mem_save_resume_handle_0;
6151 TALLOC_CTX *_mem_save_sids_0;
6152 if (flags & NDR_IN) {
6153 ZERO_STRUCT(r->out);
6155 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6156 NDR_PULL_ALLOC(ndr, r->in.handle);
6158 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6159 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6160 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6161 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6162 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6163 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6165 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6166 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6167 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6168 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6169 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_entries));
6170 if (r->in.num_entries > 8192) {
6171 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6173 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6174 *r->out.resume_handle = *r->in.resume_handle;
6175 NDR_PULL_ALLOC(ndr, r->out.sids);
6176 ZERO_STRUCTP(r->out.sids);
6178 if (flags & NDR_OUT) {
6179 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6180 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6182 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6183 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6184 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6185 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6186 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6187 NDR_PULL_ALLOC(ndr, r->out.sids);
6189 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6190 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
6191 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6192 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6193 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6195 return NDR_ERR_SUCCESS;
6198 _PUBLIC_ void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccounts *r)
6200 ndr_print_struct(ndr, name, "lsa_EnumAccounts");
6201 ndr->depth++;
6202 if (flags & NDR_SET_VALUES) {
6203 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6205 if (flags & NDR_IN) {
6206 ndr_print_struct(ndr, "in", "lsa_EnumAccounts");
6207 ndr->depth++;
6208 ndr_print_ptr(ndr, "handle", r->in.handle);
6209 ndr->depth++;
6210 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6211 ndr->depth--;
6212 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6213 ndr->depth++;
6214 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6215 ndr->depth--;
6216 ndr_print_uint32(ndr, "num_entries", r->in.num_entries);
6217 ndr->depth--;
6219 if (flags & NDR_OUT) {
6220 ndr_print_struct(ndr, "out", "lsa_EnumAccounts");
6221 ndr->depth++;
6222 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6223 ndr->depth++;
6224 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6225 ndr->depth--;
6226 ndr_print_ptr(ndr, "sids", r->out.sids);
6227 ndr->depth++;
6228 ndr_print_lsa_SidArray(ndr, "sids", r->out.sids);
6229 ndr->depth--;
6230 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6231 ndr->depth--;
6233 ndr->depth--;
6236 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *r)
6238 if (flags & NDR_IN) {
6239 if (r->in.policy_handle == NULL) {
6240 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6242 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
6243 if (r->in.info == NULL) {
6244 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6246 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6247 NDR_CHECK(ndr_push_lsa_TrustedAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6249 if (flags & NDR_OUT) {
6250 if (r->out.trustdom_handle == NULL) {
6251 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6253 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
6254 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6256 return NDR_ERR_SUCCESS;
6259 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r)
6261 TALLOC_CTX *_mem_save_policy_handle_0;
6262 TALLOC_CTX *_mem_save_info_0;
6263 TALLOC_CTX *_mem_save_trustdom_handle_0;
6264 if (flags & NDR_IN) {
6265 ZERO_STRUCT(r->out);
6267 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6268 NDR_PULL_ALLOC(ndr, r->in.policy_handle);
6270 _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6271 NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
6272 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
6273 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
6274 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6275 NDR_PULL_ALLOC(ndr, r->in.info);
6277 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6278 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
6279 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6280 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6281 NDR_CHECK(ndr_pull_lsa_TrustedAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6282 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
6283 ZERO_STRUCTP(r->out.trustdom_handle);
6285 if (flags & NDR_OUT) {
6286 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6287 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
6289 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6290 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
6291 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
6292 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
6293 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6295 return NDR_ERR_SUCCESS;
6298 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomain *r)
6300 ndr_print_struct(ndr, name, "lsa_CreateTrustedDomain");
6301 ndr->depth++;
6302 if (flags & NDR_SET_VALUES) {
6303 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6305 if (flags & NDR_IN) {
6306 ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomain");
6307 ndr->depth++;
6308 ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
6309 ndr->depth++;
6310 ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
6311 ndr->depth--;
6312 ndr_print_ptr(ndr, "info", r->in.info);
6313 ndr->depth++;
6314 ndr_print_lsa_DomainInfo(ndr, "info", r->in.info);
6315 ndr->depth--;
6316 ndr_print_lsa_TrustedAccessMask(ndr, "access_mask", r->in.access_mask);
6317 ndr->depth--;
6319 if (flags & NDR_OUT) {
6320 ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomain");
6321 ndr->depth++;
6322 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
6323 ndr->depth++;
6324 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
6325 ndr->depth--;
6326 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6327 ndr->depth--;
6329 ndr->depth--;
6332 static enum ndr_err_code ndr_push_lsa_EnumTrustDom(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustDom *r)
6334 if (flags & NDR_IN) {
6335 if (r->in.handle == NULL) {
6336 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6338 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6339 if (r->in.resume_handle == NULL) {
6340 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6342 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6343 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
6345 if (flags & NDR_OUT) {
6346 if (r->out.resume_handle == NULL) {
6347 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6349 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6350 if (r->out.domains == NULL) {
6351 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6353 NDR_CHECK(ndr_push_lsa_DomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
6354 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6356 return NDR_ERR_SUCCESS;
6359 static enum ndr_err_code ndr_pull_lsa_EnumTrustDom(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustDom *r)
6361 TALLOC_CTX *_mem_save_handle_0;
6362 TALLOC_CTX *_mem_save_resume_handle_0;
6363 TALLOC_CTX *_mem_save_domains_0;
6364 if (flags & NDR_IN) {
6365 ZERO_STRUCT(r->out);
6367 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6368 NDR_PULL_ALLOC(ndr, r->in.handle);
6370 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6371 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6372 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6373 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6374 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6375 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6377 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6378 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6379 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6380 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6381 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
6382 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6383 *r->out.resume_handle = *r->in.resume_handle;
6384 NDR_PULL_ALLOC(ndr, r->out.domains);
6385 ZERO_STRUCTP(r->out.domains);
6387 if (flags & NDR_OUT) {
6388 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6389 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6391 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6392 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6393 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6394 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6395 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6396 NDR_PULL_ALLOC(ndr, r->out.domains);
6398 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
6399 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
6400 NDR_CHECK(ndr_pull_lsa_DomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
6401 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
6402 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6404 return NDR_ERR_SUCCESS;
6407 _PUBLIC_ void ndr_print_lsa_EnumTrustDom(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustDom *r)
6409 ndr_print_struct(ndr, name, "lsa_EnumTrustDom");
6410 ndr->depth++;
6411 if (flags & NDR_SET_VALUES) {
6412 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6414 if (flags & NDR_IN) {
6415 ndr_print_struct(ndr, "in", "lsa_EnumTrustDom");
6416 ndr->depth++;
6417 ndr_print_ptr(ndr, "handle", r->in.handle);
6418 ndr->depth++;
6419 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6420 ndr->depth--;
6421 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6422 ndr->depth++;
6423 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6424 ndr->depth--;
6425 ndr_print_uint32(ndr, "max_size", r->in.max_size);
6426 ndr->depth--;
6428 if (flags & NDR_OUT) {
6429 ndr_print_struct(ndr, "out", "lsa_EnumTrustDom");
6430 ndr->depth++;
6431 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6432 ndr->depth++;
6433 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6434 ndr->depth--;
6435 ndr_print_ptr(ndr, "domains", r->out.domains);
6436 ndr->depth++;
6437 ndr_print_lsa_DomainList(ndr, "domains", r->out.domains);
6438 ndr->depth--;
6439 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6440 ndr->depth--;
6442 ndr->depth--;
6445 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct lsa_LookupNames *r)
6447 uint32_t cntr_names_0;
6448 if (flags & NDR_IN) {
6449 if (r->in.handle == NULL) {
6450 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6452 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6453 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
6454 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_names));
6455 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
6456 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
6458 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
6459 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
6461 if (r->in.sids == NULL) {
6462 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6464 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6465 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
6466 if (r->in.count == NULL) {
6467 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6469 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
6471 if (flags & NDR_OUT) {
6472 if (r->out.domains == NULL) {
6473 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6475 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
6476 if (*r->out.domains) {
6477 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6479 if (r->out.sids == NULL) {
6480 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6482 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6483 if (r->out.count == NULL) {
6484 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6486 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
6487 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6489 return NDR_ERR_SUCCESS;
6492 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flags, struct lsa_LookupNames *r)
6494 uint32_t cntr_names_0;
6495 uint32_t _ptr_domains;
6496 TALLOC_CTX *_mem_save_handle_0;
6497 TALLOC_CTX *_mem_save_names_0;
6498 TALLOC_CTX *_mem_save_domains_0;
6499 TALLOC_CTX *_mem_save_domains_1;
6500 TALLOC_CTX *_mem_save_sids_0;
6501 TALLOC_CTX *_mem_save_count_0;
6502 if (flags & NDR_IN) {
6503 ZERO_STRUCT(r->out);
6505 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6506 NDR_PULL_ALLOC(ndr, r->in.handle);
6508 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6509 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6510 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6511 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6512 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
6513 if (r->in.num_names > 1000) {
6514 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6516 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
6517 NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
6518 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
6519 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
6520 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
6521 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
6523 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
6524 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
6526 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
6527 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6528 NDR_PULL_ALLOC(ndr, r->in.sids);
6530 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6531 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
6532 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6533 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6534 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
6535 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6536 NDR_PULL_ALLOC(ndr, r->in.count);
6538 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6539 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
6540 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
6541 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6542 NDR_PULL_ALLOC(ndr, r->out.domains);
6543 ZERO_STRUCTP(r->out.domains);
6544 NDR_PULL_ALLOC(ndr, r->out.sids);
6545 *r->out.sids = *r->in.sids;
6546 NDR_PULL_ALLOC(ndr, r->out.count);
6547 *r->out.count = *r->in.count;
6548 if (r->in.names) {
6549 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
6552 if (flags & NDR_OUT) {
6553 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6554 NDR_PULL_ALLOC(ndr, r->out.domains);
6556 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
6557 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
6558 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
6559 if (_ptr_domains) {
6560 NDR_PULL_ALLOC(ndr, *r->out.domains);
6561 } else {
6562 *r->out.domains = NULL;
6564 if (*r->out.domains) {
6565 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
6566 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
6567 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6568 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
6570 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
6571 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6572 NDR_PULL_ALLOC(ndr, r->out.sids);
6574 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6575 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
6576 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6577 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6578 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6579 NDR_PULL_ALLOC(ndr, r->out.count);
6581 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6582 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
6583 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
6584 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6585 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6587 return NDR_ERR_SUCCESS;
6590 _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames *r)
6592 uint32_t cntr_names_0;
6593 ndr_print_struct(ndr, name, "lsa_LookupNames");
6594 ndr->depth++;
6595 if (flags & NDR_SET_VALUES) {
6596 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6598 if (flags & NDR_IN) {
6599 ndr_print_struct(ndr, "in", "lsa_LookupNames");
6600 ndr->depth++;
6601 ndr_print_ptr(ndr, "handle", r->in.handle);
6602 ndr->depth++;
6603 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6604 ndr->depth--;
6605 ndr_print_uint32(ndr, "num_names", r->in.num_names);
6606 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
6607 ndr->depth++;
6608 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
6609 char *idx_0=NULL;
6610 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
6611 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
6612 free(idx_0);
6615 ndr->depth--;
6616 ndr_print_ptr(ndr, "sids", r->in.sids);
6617 ndr->depth++;
6618 ndr_print_lsa_TransSidArray(ndr, "sids", r->in.sids);
6619 ndr->depth--;
6620 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
6621 ndr_print_ptr(ndr, "count", r->in.count);
6622 ndr->depth++;
6623 ndr_print_uint32(ndr, "count", *r->in.count);
6624 ndr->depth--;
6625 ndr->depth--;
6627 if (flags & NDR_OUT) {
6628 ndr_print_struct(ndr, "out", "lsa_LookupNames");
6629 ndr->depth++;
6630 ndr_print_ptr(ndr, "domains", r->out.domains);
6631 ndr->depth++;
6632 ndr_print_ptr(ndr, "domains", *r->out.domains);
6633 ndr->depth++;
6634 if (*r->out.domains) {
6635 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
6637 ndr->depth--;
6638 ndr->depth--;
6639 ndr_print_ptr(ndr, "sids", r->out.sids);
6640 ndr->depth++;
6641 ndr_print_lsa_TransSidArray(ndr, "sids", r->out.sids);
6642 ndr->depth--;
6643 ndr_print_ptr(ndr, "count", r->out.count);
6644 ndr->depth++;
6645 ndr_print_uint32(ndr, "count", *r->out.count);
6646 ndr->depth--;
6647 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6648 ndr->depth--;
6650 ndr->depth--;
6653 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct lsa_LookupSids *r)
6655 if (flags & NDR_IN) {
6656 if (r->in.handle == NULL) {
6657 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6659 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6660 if (r->in.sids == NULL) {
6661 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6663 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6664 if (r->in.names == NULL) {
6665 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6667 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
6668 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
6669 if (r->in.count == NULL) {
6670 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6672 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
6674 if (flags & NDR_OUT) {
6675 if (r->out.domains == NULL) {
6676 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6678 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
6679 if (*r->out.domains) {
6680 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6682 if (r->out.names == NULL) {
6683 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6685 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
6686 if (r->out.count == NULL) {
6687 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6689 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
6690 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6692 return NDR_ERR_SUCCESS;
6695 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int flags, struct lsa_LookupSids *r)
6697 uint32_t _ptr_domains;
6698 TALLOC_CTX *_mem_save_handle_0;
6699 TALLOC_CTX *_mem_save_sids_0;
6700 TALLOC_CTX *_mem_save_domains_0;
6701 TALLOC_CTX *_mem_save_domains_1;
6702 TALLOC_CTX *_mem_save_names_0;
6703 TALLOC_CTX *_mem_save_count_0;
6704 if (flags & NDR_IN) {
6705 ZERO_STRUCT(r->out);
6707 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6708 NDR_PULL_ALLOC(ndr, r->in.handle);
6710 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6711 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6712 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6713 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6714 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6715 NDR_PULL_ALLOC(ndr, r->in.sids);
6717 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6718 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
6719 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6720 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6721 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6722 NDR_PULL_ALLOC(ndr, r->in.names);
6724 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
6725 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
6726 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
6727 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
6728 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
6729 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6730 NDR_PULL_ALLOC(ndr, r->in.count);
6732 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6733 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
6734 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
6735 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6736 NDR_PULL_ALLOC(ndr, r->out.domains);
6737 ZERO_STRUCTP(r->out.domains);
6738 NDR_PULL_ALLOC(ndr, r->out.names);
6739 *r->out.names = *r->in.names;
6740 NDR_PULL_ALLOC(ndr, r->out.count);
6741 *r->out.count = *r->in.count;
6743 if (flags & NDR_OUT) {
6744 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6745 NDR_PULL_ALLOC(ndr, r->out.domains);
6747 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
6748 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
6749 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
6750 if (_ptr_domains) {
6751 NDR_PULL_ALLOC(ndr, *r->out.domains);
6752 } else {
6753 *r->out.domains = NULL;
6755 if (*r->out.domains) {
6756 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
6757 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
6758 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6759 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
6761 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
6762 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6763 NDR_PULL_ALLOC(ndr, r->out.names);
6765 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
6766 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
6767 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
6768 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
6769 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6770 NDR_PULL_ALLOC(ndr, r->out.count);
6772 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6773 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
6774 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
6775 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6776 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6778 return NDR_ERR_SUCCESS;
6781 _PUBLIC_ void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids *r)
6783 ndr_print_struct(ndr, name, "lsa_LookupSids");
6784 ndr->depth++;
6785 if (flags & NDR_SET_VALUES) {
6786 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6788 if (flags & NDR_IN) {
6789 ndr_print_struct(ndr, "in", "lsa_LookupSids");
6790 ndr->depth++;
6791 ndr_print_ptr(ndr, "handle", r->in.handle);
6792 ndr->depth++;
6793 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6794 ndr->depth--;
6795 ndr_print_ptr(ndr, "sids", r->in.sids);
6796 ndr->depth++;
6797 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
6798 ndr->depth--;
6799 ndr_print_ptr(ndr, "names", r->in.names);
6800 ndr->depth++;
6801 ndr_print_lsa_TransNameArray(ndr, "names", r->in.names);
6802 ndr->depth--;
6803 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
6804 ndr_print_ptr(ndr, "count", r->in.count);
6805 ndr->depth++;
6806 ndr_print_uint32(ndr, "count", *r->in.count);
6807 ndr->depth--;
6808 ndr->depth--;
6810 if (flags & NDR_OUT) {
6811 ndr_print_struct(ndr, "out", "lsa_LookupSids");
6812 ndr->depth++;
6813 ndr_print_ptr(ndr, "domains", r->out.domains);
6814 ndr->depth++;
6815 ndr_print_ptr(ndr, "domains", *r->out.domains);
6816 ndr->depth++;
6817 if (*r->out.domains) {
6818 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
6820 ndr->depth--;
6821 ndr->depth--;
6822 ndr_print_ptr(ndr, "names", r->out.names);
6823 ndr->depth++;
6824 ndr_print_lsa_TransNameArray(ndr, "names", r->out.names);
6825 ndr->depth--;
6826 ndr_print_ptr(ndr, "count", r->out.count);
6827 ndr->depth++;
6828 ndr_print_uint32(ndr, "count", *r->out.count);
6829 ndr->depth--;
6830 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6831 ndr->depth--;
6833 ndr->depth--;
6836 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct lsa_CreateSecret *r)
6838 if (flags & NDR_IN) {
6839 if (r->in.handle == NULL) {
6840 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6842 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6843 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
6844 NDR_CHECK(ndr_push_lsa_SecretAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6846 if (flags & NDR_OUT) {
6847 if (r->out.sec_handle == NULL) {
6848 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6850 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
6851 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6853 return NDR_ERR_SUCCESS;
6856 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int flags, struct lsa_CreateSecret *r)
6858 TALLOC_CTX *_mem_save_handle_0;
6859 TALLOC_CTX *_mem_save_sec_handle_0;
6860 if (flags & NDR_IN) {
6861 ZERO_STRUCT(r->out);
6863 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6864 NDR_PULL_ALLOC(ndr, r->in.handle);
6866 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6867 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6868 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6869 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6870 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
6871 NDR_CHECK(ndr_pull_lsa_SecretAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6872 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
6873 ZERO_STRUCTP(r->out.sec_handle);
6875 if (flags & NDR_OUT) {
6876 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6877 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
6879 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6880 NDR_PULL_SET_MEM_CTX(ndr, r->out.sec_handle, LIBNDR_FLAG_REF_ALLOC);
6881 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
6882 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
6883 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6885 return NDR_ERR_SUCCESS;
6888 _PUBLIC_ void ndr_print_lsa_CreateSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateSecret *r)
6890 ndr_print_struct(ndr, name, "lsa_CreateSecret");
6891 ndr->depth++;
6892 if (flags & NDR_SET_VALUES) {
6893 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6895 if (flags & NDR_IN) {
6896 ndr_print_struct(ndr, "in", "lsa_CreateSecret");
6897 ndr->depth++;
6898 ndr_print_ptr(ndr, "handle", r->in.handle);
6899 ndr->depth++;
6900 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6901 ndr->depth--;
6902 ndr_print_lsa_String(ndr, "name", &r->in.name);
6903 ndr_print_lsa_SecretAccessMask(ndr, "access_mask", r->in.access_mask);
6904 ndr->depth--;
6906 if (flags & NDR_OUT) {
6907 ndr_print_struct(ndr, "out", "lsa_CreateSecret");
6908 ndr->depth++;
6909 ndr_print_ptr(ndr, "sec_handle", r->out.sec_handle);
6910 ndr->depth++;
6911 ndr_print_policy_handle(ndr, "sec_handle", r->out.sec_handle);
6912 ndr->depth--;
6913 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6914 ndr->depth--;
6916 ndr->depth--;
6919 static enum ndr_err_code ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flags, const struct lsa_OpenAccount *r)
6921 if (flags & NDR_IN) {
6922 if (r->in.handle == NULL) {
6923 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6925 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6926 if (r->in.sid == NULL) {
6927 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6929 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6930 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
6932 if (flags & NDR_OUT) {
6933 if (r->out.acct_handle == NULL) {
6934 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6936 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
6937 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6939 return NDR_ERR_SUCCESS;
6942 static enum ndr_err_code ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flags, struct lsa_OpenAccount *r)
6944 TALLOC_CTX *_mem_save_handle_0;
6945 TALLOC_CTX *_mem_save_sid_0;
6946 TALLOC_CTX *_mem_save_acct_handle_0;
6947 if (flags & NDR_IN) {
6948 ZERO_STRUCT(r->out);
6950 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6951 NDR_PULL_ALLOC(ndr, r->in.handle);
6953 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6954 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6955 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6956 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6957 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6958 NDR_PULL_ALLOC(ndr, r->in.sid);
6960 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6961 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
6962 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6963 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
6964 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
6965 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
6966 ZERO_STRUCTP(r->out.acct_handle);
6968 if (flags & NDR_OUT) {
6969 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6970 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
6972 _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6973 NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC);
6974 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
6975 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC);
6976 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6978 return NDR_ERR_SUCCESS;
6981 _PUBLIC_ void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenAccount *r)
6983 ndr_print_struct(ndr, name, "lsa_OpenAccount");
6984 ndr->depth++;
6985 if (flags & NDR_SET_VALUES) {
6986 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6988 if (flags & NDR_IN) {
6989 ndr_print_struct(ndr, "in", "lsa_OpenAccount");
6990 ndr->depth++;
6991 ndr_print_ptr(ndr, "handle", r->in.handle);
6992 ndr->depth++;
6993 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6994 ndr->depth--;
6995 ndr_print_ptr(ndr, "sid", r->in.sid);
6996 ndr->depth++;
6997 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
6998 ndr->depth--;
6999 ndr_print_lsa_AccountAccessMask(ndr, "access_mask", r->in.access_mask);
7000 ndr->depth--;
7002 if (flags & NDR_OUT) {
7003 ndr_print_struct(ndr, "out", "lsa_OpenAccount");
7004 ndr->depth++;
7005 ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle);
7006 ndr->depth++;
7007 ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle);
7008 ndr->depth--;
7009 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7010 ndr->depth--;
7012 ndr->depth--;
7015 static enum ndr_err_code ndr_push_lsa_EnumPrivsAccount(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivsAccount *r)
7017 if (flags & NDR_IN) {
7018 if (r->in.handle == NULL) {
7019 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7021 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7023 if (flags & NDR_OUT) {
7024 if (r->out.privs == NULL) {
7025 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7027 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.privs));
7028 if (*r->out.privs) {
7029 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs));
7031 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7033 return NDR_ERR_SUCCESS;
7036 static enum ndr_err_code ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivsAccount *r)
7038 uint32_t _ptr_privs;
7039 TALLOC_CTX *_mem_save_handle_0;
7040 TALLOC_CTX *_mem_save_privs_0;
7041 TALLOC_CTX *_mem_save_privs_1;
7042 if (flags & NDR_IN) {
7043 ZERO_STRUCT(r->out);
7045 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7046 NDR_PULL_ALLOC(ndr, r->in.handle);
7048 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7049 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7050 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7051 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7052 NDR_PULL_ALLOC(ndr, r->out.privs);
7053 ZERO_STRUCTP(r->out.privs);
7055 if (flags & NDR_OUT) {
7056 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7057 NDR_PULL_ALLOC(ndr, r->out.privs);
7059 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
7060 NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, LIBNDR_FLAG_REF_ALLOC);
7061 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
7062 if (_ptr_privs) {
7063 NDR_PULL_ALLOC(ndr, *r->out.privs);
7064 } else {
7065 *r->out.privs = NULL;
7067 if (*r->out.privs) {
7068 _mem_save_privs_1 = NDR_PULL_GET_MEM_CTX(ndr);
7069 NDR_PULL_SET_MEM_CTX(ndr, *r->out.privs, 0);
7070 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs));
7071 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_1, 0);
7073 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
7074 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7076 return NDR_ERR_SUCCESS;
7079 _PUBLIC_ void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivsAccount *r)
7081 ndr_print_struct(ndr, name, "lsa_EnumPrivsAccount");
7082 ndr->depth++;
7083 if (flags & NDR_SET_VALUES) {
7084 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7086 if (flags & NDR_IN) {
7087 ndr_print_struct(ndr, "in", "lsa_EnumPrivsAccount");
7088 ndr->depth++;
7089 ndr_print_ptr(ndr, "handle", r->in.handle);
7090 ndr->depth++;
7091 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7092 ndr->depth--;
7093 ndr->depth--;
7095 if (flags & NDR_OUT) {
7096 ndr_print_struct(ndr, "out", "lsa_EnumPrivsAccount");
7097 ndr->depth++;
7098 ndr_print_ptr(ndr, "privs", r->out.privs);
7099 ndr->depth++;
7100 ndr_print_ptr(ndr, "privs", *r->out.privs);
7101 ndr->depth++;
7102 if (*r->out.privs) {
7103 ndr_print_lsa_PrivilegeSet(ndr, "privs", *r->out.privs);
7105 ndr->depth--;
7106 ndr->depth--;
7107 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7108 ndr->depth--;
7110 ndr->depth--;
7113 static enum ndr_err_code ndr_push_lsa_AddPrivilegesToAccount(struct ndr_push *ndr, int flags, const struct lsa_AddPrivilegesToAccount *r)
7115 if (flags & NDR_IN) {
7116 if (r->in.handle == NULL) {
7117 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7119 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7120 if (r->in.privs == NULL) {
7121 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7123 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7125 if (flags & NDR_OUT) {
7126 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7128 return NDR_ERR_SUCCESS;
7131 static enum ndr_err_code ndr_pull_lsa_AddPrivilegesToAccount(struct ndr_pull *ndr, int flags, struct lsa_AddPrivilegesToAccount *r)
7133 TALLOC_CTX *_mem_save_handle_0;
7134 TALLOC_CTX *_mem_save_privs_0;
7135 if (flags & NDR_IN) {
7136 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7137 NDR_PULL_ALLOC(ndr, r->in.handle);
7139 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7140 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7141 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7142 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7143 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7144 NDR_PULL_ALLOC(ndr, r->in.privs);
7146 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
7147 NDR_PULL_SET_MEM_CTX(ndr, r->in.privs, LIBNDR_FLAG_REF_ALLOC);
7148 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7149 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
7151 if (flags & NDR_OUT) {
7152 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7154 return NDR_ERR_SUCCESS;
7157 _PUBLIC_ void ndr_print_lsa_AddPrivilegesToAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddPrivilegesToAccount *r)
7159 ndr_print_struct(ndr, name, "lsa_AddPrivilegesToAccount");
7160 ndr->depth++;
7161 if (flags & NDR_SET_VALUES) {
7162 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7164 if (flags & NDR_IN) {
7165 ndr_print_struct(ndr, "in", "lsa_AddPrivilegesToAccount");
7166 ndr->depth++;
7167 ndr_print_ptr(ndr, "handle", r->in.handle);
7168 ndr->depth++;
7169 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7170 ndr->depth--;
7171 ndr_print_ptr(ndr, "privs", r->in.privs);
7172 ndr->depth++;
7173 ndr_print_lsa_PrivilegeSet(ndr, "privs", r->in.privs);
7174 ndr->depth--;
7175 ndr->depth--;
7177 if (flags & NDR_OUT) {
7178 ndr_print_struct(ndr, "out", "lsa_AddPrivilegesToAccount");
7179 ndr->depth++;
7180 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7181 ndr->depth--;
7183 ndr->depth--;
7186 static enum ndr_err_code ndr_push_lsa_RemovePrivilegesFromAccount(struct ndr_push *ndr, int flags, const struct lsa_RemovePrivilegesFromAccount *r)
7188 if (flags & NDR_IN) {
7189 if (r->in.handle == NULL) {
7190 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7192 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7193 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.remove_all));
7194 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.privs));
7195 if (r->in.privs) {
7196 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7199 if (flags & NDR_OUT) {
7200 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7202 return NDR_ERR_SUCCESS;
7205 static enum ndr_err_code ndr_pull_lsa_RemovePrivilegesFromAccount(struct ndr_pull *ndr, int flags, struct lsa_RemovePrivilegesFromAccount *r)
7207 uint32_t _ptr_privs;
7208 TALLOC_CTX *_mem_save_handle_0;
7209 TALLOC_CTX *_mem_save_privs_0;
7210 if (flags & NDR_IN) {
7211 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7212 NDR_PULL_ALLOC(ndr, r->in.handle);
7214 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7215 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7216 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7217 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7218 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.remove_all));
7219 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
7220 if (_ptr_privs) {
7221 NDR_PULL_ALLOC(ndr, r->in.privs);
7222 } else {
7223 r->in.privs = NULL;
7225 if (r->in.privs) {
7226 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
7227 NDR_PULL_SET_MEM_CTX(ndr, r->in.privs, 0);
7228 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7229 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0);
7232 if (flags & NDR_OUT) {
7233 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7235 return NDR_ERR_SUCCESS;
7238 _PUBLIC_ void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemovePrivilegesFromAccount *r)
7240 ndr_print_struct(ndr, name, "lsa_RemovePrivilegesFromAccount");
7241 ndr->depth++;
7242 if (flags & NDR_SET_VALUES) {
7243 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7245 if (flags & NDR_IN) {
7246 ndr_print_struct(ndr, "in", "lsa_RemovePrivilegesFromAccount");
7247 ndr->depth++;
7248 ndr_print_ptr(ndr, "handle", r->in.handle);
7249 ndr->depth++;
7250 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7251 ndr->depth--;
7252 ndr_print_uint8(ndr, "remove_all", r->in.remove_all);
7253 ndr_print_ptr(ndr, "privs", r->in.privs);
7254 ndr->depth++;
7255 if (r->in.privs) {
7256 ndr_print_lsa_PrivilegeSet(ndr, "privs", r->in.privs);
7258 ndr->depth--;
7259 ndr->depth--;
7261 if (flags & NDR_OUT) {
7262 ndr_print_struct(ndr, "out", "lsa_RemovePrivilegesFromAccount");
7263 ndr->depth++;
7264 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7265 ndr->depth--;
7267 ndr->depth--;
7270 static enum ndr_err_code ndr_push_lsa_GetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_GetQuotasForAccount *r)
7272 if (flags & NDR_IN) {
7274 if (flags & NDR_OUT) {
7275 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7277 return NDR_ERR_SUCCESS;
7280 static enum ndr_err_code ndr_pull_lsa_GetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_GetQuotasForAccount *r)
7282 if (flags & NDR_IN) {
7284 if (flags & NDR_OUT) {
7285 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7287 return NDR_ERR_SUCCESS;
7290 _PUBLIC_ void ndr_print_lsa_GetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetQuotasForAccount *r)
7292 ndr_print_struct(ndr, name, "lsa_GetQuotasForAccount");
7293 ndr->depth++;
7294 if (flags & NDR_SET_VALUES) {
7295 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7297 if (flags & NDR_IN) {
7298 ndr_print_struct(ndr, "in", "lsa_GetQuotasForAccount");
7299 ndr->depth++;
7300 ndr->depth--;
7302 if (flags & NDR_OUT) {
7303 ndr_print_struct(ndr, "out", "lsa_GetQuotasForAccount");
7304 ndr->depth++;
7305 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7306 ndr->depth--;
7308 ndr->depth--;
7311 static enum ndr_err_code ndr_push_lsa_SetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_SetQuotasForAccount *r)
7313 if (flags & NDR_IN) {
7315 if (flags & NDR_OUT) {
7316 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7318 return NDR_ERR_SUCCESS;
7321 static enum ndr_err_code ndr_pull_lsa_SetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_SetQuotasForAccount *r)
7323 if (flags & NDR_IN) {
7325 if (flags & NDR_OUT) {
7326 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7328 return NDR_ERR_SUCCESS;
7331 _PUBLIC_ void ndr_print_lsa_SetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetQuotasForAccount *r)
7333 ndr_print_struct(ndr, name, "lsa_SetQuotasForAccount");
7334 ndr->depth++;
7335 if (flags & NDR_SET_VALUES) {
7336 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7338 if (flags & NDR_IN) {
7339 ndr_print_struct(ndr, "in", "lsa_SetQuotasForAccount");
7340 ndr->depth++;
7341 ndr->depth--;
7343 if (flags & NDR_OUT) {
7344 ndr_print_struct(ndr, "out", "lsa_SetQuotasForAccount");
7345 ndr->depth++;
7346 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7347 ndr->depth--;
7349 ndr->depth--;
7352 static enum ndr_err_code ndr_push_lsa_GetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_GetSystemAccessAccount *r)
7354 if (flags & NDR_IN) {
7355 if (r->in.handle == NULL) {
7356 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7358 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7360 if (flags & NDR_OUT) {
7361 if (r->out.access_mask == NULL) {
7362 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7364 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr, NDR_SCALARS, *r->out.access_mask));
7365 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7367 return NDR_ERR_SUCCESS;
7370 static enum ndr_err_code ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_GetSystemAccessAccount *r)
7372 TALLOC_CTX *_mem_save_handle_0;
7373 TALLOC_CTX *_mem_save_access_mask_0;
7374 if (flags & NDR_IN) {
7375 ZERO_STRUCT(r->out);
7377 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7378 NDR_PULL_ALLOC(ndr, r->in.handle);
7380 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7381 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7382 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7383 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7384 NDR_PULL_ALLOC(ndr, r->out.access_mask);
7385 ZERO_STRUCTP(r->out.access_mask);
7387 if (flags & NDR_OUT) {
7388 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7389 NDR_PULL_ALLOC(ndr, r->out.access_mask);
7391 _mem_save_access_mask_0 = NDR_PULL_GET_MEM_CTX(ndr);
7392 NDR_PULL_SET_MEM_CTX(ndr, r->out.access_mask, LIBNDR_FLAG_REF_ALLOC);
7393 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr, NDR_SCALARS, r->out.access_mask));
7394 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_access_mask_0, LIBNDR_FLAG_REF_ALLOC);
7395 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7397 return NDR_ERR_SUCCESS;
7400 _PUBLIC_ void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetSystemAccessAccount *r)
7402 ndr_print_struct(ndr, name, "lsa_GetSystemAccessAccount");
7403 ndr->depth++;
7404 if (flags & NDR_SET_VALUES) {
7405 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7407 if (flags & NDR_IN) {
7408 ndr_print_struct(ndr, "in", "lsa_GetSystemAccessAccount");
7409 ndr->depth++;
7410 ndr_print_ptr(ndr, "handle", r->in.handle);
7411 ndr->depth++;
7412 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7413 ndr->depth--;
7414 ndr->depth--;
7416 if (flags & NDR_OUT) {
7417 ndr_print_struct(ndr, "out", "lsa_GetSystemAccessAccount");
7418 ndr->depth++;
7419 ndr_print_ptr(ndr, "access_mask", r->out.access_mask);
7420 ndr->depth++;
7421 ndr_print_lsa_AccountAccessMask(ndr, "access_mask", *r->out.access_mask);
7422 ndr->depth--;
7423 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7424 ndr->depth--;
7426 ndr->depth--;
7429 static enum ndr_err_code ndr_push_lsa_SetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_SetSystemAccessAccount *r)
7431 if (flags & NDR_IN) {
7432 if (r->in.handle == NULL) {
7433 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7435 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7436 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
7438 if (flags & NDR_OUT) {
7439 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7441 return NDR_ERR_SUCCESS;
7444 static enum ndr_err_code ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_SetSystemAccessAccount *r)
7446 TALLOC_CTX *_mem_save_handle_0;
7447 if (flags & NDR_IN) {
7448 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7449 NDR_PULL_ALLOC(ndr, r->in.handle);
7451 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7452 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7453 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7454 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7455 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
7457 if (flags & NDR_OUT) {
7458 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7460 return NDR_ERR_SUCCESS;
7463 _PUBLIC_ void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSystemAccessAccount *r)
7465 ndr_print_struct(ndr, name, "lsa_SetSystemAccessAccount");
7466 ndr->depth++;
7467 if (flags & NDR_SET_VALUES) {
7468 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7470 if (flags & NDR_IN) {
7471 ndr_print_struct(ndr, "in", "lsa_SetSystemAccessAccount");
7472 ndr->depth++;
7473 ndr_print_ptr(ndr, "handle", r->in.handle);
7474 ndr->depth++;
7475 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7476 ndr->depth--;
7477 ndr_print_lsa_AccountAccessMask(ndr, "access_mask", r->in.access_mask);
7478 ndr->depth--;
7480 if (flags & NDR_OUT) {
7481 ndr_print_struct(ndr, "out", "lsa_SetSystemAccessAccount");
7482 ndr->depth++;
7483 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7484 ndr->depth--;
7486 ndr->depth--;
7489 static enum ndr_err_code ndr_push_lsa_OpenTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomain *r)
7491 if (flags & NDR_IN) {
7492 if (r->in.handle == NULL) {
7493 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7495 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7496 if (r->in.sid == NULL) {
7497 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7499 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
7500 NDR_CHECK(ndr_push_lsa_TrustedAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
7502 if (flags & NDR_OUT) {
7503 if (r->out.trustdom_handle == NULL) {
7504 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7506 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
7507 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7509 return NDR_ERR_SUCCESS;
7512 static enum ndr_err_code ndr_pull_lsa_OpenTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomain *r)
7514 TALLOC_CTX *_mem_save_handle_0;
7515 TALLOC_CTX *_mem_save_sid_0;
7516 TALLOC_CTX *_mem_save_trustdom_handle_0;
7517 if (flags & NDR_IN) {
7518 ZERO_STRUCT(r->out);
7520 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7521 NDR_PULL_ALLOC(ndr, r->in.handle);
7523 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7524 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7525 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7526 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7527 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7528 NDR_PULL_ALLOC(ndr, r->in.sid);
7530 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
7531 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
7532 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
7533 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
7534 NDR_CHECK(ndr_pull_lsa_TrustedAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
7535 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
7536 ZERO_STRUCTP(r->out.trustdom_handle);
7538 if (flags & NDR_OUT) {
7539 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7540 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
7542 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7543 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
7544 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
7545 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
7546 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7548 return NDR_ERR_SUCCESS;
7551 _PUBLIC_ void ndr_print_lsa_OpenTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomain *r)
7553 ndr_print_struct(ndr, name, "lsa_OpenTrustedDomain");
7554 ndr->depth++;
7555 if (flags & NDR_SET_VALUES) {
7556 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7558 if (flags & NDR_IN) {
7559 ndr_print_struct(ndr, "in", "lsa_OpenTrustedDomain");
7560 ndr->depth++;
7561 ndr_print_ptr(ndr, "handle", r->in.handle);
7562 ndr->depth++;
7563 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7564 ndr->depth--;
7565 ndr_print_ptr(ndr, "sid", r->in.sid);
7566 ndr->depth++;
7567 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
7568 ndr->depth--;
7569 ndr_print_lsa_TrustedAccessMask(ndr, "access_mask", r->in.access_mask);
7570 ndr->depth--;
7572 if (flags & NDR_OUT) {
7573 ndr_print_struct(ndr, "out", "lsa_OpenTrustedDomain");
7574 ndr->depth++;
7575 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
7576 ndr->depth++;
7577 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
7578 ndr->depth--;
7579 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7580 ndr->depth--;
7582 ndr->depth--;
7585 static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfo *r)
7587 if (flags & NDR_IN) {
7588 if (r->in.trustdom_handle == NULL) {
7589 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7591 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7592 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
7594 if (flags & NDR_OUT) {
7595 if (r->out.info == NULL) {
7596 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7598 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
7599 if (*r->out.info) {
7600 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
7601 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
7603 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7605 return NDR_ERR_SUCCESS;
7608 static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfo *r)
7610 uint32_t _ptr_info;
7611 TALLOC_CTX *_mem_save_trustdom_handle_0;
7612 TALLOC_CTX *_mem_save_info_0;
7613 TALLOC_CTX *_mem_save_info_1;
7614 if (flags & NDR_IN) {
7615 ZERO_STRUCT(r->out);
7617 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7618 NDR_PULL_ALLOC(ndr, r->in.trustdom_handle);
7620 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7621 NDR_PULL_SET_MEM_CTX(ndr, r->in.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
7622 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7623 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
7624 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
7625 NDR_PULL_ALLOC(ndr, r->out.info);
7626 ZERO_STRUCTP(r->out.info);
7628 if (flags & NDR_OUT) {
7629 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7630 NDR_PULL_ALLOC(ndr, r->out.info);
7632 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7633 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
7634 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
7635 if (_ptr_info) {
7636 NDR_PULL_ALLOC(ndr, *r->out.info);
7637 } else {
7638 *r->out.info = NULL;
7640 if (*r->out.info) {
7641 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
7642 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
7643 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
7644 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
7645 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
7647 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7648 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7650 return NDR_ERR_SUCCESS;
7653 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfo *r)
7655 ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfo");
7656 ndr->depth++;
7657 if (flags & NDR_SET_VALUES) {
7658 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7660 if (flags & NDR_IN) {
7661 ndr_print_struct(ndr, "in", "lsa_QueryTrustedDomainInfo");
7662 ndr->depth++;
7663 ndr_print_ptr(ndr, "trustdom_handle", r->in.trustdom_handle);
7664 ndr->depth++;
7665 ndr_print_policy_handle(ndr, "trustdom_handle", r->in.trustdom_handle);
7666 ndr->depth--;
7667 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
7668 ndr->depth--;
7670 if (flags & NDR_OUT) {
7671 ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfo");
7672 ndr->depth++;
7673 ndr_print_ptr(ndr, "info", r->out.info);
7674 ndr->depth++;
7675 ndr_print_ptr(ndr, "info", *r->out.info);
7676 ndr->depth++;
7677 if (*r->out.info) {
7678 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
7679 ndr_print_lsa_TrustedDomainInfo(ndr, "info", *r->out.info);
7681 ndr->depth--;
7682 ndr->depth--;
7683 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7684 ndr->depth--;
7686 ndr->depth--;
7689 static enum ndr_err_code ndr_push_lsa_SetInformationTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_SetInformationTrustedDomain *r)
7691 if (flags & NDR_IN) {
7692 if (r->in.trustdom_handle == NULL) {
7693 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7695 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7696 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
7697 if (r->in.info == NULL) {
7698 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7700 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
7701 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7703 if (flags & NDR_OUT) {
7704 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7706 return NDR_ERR_SUCCESS;
7709 static enum ndr_err_code ndr_pull_lsa_SetInformationTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_SetInformationTrustedDomain *r)
7711 TALLOC_CTX *_mem_save_trustdom_handle_0;
7712 TALLOC_CTX *_mem_save_info_0;
7713 if (flags & NDR_IN) {
7714 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7715 NDR_PULL_ALLOC(ndr, r->in.trustdom_handle);
7717 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7718 NDR_PULL_SET_MEM_CTX(ndr, r->in.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
7719 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7720 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
7721 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
7722 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7723 NDR_PULL_ALLOC(ndr, r->in.info);
7725 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7726 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
7727 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
7728 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7729 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7731 if (flags & NDR_OUT) {
7732 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7734 return NDR_ERR_SUCCESS;
7737 _PUBLIC_ void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInformationTrustedDomain *r)
7739 ndr_print_struct(ndr, name, "lsa_SetInformationTrustedDomain");
7740 ndr->depth++;
7741 if (flags & NDR_SET_VALUES) {
7742 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7744 if (flags & NDR_IN) {
7745 ndr_print_struct(ndr, "in", "lsa_SetInformationTrustedDomain");
7746 ndr->depth++;
7747 ndr_print_ptr(ndr, "trustdom_handle", r->in.trustdom_handle);
7748 ndr->depth++;
7749 ndr_print_policy_handle(ndr, "trustdom_handle", r->in.trustdom_handle);
7750 ndr->depth--;
7751 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
7752 ndr_print_ptr(ndr, "info", r->in.info);
7753 ndr->depth++;
7754 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
7755 ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
7756 ndr->depth--;
7757 ndr->depth--;
7759 if (flags & NDR_OUT) {
7760 ndr_print_struct(ndr, "out", "lsa_SetInformationTrustedDomain");
7761 ndr->depth++;
7762 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7763 ndr->depth--;
7765 ndr->depth--;
7768 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags, const struct lsa_OpenSecret *r)
7770 if (flags & NDR_IN) {
7771 if (r->in.handle == NULL) {
7772 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7774 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7775 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
7776 NDR_CHECK(ndr_push_lsa_SecretAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
7778 if (flags & NDR_OUT) {
7779 if (r->out.sec_handle == NULL) {
7780 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7782 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
7783 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7785 return NDR_ERR_SUCCESS;
7788 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenSecret(struct ndr_pull *ndr, int flags, struct lsa_OpenSecret *r)
7790 TALLOC_CTX *_mem_save_handle_0;
7791 TALLOC_CTX *_mem_save_sec_handle_0;
7792 if (flags & NDR_IN) {
7793 ZERO_STRUCT(r->out);
7795 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7796 NDR_PULL_ALLOC(ndr, r->in.handle);
7798 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7799 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7800 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7801 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7802 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
7803 NDR_CHECK(ndr_pull_lsa_SecretAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
7804 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
7805 ZERO_STRUCTP(r->out.sec_handle);
7807 if (flags & NDR_OUT) {
7808 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7809 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
7811 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7812 NDR_PULL_SET_MEM_CTX(ndr, r->out.sec_handle, LIBNDR_FLAG_REF_ALLOC);
7813 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
7814 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
7815 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7817 return NDR_ERR_SUCCESS;
7820 _PUBLIC_ void ndr_print_lsa_OpenSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenSecret *r)
7822 ndr_print_struct(ndr, name, "lsa_OpenSecret");
7823 ndr->depth++;
7824 if (flags & NDR_SET_VALUES) {
7825 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7827 if (flags & NDR_IN) {
7828 ndr_print_struct(ndr, "in", "lsa_OpenSecret");
7829 ndr->depth++;
7830 ndr_print_ptr(ndr, "handle", r->in.handle);
7831 ndr->depth++;
7832 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7833 ndr->depth--;
7834 ndr_print_lsa_String(ndr, "name", &r->in.name);
7835 ndr_print_lsa_SecretAccessMask(ndr, "access_mask", r->in.access_mask);
7836 ndr->depth--;
7838 if (flags & NDR_OUT) {
7839 ndr_print_struct(ndr, "out", "lsa_OpenSecret");
7840 ndr->depth++;
7841 ndr_print_ptr(ndr, "sec_handle", r->out.sec_handle);
7842 ndr->depth++;
7843 ndr_print_policy_handle(ndr, "sec_handle", r->out.sec_handle);
7844 ndr->depth--;
7845 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7846 ndr->depth--;
7848 ndr->depth--;
7851 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, const struct lsa_SetSecret *r)
7853 if (flags & NDR_IN) {
7854 if (r->in.sec_handle == NULL) {
7855 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7857 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
7858 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_val));
7859 if (r->in.new_val) {
7860 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
7862 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_val));
7863 if (r->in.old_val) {
7864 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
7867 if (flags & NDR_OUT) {
7868 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7870 return NDR_ERR_SUCCESS;
7873 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SetSecret(struct ndr_pull *ndr, int flags, struct lsa_SetSecret *r)
7875 uint32_t _ptr_new_val;
7876 uint32_t _ptr_old_val;
7877 TALLOC_CTX *_mem_save_sec_handle_0;
7878 TALLOC_CTX *_mem_save_new_val_0;
7879 TALLOC_CTX *_mem_save_old_val_0;
7880 if (flags & NDR_IN) {
7881 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7882 NDR_PULL_ALLOC(ndr, r->in.sec_handle);
7884 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7885 NDR_PULL_SET_MEM_CTX(ndr, r->in.sec_handle, LIBNDR_FLAG_REF_ALLOC);
7886 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
7887 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
7888 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val));
7889 if (_ptr_new_val) {
7890 NDR_PULL_ALLOC(ndr, r->in.new_val);
7891 } else {
7892 r->in.new_val = NULL;
7894 if (r->in.new_val) {
7895 _mem_save_new_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
7896 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_val, 0);
7897 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
7898 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_val_0, 0);
7900 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
7901 if (_ptr_old_val) {
7902 NDR_PULL_ALLOC(ndr, r->in.old_val);
7903 } else {
7904 r->in.old_val = NULL;
7906 if (r->in.old_val) {
7907 _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
7908 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_val, 0);
7909 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
7910 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
7913 if (flags & NDR_OUT) {
7914 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7916 return NDR_ERR_SUCCESS;
7919 _PUBLIC_ void ndr_print_lsa_SetSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecret *r)
7921 ndr_print_struct(ndr, name, "lsa_SetSecret");
7922 ndr->depth++;
7923 if (flags & NDR_SET_VALUES) {
7924 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7926 if (flags & NDR_IN) {
7927 ndr_print_struct(ndr, "in", "lsa_SetSecret");
7928 ndr->depth++;
7929 ndr_print_ptr(ndr, "sec_handle", r->in.sec_handle);
7930 ndr->depth++;
7931 ndr_print_policy_handle(ndr, "sec_handle", r->in.sec_handle);
7932 ndr->depth--;
7933 ndr_print_ptr(ndr, "new_val", r->in.new_val);
7934 ndr->depth++;
7935 if (r->in.new_val) {
7936 ndr_print_lsa_DATA_BUF(ndr, "new_val", r->in.new_val);
7938 ndr->depth--;
7939 ndr_print_ptr(ndr, "old_val", r->in.old_val);
7940 ndr->depth++;
7941 if (r->in.old_val) {
7942 ndr_print_lsa_DATA_BUF(ndr, "old_val", r->in.old_val);
7944 ndr->depth--;
7945 ndr->depth--;
7947 if (flags & NDR_OUT) {
7948 ndr_print_struct(ndr, "out", "lsa_SetSecret");
7949 ndr->depth++;
7950 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7951 ndr->depth--;
7953 ndr->depth--;
7956 _PUBLIC_ enum ndr_err_code ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flags, const struct lsa_QuerySecret *r)
7958 if (flags & NDR_IN) {
7959 if (r->in.sec_handle == NULL) {
7960 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7962 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
7963 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_val));
7964 if (r->in.new_val) {
7965 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
7967 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_mtime));
7968 if (r->in.new_mtime) {
7969 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->in.new_mtime));
7971 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_val));
7972 if (r->in.old_val) {
7973 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
7975 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_mtime));
7976 if (r->in.old_mtime) {
7977 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->in.old_mtime));
7980 if (flags & NDR_OUT) {
7981 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.new_val));
7982 if (r->out.new_val) {
7983 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_val));
7985 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.new_mtime));
7986 if (r->out.new_mtime) {
7987 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->out.new_mtime));
7989 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.old_val));
7990 if (r->out.old_val) {
7991 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.old_val));
7993 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.old_mtime));
7994 if (r->out.old_mtime) {
7995 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->out.old_mtime));
7997 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7999 return NDR_ERR_SUCCESS;
8002 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_QuerySecret(struct ndr_pull *ndr, int flags, struct lsa_QuerySecret *r)
8004 uint32_t _ptr_new_val;
8005 uint32_t _ptr_new_mtime;
8006 uint32_t _ptr_old_val;
8007 uint32_t _ptr_old_mtime;
8008 TALLOC_CTX *_mem_save_sec_handle_0;
8009 TALLOC_CTX *_mem_save_new_val_0;
8010 TALLOC_CTX *_mem_save_new_mtime_0;
8011 TALLOC_CTX *_mem_save_old_val_0;
8012 TALLOC_CTX *_mem_save_old_mtime_0;
8013 if (flags & NDR_IN) {
8014 ZERO_STRUCT(r->out);
8016 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8017 NDR_PULL_ALLOC(ndr, r->in.sec_handle);
8019 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8020 NDR_PULL_SET_MEM_CTX(ndr, r->in.sec_handle, LIBNDR_FLAG_REF_ALLOC);
8021 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
8022 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
8023 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val));
8024 if (_ptr_new_val) {
8025 NDR_PULL_ALLOC(ndr, r->in.new_val);
8026 } else {
8027 r->in.new_val = NULL;
8029 if (r->in.new_val) {
8030 _mem_save_new_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
8031 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_val, 0);
8032 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
8033 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_val_0, 0);
8035 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_mtime));
8036 if (_ptr_new_mtime) {
8037 NDR_PULL_ALLOC(ndr, r->in.new_mtime);
8038 } else {
8039 r->in.new_mtime = NULL;
8041 if (r->in.new_mtime) {
8042 _mem_save_new_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
8043 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_mtime, 0);
8044 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->in.new_mtime));
8045 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_mtime_0, 0);
8047 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
8048 if (_ptr_old_val) {
8049 NDR_PULL_ALLOC(ndr, r->in.old_val);
8050 } else {
8051 r->in.old_val = NULL;
8053 if (r->in.old_val) {
8054 _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
8055 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_val, 0);
8056 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
8057 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
8059 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_mtime));
8060 if (_ptr_old_mtime) {
8061 NDR_PULL_ALLOC(ndr, r->in.old_mtime);
8062 } else {
8063 r->in.old_mtime = NULL;
8065 if (r->in.old_mtime) {
8066 _mem_save_old_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
8067 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_mtime, 0);
8068 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->in.old_mtime));
8069 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_mtime_0, 0);
8072 if (flags & NDR_OUT) {
8073 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val));
8074 if (_ptr_new_val) {
8075 NDR_PULL_ALLOC(ndr, r->out.new_val);
8076 } else {
8077 r->out.new_val = NULL;
8079 if (r->out.new_val) {
8080 _mem_save_new_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
8081 NDR_PULL_SET_MEM_CTX(ndr, r->out.new_val, 0);
8082 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_val));
8083 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_val_0, 0);
8085 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_mtime));
8086 if (_ptr_new_mtime) {
8087 NDR_PULL_ALLOC(ndr, r->out.new_mtime);
8088 } else {
8089 r->out.new_mtime = NULL;
8091 if (r->out.new_mtime) {
8092 _mem_save_new_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
8093 NDR_PULL_SET_MEM_CTX(ndr, r->out.new_mtime, 0);
8094 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->out.new_mtime));
8095 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_mtime_0, 0);
8097 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
8098 if (_ptr_old_val) {
8099 NDR_PULL_ALLOC(ndr, r->out.old_val);
8100 } else {
8101 r->out.old_val = NULL;
8103 if (r->out.old_val) {
8104 _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
8105 NDR_PULL_SET_MEM_CTX(ndr, r->out.old_val, 0);
8106 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.old_val));
8107 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
8109 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_mtime));
8110 if (_ptr_old_mtime) {
8111 NDR_PULL_ALLOC(ndr, r->out.old_mtime);
8112 } else {
8113 r->out.old_mtime = NULL;
8115 if (r->out.old_mtime) {
8116 _mem_save_old_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
8117 NDR_PULL_SET_MEM_CTX(ndr, r->out.old_mtime, 0);
8118 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->out.old_mtime));
8119 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_mtime_0, 0);
8121 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8123 return NDR_ERR_SUCCESS;
8126 _PUBLIC_ void ndr_print_lsa_QuerySecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecret *r)
8128 ndr_print_struct(ndr, name, "lsa_QuerySecret");
8129 ndr->depth++;
8130 if (flags & NDR_SET_VALUES) {
8131 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8133 if (flags & NDR_IN) {
8134 ndr_print_struct(ndr, "in", "lsa_QuerySecret");
8135 ndr->depth++;
8136 ndr_print_ptr(ndr, "sec_handle", r->in.sec_handle);
8137 ndr->depth++;
8138 ndr_print_policy_handle(ndr, "sec_handle", r->in.sec_handle);
8139 ndr->depth--;
8140 ndr_print_ptr(ndr, "new_val", r->in.new_val);
8141 ndr->depth++;
8142 if (r->in.new_val) {
8143 ndr_print_lsa_DATA_BUF_PTR(ndr, "new_val", r->in.new_val);
8145 ndr->depth--;
8146 ndr_print_ptr(ndr, "new_mtime", r->in.new_mtime);
8147 ndr->depth++;
8148 if (r->in.new_mtime) {
8149 ndr_print_NTTIME_hyper(ndr, "new_mtime", *r->in.new_mtime);
8151 ndr->depth--;
8152 ndr_print_ptr(ndr, "old_val", r->in.old_val);
8153 ndr->depth++;
8154 if (r->in.old_val) {
8155 ndr_print_lsa_DATA_BUF_PTR(ndr, "old_val", r->in.old_val);
8157 ndr->depth--;
8158 ndr_print_ptr(ndr, "old_mtime", r->in.old_mtime);
8159 ndr->depth++;
8160 if (r->in.old_mtime) {
8161 ndr_print_NTTIME_hyper(ndr, "old_mtime", *r->in.old_mtime);
8163 ndr->depth--;
8164 ndr->depth--;
8166 if (flags & NDR_OUT) {
8167 ndr_print_struct(ndr, "out", "lsa_QuerySecret");
8168 ndr->depth++;
8169 ndr_print_ptr(ndr, "new_val", r->out.new_val);
8170 ndr->depth++;
8171 if (r->out.new_val) {
8172 ndr_print_lsa_DATA_BUF_PTR(ndr, "new_val", r->out.new_val);
8174 ndr->depth--;
8175 ndr_print_ptr(ndr, "new_mtime", r->out.new_mtime);
8176 ndr->depth++;
8177 if (r->out.new_mtime) {
8178 ndr_print_NTTIME_hyper(ndr, "new_mtime", *r->out.new_mtime);
8180 ndr->depth--;
8181 ndr_print_ptr(ndr, "old_val", r->out.old_val);
8182 ndr->depth++;
8183 if (r->out.old_val) {
8184 ndr_print_lsa_DATA_BUF_PTR(ndr, "old_val", r->out.old_val);
8186 ndr->depth--;
8187 ndr_print_ptr(ndr, "old_mtime", r->out.old_mtime);
8188 ndr->depth++;
8189 if (r->out.old_mtime) {
8190 ndr_print_NTTIME_hyper(ndr, "old_mtime", *r->out.old_mtime);
8192 ndr->depth--;
8193 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8194 ndr->depth--;
8196 ndr->depth--;
8199 static enum ndr_err_code ndr_push_lsa_LookupPrivValue(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivValue *r)
8201 if (flags & NDR_IN) {
8202 if (r->in.handle == NULL) {
8203 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8205 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8206 if (r->in.name == NULL) {
8207 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8209 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8211 if (flags & NDR_OUT) {
8212 if (r->out.luid == NULL) {
8213 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8215 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, r->out.luid));
8216 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8218 return NDR_ERR_SUCCESS;
8221 static enum ndr_err_code ndr_pull_lsa_LookupPrivValue(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivValue *r)
8223 TALLOC_CTX *_mem_save_handle_0;
8224 TALLOC_CTX *_mem_save_name_0;
8225 TALLOC_CTX *_mem_save_luid_0;
8226 if (flags & NDR_IN) {
8227 ZERO_STRUCT(r->out);
8229 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8230 NDR_PULL_ALLOC(ndr, r->in.handle);
8232 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8233 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8234 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8235 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8236 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8237 NDR_PULL_ALLOC(ndr, r->in.name);
8239 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8240 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
8241 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8242 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
8243 NDR_PULL_ALLOC(ndr, r->out.luid);
8244 ZERO_STRUCTP(r->out.luid);
8246 if (flags & NDR_OUT) {
8247 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8248 NDR_PULL_ALLOC(ndr, r->out.luid);
8250 _mem_save_luid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8251 NDR_PULL_SET_MEM_CTX(ndr, r->out.luid, LIBNDR_FLAG_REF_ALLOC);
8252 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, r->out.luid));
8253 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_luid_0, LIBNDR_FLAG_REF_ALLOC);
8254 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8256 return NDR_ERR_SUCCESS;
8259 _PUBLIC_ void ndr_print_lsa_LookupPrivValue(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivValue *r)
8261 ndr_print_struct(ndr, name, "lsa_LookupPrivValue");
8262 ndr->depth++;
8263 if (flags & NDR_SET_VALUES) {
8264 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8266 if (flags & NDR_IN) {
8267 ndr_print_struct(ndr, "in", "lsa_LookupPrivValue");
8268 ndr->depth++;
8269 ndr_print_ptr(ndr, "handle", r->in.handle);
8270 ndr->depth++;
8271 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8272 ndr->depth--;
8273 ndr_print_ptr(ndr, "name", r->in.name);
8274 ndr->depth++;
8275 ndr_print_lsa_String(ndr, "name", r->in.name);
8276 ndr->depth--;
8277 ndr->depth--;
8279 if (flags & NDR_OUT) {
8280 ndr_print_struct(ndr, "out", "lsa_LookupPrivValue");
8281 ndr->depth++;
8282 ndr_print_ptr(ndr, "luid", r->out.luid);
8283 ndr->depth++;
8284 ndr_print_lsa_LUID(ndr, "luid", r->out.luid);
8285 ndr->depth--;
8286 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8287 ndr->depth--;
8289 ndr->depth--;
8292 static enum ndr_err_code ndr_push_lsa_LookupPrivName(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivName *r)
8294 if (flags & NDR_IN) {
8295 if (r->in.handle == NULL) {
8296 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8298 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8299 if (r->in.luid == NULL) {
8300 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8302 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, r->in.luid));
8304 if (flags & NDR_OUT) {
8305 if (r->out.name == NULL) {
8306 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8308 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.name));
8309 if (*r->out.name) {
8310 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.name));
8312 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8314 return NDR_ERR_SUCCESS;
8317 static enum ndr_err_code ndr_pull_lsa_LookupPrivName(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivName *r)
8319 uint32_t _ptr_name;
8320 TALLOC_CTX *_mem_save_handle_0;
8321 TALLOC_CTX *_mem_save_luid_0;
8322 TALLOC_CTX *_mem_save_name_0;
8323 TALLOC_CTX *_mem_save_name_1;
8324 if (flags & NDR_IN) {
8325 ZERO_STRUCT(r->out);
8327 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8328 NDR_PULL_ALLOC(ndr, r->in.handle);
8330 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8331 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8332 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8333 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8334 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8335 NDR_PULL_ALLOC(ndr, r->in.luid);
8337 _mem_save_luid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8338 NDR_PULL_SET_MEM_CTX(ndr, r->in.luid, LIBNDR_FLAG_REF_ALLOC);
8339 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, r->in.luid));
8340 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_luid_0, LIBNDR_FLAG_REF_ALLOC);
8341 NDR_PULL_ALLOC(ndr, r->out.name);
8342 ZERO_STRUCTP(r->out.name);
8344 if (flags & NDR_OUT) {
8345 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8346 NDR_PULL_ALLOC(ndr, r->out.name);
8348 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8349 NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC);
8350 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
8351 if (_ptr_name) {
8352 NDR_PULL_ALLOC(ndr, *r->out.name);
8353 } else {
8354 *r->out.name = NULL;
8356 if (*r->out.name) {
8357 _mem_save_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
8358 NDR_PULL_SET_MEM_CTX(ndr, *r->out.name, 0);
8359 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.name));
8360 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_1, 0);
8362 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
8363 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8365 return NDR_ERR_SUCCESS;
8368 _PUBLIC_ void ndr_print_lsa_LookupPrivName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivName *r)
8370 ndr_print_struct(ndr, name, "lsa_LookupPrivName");
8371 ndr->depth++;
8372 if (flags & NDR_SET_VALUES) {
8373 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8375 if (flags & NDR_IN) {
8376 ndr_print_struct(ndr, "in", "lsa_LookupPrivName");
8377 ndr->depth++;
8378 ndr_print_ptr(ndr, "handle", r->in.handle);
8379 ndr->depth++;
8380 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8381 ndr->depth--;
8382 ndr_print_ptr(ndr, "luid", r->in.luid);
8383 ndr->depth++;
8384 ndr_print_lsa_LUID(ndr, "luid", r->in.luid);
8385 ndr->depth--;
8386 ndr->depth--;
8388 if (flags & NDR_OUT) {
8389 ndr_print_struct(ndr, "out", "lsa_LookupPrivName");
8390 ndr->depth++;
8391 ndr_print_ptr(ndr, "name", r->out.name);
8392 ndr->depth++;
8393 ndr_print_ptr(ndr, "name", *r->out.name);
8394 ndr->depth++;
8395 if (*r->out.name) {
8396 ndr_print_lsa_StringLarge(ndr, "name", *r->out.name);
8398 ndr->depth--;
8399 ndr->depth--;
8400 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8401 ndr->depth--;
8403 ndr->depth--;
8406 static enum ndr_err_code ndr_push_lsa_LookupPrivDisplayName(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivDisplayName *r)
8408 if (flags & NDR_IN) {
8409 if (r->in.handle == NULL) {
8410 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8412 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8413 if (r->in.name == NULL) {
8414 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8416 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8417 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.language_id));
8418 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.language_id_sys));
8420 if (flags & NDR_OUT) {
8421 if (r->out.disp_name == NULL) {
8422 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8424 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.disp_name));
8425 if (*r->out.disp_name) {
8426 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.disp_name));
8428 if (r->out.returned_language_id == NULL) {
8429 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8431 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.returned_language_id));
8432 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8434 return NDR_ERR_SUCCESS;
8437 static enum ndr_err_code ndr_pull_lsa_LookupPrivDisplayName(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivDisplayName *r)
8439 uint32_t _ptr_disp_name;
8440 TALLOC_CTX *_mem_save_handle_0;
8441 TALLOC_CTX *_mem_save_name_0;
8442 TALLOC_CTX *_mem_save_disp_name_0;
8443 TALLOC_CTX *_mem_save_disp_name_1;
8444 TALLOC_CTX *_mem_save_returned_language_id_0;
8445 if (flags & NDR_IN) {
8446 ZERO_STRUCT(r->out);
8448 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8449 NDR_PULL_ALLOC(ndr, r->in.handle);
8451 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8452 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8453 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8454 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8455 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8456 NDR_PULL_ALLOC(ndr, r->in.name);
8458 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8459 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
8460 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8461 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
8462 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.language_id));
8463 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.language_id_sys));
8464 NDR_PULL_ALLOC(ndr, r->out.disp_name);
8465 ZERO_STRUCTP(r->out.disp_name);
8466 NDR_PULL_ALLOC(ndr, r->out.returned_language_id);
8467 ZERO_STRUCTP(r->out.returned_language_id);
8469 if (flags & NDR_OUT) {
8470 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8471 NDR_PULL_ALLOC(ndr, r->out.disp_name);
8473 _mem_save_disp_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8474 NDR_PULL_SET_MEM_CTX(ndr, r->out.disp_name, LIBNDR_FLAG_REF_ALLOC);
8475 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_disp_name));
8476 if (_ptr_disp_name) {
8477 NDR_PULL_ALLOC(ndr, *r->out.disp_name);
8478 } else {
8479 *r->out.disp_name = NULL;
8481 if (*r->out.disp_name) {
8482 _mem_save_disp_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
8483 NDR_PULL_SET_MEM_CTX(ndr, *r->out.disp_name, 0);
8484 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.disp_name));
8485 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disp_name_1, 0);
8487 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disp_name_0, LIBNDR_FLAG_REF_ALLOC);
8488 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8489 NDR_PULL_ALLOC(ndr, r->out.returned_language_id);
8491 _mem_save_returned_language_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
8492 NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_language_id, LIBNDR_FLAG_REF_ALLOC);
8493 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.returned_language_id));
8494 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_language_id_0, LIBNDR_FLAG_REF_ALLOC);
8495 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8497 return NDR_ERR_SUCCESS;
8500 _PUBLIC_ void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivDisplayName *r)
8502 ndr_print_struct(ndr, name, "lsa_LookupPrivDisplayName");
8503 ndr->depth++;
8504 if (flags & NDR_SET_VALUES) {
8505 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8507 if (flags & NDR_IN) {
8508 ndr_print_struct(ndr, "in", "lsa_LookupPrivDisplayName");
8509 ndr->depth++;
8510 ndr_print_ptr(ndr, "handle", r->in.handle);
8511 ndr->depth++;
8512 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8513 ndr->depth--;
8514 ndr_print_ptr(ndr, "name", r->in.name);
8515 ndr->depth++;
8516 ndr_print_lsa_String(ndr, "name", r->in.name);
8517 ndr->depth--;
8518 ndr_print_uint16(ndr, "language_id", r->in.language_id);
8519 ndr_print_uint16(ndr, "language_id_sys", r->in.language_id_sys);
8520 ndr->depth--;
8522 if (flags & NDR_OUT) {
8523 ndr_print_struct(ndr, "out", "lsa_LookupPrivDisplayName");
8524 ndr->depth++;
8525 ndr_print_ptr(ndr, "disp_name", r->out.disp_name);
8526 ndr->depth++;
8527 ndr_print_ptr(ndr, "disp_name", *r->out.disp_name);
8528 ndr->depth++;
8529 if (*r->out.disp_name) {
8530 ndr_print_lsa_StringLarge(ndr, "disp_name", *r->out.disp_name);
8532 ndr->depth--;
8533 ndr->depth--;
8534 ndr_print_ptr(ndr, "returned_language_id", r->out.returned_language_id);
8535 ndr->depth++;
8536 ndr_print_uint16(ndr, "returned_language_id", *r->out.returned_language_id);
8537 ndr->depth--;
8538 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8539 ndr->depth--;
8541 ndr->depth--;
8544 static enum ndr_err_code ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int flags, const struct lsa_DeleteObject *r)
8546 if (flags & NDR_IN) {
8547 if (r->in.handle == NULL) {
8548 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8550 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8552 if (flags & NDR_OUT) {
8553 if (r->out.handle == NULL) {
8554 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8556 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
8557 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8559 return NDR_ERR_SUCCESS;
8562 static enum ndr_err_code ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int flags, struct lsa_DeleteObject *r)
8564 TALLOC_CTX *_mem_save_handle_0;
8565 if (flags & NDR_IN) {
8566 ZERO_STRUCT(r->out);
8568 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8569 NDR_PULL_ALLOC(ndr, r->in.handle);
8571 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8572 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8573 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8574 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8575 NDR_PULL_ALLOC(ndr, r->out.handle);
8576 *r->out.handle = *r->in.handle;
8578 if (flags & NDR_OUT) {
8579 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8580 NDR_PULL_ALLOC(ndr, r->out.handle);
8582 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8583 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
8584 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
8585 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8586 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8588 return NDR_ERR_SUCCESS;
8591 _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteObject *r)
8593 ndr_print_struct(ndr, name, "lsa_DeleteObject");
8594 ndr->depth++;
8595 if (flags & NDR_SET_VALUES) {
8596 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8598 if (flags & NDR_IN) {
8599 ndr_print_struct(ndr, "in", "lsa_DeleteObject");
8600 ndr->depth++;
8601 ndr_print_ptr(ndr, "handle", r->in.handle);
8602 ndr->depth++;
8603 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8604 ndr->depth--;
8605 ndr->depth--;
8607 if (flags & NDR_OUT) {
8608 ndr_print_struct(ndr, "out", "lsa_DeleteObject");
8609 ndr->depth++;
8610 ndr_print_ptr(ndr, "handle", r->out.handle);
8611 ndr->depth++;
8612 ndr_print_policy_handle(ndr, "handle", r->out.handle);
8613 ndr->depth--;
8614 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8615 ndr->depth--;
8617 ndr->depth--;
8620 static enum ndr_err_code ndr_push_lsa_EnumAccountsWithUserRight(struct ndr_push *ndr, int flags, const struct lsa_EnumAccountsWithUserRight *r)
8622 if (flags & NDR_IN) {
8623 if (r->in.handle == NULL) {
8624 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8626 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8627 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.name));
8628 if (r->in.name) {
8629 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8632 if (flags & NDR_OUT) {
8633 if (r->out.sids == NULL) {
8634 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8636 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
8637 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8639 return NDR_ERR_SUCCESS;
8642 static enum ndr_err_code ndr_pull_lsa_EnumAccountsWithUserRight(struct ndr_pull *ndr, int flags, struct lsa_EnumAccountsWithUserRight *r)
8644 uint32_t _ptr_name;
8645 TALLOC_CTX *_mem_save_handle_0;
8646 TALLOC_CTX *_mem_save_name_0;
8647 TALLOC_CTX *_mem_save_sids_0;
8648 if (flags & NDR_IN) {
8649 ZERO_STRUCT(r->out);
8651 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8652 NDR_PULL_ALLOC(ndr, r->in.handle);
8654 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8655 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8656 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8657 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8658 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
8659 if (_ptr_name) {
8660 NDR_PULL_ALLOC(ndr, r->in.name);
8661 } else {
8662 r->in.name = NULL;
8664 if (r->in.name) {
8665 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8666 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, 0);
8667 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8668 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
8670 NDR_PULL_ALLOC(ndr, r->out.sids);
8671 ZERO_STRUCTP(r->out.sids);
8673 if (flags & NDR_OUT) {
8674 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8675 NDR_PULL_ALLOC(ndr, r->out.sids);
8677 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
8678 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
8679 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
8680 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
8681 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8683 return NDR_ERR_SUCCESS;
8686 _PUBLIC_ void ndr_print_lsa_EnumAccountsWithUserRight(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountsWithUserRight *r)
8688 ndr_print_struct(ndr, name, "lsa_EnumAccountsWithUserRight");
8689 ndr->depth++;
8690 if (flags & NDR_SET_VALUES) {
8691 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8693 if (flags & NDR_IN) {
8694 ndr_print_struct(ndr, "in", "lsa_EnumAccountsWithUserRight");
8695 ndr->depth++;
8696 ndr_print_ptr(ndr, "handle", r->in.handle);
8697 ndr->depth++;
8698 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8699 ndr->depth--;
8700 ndr_print_ptr(ndr, "name", r->in.name);
8701 ndr->depth++;
8702 if (r->in.name) {
8703 ndr_print_lsa_String(ndr, "name", r->in.name);
8705 ndr->depth--;
8706 ndr->depth--;
8708 if (flags & NDR_OUT) {
8709 ndr_print_struct(ndr, "out", "lsa_EnumAccountsWithUserRight");
8710 ndr->depth++;
8711 ndr_print_ptr(ndr, "sids", r->out.sids);
8712 ndr->depth++;
8713 ndr_print_lsa_SidArray(ndr, "sids", r->out.sids);
8714 ndr->depth--;
8715 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8716 ndr->depth--;
8718 ndr->depth--;
8721 static enum ndr_err_code ndr_push_lsa_EnumAccountRights(struct ndr_push *ndr, int flags, const struct lsa_EnumAccountRights *r)
8723 if (flags & NDR_IN) {
8724 if (r->in.handle == NULL) {
8725 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8727 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8728 if (r->in.sid == NULL) {
8729 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8731 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8733 if (flags & NDR_OUT) {
8734 if (r->out.rights == NULL) {
8735 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8737 NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rights));
8738 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8740 return NDR_ERR_SUCCESS;
8743 static enum ndr_err_code ndr_pull_lsa_EnumAccountRights(struct ndr_pull *ndr, int flags, struct lsa_EnumAccountRights *r)
8745 TALLOC_CTX *_mem_save_handle_0;
8746 TALLOC_CTX *_mem_save_sid_0;
8747 TALLOC_CTX *_mem_save_rights_0;
8748 if (flags & NDR_IN) {
8749 ZERO_STRUCT(r->out);
8751 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8752 NDR_PULL_ALLOC(ndr, r->in.handle);
8754 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8755 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8756 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8757 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8758 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8759 NDR_PULL_ALLOC(ndr, r->in.sid);
8761 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8762 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8763 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8764 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8765 NDR_PULL_ALLOC(ndr, r->out.rights);
8766 ZERO_STRUCTP(r->out.rights);
8768 if (flags & NDR_OUT) {
8769 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8770 NDR_PULL_ALLOC(ndr, r->out.rights);
8772 _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
8773 NDR_PULL_SET_MEM_CTX(ndr, r->out.rights, LIBNDR_FLAG_REF_ALLOC);
8774 NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rights));
8775 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_0, LIBNDR_FLAG_REF_ALLOC);
8776 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8778 return NDR_ERR_SUCCESS;
8781 _PUBLIC_ void ndr_print_lsa_EnumAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountRights *r)
8783 ndr_print_struct(ndr, name, "lsa_EnumAccountRights");
8784 ndr->depth++;
8785 if (flags & NDR_SET_VALUES) {
8786 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8788 if (flags & NDR_IN) {
8789 ndr_print_struct(ndr, "in", "lsa_EnumAccountRights");
8790 ndr->depth++;
8791 ndr_print_ptr(ndr, "handle", r->in.handle);
8792 ndr->depth++;
8793 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8794 ndr->depth--;
8795 ndr_print_ptr(ndr, "sid", r->in.sid);
8796 ndr->depth++;
8797 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
8798 ndr->depth--;
8799 ndr->depth--;
8801 if (flags & NDR_OUT) {
8802 ndr_print_struct(ndr, "out", "lsa_EnumAccountRights");
8803 ndr->depth++;
8804 ndr_print_ptr(ndr, "rights", r->out.rights);
8805 ndr->depth++;
8806 ndr_print_lsa_RightSet(ndr, "rights", r->out.rights);
8807 ndr->depth--;
8808 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8809 ndr->depth--;
8811 ndr->depth--;
8814 static enum ndr_err_code ndr_push_lsa_AddAccountRights(struct ndr_push *ndr, int flags, const struct lsa_AddAccountRights *r)
8816 if (flags & NDR_IN) {
8817 if (r->in.handle == NULL) {
8818 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8820 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8821 if (r->in.sid == NULL) {
8822 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8824 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8825 if (r->in.rights == NULL) {
8826 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8828 NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
8830 if (flags & NDR_OUT) {
8831 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8833 return NDR_ERR_SUCCESS;
8836 static enum ndr_err_code ndr_pull_lsa_AddAccountRights(struct ndr_pull *ndr, int flags, struct lsa_AddAccountRights *r)
8838 TALLOC_CTX *_mem_save_handle_0;
8839 TALLOC_CTX *_mem_save_sid_0;
8840 TALLOC_CTX *_mem_save_rights_0;
8841 if (flags & NDR_IN) {
8842 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8843 NDR_PULL_ALLOC(ndr, r->in.handle);
8845 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8846 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8847 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8848 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8849 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8850 NDR_PULL_ALLOC(ndr, r->in.sid);
8852 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8853 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8854 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8855 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8856 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8857 NDR_PULL_ALLOC(ndr, r->in.rights);
8859 _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
8860 NDR_PULL_SET_MEM_CTX(ndr, r->in.rights, LIBNDR_FLAG_REF_ALLOC);
8861 NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
8862 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_0, LIBNDR_FLAG_REF_ALLOC);
8864 if (flags & NDR_OUT) {
8865 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8867 return NDR_ERR_SUCCESS;
8870 _PUBLIC_ void ndr_print_lsa_AddAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddAccountRights *r)
8872 ndr_print_struct(ndr, name, "lsa_AddAccountRights");
8873 ndr->depth++;
8874 if (flags & NDR_SET_VALUES) {
8875 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8877 if (flags & NDR_IN) {
8878 ndr_print_struct(ndr, "in", "lsa_AddAccountRights");
8879 ndr->depth++;
8880 ndr_print_ptr(ndr, "handle", r->in.handle);
8881 ndr->depth++;
8882 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8883 ndr->depth--;
8884 ndr_print_ptr(ndr, "sid", r->in.sid);
8885 ndr->depth++;
8886 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
8887 ndr->depth--;
8888 ndr_print_ptr(ndr, "rights", r->in.rights);
8889 ndr->depth++;
8890 ndr_print_lsa_RightSet(ndr, "rights", r->in.rights);
8891 ndr->depth--;
8892 ndr->depth--;
8894 if (flags & NDR_OUT) {
8895 ndr_print_struct(ndr, "out", "lsa_AddAccountRights");
8896 ndr->depth++;
8897 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8898 ndr->depth--;
8900 ndr->depth--;
8903 static enum ndr_err_code ndr_push_lsa_RemoveAccountRights(struct ndr_push *ndr, int flags, const struct lsa_RemoveAccountRights *r)
8905 if (flags & NDR_IN) {
8906 if (r->in.handle == NULL) {
8907 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8909 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8910 if (r->in.sid == NULL) {
8911 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8913 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8914 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.remove_all));
8915 if (r->in.rights == NULL) {
8916 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8918 NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
8920 if (flags & NDR_OUT) {
8921 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8923 return NDR_ERR_SUCCESS;
8926 static enum ndr_err_code ndr_pull_lsa_RemoveAccountRights(struct ndr_pull *ndr, int flags, struct lsa_RemoveAccountRights *r)
8928 TALLOC_CTX *_mem_save_handle_0;
8929 TALLOC_CTX *_mem_save_sid_0;
8930 TALLOC_CTX *_mem_save_rights_0;
8931 if (flags & NDR_IN) {
8932 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8933 NDR_PULL_ALLOC(ndr, r->in.handle);
8935 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8936 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8937 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8938 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8939 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8940 NDR_PULL_ALLOC(ndr, r->in.sid);
8942 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8943 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8944 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8945 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8946 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.remove_all));
8947 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8948 NDR_PULL_ALLOC(ndr, r->in.rights);
8950 _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
8951 NDR_PULL_SET_MEM_CTX(ndr, r->in.rights, LIBNDR_FLAG_REF_ALLOC);
8952 NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
8953 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_0, LIBNDR_FLAG_REF_ALLOC);
8955 if (flags & NDR_OUT) {
8956 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8958 return NDR_ERR_SUCCESS;
8961 _PUBLIC_ void ndr_print_lsa_RemoveAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemoveAccountRights *r)
8963 ndr_print_struct(ndr, name, "lsa_RemoveAccountRights");
8964 ndr->depth++;
8965 if (flags & NDR_SET_VALUES) {
8966 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8968 if (flags & NDR_IN) {
8969 ndr_print_struct(ndr, "in", "lsa_RemoveAccountRights");
8970 ndr->depth++;
8971 ndr_print_ptr(ndr, "handle", r->in.handle);
8972 ndr->depth++;
8973 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8974 ndr->depth--;
8975 ndr_print_ptr(ndr, "sid", r->in.sid);
8976 ndr->depth++;
8977 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
8978 ndr->depth--;
8979 ndr_print_uint8(ndr, "remove_all", r->in.remove_all);
8980 ndr_print_ptr(ndr, "rights", r->in.rights);
8981 ndr->depth++;
8982 ndr_print_lsa_RightSet(ndr, "rights", r->in.rights);
8983 ndr->depth--;
8984 ndr->depth--;
8986 if (flags & NDR_OUT) {
8987 ndr_print_struct(ndr, "out", "lsa_RemoveAccountRights");
8988 ndr->depth++;
8989 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8990 ndr->depth--;
8992 ndr->depth--;
8995 static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfoBySid(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r)
8997 if (flags & NDR_IN) {
8998 if (r->in.handle == NULL) {
8999 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9001 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9002 if (r->in.dom_sid == NULL) {
9003 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9005 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9006 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
9008 if (flags & NDR_OUT) {
9009 if (r->out.info == NULL) {
9010 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9012 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
9013 if (*r->out.info) {
9014 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
9015 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9017 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9019 return NDR_ERR_SUCCESS;
9022 static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfoBySid(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoBySid *r)
9024 uint32_t _ptr_info;
9025 TALLOC_CTX *_mem_save_handle_0;
9026 TALLOC_CTX *_mem_save_dom_sid_0;
9027 TALLOC_CTX *_mem_save_info_0;
9028 TALLOC_CTX *_mem_save_info_1;
9029 if (flags & NDR_IN) {
9030 ZERO_STRUCT(r->out);
9032 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9033 NDR_PULL_ALLOC(ndr, r->in.handle);
9035 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9036 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9037 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9038 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9039 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9040 NDR_PULL_ALLOC(ndr, r->in.dom_sid);
9042 _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9043 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
9044 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9045 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC);
9046 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
9047 NDR_PULL_ALLOC(ndr, r->out.info);
9048 ZERO_STRUCTP(r->out.info);
9050 if (flags & NDR_OUT) {
9051 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9052 NDR_PULL_ALLOC(ndr, r->out.info);
9054 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9055 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9056 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
9057 if (_ptr_info) {
9058 NDR_PULL_ALLOC(ndr, *r->out.info);
9059 } else {
9060 *r->out.info = NULL;
9062 if (*r->out.info) {
9063 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
9064 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
9065 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
9066 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9067 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
9069 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9070 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9072 return NDR_ERR_SUCCESS;
9075 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r)
9077 ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfoBySid");
9078 ndr->depth++;
9079 if (flags & NDR_SET_VALUES) {
9080 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9082 if (flags & NDR_IN) {
9083 ndr_print_struct(ndr, "in", "lsa_QueryTrustedDomainInfoBySid");
9084 ndr->depth++;
9085 ndr_print_ptr(ndr, "handle", r->in.handle);
9086 ndr->depth++;
9087 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9088 ndr->depth--;
9089 ndr_print_ptr(ndr, "dom_sid", r->in.dom_sid);
9090 ndr->depth++;
9091 ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
9092 ndr->depth--;
9093 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
9094 ndr->depth--;
9096 if (flags & NDR_OUT) {
9097 ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfoBySid");
9098 ndr->depth++;
9099 ndr_print_ptr(ndr, "info", r->out.info);
9100 ndr->depth++;
9101 ndr_print_ptr(ndr, "info", *r->out.info);
9102 ndr->depth++;
9103 if (*r->out.info) {
9104 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
9105 ndr_print_lsa_TrustedDomainInfo(ndr, "info", *r->out.info);
9107 ndr->depth--;
9108 ndr->depth--;
9109 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9110 ndr->depth--;
9112 ndr->depth--;
9115 static enum ndr_err_code ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfo *r)
9117 if (flags & NDR_IN) {
9118 if (r->in.handle == NULL) {
9119 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9121 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9122 if (r->in.dom_sid == NULL) {
9123 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9125 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9126 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
9127 if (r->in.info == NULL) {
9128 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9130 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
9131 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9133 if (flags & NDR_OUT) {
9134 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9136 return NDR_ERR_SUCCESS;
9139 static enum ndr_err_code ndr_pull_lsa_SetTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfo *r)
9141 TALLOC_CTX *_mem_save_handle_0;
9142 TALLOC_CTX *_mem_save_dom_sid_0;
9143 TALLOC_CTX *_mem_save_info_0;
9144 if (flags & NDR_IN) {
9145 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9146 NDR_PULL_ALLOC(ndr, r->in.handle);
9148 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9149 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9150 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9151 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9152 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9153 NDR_PULL_ALLOC(ndr, r->in.dom_sid);
9155 _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9156 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
9157 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9158 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC);
9159 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
9160 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9161 NDR_PULL_ALLOC(ndr, r->in.info);
9163 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9164 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
9165 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
9166 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9167 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9169 if (flags & NDR_OUT) {
9170 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9172 return NDR_ERR_SUCCESS;
9175 _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfo *r)
9177 ndr_print_struct(ndr, name, "lsa_SetTrustedDomainInfo");
9178 ndr->depth++;
9179 if (flags & NDR_SET_VALUES) {
9180 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9182 if (flags & NDR_IN) {
9183 ndr_print_struct(ndr, "in", "lsa_SetTrustedDomainInfo");
9184 ndr->depth++;
9185 ndr_print_ptr(ndr, "handle", r->in.handle);
9186 ndr->depth++;
9187 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9188 ndr->depth--;
9189 ndr_print_ptr(ndr, "dom_sid", r->in.dom_sid);
9190 ndr->depth++;
9191 ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
9192 ndr->depth--;
9193 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
9194 ndr_print_ptr(ndr, "info", r->in.info);
9195 ndr->depth++;
9196 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
9197 ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
9198 ndr->depth--;
9199 ndr->depth--;
9201 if (flags & NDR_OUT) {
9202 ndr_print_struct(ndr, "out", "lsa_SetTrustedDomainInfo");
9203 ndr->depth++;
9204 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9205 ndr->depth--;
9207 ndr->depth--;
9210 static enum ndr_err_code ndr_push_lsa_DeleteTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_DeleteTrustedDomain *r)
9212 if (flags & NDR_IN) {
9213 if (r->in.handle == NULL) {
9214 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9216 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9217 if (r->in.dom_sid == NULL) {
9218 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9220 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9222 if (flags & NDR_OUT) {
9223 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9225 return NDR_ERR_SUCCESS;
9228 static enum ndr_err_code ndr_pull_lsa_DeleteTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_DeleteTrustedDomain *r)
9230 TALLOC_CTX *_mem_save_handle_0;
9231 TALLOC_CTX *_mem_save_dom_sid_0;
9232 if (flags & NDR_IN) {
9233 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9234 NDR_PULL_ALLOC(ndr, r->in.handle);
9236 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9237 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9238 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9239 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9240 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9241 NDR_PULL_ALLOC(ndr, r->in.dom_sid);
9243 _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9244 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
9245 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9246 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC);
9248 if (flags & NDR_OUT) {
9249 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9251 return NDR_ERR_SUCCESS;
9254 _PUBLIC_ void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteTrustedDomain *r)
9256 ndr_print_struct(ndr, name, "lsa_DeleteTrustedDomain");
9257 ndr->depth++;
9258 if (flags & NDR_SET_VALUES) {
9259 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9261 if (flags & NDR_IN) {
9262 ndr_print_struct(ndr, "in", "lsa_DeleteTrustedDomain");
9263 ndr->depth++;
9264 ndr_print_ptr(ndr, "handle", r->in.handle);
9265 ndr->depth++;
9266 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9267 ndr->depth--;
9268 ndr_print_ptr(ndr, "dom_sid", r->in.dom_sid);
9269 ndr->depth++;
9270 ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
9271 ndr->depth--;
9272 ndr->depth--;
9274 if (flags & NDR_OUT) {
9275 ndr_print_struct(ndr, "out", "lsa_DeleteTrustedDomain");
9276 ndr->depth++;
9277 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9278 ndr->depth--;
9280 ndr->depth--;
9283 static enum ndr_err_code ndr_push_lsa_StorePrivateData(struct ndr_push *ndr, int flags, const struct lsa_StorePrivateData *r)
9285 if (flags & NDR_IN) {
9286 if (r->in.handle == NULL) {
9287 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9289 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9290 if (r->in.name == NULL) {
9291 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9293 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
9294 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.val));
9295 if (r->in.val) {
9296 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.val));
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 uint32_t _ptr_val;
9308 TALLOC_CTX *_mem_save_handle_0;
9309 TALLOC_CTX *_mem_save_name_0;
9310 TALLOC_CTX *_mem_save_val_0;
9311 if (flags & NDR_IN) {
9312 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9313 NDR_PULL_ALLOC(ndr, r->in.handle);
9315 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9316 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9317 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9318 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9319 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9320 NDR_PULL_ALLOC(ndr, r->in.name);
9322 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9323 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
9324 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
9325 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
9326 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_val));
9327 if (_ptr_val) {
9328 NDR_PULL_ALLOC(ndr, r->in.val);
9329 } else {
9330 r->in.val = NULL;
9332 if (r->in.val) {
9333 _mem_save_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
9334 NDR_PULL_SET_MEM_CTX(ndr, r->in.val, 0);
9335 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.val));
9336 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_0, 0);
9339 if (flags & NDR_OUT) {
9340 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9342 return NDR_ERR_SUCCESS;
9345 _PUBLIC_ void ndr_print_lsa_StorePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_StorePrivateData *r)
9347 ndr_print_struct(ndr, name, "lsa_StorePrivateData");
9348 ndr->depth++;
9349 if (flags & NDR_SET_VALUES) {
9350 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9352 if (flags & NDR_IN) {
9353 ndr_print_struct(ndr, "in", "lsa_StorePrivateData");
9354 ndr->depth++;
9355 ndr_print_ptr(ndr, "handle", r->in.handle);
9356 ndr->depth++;
9357 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9358 ndr->depth--;
9359 ndr_print_ptr(ndr, "name", r->in.name);
9360 ndr->depth++;
9361 ndr_print_lsa_String(ndr, "name", r->in.name);
9362 ndr->depth--;
9363 ndr_print_ptr(ndr, "val", r->in.val);
9364 ndr->depth++;
9365 if (r->in.val) {
9366 ndr_print_lsa_DATA_BUF(ndr, "val", r->in.val);
9368 ndr->depth--;
9369 ndr->depth--;
9371 if (flags & NDR_OUT) {
9372 ndr_print_struct(ndr, "out", "lsa_StorePrivateData");
9373 ndr->depth++;
9374 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9375 ndr->depth--;
9377 ndr->depth--;
9380 static enum ndr_err_code ndr_push_lsa_RetrievePrivateData(struct ndr_push *ndr, int flags, const struct lsa_RetrievePrivateData *r)
9382 if (flags & NDR_IN) {
9383 if (r->in.handle == NULL) {
9384 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9386 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9387 if (r->in.name == NULL) {
9388 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9390 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
9391 if (r->in.val == NULL) {
9392 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9394 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.val));
9395 if (*r->in.val) {
9396 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.val));
9399 if (flags & NDR_OUT) {
9400 if (r->out.val == NULL) {
9401 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9403 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.val));
9404 if (*r->out.val) {
9405 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.val));
9407 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9409 return NDR_ERR_SUCCESS;
9412 static enum ndr_err_code ndr_pull_lsa_RetrievePrivateData(struct ndr_pull *ndr, int flags, struct lsa_RetrievePrivateData *r)
9414 uint32_t _ptr_val;
9415 TALLOC_CTX *_mem_save_handle_0;
9416 TALLOC_CTX *_mem_save_name_0;
9417 TALLOC_CTX *_mem_save_val_0;
9418 TALLOC_CTX *_mem_save_val_1;
9419 if (flags & NDR_IN) {
9420 ZERO_STRUCT(r->out);
9422 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9423 NDR_PULL_ALLOC(ndr, r->in.handle);
9425 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9426 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9427 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9428 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9429 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9430 NDR_PULL_ALLOC(ndr, r->in.name);
9432 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9433 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
9434 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
9435 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
9436 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9437 NDR_PULL_ALLOC(ndr, r->in.val);
9439 _mem_save_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
9440 NDR_PULL_SET_MEM_CTX(ndr, r->in.val, LIBNDR_FLAG_REF_ALLOC);
9441 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_val));
9442 if (_ptr_val) {
9443 NDR_PULL_ALLOC(ndr, *r->in.val);
9444 } else {
9445 *r->in.val = NULL;
9447 if (*r->in.val) {
9448 _mem_save_val_1 = NDR_PULL_GET_MEM_CTX(ndr);
9449 NDR_PULL_SET_MEM_CTX(ndr, *r->in.val, 0);
9450 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.val));
9451 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_1, 0);
9453 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_0, LIBNDR_FLAG_REF_ALLOC);
9454 NDR_PULL_ALLOC(ndr, r->out.val);
9455 *r->out.val = *r->in.val;
9457 if (flags & NDR_OUT) {
9458 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9459 NDR_PULL_ALLOC(ndr, r->out.val);
9461 _mem_save_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
9462 NDR_PULL_SET_MEM_CTX(ndr, r->out.val, LIBNDR_FLAG_REF_ALLOC);
9463 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_val));
9464 if (_ptr_val) {
9465 NDR_PULL_ALLOC(ndr, *r->out.val);
9466 } else {
9467 *r->out.val = NULL;
9469 if (*r->out.val) {
9470 _mem_save_val_1 = NDR_PULL_GET_MEM_CTX(ndr);
9471 NDR_PULL_SET_MEM_CTX(ndr, *r->out.val, 0);
9472 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.val));
9473 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_1, 0);
9475 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_val_0, LIBNDR_FLAG_REF_ALLOC);
9476 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9478 return NDR_ERR_SUCCESS;
9481 _PUBLIC_ void ndr_print_lsa_RetrievePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RetrievePrivateData *r)
9483 ndr_print_struct(ndr, name, "lsa_RetrievePrivateData");
9484 ndr->depth++;
9485 if (flags & NDR_SET_VALUES) {
9486 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9488 if (flags & NDR_IN) {
9489 ndr_print_struct(ndr, "in", "lsa_RetrievePrivateData");
9490 ndr->depth++;
9491 ndr_print_ptr(ndr, "handle", r->in.handle);
9492 ndr->depth++;
9493 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9494 ndr->depth--;
9495 ndr_print_ptr(ndr, "name", r->in.name);
9496 ndr->depth++;
9497 ndr_print_lsa_String(ndr, "name", r->in.name);
9498 ndr->depth--;
9499 ndr_print_ptr(ndr, "val", r->in.val);
9500 ndr->depth++;
9501 ndr_print_ptr(ndr, "val", *r->in.val);
9502 ndr->depth++;
9503 if (*r->in.val) {
9504 ndr_print_lsa_DATA_BUF(ndr, "val", *r->in.val);
9506 ndr->depth--;
9507 ndr->depth--;
9508 ndr->depth--;
9510 if (flags & NDR_OUT) {
9511 ndr_print_struct(ndr, "out", "lsa_RetrievePrivateData");
9512 ndr->depth++;
9513 ndr_print_ptr(ndr, "val", r->out.val);
9514 ndr->depth++;
9515 ndr_print_ptr(ndr, "val", *r->out.val);
9516 ndr->depth++;
9517 if (*r->out.val) {
9518 ndr_print_lsa_DATA_BUF(ndr, "val", *r->out.val);
9520 ndr->depth--;
9521 ndr->depth--;
9522 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9523 ndr->depth--;
9525 ndr->depth--;
9528 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy2 *r)
9530 if (flags & NDR_IN) {
9531 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
9532 if (r->in.system_name) {
9533 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9534 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9535 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9536 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));
9538 if (r->in.attr == NULL) {
9539 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9541 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
9542 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
9544 if (flags & NDR_OUT) {
9545 if (r->out.handle == NULL) {
9546 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9548 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
9549 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9551 return NDR_ERR_SUCCESS;
9554 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy2 *r)
9556 uint32_t _ptr_system_name;
9557 TALLOC_CTX *_mem_save_system_name_0;
9558 TALLOC_CTX *_mem_save_attr_0;
9559 TALLOC_CTX *_mem_save_handle_0;
9560 if (flags & NDR_IN) {
9561 ZERO_STRUCT(r->out);
9563 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
9564 if (_ptr_system_name) {
9565 NDR_PULL_ALLOC(ndr, r->in.system_name);
9566 } else {
9567 r->in.system_name = NULL;
9569 if (r->in.system_name) {
9570 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9571 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
9572 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
9573 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
9574 if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
9575 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name));
9577 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
9578 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16));
9579 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
9581 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9582 NDR_PULL_ALLOC(ndr, r->in.attr);
9584 _mem_save_attr_0 = NDR_PULL_GET_MEM_CTX(ndr);
9585 NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC);
9586 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
9587 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC);
9588 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
9589 NDR_PULL_ALLOC(ndr, r->out.handle);
9590 ZERO_STRUCTP(r->out.handle);
9592 if (flags & NDR_OUT) {
9593 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9594 NDR_PULL_ALLOC(ndr, r->out.handle);
9596 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9597 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
9598 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
9599 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9600 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9602 return NDR_ERR_SUCCESS;
9605 _PUBLIC_ void ndr_print_lsa_OpenPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy2 *r)
9607 ndr_print_struct(ndr, name, "lsa_OpenPolicy2");
9608 ndr->depth++;
9609 if (flags & NDR_SET_VALUES) {
9610 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9612 if (flags & NDR_IN) {
9613 ndr_print_struct(ndr, "in", "lsa_OpenPolicy2");
9614 ndr->depth++;
9615 ndr_print_ptr(ndr, "system_name", r->in.system_name);
9616 ndr->depth++;
9617 if (r->in.system_name) {
9618 ndr_print_string(ndr, "system_name", r->in.system_name);
9620 ndr->depth--;
9621 ndr_print_ptr(ndr, "attr", r->in.attr);
9622 ndr->depth++;
9623 ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr);
9624 ndr->depth--;
9625 ndr_print_lsa_PolicyAccessMask(ndr, "access_mask", r->in.access_mask);
9626 ndr->depth--;
9628 if (flags & NDR_OUT) {
9629 ndr_print_struct(ndr, "out", "lsa_OpenPolicy2");
9630 ndr->depth++;
9631 ndr_print_ptr(ndr, "handle", r->out.handle);
9632 ndr->depth++;
9633 ndr_print_policy_handle(ndr, "handle", r->out.handle);
9634 ndr->depth--;
9635 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9636 ndr->depth--;
9638 ndr->depth--;
9641 static enum ndr_err_code ndr_push_lsa_GetUserName(struct ndr_push *ndr, int flags, const struct lsa_GetUserName *r)
9643 if (flags & NDR_IN) {
9644 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
9645 if (r->in.system_name) {
9646 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9647 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9648 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9649 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));
9651 if (r->in.account_name == NULL) {
9652 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9654 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.account_name));
9655 if (*r->in.account_name) {
9656 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.account_name));
9658 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.authority_name));
9659 if (r->in.authority_name) {
9660 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.authority_name));
9661 if (*r->in.authority_name) {
9662 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.authority_name));
9666 if (flags & NDR_OUT) {
9667 if (r->out.account_name == NULL) {
9668 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9670 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.account_name));
9671 if (*r->out.account_name) {
9672 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.account_name));
9674 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.authority_name));
9675 if (r->out.authority_name) {
9676 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.authority_name));
9677 if (*r->out.authority_name) {
9678 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.authority_name));
9681 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9683 return NDR_ERR_SUCCESS;
9686 static enum ndr_err_code ndr_pull_lsa_GetUserName(struct ndr_pull *ndr, int flags, struct lsa_GetUserName *r)
9688 uint32_t _ptr_system_name;
9689 uint32_t _ptr_account_name;
9690 uint32_t _ptr_authority_name;
9691 TALLOC_CTX *_mem_save_system_name_0;
9692 TALLOC_CTX *_mem_save_account_name_0;
9693 TALLOC_CTX *_mem_save_account_name_1;
9694 TALLOC_CTX *_mem_save_authority_name_0;
9695 TALLOC_CTX *_mem_save_authority_name_1;
9696 if (flags & NDR_IN) {
9697 ZERO_STRUCT(r->out);
9699 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
9700 if (_ptr_system_name) {
9701 NDR_PULL_ALLOC(ndr, r->in.system_name);
9702 } else {
9703 r->in.system_name = NULL;
9705 if (r->in.system_name) {
9706 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9707 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
9708 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
9709 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
9710 if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
9711 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name));
9713 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
9714 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16));
9715 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
9717 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9718 NDR_PULL_ALLOC(ndr, r->in.account_name);
9720 _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9721 NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, LIBNDR_FLAG_REF_ALLOC);
9722 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
9723 if (_ptr_account_name) {
9724 NDR_PULL_ALLOC(ndr, *r->in.account_name);
9725 } else {
9726 *r->in.account_name = NULL;
9728 if (*r->in.account_name) {
9729 _mem_save_account_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9730 NDR_PULL_SET_MEM_CTX(ndr, *r->in.account_name, 0);
9731 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.account_name));
9732 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_1, 0);
9734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC);
9735 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9736 if (_ptr_authority_name) {
9737 NDR_PULL_ALLOC(ndr, r->in.authority_name);
9738 } else {
9739 r->in.authority_name = NULL;
9741 if (r->in.authority_name) {
9742 _mem_save_authority_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9743 NDR_PULL_SET_MEM_CTX(ndr, r->in.authority_name, 0);
9744 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9745 if (_ptr_authority_name) {
9746 NDR_PULL_ALLOC(ndr, *r->in.authority_name);
9747 } else {
9748 *r->in.authority_name = NULL;
9750 if (*r->in.authority_name) {
9751 _mem_save_authority_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9752 NDR_PULL_SET_MEM_CTX(ndr, *r->in.authority_name, 0);
9753 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.authority_name));
9754 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_1, 0);
9756 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_0, 0);
9758 NDR_PULL_ALLOC(ndr, r->out.account_name);
9759 *r->out.account_name = *r->in.account_name;
9761 if (flags & NDR_OUT) {
9762 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9763 NDR_PULL_ALLOC(ndr, r->out.account_name);
9765 _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9766 NDR_PULL_SET_MEM_CTX(ndr, r->out.account_name, LIBNDR_FLAG_REF_ALLOC);
9767 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
9768 if (_ptr_account_name) {
9769 NDR_PULL_ALLOC(ndr, *r->out.account_name);
9770 } else {
9771 *r->out.account_name = NULL;
9773 if (*r->out.account_name) {
9774 _mem_save_account_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9775 NDR_PULL_SET_MEM_CTX(ndr, *r->out.account_name, 0);
9776 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.account_name));
9777 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_1, 0);
9779 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC);
9780 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9781 if (_ptr_authority_name) {
9782 NDR_PULL_ALLOC(ndr, r->out.authority_name);
9783 } else {
9784 r->out.authority_name = NULL;
9786 if (r->out.authority_name) {
9787 _mem_save_authority_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9788 NDR_PULL_SET_MEM_CTX(ndr, r->out.authority_name, 0);
9789 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9790 if (_ptr_authority_name) {
9791 NDR_PULL_ALLOC(ndr, *r->out.authority_name);
9792 } else {
9793 *r->out.authority_name = NULL;
9795 if (*r->out.authority_name) {
9796 _mem_save_authority_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9797 NDR_PULL_SET_MEM_CTX(ndr, *r->out.authority_name, 0);
9798 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.authority_name));
9799 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_1, 0);
9801 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_0, 0);
9803 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9805 return NDR_ERR_SUCCESS;
9808 _PUBLIC_ void ndr_print_lsa_GetUserName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetUserName *r)
9810 ndr_print_struct(ndr, name, "lsa_GetUserName");
9811 ndr->depth++;
9812 if (flags & NDR_SET_VALUES) {
9813 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9815 if (flags & NDR_IN) {
9816 ndr_print_struct(ndr, "in", "lsa_GetUserName");
9817 ndr->depth++;
9818 ndr_print_ptr(ndr, "system_name", r->in.system_name);
9819 ndr->depth++;
9820 if (r->in.system_name) {
9821 ndr_print_string(ndr, "system_name", r->in.system_name);
9823 ndr->depth--;
9824 ndr_print_ptr(ndr, "account_name", r->in.account_name);
9825 ndr->depth++;
9826 ndr_print_ptr(ndr, "account_name", *r->in.account_name);
9827 ndr->depth++;
9828 if (*r->in.account_name) {
9829 ndr_print_lsa_String(ndr, "account_name", *r->in.account_name);
9831 ndr->depth--;
9832 ndr->depth--;
9833 ndr_print_ptr(ndr, "authority_name", r->in.authority_name);
9834 ndr->depth++;
9835 if (r->in.authority_name) {
9836 ndr_print_ptr(ndr, "authority_name", *r->in.authority_name);
9837 ndr->depth++;
9838 if (*r->in.authority_name) {
9839 ndr_print_lsa_String(ndr, "authority_name", *r->in.authority_name);
9841 ndr->depth--;
9843 ndr->depth--;
9844 ndr->depth--;
9846 if (flags & NDR_OUT) {
9847 ndr_print_struct(ndr, "out", "lsa_GetUserName");
9848 ndr->depth++;
9849 ndr_print_ptr(ndr, "account_name", r->out.account_name);
9850 ndr->depth++;
9851 ndr_print_ptr(ndr, "account_name", *r->out.account_name);
9852 ndr->depth++;
9853 if (*r->out.account_name) {
9854 ndr_print_lsa_String(ndr, "account_name", *r->out.account_name);
9856 ndr->depth--;
9857 ndr->depth--;
9858 ndr_print_ptr(ndr, "authority_name", r->out.authority_name);
9859 ndr->depth++;
9860 if (r->out.authority_name) {
9861 ndr_print_ptr(ndr, "authority_name", *r->out.authority_name);
9862 ndr->depth++;
9863 if (*r->out.authority_name) {
9864 ndr_print_lsa_String(ndr, "authority_name", *r->out.authority_name);
9866 ndr->depth--;
9868 ndr->depth--;
9869 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9870 ndr->depth--;
9872 ndr->depth--;
9875 static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy2(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy2 *r)
9877 if (flags & NDR_IN) {
9878 if (r->in.handle == NULL) {
9879 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9881 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9882 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
9884 if (flags & NDR_OUT) {
9885 if (r->out.info == NULL) {
9886 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9888 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
9889 if (*r->out.info) {
9890 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
9891 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9893 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9895 return NDR_ERR_SUCCESS;
9898 static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy2 *r)
9900 uint32_t _ptr_info;
9901 TALLOC_CTX *_mem_save_handle_0;
9902 TALLOC_CTX *_mem_save_info_0;
9903 TALLOC_CTX *_mem_save_info_1;
9904 if (flags & NDR_IN) {
9905 ZERO_STRUCT(r->out);
9907 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9908 NDR_PULL_ALLOC(ndr, r->in.handle);
9910 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9911 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9912 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9913 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9914 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
9915 NDR_PULL_ALLOC(ndr, r->out.info);
9916 ZERO_STRUCTP(r->out.info);
9918 if (flags & NDR_OUT) {
9919 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9920 NDR_PULL_ALLOC(ndr, r->out.info);
9922 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9923 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9924 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
9925 if (_ptr_info) {
9926 NDR_PULL_ALLOC(ndr, *r->out.info);
9927 } else {
9928 *r->out.info = NULL;
9930 if (*r->out.info) {
9931 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
9932 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
9933 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
9934 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9935 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
9937 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9938 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9940 return NDR_ERR_SUCCESS;
9943 _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy2 *r)
9945 ndr_print_struct(ndr, name, "lsa_QueryInfoPolicy2");
9946 ndr->depth++;
9947 if (flags & NDR_SET_VALUES) {
9948 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9950 if (flags & NDR_IN) {
9951 ndr_print_struct(ndr, "in", "lsa_QueryInfoPolicy2");
9952 ndr->depth++;
9953 ndr_print_ptr(ndr, "handle", r->in.handle);
9954 ndr->depth++;
9955 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9956 ndr->depth--;
9957 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
9958 ndr->depth--;
9960 if (flags & NDR_OUT) {
9961 ndr_print_struct(ndr, "out", "lsa_QueryInfoPolicy2");
9962 ndr->depth++;
9963 ndr_print_ptr(ndr, "info", r->out.info);
9964 ndr->depth++;
9965 ndr_print_ptr(ndr, "info", *r->out.info);
9966 ndr->depth++;
9967 if (*r->out.info) {
9968 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
9969 ndr_print_lsa_PolicyInformation(ndr, "info", *r->out.info);
9971 ndr->depth--;
9972 ndr->depth--;
9973 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9974 ndr->depth--;
9976 ndr->depth--;
9979 static enum ndr_err_code ndr_push_lsa_SetInfoPolicy2(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy2 *r)
9981 if (flags & NDR_IN) {
9982 if (r->in.handle == NULL) {
9983 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9985 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9986 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
9987 if (r->in.info == NULL) {
9988 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9990 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
9991 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9993 if (flags & NDR_OUT) {
9994 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9996 return NDR_ERR_SUCCESS;
9999 static enum ndr_err_code ndr_pull_lsa_SetInfoPolicy2(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy2 *r)
10001 TALLOC_CTX *_mem_save_handle_0;
10002 TALLOC_CTX *_mem_save_info_0;
10003 if (flags & NDR_IN) {
10004 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10005 NDR_PULL_ALLOC(ndr, r->in.handle);
10007 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10008 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10009 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10010 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10011 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
10012 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10013 NDR_PULL_ALLOC(ndr, r->in.info);
10015 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10016 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
10017 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
10018 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10019 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10021 if (flags & NDR_OUT) {
10022 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10024 return NDR_ERR_SUCCESS;
10027 _PUBLIC_ void ndr_print_lsa_SetInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy2 *r)
10029 ndr_print_struct(ndr, name, "lsa_SetInfoPolicy2");
10030 ndr->depth++;
10031 if (flags & NDR_SET_VALUES) {
10032 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10034 if (flags & NDR_IN) {
10035 ndr_print_struct(ndr, "in", "lsa_SetInfoPolicy2");
10036 ndr->depth++;
10037 ndr_print_ptr(ndr, "handle", r->in.handle);
10038 ndr->depth++;
10039 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10040 ndr->depth--;
10041 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
10042 ndr_print_ptr(ndr, "info", r->in.info);
10043 ndr->depth++;
10044 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
10045 ndr_print_lsa_PolicyInformation(ndr, "info", r->in.info);
10046 ndr->depth--;
10047 ndr->depth--;
10049 if (flags & NDR_OUT) {
10050 ndr_print_struct(ndr, "out", "lsa_SetInfoPolicy2");
10051 ndr->depth++;
10052 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10053 ndr->depth--;
10055 ndr->depth--;
10058 static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfoByName *r)
10060 if (flags & NDR_IN) {
10061 if (r->in.handle == NULL) {
10062 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10064 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10065 if (r->in.trusted_domain == NULL) {
10066 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10068 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain));
10069 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
10071 if (flags & NDR_OUT) {
10072 if (r->out.info == NULL) {
10073 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10075 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
10076 if (*r->out.info) {
10077 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
10078 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10080 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10082 return NDR_ERR_SUCCESS;
10085 static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoByName *r)
10087 uint32_t _ptr_info;
10088 TALLOC_CTX *_mem_save_handle_0;
10089 TALLOC_CTX *_mem_save_trusted_domain_0;
10090 TALLOC_CTX *_mem_save_info_0;
10091 TALLOC_CTX *_mem_save_info_1;
10092 if (flags & NDR_IN) {
10093 ZERO_STRUCT(r->out);
10095 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10096 NDR_PULL_ALLOC(ndr, r->in.handle);
10098 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10099 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10100 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10101 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10102 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10103 NDR_PULL_ALLOC(ndr, r->in.trusted_domain);
10105 _mem_save_trusted_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
10106 NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain, LIBNDR_FLAG_REF_ALLOC);
10107 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain));
10108 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_0, LIBNDR_FLAG_REF_ALLOC);
10109 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
10110 NDR_PULL_ALLOC(ndr, r->out.info);
10111 ZERO_STRUCTP(r->out.info);
10113 if (flags & NDR_OUT) {
10114 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10115 NDR_PULL_ALLOC(ndr, r->out.info);
10117 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10118 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10119 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10120 if (_ptr_info) {
10121 NDR_PULL_ALLOC(ndr, *r->out.info);
10122 } else {
10123 *r->out.info = NULL;
10125 if (*r->out.info) {
10126 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
10127 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
10128 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
10129 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10130 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
10132 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10133 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10135 return NDR_ERR_SUCCESS;
10138 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoByName *r)
10140 ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfoByName");
10141 ndr->depth++;
10142 if (flags & NDR_SET_VALUES) {
10143 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10145 if (flags & NDR_IN) {
10146 ndr_print_struct(ndr, "in", "lsa_QueryTrustedDomainInfoByName");
10147 ndr->depth++;
10148 ndr_print_ptr(ndr, "handle", r->in.handle);
10149 ndr->depth++;
10150 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10151 ndr->depth--;
10152 ndr_print_ptr(ndr, "trusted_domain", r->in.trusted_domain);
10153 ndr->depth++;
10154 ndr_print_lsa_String(ndr, "trusted_domain", r->in.trusted_domain);
10155 ndr->depth--;
10156 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
10157 ndr->depth--;
10159 if (flags & NDR_OUT) {
10160 ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfoByName");
10161 ndr->depth++;
10162 ndr_print_ptr(ndr, "info", r->out.info);
10163 ndr->depth++;
10164 ndr_print_ptr(ndr, "info", *r->out.info);
10165 ndr->depth++;
10166 if (*r->out.info) {
10167 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
10168 ndr_print_lsa_TrustedDomainInfo(ndr, "info", *r->out.info);
10170 ndr->depth--;
10171 ndr->depth--;
10172 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10173 ndr->depth--;
10175 ndr->depth--;
10178 static enum ndr_err_code ndr_push_lsa_SetTrustedDomainInfoByName(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfoByName *r)
10180 if (flags & NDR_IN) {
10181 if (r->in.handle == NULL) {
10182 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10184 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10185 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain));
10186 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
10187 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
10188 if (r->in.info) {
10189 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
10190 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10193 if (flags & NDR_OUT) {
10194 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10196 return NDR_ERR_SUCCESS;
10199 static enum ndr_err_code ndr_pull_lsa_SetTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfoByName *r)
10201 uint32_t _ptr_info;
10202 TALLOC_CTX *_mem_save_handle_0;
10203 TALLOC_CTX *_mem_save_info_0;
10204 if (flags & NDR_IN) {
10205 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10206 NDR_PULL_ALLOC(ndr, r->in.handle);
10208 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10209 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10210 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10211 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10212 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain));
10213 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
10214 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10215 if (_ptr_info) {
10216 NDR_PULL_ALLOC(ndr, r->in.info);
10217 } else {
10218 r->in.info = NULL;
10220 if (r->in.info) {
10221 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10222 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
10223 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
10224 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10225 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
10228 if (flags & NDR_OUT) {
10229 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10231 return NDR_ERR_SUCCESS;
10234 _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfoByName *r)
10236 ndr_print_struct(ndr, name, "lsa_SetTrustedDomainInfoByName");
10237 ndr->depth++;
10238 if (flags & NDR_SET_VALUES) {
10239 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10241 if (flags & NDR_IN) {
10242 ndr_print_struct(ndr, "in", "lsa_SetTrustedDomainInfoByName");
10243 ndr->depth++;
10244 ndr_print_ptr(ndr, "handle", r->in.handle);
10245 ndr->depth++;
10246 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10247 ndr->depth--;
10248 ndr_print_lsa_String(ndr, "trusted_domain", &r->in.trusted_domain);
10249 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
10250 ndr_print_ptr(ndr, "info", r->in.info);
10251 ndr->depth++;
10252 if (r->in.info) {
10253 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
10254 ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
10256 ndr->depth--;
10257 ndr->depth--;
10259 if (flags & NDR_OUT) {
10260 ndr_print_struct(ndr, "out", "lsa_SetTrustedDomainInfoByName");
10261 ndr->depth++;
10262 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10263 ndr->depth--;
10265 ndr->depth--;
10268 static enum ndr_err_code ndr_push_lsa_EnumTrustedDomainsEx(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustedDomainsEx *r)
10270 if (flags & NDR_IN) {
10271 if (r->in.handle == NULL) {
10272 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10274 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10275 if (r->in.resume_handle == NULL) {
10276 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10278 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
10279 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
10281 if (flags & NDR_OUT) {
10282 if (r->out.resume_handle == NULL) {
10283 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
10286 if (r->out.domains == NULL) {
10287 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10289 NDR_CHECK(ndr_push_lsa_DomainListEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
10290 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10292 return NDR_ERR_SUCCESS;
10295 static enum ndr_err_code ndr_pull_lsa_EnumTrustedDomainsEx(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustedDomainsEx *r)
10297 TALLOC_CTX *_mem_save_handle_0;
10298 TALLOC_CTX *_mem_save_resume_handle_0;
10299 TALLOC_CTX *_mem_save_domains_0;
10300 if (flags & NDR_IN) {
10301 ZERO_STRUCT(r->out);
10303 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10304 NDR_PULL_ALLOC(ndr, r->in.handle);
10306 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10307 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10308 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10309 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10310 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10311 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
10313 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10314 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
10315 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
10316 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
10317 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
10318 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
10319 *r->out.resume_handle = *r->in.resume_handle;
10320 NDR_PULL_ALLOC(ndr, r->out.domains);
10321 ZERO_STRUCTP(r->out.domains);
10323 if (flags & NDR_OUT) {
10324 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10325 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
10327 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10328 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
10329 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
10330 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
10331 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10332 NDR_PULL_ALLOC(ndr, r->out.domains);
10334 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
10335 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
10336 NDR_CHECK(ndr_pull_lsa_DomainListEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
10337 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
10338 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10340 return NDR_ERR_SUCCESS;
10343 _PUBLIC_ void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustedDomainsEx *r)
10345 ndr_print_struct(ndr, name, "lsa_EnumTrustedDomainsEx");
10346 ndr->depth++;
10347 if (flags & NDR_SET_VALUES) {
10348 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10350 if (flags & NDR_IN) {
10351 ndr_print_struct(ndr, "in", "lsa_EnumTrustedDomainsEx");
10352 ndr->depth++;
10353 ndr_print_ptr(ndr, "handle", r->in.handle);
10354 ndr->depth++;
10355 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10356 ndr->depth--;
10357 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
10358 ndr->depth++;
10359 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
10360 ndr->depth--;
10361 ndr_print_uint32(ndr, "max_size", r->in.max_size);
10362 ndr->depth--;
10364 if (flags & NDR_OUT) {
10365 ndr_print_struct(ndr, "out", "lsa_EnumTrustedDomainsEx");
10366 ndr->depth++;
10367 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
10368 ndr->depth++;
10369 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
10370 ndr->depth--;
10371 ndr_print_ptr(ndr, "domains", r->out.domains);
10372 ndr->depth++;
10373 ndr_print_lsa_DomainListEx(ndr, "domains", r->out.domains);
10374 ndr->depth--;
10375 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10376 ndr->depth--;
10378 ndr->depth--;
10381 static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx *r)
10383 if (flags & NDR_IN) {
10384 if (r->in.policy_handle == NULL) {
10385 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10387 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
10388 if (r->in.info == NULL) {
10389 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10391 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10392 if (r->in.auth_info == NULL) {
10393 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10395 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
10396 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
10398 if (flags & NDR_OUT) {
10399 if (r->out.trustdom_handle == NULL) {
10400 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10402 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10403 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10405 return NDR_ERR_SUCCESS;
10408 static enum ndr_err_code ndr_pull_lsa_CreateTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx *r)
10410 TALLOC_CTX *_mem_save_policy_handle_0;
10411 TALLOC_CTX *_mem_save_info_0;
10412 TALLOC_CTX *_mem_save_auth_info_0;
10413 TALLOC_CTX *_mem_save_trustdom_handle_0;
10414 if (flags & NDR_IN) {
10415 ZERO_STRUCT(r->out);
10417 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10418 NDR_PULL_ALLOC(ndr, r->in.policy_handle);
10420 _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10421 NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
10422 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
10423 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
10424 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10425 NDR_PULL_ALLOC(ndr, r->in.info);
10427 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10428 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
10429 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10430 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10431 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10432 NDR_PULL_ALLOC(ndr, r->in.auth_info);
10434 _mem_save_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10435 NDR_PULL_SET_MEM_CTX(ndr, r->in.auth_info, LIBNDR_FLAG_REF_ALLOC);
10436 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
10437 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_info_0, LIBNDR_FLAG_REF_ALLOC);
10438 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
10439 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10440 ZERO_STRUCTP(r->out.trustdom_handle);
10442 if (flags & NDR_OUT) {
10443 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10444 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10446 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10447 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
10448 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10449 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
10450 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10452 return NDR_ERR_SUCCESS;
10455 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx *r)
10457 ndr_print_struct(ndr, name, "lsa_CreateTrustedDomainEx");
10458 ndr->depth++;
10459 if (flags & NDR_SET_VALUES) {
10460 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10462 if (flags & NDR_IN) {
10463 ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomainEx");
10464 ndr->depth++;
10465 ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
10466 ndr->depth++;
10467 ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
10468 ndr->depth--;
10469 ndr_print_ptr(ndr, "info", r->in.info);
10470 ndr->depth++;
10471 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info", r->in.info);
10472 ndr->depth--;
10473 ndr_print_ptr(ndr, "auth_info", r->in.auth_info);
10474 ndr->depth++;
10475 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", r->in.auth_info);
10476 ndr->depth--;
10477 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
10478 ndr->depth--;
10480 if (flags & NDR_OUT) {
10481 ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomainEx");
10482 ndr->depth++;
10483 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
10484 ndr->depth++;
10485 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
10486 ndr->depth--;
10487 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10488 ndr->depth--;
10490 ndr->depth--;
10493 static enum ndr_err_code ndr_push_lsa_CloseTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CloseTrustedDomainEx *r)
10495 if (flags & NDR_IN) {
10496 if (r->in.handle == NULL) {
10497 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10499 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10501 if (flags & NDR_OUT) {
10502 if (r->out.handle == NULL) {
10503 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10505 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
10506 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10508 return NDR_ERR_SUCCESS;
10511 static enum ndr_err_code ndr_pull_lsa_CloseTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CloseTrustedDomainEx *r)
10513 TALLOC_CTX *_mem_save_handle_0;
10514 if (flags & NDR_IN) {
10515 ZERO_STRUCT(r->out);
10517 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10518 NDR_PULL_ALLOC(ndr, r->in.handle);
10520 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10521 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10522 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10523 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10524 NDR_PULL_ALLOC(ndr, r->out.handle);
10525 *r->out.handle = *r->in.handle;
10527 if (flags & NDR_OUT) {
10528 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10529 NDR_PULL_ALLOC(ndr, r->out.handle);
10531 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10532 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
10533 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
10534 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10535 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10537 return NDR_ERR_SUCCESS;
10540 _PUBLIC_ void ndr_print_lsa_CloseTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CloseTrustedDomainEx *r)
10542 ndr_print_struct(ndr, name, "lsa_CloseTrustedDomainEx");
10543 ndr->depth++;
10544 if (flags & NDR_SET_VALUES) {
10545 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10547 if (flags & NDR_IN) {
10548 ndr_print_struct(ndr, "in", "lsa_CloseTrustedDomainEx");
10549 ndr->depth++;
10550 ndr_print_ptr(ndr, "handle", r->in.handle);
10551 ndr->depth++;
10552 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10553 ndr->depth--;
10554 ndr->depth--;
10556 if (flags & NDR_OUT) {
10557 ndr_print_struct(ndr, "out", "lsa_CloseTrustedDomainEx");
10558 ndr->depth++;
10559 ndr_print_ptr(ndr, "handle", r->out.handle);
10560 ndr->depth++;
10561 ndr_print_policy_handle(ndr, "handle", r->out.handle);
10562 ndr->depth--;
10563 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10564 ndr->depth--;
10566 ndr->depth--;
10569 static enum ndr_err_code ndr_push_lsa_QueryDomainInformationPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryDomainInformationPolicy *r)
10571 if (flags & NDR_IN) {
10572 if (r->in.handle == NULL) {
10573 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10575 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10576 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10578 if (flags & NDR_OUT) {
10579 if (r->out.info == NULL) {
10580 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10582 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
10583 if (*r->out.info) {
10584 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
10585 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10587 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10589 return NDR_ERR_SUCCESS;
10592 static enum ndr_err_code ndr_pull_lsa_QueryDomainInformationPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryDomainInformationPolicy *r)
10594 uint32_t _ptr_info;
10595 TALLOC_CTX *_mem_save_handle_0;
10596 TALLOC_CTX *_mem_save_info_0;
10597 TALLOC_CTX *_mem_save_info_1;
10598 if (flags & NDR_IN) {
10599 ZERO_STRUCT(r->out);
10601 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10602 NDR_PULL_ALLOC(ndr, r->in.handle);
10604 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10605 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10606 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10607 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10608 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10609 NDR_PULL_ALLOC(ndr, r->out.info);
10610 ZERO_STRUCTP(r->out.info);
10612 if (flags & NDR_OUT) {
10613 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10614 NDR_PULL_ALLOC(ndr, r->out.info);
10616 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10617 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10618 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10619 if (_ptr_info) {
10620 NDR_PULL_ALLOC(ndr, *r->out.info);
10621 } else {
10622 *r->out.info = NULL;
10624 if (*r->out.info) {
10625 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
10626 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
10627 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
10628 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10629 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
10631 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10632 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10634 return NDR_ERR_SUCCESS;
10637 _PUBLIC_ void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryDomainInformationPolicy *r)
10639 ndr_print_struct(ndr, name, "lsa_QueryDomainInformationPolicy");
10640 ndr->depth++;
10641 if (flags & NDR_SET_VALUES) {
10642 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10644 if (flags & NDR_IN) {
10645 ndr_print_struct(ndr, "in", "lsa_QueryDomainInformationPolicy");
10646 ndr->depth++;
10647 ndr_print_ptr(ndr, "handle", r->in.handle);
10648 ndr->depth++;
10649 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10650 ndr->depth--;
10651 ndr_print_uint16(ndr, "level", r->in.level);
10652 ndr->depth--;
10654 if (flags & NDR_OUT) {
10655 ndr_print_struct(ndr, "out", "lsa_QueryDomainInformationPolicy");
10656 ndr->depth++;
10657 ndr_print_ptr(ndr, "info", r->out.info);
10658 ndr->depth++;
10659 ndr_print_ptr(ndr, "info", *r->out.info);
10660 ndr->depth++;
10661 if (*r->out.info) {
10662 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
10663 ndr_print_lsa_DomainInformationPolicy(ndr, "info", *r->out.info);
10665 ndr->depth--;
10666 ndr->depth--;
10667 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10668 ndr->depth--;
10670 ndr->depth--;
10673 static enum ndr_err_code ndr_push_lsa_SetDomainInformationPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetDomainInformationPolicy *r)
10675 if (flags & NDR_IN) {
10676 if (r->in.handle == NULL) {
10677 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10679 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10680 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10681 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
10682 if (r->in.info) {
10683 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
10684 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10687 if (flags & NDR_OUT) {
10688 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10690 return NDR_ERR_SUCCESS;
10693 static enum ndr_err_code ndr_pull_lsa_SetDomainInformationPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetDomainInformationPolicy *r)
10695 uint32_t _ptr_info;
10696 TALLOC_CTX *_mem_save_handle_0;
10697 TALLOC_CTX *_mem_save_info_0;
10698 if (flags & NDR_IN) {
10699 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10700 NDR_PULL_ALLOC(ndr, r->in.handle);
10702 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10703 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10704 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10705 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10706 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10707 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10708 if (_ptr_info) {
10709 NDR_PULL_ALLOC(ndr, r->in.info);
10710 } else {
10711 r->in.info = NULL;
10713 if (r->in.info) {
10714 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10715 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
10716 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
10717 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10718 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
10721 if (flags & NDR_OUT) {
10722 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10724 return NDR_ERR_SUCCESS;
10727 _PUBLIC_ void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetDomainInformationPolicy *r)
10729 ndr_print_struct(ndr, name, "lsa_SetDomainInformationPolicy");
10730 ndr->depth++;
10731 if (flags & NDR_SET_VALUES) {
10732 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10734 if (flags & NDR_IN) {
10735 ndr_print_struct(ndr, "in", "lsa_SetDomainInformationPolicy");
10736 ndr->depth++;
10737 ndr_print_ptr(ndr, "handle", r->in.handle);
10738 ndr->depth++;
10739 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10740 ndr->depth--;
10741 ndr_print_uint16(ndr, "level", r->in.level);
10742 ndr_print_ptr(ndr, "info", r->in.info);
10743 ndr->depth++;
10744 if (r->in.info) {
10745 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
10746 ndr_print_lsa_DomainInformationPolicy(ndr, "info", r->in.info);
10748 ndr->depth--;
10749 ndr->depth--;
10751 if (flags & NDR_OUT) {
10752 ndr_print_struct(ndr, "out", "lsa_SetDomainInformationPolicy");
10753 ndr->depth++;
10754 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10755 ndr->depth--;
10757 ndr->depth--;
10760 static enum ndr_err_code ndr_push_lsa_OpenTrustedDomainByName(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomainByName *r)
10762 if (flags & NDR_IN) {
10763 if (r->in.handle == NULL) {
10764 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10766 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10767 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
10768 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
10770 if (flags & NDR_OUT) {
10771 if (r->out.trustdom_handle == NULL) {
10772 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10774 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10775 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10777 return NDR_ERR_SUCCESS;
10780 static enum ndr_err_code ndr_pull_lsa_OpenTrustedDomainByName(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomainByName *r)
10782 TALLOC_CTX *_mem_save_handle_0;
10783 TALLOC_CTX *_mem_save_trustdom_handle_0;
10784 if (flags & NDR_IN) {
10785 ZERO_STRUCT(r->out);
10787 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10788 NDR_PULL_ALLOC(ndr, r->in.handle);
10790 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10791 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10792 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10793 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10794 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
10795 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
10796 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10797 ZERO_STRUCTP(r->out.trustdom_handle);
10799 if (flags & NDR_OUT) {
10800 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10801 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10803 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10804 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
10805 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10806 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
10807 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10809 return NDR_ERR_SUCCESS;
10812 _PUBLIC_ void ndr_print_lsa_OpenTrustedDomainByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomainByName *r)
10814 ndr_print_struct(ndr, name, "lsa_OpenTrustedDomainByName");
10815 ndr->depth++;
10816 if (flags & NDR_SET_VALUES) {
10817 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10819 if (flags & NDR_IN) {
10820 ndr_print_struct(ndr, "in", "lsa_OpenTrustedDomainByName");
10821 ndr->depth++;
10822 ndr_print_ptr(ndr, "handle", r->in.handle);
10823 ndr->depth++;
10824 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10825 ndr->depth--;
10826 ndr_print_lsa_String(ndr, "name", &r->in.name);
10827 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
10828 ndr->depth--;
10830 if (flags & NDR_OUT) {
10831 ndr_print_struct(ndr, "out", "lsa_OpenTrustedDomainByName");
10832 ndr->depth++;
10833 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
10834 ndr->depth++;
10835 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
10836 ndr->depth--;
10837 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10838 ndr->depth--;
10840 ndr->depth--;
10843 static enum ndr_err_code ndr_push_lsa_TestCall(struct ndr_push *ndr, int flags, const struct lsa_TestCall *r)
10845 if (flags & NDR_IN) {
10847 if (flags & NDR_OUT) {
10848 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10850 return NDR_ERR_SUCCESS;
10853 static enum ndr_err_code ndr_pull_lsa_TestCall(struct ndr_pull *ndr, int flags, struct lsa_TestCall *r)
10855 if (flags & NDR_IN) {
10857 if (flags & NDR_OUT) {
10858 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10860 return NDR_ERR_SUCCESS;
10863 _PUBLIC_ void ndr_print_lsa_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct lsa_TestCall *r)
10865 ndr_print_struct(ndr, name, "lsa_TestCall");
10866 ndr->depth++;
10867 if (flags & NDR_SET_VALUES) {
10868 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10870 if (flags & NDR_IN) {
10871 ndr_print_struct(ndr, "in", "lsa_TestCall");
10872 ndr->depth++;
10873 ndr->depth--;
10875 if (flags & NDR_OUT) {
10876 ndr_print_struct(ndr, "out", "lsa_TestCall");
10877 ndr->depth++;
10878 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10879 ndr->depth--;
10881 ndr->depth--;
10884 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flags, const struct lsa_LookupSids2 *r)
10886 if (flags & NDR_IN) {
10887 if (r->in.handle == NULL) {
10888 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10890 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10891 if (r->in.sids == NULL) {
10892 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10894 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10895 if (r->in.names == NULL) {
10896 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10898 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
10899 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
10900 if (r->in.count == NULL) {
10901 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10903 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
10904 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options));
10905 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision));
10907 if (flags & NDR_OUT) {
10908 if (r->out.domains == NULL) {
10909 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10911 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
10912 if (*r->out.domains) {
10913 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
10915 if (r->out.names == NULL) {
10916 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10918 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
10919 if (r->out.count == NULL) {
10920 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10922 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
10923 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10925 return NDR_ERR_SUCCESS;
10928 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int flags, struct lsa_LookupSids2 *r)
10930 uint32_t _ptr_domains;
10931 TALLOC_CTX *_mem_save_handle_0;
10932 TALLOC_CTX *_mem_save_sids_0;
10933 TALLOC_CTX *_mem_save_domains_0;
10934 TALLOC_CTX *_mem_save_domains_1;
10935 TALLOC_CTX *_mem_save_names_0;
10936 TALLOC_CTX *_mem_save_count_0;
10937 if (flags & NDR_IN) {
10938 ZERO_STRUCT(r->out);
10940 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10941 NDR_PULL_ALLOC(ndr, r->in.handle);
10943 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10944 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10945 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10946 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10947 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10948 NDR_PULL_ALLOC(ndr, r->in.sids);
10950 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
10951 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
10952 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10953 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
10954 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10955 NDR_PULL_ALLOC(ndr, r->in.names);
10957 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
10958 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
10959 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
10960 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
10961 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
10962 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10963 NDR_PULL_ALLOC(ndr, r->in.count);
10965 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
10966 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
10967 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
10968 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
10969 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options));
10970 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision));
10971 NDR_PULL_ALLOC(ndr, r->out.domains);
10972 ZERO_STRUCTP(r->out.domains);
10973 NDR_PULL_ALLOC(ndr, r->out.names);
10974 *r->out.names = *r->in.names;
10975 NDR_PULL_ALLOC(ndr, r->out.count);
10976 *r->out.count = *r->in.count;
10978 if (flags & NDR_OUT) {
10979 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10980 NDR_PULL_ALLOC(ndr, r->out.domains);
10982 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
10983 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
10984 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
10985 if (_ptr_domains) {
10986 NDR_PULL_ALLOC(ndr, *r->out.domains);
10987 } else {
10988 *r->out.domains = NULL;
10990 if (*r->out.domains) {
10991 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
10992 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
10993 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
10994 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
10996 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
10997 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10998 NDR_PULL_ALLOC(ndr, r->out.names);
11000 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
11001 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
11002 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
11003 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
11004 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11005 NDR_PULL_ALLOC(ndr, r->out.count);
11007 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11008 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
11009 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
11010 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11011 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11013 return NDR_ERR_SUCCESS;
11016 _PUBLIC_ void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids2 *r)
11018 ndr_print_struct(ndr, name, "lsa_LookupSids2");
11019 ndr->depth++;
11020 if (flags & NDR_SET_VALUES) {
11021 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11023 if (flags & NDR_IN) {
11024 ndr_print_struct(ndr, "in", "lsa_LookupSids2");
11025 ndr->depth++;
11026 ndr_print_ptr(ndr, "handle", r->in.handle);
11027 ndr->depth++;
11028 ndr_print_policy_handle(ndr, "handle", r->in.handle);
11029 ndr->depth--;
11030 ndr_print_ptr(ndr, "sids", r->in.sids);
11031 ndr->depth++;
11032 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
11033 ndr->depth--;
11034 ndr_print_ptr(ndr, "names", r->in.names);
11035 ndr->depth++;
11036 ndr_print_lsa_TransNameArray2(ndr, "names", r->in.names);
11037 ndr->depth--;
11038 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
11039 ndr_print_ptr(ndr, "count", r->in.count);
11040 ndr->depth++;
11041 ndr_print_uint32(ndr, "count", *r->in.count);
11042 ndr->depth--;
11043 ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options);
11044 ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision);
11045 ndr->depth--;
11047 if (flags & NDR_OUT) {
11048 ndr_print_struct(ndr, "out", "lsa_LookupSids2");
11049 ndr->depth++;
11050 ndr_print_ptr(ndr, "domains", r->out.domains);
11051 ndr->depth++;
11052 ndr_print_ptr(ndr, "domains", *r->out.domains);
11053 ndr->depth++;
11054 if (*r->out.domains) {
11055 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
11057 ndr->depth--;
11058 ndr->depth--;
11059 ndr_print_ptr(ndr, "names", r->out.names);
11060 ndr->depth++;
11061 ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names);
11062 ndr->depth--;
11063 ndr_print_ptr(ndr, "count", r->out.count);
11064 ndr->depth++;
11065 ndr_print_uint32(ndr, "count", *r->out.count);
11066 ndr->depth--;
11067 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11068 ndr->depth--;
11070 ndr->depth--;
11073 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int flags, const struct lsa_LookupNames2 *r)
11075 uint32_t cntr_names_0;
11076 if (flags & NDR_IN) {
11077 if (r->in.handle == NULL) {
11078 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11080 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11081 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
11082 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_names));
11083 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11084 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
11086 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11087 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
11089 if (r->in.sids == NULL) {
11090 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11092 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11093 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
11094 if (r->in.count == NULL) {
11095 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11097 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
11098 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options));
11099 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision));
11101 if (flags & NDR_OUT) {
11102 if (r->out.domains == NULL) {
11103 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11105 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
11106 if (*r->out.domains) {
11107 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11109 if (r->out.sids == NULL) {
11110 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11112 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
11113 if (r->out.count == NULL) {
11114 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11116 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
11117 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11119 return NDR_ERR_SUCCESS;
11122 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int flags, struct lsa_LookupNames2 *r)
11124 uint32_t cntr_names_0;
11125 uint32_t _ptr_domains;
11126 TALLOC_CTX *_mem_save_handle_0;
11127 TALLOC_CTX *_mem_save_names_0;
11128 TALLOC_CTX *_mem_save_domains_0;
11129 TALLOC_CTX *_mem_save_domains_1;
11130 TALLOC_CTX *_mem_save_sids_0;
11131 TALLOC_CTX *_mem_save_count_0;
11132 if (flags & NDR_IN) {
11133 ZERO_STRUCT(r->out);
11135 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11136 NDR_PULL_ALLOC(ndr, r->in.handle);
11138 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11139 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
11140 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11141 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
11142 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
11143 if (r->in.num_names > 1000) {
11144 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
11146 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
11147 NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
11148 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
11149 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
11150 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11151 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
11153 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11154 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
11156 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
11157 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11158 NDR_PULL_ALLOC(ndr, r->in.sids);
11160 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11161 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
11162 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11163 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11164 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
11165 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11166 NDR_PULL_ALLOC(ndr, r->in.count);
11168 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11169 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
11170 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
11171 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11172 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options));
11173 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision));
11174 NDR_PULL_ALLOC(ndr, r->out.domains);
11175 ZERO_STRUCTP(r->out.domains);
11176 NDR_PULL_ALLOC(ndr, r->out.sids);
11177 *r->out.sids = *r->in.sids;
11178 NDR_PULL_ALLOC(ndr, r->out.count);
11179 *r->out.count = *r->in.count;
11180 if (r->in.names) {
11181 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
11184 if (flags & NDR_OUT) {
11185 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11186 NDR_PULL_ALLOC(ndr, r->out.domains);
11188 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
11189 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
11190 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
11191 if (_ptr_domains) {
11192 NDR_PULL_ALLOC(ndr, *r->out.domains);
11193 } else {
11194 *r->out.domains = NULL;
11196 if (*r->out.domains) {
11197 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
11198 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
11199 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11200 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
11202 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
11203 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11204 NDR_PULL_ALLOC(ndr, r->out.sids);
11206 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11207 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
11208 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
11209 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11210 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11211 NDR_PULL_ALLOC(ndr, r->out.count);
11213 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11214 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
11215 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
11216 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11217 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11219 return NDR_ERR_SUCCESS;
11222 _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames2 *r)
11224 uint32_t cntr_names_0;
11225 ndr_print_struct(ndr, name, "lsa_LookupNames2");
11226 ndr->depth++;
11227 if (flags & NDR_SET_VALUES) {
11228 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11230 if (flags & NDR_IN) {
11231 ndr_print_struct(ndr, "in", "lsa_LookupNames2");
11232 ndr->depth++;
11233 ndr_print_ptr(ndr, "handle", r->in.handle);
11234 ndr->depth++;
11235 ndr_print_policy_handle(ndr, "handle", r->in.handle);
11236 ndr->depth--;
11237 ndr_print_uint32(ndr, "num_names", r->in.num_names);
11238 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
11239 ndr->depth++;
11240 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
11241 char *idx_0=NULL;
11242 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
11243 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
11244 free(idx_0);
11247 ndr->depth--;
11248 ndr_print_ptr(ndr, "sids", r->in.sids);
11249 ndr->depth++;
11250 ndr_print_lsa_TransSidArray2(ndr, "sids", r->in.sids);
11251 ndr->depth--;
11252 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
11253 ndr_print_ptr(ndr, "count", r->in.count);
11254 ndr->depth++;
11255 ndr_print_uint32(ndr, "count", *r->in.count);
11256 ndr->depth--;
11257 ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options);
11258 ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision);
11259 ndr->depth--;
11261 if (flags & NDR_OUT) {
11262 ndr_print_struct(ndr, "out", "lsa_LookupNames2");
11263 ndr->depth++;
11264 ndr_print_ptr(ndr, "domains", r->out.domains);
11265 ndr->depth++;
11266 ndr_print_ptr(ndr, "domains", *r->out.domains);
11267 ndr->depth++;
11268 if (*r->out.domains) {
11269 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
11271 ndr->depth--;
11272 ndr->depth--;
11273 ndr_print_ptr(ndr, "sids", r->out.sids);
11274 ndr->depth++;
11275 ndr_print_lsa_TransSidArray2(ndr, "sids", r->out.sids);
11276 ndr->depth--;
11277 ndr_print_ptr(ndr, "count", r->out.count);
11278 ndr->depth++;
11279 ndr_print_uint32(ndr, "count", *r->out.count);
11280 ndr->depth--;
11281 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11282 ndr->depth--;
11284 ndr->depth--;
11287 static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx2 *r)
11289 if (flags & NDR_IN) {
11290 if (r->in.policy_handle == NULL) {
11291 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11293 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
11294 if (r->in.info == NULL) {
11295 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11297 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
11298 if (r->in.auth_info == NULL) {
11299 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11301 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
11302 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
11304 if (flags & NDR_OUT) {
11305 if (r->out.trustdom_handle == NULL) {
11306 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11308 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
11309 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11311 return NDR_ERR_SUCCESS;
11314 static enum ndr_err_code ndr_pull_lsa_CreateTrustedDomainEx2(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx2 *r)
11316 TALLOC_CTX *_mem_save_policy_handle_0;
11317 TALLOC_CTX *_mem_save_info_0;
11318 TALLOC_CTX *_mem_save_auth_info_0;
11319 TALLOC_CTX *_mem_save_trustdom_handle_0;
11320 if (flags & NDR_IN) {
11321 ZERO_STRUCT(r->out);
11323 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11324 NDR_PULL_ALLOC(ndr, r->in.policy_handle);
11326 _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11327 NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
11328 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
11329 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
11330 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11331 NDR_PULL_ALLOC(ndr, r->in.info);
11333 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11334 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
11335 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
11336 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
11337 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11338 NDR_PULL_ALLOC(ndr, r->in.auth_info);
11340 _mem_save_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11341 NDR_PULL_SET_MEM_CTX(ndr, r->in.auth_info, LIBNDR_FLAG_REF_ALLOC);
11342 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
11343 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_info_0, LIBNDR_FLAG_REF_ALLOC);
11344 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
11345 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
11346 ZERO_STRUCTP(r->out.trustdom_handle);
11348 if (flags & NDR_OUT) {
11349 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11350 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
11352 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11353 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
11354 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
11355 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
11356 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11358 return NDR_ERR_SUCCESS;
11361 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx2 *r)
11363 ndr_print_struct(ndr, name, "lsa_CreateTrustedDomainEx2");
11364 ndr->depth++;
11365 if (flags & NDR_SET_VALUES) {
11366 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11368 if (flags & NDR_IN) {
11369 ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomainEx2");
11370 ndr->depth++;
11371 ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
11372 ndr->depth++;
11373 ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
11374 ndr->depth--;
11375 ndr_print_ptr(ndr, "info", r->in.info);
11376 ndr->depth++;
11377 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info", r->in.info);
11378 ndr->depth--;
11379 ndr_print_ptr(ndr, "auth_info", r->in.auth_info);
11380 ndr->depth++;
11381 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", r->in.auth_info);
11382 ndr->depth--;
11383 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
11384 ndr->depth--;
11386 if (flags & NDR_OUT) {
11387 ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomainEx2");
11388 ndr->depth++;
11389 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
11390 ndr->depth++;
11391 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
11392 ndr->depth--;
11393 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11394 ndr->depth--;
11396 ndr->depth--;
11399 static enum ndr_err_code ndr_push_lsa_CREDRWRITE(struct ndr_push *ndr, int flags, const struct lsa_CREDRWRITE *r)
11401 if (flags & NDR_IN) {
11403 if (flags & NDR_OUT) {
11404 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11406 return NDR_ERR_SUCCESS;
11409 static enum ndr_err_code ndr_pull_lsa_CREDRWRITE(struct ndr_pull *ndr, int flags, struct lsa_CREDRWRITE *r)
11411 if (flags & NDR_IN) {
11413 if (flags & NDR_OUT) {
11414 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11416 return NDR_ERR_SUCCESS;
11419 _PUBLIC_ void ndr_print_lsa_CREDRWRITE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITE *r)
11421 ndr_print_struct(ndr, name, "lsa_CREDRWRITE");
11422 ndr->depth++;
11423 if (flags & NDR_SET_VALUES) {
11424 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11426 if (flags & NDR_IN) {
11427 ndr_print_struct(ndr, "in", "lsa_CREDRWRITE");
11428 ndr->depth++;
11429 ndr->depth--;
11431 if (flags & NDR_OUT) {
11432 ndr_print_struct(ndr, "out", "lsa_CREDRWRITE");
11433 ndr->depth++;
11434 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11435 ndr->depth--;
11437 ndr->depth--;
11440 static enum ndr_err_code ndr_push_lsa_CREDRREAD(struct ndr_push *ndr, int flags, const struct lsa_CREDRREAD *r)
11442 if (flags & NDR_IN) {
11444 if (flags & NDR_OUT) {
11445 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11447 return NDR_ERR_SUCCESS;
11450 static enum ndr_err_code ndr_pull_lsa_CREDRREAD(struct ndr_pull *ndr, int flags, struct lsa_CREDRREAD *r)
11452 if (flags & NDR_IN) {
11454 if (flags & NDR_OUT) {
11455 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11457 return NDR_ERR_SUCCESS;
11460 _PUBLIC_ void ndr_print_lsa_CREDRREAD(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREAD *r)
11462 ndr_print_struct(ndr, name, "lsa_CREDRREAD");
11463 ndr->depth++;
11464 if (flags & NDR_SET_VALUES) {
11465 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11467 if (flags & NDR_IN) {
11468 ndr_print_struct(ndr, "in", "lsa_CREDRREAD");
11469 ndr->depth++;
11470 ndr->depth--;
11472 if (flags & NDR_OUT) {
11473 ndr_print_struct(ndr, "out", "lsa_CREDRREAD");
11474 ndr->depth++;
11475 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11476 ndr->depth--;
11478 ndr->depth--;
11481 static enum ndr_err_code ndr_push_lsa_CREDRENUMERATE(struct ndr_push *ndr, int flags, const struct lsa_CREDRENUMERATE *r)
11483 if (flags & NDR_IN) {
11485 if (flags & NDR_OUT) {
11486 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11488 return NDR_ERR_SUCCESS;
11491 static enum ndr_err_code ndr_pull_lsa_CREDRENUMERATE(struct ndr_pull *ndr, int flags, struct lsa_CREDRENUMERATE *r)
11493 if (flags & NDR_IN) {
11495 if (flags & NDR_OUT) {
11496 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11498 return NDR_ERR_SUCCESS;
11501 _PUBLIC_ void ndr_print_lsa_CREDRENUMERATE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRENUMERATE *r)
11503 ndr_print_struct(ndr, name, "lsa_CREDRENUMERATE");
11504 ndr->depth++;
11505 if (flags & NDR_SET_VALUES) {
11506 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11508 if (flags & NDR_IN) {
11509 ndr_print_struct(ndr, "in", "lsa_CREDRENUMERATE");
11510 ndr->depth++;
11511 ndr->depth--;
11513 if (flags & NDR_OUT) {
11514 ndr_print_struct(ndr, "out", "lsa_CREDRENUMERATE");
11515 ndr->depth++;
11516 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11517 ndr->depth--;
11519 ndr->depth--;
11522 static enum ndr_err_code ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_push *ndr, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
11524 if (flags & NDR_IN) {
11526 if (flags & NDR_OUT) {
11527 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11529 return NDR_ERR_SUCCESS;
11532 static enum ndr_err_code ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_pull *ndr, int flags, struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
11534 if (flags & NDR_IN) {
11536 if (flags & NDR_OUT) {
11537 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11539 return NDR_ERR_SUCCESS;
11542 _PUBLIC_ void ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
11544 ndr_print_struct(ndr, name, "lsa_CREDRWRITEDOMAINCREDENTIALS");
11545 ndr->depth++;
11546 if (flags & NDR_SET_VALUES) {
11547 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11549 if (flags & NDR_IN) {
11550 ndr_print_struct(ndr, "in", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11551 ndr->depth++;
11552 ndr->depth--;
11554 if (flags & NDR_OUT) {
11555 ndr_print_struct(ndr, "out", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11556 ndr->depth++;
11557 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11558 ndr->depth--;
11560 ndr->depth--;
11563 static enum ndr_err_code ndr_push_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_push *ndr, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r)
11565 if (flags & NDR_IN) {
11567 if (flags & NDR_OUT) {
11568 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11570 return NDR_ERR_SUCCESS;
11573 static enum ndr_err_code ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_pull *ndr, int flags, struct lsa_CREDRREADDOMAINCREDENTIALS *r)
11575 if (flags & NDR_IN) {
11577 if (flags & NDR_OUT) {
11578 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11580 return NDR_ERR_SUCCESS;
11583 _PUBLIC_ void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r)
11585 ndr_print_struct(ndr, name, "lsa_CREDRREADDOMAINCREDENTIALS");
11586 ndr->depth++;
11587 if (flags & NDR_SET_VALUES) {
11588 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11590 if (flags & NDR_IN) {
11591 ndr_print_struct(ndr, "in", "lsa_CREDRREADDOMAINCREDENTIALS");
11592 ndr->depth++;
11593 ndr->depth--;
11595 if (flags & NDR_OUT) {
11596 ndr_print_struct(ndr, "out", "lsa_CREDRREADDOMAINCREDENTIALS");
11597 ndr->depth++;
11598 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11599 ndr->depth--;
11601 ndr->depth--;
11604 static enum ndr_err_code ndr_push_lsa_CREDRDELETE(struct ndr_push *ndr, int flags, const struct lsa_CREDRDELETE *r)
11606 if (flags & NDR_IN) {
11608 if (flags & NDR_OUT) {
11609 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11611 return NDR_ERR_SUCCESS;
11614 static enum ndr_err_code ndr_pull_lsa_CREDRDELETE(struct ndr_pull *ndr, int flags, struct lsa_CREDRDELETE *r)
11616 if (flags & NDR_IN) {
11618 if (flags & NDR_OUT) {
11619 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11621 return NDR_ERR_SUCCESS;
11624 _PUBLIC_ void ndr_print_lsa_CREDRDELETE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRDELETE *r)
11626 ndr_print_struct(ndr, name, "lsa_CREDRDELETE");
11627 ndr->depth++;
11628 if (flags & NDR_SET_VALUES) {
11629 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11631 if (flags & NDR_IN) {
11632 ndr_print_struct(ndr, "in", "lsa_CREDRDELETE");
11633 ndr->depth++;
11634 ndr->depth--;
11636 if (flags & NDR_OUT) {
11637 ndr_print_struct(ndr, "out", "lsa_CREDRDELETE");
11638 ndr->depth++;
11639 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11640 ndr->depth--;
11642 ndr->depth--;
11645 static enum ndr_err_code ndr_push_lsa_CREDRGETTARGETINFO(struct ndr_push *ndr, int flags, const struct lsa_CREDRGETTARGETINFO *r)
11647 if (flags & NDR_IN) {
11649 if (flags & NDR_OUT) {
11650 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11652 return NDR_ERR_SUCCESS;
11655 static enum ndr_err_code ndr_pull_lsa_CREDRGETTARGETINFO(struct ndr_pull *ndr, int flags, struct lsa_CREDRGETTARGETINFO *r)
11657 if (flags & NDR_IN) {
11659 if (flags & NDR_OUT) {
11660 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11662 return NDR_ERR_SUCCESS;
11665 _PUBLIC_ void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETTARGETINFO *r)
11667 ndr_print_struct(ndr, name, "lsa_CREDRGETTARGETINFO");
11668 ndr->depth++;
11669 if (flags & NDR_SET_VALUES) {
11670 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11672 if (flags & NDR_IN) {
11673 ndr_print_struct(ndr, "in", "lsa_CREDRGETTARGETINFO");
11674 ndr->depth++;
11675 ndr->depth--;
11677 if (flags & NDR_OUT) {
11678 ndr_print_struct(ndr, "out", "lsa_CREDRGETTARGETINFO");
11679 ndr->depth++;
11680 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11681 ndr->depth--;
11683 ndr->depth--;
11686 static enum ndr_err_code ndr_push_lsa_CREDRPROFILELOADED(struct ndr_push *ndr, int flags, const struct lsa_CREDRPROFILELOADED *r)
11688 if (flags & NDR_IN) {
11690 if (flags & NDR_OUT) {
11691 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11693 return NDR_ERR_SUCCESS;
11696 static enum ndr_err_code ndr_pull_lsa_CREDRPROFILELOADED(struct ndr_pull *ndr, int flags, struct lsa_CREDRPROFILELOADED *r)
11698 if (flags & NDR_IN) {
11700 if (flags & NDR_OUT) {
11701 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11703 return NDR_ERR_SUCCESS;
11706 _PUBLIC_ void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRPROFILELOADED *r)
11708 ndr_print_struct(ndr, name, "lsa_CREDRPROFILELOADED");
11709 ndr->depth++;
11710 if (flags & NDR_SET_VALUES) {
11711 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11713 if (flags & NDR_IN) {
11714 ndr_print_struct(ndr, "in", "lsa_CREDRPROFILELOADED");
11715 ndr->depth++;
11716 ndr->depth--;
11718 if (flags & NDR_OUT) {
11719 ndr_print_struct(ndr, "out", "lsa_CREDRPROFILELOADED");
11720 ndr->depth++;
11721 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11722 ndr->depth--;
11724 ndr->depth--;
11727 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int flags, const struct lsa_LookupNames3 *r)
11729 uint32_t cntr_names_0;
11730 if (flags & NDR_IN) {
11731 if (r->in.handle == NULL) {
11732 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11734 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11735 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
11736 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_names));
11737 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11738 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
11740 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11741 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
11743 if (r->in.sids == NULL) {
11744 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11746 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11747 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
11748 if (r->in.count == NULL) {
11749 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11751 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
11752 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options));
11753 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision));
11755 if (flags & NDR_OUT) {
11756 if (r->out.domains == NULL) {
11757 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11759 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
11760 if (*r->out.domains) {
11761 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11763 if (r->out.sids == NULL) {
11764 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11766 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
11767 if (r->out.count == NULL) {
11768 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11770 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
11771 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11773 return NDR_ERR_SUCCESS;
11776 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r)
11778 uint32_t cntr_names_0;
11779 uint32_t _ptr_domains;
11780 TALLOC_CTX *_mem_save_handle_0;
11781 TALLOC_CTX *_mem_save_names_0;
11782 TALLOC_CTX *_mem_save_domains_0;
11783 TALLOC_CTX *_mem_save_domains_1;
11784 TALLOC_CTX *_mem_save_sids_0;
11785 TALLOC_CTX *_mem_save_count_0;
11786 if (flags & NDR_IN) {
11787 ZERO_STRUCT(r->out);
11789 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11790 NDR_PULL_ALLOC(ndr, r->in.handle);
11792 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11793 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
11794 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11795 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
11796 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
11797 if (r->in.num_names > 1000) {
11798 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
11800 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
11801 NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
11802 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
11803 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
11804 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11805 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
11807 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11808 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
11810 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
11811 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11812 NDR_PULL_ALLOC(ndr, r->in.sids);
11814 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11815 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
11816 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11817 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11818 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
11819 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11820 NDR_PULL_ALLOC(ndr, r->in.count);
11822 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11823 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
11824 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
11825 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11826 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options));
11827 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision));
11828 NDR_PULL_ALLOC(ndr, r->out.domains);
11829 ZERO_STRUCTP(r->out.domains);
11830 NDR_PULL_ALLOC(ndr, r->out.sids);
11831 *r->out.sids = *r->in.sids;
11832 NDR_PULL_ALLOC(ndr, r->out.count);
11833 *r->out.count = *r->in.count;
11834 if (r->in.names) {
11835 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
11838 if (flags & NDR_OUT) {
11839 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11840 NDR_PULL_ALLOC(ndr, r->out.domains);
11842 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
11843 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
11844 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
11845 if (_ptr_domains) {
11846 NDR_PULL_ALLOC(ndr, *r->out.domains);
11847 } else {
11848 *r->out.domains = NULL;
11850 if (*r->out.domains) {
11851 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
11852 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
11853 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11854 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
11856 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
11857 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11858 NDR_PULL_ALLOC(ndr, r->out.sids);
11860 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11861 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
11862 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
11863 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11864 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11865 NDR_PULL_ALLOC(ndr, r->out.count);
11867 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11868 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
11869 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
11870 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11871 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11873 return NDR_ERR_SUCCESS;
11876 _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames3 *r)
11878 uint32_t cntr_names_0;
11879 ndr_print_struct(ndr, name, "lsa_LookupNames3");
11880 ndr->depth++;
11881 if (flags & NDR_SET_VALUES) {
11882 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11884 if (flags & NDR_IN) {
11885 ndr_print_struct(ndr, "in", "lsa_LookupNames3");
11886 ndr->depth++;
11887 ndr_print_ptr(ndr, "handle", r->in.handle);
11888 ndr->depth++;
11889 ndr_print_policy_handle(ndr, "handle", r->in.handle);
11890 ndr->depth--;
11891 ndr_print_uint32(ndr, "num_names", r->in.num_names);
11892 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
11893 ndr->depth++;
11894 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
11895 char *idx_0=NULL;
11896 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
11897 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
11898 free(idx_0);
11901 ndr->depth--;
11902 ndr_print_ptr(ndr, "sids", r->in.sids);
11903 ndr->depth++;
11904 ndr_print_lsa_TransSidArray3(ndr, "sids", r->in.sids);
11905 ndr->depth--;
11906 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
11907 ndr_print_ptr(ndr, "count", r->in.count);
11908 ndr->depth++;
11909 ndr_print_uint32(ndr, "count", *r->in.count);
11910 ndr->depth--;
11911 ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options);
11912 ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision);
11913 ndr->depth--;
11915 if (flags & NDR_OUT) {
11916 ndr_print_struct(ndr, "out", "lsa_LookupNames3");
11917 ndr->depth++;
11918 ndr_print_ptr(ndr, "domains", r->out.domains);
11919 ndr->depth++;
11920 ndr_print_ptr(ndr, "domains", *r->out.domains);
11921 ndr->depth++;
11922 if (*r->out.domains) {
11923 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
11925 ndr->depth--;
11926 ndr->depth--;
11927 ndr_print_ptr(ndr, "sids", r->out.sids);
11928 ndr->depth++;
11929 ndr_print_lsa_TransSidArray3(ndr, "sids", r->out.sids);
11930 ndr->depth--;
11931 ndr_print_ptr(ndr, "count", r->out.count);
11932 ndr->depth++;
11933 ndr_print_uint32(ndr, "count", *r->out.count);
11934 ndr->depth--;
11935 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11936 ndr->depth--;
11938 ndr->depth--;
11941 static enum ndr_err_code ndr_push_lsa_CREDRGETSESSIONTYPES(struct ndr_push *ndr, int flags, const struct lsa_CREDRGETSESSIONTYPES *r)
11943 if (flags & NDR_IN) {
11945 if (flags & NDR_OUT) {
11946 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11948 return NDR_ERR_SUCCESS;
11951 static enum ndr_err_code ndr_pull_lsa_CREDRGETSESSIONTYPES(struct ndr_pull *ndr, int flags, struct lsa_CREDRGETSESSIONTYPES *r)
11953 if (flags & NDR_IN) {
11955 if (flags & NDR_OUT) {
11956 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11958 return NDR_ERR_SUCCESS;
11961 _PUBLIC_ void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETSESSIONTYPES *r)
11963 ndr_print_struct(ndr, name, "lsa_CREDRGETSESSIONTYPES");
11964 ndr->depth++;
11965 if (flags & NDR_SET_VALUES) {
11966 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11968 if (flags & NDR_IN) {
11969 ndr_print_struct(ndr, "in", "lsa_CREDRGETSESSIONTYPES");
11970 ndr->depth++;
11971 ndr->depth--;
11973 if (flags & NDR_OUT) {
11974 ndr_print_struct(ndr, "out", "lsa_CREDRGETSESSIONTYPES");
11975 ndr->depth++;
11976 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11977 ndr->depth--;
11979 ndr->depth--;
11982 static enum ndr_err_code ndr_push_lsa_LSARREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r)
11984 if (flags & NDR_IN) {
11986 if (flags & NDR_OUT) {
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_LSARREGISTERAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARREGISTERAUDITEVENT *r)
11994 if (flags & NDR_IN) {
11996 if (flags & NDR_OUT) {
11997 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11999 return NDR_ERR_SUCCESS;
12002 _PUBLIC_ void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r)
12004 ndr_print_struct(ndr, name, "lsa_LSARREGISTERAUDITEVENT");
12005 ndr->depth++;
12006 if (flags & NDR_SET_VALUES) {
12007 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12009 if (flags & NDR_IN) {
12010 ndr_print_struct(ndr, "in", "lsa_LSARREGISTERAUDITEVENT");
12011 ndr->depth++;
12012 ndr->depth--;
12014 if (flags & NDR_OUT) {
12015 ndr_print_struct(ndr, "out", "lsa_LSARREGISTERAUDITEVENT");
12016 ndr->depth++;
12017 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12018 ndr->depth--;
12020 ndr->depth--;
12023 static enum ndr_err_code ndr_push_lsa_LSARGENAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARGENAUDITEVENT *r)
12025 if (flags & NDR_IN) {
12027 if (flags & NDR_OUT) {
12028 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12030 return NDR_ERR_SUCCESS;
12033 static enum ndr_err_code ndr_pull_lsa_LSARGENAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARGENAUDITEVENT *r)
12035 if (flags & NDR_IN) {
12037 if (flags & NDR_OUT) {
12038 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12040 return NDR_ERR_SUCCESS;
12043 _PUBLIC_ void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARGENAUDITEVENT *r)
12045 ndr_print_struct(ndr, name, "lsa_LSARGENAUDITEVENT");
12046 ndr->depth++;
12047 if (flags & NDR_SET_VALUES) {
12048 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12050 if (flags & NDR_IN) {
12051 ndr_print_struct(ndr, "in", "lsa_LSARGENAUDITEVENT");
12052 ndr->depth++;
12053 ndr->depth--;
12055 if (flags & NDR_OUT) {
12056 ndr_print_struct(ndr, "out", "lsa_LSARGENAUDITEVENT");
12057 ndr->depth++;
12058 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12059 ndr->depth--;
12061 ndr->depth--;
12064 static enum ndr_err_code ndr_push_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r)
12066 if (flags & NDR_IN) {
12068 if (flags & NDR_OUT) {
12069 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12071 return NDR_ERR_SUCCESS;
12074 static enum ndr_err_code ndr_pull_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARUNREGISTERAUDITEVENT *r)
12076 if (flags & NDR_IN) {
12078 if (flags & NDR_OUT) {
12079 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12081 return NDR_ERR_SUCCESS;
12084 _PUBLIC_ void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r)
12086 ndr_print_struct(ndr, name, "lsa_LSARUNREGISTERAUDITEVENT");
12087 ndr->depth++;
12088 if (flags & NDR_SET_VALUES) {
12089 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12091 if (flags & NDR_IN) {
12092 ndr_print_struct(ndr, "in", "lsa_LSARUNREGISTERAUDITEVENT");
12093 ndr->depth++;
12094 ndr->depth--;
12096 if (flags & NDR_OUT) {
12097 ndr_print_struct(ndr, "out", "lsa_LSARUNREGISTERAUDITEVENT");
12098 ndr->depth++;
12099 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12100 ndr->depth--;
12102 ndr->depth--;
12105 static enum ndr_err_code ndr_push_lsa_lsaRQueryForestTrustInformation(struct ndr_push *ndr, int flags, const struct lsa_lsaRQueryForestTrustInformation *r)
12107 if (flags & NDR_IN) {
12108 if (r->in.handle == NULL) {
12109 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12111 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
12112 if (r->in.trusted_domain_name == NULL) {
12113 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12115 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain_name));
12116 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.unknown));
12118 if (flags & NDR_OUT) {
12119 if (r->out.forest_trust_info == NULL) {
12120 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12122 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.forest_trust_info));
12123 if (*r->out.forest_trust_info) {
12124 NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
12126 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12128 return NDR_ERR_SUCCESS;
12131 static enum ndr_err_code ndr_pull_lsa_lsaRQueryForestTrustInformation(struct ndr_pull *ndr, int flags, struct lsa_lsaRQueryForestTrustInformation *r)
12133 uint32_t _ptr_forest_trust_info;
12134 TALLOC_CTX *_mem_save_handle_0;
12135 TALLOC_CTX *_mem_save_trusted_domain_name_0;
12136 TALLOC_CTX *_mem_save_forest_trust_info_0;
12137 TALLOC_CTX *_mem_save_forest_trust_info_1;
12138 if (flags & NDR_IN) {
12139 ZERO_STRUCT(r->out);
12141 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12142 NDR_PULL_ALLOC(ndr, r->in.handle);
12144 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
12145 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
12146 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
12147 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
12148 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12149 NDR_PULL_ALLOC(ndr, r->in.trusted_domain_name);
12151 _mem_save_trusted_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12152 NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain_name, LIBNDR_FLAG_REF_ALLOC);
12153 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain_name));
12154 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_name_0, LIBNDR_FLAG_REF_ALLOC);
12155 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.unknown));
12156 NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
12157 ZERO_STRUCTP(r->out.forest_trust_info);
12159 if (flags & NDR_OUT) {
12160 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12161 NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
12163 _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
12164 NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC);
12165 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_info));
12166 if (_ptr_forest_trust_info) {
12167 NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info);
12168 } else {
12169 *r->out.forest_trust_info = NULL;
12171 if (*r->out.forest_trust_info) {
12172 _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
12173 NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, 0);
12174 NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
12175 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, 0);
12177 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC);
12178 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12180 return NDR_ERR_SUCCESS;
12183 _PUBLIC_ void ndr_print_lsa_lsaRQueryForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct lsa_lsaRQueryForestTrustInformation *r)
12185 ndr_print_struct(ndr, name, "lsa_lsaRQueryForestTrustInformation");
12186 ndr->depth++;
12187 if (flags & NDR_SET_VALUES) {
12188 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12190 if (flags & NDR_IN) {
12191 ndr_print_struct(ndr, "in", "lsa_lsaRQueryForestTrustInformation");
12192 ndr->depth++;
12193 ndr_print_ptr(ndr, "handle", r->in.handle);
12194 ndr->depth++;
12195 ndr_print_policy_handle(ndr, "handle", r->in.handle);
12196 ndr->depth--;
12197 ndr_print_ptr(ndr, "trusted_domain_name", r->in.trusted_domain_name);
12198 ndr->depth++;
12199 ndr_print_lsa_String(ndr, "trusted_domain_name", r->in.trusted_domain_name);
12200 ndr->depth--;
12201 ndr_print_uint16(ndr, "unknown", r->in.unknown);
12202 ndr->depth--;
12204 if (flags & NDR_OUT) {
12205 ndr_print_struct(ndr, "out", "lsa_lsaRQueryForestTrustInformation");
12206 ndr->depth++;
12207 ndr_print_ptr(ndr, "forest_trust_info", r->out.forest_trust_info);
12208 ndr->depth++;
12209 ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info);
12210 ndr->depth++;
12211 if (*r->out.forest_trust_info) {
12212 ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info);
12214 ndr->depth--;
12215 ndr->depth--;
12216 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12217 ndr->depth--;
12219 ndr->depth--;
12222 static enum ndr_err_code ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
12224 if (flags & NDR_IN) {
12226 if (flags & NDR_OUT) {
12227 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12229 return NDR_ERR_SUCCESS;
12232 static enum ndr_err_code ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
12234 if (flags & NDR_IN) {
12236 if (flags & NDR_OUT) {
12237 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12239 return NDR_ERR_SUCCESS;
12242 _PUBLIC_ void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
12244 ndr_print_struct(ndr, name, "lsa_LSARSETFORESTTRUSTINFORMATION");
12245 ndr->depth++;
12246 if (flags & NDR_SET_VALUES) {
12247 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12249 if (flags & NDR_IN) {
12250 ndr_print_struct(ndr, "in", "lsa_LSARSETFORESTTRUSTINFORMATION");
12251 ndr->depth++;
12252 ndr->depth--;
12254 if (flags & NDR_OUT) {
12255 ndr_print_struct(ndr, "out", "lsa_LSARSETFORESTTRUSTINFORMATION");
12256 ndr->depth++;
12257 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12258 ndr->depth--;
12260 ndr->depth--;
12263 static enum ndr_err_code ndr_push_lsa_CREDRRENAME(struct ndr_push *ndr, int flags, const struct lsa_CREDRRENAME *r)
12265 if (flags & NDR_IN) {
12267 if (flags & NDR_OUT) {
12268 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12270 return NDR_ERR_SUCCESS;
12273 static enum ndr_err_code ndr_pull_lsa_CREDRRENAME(struct ndr_pull *ndr, int flags, struct lsa_CREDRRENAME *r)
12275 if (flags & NDR_IN) {
12277 if (flags & NDR_OUT) {
12278 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12280 return NDR_ERR_SUCCESS;
12283 _PUBLIC_ void ndr_print_lsa_CREDRRENAME(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRRENAME *r)
12285 ndr_print_struct(ndr, name, "lsa_CREDRRENAME");
12286 ndr->depth++;
12287 if (flags & NDR_SET_VALUES) {
12288 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12290 if (flags & NDR_IN) {
12291 ndr_print_struct(ndr, "in", "lsa_CREDRRENAME");
12292 ndr->depth++;
12293 ndr->depth--;
12295 if (flags & NDR_OUT) {
12296 ndr_print_struct(ndr, "out", "lsa_CREDRRENAME");
12297 ndr->depth++;
12298 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12299 ndr->depth--;
12301 ndr->depth--;
12304 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flags, const struct lsa_LookupSids3 *r)
12306 if (flags & NDR_IN) {
12307 if (r->in.sids == NULL) {
12308 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12310 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12311 if (r->in.names == NULL) {
12312 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12314 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
12315 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
12316 if (r->in.count == NULL) {
12317 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12319 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
12320 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options));
12321 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision));
12323 if (flags & NDR_OUT) {
12324 if (r->out.domains == NULL) {
12325 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12327 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
12328 if (*r->out.domains) {
12329 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12331 if (r->out.names == NULL) {
12332 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12334 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
12335 if (r->out.count == NULL) {
12336 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12338 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
12339 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12341 return NDR_ERR_SUCCESS;
12344 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int flags, struct lsa_LookupSids3 *r)
12346 uint32_t _ptr_domains;
12347 TALLOC_CTX *_mem_save_sids_0;
12348 TALLOC_CTX *_mem_save_domains_0;
12349 TALLOC_CTX *_mem_save_domains_1;
12350 TALLOC_CTX *_mem_save_names_0;
12351 TALLOC_CTX *_mem_save_count_0;
12352 if (flags & NDR_IN) {
12353 ZERO_STRUCT(r->out);
12355 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12356 NDR_PULL_ALLOC(ndr, r->in.sids);
12358 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
12359 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
12360 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12361 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
12362 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12363 NDR_PULL_ALLOC(ndr, r->in.names);
12365 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
12366 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
12367 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
12368 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
12369 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
12370 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12371 NDR_PULL_ALLOC(ndr, r->in.count);
12373 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12374 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
12375 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
12376 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12377 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options));
12378 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision));
12379 NDR_PULL_ALLOC(ndr, r->out.domains);
12380 ZERO_STRUCTP(r->out.domains);
12381 NDR_PULL_ALLOC(ndr, r->out.names);
12382 *r->out.names = *r->in.names;
12383 NDR_PULL_ALLOC(ndr, r->out.count);
12384 *r->out.count = *r->in.count;
12386 if (flags & NDR_OUT) {
12387 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12388 NDR_PULL_ALLOC(ndr, r->out.domains);
12390 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
12391 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
12392 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
12393 if (_ptr_domains) {
12394 NDR_PULL_ALLOC(ndr, *r->out.domains);
12395 } else {
12396 *r->out.domains = NULL;
12398 if (*r->out.domains) {
12399 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
12400 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
12401 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12402 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
12404 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
12405 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12406 NDR_PULL_ALLOC(ndr, r->out.names);
12408 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
12409 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
12410 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
12411 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
12412 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12413 NDR_PULL_ALLOC(ndr, r->out.count);
12415 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12416 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
12417 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
12418 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12419 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12421 return NDR_ERR_SUCCESS;
12424 _PUBLIC_ void ndr_print_lsa_LookupSids3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids3 *r)
12426 ndr_print_struct(ndr, name, "lsa_LookupSids3");
12427 ndr->depth++;
12428 if (flags & NDR_SET_VALUES) {
12429 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12431 if (flags & NDR_IN) {
12432 ndr_print_struct(ndr, "in", "lsa_LookupSids3");
12433 ndr->depth++;
12434 ndr_print_ptr(ndr, "sids", r->in.sids);
12435 ndr->depth++;
12436 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
12437 ndr->depth--;
12438 ndr_print_ptr(ndr, "names", r->in.names);
12439 ndr->depth++;
12440 ndr_print_lsa_TransNameArray2(ndr, "names", r->in.names);
12441 ndr->depth--;
12442 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
12443 ndr_print_ptr(ndr, "count", r->in.count);
12444 ndr->depth++;
12445 ndr_print_uint32(ndr, "count", *r->in.count);
12446 ndr->depth--;
12447 ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options);
12448 ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision);
12449 ndr->depth--;
12451 if (flags & NDR_OUT) {
12452 ndr_print_struct(ndr, "out", "lsa_LookupSids3");
12453 ndr->depth++;
12454 ndr_print_ptr(ndr, "domains", r->out.domains);
12455 ndr->depth++;
12456 ndr_print_ptr(ndr, "domains", *r->out.domains);
12457 ndr->depth++;
12458 if (*r->out.domains) {
12459 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
12461 ndr->depth--;
12462 ndr->depth--;
12463 ndr_print_ptr(ndr, "names", r->out.names);
12464 ndr->depth++;
12465 ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names);
12466 ndr->depth--;
12467 ndr_print_ptr(ndr, "count", r->out.count);
12468 ndr->depth++;
12469 ndr_print_uint32(ndr, "count", *r->out.count);
12470 ndr->depth--;
12471 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12472 ndr->depth--;
12474 ndr->depth--;
12477 static enum ndr_err_code ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int flags, const struct lsa_LookupNames4 *r)
12479 uint32_t cntr_names_0;
12480 if (flags & NDR_IN) {
12481 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
12482 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_names));
12483 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
12484 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
12486 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
12487 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
12489 if (r->in.sids == NULL) {
12490 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12492 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12493 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
12494 if (r->in.count == NULL) {
12495 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12497 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
12498 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options));
12499 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision));
12501 if (flags & NDR_OUT) {
12502 if (r->out.domains == NULL) {
12503 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12505 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
12506 if (*r->out.domains) {
12507 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12509 if (r->out.sids == NULL) {
12510 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12512 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
12513 if (r->out.count == NULL) {
12514 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12516 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
12517 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12519 return NDR_ERR_SUCCESS;
12522 static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int flags, struct lsa_LookupNames4 *r)
12524 uint32_t cntr_names_0;
12525 uint32_t _ptr_domains;
12526 TALLOC_CTX *_mem_save_names_0;
12527 TALLOC_CTX *_mem_save_domains_0;
12528 TALLOC_CTX *_mem_save_domains_1;
12529 TALLOC_CTX *_mem_save_sids_0;
12530 TALLOC_CTX *_mem_save_count_0;
12531 if (flags & NDR_IN) {
12532 ZERO_STRUCT(r->out);
12534 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
12535 if (r->in.num_names > 1000) {
12536 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
12538 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
12539 NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
12540 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
12541 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
12542 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
12543 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
12545 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
12546 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
12548 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
12549 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12550 NDR_PULL_ALLOC(ndr, r->in.sids);
12552 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
12553 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
12554 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12555 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
12556 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
12557 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12558 NDR_PULL_ALLOC(ndr, r->in.count);
12560 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12561 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
12562 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
12563 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12564 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options));
12565 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision));
12566 NDR_PULL_ALLOC(ndr, r->out.domains);
12567 ZERO_STRUCTP(r->out.domains);
12568 NDR_PULL_ALLOC(ndr, r->out.sids);
12569 *r->out.sids = *r->in.sids;
12570 NDR_PULL_ALLOC(ndr, r->out.count);
12571 *r->out.count = *r->in.count;
12572 if (r->in.names) {
12573 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
12576 if (flags & NDR_OUT) {
12577 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12578 NDR_PULL_ALLOC(ndr, r->out.domains);
12580 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
12581 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
12582 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
12583 if (_ptr_domains) {
12584 NDR_PULL_ALLOC(ndr, *r->out.domains);
12585 } else {
12586 *r->out.domains = NULL;
12588 if (*r->out.domains) {
12589 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
12590 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
12591 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12592 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
12594 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
12595 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12596 NDR_PULL_ALLOC(ndr, r->out.sids);
12598 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
12599 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
12600 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
12601 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
12602 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12603 NDR_PULL_ALLOC(ndr, r->out.count);
12605 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12606 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
12607 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
12608 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12609 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12611 return NDR_ERR_SUCCESS;
12614 _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames4 *r)
12616 uint32_t cntr_names_0;
12617 ndr_print_struct(ndr, name, "lsa_LookupNames4");
12618 ndr->depth++;
12619 if (flags & NDR_SET_VALUES) {
12620 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12622 if (flags & NDR_IN) {
12623 ndr_print_struct(ndr, "in", "lsa_LookupNames4");
12624 ndr->depth++;
12625 ndr_print_uint32(ndr, "num_names", r->in.num_names);
12626 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
12627 ndr->depth++;
12628 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
12629 char *idx_0=NULL;
12630 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
12631 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
12632 free(idx_0);
12635 ndr->depth--;
12636 ndr_print_ptr(ndr, "sids", r->in.sids);
12637 ndr->depth++;
12638 ndr_print_lsa_TransSidArray3(ndr, "sids", r->in.sids);
12639 ndr->depth--;
12640 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
12641 ndr_print_ptr(ndr, "count", r->in.count);
12642 ndr->depth++;
12643 ndr_print_uint32(ndr, "count", *r->in.count);
12644 ndr->depth--;
12645 ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options);
12646 ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision);
12647 ndr->depth--;
12649 if (flags & NDR_OUT) {
12650 ndr_print_struct(ndr, "out", "lsa_LookupNames4");
12651 ndr->depth++;
12652 ndr_print_ptr(ndr, "domains", r->out.domains);
12653 ndr->depth++;
12654 ndr_print_ptr(ndr, "domains", *r->out.domains);
12655 ndr->depth++;
12656 if (*r->out.domains) {
12657 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
12659 ndr->depth--;
12660 ndr->depth--;
12661 ndr_print_ptr(ndr, "sids", r->out.sids);
12662 ndr->depth++;
12663 ndr_print_lsa_TransSidArray3(ndr, "sids", r->out.sids);
12664 ndr->depth--;
12665 ndr_print_ptr(ndr, "count", r->out.count);
12666 ndr->depth++;
12667 ndr_print_uint32(ndr, "count", *r->out.count);
12668 ndr->depth--;
12669 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12670 ndr->depth--;
12672 ndr->depth--;
12675 static enum ndr_err_code ndr_push_lsa_LSAROPENPOLICYSCE(struct ndr_push *ndr, int flags, const struct lsa_LSAROPENPOLICYSCE *r)
12677 if (flags & NDR_IN) {
12679 if (flags & NDR_OUT) {
12680 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12682 return NDR_ERR_SUCCESS;
12685 static enum ndr_err_code ndr_pull_lsa_LSAROPENPOLICYSCE(struct ndr_pull *ndr, int flags, struct lsa_LSAROPENPOLICYSCE *r)
12687 if (flags & NDR_IN) {
12689 if (flags & NDR_OUT) {
12690 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12692 return NDR_ERR_SUCCESS;
12695 _PUBLIC_ void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSAROPENPOLICYSCE *r)
12697 ndr_print_struct(ndr, name, "lsa_LSAROPENPOLICYSCE");
12698 ndr->depth++;
12699 if (flags & NDR_SET_VALUES) {
12700 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12702 if (flags & NDR_IN) {
12703 ndr_print_struct(ndr, "in", "lsa_LSAROPENPOLICYSCE");
12704 ndr->depth++;
12705 ndr->depth--;
12707 if (flags & NDR_OUT) {
12708 ndr_print_struct(ndr, "out", "lsa_LSAROPENPOLICYSCE");
12709 ndr->depth++;
12710 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12711 ndr->depth--;
12713 ndr->depth--;
12716 static enum ndr_err_code ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
12718 if (flags & NDR_IN) {
12720 if (flags & NDR_OUT) {
12721 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12723 return NDR_ERR_SUCCESS;
12726 static enum ndr_err_code ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_pull *ndr, int flags, struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
12728 if (flags & NDR_IN) {
12730 if (flags & NDR_OUT) {
12731 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12733 return NDR_ERR_SUCCESS;
12736 _PUBLIC_ void ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
12738 ndr_print_struct(ndr, name, "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12739 ndr->depth++;
12740 if (flags & NDR_SET_VALUES) {
12741 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12743 if (flags & NDR_IN) {
12744 ndr_print_struct(ndr, "in", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12745 ndr->depth++;
12746 ndr->depth--;
12748 if (flags & NDR_OUT) {
12749 ndr_print_struct(ndr, "out", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12750 ndr->depth++;
12751 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12752 ndr->depth--;
12754 ndr->depth--;
12757 static enum ndr_err_code ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
12759 if (flags & NDR_IN) {
12761 if (flags & NDR_OUT) {
12762 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12764 return NDR_ERR_SUCCESS;
12767 static enum ndr_err_code ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_pull *ndr, int flags, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
12769 if (flags & NDR_IN) {
12771 if (flags & NDR_OUT) {
12772 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12774 return NDR_ERR_SUCCESS;
12777 _PUBLIC_ void ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
12779 ndr_print_struct(ndr, name, "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12780 ndr->depth++;
12781 if (flags & NDR_SET_VALUES) {
12782 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12784 if (flags & NDR_IN) {
12785 ndr_print_struct(ndr, "in", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12786 ndr->depth++;
12787 ndr->depth--;
12789 if (flags & NDR_OUT) {
12790 ndr_print_struct(ndr, "out", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12791 ndr->depth++;
12792 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12793 ndr->depth--;
12795 ndr->depth--;
12798 static enum ndr_err_code ndr_push_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r)
12800 if (flags & NDR_IN) {
12802 if (flags & NDR_OUT) {
12803 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12805 return NDR_ERR_SUCCESS;
12808 static enum ndr_err_code ndr_pull_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARADTREPORTSECURITYEVENT *r)
12810 if (flags & NDR_IN) {
12812 if (flags & NDR_OUT) {
12813 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12815 return NDR_ERR_SUCCESS;
12818 _PUBLIC_ void ndr_print_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r)
12820 ndr_print_struct(ndr, name, "lsa_LSARADTREPORTSECURITYEVENT");
12821 ndr->depth++;
12822 if (flags & NDR_SET_VALUES) {
12823 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12825 if (flags & NDR_IN) {
12826 ndr_print_struct(ndr, "in", "lsa_LSARADTREPORTSECURITYEVENT");
12827 ndr->depth++;
12828 ndr->depth--;
12830 if (flags & NDR_OUT) {
12831 ndr_print_struct(ndr, "out", "lsa_LSARADTREPORTSECURITYEVENT");
12832 ndr->depth++;
12833 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12834 ndr->depth--;
12836 ndr->depth--;
12839 static const struct ndr_interface_call lsarpc_calls[] = {
12841 "lsa_Close",
12842 sizeof(struct lsa_Close),
12843 (ndr_push_flags_fn_t) ndr_push_lsa_Close,
12844 (ndr_pull_flags_fn_t) ndr_pull_lsa_Close,
12845 (ndr_print_function_t) ndr_print_lsa_Close,
12846 false,
12849 "lsa_Delete",
12850 sizeof(struct lsa_Delete),
12851 (ndr_push_flags_fn_t) ndr_push_lsa_Delete,
12852 (ndr_pull_flags_fn_t) ndr_pull_lsa_Delete,
12853 (ndr_print_function_t) ndr_print_lsa_Delete,
12854 false,
12857 "lsa_EnumPrivs",
12858 sizeof(struct lsa_EnumPrivs),
12859 (ndr_push_flags_fn_t) ndr_push_lsa_EnumPrivs,
12860 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumPrivs,
12861 (ndr_print_function_t) ndr_print_lsa_EnumPrivs,
12862 false,
12865 "lsa_QuerySecurity",
12866 sizeof(struct lsa_QuerySecurity),
12867 (ndr_push_flags_fn_t) ndr_push_lsa_QuerySecurity,
12868 (ndr_pull_flags_fn_t) ndr_pull_lsa_QuerySecurity,
12869 (ndr_print_function_t) ndr_print_lsa_QuerySecurity,
12870 false,
12873 "lsa_SetSecObj",
12874 sizeof(struct lsa_SetSecObj),
12875 (ndr_push_flags_fn_t) ndr_push_lsa_SetSecObj,
12876 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSecObj,
12877 (ndr_print_function_t) ndr_print_lsa_SetSecObj,
12878 false,
12881 "lsa_ChangePassword",
12882 sizeof(struct lsa_ChangePassword),
12883 (ndr_push_flags_fn_t) ndr_push_lsa_ChangePassword,
12884 (ndr_pull_flags_fn_t) ndr_pull_lsa_ChangePassword,
12885 (ndr_print_function_t) ndr_print_lsa_ChangePassword,
12886 false,
12889 "lsa_OpenPolicy",
12890 sizeof(struct lsa_OpenPolicy),
12891 (ndr_push_flags_fn_t) ndr_push_lsa_OpenPolicy,
12892 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenPolicy,
12893 (ndr_print_function_t) ndr_print_lsa_OpenPolicy,
12894 false,
12897 "lsa_QueryInfoPolicy",
12898 sizeof(struct lsa_QueryInfoPolicy),
12899 (ndr_push_flags_fn_t) ndr_push_lsa_QueryInfoPolicy,
12900 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryInfoPolicy,
12901 (ndr_print_function_t) ndr_print_lsa_QueryInfoPolicy,
12902 false,
12905 "lsa_SetInfoPolicy",
12906 sizeof(struct lsa_SetInfoPolicy),
12907 (ndr_push_flags_fn_t) ndr_push_lsa_SetInfoPolicy,
12908 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInfoPolicy,
12909 (ndr_print_function_t) ndr_print_lsa_SetInfoPolicy,
12910 false,
12913 "lsa_ClearAuditLog",
12914 sizeof(struct lsa_ClearAuditLog),
12915 (ndr_push_flags_fn_t) ndr_push_lsa_ClearAuditLog,
12916 (ndr_pull_flags_fn_t) ndr_pull_lsa_ClearAuditLog,
12917 (ndr_print_function_t) ndr_print_lsa_ClearAuditLog,
12918 false,
12921 "lsa_CreateAccount",
12922 sizeof(struct lsa_CreateAccount),
12923 (ndr_push_flags_fn_t) ndr_push_lsa_CreateAccount,
12924 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateAccount,
12925 (ndr_print_function_t) ndr_print_lsa_CreateAccount,
12926 false,
12929 "lsa_EnumAccounts",
12930 sizeof(struct lsa_EnumAccounts),
12931 (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccounts,
12932 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccounts,
12933 (ndr_print_function_t) ndr_print_lsa_EnumAccounts,
12934 false,
12937 "lsa_CreateTrustedDomain",
12938 sizeof(struct lsa_CreateTrustedDomain),
12939 (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomain,
12940 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomain,
12941 (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomain,
12942 false,
12945 "lsa_EnumTrustDom",
12946 sizeof(struct lsa_EnumTrustDom),
12947 (ndr_push_flags_fn_t) ndr_push_lsa_EnumTrustDom,
12948 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumTrustDom,
12949 (ndr_print_function_t) ndr_print_lsa_EnumTrustDom,
12950 false,
12953 "lsa_LookupNames",
12954 sizeof(struct lsa_LookupNames),
12955 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames,
12956 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames,
12957 (ndr_print_function_t) ndr_print_lsa_LookupNames,
12958 false,
12961 "lsa_LookupSids",
12962 sizeof(struct lsa_LookupSids),
12963 (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids,
12964 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids,
12965 (ndr_print_function_t) ndr_print_lsa_LookupSids,
12966 false,
12969 "lsa_CreateSecret",
12970 sizeof(struct lsa_CreateSecret),
12971 (ndr_push_flags_fn_t) ndr_push_lsa_CreateSecret,
12972 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateSecret,
12973 (ndr_print_function_t) ndr_print_lsa_CreateSecret,
12974 false,
12977 "lsa_OpenAccount",
12978 sizeof(struct lsa_OpenAccount),
12979 (ndr_push_flags_fn_t) ndr_push_lsa_OpenAccount,
12980 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenAccount,
12981 (ndr_print_function_t) ndr_print_lsa_OpenAccount,
12982 false,
12985 "lsa_EnumPrivsAccount",
12986 sizeof(struct lsa_EnumPrivsAccount),
12987 (ndr_push_flags_fn_t) ndr_push_lsa_EnumPrivsAccount,
12988 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumPrivsAccount,
12989 (ndr_print_function_t) ndr_print_lsa_EnumPrivsAccount,
12990 false,
12993 "lsa_AddPrivilegesToAccount",
12994 sizeof(struct lsa_AddPrivilegesToAccount),
12995 (ndr_push_flags_fn_t) ndr_push_lsa_AddPrivilegesToAccount,
12996 (ndr_pull_flags_fn_t) ndr_pull_lsa_AddPrivilegesToAccount,
12997 (ndr_print_function_t) ndr_print_lsa_AddPrivilegesToAccount,
12998 false,
13001 "lsa_RemovePrivilegesFromAccount",
13002 sizeof(struct lsa_RemovePrivilegesFromAccount),
13003 (ndr_push_flags_fn_t) ndr_push_lsa_RemovePrivilegesFromAccount,
13004 (ndr_pull_flags_fn_t) ndr_pull_lsa_RemovePrivilegesFromAccount,
13005 (ndr_print_function_t) ndr_print_lsa_RemovePrivilegesFromAccount,
13006 false,
13009 "lsa_GetQuotasForAccount",
13010 sizeof(struct lsa_GetQuotasForAccount),
13011 (ndr_push_flags_fn_t) ndr_push_lsa_GetQuotasForAccount,
13012 (ndr_pull_flags_fn_t) ndr_pull_lsa_GetQuotasForAccount,
13013 (ndr_print_function_t) ndr_print_lsa_GetQuotasForAccount,
13014 false,
13017 "lsa_SetQuotasForAccount",
13018 sizeof(struct lsa_SetQuotasForAccount),
13019 (ndr_push_flags_fn_t) ndr_push_lsa_SetQuotasForAccount,
13020 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetQuotasForAccount,
13021 (ndr_print_function_t) ndr_print_lsa_SetQuotasForAccount,
13022 false,
13025 "lsa_GetSystemAccessAccount",
13026 sizeof(struct lsa_GetSystemAccessAccount),
13027 (ndr_push_flags_fn_t) ndr_push_lsa_GetSystemAccessAccount,
13028 (ndr_pull_flags_fn_t) ndr_pull_lsa_GetSystemAccessAccount,
13029 (ndr_print_function_t) ndr_print_lsa_GetSystemAccessAccount,
13030 false,
13033 "lsa_SetSystemAccessAccount",
13034 sizeof(struct lsa_SetSystemAccessAccount),
13035 (ndr_push_flags_fn_t) ndr_push_lsa_SetSystemAccessAccount,
13036 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSystemAccessAccount,
13037 (ndr_print_function_t) ndr_print_lsa_SetSystemAccessAccount,
13038 false,
13041 "lsa_OpenTrustedDomain",
13042 sizeof(struct lsa_OpenTrustedDomain),
13043 (ndr_push_flags_fn_t) ndr_push_lsa_OpenTrustedDomain,
13044 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenTrustedDomain,
13045 (ndr_print_function_t) ndr_print_lsa_OpenTrustedDomain,
13046 false,
13049 "lsa_QueryTrustedDomainInfo",
13050 sizeof(struct lsa_QueryTrustedDomainInfo),
13051 (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfo,
13052 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfo,
13053 (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfo,
13054 false,
13057 "lsa_SetInformationTrustedDomain",
13058 sizeof(struct lsa_SetInformationTrustedDomain),
13059 (ndr_push_flags_fn_t) ndr_push_lsa_SetInformationTrustedDomain,
13060 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInformationTrustedDomain,
13061 (ndr_print_function_t) ndr_print_lsa_SetInformationTrustedDomain,
13062 false,
13065 "lsa_OpenSecret",
13066 sizeof(struct lsa_OpenSecret),
13067 (ndr_push_flags_fn_t) ndr_push_lsa_OpenSecret,
13068 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenSecret,
13069 (ndr_print_function_t) ndr_print_lsa_OpenSecret,
13070 false,
13073 "lsa_SetSecret",
13074 sizeof(struct lsa_SetSecret),
13075 (ndr_push_flags_fn_t) ndr_push_lsa_SetSecret,
13076 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSecret,
13077 (ndr_print_function_t) ndr_print_lsa_SetSecret,
13078 false,
13081 "lsa_QuerySecret",
13082 sizeof(struct lsa_QuerySecret),
13083 (ndr_push_flags_fn_t) ndr_push_lsa_QuerySecret,
13084 (ndr_pull_flags_fn_t) ndr_pull_lsa_QuerySecret,
13085 (ndr_print_function_t) ndr_print_lsa_QuerySecret,
13086 false,
13089 "lsa_LookupPrivValue",
13090 sizeof(struct lsa_LookupPrivValue),
13091 (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivValue,
13092 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivValue,
13093 (ndr_print_function_t) ndr_print_lsa_LookupPrivValue,
13094 false,
13097 "lsa_LookupPrivName",
13098 sizeof(struct lsa_LookupPrivName),
13099 (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivName,
13100 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivName,
13101 (ndr_print_function_t) ndr_print_lsa_LookupPrivName,
13102 false,
13105 "lsa_LookupPrivDisplayName",
13106 sizeof(struct lsa_LookupPrivDisplayName),
13107 (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivDisplayName,
13108 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivDisplayName,
13109 (ndr_print_function_t) ndr_print_lsa_LookupPrivDisplayName,
13110 false,
13113 "lsa_DeleteObject",
13114 sizeof(struct lsa_DeleteObject),
13115 (ndr_push_flags_fn_t) ndr_push_lsa_DeleteObject,
13116 (ndr_pull_flags_fn_t) ndr_pull_lsa_DeleteObject,
13117 (ndr_print_function_t) ndr_print_lsa_DeleteObject,
13118 false,
13121 "lsa_EnumAccountsWithUserRight",
13122 sizeof(struct lsa_EnumAccountsWithUserRight),
13123 (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccountsWithUserRight,
13124 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccountsWithUserRight,
13125 (ndr_print_function_t) ndr_print_lsa_EnumAccountsWithUserRight,
13126 false,
13129 "lsa_EnumAccountRights",
13130 sizeof(struct lsa_EnumAccountRights),
13131 (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccountRights,
13132 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccountRights,
13133 (ndr_print_function_t) ndr_print_lsa_EnumAccountRights,
13134 false,
13137 "lsa_AddAccountRights",
13138 sizeof(struct lsa_AddAccountRights),
13139 (ndr_push_flags_fn_t) ndr_push_lsa_AddAccountRights,
13140 (ndr_pull_flags_fn_t) ndr_pull_lsa_AddAccountRights,
13141 (ndr_print_function_t) ndr_print_lsa_AddAccountRights,
13142 false,
13145 "lsa_RemoveAccountRights",
13146 sizeof(struct lsa_RemoveAccountRights),
13147 (ndr_push_flags_fn_t) ndr_push_lsa_RemoveAccountRights,
13148 (ndr_pull_flags_fn_t) ndr_pull_lsa_RemoveAccountRights,
13149 (ndr_print_function_t) ndr_print_lsa_RemoveAccountRights,
13150 false,
13153 "lsa_QueryTrustedDomainInfoBySid",
13154 sizeof(struct lsa_QueryTrustedDomainInfoBySid),
13155 (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfoBySid,
13156 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfoBySid,
13157 (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfoBySid,
13158 false,
13161 "lsa_SetTrustedDomainInfo",
13162 sizeof(struct lsa_SetTrustedDomainInfo),
13163 (ndr_push_flags_fn_t) ndr_push_lsa_SetTrustedDomainInfo,
13164 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetTrustedDomainInfo,
13165 (ndr_print_function_t) ndr_print_lsa_SetTrustedDomainInfo,
13166 false,
13169 "lsa_DeleteTrustedDomain",
13170 sizeof(struct lsa_DeleteTrustedDomain),
13171 (ndr_push_flags_fn_t) ndr_push_lsa_DeleteTrustedDomain,
13172 (ndr_pull_flags_fn_t) ndr_pull_lsa_DeleteTrustedDomain,
13173 (ndr_print_function_t) ndr_print_lsa_DeleteTrustedDomain,
13174 false,
13177 "lsa_StorePrivateData",
13178 sizeof(struct lsa_StorePrivateData),
13179 (ndr_push_flags_fn_t) ndr_push_lsa_StorePrivateData,
13180 (ndr_pull_flags_fn_t) ndr_pull_lsa_StorePrivateData,
13181 (ndr_print_function_t) ndr_print_lsa_StorePrivateData,
13182 false,
13185 "lsa_RetrievePrivateData",
13186 sizeof(struct lsa_RetrievePrivateData),
13187 (ndr_push_flags_fn_t) ndr_push_lsa_RetrievePrivateData,
13188 (ndr_pull_flags_fn_t) ndr_pull_lsa_RetrievePrivateData,
13189 (ndr_print_function_t) ndr_print_lsa_RetrievePrivateData,
13190 false,
13193 "lsa_OpenPolicy2",
13194 sizeof(struct lsa_OpenPolicy2),
13195 (ndr_push_flags_fn_t) ndr_push_lsa_OpenPolicy2,
13196 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenPolicy2,
13197 (ndr_print_function_t) ndr_print_lsa_OpenPolicy2,
13198 false,
13201 "lsa_GetUserName",
13202 sizeof(struct lsa_GetUserName),
13203 (ndr_push_flags_fn_t) ndr_push_lsa_GetUserName,
13204 (ndr_pull_flags_fn_t) ndr_pull_lsa_GetUserName,
13205 (ndr_print_function_t) ndr_print_lsa_GetUserName,
13206 false,
13209 "lsa_QueryInfoPolicy2",
13210 sizeof(struct lsa_QueryInfoPolicy2),
13211 (ndr_push_flags_fn_t) ndr_push_lsa_QueryInfoPolicy2,
13212 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryInfoPolicy2,
13213 (ndr_print_function_t) ndr_print_lsa_QueryInfoPolicy2,
13214 false,
13217 "lsa_SetInfoPolicy2",
13218 sizeof(struct lsa_SetInfoPolicy2),
13219 (ndr_push_flags_fn_t) ndr_push_lsa_SetInfoPolicy2,
13220 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInfoPolicy2,
13221 (ndr_print_function_t) ndr_print_lsa_SetInfoPolicy2,
13222 false,
13225 "lsa_QueryTrustedDomainInfoByName",
13226 sizeof(struct lsa_QueryTrustedDomainInfoByName),
13227 (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfoByName,
13228 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfoByName,
13229 (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfoByName,
13230 false,
13233 "lsa_SetTrustedDomainInfoByName",
13234 sizeof(struct lsa_SetTrustedDomainInfoByName),
13235 (ndr_push_flags_fn_t) ndr_push_lsa_SetTrustedDomainInfoByName,
13236 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetTrustedDomainInfoByName,
13237 (ndr_print_function_t) ndr_print_lsa_SetTrustedDomainInfoByName,
13238 false,
13241 "lsa_EnumTrustedDomainsEx",
13242 sizeof(struct lsa_EnumTrustedDomainsEx),
13243 (ndr_push_flags_fn_t) ndr_push_lsa_EnumTrustedDomainsEx,
13244 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumTrustedDomainsEx,
13245 (ndr_print_function_t) ndr_print_lsa_EnumTrustedDomainsEx,
13246 false,
13249 "lsa_CreateTrustedDomainEx",
13250 sizeof(struct lsa_CreateTrustedDomainEx),
13251 (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomainEx,
13252 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomainEx,
13253 (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomainEx,
13254 false,
13257 "lsa_CloseTrustedDomainEx",
13258 sizeof(struct lsa_CloseTrustedDomainEx),
13259 (ndr_push_flags_fn_t) ndr_push_lsa_CloseTrustedDomainEx,
13260 (ndr_pull_flags_fn_t) ndr_pull_lsa_CloseTrustedDomainEx,
13261 (ndr_print_function_t) ndr_print_lsa_CloseTrustedDomainEx,
13262 false,
13265 "lsa_QueryDomainInformationPolicy",
13266 sizeof(struct lsa_QueryDomainInformationPolicy),
13267 (ndr_push_flags_fn_t) ndr_push_lsa_QueryDomainInformationPolicy,
13268 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryDomainInformationPolicy,
13269 (ndr_print_function_t) ndr_print_lsa_QueryDomainInformationPolicy,
13270 false,
13273 "lsa_SetDomainInformationPolicy",
13274 sizeof(struct lsa_SetDomainInformationPolicy),
13275 (ndr_push_flags_fn_t) ndr_push_lsa_SetDomainInformationPolicy,
13276 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetDomainInformationPolicy,
13277 (ndr_print_function_t) ndr_print_lsa_SetDomainInformationPolicy,
13278 false,
13281 "lsa_OpenTrustedDomainByName",
13282 sizeof(struct lsa_OpenTrustedDomainByName),
13283 (ndr_push_flags_fn_t) ndr_push_lsa_OpenTrustedDomainByName,
13284 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenTrustedDomainByName,
13285 (ndr_print_function_t) ndr_print_lsa_OpenTrustedDomainByName,
13286 false,
13289 "lsa_TestCall",
13290 sizeof(struct lsa_TestCall),
13291 (ndr_push_flags_fn_t) ndr_push_lsa_TestCall,
13292 (ndr_pull_flags_fn_t) ndr_pull_lsa_TestCall,
13293 (ndr_print_function_t) ndr_print_lsa_TestCall,
13294 false,
13297 "lsa_LookupSids2",
13298 sizeof(struct lsa_LookupSids2),
13299 (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids2,
13300 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids2,
13301 (ndr_print_function_t) ndr_print_lsa_LookupSids2,
13302 false,
13305 "lsa_LookupNames2",
13306 sizeof(struct lsa_LookupNames2),
13307 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames2,
13308 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames2,
13309 (ndr_print_function_t) ndr_print_lsa_LookupNames2,
13310 false,
13313 "lsa_CreateTrustedDomainEx2",
13314 sizeof(struct lsa_CreateTrustedDomainEx2),
13315 (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomainEx2,
13316 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomainEx2,
13317 (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomainEx2,
13318 false,
13321 "lsa_CREDRWRITE",
13322 sizeof(struct lsa_CREDRWRITE),
13323 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRWRITE,
13324 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRWRITE,
13325 (ndr_print_function_t) ndr_print_lsa_CREDRWRITE,
13326 false,
13329 "lsa_CREDRREAD",
13330 sizeof(struct lsa_CREDRREAD),
13331 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRREAD,
13332 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRREAD,
13333 (ndr_print_function_t) ndr_print_lsa_CREDRREAD,
13334 false,
13337 "lsa_CREDRENUMERATE",
13338 sizeof(struct lsa_CREDRENUMERATE),
13339 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRENUMERATE,
13340 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRENUMERATE,
13341 (ndr_print_function_t) ndr_print_lsa_CREDRENUMERATE,
13342 false,
13345 "lsa_CREDRWRITEDOMAINCREDENTIALS",
13346 sizeof(struct lsa_CREDRWRITEDOMAINCREDENTIALS),
13347 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS,
13348 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS,
13349 (ndr_print_function_t) ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS,
13350 false,
13353 "lsa_CREDRREADDOMAINCREDENTIALS",
13354 sizeof(struct lsa_CREDRREADDOMAINCREDENTIALS),
13355 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRREADDOMAINCREDENTIALS,
13356 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS,
13357 (ndr_print_function_t) ndr_print_lsa_CREDRREADDOMAINCREDENTIALS,
13358 false,
13361 "lsa_CREDRDELETE",
13362 sizeof(struct lsa_CREDRDELETE),
13363 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRDELETE,
13364 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRDELETE,
13365 (ndr_print_function_t) ndr_print_lsa_CREDRDELETE,
13366 false,
13369 "lsa_CREDRGETTARGETINFO",
13370 sizeof(struct lsa_CREDRGETTARGETINFO),
13371 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRGETTARGETINFO,
13372 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRGETTARGETINFO,
13373 (ndr_print_function_t) ndr_print_lsa_CREDRGETTARGETINFO,
13374 false,
13377 "lsa_CREDRPROFILELOADED",
13378 sizeof(struct lsa_CREDRPROFILELOADED),
13379 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRPROFILELOADED,
13380 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRPROFILELOADED,
13381 (ndr_print_function_t) ndr_print_lsa_CREDRPROFILELOADED,
13382 false,
13385 "lsa_LookupNames3",
13386 sizeof(struct lsa_LookupNames3),
13387 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames3,
13388 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames3,
13389 (ndr_print_function_t) ndr_print_lsa_LookupNames3,
13390 false,
13393 "lsa_CREDRGETSESSIONTYPES",
13394 sizeof(struct lsa_CREDRGETSESSIONTYPES),
13395 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRGETSESSIONTYPES,
13396 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRGETSESSIONTYPES,
13397 (ndr_print_function_t) ndr_print_lsa_CREDRGETSESSIONTYPES,
13398 false,
13401 "lsa_LSARREGISTERAUDITEVENT",
13402 sizeof(struct lsa_LSARREGISTERAUDITEVENT),
13403 (ndr_push_flags_fn_t) ndr_push_lsa_LSARREGISTERAUDITEVENT,
13404 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARREGISTERAUDITEVENT,
13405 (ndr_print_function_t) ndr_print_lsa_LSARREGISTERAUDITEVENT,
13406 false,
13409 "lsa_LSARGENAUDITEVENT",
13410 sizeof(struct lsa_LSARGENAUDITEVENT),
13411 (ndr_push_flags_fn_t) ndr_push_lsa_LSARGENAUDITEVENT,
13412 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARGENAUDITEVENT,
13413 (ndr_print_function_t) ndr_print_lsa_LSARGENAUDITEVENT,
13414 false,
13417 "lsa_LSARUNREGISTERAUDITEVENT",
13418 sizeof(struct lsa_LSARUNREGISTERAUDITEVENT),
13419 (ndr_push_flags_fn_t) ndr_push_lsa_LSARUNREGISTERAUDITEVENT,
13420 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARUNREGISTERAUDITEVENT,
13421 (ndr_print_function_t) ndr_print_lsa_LSARUNREGISTERAUDITEVENT,
13422 false,
13425 "lsa_lsaRQueryForestTrustInformation",
13426 sizeof(struct lsa_lsaRQueryForestTrustInformation),
13427 (ndr_push_flags_fn_t) ndr_push_lsa_lsaRQueryForestTrustInformation,
13428 (ndr_pull_flags_fn_t) ndr_pull_lsa_lsaRQueryForestTrustInformation,
13429 (ndr_print_function_t) ndr_print_lsa_lsaRQueryForestTrustInformation,
13430 false,
13433 "lsa_LSARSETFORESTTRUSTINFORMATION",
13434 sizeof(struct lsa_LSARSETFORESTTRUSTINFORMATION),
13435 (ndr_push_flags_fn_t) ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION,
13436 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION,
13437 (ndr_print_function_t) ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION,
13438 false,
13441 "lsa_CREDRRENAME",
13442 sizeof(struct lsa_CREDRRENAME),
13443 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRRENAME,
13444 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRRENAME,
13445 (ndr_print_function_t) ndr_print_lsa_CREDRRENAME,
13446 false,
13449 "lsa_LookupSids3",
13450 sizeof(struct lsa_LookupSids3),
13451 (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids3,
13452 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids3,
13453 (ndr_print_function_t) ndr_print_lsa_LookupSids3,
13454 false,
13457 "lsa_LookupNames4",
13458 sizeof(struct lsa_LookupNames4),
13459 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames4,
13460 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames4,
13461 (ndr_print_function_t) ndr_print_lsa_LookupNames4,
13462 false,
13465 "lsa_LSAROPENPOLICYSCE",
13466 sizeof(struct lsa_LSAROPENPOLICYSCE),
13467 (ndr_push_flags_fn_t) ndr_push_lsa_LSAROPENPOLICYSCE,
13468 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSAROPENPOLICYSCE,
13469 (ndr_print_function_t) ndr_print_lsa_LSAROPENPOLICYSCE,
13470 false,
13473 "lsa_LSARADTREGISTERSECURITYEVENTSOURCE",
13474 sizeof(struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE),
13475 (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
13476 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
13477 (ndr_print_function_t) ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
13478 false,
13481 "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE",
13482 sizeof(struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE),
13483 (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
13484 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
13485 (ndr_print_function_t) ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
13486 false,
13489 "lsa_LSARADTREPORTSECURITYEVENT",
13490 sizeof(struct lsa_LSARADTREPORTSECURITYEVENT),
13491 (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTREPORTSECURITYEVENT,
13492 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTREPORTSECURITYEVENT,
13493 (ndr_print_function_t) ndr_print_lsa_LSARADTREPORTSECURITYEVENT,
13494 false,
13496 { NULL, 0, NULL, NULL, NULL, false }
13499 static const char * const lsarpc_endpoint_strings[] = {
13500 "ncacn_np:[\\pipe\\lsarpc]",
13501 "ncacn_np:[\\pipe\\netlogon]",
13502 "ncacn_np:[\\pipe\\lsass]",
13503 "ncacn_ip_tcp:",
13504 "ncalrpc:",
13507 static const struct ndr_interface_string_array lsarpc_endpoints = {
13508 .count = 5,
13509 .names = lsarpc_endpoint_strings
13512 static const char * const lsarpc_authservice_strings[] = {
13513 "host",
13516 static const struct ndr_interface_string_array lsarpc_authservices = {
13517 .count = 1,
13518 .names = lsarpc_authservice_strings
13522 const struct ndr_interface_table ndr_table_lsarpc = {
13523 .name = "lsarpc",
13524 .syntax_id = {
13525 {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xab}},
13526 NDR_LSARPC_VERSION
13528 .helpstring = NDR_LSARPC_HELPSTRING,
13529 .num_calls = 82,
13530 .calls = lsarpc_calls,
13531 .endpoints = &lsarpc_endpoints,
13532 .authservices = &lsarpc_authservices