s3-samr: in _samr_QueryUserInfo() make sure to not return any info in error case.
[Samba.git] / librpc / gen_ndr / ndr_lsa.c
blob793404a3be7c49ffbd832650850539b6006f7227
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_lsa.h"
6 #include "librpc/gen_ndr/ndr_misc.h"
7 #include "librpc/gen_ndr/ndr_security.h"
8 _PUBLIC_ enum ndr_err_code ndr_push_lsa_String(struct ndr_push *ndr, int ndr_flags, const struct lsa_String *r)
10 if (ndr_flags & NDR_SCALARS) {
11 NDR_CHECK(ndr_push_align(ndr, 4));
12 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
13 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
14 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
16 if (ndr_flags & NDR_BUFFERS) {
17 if (r->string) {
18 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
19 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
20 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
21 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2 * strlen_m(r->string) / 2, sizeof(uint16_t), CH_UTF16));
24 return NDR_ERR_SUCCESS;
27 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_String(struct ndr_pull *ndr, int ndr_flags, struct lsa_String *r)
29 uint32_t _ptr_string;
30 TALLOC_CTX *_mem_save_string_0;
31 if (ndr_flags & NDR_SCALARS) {
32 NDR_CHECK(ndr_pull_align(ndr, 4));
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, 4));
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_uint32(ndr, NDR_SCALARS, 2 * strlen_m_term(r->string) / 2));
90 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
91 NDR_CHECK(ndr_push_uint32(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, 4));
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, 4));
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_uint32(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, 4));
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, 4));
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_uint32(ndr, NDR_SCALARS, strlen_m(r->string)));
247 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
248 NDR_CHECK(ndr_push_uint32(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, 4));
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, 4));
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_uint32(ndr, NDR_SCALARS, strlen_m_term(r->string)));
318 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
319 NDR_CHECK(ndr_push_uint32(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, 4));
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, 4));
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_uint32(ndr, NDR_SCALARS, r->size / 2));
390 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
391 NDR_CHECK(ndr_push_uint32(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, 4));
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 < r->length / 2; 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, 4));
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, 4));
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, 4));
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_uint32(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, 4));
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, 4));
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_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->object_name, CH_UTF16)));
680 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
681 NDR_CHECK(ndr_push_uint32(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, 4));
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->depth--;
834 static enum ndr_err_code ndr_push_lsa_AuditLogInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditLogInfo *r)
836 if (ndr_flags & NDR_SCALARS) {
837 NDR_CHECK(ndr_push_align(ndr, 8));
838 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->percent_full));
839 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximum_log_size));
840 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->retention_time));
841 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_in_progress));
842 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->time_to_shutdown));
843 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->next_audit_record));
845 if (ndr_flags & NDR_BUFFERS) {
847 return NDR_ERR_SUCCESS;
850 static enum ndr_err_code ndr_pull_lsa_AuditLogInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditLogInfo *r)
852 if (ndr_flags & NDR_SCALARS) {
853 NDR_CHECK(ndr_pull_align(ndr, 8));
854 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->percent_full));
855 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximum_log_size));
856 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->retention_time));
857 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_in_progress));
858 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->time_to_shutdown));
859 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->next_audit_record));
861 if (ndr_flags & NDR_BUFFERS) {
863 return NDR_ERR_SUCCESS;
866 _PUBLIC_ void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditLogInfo *r)
868 ndr_print_struct(ndr, name, "lsa_AuditLogInfo");
869 ndr->depth++;
870 ndr_print_uint32(ndr, "percent_full", r->percent_full);
871 ndr_print_uint32(ndr, "maximum_log_size", r->maximum_log_size);
872 ndr_print_hyper(ndr, "retention_time", r->retention_time);
873 ndr_print_uint8(ndr, "shutdown_in_progress", r->shutdown_in_progress);
874 ndr_print_hyper(ndr, "time_to_shutdown", r->time_to_shutdown);
875 ndr_print_uint32(ndr, "next_audit_record", r->next_audit_record);
876 ndr->depth--;
879 static enum ndr_err_code ndr_push_lsa_PolicyAuditPolicy(struct ndr_push *ndr, int ndr_flags, enum lsa_PolicyAuditPolicy r)
881 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
882 return NDR_ERR_SUCCESS;
885 static enum ndr_err_code ndr_pull_lsa_PolicyAuditPolicy(struct ndr_pull *ndr, int ndr_flags, enum lsa_PolicyAuditPolicy *r)
887 uint32_t v;
888 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
889 *r = v;
890 return NDR_ERR_SUCCESS;
893 _PUBLIC_ void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print *ndr, const char *name, enum lsa_PolicyAuditPolicy r)
895 const char *val = NULL;
897 switch (r) {
898 case LSA_AUDIT_POLICY_NONE: val = "LSA_AUDIT_POLICY_NONE"; break;
899 case LSA_AUDIT_POLICY_SUCCESS: val = "LSA_AUDIT_POLICY_SUCCESS"; break;
900 case LSA_AUDIT_POLICY_FAILURE: val = "LSA_AUDIT_POLICY_FAILURE"; break;
901 case LSA_AUDIT_POLICY_ALL: val = "LSA_AUDIT_POLICY_ALL"; break;
902 case LSA_AUDIT_POLICY_CLEAR: val = "LSA_AUDIT_POLICY_CLEAR"; break;
904 ndr_print_enum(ndr, name, "ENUM", val, r);
907 static enum ndr_err_code ndr_push_lsa_AuditEventsInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditEventsInfo *r)
909 uint32_t cntr_settings_1;
910 if (ndr_flags & NDR_SCALARS) {
911 NDR_CHECK(ndr_push_align(ndr, 4));
912 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditing_mode));
913 NDR_CHECK(ndr_push_unique_ptr(ndr, r->settings));
914 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
916 if (ndr_flags & NDR_BUFFERS) {
917 if (r->settings) {
918 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
919 for (cntr_settings_1 = 0; cntr_settings_1 < r->count; cntr_settings_1++) {
920 NDR_CHECK(ndr_push_lsa_PolicyAuditPolicy(ndr, NDR_SCALARS, r->settings[cntr_settings_1]));
924 return NDR_ERR_SUCCESS;
927 static enum ndr_err_code ndr_pull_lsa_AuditEventsInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditEventsInfo *r)
929 uint32_t _ptr_settings;
930 uint32_t cntr_settings_1;
931 TALLOC_CTX *_mem_save_settings_0;
932 TALLOC_CTX *_mem_save_settings_1;
933 if (ndr_flags & NDR_SCALARS) {
934 NDR_CHECK(ndr_pull_align(ndr, 4));
935 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditing_mode));
936 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_settings));
937 if (_ptr_settings) {
938 NDR_PULL_ALLOC(ndr, r->settings);
939 } else {
940 r->settings = NULL;
942 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
944 if (ndr_flags & NDR_BUFFERS) {
945 if (r->settings) {
946 _mem_save_settings_0 = NDR_PULL_GET_MEM_CTX(ndr);
947 NDR_PULL_SET_MEM_CTX(ndr, r->settings, 0);
948 NDR_CHECK(ndr_pull_array_size(ndr, &r->settings));
949 NDR_PULL_ALLOC_N(ndr, r->settings, ndr_get_array_size(ndr, &r->settings));
950 _mem_save_settings_1 = NDR_PULL_GET_MEM_CTX(ndr);
951 NDR_PULL_SET_MEM_CTX(ndr, r->settings, 0);
952 for (cntr_settings_1 = 0; cntr_settings_1 < r->count; cntr_settings_1++) {
953 NDR_CHECK(ndr_pull_lsa_PolicyAuditPolicy(ndr, NDR_SCALARS, &r->settings[cntr_settings_1]));
955 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_settings_1, 0);
956 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_settings_0, 0);
958 if (r->settings) {
959 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->settings, r->count));
962 return NDR_ERR_SUCCESS;
965 _PUBLIC_ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditEventsInfo *r)
967 uint32_t cntr_settings_1;
968 ndr_print_struct(ndr, name, "lsa_AuditEventsInfo");
969 ndr->depth++;
970 ndr_print_uint32(ndr, "auditing_mode", r->auditing_mode);
971 ndr_print_ptr(ndr, "settings", r->settings);
972 ndr->depth++;
973 if (r->settings) {
974 ndr->print(ndr, "%s: ARRAY(%d)", "settings", (int)r->count);
975 ndr->depth++;
976 for (cntr_settings_1=0;cntr_settings_1<r->count;cntr_settings_1++) {
977 char *idx_1=NULL;
978 if (asprintf(&idx_1, "[%d]", cntr_settings_1) != -1) {
979 ndr_print_lsa_PolicyAuditPolicy(ndr, "settings", r->settings[cntr_settings_1]);
980 free(idx_1);
983 ndr->depth--;
985 ndr->depth--;
986 ndr_print_uint32(ndr, "count", r->count);
987 ndr->depth--;
990 static enum ndr_err_code ndr_push_lsa_DomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfo *r)
992 if (ndr_flags & NDR_SCALARS) {
993 NDR_CHECK(ndr_push_align(ndr, 4));
994 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
995 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
997 if (ndr_flags & NDR_BUFFERS) {
998 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
999 if (r->sid) {
1000 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1003 return NDR_ERR_SUCCESS;
1006 static enum ndr_err_code ndr_pull_lsa_DomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfo *r)
1008 uint32_t _ptr_sid;
1009 TALLOC_CTX *_mem_save_sid_0;
1010 if (ndr_flags & NDR_SCALARS) {
1011 NDR_CHECK(ndr_pull_align(ndr, 4));
1012 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1013 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
1014 if (_ptr_sid) {
1015 NDR_PULL_ALLOC(ndr, r->sid);
1016 } else {
1017 r->sid = NULL;
1020 if (ndr_flags & NDR_BUFFERS) {
1021 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1022 if (r->sid) {
1023 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1024 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
1025 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1026 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
1029 return NDR_ERR_SUCCESS;
1032 _PUBLIC_ void ndr_print_lsa_DomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfo *r)
1034 ndr_print_struct(ndr, name, "lsa_DomainInfo");
1035 ndr->depth++;
1036 ndr_print_lsa_StringLarge(ndr, "name", &r->name);
1037 ndr_print_ptr(ndr, "sid", r->sid);
1038 ndr->depth++;
1039 if (r->sid) {
1040 ndr_print_dom_sid2(ndr, "sid", r->sid);
1042 ndr->depth--;
1043 ndr->depth--;
1046 static enum ndr_err_code ndr_push_lsa_PDAccountInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_PDAccountInfo *r)
1048 if (ndr_flags & NDR_SCALARS) {
1049 NDR_CHECK(ndr_push_align(ndr, 4));
1050 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
1052 if (ndr_flags & NDR_BUFFERS) {
1053 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
1055 return NDR_ERR_SUCCESS;
1058 static enum ndr_err_code ndr_pull_lsa_PDAccountInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_PDAccountInfo *r)
1060 if (ndr_flags & NDR_SCALARS) {
1061 NDR_CHECK(ndr_pull_align(ndr, 4));
1062 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
1064 if (ndr_flags & NDR_BUFFERS) {
1065 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
1067 return NDR_ERR_SUCCESS;
1070 _PUBLIC_ void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *name, const struct lsa_PDAccountInfo *r)
1072 ndr_print_struct(ndr, name, "lsa_PDAccountInfo");
1073 ndr->depth++;
1074 ndr_print_lsa_String(ndr, "name", &r->name);
1075 ndr->depth--;
1078 static enum ndr_err_code ndr_push_lsa_Role(struct ndr_push *ndr, int ndr_flags, enum lsa_Role r)
1080 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1081 return NDR_ERR_SUCCESS;
1084 static enum ndr_err_code ndr_pull_lsa_Role(struct ndr_pull *ndr, int ndr_flags, enum lsa_Role *r)
1086 uint32_t v;
1087 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1088 *r = v;
1089 return NDR_ERR_SUCCESS;
1092 _PUBLIC_ void ndr_print_lsa_Role(struct ndr_print *ndr, const char *name, enum lsa_Role r)
1094 const char *val = NULL;
1096 switch (r) {
1097 case LSA_ROLE_BACKUP: val = "LSA_ROLE_BACKUP"; break;
1098 case LSA_ROLE_PRIMARY: val = "LSA_ROLE_PRIMARY"; break;
1100 ndr_print_enum(ndr, name, "ENUM", val, r);
1103 static enum ndr_err_code ndr_push_lsa_ServerRole(struct ndr_push *ndr, int ndr_flags, const struct lsa_ServerRole *r)
1105 if (ndr_flags & NDR_SCALARS) {
1106 NDR_CHECK(ndr_push_align(ndr, 4));
1107 NDR_CHECK(ndr_push_lsa_Role(ndr, NDR_SCALARS, r->role));
1109 if (ndr_flags & NDR_BUFFERS) {
1111 return NDR_ERR_SUCCESS;
1114 static enum ndr_err_code ndr_pull_lsa_ServerRole(struct ndr_pull *ndr, int ndr_flags, struct lsa_ServerRole *r)
1116 if (ndr_flags & NDR_SCALARS) {
1117 NDR_CHECK(ndr_pull_align(ndr, 4));
1118 NDR_CHECK(ndr_pull_lsa_Role(ndr, NDR_SCALARS, &r->role));
1120 if (ndr_flags & NDR_BUFFERS) {
1122 return NDR_ERR_SUCCESS;
1125 _PUBLIC_ void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, const struct lsa_ServerRole *r)
1127 ndr_print_struct(ndr, name, "lsa_ServerRole");
1128 ndr->depth++;
1129 ndr_print_lsa_Role(ndr, "role", r->role);
1130 ndr->depth--;
1133 static enum ndr_err_code ndr_push_lsa_ReplicaSourceInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ReplicaSourceInfo *r)
1135 if (ndr_flags & NDR_SCALARS) {
1136 NDR_CHECK(ndr_push_align(ndr, 4));
1137 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->source));
1138 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account));
1140 if (ndr_flags & NDR_BUFFERS) {
1141 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->source));
1142 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account));
1144 return NDR_ERR_SUCCESS;
1147 static enum ndr_err_code ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ReplicaSourceInfo *r)
1149 if (ndr_flags & NDR_SCALARS) {
1150 NDR_CHECK(ndr_pull_align(ndr, 4));
1151 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->source));
1152 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account));
1154 if (ndr_flags & NDR_BUFFERS) {
1155 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->source));
1156 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account));
1158 return NDR_ERR_SUCCESS;
1161 _PUBLIC_ void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print *ndr, const char *name, const struct lsa_ReplicaSourceInfo *r)
1163 ndr_print_struct(ndr, name, "lsa_ReplicaSourceInfo");
1164 ndr->depth++;
1165 ndr_print_lsa_String(ndr, "source", &r->source);
1166 ndr_print_lsa_String(ndr, "account", &r->account);
1167 ndr->depth--;
1170 static enum ndr_err_code ndr_push_lsa_DefaultQuotaInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DefaultQuotaInfo *r)
1172 if (ndr_flags & NDR_SCALARS) {
1173 NDR_CHECK(ndr_push_align(ndr, 8));
1174 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->paged_pool));
1175 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->non_paged_pool));
1176 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->min_wss));
1177 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_wss));
1178 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagefile));
1179 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown));
1181 if (ndr_flags & NDR_BUFFERS) {
1183 return NDR_ERR_SUCCESS;
1186 static enum ndr_err_code ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DefaultQuotaInfo *r)
1188 if (ndr_flags & NDR_SCALARS) {
1189 NDR_CHECK(ndr_pull_align(ndr, 8));
1190 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->paged_pool));
1191 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->non_paged_pool));
1192 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->min_wss));
1193 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_wss));
1194 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagefile));
1195 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown));
1197 if (ndr_flags & NDR_BUFFERS) {
1199 return NDR_ERR_SUCCESS;
1202 _PUBLIC_ void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print *ndr, const char *name, const struct lsa_DefaultQuotaInfo *r)
1204 ndr_print_struct(ndr, name, "lsa_DefaultQuotaInfo");
1205 ndr->depth++;
1206 ndr_print_uint32(ndr, "paged_pool", r->paged_pool);
1207 ndr_print_uint32(ndr, "non_paged_pool", r->non_paged_pool);
1208 ndr_print_uint32(ndr, "min_wss", r->min_wss);
1209 ndr_print_uint32(ndr, "max_wss", r->max_wss);
1210 ndr_print_uint32(ndr, "pagefile", r->pagefile);
1211 ndr_print_hyper(ndr, "unknown", r->unknown);
1212 ndr->depth--;
1215 static enum ndr_err_code ndr_push_lsa_ModificationInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ModificationInfo *r)
1217 if (ndr_flags & NDR_SCALARS) {
1218 NDR_CHECK(ndr_push_align(ndr, 8));
1219 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->modified_id));
1220 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->db_create_time));
1222 if (ndr_flags & NDR_BUFFERS) {
1224 return NDR_ERR_SUCCESS;
1227 static enum ndr_err_code ndr_pull_lsa_ModificationInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ModificationInfo *r)
1229 if (ndr_flags & NDR_SCALARS) {
1230 NDR_CHECK(ndr_pull_align(ndr, 8));
1231 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->modified_id));
1232 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->db_create_time));
1234 if (ndr_flags & NDR_BUFFERS) {
1236 return NDR_ERR_SUCCESS;
1239 _PUBLIC_ void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *name, const struct lsa_ModificationInfo *r)
1241 ndr_print_struct(ndr, name, "lsa_ModificationInfo");
1242 ndr->depth++;
1243 ndr_print_hyper(ndr, "modified_id", r->modified_id);
1244 ndr_print_NTTIME_hyper(ndr, "db_create_time", r->db_create_time);
1245 ndr->depth--;
1248 static enum ndr_err_code ndr_push_lsa_AuditFullSetInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullSetInfo *r)
1250 if (ndr_flags & NDR_SCALARS) {
1251 NDR_CHECK(ndr_push_align(ndr, 1));
1252 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full));
1254 if (ndr_flags & NDR_BUFFERS) {
1256 return NDR_ERR_SUCCESS;
1259 static enum ndr_err_code ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullSetInfo *r)
1261 if (ndr_flags & NDR_SCALARS) {
1262 NDR_CHECK(ndr_pull_align(ndr, 1));
1263 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full));
1265 if (ndr_flags & NDR_BUFFERS) {
1267 return NDR_ERR_SUCCESS;
1270 _PUBLIC_ void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullSetInfo *r)
1272 ndr_print_struct(ndr, name, "lsa_AuditFullSetInfo");
1273 ndr->depth++;
1274 ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full);
1275 ndr->depth--;
1278 static enum ndr_err_code ndr_push_lsa_AuditFullQueryInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullQueryInfo *r)
1280 if (ndr_flags & NDR_SCALARS) {
1281 NDR_CHECK(ndr_push_align(ndr, 1));
1282 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full));
1283 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->log_is_full));
1285 if (ndr_flags & NDR_BUFFERS) {
1287 return NDR_ERR_SUCCESS;
1290 static enum ndr_err_code ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullQueryInfo *r)
1292 if (ndr_flags & NDR_SCALARS) {
1293 NDR_CHECK(ndr_pull_align(ndr, 1));
1294 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full));
1295 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->log_is_full));
1297 if (ndr_flags & NDR_BUFFERS) {
1299 return NDR_ERR_SUCCESS;
1302 _PUBLIC_ void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullQueryInfo *r)
1304 ndr_print_struct(ndr, name, "lsa_AuditFullQueryInfo");
1305 ndr->depth++;
1306 ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full);
1307 ndr_print_uint8(ndr, "log_is_full", r->log_is_full);
1308 ndr->depth--;
1311 static enum ndr_err_code ndr_push_lsa_DnsDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DnsDomainInfo *r)
1313 if (ndr_flags & NDR_SCALARS) {
1314 NDR_CHECK(ndr_push_align(ndr, 4));
1315 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1316 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain));
1317 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forest));
1318 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
1319 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
1321 if (ndr_flags & NDR_BUFFERS) {
1322 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1323 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain));
1324 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forest));
1325 if (r->sid) {
1326 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1329 return NDR_ERR_SUCCESS;
1332 static enum ndr_err_code ndr_pull_lsa_DnsDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DnsDomainInfo *r)
1334 uint32_t _ptr_sid;
1335 TALLOC_CTX *_mem_save_sid_0;
1336 if (ndr_flags & NDR_SCALARS) {
1337 NDR_CHECK(ndr_pull_align(ndr, 4));
1338 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
1339 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain));
1340 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forest));
1341 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
1342 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
1343 if (_ptr_sid) {
1344 NDR_PULL_ALLOC(ndr, r->sid);
1345 } else {
1346 r->sid = NULL;
1349 if (ndr_flags & NDR_BUFFERS) {
1350 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
1351 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain));
1352 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forest));
1353 if (r->sid) {
1354 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1355 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
1356 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1357 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
1360 return NDR_ERR_SUCCESS;
1363 _PUBLIC_ void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DnsDomainInfo *r)
1365 ndr_print_struct(ndr, name, "lsa_DnsDomainInfo");
1366 ndr->depth++;
1367 ndr_print_lsa_StringLarge(ndr, "name", &r->name);
1368 ndr_print_lsa_StringLarge(ndr, "dns_domain", &r->dns_domain);
1369 ndr_print_lsa_StringLarge(ndr, "dns_forest", &r->dns_forest);
1370 ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
1371 ndr_print_ptr(ndr, "sid", r->sid);
1372 ndr->depth++;
1373 if (r->sid) {
1374 ndr_print_dom_sid2(ndr, "sid", r->sid);
1376 ndr->depth--;
1377 ndr->depth--;
1380 static enum ndr_err_code ndr_push_lsa_PolicyInfo(struct ndr_push *ndr, int ndr_flags, enum lsa_PolicyInfo r)
1382 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
1383 return NDR_ERR_SUCCESS;
1386 static enum ndr_err_code ndr_pull_lsa_PolicyInfo(struct ndr_pull *ndr, int ndr_flags, enum lsa_PolicyInfo *r)
1388 uint16_t v;
1389 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
1390 *r = v;
1391 return NDR_ERR_SUCCESS;
1394 _PUBLIC_ void ndr_print_lsa_PolicyInfo(struct ndr_print *ndr, const char *name, enum lsa_PolicyInfo r)
1396 const char *val = NULL;
1398 switch (r) {
1399 case LSA_POLICY_INFO_AUDIT_LOG: val = "LSA_POLICY_INFO_AUDIT_LOG"; break;
1400 case LSA_POLICY_INFO_AUDIT_EVENTS: val = "LSA_POLICY_INFO_AUDIT_EVENTS"; break;
1401 case LSA_POLICY_INFO_DOMAIN: val = "LSA_POLICY_INFO_DOMAIN"; break;
1402 case LSA_POLICY_INFO_PD: val = "LSA_POLICY_INFO_PD"; break;
1403 case LSA_POLICY_INFO_ACCOUNT_DOMAIN: val = "LSA_POLICY_INFO_ACCOUNT_DOMAIN"; break;
1404 case LSA_POLICY_INFO_ROLE: val = "LSA_POLICY_INFO_ROLE"; break;
1405 case LSA_POLICY_INFO_REPLICA: val = "LSA_POLICY_INFO_REPLICA"; break;
1406 case LSA_POLICY_INFO_QUOTA: val = "LSA_POLICY_INFO_QUOTA"; break;
1407 case LSA_POLICY_INFO_MOD: val = "LSA_POLICY_INFO_MOD"; break;
1408 case LSA_POLICY_INFO_AUDIT_FULL_SET: val = "LSA_POLICY_INFO_AUDIT_FULL_SET"; break;
1409 case LSA_POLICY_INFO_AUDIT_FULL_QUERY: val = "LSA_POLICY_INFO_AUDIT_FULL_QUERY"; break;
1410 case LSA_POLICY_INFO_DNS: val = "LSA_POLICY_INFO_DNS"; break;
1411 case LSA_POLICY_INFO_DNS_INT: val = "LSA_POLICY_INFO_DNS_INT"; break;
1412 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: val = "LSA_POLICY_INFO_L_ACCOUNT_DOMAIN"; break;
1414 ndr_print_enum(ndr, name, "ENUM", val, r);
1417 static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, int ndr_flags, const union lsa_PolicyInformation *r)
1419 if (ndr_flags & NDR_SCALARS) {
1420 int level = ndr_push_get_switch_value(ndr, r);
1421 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
1422 switch (level) {
1423 case LSA_POLICY_INFO_AUDIT_LOG: {
1424 NDR_CHECK(ndr_push_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log));
1425 break; }
1427 case LSA_POLICY_INFO_AUDIT_EVENTS: {
1428 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr, NDR_SCALARS, &r->audit_events));
1429 break; }
1431 case LSA_POLICY_INFO_DOMAIN: {
1432 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain));
1433 break; }
1435 case LSA_POLICY_INFO_PD: {
1436 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd));
1437 break; }
1439 case LSA_POLICY_INFO_ACCOUNT_DOMAIN: {
1440 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain));
1441 break; }
1443 case LSA_POLICY_INFO_ROLE: {
1444 NDR_CHECK(ndr_push_lsa_ServerRole(ndr, NDR_SCALARS, &r->role));
1445 break; }
1447 case LSA_POLICY_INFO_REPLICA: {
1448 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica));
1449 break; }
1451 case LSA_POLICY_INFO_QUOTA: {
1452 NDR_CHECK(ndr_push_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota));
1453 break; }
1455 case LSA_POLICY_INFO_MOD: {
1456 NDR_CHECK(ndr_push_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->mod));
1457 break; }
1459 case LSA_POLICY_INFO_AUDIT_FULL_SET: {
1460 NDR_CHECK(ndr_push_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset));
1461 break; }
1463 case LSA_POLICY_INFO_AUDIT_FULL_QUERY: {
1464 NDR_CHECK(ndr_push_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery));
1465 break; }
1467 case LSA_POLICY_INFO_DNS: {
1468 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1469 break; }
1471 case LSA_POLICY_INFO_DNS_INT: {
1472 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1473 break; }
1475 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: {
1476 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->l_account_domain));
1477 break; }
1479 default:
1480 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1483 if (ndr_flags & NDR_BUFFERS) {
1484 int level = ndr_push_get_switch_value(ndr, r);
1485 switch (level) {
1486 case LSA_POLICY_INFO_AUDIT_LOG:
1487 break;
1489 case LSA_POLICY_INFO_AUDIT_EVENTS:
1490 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr, NDR_BUFFERS, &r->audit_events));
1491 break;
1493 case LSA_POLICY_INFO_DOMAIN:
1494 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domain));
1495 break;
1497 case LSA_POLICY_INFO_PD:
1498 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr, NDR_BUFFERS, &r->pd));
1499 break;
1501 case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
1502 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->account_domain));
1503 break;
1505 case LSA_POLICY_INFO_ROLE:
1506 break;
1508 case LSA_POLICY_INFO_REPLICA:
1509 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr, NDR_BUFFERS, &r->replica));
1510 break;
1512 case LSA_POLICY_INFO_QUOTA:
1513 break;
1515 case LSA_POLICY_INFO_MOD:
1516 break;
1518 case LSA_POLICY_INFO_AUDIT_FULL_SET:
1519 break;
1521 case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
1522 break;
1524 case LSA_POLICY_INFO_DNS:
1525 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1526 break;
1528 case LSA_POLICY_INFO_DNS_INT:
1529 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1530 break;
1532 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
1533 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->l_account_domain));
1534 break;
1536 default:
1537 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1540 return NDR_ERR_SUCCESS;
1543 static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, int ndr_flags, union lsa_PolicyInformation *r)
1545 int level;
1546 uint16_t _level;
1547 level = ndr_pull_get_switch_value(ndr, r);
1548 if (ndr_flags & NDR_SCALARS) {
1549 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
1550 if (_level != level) {
1551 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1553 switch (level) {
1554 case LSA_POLICY_INFO_AUDIT_LOG: {
1555 NDR_CHECK(ndr_pull_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log));
1556 break; }
1558 case LSA_POLICY_INFO_AUDIT_EVENTS: {
1559 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr, NDR_SCALARS, &r->audit_events));
1560 break; }
1562 case LSA_POLICY_INFO_DOMAIN: {
1563 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain));
1564 break; }
1566 case LSA_POLICY_INFO_PD: {
1567 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd));
1568 break; }
1570 case LSA_POLICY_INFO_ACCOUNT_DOMAIN: {
1571 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain));
1572 break; }
1574 case LSA_POLICY_INFO_ROLE: {
1575 NDR_CHECK(ndr_pull_lsa_ServerRole(ndr, NDR_SCALARS, &r->role));
1576 break; }
1578 case LSA_POLICY_INFO_REPLICA: {
1579 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica));
1580 break; }
1582 case LSA_POLICY_INFO_QUOTA: {
1583 NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota));
1584 break; }
1586 case LSA_POLICY_INFO_MOD: {
1587 NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->mod));
1588 break; }
1590 case LSA_POLICY_INFO_AUDIT_FULL_SET: {
1591 NDR_CHECK(ndr_pull_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset));
1592 break; }
1594 case LSA_POLICY_INFO_AUDIT_FULL_QUERY: {
1595 NDR_CHECK(ndr_pull_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery));
1596 break; }
1598 case LSA_POLICY_INFO_DNS: {
1599 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1600 break; }
1602 case LSA_POLICY_INFO_DNS_INT: {
1603 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
1604 break; }
1606 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: {
1607 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->l_account_domain));
1608 break; }
1610 default:
1611 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1614 if (ndr_flags & NDR_BUFFERS) {
1615 switch (level) {
1616 case LSA_POLICY_INFO_AUDIT_LOG:
1617 break;
1619 case LSA_POLICY_INFO_AUDIT_EVENTS:
1620 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr, NDR_BUFFERS, &r->audit_events));
1621 break;
1623 case LSA_POLICY_INFO_DOMAIN:
1624 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domain));
1625 break;
1627 case LSA_POLICY_INFO_PD:
1628 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_BUFFERS, &r->pd));
1629 break;
1631 case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
1632 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->account_domain));
1633 break;
1635 case LSA_POLICY_INFO_ROLE:
1636 break;
1638 case LSA_POLICY_INFO_REPLICA:
1639 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_BUFFERS, &r->replica));
1640 break;
1642 case LSA_POLICY_INFO_QUOTA:
1643 break;
1645 case LSA_POLICY_INFO_MOD:
1646 break;
1648 case LSA_POLICY_INFO_AUDIT_FULL_SET:
1649 break;
1651 case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
1652 break;
1654 case LSA_POLICY_INFO_DNS:
1655 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1656 break;
1658 case LSA_POLICY_INFO_DNS_INT:
1659 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
1660 break;
1662 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
1663 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->l_account_domain));
1664 break;
1666 default:
1667 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1670 return NDR_ERR_SUCCESS;
1673 _PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char *name, const union lsa_PolicyInformation *r)
1675 int level;
1676 level = ndr_print_get_switch_value(ndr, r);
1677 ndr_print_union(ndr, name, level, "lsa_PolicyInformation");
1678 switch (level) {
1679 case LSA_POLICY_INFO_AUDIT_LOG:
1680 ndr_print_lsa_AuditLogInfo(ndr, "audit_log", &r->audit_log);
1681 break;
1683 case LSA_POLICY_INFO_AUDIT_EVENTS:
1684 ndr_print_lsa_AuditEventsInfo(ndr, "audit_events", &r->audit_events);
1685 break;
1687 case LSA_POLICY_INFO_DOMAIN:
1688 ndr_print_lsa_DomainInfo(ndr, "domain", &r->domain);
1689 break;
1691 case LSA_POLICY_INFO_PD:
1692 ndr_print_lsa_PDAccountInfo(ndr, "pd", &r->pd);
1693 break;
1695 case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
1696 ndr_print_lsa_DomainInfo(ndr, "account_domain", &r->account_domain);
1697 break;
1699 case LSA_POLICY_INFO_ROLE:
1700 ndr_print_lsa_ServerRole(ndr, "role", &r->role);
1701 break;
1703 case LSA_POLICY_INFO_REPLICA:
1704 ndr_print_lsa_ReplicaSourceInfo(ndr, "replica", &r->replica);
1705 break;
1707 case LSA_POLICY_INFO_QUOTA:
1708 ndr_print_lsa_DefaultQuotaInfo(ndr, "quota", &r->quota);
1709 break;
1711 case LSA_POLICY_INFO_MOD:
1712 ndr_print_lsa_ModificationInfo(ndr, "mod", &r->mod);
1713 break;
1715 case LSA_POLICY_INFO_AUDIT_FULL_SET:
1716 ndr_print_lsa_AuditFullSetInfo(ndr, "auditfullset", &r->auditfullset);
1717 break;
1719 case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
1720 ndr_print_lsa_AuditFullQueryInfo(ndr, "auditfullquery", &r->auditfullquery);
1721 break;
1723 case LSA_POLICY_INFO_DNS:
1724 ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
1725 break;
1727 case LSA_POLICY_INFO_DNS_INT:
1728 ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
1729 break;
1731 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
1732 ndr_print_lsa_DomainInfo(ndr, "l_account_domain", &r->l_account_domain);
1733 break;
1735 default:
1736 ndr_print_bad_level(ndr, name, level);
1740 static enum ndr_err_code ndr_push_lsa_SidPtr(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidPtr *r)
1742 if (ndr_flags & NDR_SCALARS) {
1743 NDR_CHECK(ndr_push_align(ndr, 4));
1744 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
1746 if (ndr_flags & NDR_BUFFERS) {
1747 if (r->sid) {
1748 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1751 return NDR_ERR_SUCCESS;
1754 static enum ndr_err_code ndr_pull_lsa_SidPtr(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidPtr *r)
1756 uint32_t _ptr_sid;
1757 TALLOC_CTX *_mem_save_sid_0;
1758 if (ndr_flags & NDR_SCALARS) {
1759 NDR_CHECK(ndr_pull_align(ndr, 4));
1760 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
1761 if (_ptr_sid) {
1762 NDR_PULL_ALLOC(ndr, r->sid);
1763 } else {
1764 r->sid = NULL;
1767 if (ndr_flags & NDR_BUFFERS) {
1768 if (r->sid) {
1769 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1770 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
1771 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
1772 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
1775 return NDR_ERR_SUCCESS;
1778 _PUBLIC_ void ndr_print_lsa_SidPtr(struct ndr_print *ndr, const char *name, const struct lsa_SidPtr *r)
1780 ndr_print_struct(ndr, name, "lsa_SidPtr");
1781 ndr->depth++;
1782 ndr_print_ptr(ndr, "sid", r->sid);
1783 ndr->depth++;
1784 if (r->sid) {
1785 ndr_print_dom_sid2(ndr, "sid", r->sid);
1787 ndr->depth--;
1788 ndr->depth--;
1791 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidArray *r)
1793 uint32_t cntr_sids_1;
1794 if (ndr_flags & NDR_SCALARS) {
1795 NDR_CHECK(ndr_push_align(ndr, 4));
1796 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
1797 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
1799 if (ndr_flags & NDR_BUFFERS) {
1800 if (r->sids) {
1801 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
1802 for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
1803 NDR_CHECK(ndr_push_lsa_SidPtr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1805 for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
1806 NDR_CHECK(ndr_push_lsa_SidPtr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1810 return NDR_ERR_SUCCESS;
1813 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidArray *r)
1815 uint32_t _ptr_sids;
1816 uint32_t cntr_sids_1;
1817 TALLOC_CTX *_mem_save_sids_0;
1818 TALLOC_CTX *_mem_save_sids_1;
1819 if (ndr_flags & NDR_SCALARS) {
1820 NDR_CHECK(ndr_pull_align(ndr, 4));
1821 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
1822 if (r->num_sids > 1000) {
1823 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1825 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
1826 if (_ptr_sids) {
1827 NDR_PULL_ALLOC(ndr, r->sids);
1828 } else {
1829 r->sids = NULL;
1832 if (ndr_flags & NDR_BUFFERS) {
1833 if (r->sids) {
1834 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
1835 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1836 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
1837 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
1838 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
1839 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
1840 for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
1841 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
1843 for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
1844 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
1846 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
1847 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
1849 if (r->sids) {
1850 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
1853 return NDR_ERR_SUCCESS;
1856 _PUBLIC_ void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, const struct lsa_SidArray *r)
1858 uint32_t cntr_sids_1;
1859 ndr_print_struct(ndr, name, "lsa_SidArray");
1860 ndr->depth++;
1861 ndr_print_uint32(ndr, "num_sids", r->num_sids);
1862 ndr_print_ptr(ndr, "sids", r->sids);
1863 ndr->depth++;
1864 if (r->sids) {
1865 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->num_sids);
1866 ndr->depth++;
1867 for (cntr_sids_1=0;cntr_sids_1<r->num_sids;cntr_sids_1++) {
1868 char *idx_1=NULL;
1869 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
1870 ndr_print_lsa_SidPtr(ndr, "sids", &r->sids[cntr_sids_1]);
1871 free(idx_1);
1874 ndr->depth--;
1876 ndr->depth--;
1877 ndr->depth--;
1880 static enum ndr_err_code ndr_push_lsa_DomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainList *r)
1882 uint32_t cntr_domains_1;
1883 if (ndr_flags & NDR_SCALARS) {
1884 NDR_CHECK(ndr_push_align(ndr, 4));
1885 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1886 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
1888 if (ndr_flags & NDR_BUFFERS) {
1889 if (r->domains) {
1890 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1891 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
1892 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
1894 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
1895 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
1899 return NDR_ERR_SUCCESS;
1902 static enum ndr_err_code ndr_pull_lsa_DomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainList *r)
1904 uint32_t _ptr_domains;
1905 uint32_t cntr_domains_1;
1906 TALLOC_CTX *_mem_save_domains_0;
1907 TALLOC_CTX *_mem_save_domains_1;
1908 if (ndr_flags & NDR_SCALARS) {
1909 NDR_CHECK(ndr_pull_align(ndr, 4));
1910 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1911 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
1912 if (_ptr_domains) {
1913 NDR_PULL_ALLOC(ndr, r->domains);
1914 } else {
1915 r->domains = NULL;
1918 if (ndr_flags & NDR_BUFFERS) {
1919 if (r->domains) {
1920 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
1921 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
1922 NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
1923 NDR_PULL_ALLOC_N(ndr, r->domains, ndr_get_array_size(ndr, &r->domains));
1924 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
1925 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
1926 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
1927 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
1929 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
1930 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
1932 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
1933 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
1935 if (r->domains) {
1936 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
1939 return NDR_ERR_SUCCESS;
1942 _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, const struct lsa_DomainList *r)
1944 uint32_t cntr_domains_1;
1945 ndr_print_struct(ndr, name, "lsa_DomainList");
1946 ndr->depth++;
1947 ndr_print_uint32(ndr, "count", r->count);
1948 ndr_print_ptr(ndr, "domains", r->domains);
1949 ndr->depth++;
1950 if (r->domains) {
1951 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
1952 ndr->depth++;
1953 for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
1954 char *idx_1=NULL;
1955 if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
1956 ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
1957 free(idx_1);
1960 ndr->depth--;
1962 ndr->depth--;
1963 ndr->depth--;
1966 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SidType(struct ndr_push *ndr, int ndr_flags, enum lsa_SidType r)
1968 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
1969 return NDR_ERR_SUCCESS;
1972 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidType(struct ndr_pull *ndr, int ndr_flags, enum lsa_SidType *r)
1974 uint16_t v;
1975 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
1976 *r = v;
1977 return NDR_ERR_SUCCESS;
1980 _PUBLIC_ void ndr_print_lsa_SidType(struct ndr_print *ndr, const char *name, enum lsa_SidType r)
1982 const char *val = NULL;
1984 switch (r) {
1985 case SID_NAME_USE_NONE: val = "SID_NAME_USE_NONE"; break;
1986 case SID_NAME_USER: val = "SID_NAME_USER"; break;
1987 case SID_NAME_DOM_GRP: val = "SID_NAME_DOM_GRP"; break;
1988 case SID_NAME_DOMAIN: val = "SID_NAME_DOMAIN"; break;
1989 case SID_NAME_ALIAS: val = "SID_NAME_ALIAS"; break;
1990 case SID_NAME_WKN_GRP: val = "SID_NAME_WKN_GRP"; break;
1991 case SID_NAME_DELETED: val = "SID_NAME_DELETED"; break;
1992 case SID_NAME_INVALID: val = "SID_NAME_INVALID"; break;
1993 case SID_NAME_UNKNOWN: val = "SID_NAME_UNKNOWN"; break;
1994 case SID_NAME_COMPUTER: val = "SID_NAME_COMPUTER"; break;
1996 ndr_print_enum(ndr, name, "ENUM", val, r);
1999 static enum ndr_err_code ndr_push_lsa_TranslatedSid(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid *r)
2001 if (ndr_flags & NDR_SCALARS) {
2002 NDR_CHECK(ndr_push_align(ndr, 4));
2003 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
2004 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
2005 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
2007 if (ndr_flags & NDR_BUFFERS) {
2009 return NDR_ERR_SUCCESS;
2012 static enum ndr_err_code ndr_pull_lsa_TranslatedSid(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid *r)
2014 if (ndr_flags & NDR_SCALARS) {
2015 NDR_CHECK(ndr_pull_align(ndr, 4));
2016 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
2017 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
2018 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
2020 if (ndr_flags & NDR_BUFFERS) {
2022 return NDR_ERR_SUCCESS;
2025 _PUBLIC_ void ndr_print_lsa_TranslatedSid(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid *r)
2027 ndr_print_struct(ndr, name, "lsa_TranslatedSid");
2028 ndr->depth++;
2029 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
2030 ndr_print_uint32(ndr, "rid", r->rid);
2031 ndr_print_uint32(ndr, "sid_index", r->sid_index);
2032 ndr->depth--;
2035 static enum ndr_err_code ndr_push_lsa_TransSidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray *r)
2037 uint32_t cntr_sids_1;
2038 if (ndr_flags & NDR_SCALARS) {
2039 NDR_CHECK(ndr_push_align(ndr, 4));
2040 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2041 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
2043 if (ndr_flags & NDR_BUFFERS) {
2044 if (r->sids) {
2045 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2046 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
2047 NDR_CHECK(ndr_push_lsa_TranslatedSid(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
2051 return NDR_ERR_SUCCESS;
2054 static enum ndr_err_code ndr_pull_lsa_TransSidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray *r)
2056 uint32_t _ptr_sids;
2057 uint32_t cntr_sids_1;
2058 TALLOC_CTX *_mem_save_sids_0;
2059 TALLOC_CTX *_mem_save_sids_1;
2060 if (ndr_flags & NDR_SCALARS) {
2061 NDR_CHECK(ndr_pull_align(ndr, 4));
2062 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2063 if (r->count > 1000) {
2064 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2066 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
2067 if (_ptr_sids) {
2068 NDR_PULL_ALLOC(ndr, r->sids);
2069 } else {
2070 r->sids = NULL;
2073 if (ndr_flags & NDR_BUFFERS) {
2074 if (r->sids) {
2075 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
2076 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
2077 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
2078 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
2079 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
2080 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
2081 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
2082 NDR_CHECK(ndr_pull_lsa_TranslatedSid(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
2084 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
2085 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
2087 if (r->sids) {
2088 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
2091 return NDR_ERR_SUCCESS;
2094 _PUBLIC_ void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray *r)
2096 uint32_t cntr_sids_1;
2097 ndr_print_struct(ndr, name, "lsa_TransSidArray");
2098 ndr->depth++;
2099 ndr_print_uint32(ndr, "count", r->count);
2100 ndr_print_ptr(ndr, "sids", r->sids);
2101 ndr->depth++;
2102 if (r->sids) {
2103 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
2104 ndr->depth++;
2105 for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
2106 char *idx_1=NULL;
2107 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
2108 ndr_print_lsa_TranslatedSid(ndr, "sids", &r->sids[cntr_sids_1]);
2109 free(idx_1);
2112 ndr->depth--;
2114 ndr->depth--;
2115 ndr->depth--;
2118 static enum ndr_err_code ndr_push_lsa_RefDomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_RefDomainList *r)
2120 uint32_t cntr_domains_1;
2121 if (ndr_flags & NDR_SCALARS) {
2122 NDR_CHECK(ndr_push_align(ndr, 4));
2123 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2124 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
2125 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_size));
2127 if (ndr_flags & NDR_BUFFERS) {
2128 if (r->domains) {
2129 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2130 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2131 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
2133 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2134 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
2138 return NDR_ERR_SUCCESS;
2141 static enum ndr_err_code ndr_pull_lsa_RefDomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_RefDomainList *r)
2143 uint32_t _ptr_domains;
2144 uint32_t cntr_domains_1;
2145 TALLOC_CTX *_mem_save_domains_0;
2146 TALLOC_CTX *_mem_save_domains_1;
2147 if (ndr_flags & NDR_SCALARS) {
2148 NDR_CHECK(ndr_pull_align(ndr, 4));
2149 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2150 if (r->count > 1000) {
2151 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2153 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
2154 if (_ptr_domains) {
2155 NDR_PULL_ALLOC(ndr, r->domains);
2156 } else {
2157 r->domains = NULL;
2159 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_size));
2161 if (ndr_flags & NDR_BUFFERS) {
2162 if (r->domains) {
2163 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
2164 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
2165 NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
2166 NDR_PULL_ALLOC_N(ndr, r->domains, ndr_get_array_size(ndr, &r->domains));
2167 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
2168 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
2169 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2170 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
2172 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
2173 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
2175 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
2176 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
2178 if (r->domains) {
2179 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
2182 return NDR_ERR_SUCCESS;
2185 _PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *name, const struct lsa_RefDomainList *r)
2187 uint32_t cntr_domains_1;
2188 ndr_print_struct(ndr, name, "lsa_RefDomainList");
2189 ndr->depth++;
2190 ndr_print_uint32(ndr, "count", r->count);
2191 ndr_print_ptr(ndr, "domains", r->domains);
2192 ndr->depth++;
2193 if (r->domains) {
2194 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
2195 ndr->depth++;
2196 for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
2197 char *idx_1=NULL;
2198 if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
2199 ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
2200 free(idx_1);
2203 ndr->depth--;
2205 ndr->depth--;
2206 ndr_print_uint32(ndr, "max_size", r->max_size);
2207 ndr->depth--;
2210 static enum ndr_err_code ndr_push_lsa_LookupNamesLevel(struct ndr_push *ndr, int ndr_flags, enum lsa_LookupNamesLevel r)
2212 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
2213 return NDR_ERR_SUCCESS;
2216 static enum ndr_err_code ndr_pull_lsa_LookupNamesLevel(struct ndr_pull *ndr, int ndr_flags, enum lsa_LookupNamesLevel *r)
2218 uint16_t v;
2219 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
2220 *r = v;
2221 return NDR_ERR_SUCCESS;
2224 _PUBLIC_ void ndr_print_lsa_LookupNamesLevel(struct ndr_print *ndr, const char *name, enum lsa_LookupNamesLevel r)
2226 const char *val = NULL;
2228 switch (r) {
2229 case LSA_LOOKUP_NAMES_ALL: val = "LSA_LOOKUP_NAMES_ALL"; break;
2230 case LSA_LOOKUP_NAMES_DOMAINS_ONLY: val = "LSA_LOOKUP_NAMES_DOMAINS_ONLY"; break;
2231 case LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY: val = "LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY"; break;
2232 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY: val = "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY"; break;
2233 case LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY: val = "LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY"; break;
2234 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2: val = "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2"; break;
2235 case LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC: val = "LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC"; break;
2237 ndr_print_enum(ndr, name, "ENUM", val, r);
2240 static enum ndr_err_code ndr_push_lsa_TranslatedName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName *r)
2242 if (ndr_flags & NDR_SCALARS) {
2243 NDR_CHECK(ndr_push_align(ndr, 4));
2244 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
2245 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
2246 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
2248 if (ndr_flags & NDR_BUFFERS) {
2249 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
2251 return NDR_ERR_SUCCESS;
2254 static enum ndr_err_code ndr_pull_lsa_TranslatedName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName *r)
2256 if (ndr_flags & NDR_SCALARS) {
2257 NDR_CHECK(ndr_pull_align(ndr, 4));
2258 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
2259 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
2260 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
2262 if (ndr_flags & NDR_BUFFERS) {
2263 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
2265 return NDR_ERR_SUCCESS;
2268 _PUBLIC_ void ndr_print_lsa_TranslatedName(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName *r)
2270 ndr_print_struct(ndr, name, "lsa_TranslatedName");
2271 ndr->depth++;
2272 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
2273 ndr_print_lsa_String(ndr, "name", &r->name);
2274 ndr_print_uint32(ndr, "sid_index", r->sid_index);
2275 ndr->depth--;
2278 static enum ndr_err_code ndr_push_lsa_TransNameArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray *r)
2280 uint32_t cntr_names_1;
2281 if (ndr_flags & NDR_SCALARS) {
2282 NDR_CHECK(ndr_push_align(ndr, 4));
2283 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2284 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
2286 if (ndr_flags & NDR_BUFFERS) {
2287 if (r->names) {
2288 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2289 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
2290 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
2292 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
2293 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
2297 return NDR_ERR_SUCCESS;
2300 static enum ndr_err_code ndr_pull_lsa_TransNameArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray *r)
2302 uint32_t _ptr_names;
2303 uint32_t cntr_names_1;
2304 TALLOC_CTX *_mem_save_names_0;
2305 TALLOC_CTX *_mem_save_names_1;
2306 if (ndr_flags & NDR_SCALARS) {
2307 NDR_CHECK(ndr_pull_align(ndr, 4));
2308 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2309 if (r->count > 1000) {
2310 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2312 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
2313 if (_ptr_names) {
2314 NDR_PULL_ALLOC(ndr, r->names);
2315 } else {
2316 r->names = NULL;
2319 if (ndr_flags & NDR_BUFFERS) {
2320 if (r->names) {
2321 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
2322 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
2323 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
2324 NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
2325 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
2326 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
2327 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
2328 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
2330 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
2331 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
2333 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
2334 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
2336 if (r->names) {
2337 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
2340 return NDR_ERR_SUCCESS;
2343 _PUBLIC_ void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray *r)
2345 uint32_t cntr_names_1;
2346 ndr_print_struct(ndr, name, "lsa_TransNameArray");
2347 ndr->depth++;
2348 ndr_print_uint32(ndr, "count", r->count);
2349 ndr_print_ptr(ndr, "names", r->names);
2350 ndr->depth++;
2351 if (r->names) {
2352 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
2353 ndr->depth++;
2354 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
2355 char *idx_1=NULL;
2356 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
2357 ndr_print_lsa_TranslatedName(ndr, "names", &r->names[cntr_names_1]);
2358 free(idx_1);
2361 ndr->depth--;
2363 ndr->depth--;
2364 ndr->depth--;
2367 static enum ndr_err_code ndr_push_lsa_LUIDAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUIDAttribute *r)
2369 if (ndr_flags & NDR_SCALARS) {
2370 NDR_CHECK(ndr_push_align(ndr, 4));
2371 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
2372 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attribute));
2374 if (ndr_flags & NDR_BUFFERS) {
2376 return NDR_ERR_SUCCESS;
2379 static enum ndr_err_code ndr_pull_lsa_LUIDAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUIDAttribute *r)
2381 if (ndr_flags & NDR_SCALARS) {
2382 NDR_CHECK(ndr_pull_align(ndr, 4));
2383 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
2384 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attribute));
2386 if (ndr_flags & NDR_BUFFERS) {
2388 return NDR_ERR_SUCCESS;
2391 _PUBLIC_ void ndr_print_lsa_LUIDAttribute(struct ndr_print *ndr, const char *name, const struct lsa_LUIDAttribute *r)
2393 ndr_print_struct(ndr, name, "lsa_LUIDAttribute");
2394 ndr->depth++;
2395 ndr_print_lsa_LUID(ndr, "luid", &r->luid);
2396 ndr_print_uint32(ndr, "attribute", r->attribute);
2397 ndr->depth--;
2400 static enum ndr_err_code ndr_push_lsa_PrivilegeSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivilegeSet *r)
2402 uint32_t cntr_set_0;
2403 if (ndr_flags & NDR_SCALARS) {
2404 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2405 NDR_CHECK(ndr_push_align(ndr, 4));
2406 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2407 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
2408 for (cntr_set_0 = 0; cntr_set_0 < r->count; cntr_set_0++) {
2409 NDR_CHECK(ndr_push_lsa_LUIDAttribute(ndr, NDR_SCALARS, &r->set[cntr_set_0]));
2412 if (ndr_flags & NDR_BUFFERS) {
2414 return NDR_ERR_SUCCESS;
2417 static enum ndr_err_code ndr_pull_lsa_PrivilegeSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivilegeSet *r)
2419 uint32_t cntr_set_0;
2420 TALLOC_CTX *_mem_save_set_0;
2421 if (ndr_flags & NDR_SCALARS) {
2422 NDR_CHECK(ndr_pull_array_size(ndr, &r->set));
2423 NDR_CHECK(ndr_pull_align(ndr, 4));
2424 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2425 if (r->count > 1000) {
2426 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2428 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
2429 NDR_PULL_ALLOC_N(ndr, r->set, ndr_get_array_size(ndr, &r->set));
2430 _mem_save_set_0 = NDR_PULL_GET_MEM_CTX(ndr);
2431 NDR_PULL_SET_MEM_CTX(ndr, r->set, 0);
2432 for (cntr_set_0 = 0; cntr_set_0 < r->count; cntr_set_0++) {
2433 NDR_CHECK(ndr_pull_lsa_LUIDAttribute(ndr, NDR_SCALARS, &r->set[cntr_set_0]));
2435 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_set_0, 0);
2436 if (r->set) {
2437 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->set, r->count));
2440 if (ndr_flags & NDR_BUFFERS) {
2442 return NDR_ERR_SUCCESS;
2445 _PUBLIC_ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name, const struct lsa_PrivilegeSet *r)
2447 uint32_t cntr_set_0;
2448 ndr_print_struct(ndr, name, "lsa_PrivilegeSet");
2449 ndr->depth++;
2450 ndr_print_uint32(ndr, "count", r->count);
2451 ndr_print_uint32(ndr, "unknown", r->unknown);
2452 ndr->print(ndr, "%s: ARRAY(%d)", "set", (int)r->count);
2453 ndr->depth++;
2454 for (cntr_set_0=0;cntr_set_0<r->count;cntr_set_0++) {
2455 char *idx_0=NULL;
2456 if (asprintf(&idx_0, "[%d]", cntr_set_0) != -1) {
2457 ndr_print_lsa_LUIDAttribute(ndr, "set", &r->set[cntr_set_0]);
2458 free(idx_0);
2461 ndr->depth--;
2462 ndr->depth--;
2465 static enum ndr_err_code ndr_push_lsa_DATA_BUF(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF *r)
2468 uint32_t _flags_save_STRUCT = ndr->flags;
2469 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2470 if (ndr_flags & NDR_SCALARS) {
2471 NDR_CHECK(ndr_push_align(ndr, 4));
2472 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
2473 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2474 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
2476 if (ndr_flags & NDR_BUFFERS) {
2477 if (r->data) {
2478 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2479 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2480 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
2481 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
2484 ndr->flags = _flags_save_STRUCT;
2486 return NDR_ERR_SUCCESS;
2489 static enum ndr_err_code ndr_pull_lsa_DATA_BUF(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF *r)
2491 uint32_t _ptr_data;
2492 TALLOC_CTX *_mem_save_data_0;
2494 uint32_t _flags_save_STRUCT = ndr->flags;
2495 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2496 if (ndr_flags & NDR_SCALARS) {
2497 NDR_CHECK(ndr_pull_align(ndr, 4));
2498 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
2499 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2500 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2501 if (_ptr_data) {
2502 NDR_PULL_ALLOC(ndr, r->data);
2503 } else {
2504 r->data = NULL;
2507 if (ndr_flags & NDR_BUFFERS) {
2508 if (r->data) {
2509 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2510 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
2511 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
2512 NDR_CHECK(ndr_pull_array_length(ndr, &r->data));
2513 if (ndr_get_array_length(ndr, &r->data) > ndr_get_array_size(ndr, &r->data)) {
2514 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));
2516 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
2517 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_length(ndr, &r->data)));
2518 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2520 if (r->data) {
2521 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->size));
2523 if (r->data) {
2524 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->data, r->length));
2527 ndr->flags = _flags_save_STRUCT;
2529 return NDR_ERR_SUCCESS;
2532 _PUBLIC_ void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF *r)
2534 ndr_print_struct(ndr, name, "lsa_DATA_BUF");
2536 uint32_t _flags_save_STRUCT = ndr->flags;
2537 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2538 ndr->depth++;
2539 ndr_print_uint32(ndr, "length", r->length);
2540 ndr_print_uint32(ndr, "size", r->size);
2541 ndr_print_ptr(ndr, "data", r->data);
2542 ndr->depth++;
2543 if (r->data) {
2544 ndr_print_array_uint8(ndr, "data", r->data, r->length);
2546 ndr->depth--;
2547 ndr->depth--;
2548 ndr->flags = _flags_save_STRUCT;
2552 static enum ndr_err_code ndr_push_lsa_DATA_BUF2(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF2 *r)
2555 uint32_t _flags_save_STRUCT = ndr->flags;
2556 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2557 if (ndr_flags & NDR_SCALARS) {
2558 NDR_CHECK(ndr_push_align(ndr, 4));
2559 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2560 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
2562 if (ndr_flags & NDR_BUFFERS) {
2563 if (r->data) {
2564 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2565 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->size));
2568 ndr->flags = _flags_save_STRUCT;
2570 return NDR_ERR_SUCCESS;
2573 static enum ndr_err_code ndr_pull_lsa_DATA_BUF2(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF2 *r)
2575 uint32_t _ptr_data;
2576 TALLOC_CTX *_mem_save_data_0;
2578 uint32_t _flags_save_STRUCT = ndr->flags;
2579 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2580 if (ndr_flags & NDR_SCALARS) {
2581 NDR_CHECK(ndr_pull_align(ndr, 4));
2582 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2583 if (r->size > 65536) {
2584 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2586 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2587 if (_ptr_data) {
2588 NDR_PULL_ALLOC(ndr, r->data);
2589 } else {
2590 r->data = NULL;
2593 if (ndr_flags & NDR_BUFFERS) {
2594 if (r->data) {
2595 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2596 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
2597 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
2598 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
2599 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
2600 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2602 if (r->data) {
2603 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->size));
2606 ndr->flags = _flags_save_STRUCT;
2608 return NDR_ERR_SUCCESS;
2611 _PUBLIC_ void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF2 *r)
2613 ndr_print_struct(ndr, name, "lsa_DATA_BUF2");
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, "size", r->size);
2619 ndr_print_ptr(ndr, "data", r->data);
2620 ndr->depth++;
2621 if (r->data) {
2622 ndr_print_array_uint8(ndr, "data", r->data, r->size);
2624 ndr->depth--;
2625 ndr->depth--;
2626 ndr->flags = _flags_save_STRUCT;
2630 static enum ndr_err_code ndr_push_lsa_TrustDomInfoEnum(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum r)
2632 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
2633 return NDR_ERR_SUCCESS;
2636 static enum ndr_err_code ndr_pull_lsa_TrustDomInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum *r)
2638 uint16_t v;
2639 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
2640 *r = v;
2641 return NDR_ERR_SUCCESS;
2644 _PUBLIC_ void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *name, enum lsa_TrustDomInfoEnum r)
2646 const char *val = NULL;
2648 switch (r) {
2649 case LSA_TRUSTED_DOMAIN_INFO_NAME: val = "LSA_TRUSTED_DOMAIN_INFO_NAME"; break;
2650 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: val = "LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS"; break;
2651 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: val = "LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET"; break;
2652 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: val = "LSA_TRUSTED_DOMAIN_INFO_PASSWORD"; break;
2653 case LSA_TRUSTED_DOMAIN_INFO_BASIC: val = "LSA_TRUSTED_DOMAIN_INFO_BASIC"; break;
2654 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX"; break;
2655 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO"; break;
2656 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO"; break;
2657 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL"; break;
2658 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL"; break;
2659 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL"; break;
2660 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL"; break;
2661 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: val = "LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES"; break;
2663 ndr_print_enum(ndr, name, "ENUM", val, r);
2666 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustDirection(struct ndr_push *ndr, int ndr_flags, uint32_t r)
2668 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2669 return NDR_ERR_SUCCESS;
2672 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustDirection(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
2674 uint32_t v;
2675 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2676 *r = v;
2677 return NDR_ERR_SUCCESS;
2680 _PUBLIC_ void ndr_print_lsa_TrustDirection(struct ndr_print *ndr, const char *name, uint32_t r)
2682 ndr_print_uint32(ndr, name, r);
2683 ndr->depth++;
2684 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_DIRECTION_INBOUND", LSA_TRUST_DIRECTION_INBOUND, r);
2685 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_DIRECTION_OUTBOUND", LSA_TRUST_DIRECTION_OUTBOUND, r);
2686 ndr->depth--;
2689 static enum ndr_err_code ndr_push_lsa_TrustType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustType r)
2691 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2692 return NDR_ERR_SUCCESS;
2695 static enum ndr_err_code ndr_pull_lsa_TrustType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustType *r)
2697 uint32_t v;
2698 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2699 *r = v;
2700 return NDR_ERR_SUCCESS;
2703 _PUBLIC_ void ndr_print_lsa_TrustType(struct ndr_print *ndr, const char *name, enum lsa_TrustType r)
2705 const char *val = NULL;
2707 switch (r) {
2708 case LSA_TRUST_TYPE_DOWNLEVEL: val = "LSA_TRUST_TYPE_DOWNLEVEL"; break;
2709 case LSA_TRUST_TYPE_UPLEVEL: val = "LSA_TRUST_TYPE_UPLEVEL"; break;
2710 case LSA_TRUST_TYPE_MIT: val = "LSA_TRUST_TYPE_MIT"; break;
2712 ndr_print_enum(ndr, name, "ENUM", val, r);
2715 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r)
2717 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2718 return NDR_ERR_SUCCESS;
2721 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
2723 uint32_t v;
2724 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2725 *r = v;
2726 return NDR_ERR_SUCCESS;
2729 _PUBLIC_ void ndr_print_lsa_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r)
2731 ndr_print_uint32(ndr, name, r);
2732 ndr->depth++;
2733 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE", LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE, r);
2734 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY", LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY, r);
2735 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN", LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN, r);
2736 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE", LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE, r);
2737 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION", LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION, r);
2738 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_WITHIN_FOREST", LSA_TRUST_ATTRIBUTE_WITHIN_FOREST, r);
2739 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL", LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL, r);
2740 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION", LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION, r);
2741 ndr->depth--;
2744 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoName *r)
2746 if (ndr_flags & NDR_SCALARS) {
2747 NDR_CHECK(ndr_push_align(ndr, 4));
2748 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
2750 if (ndr_flags & NDR_BUFFERS) {
2751 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
2753 return NDR_ERR_SUCCESS;
2756 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoName *r)
2758 if (ndr_flags & NDR_SCALARS) {
2759 NDR_CHECK(ndr_pull_align(ndr, 4));
2760 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
2762 if (ndr_flags & NDR_BUFFERS) {
2763 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
2765 return NDR_ERR_SUCCESS;
2768 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoName *r)
2770 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoName");
2771 ndr->depth++;
2772 ndr_print_lsa_StringLarge(ndr, "netbios_name", &r->netbios_name);
2773 ndr->depth--;
2776 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoControllers(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoControllers *r)
2778 uint32_t cntr_netbios_names_1;
2779 if (ndr_flags & NDR_SCALARS) {
2780 NDR_CHECK(ndr_push_align(ndr, 4));
2781 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries));
2782 NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_names));
2784 if (ndr_flags & NDR_BUFFERS) {
2785 if (r->netbios_names) {
2786 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries));
2787 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
2788 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_names[cntr_netbios_names_1]));
2790 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
2791 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_names[cntr_netbios_names_1]));
2795 return NDR_ERR_SUCCESS;
2798 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoControllers(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoControllers *r)
2800 uint32_t _ptr_netbios_names;
2801 uint32_t cntr_netbios_names_1;
2802 TALLOC_CTX *_mem_save_netbios_names_0;
2803 TALLOC_CTX *_mem_save_netbios_names_1;
2804 if (ndr_flags & NDR_SCALARS) {
2805 NDR_CHECK(ndr_pull_align(ndr, 4));
2806 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->entries));
2807 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_names));
2808 if (_ptr_netbios_names) {
2809 NDR_PULL_ALLOC(ndr, r->netbios_names);
2810 } else {
2811 r->netbios_names = NULL;
2814 if (ndr_flags & NDR_BUFFERS) {
2815 if (r->netbios_names) {
2816 _mem_save_netbios_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
2817 NDR_PULL_SET_MEM_CTX(ndr, r->netbios_names, 0);
2818 NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_names));
2819 NDR_PULL_ALLOC_N(ndr, r->netbios_names, ndr_get_array_size(ndr, &r->netbios_names));
2820 _mem_save_netbios_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
2821 NDR_PULL_SET_MEM_CTX(ndr, r->netbios_names, 0);
2822 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
2823 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_names[cntr_netbios_names_1]));
2825 for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
2826 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_names[cntr_netbios_names_1]));
2828 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_names_1, 0);
2829 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_names_0, 0);
2831 if (r->netbios_names) {
2832 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->netbios_names, r->entries));
2835 return NDR_ERR_SUCCESS;
2838 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoControllers(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoControllers *r)
2840 uint32_t cntr_netbios_names_1;
2841 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoControllers");
2842 ndr->depth++;
2843 ndr_print_uint32(ndr, "entries", r->entries);
2844 ndr_print_ptr(ndr, "netbios_names", r->netbios_names);
2845 ndr->depth++;
2846 if (r->netbios_names) {
2847 ndr->print(ndr, "%s: ARRAY(%d)", "netbios_names", (int)r->entries);
2848 ndr->depth++;
2849 for (cntr_netbios_names_1=0;cntr_netbios_names_1<r->entries;cntr_netbios_names_1++) {
2850 char *idx_1=NULL;
2851 if (asprintf(&idx_1, "[%d]", cntr_netbios_names_1) != -1) {
2852 ndr_print_lsa_StringLarge(ndr, "netbios_names", &r->netbios_names[cntr_netbios_names_1]);
2853 free(idx_1);
2856 ndr->depth--;
2858 ndr->depth--;
2859 ndr->depth--;
2862 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPosixOffset *r)
2864 if (ndr_flags & NDR_SCALARS) {
2865 NDR_CHECK(ndr_push_align(ndr, 4));
2866 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->posix_offset));
2868 if (ndr_flags & NDR_BUFFERS) {
2870 return NDR_ERR_SUCCESS;
2873 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoPosixOffset(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPosixOffset *r)
2875 if (ndr_flags & NDR_SCALARS) {
2876 NDR_CHECK(ndr_pull_align(ndr, 4));
2877 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->posix_offset));
2879 if (ndr_flags & NDR_BUFFERS) {
2881 return NDR_ERR_SUCCESS;
2884 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPosixOffset *r)
2886 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoPosixOffset");
2887 ndr->depth++;
2888 ndr_print_uint32(ndr, "posix_offset", r->posix_offset);
2889 ndr->depth--;
2892 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoPassword(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPassword *r)
2894 if (ndr_flags & NDR_SCALARS) {
2895 NDR_CHECK(ndr_push_align(ndr, 4));
2896 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
2897 NDR_CHECK(ndr_push_unique_ptr(ndr, r->old_password));
2899 if (ndr_flags & NDR_BUFFERS) {
2900 if (r->password) {
2901 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
2903 if (r->old_password) {
2904 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->old_password));
2907 return NDR_ERR_SUCCESS;
2910 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoPassword(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPassword *r)
2912 uint32_t _ptr_password;
2913 TALLOC_CTX *_mem_save_password_0;
2914 uint32_t _ptr_old_password;
2915 TALLOC_CTX *_mem_save_old_password_0;
2916 if (ndr_flags & NDR_SCALARS) {
2917 NDR_CHECK(ndr_pull_align(ndr, 4));
2918 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
2919 if (_ptr_password) {
2920 NDR_PULL_ALLOC(ndr, r->password);
2921 } else {
2922 r->password = NULL;
2924 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_password));
2925 if (_ptr_old_password) {
2926 NDR_PULL_ALLOC(ndr, r->old_password);
2927 } else {
2928 r->old_password = NULL;
2931 if (ndr_flags & NDR_BUFFERS) {
2932 if (r->password) {
2933 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
2934 NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
2935 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
2936 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
2938 if (r->old_password) {
2939 _mem_save_old_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
2940 NDR_PULL_SET_MEM_CTX(ndr, r->old_password, 0);
2941 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->old_password));
2942 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_password_0, 0);
2945 return NDR_ERR_SUCCESS;
2948 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPassword *r)
2950 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoPassword");
2951 ndr->depth++;
2952 ndr_print_ptr(ndr, "password", r->password);
2953 ndr->depth++;
2954 if (r->password) {
2955 ndr_print_lsa_DATA_BUF(ndr, "password", r->password);
2957 ndr->depth--;
2958 ndr_print_ptr(ndr, "old_password", r->old_password);
2959 ndr->depth++;
2960 if (r->old_password) {
2961 ndr_print_lsa_DATA_BUF(ndr, "old_password", r->old_password);
2963 ndr->depth--;
2964 ndr->depth--;
2967 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoBasic(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBasic *r)
2969 if (ndr_flags & NDR_SCALARS) {
2970 NDR_CHECK(ndr_push_align(ndr, 4));
2971 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->netbios_name));
2972 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
2974 if (ndr_flags & NDR_BUFFERS) {
2975 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->netbios_name));
2976 if (r->sid) {
2977 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
2980 return NDR_ERR_SUCCESS;
2983 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoBasic(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBasic *r)
2985 uint32_t _ptr_sid;
2986 TALLOC_CTX *_mem_save_sid_0;
2987 if (ndr_flags & NDR_SCALARS) {
2988 NDR_CHECK(ndr_pull_align(ndr, 4));
2989 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->netbios_name));
2990 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
2991 if (_ptr_sid) {
2992 NDR_PULL_ALLOC(ndr, r->sid);
2993 } else {
2994 r->sid = NULL;
2997 if (ndr_flags & NDR_BUFFERS) {
2998 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->netbios_name));
2999 if (r->sid) {
3000 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
3001 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
3002 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3003 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
3006 return NDR_ERR_SUCCESS;
3009 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBasic *r)
3011 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoBasic");
3012 ndr->depth++;
3013 ndr_print_lsa_String(ndr, "netbios_name", &r->netbios_name);
3014 ndr_print_ptr(ndr, "sid", r->sid);
3015 ndr->depth++;
3016 if (r->sid) {
3017 ndr_print_dom_sid2(ndr, "sid", r->sid);
3019 ndr->depth--;
3020 ndr->depth--;
3023 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx *r)
3025 if (ndr_flags & NDR_SCALARS) {
3026 NDR_CHECK(ndr_push_align(ndr, 4));
3027 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain_name));
3028 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
3029 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
3030 NDR_CHECK(ndr_push_lsa_TrustDirection(ndr, NDR_SCALARS, r->trust_direction));
3031 NDR_CHECK(ndr_push_lsa_TrustType(ndr, NDR_SCALARS, r->trust_type));
3032 NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes));
3034 if (ndr_flags & NDR_BUFFERS) {
3035 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name));
3036 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
3037 if (r->sid) {
3038 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3041 return NDR_ERR_SUCCESS;
3044 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx *r)
3046 uint32_t _ptr_sid;
3047 TALLOC_CTX *_mem_save_sid_0;
3048 if (ndr_flags & NDR_SCALARS) {
3049 NDR_CHECK(ndr_pull_align(ndr, 4));
3050 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain_name));
3051 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
3052 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
3053 if (_ptr_sid) {
3054 NDR_PULL_ALLOC(ndr, r->sid);
3055 } else {
3056 r->sid = NULL;
3058 NDR_CHECK(ndr_pull_lsa_TrustDirection(ndr, NDR_SCALARS, &r->trust_direction));
3059 NDR_CHECK(ndr_pull_lsa_TrustType(ndr, NDR_SCALARS, &r->trust_type));
3060 NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes));
3062 if (ndr_flags & NDR_BUFFERS) {
3063 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name));
3064 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
3065 if (r->sid) {
3066 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
3067 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
3068 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
3069 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
3072 return NDR_ERR_SUCCESS;
3075 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx *r)
3077 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoEx");
3078 ndr->depth++;
3079 ndr_print_lsa_StringLarge(ndr, "domain_name", &r->domain_name);
3080 ndr_print_lsa_StringLarge(ndr, "netbios_name", &r->netbios_name);
3081 ndr_print_ptr(ndr, "sid", r->sid);
3082 ndr->depth++;
3083 if (r->sid) {
3084 ndr_print_dom_sid2(ndr, "sid", r->sid);
3086 ndr->depth--;
3087 ndr_print_lsa_TrustDirection(ndr, "trust_direction", r->trust_direction);
3088 ndr_print_lsa_TrustType(ndr, "trust_type", r->trust_type);
3089 ndr_print_lsa_TrustAttributes(ndr, "trust_attributes", r->trust_attributes);
3090 ndr->depth--;
3093 _PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAuthType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustAuthType r)
3095 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
3096 return NDR_ERR_SUCCESS;
3099 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustAuthType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustAuthType *r)
3101 uint32_t v;
3102 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
3103 *r = v;
3104 return NDR_ERR_SUCCESS;
3107 _PUBLIC_ void ndr_print_lsa_TrustAuthType(struct ndr_print *ndr, const char *name, enum lsa_TrustAuthType r)
3109 const char *val = NULL;
3111 switch (r) {
3112 case TRUST_AUTH_TYPE_NONE: val = "TRUST_AUTH_TYPE_NONE"; break;
3113 case TRUST_AUTH_TYPE_NT4OWF: val = "TRUST_AUTH_TYPE_NT4OWF"; break;
3114 case TRUST_AUTH_TYPE_CLEAR: val = "TRUST_AUTH_TYPE_CLEAR"; break;
3115 case TRUST_AUTH_TYPE_VERSION: val = "TRUST_AUTH_TYPE_VERSION"; break;
3117 ndr_print_enum(ndr, name, "ENUM", val, r);
3120 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBuffer *r)
3122 if (ndr_flags & NDR_SCALARS) {
3123 NDR_CHECK(ndr_push_align(ndr, 8));
3124 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->last_update_time));
3125 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
3126 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data));
3128 if (ndr_flags & NDR_BUFFERS) {
3129 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data));
3131 return NDR_ERR_SUCCESS;
3134 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBuffer *r)
3136 if (ndr_flags & NDR_SCALARS) {
3137 NDR_CHECK(ndr_pull_align(ndr, 8));
3138 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->last_update_time));
3139 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
3140 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data));
3142 if (ndr_flags & NDR_BUFFERS) {
3143 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data));
3145 return NDR_ERR_SUCCESS;
3148 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBuffer *r)
3150 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoBuffer");
3151 ndr->depth++;
3152 ndr_print_NTTIME_hyper(ndr, "last_update_time", r->last_update_time);
3153 ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
3154 ndr_print_lsa_DATA_BUF2(ndr, "data", &r->data);
3155 ndr->depth--;
3158 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoAuthInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfo *r)
3160 if (ndr_flags & NDR_SCALARS) {
3161 NDR_CHECK(ndr_push_align(ndr, 4));
3162 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->incoming_count));
3163 NDR_CHECK(ndr_push_unique_ptr(ndr, r->incoming_current_auth_info));
3164 NDR_CHECK(ndr_push_unique_ptr(ndr, r->incoming_previous_auth_info));
3165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->outgoing_count));
3166 NDR_CHECK(ndr_push_unique_ptr(ndr, r->outgoing_current_auth_info));
3167 NDR_CHECK(ndr_push_unique_ptr(ndr, r->outgoing_previous_auth_info));
3169 if (ndr_flags & NDR_BUFFERS) {
3170 if (r->incoming_current_auth_info) {
3171 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_current_auth_info));
3173 if (r->incoming_previous_auth_info) {
3174 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_previous_auth_info));
3176 if (r->outgoing_current_auth_info) {
3177 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_current_auth_info));
3179 if (r->outgoing_previous_auth_info) {
3180 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_previous_auth_info));
3183 return NDR_ERR_SUCCESS;
3186 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoAuthInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfo *r)
3188 uint32_t _ptr_incoming_current_auth_info;
3189 TALLOC_CTX *_mem_save_incoming_current_auth_info_0;
3190 uint32_t _ptr_incoming_previous_auth_info;
3191 TALLOC_CTX *_mem_save_incoming_previous_auth_info_0;
3192 uint32_t _ptr_outgoing_current_auth_info;
3193 TALLOC_CTX *_mem_save_outgoing_current_auth_info_0;
3194 uint32_t _ptr_outgoing_previous_auth_info;
3195 TALLOC_CTX *_mem_save_outgoing_previous_auth_info_0;
3196 if (ndr_flags & NDR_SCALARS) {
3197 NDR_CHECK(ndr_pull_align(ndr, 4));
3198 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->incoming_count));
3199 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_incoming_current_auth_info));
3200 if (_ptr_incoming_current_auth_info) {
3201 NDR_PULL_ALLOC(ndr, r->incoming_current_auth_info);
3202 } else {
3203 r->incoming_current_auth_info = NULL;
3205 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_incoming_previous_auth_info));
3206 if (_ptr_incoming_previous_auth_info) {
3207 NDR_PULL_ALLOC(ndr, r->incoming_previous_auth_info);
3208 } else {
3209 r->incoming_previous_auth_info = NULL;
3211 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->outgoing_count));
3212 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_outgoing_current_auth_info));
3213 if (_ptr_outgoing_current_auth_info) {
3214 NDR_PULL_ALLOC(ndr, r->outgoing_current_auth_info);
3215 } else {
3216 r->outgoing_current_auth_info = NULL;
3218 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_outgoing_previous_auth_info));
3219 if (_ptr_outgoing_previous_auth_info) {
3220 NDR_PULL_ALLOC(ndr, r->outgoing_previous_auth_info);
3221 } else {
3222 r->outgoing_previous_auth_info = NULL;
3225 if (ndr_flags & NDR_BUFFERS) {
3226 if (r->incoming_current_auth_info) {
3227 _mem_save_incoming_current_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3228 NDR_PULL_SET_MEM_CTX(ndr, r->incoming_current_auth_info, 0);
3229 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_current_auth_info));
3230 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_incoming_current_auth_info_0, 0);
3232 if (r->incoming_previous_auth_info) {
3233 _mem_save_incoming_previous_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3234 NDR_PULL_SET_MEM_CTX(ndr, r->incoming_previous_auth_info, 0);
3235 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_previous_auth_info));
3236 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_incoming_previous_auth_info_0, 0);
3238 if (r->outgoing_current_auth_info) {
3239 _mem_save_outgoing_current_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3240 NDR_PULL_SET_MEM_CTX(ndr, r->outgoing_current_auth_info, 0);
3241 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_current_auth_info));
3242 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_outgoing_current_auth_info_0, 0);
3244 if (r->outgoing_previous_auth_info) {
3245 _mem_save_outgoing_previous_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3246 NDR_PULL_SET_MEM_CTX(ndr, r->outgoing_previous_auth_info, 0);
3247 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_previous_auth_info));
3248 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_outgoing_previous_auth_info_0, 0);
3251 return NDR_ERR_SUCCESS;
3254 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfo *r)
3256 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoAuthInfo");
3257 ndr->depth++;
3258 ndr_print_uint32(ndr, "incoming_count", r->incoming_count);
3259 ndr_print_ptr(ndr, "incoming_current_auth_info", r->incoming_current_auth_info);
3260 ndr->depth++;
3261 if (r->incoming_current_auth_info) {
3262 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "incoming_current_auth_info", r->incoming_current_auth_info);
3264 ndr->depth--;
3265 ndr_print_ptr(ndr, "incoming_previous_auth_info", r->incoming_previous_auth_info);
3266 ndr->depth++;
3267 if (r->incoming_previous_auth_info) {
3268 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "incoming_previous_auth_info", r->incoming_previous_auth_info);
3270 ndr->depth--;
3271 ndr_print_uint32(ndr, "outgoing_count", r->outgoing_count);
3272 ndr_print_ptr(ndr, "outgoing_current_auth_info", r->outgoing_current_auth_info);
3273 ndr->depth++;
3274 if (r->outgoing_current_auth_info) {
3275 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "outgoing_current_auth_info", r->outgoing_current_auth_info);
3277 ndr->depth--;
3278 ndr_print_ptr(ndr, "outgoing_previous_auth_info", r->outgoing_previous_auth_info);
3279 ndr->depth++;
3280 if (r->outgoing_previous_auth_info) {
3281 ndr_print_lsa_TrustDomainInfoBuffer(ndr, "outgoing_previous_auth_info", r->outgoing_previous_auth_info);
3283 ndr->depth--;
3284 ndr->depth--;
3287 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo *r)
3289 if (ndr_flags & NDR_SCALARS) {
3290 NDR_CHECK(ndr_push_align(ndr, 4));
3291 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3292 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3293 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3295 if (ndr_flags & NDR_BUFFERS) {
3296 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3297 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3299 return NDR_ERR_SUCCESS;
3302 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo *r)
3304 if (ndr_flags & NDR_SCALARS) {
3305 NDR_CHECK(ndr_pull_align(ndr, 4));
3306 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3307 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3308 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3310 if (ndr_flags & NDR_BUFFERS) {
3311 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3312 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3314 return NDR_ERR_SUCCESS;
3317 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo *r)
3319 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfo");
3320 ndr->depth++;
3321 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3322 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3323 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
3324 ndr->depth--;
3327 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfoInternal *r)
3329 if (ndr_flags & NDR_SCALARS) {
3330 NDR_CHECK(ndr_push_align(ndr, 4));
3331 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob));
3333 if (ndr_flags & NDR_BUFFERS) {
3334 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob));
3336 return NDR_ERR_SUCCESS;
3339 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfoInternal *r)
3341 if (ndr_flags & NDR_SCALARS) {
3342 NDR_CHECK(ndr_pull_align(ndr, 4));
3343 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob));
3345 if (ndr_flags & NDR_BUFFERS) {
3346 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob));
3348 return NDR_ERR_SUCCESS;
3351 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfoInternal *r)
3353 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoAuthInfoInternal");
3354 ndr->depth++;
3355 ndr_print_lsa_DATA_BUF2(ndr, "auth_blob", &r->auth_blob);
3356 ndr->depth--;
3359 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfoInternal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfoInternal *r)
3361 if (ndr_flags & NDR_SCALARS) {
3362 NDR_CHECK(ndr_push_align(ndr, 4));
3363 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3364 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3365 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info));
3367 if (ndr_flags & NDR_BUFFERS) {
3368 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3369 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info));
3371 return NDR_ERR_SUCCESS;
3374 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfoInternal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfoInternal *r)
3376 if (ndr_flags & NDR_SCALARS) {
3377 NDR_CHECK(ndr_pull_align(ndr, 4));
3378 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3379 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3380 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info));
3382 if (ndr_flags & NDR_BUFFERS) {
3383 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3384 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info));
3386 return NDR_ERR_SUCCESS;
3389 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfoInternal *r)
3391 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfoInternal");
3392 ndr->depth++;
3393 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3394 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3395 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", &r->auth_info);
3396 ndr->depth--;
3399 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx2Internal *r)
3401 if (ndr_flags & NDR_SCALARS) {
3402 NDR_CHECK(ndr_push_align(ndr, 4));
3403 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3404 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->forest_trust_length));
3405 NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest_trust_data));
3407 if (ndr_flags & NDR_BUFFERS) {
3408 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3409 if (r->forest_trust_data) {
3410 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->forest_trust_length));
3411 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->forest_trust_data, r->forest_trust_length));
3414 return NDR_ERR_SUCCESS;
3417 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx2Internal *r)
3419 uint32_t _ptr_forest_trust_data;
3420 TALLOC_CTX *_mem_save_forest_trust_data_0;
3421 if (ndr_flags & NDR_SCALARS) {
3422 NDR_CHECK(ndr_pull_align(ndr, 4));
3423 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3424 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->forest_trust_length));
3425 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_data));
3426 if (_ptr_forest_trust_data) {
3427 NDR_PULL_ALLOC(ndr, r->forest_trust_data);
3428 } else {
3429 r->forest_trust_data = NULL;
3432 if (ndr_flags & NDR_BUFFERS) {
3433 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3434 if (r->forest_trust_data) {
3435 _mem_save_forest_trust_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
3436 NDR_PULL_SET_MEM_CTX(ndr, r->forest_trust_data, 0);
3437 NDR_CHECK(ndr_pull_array_size(ndr, &r->forest_trust_data));
3438 NDR_PULL_ALLOC_N(ndr, r->forest_trust_data, ndr_get_array_size(ndr, &r->forest_trust_data));
3439 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->forest_trust_data, ndr_get_array_size(ndr, &r->forest_trust_data)));
3440 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_data_0, 0);
3442 if (r->forest_trust_data) {
3443 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->forest_trust_data, r->forest_trust_length));
3446 return NDR_ERR_SUCCESS;
3449 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx2Internal *r)
3451 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoEx2Internal");
3452 ndr->depth++;
3453 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3454 ndr_print_uint32(ndr, "forest_trust_length", r->forest_trust_length);
3455 ndr_print_ptr(ndr, "forest_trust_data", r->forest_trust_data);
3456 ndr->depth++;
3457 if (r->forest_trust_data) {
3458 ndr_print_array_uint8(ndr, "forest_trust_data", r->forest_trust_data, r->forest_trust_length);
3460 ndr->depth--;
3461 ndr->depth--;
3464 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo2Internal *r)
3466 if (ndr_flags & NDR_SCALARS) {
3467 NDR_CHECK(ndr_push_align(ndr, 4));
3468 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info));
3469 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3470 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3472 if (ndr_flags & NDR_BUFFERS) {
3473 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info));
3474 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3476 return NDR_ERR_SUCCESS;
3479 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo2Internal *r)
3481 if (ndr_flags & NDR_SCALARS) {
3482 NDR_CHECK(ndr_pull_align(ndr, 4));
3483 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info));
3484 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3485 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3487 if (ndr_flags & NDR_BUFFERS) {
3488 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info));
3489 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3491 return NDR_ERR_SUCCESS;
3494 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo2Internal *r)
3496 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfo2Internal");
3497 ndr->depth++;
3498 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr, "info", &r->info);
3499 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3500 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
3501 ndr->depth--;
3504 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoSupportedEncTypes *r)
3506 if (ndr_flags & NDR_SCALARS) {
3507 NDR_CHECK(ndr_push_align(ndr, 4));
3508 NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->enc_types));
3510 if (ndr_flags & NDR_BUFFERS) {
3512 return NDR_ERR_SUCCESS;
3515 static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoSupportedEncTypes *r)
3517 if (ndr_flags & NDR_SCALARS) {
3518 NDR_CHECK(ndr_pull_align(ndr, 4));
3519 NDR_CHECK(ndr_pull_kerb_EncTypes(ndr, NDR_SCALARS, &r->enc_types));
3521 if (ndr_flags & NDR_BUFFERS) {
3523 return NDR_ERR_SUCCESS;
3526 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoSupportedEncTypes *r)
3528 ndr_print_struct(ndr, name, "lsa_TrustDomainInfoSupportedEncTypes");
3529 ndr->depth++;
3530 ndr_print_kerb_EncTypes(ndr, "enc_types", r->enc_types);
3531 ndr->depth--;
3534 static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, int ndr_flags, const union lsa_TrustedDomainInfo *r)
3536 if (ndr_flags & NDR_SCALARS) {
3537 int level = ndr_push_get_switch_value(ndr, r);
3538 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, level));
3539 switch (level) {
3540 case LSA_TRUSTED_DOMAIN_INFO_NAME: {
3541 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name));
3542 break; }
3544 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: {
3545 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr, NDR_SCALARS, &r->controllers));
3546 break; }
3548 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: {
3549 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3550 break; }
3552 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: {
3553 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr, NDR_SCALARS, &r->password));
3554 break; }
3556 case LSA_TRUSTED_DOMAIN_INFO_BASIC: {
3557 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr, NDR_SCALARS, &r->info_basic));
3558 break; }
3560 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: {
3561 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3562 break; }
3564 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: {
3565 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3566 break; }
3568 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: {
3569 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info));
3570 break; }
3572 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: {
3573 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info_internal));
3574 break; }
3576 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: {
3577 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_SCALARS, &r->full_info_internal));
3578 break; }
3580 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: {
3581 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info_ex2_internal));
3582 break; }
3584 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: {
3585 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal));
3586 break; }
3588 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: {
3589 NDR_CHECK(ndr_push_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types));
3590 break; }
3592 default:
3593 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3596 if (ndr_flags & NDR_BUFFERS) {
3597 int level = ndr_push_get_switch_value(ndr, r);
3598 switch (level) {
3599 case LSA_TRUSTED_DOMAIN_INFO_NAME:
3600 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name));
3601 break;
3603 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
3604 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr, NDR_BUFFERS, &r->controllers));
3605 break;
3607 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
3608 break;
3610 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
3611 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr, NDR_BUFFERS, &r->password));
3612 break;
3614 case LSA_TRUSTED_DOMAIN_INFO_BASIC:
3615 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr, NDR_BUFFERS, &r->info_basic));
3616 break;
3618 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
3619 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3620 break;
3622 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
3623 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3624 break;
3626 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
3627 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info));
3628 break;
3630 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
3631 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info_internal));
3632 break;
3634 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
3635 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_BUFFERS, &r->full_info_internal));
3636 break;
3638 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
3639 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info_ex2_internal));
3640 break;
3642 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
3643 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal));
3644 break;
3646 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES:
3647 break;
3649 default:
3650 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3653 return NDR_ERR_SUCCESS;
3656 static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, int ndr_flags, union lsa_TrustedDomainInfo *r)
3658 int level;
3659 uint16_t _level;
3660 level = ndr_pull_get_switch_value(ndr, r);
3661 if (ndr_flags & NDR_SCALARS) {
3662 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
3663 if (_level != level) {
3664 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
3666 switch (level) {
3667 case LSA_TRUSTED_DOMAIN_INFO_NAME: {
3668 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name));
3669 break; }
3671 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: {
3672 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr, NDR_SCALARS, &r->controllers));
3673 break; }
3675 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: {
3676 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
3677 break; }
3679 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: {
3680 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr, NDR_SCALARS, &r->password));
3681 break; }
3683 case LSA_TRUSTED_DOMAIN_INFO_BASIC: {
3684 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr, NDR_SCALARS, &r->info_basic));
3685 break; }
3687 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: {
3688 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
3689 break; }
3691 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: {
3692 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
3693 break; }
3695 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: {
3696 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info));
3697 break; }
3699 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: {
3700 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info_internal));
3701 break; }
3703 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: {
3704 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_SCALARS, &r->full_info_internal));
3705 break; }
3707 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: {
3708 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info_ex2_internal));
3709 break; }
3711 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: {
3712 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal));
3713 break; }
3715 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: {
3716 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types));
3717 break; }
3719 default:
3720 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3723 if (ndr_flags & NDR_BUFFERS) {
3724 switch (level) {
3725 case LSA_TRUSTED_DOMAIN_INFO_NAME:
3726 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name));
3727 break;
3729 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
3730 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr, NDR_BUFFERS, &r->controllers));
3731 break;
3733 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
3734 break;
3736 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
3737 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr, NDR_BUFFERS, &r->password));
3738 break;
3740 case LSA_TRUSTED_DOMAIN_INFO_BASIC:
3741 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr, NDR_BUFFERS, &r->info_basic));
3742 break;
3744 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
3745 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
3746 break;
3748 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
3749 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
3750 break;
3752 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
3753 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info));
3754 break;
3756 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
3757 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info_internal));
3758 break;
3760 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
3761 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_BUFFERS, &r->full_info_internal));
3762 break;
3764 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
3765 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info_ex2_internal));
3766 break;
3768 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
3769 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal));
3770 break;
3772 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES:
3773 break;
3775 default:
3776 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3779 return NDR_ERR_SUCCESS;
3782 _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char *name, const union lsa_TrustedDomainInfo *r)
3784 int level;
3785 level = ndr_print_get_switch_value(ndr, r);
3786 ndr_print_union(ndr, name, level, "lsa_TrustedDomainInfo");
3787 switch (level) {
3788 case LSA_TRUSTED_DOMAIN_INFO_NAME:
3789 ndr_print_lsa_TrustDomainInfoName(ndr, "name", &r->name);
3790 break;
3792 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
3793 ndr_print_lsa_TrustDomainInfoControllers(ndr, "controllers", &r->controllers);
3794 break;
3796 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
3797 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
3798 break;
3800 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
3801 ndr_print_lsa_TrustDomainInfoPassword(ndr, "password", &r->password);
3802 break;
3804 case LSA_TRUSTED_DOMAIN_INFO_BASIC:
3805 ndr_print_lsa_TrustDomainInfoBasic(ndr, "info_basic", &r->info_basic);
3806 break;
3808 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
3809 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
3810 break;
3812 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
3813 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
3814 break;
3816 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
3817 ndr_print_lsa_TrustDomainInfoFullInfo(ndr, "full_info", &r->full_info);
3818 break;
3820 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
3821 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info_internal", &r->auth_info_internal);
3822 break;
3824 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
3825 ndr_print_lsa_TrustDomainInfoFullInfoInternal(ndr, "full_info_internal", &r->full_info_internal);
3826 break;
3828 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
3829 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr, "info_ex2_internal", &r->info_ex2_internal);
3830 break;
3832 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
3833 ndr_print_lsa_TrustDomainInfoFullInfo2Internal(ndr, "full_info2_internal", &r->full_info2_internal);
3834 break;
3836 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES:
3837 ndr_print_lsa_TrustDomainInfoSupportedEncTypes(ndr, "enc_types", &r->enc_types);
3838 break;
3840 default:
3841 ndr_print_bad_level(ndr, name, level);
3845 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)
3847 if (ndr_flags & NDR_SCALARS) {
3848 NDR_CHECK(ndr_push_align(ndr, 4));
3849 NDR_CHECK(ndr_push_unique_ptr(ndr, r->buf));
3851 if (ndr_flags & NDR_BUFFERS) {
3852 if (r->buf) {
3853 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->buf));
3856 return NDR_ERR_SUCCESS;
3859 static enum ndr_err_code ndr_pull_lsa_DATA_BUF_PTR(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF_PTR *r)
3861 uint32_t _ptr_buf;
3862 TALLOC_CTX *_mem_save_buf_0;
3863 if (ndr_flags & NDR_SCALARS) {
3864 NDR_CHECK(ndr_pull_align(ndr, 4));
3865 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buf));
3866 if (_ptr_buf) {
3867 NDR_PULL_ALLOC(ndr, r->buf);
3868 } else {
3869 r->buf = NULL;
3872 if (ndr_flags & NDR_BUFFERS) {
3873 if (r->buf) {
3874 _mem_save_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
3875 NDR_PULL_SET_MEM_CTX(ndr, r->buf, 0);
3876 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->buf));
3877 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buf_0, 0);
3880 return NDR_ERR_SUCCESS;
3883 _PUBLIC_ void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF_PTR *r)
3885 ndr_print_struct(ndr, name, "lsa_DATA_BUF_PTR");
3886 ndr->depth++;
3887 ndr_print_ptr(ndr, "buf", r->buf);
3888 ndr->depth++;
3889 if (r->buf) {
3890 ndr_print_lsa_DATA_BUF(ndr, "buf", r->buf);
3892 ndr->depth--;
3893 ndr->depth--;
3896 static enum ndr_err_code ndr_push_lsa_RightSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_RightSet *r)
3898 uint32_t cntr_names_1;
3899 if (ndr_flags & NDR_SCALARS) {
3900 NDR_CHECK(ndr_push_align(ndr, 4));
3901 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3902 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
3904 if (ndr_flags & NDR_BUFFERS) {
3905 if (r->names) {
3906 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3907 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
3908 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
3910 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
3911 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
3915 return NDR_ERR_SUCCESS;
3918 static enum ndr_err_code ndr_pull_lsa_RightSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_RightSet *r)
3920 uint32_t _ptr_names;
3921 uint32_t cntr_names_1;
3922 TALLOC_CTX *_mem_save_names_0;
3923 TALLOC_CTX *_mem_save_names_1;
3924 if (ndr_flags & NDR_SCALARS) {
3925 NDR_CHECK(ndr_pull_align(ndr, 4));
3926 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3927 if (r->count > 256) {
3928 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3930 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
3931 if (_ptr_names) {
3932 NDR_PULL_ALLOC(ndr, r->names);
3933 } else {
3934 r->names = NULL;
3937 if (ndr_flags & NDR_BUFFERS) {
3938 if (r->names) {
3939 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
3940 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
3941 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
3942 NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
3943 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
3944 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
3945 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
3946 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
3948 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
3949 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
3951 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
3952 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
3954 if (r->names) {
3955 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
3958 return NDR_ERR_SUCCESS;
3961 _PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, const struct lsa_RightSet *r)
3963 uint32_t cntr_names_1;
3964 ndr_print_struct(ndr, name, "lsa_RightSet");
3965 ndr->depth++;
3966 ndr_print_uint32(ndr, "count", r->count);
3967 ndr_print_ptr(ndr, "names", r->names);
3968 ndr->depth++;
3969 if (r->names) {
3970 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
3971 ndr->depth++;
3972 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
3973 char *idx_1=NULL;
3974 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
3975 ndr_print_lsa_StringLarge(ndr, "names", &r->names[cntr_names_1]);
3976 free(idx_1);
3979 ndr->depth--;
3981 ndr->depth--;
3982 ndr->depth--;
3985 static enum ndr_err_code ndr_push_lsa_DomainListEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainListEx *r)
3987 uint32_t cntr_domains_1;
3988 if (ndr_flags & NDR_SCALARS) {
3989 NDR_CHECK(ndr_push_align(ndr, 4));
3990 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3991 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
3993 if (ndr_flags & NDR_BUFFERS) {
3994 if (r->domains) {
3995 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3996 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
3997 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
3999 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
4000 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
4004 return NDR_ERR_SUCCESS;
4007 static enum ndr_err_code ndr_pull_lsa_DomainListEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainListEx *r)
4009 uint32_t _ptr_domains;
4010 uint32_t cntr_domains_1;
4011 TALLOC_CTX *_mem_save_domains_0;
4012 TALLOC_CTX *_mem_save_domains_1;
4013 if (ndr_flags & NDR_SCALARS) {
4014 NDR_CHECK(ndr_pull_align(ndr, 4));
4015 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4016 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
4017 if (_ptr_domains) {
4018 NDR_PULL_ALLOC(ndr, r->domains);
4019 } else {
4020 r->domains = NULL;
4023 if (ndr_flags & NDR_BUFFERS) {
4024 if (r->domains) {
4025 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
4026 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
4027 NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
4028 NDR_PULL_ALLOC_N(ndr, r->domains, ndr_get_array_size(ndr, &r->domains));
4029 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
4030 NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
4031 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
4032 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
4034 for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
4035 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
4037 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
4038 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
4040 if (r->domains) {
4041 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
4044 return NDR_ERR_SUCCESS;
4047 _PUBLIC_ void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name, const struct lsa_DomainListEx *r)
4049 uint32_t cntr_domains_1;
4050 ndr_print_struct(ndr, name, "lsa_DomainListEx");
4051 ndr->depth++;
4052 ndr_print_uint32(ndr, "count", r->count);
4053 ndr_print_ptr(ndr, "domains", r->domains);
4054 ndr->depth++;
4055 if (r->domains) {
4056 ndr->print(ndr, "%s: ARRAY(%d)", "domains", (int)r->count);
4057 ndr->depth++;
4058 for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
4059 char *idx_1=NULL;
4060 if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
4061 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "domains", &r->domains[cntr_domains_1]);
4062 free(idx_1);
4065 ndr->depth--;
4067 ndr->depth--;
4068 ndr->depth--;
4071 static enum ndr_err_code ndr_push_lsa_DomainInfoKerberos(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoKerberos *r)
4073 if (ndr_flags & NDR_SCALARS) {
4074 NDR_CHECK(ndr_push_align(ndr, 8));
4075 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enforce_restrictions));
4076 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->service_tkt_lifetime));
4077 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->user_tkt_lifetime));
4078 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->user_tkt_renewaltime));
4079 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->clock_skew));
4080 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown6));
4082 if (ndr_flags & NDR_BUFFERS) {
4084 return NDR_ERR_SUCCESS;
4087 static enum ndr_err_code ndr_pull_lsa_DomainInfoKerberos(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoKerberos *r)
4089 if (ndr_flags & NDR_SCALARS) {
4090 NDR_CHECK(ndr_pull_align(ndr, 8));
4091 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enforce_restrictions));
4092 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->service_tkt_lifetime));
4093 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->user_tkt_lifetime));
4094 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->user_tkt_renewaltime));
4095 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->clock_skew));
4096 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown6));
4098 if (ndr_flags & NDR_BUFFERS) {
4100 return NDR_ERR_SUCCESS;
4103 _PUBLIC_ void ndr_print_lsa_DomainInfoKerberos(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoKerberos *r)
4105 ndr_print_struct(ndr, name, "lsa_DomainInfoKerberos");
4106 ndr->depth++;
4107 ndr_print_uint32(ndr, "enforce_restrictions", r->enforce_restrictions);
4108 ndr_print_hyper(ndr, "service_tkt_lifetime", r->service_tkt_lifetime);
4109 ndr_print_hyper(ndr, "user_tkt_lifetime", r->user_tkt_lifetime);
4110 ndr_print_hyper(ndr, "user_tkt_renewaltime", r->user_tkt_renewaltime);
4111 ndr_print_hyper(ndr, "clock_skew", r->clock_skew);
4112 ndr_print_hyper(ndr, "unknown6", r->unknown6);
4113 ndr->depth--;
4116 static enum ndr_err_code ndr_push_lsa_DomainInfoEfs(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoEfs *r)
4118 if (ndr_flags & NDR_SCALARS) {
4119 NDR_CHECK(ndr_push_align(ndr, 4));
4120 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->blob_size));
4121 NDR_CHECK(ndr_push_unique_ptr(ndr, r->efs_blob));
4123 if (ndr_flags & NDR_BUFFERS) {
4124 if (r->efs_blob) {
4125 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->blob_size));
4126 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->efs_blob, r->blob_size));
4129 return NDR_ERR_SUCCESS;
4132 static enum ndr_err_code ndr_pull_lsa_DomainInfoEfs(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoEfs *r)
4134 uint32_t _ptr_efs_blob;
4135 TALLOC_CTX *_mem_save_efs_blob_0;
4136 if (ndr_flags & NDR_SCALARS) {
4137 NDR_CHECK(ndr_pull_align(ndr, 4));
4138 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blob_size));
4139 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_efs_blob));
4140 if (_ptr_efs_blob) {
4141 NDR_PULL_ALLOC(ndr, r->efs_blob);
4142 } else {
4143 r->efs_blob = NULL;
4146 if (ndr_flags & NDR_BUFFERS) {
4147 if (r->efs_blob) {
4148 _mem_save_efs_blob_0 = NDR_PULL_GET_MEM_CTX(ndr);
4149 NDR_PULL_SET_MEM_CTX(ndr, r->efs_blob, 0);
4150 NDR_CHECK(ndr_pull_array_size(ndr, &r->efs_blob));
4151 NDR_PULL_ALLOC_N(ndr, r->efs_blob, ndr_get_array_size(ndr, &r->efs_blob));
4152 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->efs_blob, ndr_get_array_size(ndr, &r->efs_blob)));
4153 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_efs_blob_0, 0);
4155 if (r->efs_blob) {
4156 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->efs_blob, r->blob_size));
4159 return NDR_ERR_SUCCESS;
4162 _PUBLIC_ void ndr_print_lsa_DomainInfoEfs(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoEfs *r)
4164 ndr_print_struct(ndr, name, "lsa_DomainInfoEfs");
4165 ndr->depth++;
4166 ndr_print_uint32(ndr, "blob_size", r->blob_size);
4167 ndr_print_ptr(ndr, "efs_blob", r->efs_blob);
4168 ndr->depth++;
4169 if (r->efs_blob) {
4170 ndr_print_array_uint8(ndr, "efs_blob", r->efs_blob, r->blob_size);
4172 ndr->depth--;
4173 ndr->depth--;
4176 static enum ndr_err_code ndr_push_lsa_DomainInformationPolicy(struct ndr_push *ndr, int ndr_flags, const union lsa_DomainInformationPolicy *r)
4178 if (ndr_flags & NDR_SCALARS) {
4179 int level = ndr_push_get_switch_value(ndr, r);
4180 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
4181 switch (level) {
4182 case LSA_DOMAIN_INFO_POLICY_EFS: {
4183 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info));
4184 break; }
4186 case LSA_DOMAIN_INFO_POLICY_KERBEROS: {
4187 NDR_CHECK(ndr_push_lsa_DomainInfoKerberos(ndr, NDR_SCALARS, &r->kerberos_info));
4188 break; }
4190 default:
4191 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
4194 if (ndr_flags & NDR_BUFFERS) {
4195 int level = ndr_push_get_switch_value(ndr, r);
4196 switch (level) {
4197 case LSA_DOMAIN_INFO_POLICY_EFS:
4198 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr, NDR_BUFFERS, &r->efs_info));
4199 break;
4201 case LSA_DOMAIN_INFO_POLICY_KERBEROS:
4202 break;
4204 default:
4205 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
4208 return NDR_ERR_SUCCESS;
4211 static enum ndr_err_code ndr_pull_lsa_DomainInformationPolicy(struct ndr_pull *ndr, int ndr_flags, union lsa_DomainInformationPolicy *r)
4213 int level;
4214 uint16_t _level;
4215 level = ndr_pull_get_switch_value(ndr, r);
4216 if (ndr_flags & NDR_SCALARS) {
4217 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
4218 if (_level != level) {
4219 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
4221 switch (level) {
4222 case LSA_DOMAIN_INFO_POLICY_EFS: {
4223 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info));
4224 break; }
4226 case LSA_DOMAIN_INFO_POLICY_KERBEROS: {
4227 NDR_CHECK(ndr_pull_lsa_DomainInfoKerberos(ndr, NDR_SCALARS, &r->kerberos_info));
4228 break; }
4230 default:
4231 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
4234 if (ndr_flags & NDR_BUFFERS) {
4235 switch (level) {
4236 case LSA_DOMAIN_INFO_POLICY_EFS:
4237 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr, NDR_BUFFERS, &r->efs_info));
4238 break;
4240 case LSA_DOMAIN_INFO_POLICY_KERBEROS:
4241 break;
4243 default:
4244 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
4247 return NDR_ERR_SUCCESS;
4250 _PUBLIC_ void ndr_print_lsa_DomainInformationPolicy(struct ndr_print *ndr, const char *name, const union lsa_DomainInformationPolicy *r)
4252 int level;
4253 level = ndr_print_get_switch_value(ndr, r);
4254 ndr_print_union(ndr, name, level, "lsa_DomainInformationPolicy");
4255 switch (level) {
4256 case LSA_DOMAIN_INFO_POLICY_EFS:
4257 ndr_print_lsa_DomainInfoEfs(ndr, "efs_info", &r->efs_info);
4258 break;
4260 case LSA_DOMAIN_INFO_POLICY_KERBEROS:
4261 ndr_print_lsa_DomainInfoKerberos(ndr, "kerberos_info", &r->kerberos_info);
4262 break;
4264 default:
4265 ndr_print_bad_level(ndr, name, level);
4269 static enum ndr_err_code ndr_push_lsa_TranslatedName2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName2 *r)
4271 if (ndr_flags & NDR_SCALARS) {
4272 NDR_CHECK(ndr_push_align(ndr, 4));
4273 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
4274 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
4275 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
4276 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
4278 if (ndr_flags & NDR_BUFFERS) {
4279 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
4281 return NDR_ERR_SUCCESS;
4284 static enum ndr_err_code ndr_pull_lsa_TranslatedName2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName2 *r)
4286 if (ndr_flags & NDR_SCALARS) {
4287 NDR_CHECK(ndr_pull_align(ndr, 4));
4288 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
4289 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
4290 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
4291 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
4293 if (ndr_flags & NDR_BUFFERS) {
4294 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
4296 return NDR_ERR_SUCCESS;
4299 _PUBLIC_ void ndr_print_lsa_TranslatedName2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName2 *r)
4301 ndr_print_struct(ndr, name, "lsa_TranslatedName2");
4302 ndr->depth++;
4303 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
4304 ndr_print_lsa_String(ndr, "name", &r->name);
4305 ndr_print_uint32(ndr, "sid_index", r->sid_index);
4306 ndr_print_uint32(ndr, "unknown", r->unknown);
4307 ndr->depth--;
4310 static enum ndr_err_code ndr_push_lsa_TransNameArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray2 *r)
4312 uint32_t cntr_names_1;
4313 if (ndr_flags & NDR_SCALARS) {
4314 NDR_CHECK(ndr_push_align(ndr, 4));
4315 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4316 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
4318 if (ndr_flags & NDR_BUFFERS) {
4319 if (r->names) {
4320 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4321 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4322 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
4324 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4325 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
4329 return NDR_ERR_SUCCESS;
4332 static enum ndr_err_code ndr_pull_lsa_TransNameArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray2 *r)
4334 uint32_t _ptr_names;
4335 uint32_t cntr_names_1;
4336 TALLOC_CTX *_mem_save_names_0;
4337 TALLOC_CTX *_mem_save_names_1;
4338 if (ndr_flags & NDR_SCALARS) {
4339 NDR_CHECK(ndr_pull_align(ndr, 4));
4340 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4341 if (r->count > 1000) {
4342 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4344 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
4345 if (_ptr_names) {
4346 NDR_PULL_ALLOC(ndr, r->names);
4347 } else {
4348 r->names = NULL;
4351 if (ndr_flags & NDR_BUFFERS) {
4352 if (r->names) {
4353 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
4354 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
4355 NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
4356 NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
4357 _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
4358 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
4359 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4360 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
4362 for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
4363 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
4365 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
4366 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
4368 if (r->names) {
4369 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
4372 return NDR_ERR_SUCCESS;
4375 _PUBLIC_ void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray2 *r)
4377 uint32_t cntr_names_1;
4378 ndr_print_struct(ndr, name, "lsa_TransNameArray2");
4379 ndr->depth++;
4380 ndr_print_uint32(ndr, "count", r->count);
4381 ndr_print_ptr(ndr, "names", r->names);
4382 ndr->depth++;
4383 if (r->names) {
4384 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
4385 ndr->depth++;
4386 for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
4387 char *idx_1=NULL;
4388 if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
4389 ndr_print_lsa_TranslatedName2(ndr, "names", &r->names[cntr_names_1]);
4390 free(idx_1);
4393 ndr->depth--;
4395 ndr->depth--;
4396 ndr->depth--;
4399 static enum ndr_err_code ndr_push_lsa_TranslatedSid2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid2 *r)
4401 if (ndr_flags & NDR_SCALARS) {
4402 NDR_CHECK(ndr_push_align(ndr, 4));
4403 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
4404 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
4405 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
4406 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
4408 if (ndr_flags & NDR_BUFFERS) {
4410 return NDR_ERR_SUCCESS;
4413 static enum ndr_err_code ndr_pull_lsa_TranslatedSid2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid2 *r)
4415 if (ndr_flags & NDR_SCALARS) {
4416 NDR_CHECK(ndr_pull_align(ndr, 4));
4417 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
4418 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
4419 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
4420 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
4422 if (ndr_flags & NDR_BUFFERS) {
4424 return NDR_ERR_SUCCESS;
4427 _PUBLIC_ void ndr_print_lsa_TranslatedSid2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid2 *r)
4429 ndr_print_struct(ndr, name, "lsa_TranslatedSid2");
4430 ndr->depth++;
4431 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
4432 ndr_print_uint32(ndr, "rid", r->rid);
4433 ndr_print_uint32(ndr, "sid_index", r->sid_index);
4434 ndr_print_uint32(ndr, "unknown", r->unknown);
4435 ndr->depth--;
4438 static enum ndr_err_code ndr_push_lsa_TransSidArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray2 *r)
4440 uint32_t cntr_sids_1;
4441 if (ndr_flags & NDR_SCALARS) {
4442 NDR_CHECK(ndr_push_align(ndr, 4));
4443 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4444 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
4446 if (ndr_flags & NDR_BUFFERS) {
4447 if (r->sids) {
4448 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4449 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4450 NDR_CHECK(ndr_push_lsa_TranslatedSid2(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4454 return NDR_ERR_SUCCESS;
4457 static enum ndr_err_code ndr_pull_lsa_TransSidArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray2 *r)
4459 uint32_t _ptr_sids;
4460 uint32_t cntr_sids_1;
4461 TALLOC_CTX *_mem_save_sids_0;
4462 TALLOC_CTX *_mem_save_sids_1;
4463 if (ndr_flags & NDR_SCALARS) {
4464 NDR_CHECK(ndr_pull_align(ndr, 4));
4465 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4466 if (r->count > 1000) {
4467 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4469 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
4470 if (_ptr_sids) {
4471 NDR_PULL_ALLOC(ndr, r->sids);
4472 } else {
4473 r->sids = NULL;
4476 if (ndr_flags & NDR_BUFFERS) {
4477 if (r->sids) {
4478 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
4479 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4480 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
4481 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
4482 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
4483 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4484 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4485 NDR_CHECK(ndr_pull_lsa_TranslatedSid2(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4487 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
4488 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
4490 if (r->sids) {
4491 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
4494 return NDR_ERR_SUCCESS;
4497 _PUBLIC_ void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray2 *r)
4499 uint32_t cntr_sids_1;
4500 ndr_print_struct(ndr, name, "lsa_TransSidArray2");
4501 ndr->depth++;
4502 ndr_print_uint32(ndr, "count", r->count);
4503 ndr_print_ptr(ndr, "sids", r->sids);
4504 ndr->depth++;
4505 if (r->sids) {
4506 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
4507 ndr->depth++;
4508 for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
4509 char *idx_1=NULL;
4510 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
4511 ndr_print_lsa_TranslatedSid2(ndr, "sids", &r->sids[cntr_sids_1]);
4512 free(idx_1);
4515 ndr->depth--;
4517 ndr->depth--;
4518 ndr->depth--;
4521 static enum ndr_err_code ndr_push_lsa_TranslatedSid3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid3 *r)
4523 if (ndr_flags & NDR_SCALARS) {
4524 NDR_CHECK(ndr_push_align(ndr, 4));
4525 NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
4526 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
4527 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
4528 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
4530 if (ndr_flags & NDR_BUFFERS) {
4531 if (r->sid) {
4532 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
4535 return NDR_ERR_SUCCESS;
4538 static enum ndr_err_code ndr_pull_lsa_TranslatedSid3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid3 *r)
4540 uint32_t _ptr_sid;
4541 TALLOC_CTX *_mem_save_sid_0;
4542 if (ndr_flags & NDR_SCALARS) {
4543 NDR_CHECK(ndr_pull_align(ndr, 4));
4544 NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
4545 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
4546 if (_ptr_sid) {
4547 NDR_PULL_ALLOC(ndr, r->sid);
4548 } else {
4549 r->sid = NULL;
4551 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
4552 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
4554 if (ndr_flags & NDR_BUFFERS) {
4555 if (r->sid) {
4556 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
4557 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
4558 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
4559 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
4562 return NDR_ERR_SUCCESS;
4565 _PUBLIC_ void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid3 *r)
4567 ndr_print_struct(ndr, name, "lsa_TranslatedSid3");
4568 ndr->depth++;
4569 ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
4570 ndr_print_ptr(ndr, "sid", r->sid);
4571 ndr->depth++;
4572 if (r->sid) {
4573 ndr_print_dom_sid2(ndr, "sid", r->sid);
4575 ndr->depth--;
4576 ndr_print_uint32(ndr, "sid_index", r->sid_index);
4577 ndr_print_uint32(ndr, "flags", r->flags);
4578 ndr->depth--;
4581 static enum ndr_err_code ndr_push_lsa_TransSidArray3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray3 *r)
4583 uint32_t cntr_sids_1;
4584 if (ndr_flags & NDR_SCALARS) {
4585 NDR_CHECK(ndr_push_align(ndr, 4));
4586 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4587 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
4589 if (ndr_flags & NDR_BUFFERS) {
4590 if (r->sids) {
4591 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4592 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4593 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4595 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4596 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
4600 return NDR_ERR_SUCCESS;
4603 static enum ndr_err_code ndr_pull_lsa_TransSidArray3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray3 *r)
4605 uint32_t _ptr_sids;
4606 uint32_t cntr_sids_1;
4607 TALLOC_CTX *_mem_save_sids_0;
4608 TALLOC_CTX *_mem_save_sids_1;
4609 if (ndr_flags & NDR_SCALARS) {
4610 NDR_CHECK(ndr_pull_align(ndr, 4));
4611 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4612 if (r->count > 1000) {
4613 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4615 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
4616 if (_ptr_sids) {
4617 NDR_PULL_ALLOC(ndr, r->sids);
4618 } else {
4619 r->sids = NULL;
4622 if (ndr_flags & NDR_BUFFERS) {
4623 if (r->sids) {
4624 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
4625 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4626 NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
4627 NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
4628 _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
4629 NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
4630 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4631 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
4633 for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
4634 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
4636 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
4637 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
4639 if (r->sids) {
4640 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
4643 return NDR_ERR_SUCCESS;
4646 _PUBLIC_ void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray3 *r)
4648 uint32_t cntr_sids_1;
4649 ndr_print_struct(ndr, name, "lsa_TransSidArray3");
4650 ndr->depth++;
4651 ndr_print_uint32(ndr, "count", r->count);
4652 ndr_print_ptr(ndr, "sids", r->sids);
4653 ndr->depth++;
4654 if (r->sids) {
4655 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->count);
4656 ndr->depth++;
4657 for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
4658 char *idx_1=NULL;
4659 if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
4660 ndr_print_lsa_TranslatedSid3(ndr, "sids", &r->sids[cntr_sids_1]);
4661 free(idx_1);
4664 ndr->depth--;
4666 ndr->depth--;
4667 ndr->depth--;
4670 static enum ndr_err_code ndr_push_lsa_ForestTrustBinaryData(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustBinaryData *r)
4672 if (ndr_flags & NDR_SCALARS) {
4673 NDR_CHECK(ndr_push_align(ndr, 4));
4674 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
4675 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
4677 if (ndr_flags & NDR_BUFFERS) {
4678 if (r->data) {
4679 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
4680 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
4683 return NDR_ERR_SUCCESS;
4686 static enum ndr_err_code ndr_pull_lsa_ForestTrustBinaryData(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustBinaryData *r)
4688 uint32_t _ptr_data;
4689 TALLOC_CTX *_mem_save_data_0;
4690 if (ndr_flags & NDR_SCALARS) {
4691 NDR_CHECK(ndr_pull_align(ndr, 4));
4692 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
4693 if (r->length > 131072) {
4694 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4696 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
4697 if (_ptr_data) {
4698 NDR_PULL_ALLOC(ndr, r->data);
4699 } else {
4700 r->data = NULL;
4703 if (ndr_flags & NDR_BUFFERS) {
4704 if (r->data) {
4705 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
4706 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
4707 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
4708 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
4709 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
4710 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
4712 if (r->data) {
4713 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
4716 return NDR_ERR_SUCCESS;
4719 _PUBLIC_ void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustBinaryData *r)
4721 ndr_print_struct(ndr, name, "lsa_ForestTrustBinaryData");
4722 ndr->depth++;
4723 ndr_print_uint32(ndr, "length", r->length);
4724 ndr_print_ptr(ndr, "data", r->data);
4725 ndr->depth++;
4726 if (r->data) {
4727 ndr_print_array_uint8(ndr, "data", r->data, r->length);
4729 ndr->depth--;
4730 ndr->depth--;
4733 static enum ndr_err_code ndr_push_lsa_ForestTrustDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustDomainInfo *r)
4735 if (ndr_flags & NDR_SCALARS) {
4736 NDR_CHECK(ndr_push_align(ndr, 4));
4737 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid));
4738 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain_name));
4739 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_domain_name));
4741 if (ndr_flags & NDR_BUFFERS) {
4742 if (r->domain_sid) {
4743 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
4745 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain_name));
4746 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_domain_name));
4748 return NDR_ERR_SUCCESS;
4751 static enum ndr_err_code ndr_pull_lsa_ForestTrustDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustDomainInfo *r)
4753 uint32_t _ptr_domain_sid;
4754 TALLOC_CTX *_mem_save_domain_sid_0;
4755 if (ndr_flags & NDR_SCALARS) {
4756 NDR_CHECK(ndr_pull_align(ndr, 4));
4757 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_sid));
4758 if (_ptr_domain_sid) {
4759 NDR_PULL_ALLOC(ndr, r->domain_sid);
4760 } else {
4761 r->domain_sid = NULL;
4763 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain_name));
4764 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_domain_name));
4766 if (ndr_flags & NDR_BUFFERS) {
4767 if (r->domain_sid) {
4768 _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
4769 NDR_PULL_SET_MEM_CTX(ndr, r->domain_sid, 0);
4770 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
4771 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, 0);
4773 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain_name));
4774 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_domain_name));
4776 return NDR_ERR_SUCCESS;
4779 _PUBLIC_ void ndr_print_lsa_ForestTrustDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustDomainInfo *r)
4781 ndr_print_struct(ndr, name, "lsa_ForestTrustDomainInfo");
4782 ndr->depth++;
4783 ndr_print_ptr(ndr, "domain_sid", r->domain_sid);
4784 ndr->depth++;
4785 if (r->domain_sid) {
4786 ndr_print_dom_sid2(ndr, "domain_sid", r->domain_sid);
4788 ndr->depth--;
4789 ndr_print_lsa_StringLarge(ndr, "dns_domain_name", &r->dns_domain_name);
4790 ndr_print_lsa_StringLarge(ndr, "netbios_domain_name", &r->netbios_domain_name);
4791 ndr->depth--;
4794 static enum ndr_err_code ndr_push_lsa_ForestTrustData(struct ndr_push *ndr, int ndr_flags, const union lsa_ForestTrustData *r)
4796 if (ndr_flags & NDR_SCALARS) {
4797 int level = ndr_push_get_switch_value(ndr, r);
4798 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
4799 switch (level) {
4800 case LSA_FOREST_TRUST_TOP_LEVEL_NAME: {
4801 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->top_level_name));
4802 break; }
4804 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: {
4805 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name_ex));
4806 break; }
4808 case LSA_FOREST_TRUST_DOMAIN_INFO: {
4809 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr, NDR_SCALARS, &r->domain_info));
4810 break; }
4812 default: {
4813 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr, NDR_SCALARS, &r->data));
4814 break; }
4818 if (ndr_flags & NDR_BUFFERS) {
4819 int level = ndr_push_get_switch_value(ndr, r);
4820 switch (level) {
4821 case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
4822 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->top_level_name));
4823 break;
4825 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
4826 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->top_level_name_ex));
4827 break;
4829 case LSA_FOREST_TRUST_DOMAIN_INFO:
4830 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr, NDR_BUFFERS, &r->domain_info));
4831 break;
4833 default:
4834 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr, NDR_BUFFERS, &r->data));
4835 break;
4839 return NDR_ERR_SUCCESS;
4842 static enum ndr_err_code ndr_pull_lsa_ForestTrustData(struct ndr_pull *ndr, int ndr_flags, union lsa_ForestTrustData *r)
4844 int level;
4845 uint32_t _level;
4846 level = ndr_pull_get_switch_value(ndr, r);
4847 if (ndr_flags & NDR_SCALARS) {
4848 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
4849 if (_level != level) {
4850 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
4852 switch (level) {
4853 case LSA_FOREST_TRUST_TOP_LEVEL_NAME: {
4854 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->top_level_name));
4855 break; }
4857 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: {
4858 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name_ex));
4859 break; }
4861 case LSA_FOREST_TRUST_DOMAIN_INFO: {
4862 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr, NDR_SCALARS, &r->domain_info));
4863 break; }
4865 default: {
4866 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr, NDR_SCALARS, &r->data));
4867 break; }
4871 if (ndr_flags & NDR_BUFFERS) {
4872 switch (level) {
4873 case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
4874 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->top_level_name));
4875 break;
4877 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
4878 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->top_level_name_ex));
4879 break;
4881 case LSA_FOREST_TRUST_DOMAIN_INFO:
4882 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr, NDR_BUFFERS, &r->domain_info));
4883 break;
4885 default:
4886 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr, NDR_BUFFERS, &r->data));
4887 break;
4891 return NDR_ERR_SUCCESS;
4894 _PUBLIC_ void ndr_print_lsa_ForestTrustData(struct ndr_print *ndr, const char *name, const union lsa_ForestTrustData *r)
4896 int level;
4897 level = ndr_print_get_switch_value(ndr, r);
4898 ndr_print_union(ndr, name, level, "lsa_ForestTrustData");
4899 switch (level) {
4900 case LSA_FOREST_TRUST_TOP_LEVEL_NAME:
4901 ndr_print_lsa_String(ndr, "top_level_name", &r->top_level_name);
4902 break;
4904 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX:
4905 ndr_print_lsa_StringLarge(ndr, "top_level_name_ex", &r->top_level_name_ex);
4906 break;
4908 case LSA_FOREST_TRUST_DOMAIN_INFO:
4909 ndr_print_lsa_ForestTrustDomainInfo(ndr, "domain_info", &r->domain_info);
4910 break;
4912 default:
4913 ndr_print_lsa_ForestTrustBinaryData(ndr, "data", &r->data);
4914 break;
4919 static enum ndr_err_code ndr_push_lsa_ForestTrustRecordType(struct ndr_push *ndr, int ndr_flags, enum lsa_ForestTrustRecordType r)
4921 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
4922 return NDR_ERR_SUCCESS;
4925 static enum ndr_err_code ndr_pull_lsa_ForestTrustRecordType(struct ndr_pull *ndr, int ndr_flags, enum lsa_ForestTrustRecordType *r)
4927 uint32_t v;
4928 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
4929 *r = v;
4930 return NDR_ERR_SUCCESS;
4933 _PUBLIC_ void ndr_print_lsa_ForestTrustRecordType(struct ndr_print *ndr, const char *name, enum lsa_ForestTrustRecordType r)
4935 const char *val = NULL;
4937 switch (r) {
4938 case LSA_FOREST_TRUST_TOP_LEVEL_NAME: val = "LSA_FOREST_TRUST_TOP_LEVEL_NAME"; break;
4939 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: val = "LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX"; break;
4940 case LSA_FOREST_TRUST_DOMAIN_INFO: val = "LSA_FOREST_TRUST_DOMAIN_INFO"; break;
4941 case LSA_FOREST_TRUST_RECORD_TYPE_LAST: val = "LSA_FOREST_TRUST_RECORD_TYPE_LAST"; break;
4943 ndr_print_enum(ndr, name, "ENUM", val, r);
4946 static enum ndr_err_code ndr_push_lsa_ForestTrustRecord(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustRecord *r)
4948 if (ndr_flags & NDR_SCALARS) {
4949 NDR_CHECK(ndr_push_align(ndr, 8));
4950 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
4951 NDR_CHECK(ndr_push_lsa_ForestTrustRecordType(ndr, NDR_SCALARS, r->level));
4952 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown));
4953 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->forest_trust_data, r->level));
4954 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr, NDR_SCALARS, &r->forest_trust_data));
4956 if (ndr_flags & NDR_BUFFERS) {
4957 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr, NDR_BUFFERS, &r->forest_trust_data));
4959 return NDR_ERR_SUCCESS;
4962 static enum ndr_err_code ndr_pull_lsa_ForestTrustRecord(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustRecord *r)
4964 if (ndr_flags & NDR_SCALARS) {
4965 NDR_CHECK(ndr_pull_align(ndr, 8));
4966 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
4967 NDR_CHECK(ndr_pull_lsa_ForestTrustRecordType(ndr, NDR_SCALARS, &r->level));
4968 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown));
4969 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->forest_trust_data, r->level));
4970 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr, NDR_SCALARS, &r->forest_trust_data));
4972 if (ndr_flags & NDR_BUFFERS) {
4973 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr, NDR_BUFFERS, &r->forest_trust_data));
4975 return NDR_ERR_SUCCESS;
4978 _PUBLIC_ void ndr_print_lsa_ForestTrustRecord(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustRecord *r)
4980 ndr_print_struct(ndr, name, "lsa_ForestTrustRecord");
4981 ndr->depth++;
4982 ndr_print_uint32(ndr, "flags", r->flags);
4983 ndr_print_lsa_ForestTrustRecordType(ndr, "level", r->level);
4984 ndr_print_hyper(ndr, "unknown", r->unknown);
4985 ndr_print_set_switch_value(ndr, &r->forest_trust_data, r->level);
4986 ndr_print_lsa_ForestTrustData(ndr, "forest_trust_data", &r->forest_trust_data);
4987 ndr->depth--;
4990 _PUBLIC_ enum ndr_err_code ndr_push_lsa_ForestTrustInformation(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustInformation *r)
4992 uint32_t cntr_entries_1;
4993 if (ndr_flags & NDR_SCALARS) {
4994 NDR_CHECK(ndr_push_align(ndr, 4));
4995 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4996 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
4998 if (ndr_flags & NDR_BUFFERS) {
4999 if (r->entries) {
5000 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5001 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
5002 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries[cntr_entries_1]));
5004 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
5005 if (r->entries[cntr_entries_1]) {
5006 NDR_CHECK(ndr_push_lsa_ForestTrustRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1]));
5011 return NDR_ERR_SUCCESS;
5014 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_ForestTrustInformation(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustInformation *r)
5016 uint32_t _ptr_entries;
5017 uint32_t cntr_entries_1;
5018 TALLOC_CTX *_mem_save_entries_0;
5019 TALLOC_CTX *_mem_save_entries_1;
5020 TALLOC_CTX *_mem_save_entries_2;
5021 if (ndr_flags & NDR_SCALARS) {
5022 NDR_CHECK(ndr_pull_align(ndr, 4));
5023 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5024 if (r->count > 4000) {
5025 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5027 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
5028 if (_ptr_entries) {
5029 NDR_PULL_ALLOC(ndr, r->entries);
5030 } else {
5031 r->entries = NULL;
5034 if (ndr_flags & NDR_BUFFERS) {
5035 if (r->entries) {
5036 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
5037 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
5038 NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
5039 NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
5040 _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
5041 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
5042 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
5043 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
5044 if (_ptr_entries) {
5045 NDR_PULL_ALLOC(ndr, r->entries[cntr_entries_1]);
5046 } else {
5047 r->entries[cntr_entries_1] = NULL;
5050 for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
5051 if (r->entries[cntr_entries_1]) {
5052 _mem_save_entries_2 = NDR_PULL_GET_MEM_CTX(ndr);
5053 NDR_PULL_SET_MEM_CTX(ndr, r->entries[cntr_entries_1], 0);
5054 NDR_CHECK(ndr_pull_lsa_ForestTrustRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1]));
5055 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_2, 0);
5058 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
5059 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
5061 if (r->entries) {
5062 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count));
5065 return NDR_ERR_SUCCESS;
5068 _PUBLIC_ void ndr_print_lsa_ForestTrustInformation(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustInformation *r)
5070 uint32_t cntr_entries_1;
5071 ndr_print_struct(ndr, name, "lsa_ForestTrustInformation");
5072 ndr->depth++;
5073 ndr_print_uint32(ndr, "count", r->count);
5074 ndr_print_ptr(ndr, "entries", r->entries);
5075 ndr->depth++;
5076 if (r->entries) {
5077 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->count);
5078 ndr->depth++;
5079 for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
5080 char *idx_1=NULL;
5081 if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
5082 ndr_print_ptr(ndr, "entries", r->entries[cntr_entries_1]);
5083 ndr->depth++;
5084 if (r->entries[cntr_entries_1]) {
5085 ndr_print_lsa_ForestTrustRecord(ndr, "entries", r->entries[cntr_entries_1]);
5087 ndr->depth--;
5088 free(idx_1);
5091 ndr->depth--;
5093 ndr->depth--;
5094 ndr->depth--;
5097 static enum ndr_err_code ndr_push_lsa_Close(struct ndr_push *ndr, int flags, const struct lsa_Close *r)
5099 if (flags & NDR_IN) {
5100 if (r->in.handle == NULL) {
5101 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5103 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5105 if (flags & NDR_OUT) {
5106 if (r->out.handle == NULL) {
5107 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5109 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5110 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5112 return NDR_ERR_SUCCESS;
5115 static enum ndr_err_code ndr_pull_lsa_Close(struct ndr_pull *ndr, int flags, struct lsa_Close *r)
5117 TALLOC_CTX *_mem_save_handle_0;
5118 if (flags & NDR_IN) {
5119 ZERO_STRUCT(r->out);
5121 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5122 NDR_PULL_ALLOC(ndr, r->in.handle);
5124 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5125 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5126 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5127 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5128 NDR_PULL_ALLOC(ndr, r->out.handle);
5129 *r->out.handle = *r->in.handle;
5131 if (flags & NDR_OUT) {
5132 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5133 NDR_PULL_ALLOC(ndr, r->out.handle);
5135 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5136 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5137 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5138 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5139 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5141 return NDR_ERR_SUCCESS;
5144 _PUBLIC_ void ndr_print_lsa_Close(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Close *r)
5146 ndr_print_struct(ndr, name, "lsa_Close");
5147 ndr->depth++;
5148 if (flags & NDR_SET_VALUES) {
5149 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5151 if (flags & NDR_IN) {
5152 ndr_print_struct(ndr, "in", "lsa_Close");
5153 ndr->depth++;
5154 ndr_print_ptr(ndr, "handle", r->in.handle);
5155 ndr->depth++;
5156 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5157 ndr->depth--;
5158 ndr->depth--;
5160 if (flags & NDR_OUT) {
5161 ndr_print_struct(ndr, "out", "lsa_Close");
5162 ndr->depth++;
5163 ndr_print_ptr(ndr, "handle", r->out.handle);
5164 ndr->depth++;
5165 ndr_print_policy_handle(ndr, "handle", r->out.handle);
5166 ndr->depth--;
5167 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5168 ndr->depth--;
5170 ndr->depth--;
5173 _PUBLIC_ enum ndr_err_code ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_Delete *r)
5175 if (flags & NDR_IN) {
5176 if (r->in.handle == NULL) {
5177 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5179 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5181 if (flags & NDR_OUT) {
5182 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5184 return NDR_ERR_SUCCESS;
5187 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, struct lsa_Delete *r)
5189 TALLOC_CTX *_mem_save_handle_0;
5190 if (flags & NDR_IN) {
5191 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5192 NDR_PULL_ALLOC(ndr, r->in.handle);
5194 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5195 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5196 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5197 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5199 if (flags & NDR_OUT) {
5200 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5202 return NDR_ERR_SUCCESS;
5205 _PUBLIC_ void ndr_print_lsa_Delete(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Delete *r)
5207 ndr_print_struct(ndr, name, "lsa_Delete");
5208 ndr->depth++;
5209 if (flags & NDR_SET_VALUES) {
5210 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5212 if (flags & NDR_IN) {
5213 ndr_print_struct(ndr, "in", "lsa_Delete");
5214 ndr->depth++;
5215 ndr_print_ptr(ndr, "handle", r->in.handle);
5216 ndr->depth++;
5217 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5218 ndr->depth--;
5219 ndr->depth--;
5221 if (flags & NDR_OUT) {
5222 ndr_print_struct(ndr, "out", "lsa_Delete");
5223 ndr->depth++;
5224 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5225 ndr->depth--;
5227 ndr->depth--;
5230 _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivs *r)
5232 if (flags & NDR_IN) {
5233 if (r->in.handle == NULL) {
5234 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5236 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5237 if (r->in.resume_handle == NULL) {
5238 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5240 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
5241 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_count));
5243 if (flags & NDR_OUT) {
5244 if (r->out.resume_handle == NULL) {
5245 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5247 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
5248 if (r->out.privs == NULL) {
5249 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5251 NDR_CHECK(ndr_push_lsa_PrivArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs));
5252 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5254 return NDR_ERR_SUCCESS;
5257 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivs *r)
5259 TALLOC_CTX *_mem_save_handle_0;
5260 TALLOC_CTX *_mem_save_resume_handle_0;
5261 TALLOC_CTX *_mem_save_privs_0;
5262 if (flags & NDR_IN) {
5263 ZERO_STRUCT(r->out);
5265 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5266 NDR_PULL_ALLOC(ndr, r->in.handle);
5268 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5269 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5270 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5271 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5272 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5273 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
5275 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5276 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
5277 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
5278 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
5279 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_count));
5280 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
5281 *r->out.resume_handle = *r->in.resume_handle;
5282 NDR_PULL_ALLOC(ndr, r->out.privs);
5283 ZERO_STRUCTP(r->out.privs);
5285 if (flags & NDR_OUT) {
5286 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5287 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
5289 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5290 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
5291 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
5292 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
5293 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5294 NDR_PULL_ALLOC(ndr, r->out.privs);
5296 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
5297 NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, LIBNDR_FLAG_REF_ALLOC);
5298 NDR_CHECK(ndr_pull_lsa_PrivArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs));
5299 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
5300 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5302 return NDR_ERR_SUCCESS;
5305 _PUBLIC_ void ndr_print_lsa_EnumPrivs(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivs *r)
5307 ndr_print_struct(ndr, name, "lsa_EnumPrivs");
5308 ndr->depth++;
5309 if (flags & NDR_SET_VALUES) {
5310 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5312 if (flags & NDR_IN) {
5313 ndr_print_struct(ndr, "in", "lsa_EnumPrivs");
5314 ndr->depth++;
5315 ndr_print_ptr(ndr, "handle", r->in.handle);
5316 ndr->depth++;
5317 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5318 ndr->depth--;
5319 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
5320 ndr->depth++;
5321 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
5322 ndr->depth--;
5323 ndr_print_uint32(ndr, "max_count", r->in.max_count);
5324 ndr->depth--;
5326 if (flags & NDR_OUT) {
5327 ndr_print_struct(ndr, "out", "lsa_EnumPrivs");
5328 ndr->depth++;
5329 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
5330 ndr->depth++;
5331 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
5332 ndr->depth--;
5333 ndr_print_ptr(ndr, "privs", r->out.privs);
5334 ndr->depth++;
5335 ndr_print_lsa_PrivArray(ndr, "privs", r->out.privs);
5336 ndr->depth--;
5337 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5338 ndr->depth--;
5340 ndr->depth--;
5343 static enum ndr_err_code ndr_push_lsa_QuerySecurity(struct ndr_push *ndr, int flags, const struct lsa_QuerySecurity *r)
5345 if (flags & NDR_IN) {
5346 if (r->in.handle == NULL) {
5347 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5349 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5350 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
5352 if (flags & NDR_OUT) {
5353 if (r->out.sdbuf == NULL) {
5354 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5356 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sdbuf));
5357 if (*r->out.sdbuf) {
5358 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
5360 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5362 return NDR_ERR_SUCCESS;
5365 static enum ndr_err_code ndr_pull_lsa_QuerySecurity(struct ndr_pull *ndr, int flags, struct lsa_QuerySecurity *r)
5367 uint32_t _ptr_sdbuf;
5368 TALLOC_CTX *_mem_save_handle_0;
5369 TALLOC_CTX *_mem_save_sdbuf_0;
5370 TALLOC_CTX *_mem_save_sdbuf_1;
5371 if (flags & NDR_IN) {
5372 ZERO_STRUCT(r->out);
5374 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5375 NDR_PULL_ALLOC(ndr, r->in.handle);
5377 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5378 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5379 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5380 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5381 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
5382 NDR_PULL_ALLOC(ndr, r->out.sdbuf);
5383 ZERO_STRUCTP(r->out.sdbuf);
5385 if (flags & NDR_OUT) {
5386 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5387 NDR_PULL_ALLOC(ndr, r->out.sdbuf);
5389 _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
5390 NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC);
5391 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sdbuf));
5392 if (_ptr_sdbuf) {
5393 NDR_PULL_ALLOC(ndr, *r->out.sdbuf);
5394 } else {
5395 *r->out.sdbuf = NULL;
5397 if (*r->out.sdbuf) {
5398 _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr);
5399 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, 0);
5400 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf));
5401 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, 0);
5403 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
5404 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5406 return NDR_ERR_SUCCESS;
5409 _PUBLIC_ void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecurity *r)
5411 ndr_print_struct(ndr, name, "lsa_QuerySecurity");
5412 ndr->depth++;
5413 if (flags & NDR_SET_VALUES) {
5414 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5416 if (flags & NDR_IN) {
5417 ndr_print_struct(ndr, "in", "lsa_QuerySecurity");
5418 ndr->depth++;
5419 ndr_print_ptr(ndr, "handle", r->in.handle);
5420 ndr->depth++;
5421 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5422 ndr->depth--;
5423 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
5424 ndr->depth--;
5426 if (flags & NDR_OUT) {
5427 ndr_print_struct(ndr, "out", "lsa_QuerySecurity");
5428 ndr->depth++;
5429 ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf);
5430 ndr->depth++;
5431 ndr_print_ptr(ndr, "sdbuf", *r->out.sdbuf);
5432 ndr->depth++;
5433 if (*r->out.sdbuf) {
5434 ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf);
5436 ndr->depth--;
5437 ndr->depth--;
5438 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5439 ndr->depth--;
5441 ndr->depth--;
5444 static enum ndr_err_code ndr_push_lsa_SetSecObj(struct ndr_push *ndr, int flags, const struct lsa_SetSecObj *r)
5446 if (flags & NDR_IN) {
5447 if (r->in.handle == NULL) {
5448 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5450 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5451 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
5452 if (r->in.sdbuf == NULL) {
5453 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5455 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
5457 if (flags & NDR_OUT) {
5458 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5460 return NDR_ERR_SUCCESS;
5463 static enum ndr_err_code ndr_pull_lsa_SetSecObj(struct ndr_pull *ndr, int flags, struct lsa_SetSecObj *r)
5465 TALLOC_CTX *_mem_save_handle_0;
5466 TALLOC_CTX *_mem_save_sdbuf_0;
5467 if (flags & NDR_IN) {
5468 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5469 NDR_PULL_ALLOC(ndr, r->in.handle);
5471 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5472 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5473 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5474 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5475 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
5476 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5477 NDR_PULL_ALLOC(ndr, r->in.sdbuf);
5479 _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
5480 NDR_PULL_SET_MEM_CTX(ndr, r->in.sdbuf, LIBNDR_FLAG_REF_ALLOC);
5481 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf));
5482 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC);
5484 if (flags & NDR_OUT) {
5485 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5487 return NDR_ERR_SUCCESS;
5490 _PUBLIC_ void ndr_print_lsa_SetSecObj(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecObj *r)
5492 ndr_print_struct(ndr, name, "lsa_SetSecObj");
5493 ndr->depth++;
5494 if (flags & NDR_SET_VALUES) {
5495 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5497 if (flags & NDR_IN) {
5498 ndr_print_struct(ndr, "in", "lsa_SetSecObj");
5499 ndr->depth++;
5500 ndr_print_ptr(ndr, "handle", r->in.handle);
5501 ndr->depth++;
5502 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5503 ndr->depth--;
5504 ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
5505 ndr_print_ptr(ndr, "sdbuf", r->in.sdbuf);
5506 ndr->depth++;
5507 ndr_print_sec_desc_buf(ndr, "sdbuf", r->in.sdbuf);
5508 ndr->depth--;
5509 ndr->depth--;
5511 if (flags & NDR_OUT) {
5512 ndr_print_struct(ndr, "out", "lsa_SetSecObj");
5513 ndr->depth++;
5514 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5515 ndr->depth--;
5517 ndr->depth--;
5520 static enum ndr_err_code ndr_push_lsa_ChangePassword(struct ndr_push *ndr, int flags, const struct lsa_ChangePassword *r)
5522 if (flags & NDR_IN) {
5524 if (flags & NDR_OUT) {
5525 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5527 return NDR_ERR_SUCCESS;
5530 static enum ndr_err_code ndr_pull_lsa_ChangePassword(struct ndr_pull *ndr, int flags, struct lsa_ChangePassword *r)
5532 if (flags & NDR_IN) {
5534 if (flags & NDR_OUT) {
5535 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5537 return NDR_ERR_SUCCESS;
5540 _PUBLIC_ void ndr_print_lsa_ChangePassword(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ChangePassword *r)
5542 ndr_print_struct(ndr, name, "lsa_ChangePassword");
5543 ndr->depth++;
5544 if (flags & NDR_SET_VALUES) {
5545 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5547 if (flags & NDR_IN) {
5548 ndr_print_struct(ndr, "in", "lsa_ChangePassword");
5549 ndr->depth++;
5550 ndr->depth--;
5552 if (flags & NDR_OUT) {
5553 ndr_print_struct(ndr, "out", "lsa_ChangePassword");
5554 ndr->depth++;
5555 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5556 ndr->depth--;
5558 ndr->depth--;
5561 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy *r)
5563 if (flags & NDR_IN) {
5564 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
5565 if (r->in.system_name) {
5566 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
5568 if (r->in.attr == NULL) {
5569 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5571 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
5572 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
5574 if (flags & NDR_OUT) {
5575 if (r->out.handle == NULL) {
5576 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5578 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5579 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5581 return NDR_ERR_SUCCESS;
5584 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy *r)
5586 uint32_t _ptr_system_name;
5587 TALLOC_CTX *_mem_save_system_name_0;
5588 TALLOC_CTX *_mem_save_attr_0;
5589 TALLOC_CTX *_mem_save_handle_0;
5590 if (flags & NDR_IN) {
5591 ZERO_STRUCT(r->out);
5593 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
5594 if (_ptr_system_name) {
5595 NDR_PULL_ALLOC(ndr, r->in.system_name);
5596 } else {
5597 r->in.system_name = NULL;
5599 if (r->in.system_name) {
5600 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5601 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
5602 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
5603 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
5605 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5606 NDR_PULL_ALLOC(ndr, r->in.attr);
5608 _mem_save_attr_0 = NDR_PULL_GET_MEM_CTX(ndr);
5609 NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC);
5610 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
5611 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC);
5612 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
5613 NDR_PULL_ALLOC(ndr, r->out.handle);
5614 ZERO_STRUCTP(r->out.handle);
5616 if (flags & NDR_OUT) {
5617 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5618 NDR_PULL_ALLOC(ndr, r->out.handle);
5620 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5621 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5622 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5623 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5624 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5626 return NDR_ERR_SUCCESS;
5629 _PUBLIC_ void ndr_print_lsa_OpenPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy *r)
5631 ndr_print_struct(ndr, name, "lsa_OpenPolicy");
5632 ndr->depth++;
5633 if (flags & NDR_SET_VALUES) {
5634 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5636 if (flags & NDR_IN) {
5637 ndr_print_struct(ndr, "in", "lsa_OpenPolicy");
5638 ndr->depth++;
5639 ndr_print_ptr(ndr, "system_name", r->in.system_name);
5640 ndr->depth++;
5641 if (r->in.system_name) {
5642 ndr_print_uint16(ndr, "system_name", *r->in.system_name);
5644 ndr->depth--;
5645 ndr_print_ptr(ndr, "attr", r->in.attr);
5646 ndr->depth++;
5647 ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr);
5648 ndr->depth--;
5649 ndr_print_lsa_PolicyAccessMask(ndr, "access_mask", r->in.access_mask);
5650 ndr->depth--;
5652 if (flags & NDR_OUT) {
5653 ndr_print_struct(ndr, "out", "lsa_OpenPolicy");
5654 ndr->depth++;
5655 ndr_print_ptr(ndr, "handle", r->out.handle);
5656 ndr->depth++;
5657 ndr_print_policy_handle(ndr, "handle", r->out.handle);
5658 ndr->depth--;
5659 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5660 ndr->depth--;
5662 ndr->depth--;
5665 static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy *r)
5667 if (flags & NDR_IN) {
5668 if (r->in.handle == NULL) {
5669 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5671 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5672 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
5674 if (flags & NDR_OUT) {
5675 if (r->out.info == NULL) {
5676 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5678 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
5679 if (*r->out.info) {
5680 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
5681 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
5683 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5685 return NDR_ERR_SUCCESS;
5688 static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy *r)
5690 uint32_t _ptr_info;
5691 TALLOC_CTX *_mem_save_handle_0;
5692 TALLOC_CTX *_mem_save_info_0;
5693 TALLOC_CTX *_mem_save_info_1;
5694 if (flags & NDR_IN) {
5695 ZERO_STRUCT(r->out);
5697 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5698 NDR_PULL_ALLOC(ndr, r->in.handle);
5700 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5701 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5702 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5703 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5704 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
5705 NDR_PULL_ALLOC(ndr, r->out.info);
5706 ZERO_STRUCTP(r->out.info);
5708 if (flags & NDR_OUT) {
5709 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5710 NDR_PULL_ALLOC(ndr, r->out.info);
5712 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5713 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
5714 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5715 if (_ptr_info) {
5716 NDR_PULL_ALLOC(ndr, *r->out.info);
5717 } else {
5718 *r->out.info = NULL;
5720 if (*r->out.info) {
5721 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
5722 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
5723 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
5724 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
5725 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
5727 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
5728 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5730 return NDR_ERR_SUCCESS;
5733 _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy *r)
5735 ndr_print_struct(ndr, name, "lsa_QueryInfoPolicy");
5736 ndr->depth++;
5737 if (flags & NDR_SET_VALUES) {
5738 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5740 if (flags & NDR_IN) {
5741 ndr_print_struct(ndr, "in", "lsa_QueryInfoPolicy");
5742 ndr->depth++;
5743 ndr_print_ptr(ndr, "handle", r->in.handle);
5744 ndr->depth++;
5745 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5746 ndr->depth--;
5747 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
5748 ndr->depth--;
5750 if (flags & NDR_OUT) {
5751 ndr_print_struct(ndr, "out", "lsa_QueryInfoPolicy");
5752 ndr->depth++;
5753 ndr_print_ptr(ndr, "info", r->out.info);
5754 ndr->depth++;
5755 ndr_print_ptr(ndr, "info", *r->out.info);
5756 ndr->depth++;
5757 if (*r->out.info) {
5758 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
5759 ndr_print_lsa_PolicyInformation(ndr, "info", *r->out.info);
5761 ndr->depth--;
5762 ndr->depth--;
5763 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5764 ndr->depth--;
5766 ndr->depth--;
5769 static enum ndr_err_code ndr_push_lsa_SetInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy *r)
5771 if (flags & NDR_IN) {
5772 if (r->in.handle == NULL) {
5773 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5775 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5776 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
5777 if (r->in.info == NULL) {
5778 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5780 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
5781 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5783 if (flags & NDR_OUT) {
5784 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5786 return NDR_ERR_SUCCESS;
5789 static enum ndr_err_code ndr_pull_lsa_SetInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy *r)
5791 TALLOC_CTX *_mem_save_handle_0;
5792 TALLOC_CTX *_mem_save_info_0;
5793 if (flags & NDR_IN) {
5794 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5795 NDR_PULL_ALLOC(ndr, r->in.handle);
5797 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5798 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5799 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5800 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5801 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
5802 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5803 NDR_PULL_ALLOC(ndr, r->in.info);
5805 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5806 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
5807 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
5808 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5809 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
5811 if (flags & NDR_OUT) {
5812 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5814 return NDR_ERR_SUCCESS;
5817 _PUBLIC_ void ndr_print_lsa_SetInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy *r)
5819 ndr_print_struct(ndr, name, "lsa_SetInfoPolicy");
5820 ndr->depth++;
5821 if (flags & NDR_SET_VALUES) {
5822 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5824 if (flags & NDR_IN) {
5825 ndr_print_struct(ndr, "in", "lsa_SetInfoPolicy");
5826 ndr->depth++;
5827 ndr_print_ptr(ndr, "handle", r->in.handle);
5828 ndr->depth++;
5829 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5830 ndr->depth--;
5831 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
5832 ndr_print_ptr(ndr, "info", r->in.info);
5833 ndr->depth++;
5834 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
5835 ndr_print_lsa_PolicyInformation(ndr, "info", r->in.info);
5836 ndr->depth--;
5837 ndr->depth--;
5839 if (flags & NDR_OUT) {
5840 ndr_print_struct(ndr, "out", "lsa_SetInfoPolicy");
5841 ndr->depth++;
5842 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5843 ndr->depth--;
5845 ndr->depth--;
5848 static enum ndr_err_code ndr_push_lsa_ClearAuditLog(struct ndr_push *ndr, int flags, const struct lsa_ClearAuditLog *r)
5850 if (flags & NDR_IN) {
5852 if (flags & NDR_OUT) {
5853 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5855 return NDR_ERR_SUCCESS;
5858 static enum ndr_err_code ndr_pull_lsa_ClearAuditLog(struct ndr_pull *ndr, int flags, struct lsa_ClearAuditLog *r)
5860 if (flags & NDR_IN) {
5862 if (flags & NDR_OUT) {
5863 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5865 return NDR_ERR_SUCCESS;
5868 _PUBLIC_ void ndr_print_lsa_ClearAuditLog(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ClearAuditLog *r)
5870 ndr_print_struct(ndr, name, "lsa_ClearAuditLog");
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_ClearAuditLog");
5877 ndr->depth++;
5878 ndr->depth--;
5880 if (flags & NDR_OUT) {
5881 ndr_print_struct(ndr, "out", "lsa_ClearAuditLog");
5882 ndr->depth++;
5883 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5884 ndr->depth--;
5886 ndr->depth--;
5889 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struct lsa_CreateAccount *r)
5891 if (flags & NDR_IN) {
5892 if (r->in.handle == NULL) {
5893 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5895 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5896 if (r->in.sid == NULL) {
5897 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5899 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
5900 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
5902 if (flags & NDR_OUT) {
5903 if (r->out.acct_handle == NULL) {
5904 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5906 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
5907 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
5909 return NDR_ERR_SUCCESS;
5912 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r)
5914 TALLOC_CTX *_mem_save_handle_0;
5915 TALLOC_CTX *_mem_save_sid_0;
5916 TALLOC_CTX *_mem_save_acct_handle_0;
5917 if (flags & NDR_IN) {
5918 ZERO_STRUCT(r->out);
5920 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5921 NDR_PULL_ALLOC(ndr, r->in.handle);
5923 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5924 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5925 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5926 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5927 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5928 NDR_PULL_ALLOC(ndr, r->in.sid);
5930 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
5931 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
5932 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
5933 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
5934 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
5935 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
5936 ZERO_STRUCTP(r->out.acct_handle);
5938 if (flags & NDR_OUT) {
5939 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5940 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
5942 _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5943 NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC);
5944 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
5945 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC);
5946 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
5948 return NDR_ERR_SUCCESS;
5951 _PUBLIC_ void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateAccount *r)
5953 ndr_print_struct(ndr, name, "lsa_CreateAccount");
5954 ndr->depth++;
5955 if (flags & NDR_SET_VALUES) {
5956 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5958 if (flags & NDR_IN) {
5959 ndr_print_struct(ndr, "in", "lsa_CreateAccount");
5960 ndr->depth++;
5961 ndr_print_ptr(ndr, "handle", r->in.handle);
5962 ndr->depth++;
5963 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5964 ndr->depth--;
5965 ndr_print_ptr(ndr, "sid", r->in.sid);
5966 ndr->depth++;
5967 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
5968 ndr->depth--;
5969 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
5970 ndr->depth--;
5972 if (flags & NDR_OUT) {
5973 ndr_print_struct(ndr, "out", "lsa_CreateAccount");
5974 ndr->depth++;
5975 ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle);
5976 ndr->depth++;
5977 ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle);
5978 ndr->depth--;
5979 ndr_print_NTSTATUS(ndr, "result", r->out.result);
5980 ndr->depth--;
5982 ndr->depth--;
5985 _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct lsa_EnumAccounts *r)
5987 if (flags & NDR_IN) {
5988 if (r->in.handle == NULL) {
5989 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5991 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5992 if (r->in.resume_handle == NULL) {
5993 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5995 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
5996 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_entries));
5998 if (flags & NDR_OUT) {
5999 if (r->out.resume_handle == NULL) {
6000 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6002 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6003 if (r->out.sids == NULL) {
6004 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6006 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6007 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6009 return NDR_ERR_SUCCESS;
6012 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int flags, struct lsa_EnumAccounts *r)
6014 TALLOC_CTX *_mem_save_handle_0;
6015 TALLOC_CTX *_mem_save_resume_handle_0;
6016 TALLOC_CTX *_mem_save_sids_0;
6017 if (flags & NDR_IN) {
6018 ZERO_STRUCT(r->out);
6020 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6021 NDR_PULL_ALLOC(ndr, r->in.handle);
6023 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6024 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6025 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6026 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6027 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6028 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6030 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6031 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6032 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6033 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6034 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_entries));
6035 if (r->in.num_entries > 8192) {
6036 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6038 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6039 *r->out.resume_handle = *r->in.resume_handle;
6040 NDR_PULL_ALLOC(ndr, r->out.sids);
6041 ZERO_STRUCTP(r->out.sids);
6043 if (flags & NDR_OUT) {
6044 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6045 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6047 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6048 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6049 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6050 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6051 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6052 NDR_PULL_ALLOC(ndr, r->out.sids);
6054 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6055 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
6056 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6057 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6058 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6060 return NDR_ERR_SUCCESS;
6063 _PUBLIC_ void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccounts *r)
6065 ndr_print_struct(ndr, name, "lsa_EnumAccounts");
6066 ndr->depth++;
6067 if (flags & NDR_SET_VALUES) {
6068 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6070 if (flags & NDR_IN) {
6071 ndr_print_struct(ndr, "in", "lsa_EnumAccounts");
6072 ndr->depth++;
6073 ndr_print_ptr(ndr, "handle", r->in.handle);
6074 ndr->depth++;
6075 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6076 ndr->depth--;
6077 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6078 ndr->depth++;
6079 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6080 ndr->depth--;
6081 ndr_print_uint32(ndr, "num_entries", r->in.num_entries);
6082 ndr->depth--;
6084 if (flags & NDR_OUT) {
6085 ndr_print_struct(ndr, "out", "lsa_EnumAccounts");
6086 ndr->depth++;
6087 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6088 ndr->depth++;
6089 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6090 ndr->depth--;
6091 ndr_print_ptr(ndr, "sids", r->out.sids);
6092 ndr->depth++;
6093 ndr_print_lsa_SidArray(ndr, "sids", r->out.sids);
6094 ndr->depth--;
6095 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6096 ndr->depth--;
6098 ndr->depth--;
6101 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *r)
6103 if (flags & NDR_IN) {
6104 if (r->in.policy_handle == NULL) {
6105 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6107 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
6108 if (r->in.info == NULL) {
6109 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6111 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6112 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
6114 if (flags & NDR_OUT) {
6115 if (r->out.trustdom_handle == NULL) {
6116 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6118 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
6119 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6121 return NDR_ERR_SUCCESS;
6124 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r)
6126 TALLOC_CTX *_mem_save_policy_handle_0;
6127 TALLOC_CTX *_mem_save_info_0;
6128 TALLOC_CTX *_mem_save_trustdom_handle_0;
6129 if (flags & NDR_IN) {
6130 ZERO_STRUCT(r->out);
6132 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6133 NDR_PULL_ALLOC(ndr, r->in.policy_handle);
6135 _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6136 NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
6137 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
6138 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
6139 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6140 NDR_PULL_ALLOC(ndr, r->in.info);
6142 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6143 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
6144 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
6145 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
6146 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
6147 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
6148 ZERO_STRUCTP(r->out.trustdom_handle);
6150 if (flags & NDR_OUT) {
6151 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6152 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
6154 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6155 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
6156 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
6157 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
6158 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6160 return NDR_ERR_SUCCESS;
6163 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomain *r)
6165 ndr_print_struct(ndr, name, "lsa_CreateTrustedDomain");
6166 ndr->depth++;
6167 if (flags & NDR_SET_VALUES) {
6168 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6170 if (flags & NDR_IN) {
6171 ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomain");
6172 ndr->depth++;
6173 ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
6174 ndr->depth++;
6175 ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
6176 ndr->depth--;
6177 ndr_print_ptr(ndr, "info", r->in.info);
6178 ndr->depth++;
6179 ndr_print_lsa_DomainInfo(ndr, "info", r->in.info);
6180 ndr->depth--;
6181 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
6182 ndr->depth--;
6184 if (flags & NDR_OUT) {
6185 ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomain");
6186 ndr->depth++;
6187 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
6188 ndr->depth++;
6189 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
6190 ndr->depth--;
6191 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6192 ndr->depth--;
6194 ndr->depth--;
6197 static enum ndr_err_code ndr_push_lsa_EnumTrustDom(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustDom *r)
6199 if (flags & NDR_IN) {
6200 if (r->in.handle == NULL) {
6201 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6203 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6204 if (r->in.resume_handle == NULL) {
6205 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6207 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6208 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
6210 if (flags & NDR_OUT) {
6211 if (r->out.resume_handle == NULL) {
6212 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6214 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6215 if (r->out.domains == NULL) {
6216 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6218 NDR_CHECK(ndr_push_lsa_DomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
6219 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6221 return NDR_ERR_SUCCESS;
6224 static enum ndr_err_code ndr_pull_lsa_EnumTrustDom(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustDom *r)
6226 TALLOC_CTX *_mem_save_handle_0;
6227 TALLOC_CTX *_mem_save_resume_handle_0;
6228 TALLOC_CTX *_mem_save_domains_0;
6229 if (flags & NDR_IN) {
6230 ZERO_STRUCT(r->out);
6232 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6233 NDR_PULL_ALLOC(ndr, r->in.handle);
6235 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6236 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6237 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6238 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6239 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6240 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6242 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6243 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6244 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6245 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6246 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
6247 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6248 *r->out.resume_handle = *r->in.resume_handle;
6249 NDR_PULL_ALLOC(ndr, r->out.domains);
6250 ZERO_STRUCTP(r->out.domains);
6252 if (flags & NDR_OUT) {
6253 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6254 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6256 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6257 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
6258 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6259 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
6260 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6261 NDR_PULL_ALLOC(ndr, r->out.domains);
6263 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
6264 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
6265 NDR_CHECK(ndr_pull_lsa_DomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
6266 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
6267 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6269 return NDR_ERR_SUCCESS;
6272 _PUBLIC_ void ndr_print_lsa_EnumTrustDom(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustDom *r)
6274 ndr_print_struct(ndr, name, "lsa_EnumTrustDom");
6275 ndr->depth++;
6276 if (flags & NDR_SET_VALUES) {
6277 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6279 if (flags & NDR_IN) {
6280 ndr_print_struct(ndr, "in", "lsa_EnumTrustDom");
6281 ndr->depth++;
6282 ndr_print_ptr(ndr, "handle", r->in.handle);
6283 ndr->depth++;
6284 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6285 ndr->depth--;
6286 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6287 ndr->depth++;
6288 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6289 ndr->depth--;
6290 ndr_print_uint32(ndr, "max_size", r->in.max_size);
6291 ndr->depth--;
6293 if (flags & NDR_OUT) {
6294 ndr_print_struct(ndr, "out", "lsa_EnumTrustDom");
6295 ndr->depth++;
6296 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6297 ndr->depth++;
6298 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6299 ndr->depth--;
6300 ndr_print_ptr(ndr, "domains", r->out.domains);
6301 ndr->depth++;
6302 ndr_print_lsa_DomainList(ndr, "domains", r->out.domains);
6303 ndr->depth--;
6304 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6305 ndr->depth--;
6307 ndr->depth--;
6310 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct lsa_LookupNames *r)
6312 uint32_t cntr_names_0;
6313 if (flags & NDR_IN) {
6314 if (r->in.handle == NULL) {
6315 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6317 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6318 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
6319 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
6320 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
6321 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
6323 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
6324 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
6326 if (r->in.sids == NULL) {
6327 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6329 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6330 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
6331 if (r->in.count == NULL) {
6332 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6334 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
6336 if (flags & NDR_OUT) {
6337 if (r->out.domains == NULL) {
6338 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6340 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
6341 if (*r->out.domains) {
6342 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6344 if (r->out.sids == NULL) {
6345 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6347 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6348 if (r->out.count == NULL) {
6349 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6351 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
6352 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6354 return NDR_ERR_SUCCESS;
6357 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flags, struct lsa_LookupNames *r)
6359 uint32_t cntr_names_0;
6360 uint32_t _ptr_domains;
6361 TALLOC_CTX *_mem_save_handle_0;
6362 TALLOC_CTX *_mem_save_names_0;
6363 TALLOC_CTX *_mem_save_domains_0;
6364 TALLOC_CTX *_mem_save_domains_1;
6365 TALLOC_CTX *_mem_save_sids_0;
6366 TALLOC_CTX *_mem_save_count_0;
6367 if (flags & NDR_IN) {
6368 ZERO_STRUCT(r->out);
6370 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6371 NDR_PULL_ALLOC(ndr, r->in.handle);
6373 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6374 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6375 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6376 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6377 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
6378 if (r->in.num_names > 1000) {
6379 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6381 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
6382 NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
6383 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
6384 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
6385 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
6386 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
6388 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
6389 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
6391 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
6392 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6393 NDR_PULL_ALLOC(ndr, r->in.sids);
6395 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6396 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
6397 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6398 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6399 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
6400 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6401 NDR_PULL_ALLOC(ndr, r->in.count);
6403 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6404 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
6405 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
6406 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6407 NDR_PULL_ALLOC(ndr, r->out.domains);
6408 ZERO_STRUCTP(r->out.domains);
6409 NDR_PULL_ALLOC(ndr, r->out.sids);
6410 *r->out.sids = *r->in.sids;
6411 NDR_PULL_ALLOC(ndr, r->out.count);
6412 *r->out.count = *r->in.count;
6413 if (r->in.names) {
6414 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
6417 if (flags & NDR_OUT) {
6418 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6419 NDR_PULL_ALLOC(ndr, r->out.domains);
6421 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
6422 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
6423 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
6424 if (_ptr_domains) {
6425 NDR_PULL_ALLOC(ndr, *r->out.domains);
6426 } else {
6427 *r->out.domains = NULL;
6429 if (*r->out.domains) {
6430 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
6431 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
6432 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6433 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
6435 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
6436 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6437 NDR_PULL_ALLOC(ndr, r->out.sids);
6439 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6440 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
6441 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
6442 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6443 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6444 NDR_PULL_ALLOC(ndr, r->out.count);
6446 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6447 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
6448 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
6449 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6450 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6452 return NDR_ERR_SUCCESS;
6455 _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames *r)
6457 uint32_t cntr_names_0;
6458 ndr_print_struct(ndr, name, "lsa_LookupNames");
6459 ndr->depth++;
6460 if (flags & NDR_SET_VALUES) {
6461 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6463 if (flags & NDR_IN) {
6464 ndr_print_struct(ndr, "in", "lsa_LookupNames");
6465 ndr->depth++;
6466 ndr_print_ptr(ndr, "handle", r->in.handle);
6467 ndr->depth++;
6468 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6469 ndr->depth--;
6470 ndr_print_uint32(ndr, "num_names", r->in.num_names);
6471 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
6472 ndr->depth++;
6473 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
6474 char *idx_0=NULL;
6475 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
6476 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
6477 free(idx_0);
6480 ndr->depth--;
6481 ndr_print_ptr(ndr, "sids", r->in.sids);
6482 ndr->depth++;
6483 ndr_print_lsa_TransSidArray(ndr, "sids", r->in.sids);
6484 ndr->depth--;
6485 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
6486 ndr_print_ptr(ndr, "count", r->in.count);
6487 ndr->depth++;
6488 ndr_print_uint32(ndr, "count", *r->in.count);
6489 ndr->depth--;
6490 ndr->depth--;
6492 if (flags & NDR_OUT) {
6493 ndr_print_struct(ndr, "out", "lsa_LookupNames");
6494 ndr->depth++;
6495 ndr_print_ptr(ndr, "domains", r->out.domains);
6496 ndr->depth++;
6497 ndr_print_ptr(ndr, "domains", *r->out.domains);
6498 ndr->depth++;
6499 if (*r->out.domains) {
6500 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
6502 ndr->depth--;
6503 ndr->depth--;
6504 ndr_print_ptr(ndr, "sids", r->out.sids);
6505 ndr->depth++;
6506 ndr_print_lsa_TransSidArray(ndr, "sids", r->out.sids);
6507 ndr->depth--;
6508 ndr_print_ptr(ndr, "count", r->out.count);
6509 ndr->depth++;
6510 ndr_print_uint32(ndr, "count", *r->out.count);
6511 ndr->depth--;
6512 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6513 ndr->depth--;
6515 ndr->depth--;
6518 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct lsa_LookupSids *r)
6520 if (flags & NDR_IN) {
6521 if (r->in.handle == NULL) {
6522 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6524 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6525 if (r->in.sids == NULL) {
6526 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6528 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6529 if (r->in.names == NULL) {
6530 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6532 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
6533 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
6534 if (r->in.count == NULL) {
6535 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6537 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
6539 if (flags & NDR_OUT) {
6540 if (r->out.domains == NULL) {
6541 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6543 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
6544 if (*r->out.domains) {
6545 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6547 if (r->out.names == NULL) {
6548 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6550 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
6551 if (r->out.count == NULL) {
6552 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6554 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
6555 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6557 return NDR_ERR_SUCCESS;
6560 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int flags, struct lsa_LookupSids *r)
6562 uint32_t _ptr_domains;
6563 TALLOC_CTX *_mem_save_handle_0;
6564 TALLOC_CTX *_mem_save_sids_0;
6565 TALLOC_CTX *_mem_save_domains_0;
6566 TALLOC_CTX *_mem_save_domains_1;
6567 TALLOC_CTX *_mem_save_names_0;
6568 TALLOC_CTX *_mem_save_count_0;
6569 if (flags & NDR_IN) {
6570 ZERO_STRUCT(r->out);
6572 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6573 NDR_PULL_ALLOC(ndr, r->in.handle);
6575 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6576 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6577 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6578 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6579 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6580 NDR_PULL_ALLOC(ndr, r->in.sids);
6582 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
6583 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
6584 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
6585 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
6586 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6587 NDR_PULL_ALLOC(ndr, r->in.names);
6589 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
6590 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
6591 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
6592 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
6593 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
6594 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6595 NDR_PULL_ALLOC(ndr, r->in.count);
6597 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6598 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
6599 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
6600 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6601 NDR_PULL_ALLOC(ndr, r->out.domains);
6602 ZERO_STRUCTP(r->out.domains);
6603 NDR_PULL_ALLOC(ndr, r->out.names);
6604 *r->out.names = *r->in.names;
6605 NDR_PULL_ALLOC(ndr, r->out.count);
6606 *r->out.count = *r->in.count;
6608 if (flags & NDR_OUT) {
6609 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6610 NDR_PULL_ALLOC(ndr, r->out.domains);
6612 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
6613 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
6614 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
6615 if (_ptr_domains) {
6616 NDR_PULL_ALLOC(ndr, *r->out.domains);
6617 } else {
6618 *r->out.domains = NULL;
6620 if (*r->out.domains) {
6621 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
6622 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
6623 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
6624 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
6626 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
6627 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6628 NDR_PULL_ALLOC(ndr, r->out.names);
6630 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
6631 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
6632 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
6633 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
6634 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6635 NDR_PULL_ALLOC(ndr, r->out.count);
6637 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
6638 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
6639 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
6640 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
6641 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6643 return NDR_ERR_SUCCESS;
6646 _PUBLIC_ void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids *r)
6648 ndr_print_struct(ndr, name, "lsa_LookupSids");
6649 ndr->depth++;
6650 if (flags & NDR_SET_VALUES) {
6651 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6653 if (flags & NDR_IN) {
6654 ndr_print_struct(ndr, "in", "lsa_LookupSids");
6655 ndr->depth++;
6656 ndr_print_ptr(ndr, "handle", r->in.handle);
6657 ndr->depth++;
6658 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6659 ndr->depth--;
6660 ndr_print_ptr(ndr, "sids", r->in.sids);
6661 ndr->depth++;
6662 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
6663 ndr->depth--;
6664 ndr_print_ptr(ndr, "names", r->in.names);
6665 ndr->depth++;
6666 ndr_print_lsa_TransNameArray(ndr, "names", r->in.names);
6667 ndr->depth--;
6668 ndr_print_uint16(ndr, "level", r->in.level);
6669 ndr_print_ptr(ndr, "count", r->in.count);
6670 ndr->depth++;
6671 ndr_print_uint32(ndr, "count", *r->in.count);
6672 ndr->depth--;
6673 ndr->depth--;
6675 if (flags & NDR_OUT) {
6676 ndr_print_struct(ndr, "out", "lsa_LookupSids");
6677 ndr->depth++;
6678 ndr_print_ptr(ndr, "domains", r->out.domains);
6679 ndr->depth++;
6680 ndr_print_ptr(ndr, "domains", *r->out.domains);
6681 ndr->depth++;
6682 if (*r->out.domains) {
6683 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
6685 ndr->depth--;
6686 ndr->depth--;
6687 ndr_print_ptr(ndr, "names", r->out.names);
6688 ndr->depth++;
6689 ndr_print_lsa_TransNameArray(ndr, "names", r->out.names);
6690 ndr->depth--;
6691 ndr_print_ptr(ndr, "count", r->out.count);
6692 ndr->depth++;
6693 ndr_print_uint32(ndr, "count", *r->out.count);
6694 ndr->depth--;
6695 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6696 ndr->depth--;
6698 ndr->depth--;
6701 _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct lsa_CreateSecret *r)
6703 if (flags & NDR_IN) {
6704 if (r->in.handle == NULL) {
6705 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6707 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6708 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
6709 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
6711 if (flags & NDR_OUT) {
6712 if (r->out.sec_handle == NULL) {
6713 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6715 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
6716 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6718 return NDR_ERR_SUCCESS;
6721 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int flags, struct lsa_CreateSecret *r)
6723 TALLOC_CTX *_mem_save_handle_0;
6724 TALLOC_CTX *_mem_save_sec_handle_0;
6725 if (flags & NDR_IN) {
6726 ZERO_STRUCT(r->out);
6728 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6729 NDR_PULL_ALLOC(ndr, r->in.handle);
6731 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6732 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6733 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6735 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
6736 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
6737 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
6738 ZERO_STRUCTP(r->out.sec_handle);
6740 if (flags & NDR_OUT) {
6741 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6742 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
6744 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6745 NDR_PULL_SET_MEM_CTX(ndr, r->out.sec_handle, LIBNDR_FLAG_REF_ALLOC);
6746 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
6747 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
6748 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6750 return NDR_ERR_SUCCESS;
6753 _PUBLIC_ void ndr_print_lsa_CreateSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateSecret *r)
6755 ndr_print_struct(ndr, name, "lsa_CreateSecret");
6756 ndr->depth++;
6757 if (flags & NDR_SET_VALUES) {
6758 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6760 if (flags & NDR_IN) {
6761 ndr_print_struct(ndr, "in", "lsa_CreateSecret");
6762 ndr->depth++;
6763 ndr_print_ptr(ndr, "handle", r->in.handle);
6764 ndr->depth++;
6765 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6766 ndr->depth--;
6767 ndr_print_lsa_String(ndr, "name", &r->in.name);
6768 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
6769 ndr->depth--;
6771 if (flags & NDR_OUT) {
6772 ndr_print_struct(ndr, "out", "lsa_CreateSecret");
6773 ndr->depth++;
6774 ndr_print_ptr(ndr, "sec_handle", r->out.sec_handle);
6775 ndr->depth++;
6776 ndr_print_policy_handle(ndr, "sec_handle", r->out.sec_handle);
6777 ndr->depth--;
6778 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6779 ndr->depth--;
6781 ndr->depth--;
6784 static enum ndr_err_code ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flags, const struct lsa_OpenAccount *r)
6786 if (flags & NDR_IN) {
6787 if (r->in.handle == NULL) {
6788 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6790 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6791 if (r->in.sid == NULL) {
6792 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6794 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6795 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
6797 if (flags & NDR_OUT) {
6798 if (r->out.acct_handle == NULL) {
6799 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6801 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
6802 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6804 return NDR_ERR_SUCCESS;
6807 static enum ndr_err_code ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flags, struct lsa_OpenAccount *r)
6809 TALLOC_CTX *_mem_save_handle_0;
6810 TALLOC_CTX *_mem_save_sid_0;
6811 TALLOC_CTX *_mem_save_acct_handle_0;
6812 if (flags & NDR_IN) {
6813 ZERO_STRUCT(r->out);
6815 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6816 NDR_PULL_ALLOC(ndr, r->in.handle);
6818 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6819 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6820 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6821 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6822 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6823 NDR_PULL_ALLOC(ndr, r->in.sid);
6825 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
6826 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
6827 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
6828 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
6829 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
6830 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
6831 ZERO_STRUCTP(r->out.acct_handle);
6833 if (flags & NDR_OUT) {
6834 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6835 NDR_PULL_ALLOC(ndr, r->out.acct_handle);
6837 _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6838 NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC);
6839 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle));
6840 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC);
6841 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6843 return NDR_ERR_SUCCESS;
6846 _PUBLIC_ void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenAccount *r)
6848 ndr_print_struct(ndr, name, "lsa_OpenAccount");
6849 ndr->depth++;
6850 if (flags & NDR_SET_VALUES) {
6851 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6853 if (flags & NDR_IN) {
6854 ndr_print_struct(ndr, "in", "lsa_OpenAccount");
6855 ndr->depth++;
6856 ndr_print_ptr(ndr, "handle", r->in.handle);
6857 ndr->depth++;
6858 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6859 ndr->depth--;
6860 ndr_print_ptr(ndr, "sid", r->in.sid);
6861 ndr->depth++;
6862 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
6863 ndr->depth--;
6864 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
6865 ndr->depth--;
6867 if (flags & NDR_OUT) {
6868 ndr_print_struct(ndr, "out", "lsa_OpenAccount");
6869 ndr->depth++;
6870 ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle);
6871 ndr->depth++;
6872 ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle);
6873 ndr->depth--;
6874 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6875 ndr->depth--;
6877 ndr->depth--;
6880 static enum ndr_err_code ndr_push_lsa_EnumPrivsAccount(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivsAccount *r)
6882 if (flags & NDR_IN) {
6883 if (r->in.handle == NULL) {
6884 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6886 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6888 if (flags & NDR_OUT) {
6889 if (r->out.privs == NULL) {
6890 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6892 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.privs));
6893 if (*r->out.privs) {
6894 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs));
6896 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6898 return NDR_ERR_SUCCESS;
6901 static enum ndr_err_code ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivsAccount *r)
6903 uint32_t _ptr_privs;
6904 TALLOC_CTX *_mem_save_handle_0;
6905 TALLOC_CTX *_mem_save_privs_0;
6906 TALLOC_CTX *_mem_save_privs_1;
6907 if (flags & NDR_IN) {
6908 ZERO_STRUCT(r->out);
6910 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6911 NDR_PULL_ALLOC(ndr, r->in.handle);
6913 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6914 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6915 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6916 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6917 NDR_PULL_ALLOC(ndr, r->out.privs);
6918 ZERO_STRUCTP(r->out.privs);
6920 if (flags & NDR_OUT) {
6921 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6922 NDR_PULL_ALLOC(ndr, r->out.privs);
6924 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
6925 NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, LIBNDR_FLAG_REF_ALLOC);
6926 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
6927 if (_ptr_privs) {
6928 NDR_PULL_ALLOC(ndr, *r->out.privs);
6929 } else {
6930 *r->out.privs = NULL;
6932 if (*r->out.privs) {
6933 _mem_save_privs_1 = NDR_PULL_GET_MEM_CTX(ndr);
6934 NDR_PULL_SET_MEM_CTX(ndr, *r->out.privs, 0);
6935 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs));
6936 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_1, 0);
6938 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
6939 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
6941 return NDR_ERR_SUCCESS;
6944 _PUBLIC_ void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivsAccount *r)
6946 ndr_print_struct(ndr, name, "lsa_EnumPrivsAccount");
6947 ndr->depth++;
6948 if (flags & NDR_SET_VALUES) {
6949 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6951 if (flags & NDR_IN) {
6952 ndr_print_struct(ndr, "in", "lsa_EnumPrivsAccount");
6953 ndr->depth++;
6954 ndr_print_ptr(ndr, "handle", r->in.handle);
6955 ndr->depth++;
6956 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6957 ndr->depth--;
6958 ndr->depth--;
6960 if (flags & NDR_OUT) {
6961 ndr_print_struct(ndr, "out", "lsa_EnumPrivsAccount");
6962 ndr->depth++;
6963 ndr_print_ptr(ndr, "privs", r->out.privs);
6964 ndr->depth++;
6965 ndr_print_ptr(ndr, "privs", *r->out.privs);
6966 ndr->depth++;
6967 if (*r->out.privs) {
6968 ndr_print_lsa_PrivilegeSet(ndr, "privs", *r->out.privs);
6970 ndr->depth--;
6971 ndr->depth--;
6972 ndr_print_NTSTATUS(ndr, "result", r->out.result);
6973 ndr->depth--;
6975 ndr->depth--;
6978 static enum ndr_err_code ndr_push_lsa_AddPrivilegesToAccount(struct ndr_push *ndr, int flags, const struct lsa_AddPrivilegesToAccount *r)
6980 if (flags & NDR_IN) {
6981 if (r->in.handle == NULL) {
6982 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6984 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6985 if (r->in.privs == NULL) {
6986 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6988 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
6990 if (flags & NDR_OUT) {
6991 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
6993 return NDR_ERR_SUCCESS;
6996 static enum ndr_err_code ndr_pull_lsa_AddPrivilegesToAccount(struct ndr_pull *ndr, int flags, struct lsa_AddPrivilegesToAccount *r)
6998 TALLOC_CTX *_mem_save_handle_0;
6999 TALLOC_CTX *_mem_save_privs_0;
7000 if (flags & NDR_IN) {
7001 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7002 NDR_PULL_ALLOC(ndr, r->in.handle);
7004 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7005 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7006 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7007 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7008 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7009 NDR_PULL_ALLOC(ndr, r->in.privs);
7011 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
7012 NDR_PULL_SET_MEM_CTX(ndr, r->in.privs, LIBNDR_FLAG_REF_ALLOC);
7013 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7014 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
7016 if (flags & NDR_OUT) {
7017 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7019 return NDR_ERR_SUCCESS;
7022 _PUBLIC_ void ndr_print_lsa_AddPrivilegesToAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddPrivilegesToAccount *r)
7024 ndr_print_struct(ndr, name, "lsa_AddPrivilegesToAccount");
7025 ndr->depth++;
7026 if (flags & NDR_SET_VALUES) {
7027 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7029 if (flags & NDR_IN) {
7030 ndr_print_struct(ndr, "in", "lsa_AddPrivilegesToAccount");
7031 ndr->depth++;
7032 ndr_print_ptr(ndr, "handle", r->in.handle);
7033 ndr->depth++;
7034 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7035 ndr->depth--;
7036 ndr_print_ptr(ndr, "privs", r->in.privs);
7037 ndr->depth++;
7038 ndr_print_lsa_PrivilegeSet(ndr, "privs", r->in.privs);
7039 ndr->depth--;
7040 ndr->depth--;
7042 if (flags & NDR_OUT) {
7043 ndr_print_struct(ndr, "out", "lsa_AddPrivilegesToAccount");
7044 ndr->depth++;
7045 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7046 ndr->depth--;
7048 ndr->depth--;
7051 static enum ndr_err_code ndr_push_lsa_RemovePrivilegesFromAccount(struct ndr_push *ndr, int flags, const struct lsa_RemovePrivilegesFromAccount *r)
7053 if (flags & NDR_IN) {
7054 if (r->in.handle == NULL) {
7055 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7057 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7058 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.remove_all));
7059 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.privs));
7060 if (r->in.privs) {
7061 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7064 if (flags & NDR_OUT) {
7065 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7067 return NDR_ERR_SUCCESS;
7070 static enum ndr_err_code ndr_pull_lsa_RemovePrivilegesFromAccount(struct ndr_pull *ndr, int flags, struct lsa_RemovePrivilegesFromAccount *r)
7072 uint32_t _ptr_privs;
7073 TALLOC_CTX *_mem_save_handle_0;
7074 TALLOC_CTX *_mem_save_privs_0;
7075 if (flags & NDR_IN) {
7076 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7077 NDR_PULL_ALLOC(ndr, r->in.handle);
7079 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7080 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7081 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7082 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7083 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.remove_all));
7084 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
7085 if (_ptr_privs) {
7086 NDR_PULL_ALLOC(ndr, r->in.privs);
7087 } else {
7088 r->in.privs = NULL;
7090 if (r->in.privs) {
7091 _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
7092 NDR_PULL_SET_MEM_CTX(ndr, r->in.privs, 0);
7093 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
7094 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0);
7097 if (flags & NDR_OUT) {
7098 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7100 return NDR_ERR_SUCCESS;
7103 _PUBLIC_ void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemovePrivilegesFromAccount *r)
7105 ndr_print_struct(ndr, name, "lsa_RemovePrivilegesFromAccount");
7106 ndr->depth++;
7107 if (flags & NDR_SET_VALUES) {
7108 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7110 if (flags & NDR_IN) {
7111 ndr_print_struct(ndr, "in", "lsa_RemovePrivilegesFromAccount");
7112 ndr->depth++;
7113 ndr_print_ptr(ndr, "handle", r->in.handle);
7114 ndr->depth++;
7115 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7116 ndr->depth--;
7117 ndr_print_uint8(ndr, "remove_all", r->in.remove_all);
7118 ndr_print_ptr(ndr, "privs", r->in.privs);
7119 ndr->depth++;
7120 if (r->in.privs) {
7121 ndr_print_lsa_PrivilegeSet(ndr, "privs", r->in.privs);
7123 ndr->depth--;
7124 ndr->depth--;
7126 if (flags & NDR_OUT) {
7127 ndr_print_struct(ndr, "out", "lsa_RemovePrivilegesFromAccount");
7128 ndr->depth++;
7129 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7130 ndr->depth--;
7132 ndr->depth--;
7135 static enum ndr_err_code ndr_push_lsa_GetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_GetQuotasForAccount *r)
7137 if (flags & NDR_IN) {
7139 if (flags & NDR_OUT) {
7140 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7142 return NDR_ERR_SUCCESS;
7145 static enum ndr_err_code ndr_pull_lsa_GetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_GetQuotasForAccount *r)
7147 if (flags & NDR_IN) {
7149 if (flags & NDR_OUT) {
7150 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7152 return NDR_ERR_SUCCESS;
7155 _PUBLIC_ void ndr_print_lsa_GetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetQuotasForAccount *r)
7157 ndr_print_struct(ndr, name, "lsa_GetQuotasForAccount");
7158 ndr->depth++;
7159 if (flags & NDR_SET_VALUES) {
7160 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7162 if (flags & NDR_IN) {
7163 ndr_print_struct(ndr, "in", "lsa_GetQuotasForAccount");
7164 ndr->depth++;
7165 ndr->depth--;
7167 if (flags & NDR_OUT) {
7168 ndr_print_struct(ndr, "out", "lsa_GetQuotasForAccount");
7169 ndr->depth++;
7170 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7171 ndr->depth--;
7173 ndr->depth--;
7176 static enum ndr_err_code ndr_push_lsa_SetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_SetQuotasForAccount *r)
7178 if (flags & NDR_IN) {
7180 if (flags & NDR_OUT) {
7181 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7183 return NDR_ERR_SUCCESS;
7186 static enum ndr_err_code ndr_pull_lsa_SetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_SetQuotasForAccount *r)
7188 if (flags & NDR_IN) {
7190 if (flags & NDR_OUT) {
7191 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7193 return NDR_ERR_SUCCESS;
7196 _PUBLIC_ void ndr_print_lsa_SetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetQuotasForAccount *r)
7198 ndr_print_struct(ndr, name, "lsa_SetQuotasForAccount");
7199 ndr->depth++;
7200 if (flags & NDR_SET_VALUES) {
7201 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7203 if (flags & NDR_IN) {
7204 ndr_print_struct(ndr, "in", "lsa_SetQuotasForAccount");
7205 ndr->depth++;
7206 ndr->depth--;
7208 if (flags & NDR_OUT) {
7209 ndr_print_struct(ndr, "out", "lsa_SetQuotasForAccount");
7210 ndr->depth++;
7211 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7212 ndr->depth--;
7214 ndr->depth--;
7217 static enum ndr_err_code ndr_push_lsa_GetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_GetSystemAccessAccount *r)
7219 if (flags & NDR_IN) {
7220 if (r->in.handle == NULL) {
7221 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7223 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7225 if (flags & NDR_OUT) {
7226 if (r->out.access_mask == NULL) {
7227 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7229 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.access_mask));
7230 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7232 return NDR_ERR_SUCCESS;
7235 static enum ndr_err_code ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_GetSystemAccessAccount *r)
7237 TALLOC_CTX *_mem_save_handle_0;
7238 TALLOC_CTX *_mem_save_access_mask_0;
7239 if (flags & NDR_IN) {
7240 ZERO_STRUCT(r->out);
7242 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7243 NDR_PULL_ALLOC(ndr, r->in.handle);
7245 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7246 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7247 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7248 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7249 NDR_PULL_ALLOC(ndr, r->out.access_mask);
7250 ZERO_STRUCTP(r->out.access_mask);
7252 if (flags & NDR_OUT) {
7253 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7254 NDR_PULL_ALLOC(ndr, r->out.access_mask);
7256 _mem_save_access_mask_0 = NDR_PULL_GET_MEM_CTX(ndr);
7257 NDR_PULL_SET_MEM_CTX(ndr, r->out.access_mask, LIBNDR_FLAG_REF_ALLOC);
7258 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.access_mask));
7259 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_access_mask_0, LIBNDR_FLAG_REF_ALLOC);
7260 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7262 return NDR_ERR_SUCCESS;
7265 _PUBLIC_ void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetSystemAccessAccount *r)
7267 ndr_print_struct(ndr, name, "lsa_GetSystemAccessAccount");
7268 ndr->depth++;
7269 if (flags & NDR_SET_VALUES) {
7270 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7272 if (flags & NDR_IN) {
7273 ndr_print_struct(ndr, "in", "lsa_GetSystemAccessAccount");
7274 ndr->depth++;
7275 ndr_print_ptr(ndr, "handle", r->in.handle);
7276 ndr->depth++;
7277 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7278 ndr->depth--;
7279 ndr->depth--;
7281 if (flags & NDR_OUT) {
7282 ndr_print_struct(ndr, "out", "lsa_GetSystemAccessAccount");
7283 ndr->depth++;
7284 ndr_print_ptr(ndr, "access_mask", r->out.access_mask);
7285 ndr->depth++;
7286 ndr_print_uint32(ndr, "access_mask", *r->out.access_mask);
7287 ndr->depth--;
7288 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7289 ndr->depth--;
7291 ndr->depth--;
7294 static enum ndr_err_code ndr_push_lsa_SetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_SetSystemAccessAccount *r)
7296 if (flags & NDR_IN) {
7297 if (r->in.handle == NULL) {
7298 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7300 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7301 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
7303 if (flags & NDR_OUT) {
7304 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7306 return NDR_ERR_SUCCESS;
7309 static enum ndr_err_code ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_SetSystemAccessAccount *r)
7311 TALLOC_CTX *_mem_save_handle_0;
7312 if (flags & NDR_IN) {
7313 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7314 NDR_PULL_ALLOC(ndr, r->in.handle);
7316 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7317 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7318 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7319 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7320 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
7322 if (flags & NDR_OUT) {
7323 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7325 return NDR_ERR_SUCCESS;
7328 _PUBLIC_ void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSystemAccessAccount *r)
7330 ndr_print_struct(ndr, name, "lsa_SetSystemAccessAccount");
7331 ndr->depth++;
7332 if (flags & NDR_SET_VALUES) {
7333 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7335 if (flags & NDR_IN) {
7336 ndr_print_struct(ndr, "in", "lsa_SetSystemAccessAccount");
7337 ndr->depth++;
7338 ndr_print_ptr(ndr, "handle", r->in.handle);
7339 ndr->depth++;
7340 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7341 ndr->depth--;
7342 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
7343 ndr->depth--;
7345 if (flags & NDR_OUT) {
7346 ndr_print_struct(ndr, "out", "lsa_SetSystemAccessAccount");
7347 ndr->depth++;
7348 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7349 ndr->depth--;
7351 ndr->depth--;
7354 static enum ndr_err_code ndr_push_lsa_OpenTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomain *r)
7356 if (flags & NDR_IN) {
7357 if (r->in.handle == NULL) {
7358 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7360 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7361 if (r->in.sid == NULL) {
7362 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7364 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
7365 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
7367 if (flags & NDR_OUT) {
7368 if (r->out.trustdom_handle == NULL) {
7369 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7371 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
7372 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7374 return NDR_ERR_SUCCESS;
7377 static enum ndr_err_code ndr_pull_lsa_OpenTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomain *r)
7379 TALLOC_CTX *_mem_save_handle_0;
7380 TALLOC_CTX *_mem_save_sid_0;
7381 TALLOC_CTX *_mem_save_trustdom_handle_0;
7382 if (flags & NDR_IN) {
7383 ZERO_STRUCT(r->out);
7385 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7386 NDR_PULL_ALLOC(ndr, r->in.handle);
7388 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7389 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7390 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7391 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7392 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7393 NDR_PULL_ALLOC(ndr, r->in.sid);
7395 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
7396 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
7397 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
7398 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
7399 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
7400 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
7401 ZERO_STRUCTP(r->out.trustdom_handle);
7403 if (flags & NDR_OUT) {
7404 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7405 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
7407 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7408 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
7409 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
7410 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
7411 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7413 return NDR_ERR_SUCCESS;
7416 _PUBLIC_ void ndr_print_lsa_OpenTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomain *r)
7418 ndr_print_struct(ndr, name, "lsa_OpenTrustedDomain");
7419 ndr->depth++;
7420 if (flags & NDR_SET_VALUES) {
7421 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7423 if (flags & NDR_IN) {
7424 ndr_print_struct(ndr, "in", "lsa_OpenTrustedDomain");
7425 ndr->depth++;
7426 ndr_print_ptr(ndr, "handle", r->in.handle);
7427 ndr->depth++;
7428 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7429 ndr->depth--;
7430 ndr_print_ptr(ndr, "sid", r->in.sid);
7431 ndr->depth++;
7432 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
7433 ndr->depth--;
7434 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
7435 ndr->depth--;
7437 if (flags & NDR_OUT) {
7438 ndr_print_struct(ndr, "out", "lsa_OpenTrustedDomain");
7439 ndr->depth++;
7440 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
7441 ndr->depth++;
7442 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
7443 ndr->depth--;
7444 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7445 ndr->depth--;
7447 ndr->depth--;
7450 static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfo *r)
7452 if (flags & NDR_IN) {
7453 if (r->in.trustdom_handle == NULL) {
7454 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7456 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7457 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
7459 if (flags & NDR_OUT) {
7460 if (r->out.info == NULL) {
7461 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7463 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
7464 if (*r->out.info) {
7465 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
7466 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
7468 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7470 return NDR_ERR_SUCCESS;
7473 static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfo *r)
7475 uint32_t _ptr_info;
7476 TALLOC_CTX *_mem_save_trustdom_handle_0;
7477 TALLOC_CTX *_mem_save_info_0;
7478 TALLOC_CTX *_mem_save_info_1;
7479 if (flags & NDR_IN) {
7480 ZERO_STRUCT(r->out);
7482 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7483 NDR_PULL_ALLOC(ndr, r->in.trustdom_handle);
7485 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7486 NDR_PULL_SET_MEM_CTX(ndr, r->in.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
7487 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7488 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
7489 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
7490 NDR_PULL_ALLOC(ndr, r->out.info);
7491 ZERO_STRUCTP(r->out.info);
7493 if (flags & NDR_OUT) {
7494 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7495 NDR_PULL_ALLOC(ndr, r->out.info);
7497 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7498 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
7499 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
7500 if (_ptr_info) {
7501 NDR_PULL_ALLOC(ndr, *r->out.info);
7502 } else {
7503 *r->out.info = NULL;
7505 if (*r->out.info) {
7506 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
7507 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
7508 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
7509 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
7510 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
7512 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7513 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7515 return NDR_ERR_SUCCESS;
7518 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfo *r)
7520 ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfo");
7521 ndr->depth++;
7522 if (flags & NDR_SET_VALUES) {
7523 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7525 if (flags & NDR_IN) {
7526 ndr_print_struct(ndr, "in", "lsa_QueryTrustedDomainInfo");
7527 ndr->depth++;
7528 ndr_print_ptr(ndr, "trustdom_handle", r->in.trustdom_handle);
7529 ndr->depth++;
7530 ndr_print_policy_handle(ndr, "trustdom_handle", r->in.trustdom_handle);
7531 ndr->depth--;
7532 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
7533 ndr->depth--;
7535 if (flags & NDR_OUT) {
7536 ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfo");
7537 ndr->depth++;
7538 ndr_print_ptr(ndr, "info", r->out.info);
7539 ndr->depth++;
7540 ndr_print_ptr(ndr, "info", *r->out.info);
7541 ndr->depth++;
7542 if (*r->out.info) {
7543 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
7544 ndr_print_lsa_TrustedDomainInfo(ndr, "info", *r->out.info);
7546 ndr->depth--;
7547 ndr->depth--;
7548 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7549 ndr->depth--;
7551 ndr->depth--;
7554 static enum ndr_err_code ndr_push_lsa_SetInformationTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_SetInformationTrustedDomain *r)
7556 if (flags & NDR_IN) {
7557 if (r->in.trustdom_handle == NULL) {
7558 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7560 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7561 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
7562 if (r->in.info == NULL) {
7563 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7565 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
7566 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7568 if (flags & NDR_OUT) {
7569 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7571 return NDR_ERR_SUCCESS;
7574 static enum ndr_err_code ndr_pull_lsa_SetInformationTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_SetInformationTrustedDomain *r)
7576 TALLOC_CTX *_mem_save_trustdom_handle_0;
7577 TALLOC_CTX *_mem_save_info_0;
7578 if (flags & NDR_IN) {
7579 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7580 NDR_PULL_ALLOC(ndr, r->in.trustdom_handle);
7582 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7583 NDR_PULL_SET_MEM_CTX(ndr, r->in.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
7584 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
7585 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
7586 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
7587 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7588 NDR_PULL_ALLOC(ndr, r->in.info);
7590 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
7591 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
7592 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
7593 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
7594 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
7596 if (flags & NDR_OUT) {
7597 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7599 return NDR_ERR_SUCCESS;
7602 _PUBLIC_ void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInformationTrustedDomain *r)
7604 ndr_print_struct(ndr, name, "lsa_SetInformationTrustedDomain");
7605 ndr->depth++;
7606 if (flags & NDR_SET_VALUES) {
7607 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7609 if (flags & NDR_IN) {
7610 ndr_print_struct(ndr, "in", "lsa_SetInformationTrustedDomain");
7611 ndr->depth++;
7612 ndr_print_ptr(ndr, "trustdom_handle", r->in.trustdom_handle);
7613 ndr->depth++;
7614 ndr_print_policy_handle(ndr, "trustdom_handle", r->in.trustdom_handle);
7615 ndr->depth--;
7616 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
7617 ndr_print_ptr(ndr, "info", r->in.info);
7618 ndr->depth++;
7619 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
7620 ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
7621 ndr->depth--;
7622 ndr->depth--;
7624 if (flags & NDR_OUT) {
7625 ndr_print_struct(ndr, "out", "lsa_SetInformationTrustedDomain");
7626 ndr->depth++;
7627 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7628 ndr->depth--;
7630 ndr->depth--;
7633 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags, const struct lsa_OpenSecret *r)
7635 if (flags & NDR_IN) {
7636 if (r->in.handle == NULL) {
7637 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7639 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7640 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
7641 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
7643 if (flags & NDR_OUT) {
7644 if (r->out.sec_handle == NULL) {
7645 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7647 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
7648 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7650 return NDR_ERR_SUCCESS;
7653 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenSecret(struct ndr_pull *ndr, int flags, struct lsa_OpenSecret *r)
7655 TALLOC_CTX *_mem_save_handle_0;
7656 TALLOC_CTX *_mem_save_sec_handle_0;
7657 if (flags & NDR_IN) {
7658 ZERO_STRUCT(r->out);
7660 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7661 NDR_PULL_ALLOC(ndr, r->in.handle);
7663 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7664 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7665 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7666 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7667 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
7668 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
7669 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
7670 ZERO_STRUCTP(r->out.sec_handle);
7672 if (flags & NDR_OUT) {
7673 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7674 NDR_PULL_ALLOC(ndr, r->out.sec_handle);
7676 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7677 NDR_PULL_SET_MEM_CTX(ndr, r->out.sec_handle, LIBNDR_FLAG_REF_ALLOC);
7678 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle));
7679 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
7680 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7682 return NDR_ERR_SUCCESS;
7685 _PUBLIC_ void ndr_print_lsa_OpenSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenSecret *r)
7687 ndr_print_struct(ndr, name, "lsa_OpenSecret");
7688 ndr->depth++;
7689 if (flags & NDR_SET_VALUES) {
7690 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7692 if (flags & NDR_IN) {
7693 ndr_print_struct(ndr, "in", "lsa_OpenSecret");
7694 ndr->depth++;
7695 ndr_print_ptr(ndr, "handle", r->in.handle);
7696 ndr->depth++;
7697 ndr_print_policy_handle(ndr, "handle", r->in.handle);
7698 ndr->depth--;
7699 ndr_print_lsa_String(ndr, "name", &r->in.name);
7700 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
7701 ndr->depth--;
7703 if (flags & NDR_OUT) {
7704 ndr_print_struct(ndr, "out", "lsa_OpenSecret");
7705 ndr->depth++;
7706 ndr_print_ptr(ndr, "sec_handle", r->out.sec_handle);
7707 ndr->depth++;
7708 ndr_print_policy_handle(ndr, "sec_handle", r->out.sec_handle);
7709 ndr->depth--;
7710 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7711 ndr->depth--;
7713 ndr->depth--;
7716 _PUBLIC_ enum ndr_err_code ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, const struct lsa_SetSecret *r)
7718 if (flags & NDR_IN) {
7719 if (r->in.sec_handle == NULL) {
7720 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7722 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
7723 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_val));
7724 if (r->in.new_val) {
7725 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
7727 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_val));
7728 if (r->in.old_val) {
7729 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
7732 if (flags & NDR_OUT) {
7733 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7735 return NDR_ERR_SUCCESS;
7738 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SetSecret(struct ndr_pull *ndr, int flags, struct lsa_SetSecret *r)
7740 uint32_t _ptr_new_val;
7741 uint32_t _ptr_old_val;
7742 TALLOC_CTX *_mem_save_sec_handle_0;
7743 TALLOC_CTX *_mem_save_new_val_0;
7744 TALLOC_CTX *_mem_save_old_val_0;
7745 if (flags & NDR_IN) {
7746 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7747 NDR_PULL_ALLOC(ndr, r->in.sec_handle);
7749 _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7750 NDR_PULL_SET_MEM_CTX(ndr, r->in.sec_handle, LIBNDR_FLAG_REF_ALLOC);
7751 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
7752 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
7753 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val));
7754 if (_ptr_new_val) {
7755 NDR_PULL_ALLOC(ndr, r->in.new_val);
7756 } else {
7757 r->in.new_val = NULL;
7759 if (r->in.new_val) {
7760 _mem_save_new_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
7761 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_val, 0);
7762 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
7763 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_val_0, 0);
7765 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
7766 if (_ptr_old_val) {
7767 NDR_PULL_ALLOC(ndr, r->in.old_val);
7768 } else {
7769 r->in.old_val = NULL;
7771 if (r->in.old_val) {
7772 _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
7773 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_val, 0);
7774 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
7775 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
7778 if (flags & NDR_OUT) {
7779 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7781 return NDR_ERR_SUCCESS;
7784 _PUBLIC_ void ndr_print_lsa_SetSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecret *r)
7786 ndr_print_struct(ndr, name, "lsa_SetSecret");
7787 ndr->depth++;
7788 if (flags & NDR_SET_VALUES) {
7789 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7791 if (flags & NDR_IN) {
7792 ndr_print_struct(ndr, "in", "lsa_SetSecret");
7793 ndr->depth++;
7794 ndr_print_ptr(ndr, "sec_handle", r->in.sec_handle);
7795 ndr->depth++;
7796 ndr_print_policy_handle(ndr, "sec_handle", r->in.sec_handle);
7797 ndr->depth--;
7798 ndr_print_ptr(ndr, "new_val", r->in.new_val);
7799 ndr->depth++;
7800 if (r->in.new_val) {
7801 ndr_print_lsa_DATA_BUF(ndr, "new_val", r->in.new_val);
7803 ndr->depth--;
7804 ndr_print_ptr(ndr, "old_val", r->in.old_val);
7805 ndr->depth++;
7806 if (r->in.old_val) {
7807 ndr_print_lsa_DATA_BUF(ndr, "old_val", r->in.old_val);
7809 ndr->depth--;
7810 ndr->depth--;
7812 if (flags & NDR_OUT) {
7813 ndr_print_struct(ndr, "out", "lsa_SetSecret");
7814 ndr->depth++;
7815 ndr_print_NTSTATUS(ndr, "result", r->out.result);
7816 ndr->depth--;
7818 ndr->depth--;
7821 _PUBLIC_ enum ndr_err_code ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flags, const struct lsa_QuerySecret *r)
7823 if (flags & NDR_IN) {
7824 if (r->in.sec_handle == NULL) {
7825 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7827 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle));
7828 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_val));
7829 if (r->in.new_val) {
7830 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
7832 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_mtime));
7833 if (r->in.new_mtime) {
7834 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->in.new_mtime));
7836 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_val));
7837 if (r->in.old_val) {
7838 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
7840 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_mtime));
7841 if (r->in.old_mtime) {
7842 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->in.old_mtime));
7845 if (flags & NDR_OUT) {
7846 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.new_val));
7847 if (r->out.new_val) {
7848 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_val));
7850 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.new_mtime));
7851 if (r->out.new_mtime) {
7852 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->out.new_mtime));
7854 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.old_val));
7855 if (r->out.old_val) {
7856 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.old_val));
7858 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.old_mtime));
7859 if (r->out.old_mtime) {
7860 NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->out.old_mtime));
7862 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
7864 return NDR_ERR_SUCCESS;
7867 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_QuerySecret(struct ndr_pull *ndr, int flags, struct lsa_QuerySecret *r)
7869 uint32_t _ptr_new_val;
7870 uint32_t _ptr_new_mtime;
7871 uint32_t _ptr_old_val;
7872 uint32_t _ptr_old_mtime;
7873 TALLOC_CTX *_mem_save_sec_handle_0;
7874 TALLOC_CTX *_mem_save_new_val_0;
7875 TALLOC_CTX *_mem_save_new_mtime_0;
7876 TALLOC_CTX *_mem_save_old_val_0;
7877 TALLOC_CTX *_mem_save_old_mtime_0;
7878 if (flags & NDR_IN) {
7879 ZERO_STRUCT(r->out);
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_PTR(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_new_mtime));
7901 if (_ptr_new_mtime) {
7902 NDR_PULL_ALLOC(ndr, r->in.new_mtime);
7903 } else {
7904 r->in.new_mtime = NULL;
7906 if (r->in.new_mtime) {
7907 _mem_save_new_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
7908 NDR_PULL_SET_MEM_CTX(ndr, r->in.new_mtime, 0);
7909 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->in.new_mtime));
7910 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_mtime_0, 0);
7912 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
7913 if (_ptr_old_val) {
7914 NDR_PULL_ALLOC(ndr, r->in.old_val);
7915 } else {
7916 r->in.old_val = NULL;
7918 if (r->in.old_val) {
7919 _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
7920 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_val, 0);
7921 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
7922 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
7924 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_mtime));
7925 if (_ptr_old_mtime) {
7926 NDR_PULL_ALLOC(ndr, r->in.old_mtime);
7927 } else {
7928 r->in.old_mtime = NULL;
7930 if (r->in.old_mtime) {
7931 _mem_save_old_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
7932 NDR_PULL_SET_MEM_CTX(ndr, r->in.old_mtime, 0);
7933 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->in.old_mtime));
7934 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_mtime_0, 0);
7937 if (flags & NDR_OUT) {
7938 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val));
7939 if (_ptr_new_val) {
7940 NDR_PULL_ALLOC(ndr, r->out.new_val);
7941 } else {
7942 r->out.new_val = NULL;
7944 if (r->out.new_val) {
7945 _mem_save_new_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
7946 NDR_PULL_SET_MEM_CTX(ndr, r->out.new_val, 0);
7947 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_val));
7948 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_val_0, 0);
7950 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_mtime));
7951 if (_ptr_new_mtime) {
7952 NDR_PULL_ALLOC(ndr, r->out.new_mtime);
7953 } else {
7954 r->out.new_mtime = NULL;
7956 if (r->out.new_mtime) {
7957 _mem_save_new_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
7958 NDR_PULL_SET_MEM_CTX(ndr, r->out.new_mtime, 0);
7959 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->out.new_mtime));
7960 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_mtime_0, 0);
7962 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
7963 if (_ptr_old_val) {
7964 NDR_PULL_ALLOC(ndr, r->out.old_val);
7965 } else {
7966 r->out.old_val = NULL;
7968 if (r->out.old_val) {
7969 _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
7970 NDR_PULL_SET_MEM_CTX(ndr, r->out.old_val, 0);
7971 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.old_val));
7972 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
7974 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_mtime));
7975 if (_ptr_old_mtime) {
7976 NDR_PULL_ALLOC(ndr, r->out.old_mtime);
7977 } else {
7978 r->out.old_mtime = NULL;
7980 if (r->out.old_mtime) {
7981 _mem_save_old_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
7982 NDR_PULL_SET_MEM_CTX(ndr, r->out.old_mtime, 0);
7983 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->out.old_mtime));
7984 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_mtime_0, 0);
7986 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
7988 return NDR_ERR_SUCCESS;
7991 _PUBLIC_ void ndr_print_lsa_QuerySecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecret *r)
7993 ndr_print_struct(ndr, name, "lsa_QuerySecret");
7994 ndr->depth++;
7995 if (flags & NDR_SET_VALUES) {
7996 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7998 if (flags & NDR_IN) {
7999 ndr_print_struct(ndr, "in", "lsa_QuerySecret");
8000 ndr->depth++;
8001 ndr_print_ptr(ndr, "sec_handle", r->in.sec_handle);
8002 ndr->depth++;
8003 ndr_print_policy_handle(ndr, "sec_handle", r->in.sec_handle);
8004 ndr->depth--;
8005 ndr_print_ptr(ndr, "new_val", r->in.new_val);
8006 ndr->depth++;
8007 if (r->in.new_val) {
8008 ndr_print_lsa_DATA_BUF_PTR(ndr, "new_val", r->in.new_val);
8010 ndr->depth--;
8011 ndr_print_ptr(ndr, "new_mtime", r->in.new_mtime);
8012 ndr->depth++;
8013 if (r->in.new_mtime) {
8014 ndr_print_NTTIME_hyper(ndr, "new_mtime", *r->in.new_mtime);
8016 ndr->depth--;
8017 ndr_print_ptr(ndr, "old_val", r->in.old_val);
8018 ndr->depth++;
8019 if (r->in.old_val) {
8020 ndr_print_lsa_DATA_BUF_PTR(ndr, "old_val", r->in.old_val);
8022 ndr->depth--;
8023 ndr_print_ptr(ndr, "old_mtime", r->in.old_mtime);
8024 ndr->depth++;
8025 if (r->in.old_mtime) {
8026 ndr_print_NTTIME_hyper(ndr, "old_mtime", *r->in.old_mtime);
8028 ndr->depth--;
8029 ndr->depth--;
8031 if (flags & NDR_OUT) {
8032 ndr_print_struct(ndr, "out", "lsa_QuerySecret");
8033 ndr->depth++;
8034 ndr_print_ptr(ndr, "new_val", r->out.new_val);
8035 ndr->depth++;
8036 if (r->out.new_val) {
8037 ndr_print_lsa_DATA_BUF_PTR(ndr, "new_val", r->out.new_val);
8039 ndr->depth--;
8040 ndr_print_ptr(ndr, "new_mtime", r->out.new_mtime);
8041 ndr->depth++;
8042 if (r->out.new_mtime) {
8043 ndr_print_NTTIME_hyper(ndr, "new_mtime", *r->out.new_mtime);
8045 ndr->depth--;
8046 ndr_print_ptr(ndr, "old_val", r->out.old_val);
8047 ndr->depth++;
8048 if (r->out.old_val) {
8049 ndr_print_lsa_DATA_BUF_PTR(ndr, "old_val", r->out.old_val);
8051 ndr->depth--;
8052 ndr_print_ptr(ndr, "old_mtime", r->out.old_mtime);
8053 ndr->depth++;
8054 if (r->out.old_mtime) {
8055 ndr_print_NTTIME_hyper(ndr, "old_mtime", *r->out.old_mtime);
8057 ndr->depth--;
8058 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8059 ndr->depth--;
8061 ndr->depth--;
8064 static enum ndr_err_code ndr_push_lsa_LookupPrivValue(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivValue *r)
8066 if (flags & NDR_IN) {
8067 if (r->in.handle == NULL) {
8068 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8070 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8071 if (r->in.name == NULL) {
8072 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8074 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8076 if (flags & NDR_OUT) {
8077 if (r->out.luid == NULL) {
8078 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8080 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, r->out.luid));
8081 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8083 return NDR_ERR_SUCCESS;
8086 static enum ndr_err_code ndr_pull_lsa_LookupPrivValue(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivValue *r)
8088 TALLOC_CTX *_mem_save_handle_0;
8089 TALLOC_CTX *_mem_save_name_0;
8090 TALLOC_CTX *_mem_save_luid_0;
8091 if (flags & NDR_IN) {
8092 ZERO_STRUCT(r->out);
8094 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8095 NDR_PULL_ALLOC(ndr, r->in.handle);
8097 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8098 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8099 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8100 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8101 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8102 NDR_PULL_ALLOC(ndr, r->in.name);
8104 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8105 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
8106 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8107 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
8108 NDR_PULL_ALLOC(ndr, r->out.luid);
8109 ZERO_STRUCTP(r->out.luid);
8111 if (flags & NDR_OUT) {
8112 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8113 NDR_PULL_ALLOC(ndr, r->out.luid);
8115 _mem_save_luid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8116 NDR_PULL_SET_MEM_CTX(ndr, r->out.luid, LIBNDR_FLAG_REF_ALLOC);
8117 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, r->out.luid));
8118 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_luid_0, LIBNDR_FLAG_REF_ALLOC);
8119 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8121 return NDR_ERR_SUCCESS;
8124 _PUBLIC_ void ndr_print_lsa_LookupPrivValue(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivValue *r)
8126 ndr_print_struct(ndr, name, "lsa_LookupPrivValue");
8127 ndr->depth++;
8128 if (flags & NDR_SET_VALUES) {
8129 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8131 if (flags & NDR_IN) {
8132 ndr_print_struct(ndr, "in", "lsa_LookupPrivValue");
8133 ndr->depth++;
8134 ndr_print_ptr(ndr, "handle", r->in.handle);
8135 ndr->depth++;
8136 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8137 ndr->depth--;
8138 ndr_print_ptr(ndr, "name", r->in.name);
8139 ndr->depth++;
8140 ndr_print_lsa_String(ndr, "name", r->in.name);
8141 ndr->depth--;
8142 ndr->depth--;
8144 if (flags & NDR_OUT) {
8145 ndr_print_struct(ndr, "out", "lsa_LookupPrivValue");
8146 ndr->depth++;
8147 ndr_print_ptr(ndr, "luid", r->out.luid);
8148 ndr->depth++;
8149 ndr_print_lsa_LUID(ndr, "luid", r->out.luid);
8150 ndr->depth--;
8151 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8152 ndr->depth--;
8154 ndr->depth--;
8157 static enum ndr_err_code ndr_push_lsa_LookupPrivName(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivName *r)
8159 if (flags & NDR_IN) {
8160 if (r->in.handle == NULL) {
8161 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8163 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8164 if (r->in.luid == NULL) {
8165 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8167 NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, r->in.luid));
8169 if (flags & NDR_OUT) {
8170 if (r->out.name == NULL) {
8171 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8173 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.name));
8174 if (*r->out.name) {
8175 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.name));
8177 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8179 return NDR_ERR_SUCCESS;
8182 static enum ndr_err_code ndr_pull_lsa_LookupPrivName(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivName *r)
8184 uint32_t _ptr_name;
8185 TALLOC_CTX *_mem_save_handle_0;
8186 TALLOC_CTX *_mem_save_luid_0;
8187 TALLOC_CTX *_mem_save_name_0;
8188 TALLOC_CTX *_mem_save_name_1;
8189 if (flags & NDR_IN) {
8190 ZERO_STRUCT(r->out);
8192 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8193 NDR_PULL_ALLOC(ndr, r->in.handle);
8195 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8196 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8197 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8198 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8199 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8200 NDR_PULL_ALLOC(ndr, r->in.luid);
8202 _mem_save_luid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8203 NDR_PULL_SET_MEM_CTX(ndr, r->in.luid, LIBNDR_FLAG_REF_ALLOC);
8204 NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, r->in.luid));
8205 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_luid_0, LIBNDR_FLAG_REF_ALLOC);
8206 NDR_PULL_ALLOC(ndr, r->out.name);
8207 ZERO_STRUCTP(r->out.name);
8209 if (flags & NDR_OUT) {
8210 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8211 NDR_PULL_ALLOC(ndr, r->out.name);
8213 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8214 NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC);
8215 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
8216 if (_ptr_name) {
8217 NDR_PULL_ALLOC(ndr, *r->out.name);
8218 } else {
8219 *r->out.name = NULL;
8221 if (*r->out.name) {
8222 _mem_save_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
8223 NDR_PULL_SET_MEM_CTX(ndr, *r->out.name, 0);
8224 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.name));
8225 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_1, 0);
8227 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
8228 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8230 return NDR_ERR_SUCCESS;
8233 _PUBLIC_ void ndr_print_lsa_LookupPrivName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivName *r)
8235 ndr_print_struct(ndr, name, "lsa_LookupPrivName");
8236 ndr->depth++;
8237 if (flags & NDR_SET_VALUES) {
8238 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8240 if (flags & NDR_IN) {
8241 ndr_print_struct(ndr, "in", "lsa_LookupPrivName");
8242 ndr->depth++;
8243 ndr_print_ptr(ndr, "handle", r->in.handle);
8244 ndr->depth++;
8245 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8246 ndr->depth--;
8247 ndr_print_ptr(ndr, "luid", r->in.luid);
8248 ndr->depth++;
8249 ndr_print_lsa_LUID(ndr, "luid", r->in.luid);
8250 ndr->depth--;
8251 ndr->depth--;
8253 if (flags & NDR_OUT) {
8254 ndr_print_struct(ndr, "out", "lsa_LookupPrivName");
8255 ndr->depth++;
8256 ndr_print_ptr(ndr, "name", r->out.name);
8257 ndr->depth++;
8258 ndr_print_ptr(ndr, "name", *r->out.name);
8259 ndr->depth++;
8260 if (*r->out.name) {
8261 ndr_print_lsa_StringLarge(ndr, "name", *r->out.name);
8263 ndr->depth--;
8264 ndr->depth--;
8265 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8266 ndr->depth--;
8268 ndr->depth--;
8271 static enum ndr_err_code ndr_push_lsa_LookupPrivDisplayName(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivDisplayName *r)
8273 if (flags & NDR_IN) {
8274 if (r->in.handle == NULL) {
8275 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8277 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8278 if (r->in.name == NULL) {
8279 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8281 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8282 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.language_id));
8283 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.language_id_sys));
8285 if (flags & NDR_OUT) {
8286 if (r->out.disp_name == NULL) {
8287 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8289 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.disp_name));
8290 if (*r->out.disp_name) {
8291 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.disp_name));
8293 if (r->out.returned_language_id == NULL) {
8294 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8296 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.returned_language_id));
8297 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8299 return NDR_ERR_SUCCESS;
8302 static enum ndr_err_code ndr_pull_lsa_LookupPrivDisplayName(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivDisplayName *r)
8304 uint32_t _ptr_disp_name;
8305 TALLOC_CTX *_mem_save_handle_0;
8306 TALLOC_CTX *_mem_save_name_0;
8307 TALLOC_CTX *_mem_save_disp_name_0;
8308 TALLOC_CTX *_mem_save_disp_name_1;
8309 TALLOC_CTX *_mem_save_returned_language_id_0;
8310 if (flags & NDR_IN) {
8311 ZERO_STRUCT(r->out);
8313 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8314 NDR_PULL_ALLOC(ndr, r->in.handle);
8316 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8317 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8318 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8319 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8320 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8321 NDR_PULL_ALLOC(ndr, r->in.name);
8323 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8324 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
8325 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8326 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
8327 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.language_id));
8328 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.language_id_sys));
8329 NDR_PULL_ALLOC(ndr, r->out.disp_name);
8330 ZERO_STRUCTP(r->out.disp_name);
8331 NDR_PULL_ALLOC(ndr, r->out.returned_language_id);
8332 ZERO_STRUCTP(r->out.returned_language_id);
8334 if (flags & NDR_OUT) {
8335 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8336 NDR_PULL_ALLOC(ndr, r->out.disp_name);
8338 _mem_save_disp_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8339 NDR_PULL_SET_MEM_CTX(ndr, r->out.disp_name, LIBNDR_FLAG_REF_ALLOC);
8340 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_disp_name));
8341 if (_ptr_disp_name) {
8342 NDR_PULL_ALLOC(ndr, *r->out.disp_name);
8343 } else {
8344 *r->out.disp_name = NULL;
8346 if (*r->out.disp_name) {
8347 _mem_save_disp_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
8348 NDR_PULL_SET_MEM_CTX(ndr, *r->out.disp_name, 0);
8349 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.disp_name));
8350 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disp_name_1, 0);
8352 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disp_name_0, LIBNDR_FLAG_REF_ALLOC);
8353 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8354 NDR_PULL_ALLOC(ndr, r->out.returned_language_id);
8356 _mem_save_returned_language_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
8357 NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_language_id, LIBNDR_FLAG_REF_ALLOC);
8358 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.returned_language_id));
8359 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_language_id_0, LIBNDR_FLAG_REF_ALLOC);
8360 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8362 return NDR_ERR_SUCCESS;
8365 _PUBLIC_ void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivDisplayName *r)
8367 ndr_print_struct(ndr, name, "lsa_LookupPrivDisplayName");
8368 ndr->depth++;
8369 if (flags & NDR_SET_VALUES) {
8370 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8372 if (flags & NDR_IN) {
8373 ndr_print_struct(ndr, "in", "lsa_LookupPrivDisplayName");
8374 ndr->depth++;
8375 ndr_print_ptr(ndr, "handle", r->in.handle);
8376 ndr->depth++;
8377 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8378 ndr->depth--;
8379 ndr_print_ptr(ndr, "name", r->in.name);
8380 ndr->depth++;
8381 ndr_print_lsa_String(ndr, "name", r->in.name);
8382 ndr->depth--;
8383 ndr_print_uint16(ndr, "language_id", r->in.language_id);
8384 ndr_print_uint16(ndr, "language_id_sys", r->in.language_id_sys);
8385 ndr->depth--;
8387 if (flags & NDR_OUT) {
8388 ndr_print_struct(ndr, "out", "lsa_LookupPrivDisplayName");
8389 ndr->depth++;
8390 ndr_print_ptr(ndr, "disp_name", r->out.disp_name);
8391 ndr->depth++;
8392 ndr_print_ptr(ndr, "disp_name", *r->out.disp_name);
8393 ndr->depth++;
8394 if (*r->out.disp_name) {
8395 ndr_print_lsa_StringLarge(ndr, "disp_name", *r->out.disp_name);
8397 ndr->depth--;
8398 ndr->depth--;
8399 ndr_print_ptr(ndr, "returned_language_id", r->out.returned_language_id);
8400 ndr->depth++;
8401 ndr_print_uint16(ndr, "returned_language_id", *r->out.returned_language_id);
8402 ndr->depth--;
8403 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8404 ndr->depth--;
8406 ndr->depth--;
8409 static enum ndr_err_code ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int flags, const struct lsa_DeleteObject *r)
8411 if (flags & NDR_IN) {
8412 if (r->in.handle == NULL) {
8413 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8415 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8417 if (flags & NDR_OUT) {
8418 if (r->out.handle == NULL) {
8419 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8421 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
8422 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8424 return NDR_ERR_SUCCESS;
8427 static enum ndr_err_code ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int flags, struct lsa_DeleteObject *r)
8429 TALLOC_CTX *_mem_save_handle_0;
8430 if (flags & NDR_IN) {
8431 ZERO_STRUCT(r->out);
8433 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8434 NDR_PULL_ALLOC(ndr, r->in.handle);
8436 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8437 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8438 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8439 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8440 NDR_PULL_ALLOC(ndr, r->out.handle);
8441 *r->out.handle = *r->in.handle;
8443 if (flags & NDR_OUT) {
8444 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8445 NDR_PULL_ALLOC(ndr, r->out.handle);
8447 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8448 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
8449 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
8450 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8451 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8453 return NDR_ERR_SUCCESS;
8456 _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteObject *r)
8458 ndr_print_struct(ndr, name, "lsa_DeleteObject");
8459 ndr->depth++;
8460 if (flags & NDR_SET_VALUES) {
8461 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8463 if (flags & NDR_IN) {
8464 ndr_print_struct(ndr, "in", "lsa_DeleteObject");
8465 ndr->depth++;
8466 ndr_print_ptr(ndr, "handle", r->in.handle);
8467 ndr->depth++;
8468 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8469 ndr->depth--;
8470 ndr->depth--;
8472 if (flags & NDR_OUT) {
8473 ndr_print_struct(ndr, "out", "lsa_DeleteObject");
8474 ndr->depth++;
8475 ndr_print_ptr(ndr, "handle", r->out.handle);
8476 ndr->depth++;
8477 ndr_print_policy_handle(ndr, "handle", r->out.handle);
8478 ndr->depth--;
8479 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8480 ndr->depth--;
8482 ndr->depth--;
8485 static enum ndr_err_code ndr_push_lsa_EnumAccountsWithUserRight(struct ndr_push *ndr, int flags, const struct lsa_EnumAccountsWithUserRight *r)
8487 if (flags & NDR_IN) {
8488 if (r->in.handle == NULL) {
8489 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8491 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8492 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.name));
8493 if (r->in.name) {
8494 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8497 if (flags & NDR_OUT) {
8498 if (r->out.sids == NULL) {
8499 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8501 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
8502 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8504 return NDR_ERR_SUCCESS;
8507 static enum ndr_err_code ndr_pull_lsa_EnumAccountsWithUserRight(struct ndr_pull *ndr, int flags, struct lsa_EnumAccountsWithUserRight *r)
8509 uint32_t _ptr_name;
8510 TALLOC_CTX *_mem_save_handle_0;
8511 TALLOC_CTX *_mem_save_name_0;
8512 TALLOC_CTX *_mem_save_sids_0;
8513 if (flags & NDR_IN) {
8514 ZERO_STRUCT(r->out);
8516 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8517 NDR_PULL_ALLOC(ndr, r->in.handle);
8519 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8520 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8521 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8522 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8523 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
8524 if (_ptr_name) {
8525 NDR_PULL_ALLOC(ndr, r->in.name);
8526 } else {
8527 r->in.name = NULL;
8529 if (r->in.name) {
8530 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8531 NDR_PULL_SET_MEM_CTX(ndr, r->in.name, 0);
8532 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
8533 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
8535 NDR_PULL_ALLOC(ndr, r->out.sids);
8536 ZERO_STRUCTP(r->out.sids);
8538 if (flags & NDR_OUT) {
8539 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8540 NDR_PULL_ALLOC(ndr, r->out.sids);
8542 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
8543 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
8544 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
8545 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
8546 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8548 return NDR_ERR_SUCCESS;
8551 _PUBLIC_ void ndr_print_lsa_EnumAccountsWithUserRight(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountsWithUserRight *r)
8553 ndr_print_struct(ndr, name, "lsa_EnumAccountsWithUserRight");
8554 ndr->depth++;
8555 if (flags & NDR_SET_VALUES) {
8556 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8558 if (flags & NDR_IN) {
8559 ndr_print_struct(ndr, "in", "lsa_EnumAccountsWithUserRight");
8560 ndr->depth++;
8561 ndr_print_ptr(ndr, "handle", r->in.handle);
8562 ndr->depth++;
8563 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8564 ndr->depth--;
8565 ndr_print_ptr(ndr, "name", r->in.name);
8566 ndr->depth++;
8567 if (r->in.name) {
8568 ndr_print_lsa_String(ndr, "name", r->in.name);
8570 ndr->depth--;
8571 ndr->depth--;
8573 if (flags & NDR_OUT) {
8574 ndr_print_struct(ndr, "out", "lsa_EnumAccountsWithUserRight");
8575 ndr->depth++;
8576 ndr_print_ptr(ndr, "sids", r->out.sids);
8577 ndr->depth++;
8578 ndr_print_lsa_SidArray(ndr, "sids", r->out.sids);
8579 ndr->depth--;
8580 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8581 ndr->depth--;
8583 ndr->depth--;
8586 static enum ndr_err_code ndr_push_lsa_EnumAccountRights(struct ndr_push *ndr, int flags, const struct lsa_EnumAccountRights *r)
8588 if (flags & NDR_IN) {
8589 if (r->in.handle == NULL) {
8590 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8592 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8593 if (r->in.sid == NULL) {
8594 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8596 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8598 if (flags & NDR_OUT) {
8599 if (r->out.rights == NULL) {
8600 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8602 NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rights));
8603 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8605 return NDR_ERR_SUCCESS;
8608 static enum ndr_err_code ndr_pull_lsa_EnumAccountRights(struct ndr_pull *ndr, int flags, struct lsa_EnumAccountRights *r)
8610 TALLOC_CTX *_mem_save_handle_0;
8611 TALLOC_CTX *_mem_save_sid_0;
8612 TALLOC_CTX *_mem_save_rights_0;
8613 if (flags & NDR_IN) {
8614 ZERO_STRUCT(r->out);
8616 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8617 NDR_PULL_ALLOC(ndr, r->in.handle);
8619 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8620 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8621 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8622 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8623 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8624 NDR_PULL_ALLOC(ndr, r->in.sid);
8626 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8627 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8628 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8629 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8630 NDR_PULL_ALLOC(ndr, r->out.rights);
8631 ZERO_STRUCTP(r->out.rights);
8633 if (flags & NDR_OUT) {
8634 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8635 NDR_PULL_ALLOC(ndr, r->out.rights);
8637 _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
8638 NDR_PULL_SET_MEM_CTX(ndr, r->out.rights, LIBNDR_FLAG_REF_ALLOC);
8639 NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rights));
8640 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_0, LIBNDR_FLAG_REF_ALLOC);
8641 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8643 return NDR_ERR_SUCCESS;
8646 _PUBLIC_ void ndr_print_lsa_EnumAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountRights *r)
8648 ndr_print_struct(ndr, name, "lsa_EnumAccountRights");
8649 ndr->depth++;
8650 if (flags & NDR_SET_VALUES) {
8651 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8653 if (flags & NDR_IN) {
8654 ndr_print_struct(ndr, "in", "lsa_EnumAccountRights");
8655 ndr->depth++;
8656 ndr_print_ptr(ndr, "handle", r->in.handle);
8657 ndr->depth++;
8658 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8659 ndr->depth--;
8660 ndr_print_ptr(ndr, "sid", r->in.sid);
8661 ndr->depth++;
8662 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
8663 ndr->depth--;
8664 ndr->depth--;
8666 if (flags & NDR_OUT) {
8667 ndr_print_struct(ndr, "out", "lsa_EnumAccountRights");
8668 ndr->depth++;
8669 ndr_print_ptr(ndr, "rights", r->out.rights);
8670 ndr->depth++;
8671 ndr_print_lsa_RightSet(ndr, "rights", r->out.rights);
8672 ndr->depth--;
8673 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8674 ndr->depth--;
8676 ndr->depth--;
8679 static enum ndr_err_code ndr_push_lsa_AddAccountRights(struct ndr_push *ndr, int flags, const struct lsa_AddAccountRights *r)
8681 if (flags & NDR_IN) {
8682 if (r->in.handle == NULL) {
8683 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8685 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8686 if (r->in.sid == NULL) {
8687 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8689 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8690 if (r->in.rights == NULL) {
8691 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8693 NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
8695 if (flags & NDR_OUT) {
8696 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8698 return NDR_ERR_SUCCESS;
8701 static enum ndr_err_code ndr_pull_lsa_AddAccountRights(struct ndr_pull *ndr, int flags, struct lsa_AddAccountRights *r)
8703 TALLOC_CTX *_mem_save_handle_0;
8704 TALLOC_CTX *_mem_save_sid_0;
8705 TALLOC_CTX *_mem_save_rights_0;
8706 if (flags & NDR_IN) {
8707 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8708 NDR_PULL_ALLOC(ndr, r->in.handle);
8710 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8711 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8712 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8713 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8714 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8715 NDR_PULL_ALLOC(ndr, r->in.sid);
8717 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8718 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8719 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8720 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8721 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8722 NDR_PULL_ALLOC(ndr, r->in.rights);
8724 _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
8725 NDR_PULL_SET_MEM_CTX(ndr, r->in.rights, LIBNDR_FLAG_REF_ALLOC);
8726 NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
8727 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_0, LIBNDR_FLAG_REF_ALLOC);
8729 if (flags & NDR_OUT) {
8730 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8732 return NDR_ERR_SUCCESS;
8735 _PUBLIC_ void ndr_print_lsa_AddAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddAccountRights *r)
8737 ndr_print_struct(ndr, name, "lsa_AddAccountRights");
8738 ndr->depth++;
8739 if (flags & NDR_SET_VALUES) {
8740 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8742 if (flags & NDR_IN) {
8743 ndr_print_struct(ndr, "in", "lsa_AddAccountRights");
8744 ndr->depth++;
8745 ndr_print_ptr(ndr, "handle", r->in.handle);
8746 ndr->depth++;
8747 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8748 ndr->depth--;
8749 ndr_print_ptr(ndr, "sid", r->in.sid);
8750 ndr->depth++;
8751 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
8752 ndr->depth--;
8753 ndr_print_ptr(ndr, "rights", r->in.rights);
8754 ndr->depth++;
8755 ndr_print_lsa_RightSet(ndr, "rights", r->in.rights);
8756 ndr->depth--;
8757 ndr->depth--;
8759 if (flags & NDR_OUT) {
8760 ndr_print_struct(ndr, "out", "lsa_AddAccountRights");
8761 ndr->depth++;
8762 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8763 ndr->depth--;
8765 ndr->depth--;
8768 static enum ndr_err_code ndr_push_lsa_RemoveAccountRights(struct ndr_push *ndr, int flags, const struct lsa_RemoveAccountRights *r)
8770 if (flags & NDR_IN) {
8771 if (r->in.handle == NULL) {
8772 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8774 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8775 if (r->in.sid == NULL) {
8776 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8778 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8779 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.remove_all));
8780 if (r->in.rights == NULL) {
8781 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8783 NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
8785 if (flags & NDR_OUT) {
8786 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8788 return NDR_ERR_SUCCESS;
8791 static enum ndr_err_code ndr_pull_lsa_RemoveAccountRights(struct ndr_pull *ndr, int flags, struct lsa_RemoveAccountRights *r)
8793 TALLOC_CTX *_mem_save_handle_0;
8794 TALLOC_CTX *_mem_save_sid_0;
8795 TALLOC_CTX *_mem_save_rights_0;
8796 if (flags & NDR_IN) {
8797 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8798 NDR_PULL_ALLOC(ndr, r->in.handle);
8800 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8801 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8802 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8803 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8804 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8805 NDR_PULL_ALLOC(ndr, r->in.sid);
8807 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8808 NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
8809 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
8810 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
8811 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.remove_all));
8812 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8813 NDR_PULL_ALLOC(ndr, r->in.rights);
8815 _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
8816 NDR_PULL_SET_MEM_CTX(ndr, r->in.rights, LIBNDR_FLAG_REF_ALLOC);
8817 NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
8818 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_0, LIBNDR_FLAG_REF_ALLOC);
8820 if (flags & NDR_OUT) {
8821 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8823 return NDR_ERR_SUCCESS;
8826 _PUBLIC_ void ndr_print_lsa_RemoveAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemoveAccountRights *r)
8828 ndr_print_struct(ndr, name, "lsa_RemoveAccountRights");
8829 ndr->depth++;
8830 if (flags & NDR_SET_VALUES) {
8831 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8833 if (flags & NDR_IN) {
8834 ndr_print_struct(ndr, "in", "lsa_RemoveAccountRights");
8835 ndr->depth++;
8836 ndr_print_ptr(ndr, "handle", r->in.handle);
8837 ndr->depth++;
8838 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8839 ndr->depth--;
8840 ndr_print_ptr(ndr, "sid", r->in.sid);
8841 ndr->depth++;
8842 ndr_print_dom_sid2(ndr, "sid", r->in.sid);
8843 ndr->depth--;
8844 ndr_print_uint8(ndr, "remove_all", r->in.remove_all);
8845 ndr_print_ptr(ndr, "rights", r->in.rights);
8846 ndr->depth++;
8847 ndr_print_lsa_RightSet(ndr, "rights", r->in.rights);
8848 ndr->depth--;
8849 ndr->depth--;
8851 if (flags & NDR_OUT) {
8852 ndr_print_struct(ndr, "out", "lsa_RemoveAccountRights");
8853 ndr->depth++;
8854 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8855 ndr->depth--;
8857 ndr->depth--;
8860 static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfoBySid(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r)
8862 if (flags & NDR_IN) {
8863 if (r->in.handle == NULL) {
8864 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8866 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8867 if (r->in.dom_sid == NULL) {
8868 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8870 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
8871 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
8873 if (flags & NDR_OUT) {
8874 if (r->out.info == NULL) {
8875 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8877 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
8878 if (*r->out.info) {
8879 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
8880 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
8882 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
8884 return NDR_ERR_SUCCESS;
8887 static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfoBySid(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoBySid *r)
8889 uint32_t _ptr_info;
8890 TALLOC_CTX *_mem_save_handle_0;
8891 TALLOC_CTX *_mem_save_dom_sid_0;
8892 TALLOC_CTX *_mem_save_info_0;
8893 TALLOC_CTX *_mem_save_info_1;
8894 if (flags & NDR_IN) {
8895 ZERO_STRUCT(r->out);
8897 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8898 NDR_PULL_ALLOC(ndr, r->in.handle);
8900 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8901 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8902 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8903 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8904 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8905 NDR_PULL_ALLOC(ndr, r->in.dom_sid);
8907 _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
8908 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
8909 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
8910 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC);
8911 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
8912 NDR_PULL_ALLOC(ndr, r->out.info);
8913 ZERO_STRUCTP(r->out.info);
8915 if (flags & NDR_OUT) {
8916 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8917 NDR_PULL_ALLOC(ndr, r->out.info);
8919 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8920 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
8921 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
8922 if (_ptr_info) {
8923 NDR_PULL_ALLOC(ndr, *r->out.info);
8924 } else {
8925 *r->out.info = NULL;
8927 if (*r->out.info) {
8928 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
8929 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
8930 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
8931 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
8932 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
8934 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
8935 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
8937 return NDR_ERR_SUCCESS;
8940 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r)
8942 ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfoBySid");
8943 ndr->depth++;
8944 if (flags & NDR_SET_VALUES) {
8945 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8947 if (flags & NDR_IN) {
8948 ndr_print_struct(ndr, "in", "lsa_QueryTrustedDomainInfoBySid");
8949 ndr->depth++;
8950 ndr_print_ptr(ndr, "handle", r->in.handle);
8951 ndr->depth++;
8952 ndr_print_policy_handle(ndr, "handle", r->in.handle);
8953 ndr->depth--;
8954 ndr_print_ptr(ndr, "dom_sid", r->in.dom_sid);
8955 ndr->depth++;
8956 ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
8957 ndr->depth--;
8958 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
8959 ndr->depth--;
8961 if (flags & NDR_OUT) {
8962 ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfoBySid");
8963 ndr->depth++;
8964 ndr_print_ptr(ndr, "info", r->out.info);
8965 ndr->depth++;
8966 ndr_print_ptr(ndr, "info", *r->out.info);
8967 ndr->depth++;
8968 if (*r->out.info) {
8969 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
8970 ndr_print_lsa_TrustedDomainInfo(ndr, "info", *r->out.info);
8972 ndr->depth--;
8973 ndr->depth--;
8974 ndr_print_NTSTATUS(ndr, "result", r->out.result);
8975 ndr->depth--;
8977 ndr->depth--;
8980 static enum ndr_err_code ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfo *r)
8982 if (flags & NDR_IN) {
8983 if (r->in.handle == NULL) {
8984 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8986 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8987 if (r->in.dom_sid == NULL) {
8988 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8990 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
8991 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
8992 if (r->in.info == NULL) {
8993 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8995 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
8996 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
8998 if (flags & NDR_OUT) {
8999 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9001 return NDR_ERR_SUCCESS;
9004 static enum ndr_err_code ndr_pull_lsa_SetTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfo *r)
9006 TALLOC_CTX *_mem_save_handle_0;
9007 TALLOC_CTX *_mem_save_dom_sid_0;
9008 TALLOC_CTX *_mem_save_info_0;
9009 if (flags & NDR_IN) {
9010 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9011 NDR_PULL_ALLOC(ndr, r->in.handle);
9013 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9014 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9015 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9016 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9017 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9018 NDR_PULL_ALLOC(ndr, r->in.dom_sid);
9020 _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9021 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
9022 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9023 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC);
9024 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
9025 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9026 NDR_PULL_ALLOC(ndr, r->in.info);
9028 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9029 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
9030 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
9031 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9032 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9034 if (flags & NDR_OUT) {
9035 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9037 return NDR_ERR_SUCCESS;
9040 _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfo *r)
9042 ndr_print_struct(ndr, name, "lsa_SetTrustedDomainInfo");
9043 ndr->depth++;
9044 if (flags & NDR_SET_VALUES) {
9045 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9047 if (flags & NDR_IN) {
9048 ndr_print_struct(ndr, "in", "lsa_SetTrustedDomainInfo");
9049 ndr->depth++;
9050 ndr_print_ptr(ndr, "handle", r->in.handle);
9051 ndr->depth++;
9052 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9053 ndr->depth--;
9054 ndr_print_ptr(ndr, "dom_sid", r->in.dom_sid);
9055 ndr->depth++;
9056 ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
9057 ndr->depth--;
9058 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
9059 ndr_print_ptr(ndr, "info", r->in.info);
9060 ndr->depth++;
9061 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
9062 ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
9063 ndr->depth--;
9064 ndr->depth--;
9066 if (flags & NDR_OUT) {
9067 ndr_print_struct(ndr, "out", "lsa_SetTrustedDomainInfo");
9068 ndr->depth++;
9069 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9070 ndr->depth--;
9072 ndr->depth--;
9075 static enum ndr_err_code ndr_push_lsa_DeleteTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_DeleteTrustedDomain *r)
9077 if (flags & NDR_IN) {
9078 if (r->in.handle == NULL) {
9079 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9081 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9082 if (r->in.dom_sid == NULL) {
9083 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9085 NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9087 if (flags & NDR_OUT) {
9088 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9090 return NDR_ERR_SUCCESS;
9093 static enum ndr_err_code ndr_pull_lsa_DeleteTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_DeleteTrustedDomain *r)
9095 TALLOC_CTX *_mem_save_handle_0;
9096 TALLOC_CTX *_mem_save_dom_sid_0;
9097 if (flags & NDR_IN) {
9098 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9099 NDR_PULL_ALLOC(ndr, r->in.handle);
9101 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9102 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9103 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9104 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9105 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9106 NDR_PULL_ALLOC(ndr, r->in.dom_sid);
9108 _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
9109 NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
9110 NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
9111 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC);
9113 if (flags & NDR_OUT) {
9114 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9116 return NDR_ERR_SUCCESS;
9119 _PUBLIC_ void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteTrustedDomain *r)
9121 ndr_print_struct(ndr, name, "lsa_DeleteTrustedDomain");
9122 ndr->depth++;
9123 if (flags & NDR_SET_VALUES) {
9124 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9126 if (flags & NDR_IN) {
9127 ndr_print_struct(ndr, "in", "lsa_DeleteTrustedDomain");
9128 ndr->depth++;
9129 ndr_print_ptr(ndr, "handle", r->in.handle);
9130 ndr->depth++;
9131 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9132 ndr->depth--;
9133 ndr_print_ptr(ndr, "dom_sid", r->in.dom_sid);
9134 ndr->depth++;
9135 ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
9136 ndr->depth--;
9137 ndr->depth--;
9139 if (flags & NDR_OUT) {
9140 ndr_print_struct(ndr, "out", "lsa_DeleteTrustedDomain");
9141 ndr->depth++;
9142 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9143 ndr->depth--;
9145 ndr->depth--;
9148 static enum ndr_err_code ndr_push_lsa_StorePrivateData(struct ndr_push *ndr, int flags, const struct lsa_StorePrivateData *r)
9150 if (flags & NDR_IN) {
9152 if (flags & NDR_OUT) {
9153 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9155 return NDR_ERR_SUCCESS;
9158 static enum ndr_err_code ndr_pull_lsa_StorePrivateData(struct ndr_pull *ndr, int flags, struct lsa_StorePrivateData *r)
9160 if (flags & NDR_IN) {
9162 if (flags & NDR_OUT) {
9163 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9165 return NDR_ERR_SUCCESS;
9168 _PUBLIC_ void ndr_print_lsa_StorePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_StorePrivateData *r)
9170 ndr_print_struct(ndr, name, "lsa_StorePrivateData");
9171 ndr->depth++;
9172 if (flags & NDR_SET_VALUES) {
9173 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9175 if (flags & NDR_IN) {
9176 ndr_print_struct(ndr, "in", "lsa_StorePrivateData");
9177 ndr->depth++;
9178 ndr->depth--;
9180 if (flags & NDR_OUT) {
9181 ndr_print_struct(ndr, "out", "lsa_StorePrivateData");
9182 ndr->depth++;
9183 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9184 ndr->depth--;
9186 ndr->depth--;
9189 static enum ndr_err_code ndr_push_lsa_RetrievePrivateData(struct ndr_push *ndr, int flags, const struct lsa_RetrievePrivateData *r)
9191 if (flags & NDR_IN) {
9193 if (flags & NDR_OUT) {
9194 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9196 return NDR_ERR_SUCCESS;
9199 static enum ndr_err_code ndr_pull_lsa_RetrievePrivateData(struct ndr_pull *ndr, int flags, struct lsa_RetrievePrivateData *r)
9201 if (flags & NDR_IN) {
9203 if (flags & NDR_OUT) {
9204 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9206 return NDR_ERR_SUCCESS;
9209 _PUBLIC_ void ndr_print_lsa_RetrievePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RetrievePrivateData *r)
9211 ndr_print_struct(ndr, name, "lsa_RetrievePrivateData");
9212 ndr->depth++;
9213 if (flags & NDR_SET_VALUES) {
9214 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9216 if (flags & NDR_IN) {
9217 ndr_print_struct(ndr, "in", "lsa_RetrievePrivateData");
9218 ndr->depth++;
9219 ndr->depth--;
9221 if (flags & NDR_OUT) {
9222 ndr_print_struct(ndr, "out", "lsa_RetrievePrivateData");
9223 ndr->depth++;
9224 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9225 ndr->depth--;
9227 ndr->depth--;
9230 _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy2 *r)
9232 if (flags & NDR_IN) {
9233 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
9234 if (r->in.system_name) {
9235 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9236 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9238 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));
9240 if (r->in.attr == NULL) {
9241 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9243 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
9244 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
9246 if (flags & NDR_OUT) {
9247 if (r->out.handle == NULL) {
9248 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9250 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
9251 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9253 return NDR_ERR_SUCCESS;
9256 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy2 *r)
9258 uint32_t _ptr_system_name;
9259 TALLOC_CTX *_mem_save_system_name_0;
9260 TALLOC_CTX *_mem_save_attr_0;
9261 TALLOC_CTX *_mem_save_handle_0;
9262 if (flags & NDR_IN) {
9263 ZERO_STRUCT(r->out);
9265 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
9266 if (_ptr_system_name) {
9267 NDR_PULL_ALLOC(ndr, r->in.system_name);
9268 } else {
9269 r->in.system_name = NULL;
9271 if (r->in.system_name) {
9272 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9273 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
9274 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
9275 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
9276 if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
9277 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));
9279 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
9280 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));
9281 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
9283 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9284 NDR_PULL_ALLOC(ndr, r->in.attr);
9286 _mem_save_attr_0 = NDR_PULL_GET_MEM_CTX(ndr);
9287 NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC);
9288 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
9289 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC);
9290 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
9291 NDR_PULL_ALLOC(ndr, r->out.handle);
9292 ZERO_STRUCTP(r->out.handle);
9294 if (flags & NDR_OUT) {
9295 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9296 NDR_PULL_ALLOC(ndr, r->out.handle);
9298 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9299 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
9300 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
9301 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9302 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9304 return NDR_ERR_SUCCESS;
9307 _PUBLIC_ void ndr_print_lsa_OpenPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy2 *r)
9309 ndr_print_struct(ndr, name, "lsa_OpenPolicy2");
9310 ndr->depth++;
9311 if (flags & NDR_SET_VALUES) {
9312 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9314 if (flags & NDR_IN) {
9315 ndr_print_struct(ndr, "in", "lsa_OpenPolicy2");
9316 ndr->depth++;
9317 ndr_print_ptr(ndr, "system_name", r->in.system_name);
9318 ndr->depth++;
9319 if (r->in.system_name) {
9320 ndr_print_string(ndr, "system_name", r->in.system_name);
9322 ndr->depth--;
9323 ndr_print_ptr(ndr, "attr", r->in.attr);
9324 ndr->depth++;
9325 ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr);
9326 ndr->depth--;
9327 ndr_print_lsa_PolicyAccessMask(ndr, "access_mask", r->in.access_mask);
9328 ndr->depth--;
9330 if (flags & NDR_OUT) {
9331 ndr_print_struct(ndr, "out", "lsa_OpenPolicy2");
9332 ndr->depth++;
9333 ndr_print_ptr(ndr, "handle", r->out.handle);
9334 ndr->depth++;
9335 ndr_print_policy_handle(ndr, "handle", r->out.handle);
9336 ndr->depth--;
9337 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9338 ndr->depth--;
9340 ndr->depth--;
9343 static enum ndr_err_code ndr_push_lsa_GetUserName(struct ndr_push *ndr, int flags, const struct lsa_GetUserName *r)
9345 if (flags & NDR_IN) {
9346 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
9347 if (r->in.system_name) {
9348 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9349 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9350 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
9351 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));
9353 if (r->in.account_name == NULL) {
9354 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9356 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.account_name));
9357 if (*r->in.account_name) {
9358 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.account_name));
9360 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.authority_name));
9361 if (r->in.authority_name) {
9362 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.authority_name));
9363 if (*r->in.authority_name) {
9364 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.authority_name));
9368 if (flags & NDR_OUT) {
9369 if (r->out.account_name == NULL) {
9370 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9372 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.account_name));
9373 if (*r->out.account_name) {
9374 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.account_name));
9376 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.authority_name));
9377 if (r->out.authority_name) {
9378 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.authority_name));
9379 if (*r->out.authority_name) {
9380 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.authority_name));
9383 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9385 return NDR_ERR_SUCCESS;
9388 static enum ndr_err_code ndr_pull_lsa_GetUserName(struct ndr_pull *ndr, int flags, struct lsa_GetUserName *r)
9390 uint32_t _ptr_system_name;
9391 uint32_t _ptr_account_name;
9392 uint32_t _ptr_authority_name;
9393 TALLOC_CTX *_mem_save_system_name_0;
9394 TALLOC_CTX *_mem_save_account_name_0;
9395 TALLOC_CTX *_mem_save_account_name_1;
9396 TALLOC_CTX *_mem_save_authority_name_0;
9397 TALLOC_CTX *_mem_save_authority_name_1;
9398 if (flags & NDR_IN) {
9399 ZERO_STRUCT(r->out);
9401 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
9402 if (_ptr_system_name) {
9403 NDR_PULL_ALLOC(ndr, r->in.system_name);
9404 } else {
9405 r->in.system_name = NULL;
9407 if (r->in.system_name) {
9408 _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9409 NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
9410 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
9411 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
9412 if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
9413 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));
9415 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
9416 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));
9417 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
9419 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9420 NDR_PULL_ALLOC(ndr, r->in.account_name);
9422 _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9423 NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, LIBNDR_FLAG_REF_ALLOC);
9424 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
9425 if (_ptr_account_name) {
9426 NDR_PULL_ALLOC(ndr, *r->in.account_name);
9427 } else {
9428 *r->in.account_name = NULL;
9430 if (*r->in.account_name) {
9431 _mem_save_account_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9432 NDR_PULL_SET_MEM_CTX(ndr, *r->in.account_name, 0);
9433 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.account_name));
9434 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_1, 0);
9436 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC);
9437 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9438 if (_ptr_authority_name) {
9439 NDR_PULL_ALLOC(ndr, r->in.authority_name);
9440 } else {
9441 r->in.authority_name = NULL;
9443 if (r->in.authority_name) {
9444 _mem_save_authority_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9445 NDR_PULL_SET_MEM_CTX(ndr, r->in.authority_name, 0);
9446 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9447 if (_ptr_authority_name) {
9448 NDR_PULL_ALLOC(ndr, *r->in.authority_name);
9449 } else {
9450 *r->in.authority_name = NULL;
9452 if (*r->in.authority_name) {
9453 _mem_save_authority_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9454 NDR_PULL_SET_MEM_CTX(ndr, *r->in.authority_name, 0);
9455 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.authority_name));
9456 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_1, 0);
9458 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_0, 0);
9460 NDR_PULL_ALLOC(ndr, r->out.account_name);
9461 *r->out.account_name = *r->in.account_name;
9463 if (flags & NDR_OUT) {
9464 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9465 NDR_PULL_ALLOC(ndr, r->out.account_name);
9467 _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9468 NDR_PULL_SET_MEM_CTX(ndr, r->out.account_name, LIBNDR_FLAG_REF_ALLOC);
9469 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
9470 if (_ptr_account_name) {
9471 NDR_PULL_ALLOC(ndr, *r->out.account_name);
9472 } else {
9473 *r->out.account_name = NULL;
9475 if (*r->out.account_name) {
9476 _mem_save_account_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9477 NDR_PULL_SET_MEM_CTX(ndr, *r->out.account_name, 0);
9478 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.account_name));
9479 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_1, 0);
9481 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC);
9482 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9483 if (_ptr_authority_name) {
9484 NDR_PULL_ALLOC(ndr, r->out.authority_name);
9485 } else {
9486 r->out.authority_name = NULL;
9488 if (r->out.authority_name) {
9489 _mem_save_authority_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9490 NDR_PULL_SET_MEM_CTX(ndr, r->out.authority_name, 0);
9491 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
9492 if (_ptr_authority_name) {
9493 NDR_PULL_ALLOC(ndr, *r->out.authority_name);
9494 } else {
9495 *r->out.authority_name = NULL;
9497 if (*r->out.authority_name) {
9498 _mem_save_authority_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9499 NDR_PULL_SET_MEM_CTX(ndr, *r->out.authority_name, 0);
9500 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.authority_name));
9501 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_1, 0);
9503 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_0, 0);
9505 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9507 return NDR_ERR_SUCCESS;
9510 _PUBLIC_ void ndr_print_lsa_GetUserName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetUserName *r)
9512 ndr_print_struct(ndr, name, "lsa_GetUserName");
9513 ndr->depth++;
9514 if (flags & NDR_SET_VALUES) {
9515 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9517 if (flags & NDR_IN) {
9518 ndr_print_struct(ndr, "in", "lsa_GetUserName");
9519 ndr->depth++;
9520 ndr_print_ptr(ndr, "system_name", r->in.system_name);
9521 ndr->depth++;
9522 if (r->in.system_name) {
9523 ndr_print_string(ndr, "system_name", r->in.system_name);
9525 ndr->depth--;
9526 ndr_print_ptr(ndr, "account_name", r->in.account_name);
9527 ndr->depth++;
9528 ndr_print_ptr(ndr, "account_name", *r->in.account_name);
9529 ndr->depth++;
9530 if (*r->in.account_name) {
9531 ndr_print_lsa_String(ndr, "account_name", *r->in.account_name);
9533 ndr->depth--;
9534 ndr->depth--;
9535 ndr_print_ptr(ndr, "authority_name", r->in.authority_name);
9536 ndr->depth++;
9537 if (r->in.authority_name) {
9538 ndr_print_ptr(ndr, "authority_name", *r->in.authority_name);
9539 ndr->depth++;
9540 if (*r->in.authority_name) {
9541 ndr_print_lsa_String(ndr, "authority_name", *r->in.authority_name);
9543 ndr->depth--;
9545 ndr->depth--;
9546 ndr->depth--;
9548 if (flags & NDR_OUT) {
9549 ndr_print_struct(ndr, "out", "lsa_GetUserName");
9550 ndr->depth++;
9551 ndr_print_ptr(ndr, "account_name", r->out.account_name);
9552 ndr->depth++;
9553 ndr_print_ptr(ndr, "account_name", *r->out.account_name);
9554 ndr->depth++;
9555 if (*r->out.account_name) {
9556 ndr_print_lsa_String(ndr, "account_name", *r->out.account_name);
9558 ndr->depth--;
9559 ndr->depth--;
9560 ndr_print_ptr(ndr, "authority_name", r->out.authority_name);
9561 ndr->depth++;
9562 if (r->out.authority_name) {
9563 ndr_print_ptr(ndr, "authority_name", *r->out.authority_name);
9564 ndr->depth++;
9565 if (*r->out.authority_name) {
9566 ndr_print_lsa_String(ndr, "authority_name", *r->out.authority_name);
9568 ndr->depth--;
9570 ndr->depth--;
9571 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9572 ndr->depth--;
9574 ndr->depth--;
9577 static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy2(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy2 *r)
9579 if (flags & NDR_IN) {
9580 if (r->in.handle == NULL) {
9581 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9583 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9584 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
9586 if (flags & NDR_OUT) {
9587 if (r->out.info == NULL) {
9588 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9590 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
9591 if (*r->out.info) {
9592 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
9593 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9595 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9597 return NDR_ERR_SUCCESS;
9600 static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy2 *r)
9602 uint32_t _ptr_info;
9603 TALLOC_CTX *_mem_save_handle_0;
9604 TALLOC_CTX *_mem_save_info_0;
9605 TALLOC_CTX *_mem_save_info_1;
9606 if (flags & NDR_IN) {
9607 ZERO_STRUCT(r->out);
9609 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9610 NDR_PULL_ALLOC(ndr, r->in.handle);
9612 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9613 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9614 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9615 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9616 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
9617 NDR_PULL_ALLOC(ndr, r->out.info);
9618 ZERO_STRUCTP(r->out.info);
9620 if (flags & NDR_OUT) {
9621 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9622 NDR_PULL_ALLOC(ndr, r->out.info);
9624 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9625 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9626 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
9627 if (_ptr_info) {
9628 NDR_PULL_ALLOC(ndr, *r->out.info);
9629 } else {
9630 *r->out.info = NULL;
9632 if (*r->out.info) {
9633 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
9634 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
9635 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
9636 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9637 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
9639 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9640 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9642 return NDR_ERR_SUCCESS;
9645 _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy2 *r)
9647 ndr_print_struct(ndr, name, "lsa_QueryInfoPolicy2");
9648 ndr->depth++;
9649 if (flags & NDR_SET_VALUES) {
9650 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9652 if (flags & NDR_IN) {
9653 ndr_print_struct(ndr, "in", "lsa_QueryInfoPolicy2");
9654 ndr->depth++;
9655 ndr_print_ptr(ndr, "handle", r->in.handle);
9656 ndr->depth++;
9657 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9658 ndr->depth--;
9659 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
9660 ndr->depth--;
9662 if (flags & NDR_OUT) {
9663 ndr_print_struct(ndr, "out", "lsa_QueryInfoPolicy2");
9664 ndr->depth++;
9665 ndr_print_ptr(ndr, "info", r->out.info);
9666 ndr->depth++;
9667 ndr_print_ptr(ndr, "info", *r->out.info);
9668 ndr->depth++;
9669 if (*r->out.info) {
9670 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
9671 ndr_print_lsa_PolicyInformation(ndr, "info", *r->out.info);
9673 ndr->depth--;
9674 ndr->depth--;
9675 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9676 ndr->depth--;
9678 ndr->depth--;
9681 static enum ndr_err_code ndr_push_lsa_SetInfoPolicy2(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy2 *r)
9683 if (flags & NDR_IN) {
9684 if (r->in.handle == NULL) {
9685 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9687 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9688 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
9689 if (r->in.info == NULL) {
9690 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9692 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
9693 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9695 if (flags & NDR_OUT) {
9696 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9698 return NDR_ERR_SUCCESS;
9701 static enum ndr_err_code ndr_pull_lsa_SetInfoPolicy2(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy2 *r)
9703 TALLOC_CTX *_mem_save_handle_0;
9704 TALLOC_CTX *_mem_save_info_0;
9705 if (flags & NDR_IN) {
9706 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9707 NDR_PULL_ALLOC(ndr, r->in.handle);
9709 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9710 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9711 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9712 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9713 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
9714 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9715 NDR_PULL_ALLOC(ndr, r->in.info);
9717 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9718 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
9719 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
9720 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9721 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9723 if (flags & NDR_OUT) {
9724 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9726 return NDR_ERR_SUCCESS;
9729 _PUBLIC_ void ndr_print_lsa_SetInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy2 *r)
9731 ndr_print_struct(ndr, name, "lsa_SetInfoPolicy2");
9732 ndr->depth++;
9733 if (flags & NDR_SET_VALUES) {
9734 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9736 if (flags & NDR_IN) {
9737 ndr_print_struct(ndr, "in", "lsa_SetInfoPolicy2");
9738 ndr->depth++;
9739 ndr_print_ptr(ndr, "handle", r->in.handle);
9740 ndr->depth++;
9741 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9742 ndr->depth--;
9743 ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
9744 ndr_print_ptr(ndr, "info", r->in.info);
9745 ndr->depth++;
9746 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
9747 ndr_print_lsa_PolicyInformation(ndr, "info", r->in.info);
9748 ndr->depth--;
9749 ndr->depth--;
9751 if (flags & NDR_OUT) {
9752 ndr_print_struct(ndr, "out", "lsa_SetInfoPolicy2");
9753 ndr->depth++;
9754 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9755 ndr->depth--;
9757 ndr->depth--;
9760 static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfoByName *r)
9762 if (flags & NDR_IN) {
9763 if (r->in.handle == NULL) {
9764 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9766 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9767 if (r->in.trusted_domain == NULL) {
9768 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9770 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain));
9771 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
9773 if (flags & NDR_OUT) {
9774 if (r->out.info == NULL) {
9775 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9777 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
9778 if (*r->out.info) {
9779 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
9780 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9782 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9784 return NDR_ERR_SUCCESS;
9787 static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoByName *r)
9789 uint32_t _ptr_info;
9790 TALLOC_CTX *_mem_save_handle_0;
9791 TALLOC_CTX *_mem_save_trusted_domain_0;
9792 TALLOC_CTX *_mem_save_info_0;
9793 TALLOC_CTX *_mem_save_info_1;
9794 if (flags & NDR_IN) {
9795 ZERO_STRUCT(r->out);
9797 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9798 NDR_PULL_ALLOC(ndr, r->in.handle);
9800 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9801 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9802 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9803 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9804 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9805 NDR_PULL_ALLOC(ndr, r->in.trusted_domain);
9807 _mem_save_trusted_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
9808 NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain, LIBNDR_FLAG_REF_ALLOC);
9809 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain));
9810 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_0, LIBNDR_FLAG_REF_ALLOC);
9811 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
9812 NDR_PULL_ALLOC(ndr, r->out.info);
9813 ZERO_STRUCTP(r->out.info);
9815 if (flags & NDR_OUT) {
9816 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9817 NDR_PULL_ALLOC(ndr, r->out.info);
9819 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9820 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
9821 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
9822 if (_ptr_info) {
9823 NDR_PULL_ALLOC(ndr, *r->out.info);
9824 } else {
9825 *r->out.info = NULL;
9827 if (*r->out.info) {
9828 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
9829 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
9830 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
9831 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
9832 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
9834 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
9835 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9837 return NDR_ERR_SUCCESS;
9840 _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoByName *r)
9842 ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfoByName");
9843 ndr->depth++;
9844 if (flags & NDR_SET_VALUES) {
9845 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9847 if (flags & NDR_IN) {
9848 ndr_print_struct(ndr, "in", "lsa_QueryTrustedDomainInfoByName");
9849 ndr->depth++;
9850 ndr_print_ptr(ndr, "handle", r->in.handle);
9851 ndr->depth++;
9852 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9853 ndr->depth--;
9854 ndr_print_ptr(ndr, "trusted_domain", r->in.trusted_domain);
9855 ndr->depth++;
9856 ndr_print_lsa_String(ndr, "trusted_domain", r->in.trusted_domain);
9857 ndr->depth--;
9858 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
9859 ndr->depth--;
9861 if (flags & NDR_OUT) {
9862 ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfoByName");
9863 ndr->depth++;
9864 ndr_print_ptr(ndr, "info", r->out.info);
9865 ndr->depth++;
9866 ndr_print_ptr(ndr, "info", *r->out.info);
9867 ndr->depth++;
9868 if (*r->out.info) {
9869 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
9870 ndr_print_lsa_TrustedDomainInfo(ndr, "info", *r->out.info);
9872 ndr->depth--;
9873 ndr->depth--;
9874 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9875 ndr->depth--;
9877 ndr->depth--;
9880 static enum ndr_err_code ndr_push_lsa_SetTrustedDomainInfoByName(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfoByName *r)
9882 if (flags & NDR_IN) {
9883 if (r->in.handle == NULL) {
9884 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9886 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9887 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain));
9888 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
9889 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
9890 if (r->in.info) {
9891 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
9892 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9895 if (flags & NDR_OUT) {
9896 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9898 return NDR_ERR_SUCCESS;
9901 static enum ndr_err_code ndr_pull_lsa_SetTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfoByName *r)
9903 uint32_t _ptr_info;
9904 TALLOC_CTX *_mem_save_handle_0;
9905 TALLOC_CTX *_mem_save_info_0;
9906 if (flags & NDR_IN) {
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_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain));
9915 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
9916 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
9917 if (_ptr_info) {
9918 NDR_PULL_ALLOC(ndr, r->in.info);
9919 } else {
9920 r->in.info = NULL;
9922 if (r->in.info) {
9923 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
9924 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
9925 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
9926 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
9927 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
9930 if (flags & NDR_OUT) {
9931 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
9933 return NDR_ERR_SUCCESS;
9936 _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfoByName *r)
9938 ndr_print_struct(ndr, name, "lsa_SetTrustedDomainInfoByName");
9939 ndr->depth++;
9940 if (flags & NDR_SET_VALUES) {
9941 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9943 if (flags & NDR_IN) {
9944 ndr_print_struct(ndr, "in", "lsa_SetTrustedDomainInfoByName");
9945 ndr->depth++;
9946 ndr_print_ptr(ndr, "handle", r->in.handle);
9947 ndr->depth++;
9948 ndr_print_policy_handle(ndr, "handle", r->in.handle);
9949 ndr->depth--;
9950 ndr_print_lsa_String(ndr, "trusted_domain", &r->in.trusted_domain);
9951 ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
9952 ndr_print_ptr(ndr, "info", r->in.info);
9953 ndr->depth++;
9954 if (r->in.info) {
9955 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
9956 ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
9958 ndr->depth--;
9959 ndr->depth--;
9961 if (flags & NDR_OUT) {
9962 ndr_print_struct(ndr, "out", "lsa_SetTrustedDomainInfoByName");
9963 ndr->depth++;
9964 ndr_print_NTSTATUS(ndr, "result", r->out.result);
9965 ndr->depth--;
9967 ndr->depth--;
9970 static enum ndr_err_code ndr_push_lsa_EnumTrustedDomainsEx(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustedDomainsEx *r)
9972 if (flags & NDR_IN) {
9973 if (r->in.handle == NULL) {
9974 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9976 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9977 if (r->in.resume_handle == NULL) {
9978 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9980 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
9981 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size));
9983 if (flags & NDR_OUT) {
9984 if (r->out.resume_handle == NULL) {
9985 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9987 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
9988 if (r->out.domains == NULL) {
9989 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9991 NDR_CHECK(ndr_push_lsa_DomainListEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
9992 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
9994 return NDR_ERR_SUCCESS;
9997 static enum ndr_err_code ndr_pull_lsa_EnumTrustedDomainsEx(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustedDomainsEx *r)
9999 TALLOC_CTX *_mem_save_handle_0;
10000 TALLOC_CTX *_mem_save_resume_handle_0;
10001 TALLOC_CTX *_mem_save_domains_0;
10002 if (flags & NDR_IN) {
10003 ZERO_STRUCT(r->out);
10005 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10006 NDR_PULL_ALLOC(ndr, r->in.handle);
10008 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10009 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10010 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10011 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10012 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10013 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
10015 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10016 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
10017 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
10018 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
10019 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size));
10020 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
10021 *r->out.resume_handle = *r->in.resume_handle;
10022 NDR_PULL_ALLOC(ndr, r->out.domains);
10023 ZERO_STRUCTP(r->out.domains);
10025 if (flags & NDR_OUT) {
10026 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10027 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
10029 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10030 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
10031 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
10032 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
10033 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10034 NDR_PULL_ALLOC(ndr, r->out.domains);
10036 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
10037 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
10038 NDR_CHECK(ndr_pull_lsa_DomainListEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
10039 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
10040 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10042 return NDR_ERR_SUCCESS;
10045 _PUBLIC_ void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustedDomainsEx *r)
10047 ndr_print_struct(ndr, name, "lsa_EnumTrustedDomainsEx");
10048 ndr->depth++;
10049 if (flags & NDR_SET_VALUES) {
10050 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10052 if (flags & NDR_IN) {
10053 ndr_print_struct(ndr, "in", "lsa_EnumTrustedDomainsEx");
10054 ndr->depth++;
10055 ndr_print_ptr(ndr, "handle", r->in.handle);
10056 ndr->depth++;
10057 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10058 ndr->depth--;
10059 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
10060 ndr->depth++;
10061 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
10062 ndr->depth--;
10063 ndr_print_uint32(ndr, "max_size", r->in.max_size);
10064 ndr->depth--;
10066 if (flags & NDR_OUT) {
10067 ndr_print_struct(ndr, "out", "lsa_EnumTrustedDomainsEx");
10068 ndr->depth++;
10069 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
10070 ndr->depth++;
10071 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
10072 ndr->depth--;
10073 ndr_print_ptr(ndr, "domains", r->out.domains);
10074 ndr->depth++;
10075 ndr_print_lsa_DomainListEx(ndr, "domains", r->out.domains);
10076 ndr->depth--;
10077 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10078 ndr->depth--;
10080 ndr->depth--;
10083 static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx *r)
10085 if (flags & NDR_IN) {
10086 if (r->in.policy_handle == NULL) {
10087 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10089 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
10090 if (r->in.info == NULL) {
10091 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10093 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10094 if (r->in.auth_info == NULL) {
10095 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10097 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
10098 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
10100 if (flags & NDR_OUT) {
10101 if (r->out.trustdom_handle == NULL) {
10102 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10104 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10105 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10107 return NDR_ERR_SUCCESS;
10110 static enum ndr_err_code ndr_pull_lsa_CreateTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx *r)
10112 TALLOC_CTX *_mem_save_policy_handle_0;
10113 TALLOC_CTX *_mem_save_info_0;
10114 TALLOC_CTX *_mem_save_auth_info_0;
10115 TALLOC_CTX *_mem_save_trustdom_handle_0;
10116 if (flags & NDR_IN) {
10117 ZERO_STRUCT(r->out);
10119 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10120 NDR_PULL_ALLOC(ndr, r->in.policy_handle);
10122 _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10123 NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
10124 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
10125 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
10126 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10127 NDR_PULL_ALLOC(ndr, r->in.info);
10129 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10130 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
10131 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10132 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10133 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10134 NDR_PULL_ALLOC(ndr, r->in.auth_info);
10136 _mem_save_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10137 NDR_PULL_SET_MEM_CTX(ndr, r->in.auth_info, LIBNDR_FLAG_REF_ALLOC);
10138 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
10139 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_info_0, LIBNDR_FLAG_REF_ALLOC);
10140 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
10141 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10142 ZERO_STRUCTP(r->out.trustdom_handle);
10144 if (flags & NDR_OUT) {
10145 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10146 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10148 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10149 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
10150 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10151 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
10152 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10154 return NDR_ERR_SUCCESS;
10157 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx *r)
10159 ndr_print_struct(ndr, name, "lsa_CreateTrustedDomainEx");
10160 ndr->depth++;
10161 if (flags & NDR_SET_VALUES) {
10162 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10164 if (flags & NDR_IN) {
10165 ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomainEx");
10166 ndr->depth++;
10167 ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
10168 ndr->depth++;
10169 ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
10170 ndr->depth--;
10171 ndr_print_ptr(ndr, "info", r->in.info);
10172 ndr->depth++;
10173 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info", r->in.info);
10174 ndr->depth--;
10175 ndr_print_ptr(ndr, "auth_info", r->in.auth_info);
10176 ndr->depth++;
10177 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", r->in.auth_info);
10178 ndr->depth--;
10179 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
10180 ndr->depth--;
10182 if (flags & NDR_OUT) {
10183 ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomainEx");
10184 ndr->depth++;
10185 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
10186 ndr->depth++;
10187 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
10188 ndr->depth--;
10189 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10190 ndr->depth--;
10192 ndr->depth--;
10195 static enum ndr_err_code ndr_push_lsa_CloseTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CloseTrustedDomainEx *r)
10197 if (flags & NDR_IN) {
10198 if (r->in.handle == NULL) {
10199 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10201 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10203 if (flags & NDR_OUT) {
10204 if (r->out.handle == NULL) {
10205 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10207 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
10208 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10210 return NDR_ERR_SUCCESS;
10213 static enum ndr_err_code ndr_pull_lsa_CloseTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CloseTrustedDomainEx *r)
10215 TALLOC_CTX *_mem_save_handle_0;
10216 if (flags & NDR_IN) {
10217 ZERO_STRUCT(r->out);
10219 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10220 NDR_PULL_ALLOC(ndr, r->in.handle);
10222 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10223 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10224 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10225 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10226 NDR_PULL_ALLOC(ndr, r->out.handle);
10227 *r->out.handle = *r->in.handle;
10229 if (flags & NDR_OUT) {
10230 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10231 NDR_PULL_ALLOC(ndr, r->out.handle);
10233 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10234 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
10235 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
10236 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10237 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10239 return NDR_ERR_SUCCESS;
10242 _PUBLIC_ void ndr_print_lsa_CloseTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CloseTrustedDomainEx *r)
10244 ndr_print_struct(ndr, name, "lsa_CloseTrustedDomainEx");
10245 ndr->depth++;
10246 if (flags & NDR_SET_VALUES) {
10247 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10249 if (flags & NDR_IN) {
10250 ndr_print_struct(ndr, "in", "lsa_CloseTrustedDomainEx");
10251 ndr->depth++;
10252 ndr_print_ptr(ndr, "handle", r->in.handle);
10253 ndr->depth++;
10254 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10255 ndr->depth--;
10256 ndr->depth--;
10258 if (flags & NDR_OUT) {
10259 ndr_print_struct(ndr, "out", "lsa_CloseTrustedDomainEx");
10260 ndr->depth++;
10261 ndr_print_ptr(ndr, "handle", r->out.handle);
10262 ndr->depth++;
10263 ndr_print_policy_handle(ndr, "handle", r->out.handle);
10264 ndr->depth--;
10265 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10266 ndr->depth--;
10268 ndr->depth--;
10271 static enum ndr_err_code ndr_push_lsa_QueryDomainInformationPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryDomainInformationPolicy *r)
10273 if (flags & NDR_IN) {
10274 if (r->in.handle == NULL) {
10275 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10277 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10278 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10280 if (flags & NDR_OUT) {
10281 if (r->out.info == NULL) {
10282 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10284 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
10285 if (*r->out.info) {
10286 NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
10287 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10289 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10291 return NDR_ERR_SUCCESS;
10294 static enum ndr_err_code ndr_pull_lsa_QueryDomainInformationPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryDomainInformationPolicy *r)
10296 uint32_t _ptr_info;
10297 TALLOC_CTX *_mem_save_handle_0;
10298 TALLOC_CTX *_mem_save_info_0;
10299 TALLOC_CTX *_mem_save_info_1;
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 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10311 NDR_PULL_ALLOC(ndr, r->out.info);
10312 ZERO_STRUCTP(r->out.info);
10314 if (flags & NDR_OUT) {
10315 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10316 NDR_PULL_ALLOC(ndr, r->out.info);
10318 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10319 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
10320 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10321 if (_ptr_info) {
10322 NDR_PULL_ALLOC(ndr, *r->out.info);
10323 } else {
10324 *r->out.info = NULL;
10326 if (*r->out.info) {
10327 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
10328 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
10329 NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
10330 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
10331 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
10333 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
10334 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10336 return NDR_ERR_SUCCESS;
10339 _PUBLIC_ void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryDomainInformationPolicy *r)
10341 ndr_print_struct(ndr, name, "lsa_QueryDomainInformationPolicy");
10342 ndr->depth++;
10343 if (flags & NDR_SET_VALUES) {
10344 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10346 if (flags & NDR_IN) {
10347 ndr_print_struct(ndr, "in", "lsa_QueryDomainInformationPolicy");
10348 ndr->depth++;
10349 ndr_print_ptr(ndr, "handle", r->in.handle);
10350 ndr->depth++;
10351 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10352 ndr->depth--;
10353 ndr_print_uint16(ndr, "level", r->in.level);
10354 ndr->depth--;
10356 if (flags & NDR_OUT) {
10357 ndr_print_struct(ndr, "out", "lsa_QueryDomainInformationPolicy");
10358 ndr->depth++;
10359 ndr_print_ptr(ndr, "info", r->out.info);
10360 ndr->depth++;
10361 ndr_print_ptr(ndr, "info", *r->out.info);
10362 ndr->depth++;
10363 if (*r->out.info) {
10364 ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
10365 ndr_print_lsa_DomainInformationPolicy(ndr, "info", *r->out.info);
10367 ndr->depth--;
10368 ndr->depth--;
10369 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10370 ndr->depth--;
10372 ndr->depth--;
10375 static enum ndr_err_code ndr_push_lsa_SetDomainInformationPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetDomainInformationPolicy *r)
10377 if (flags & NDR_IN) {
10378 if (r->in.handle == NULL) {
10379 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10381 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10382 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10383 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
10384 if (r->in.info) {
10385 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
10386 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10389 if (flags & NDR_OUT) {
10390 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10392 return NDR_ERR_SUCCESS;
10395 static enum ndr_err_code ndr_pull_lsa_SetDomainInformationPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetDomainInformationPolicy *r)
10397 uint32_t _ptr_info;
10398 TALLOC_CTX *_mem_save_handle_0;
10399 TALLOC_CTX *_mem_save_info_0;
10400 if (flags & NDR_IN) {
10401 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10402 NDR_PULL_ALLOC(ndr, r->in.handle);
10404 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10405 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10406 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10407 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10408 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10409 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
10410 if (_ptr_info) {
10411 NDR_PULL_ALLOC(ndr, r->in.info);
10412 } else {
10413 r->in.info = NULL;
10415 if (r->in.info) {
10416 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
10417 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
10418 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
10419 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
10420 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
10423 if (flags & NDR_OUT) {
10424 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10426 return NDR_ERR_SUCCESS;
10429 _PUBLIC_ void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetDomainInformationPolicy *r)
10431 ndr_print_struct(ndr, name, "lsa_SetDomainInformationPolicy");
10432 ndr->depth++;
10433 if (flags & NDR_SET_VALUES) {
10434 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10436 if (flags & NDR_IN) {
10437 ndr_print_struct(ndr, "in", "lsa_SetDomainInformationPolicy");
10438 ndr->depth++;
10439 ndr_print_ptr(ndr, "handle", r->in.handle);
10440 ndr->depth++;
10441 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10442 ndr->depth--;
10443 ndr_print_uint16(ndr, "level", r->in.level);
10444 ndr_print_ptr(ndr, "info", r->in.info);
10445 ndr->depth++;
10446 if (r->in.info) {
10447 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
10448 ndr_print_lsa_DomainInformationPolicy(ndr, "info", r->in.info);
10450 ndr->depth--;
10451 ndr->depth--;
10453 if (flags & NDR_OUT) {
10454 ndr_print_struct(ndr, "out", "lsa_SetDomainInformationPolicy");
10455 ndr->depth++;
10456 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10457 ndr->depth--;
10459 ndr->depth--;
10462 static enum ndr_err_code ndr_push_lsa_OpenTrustedDomainByName(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomainByName *r)
10464 if (flags & NDR_IN) {
10465 if (r->in.handle == NULL) {
10466 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10468 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10469 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
10470 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
10472 if (flags & NDR_OUT) {
10473 if (r->out.trustdom_handle == NULL) {
10474 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10476 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10477 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10479 return NDR_ERR_SUCCESS;
10482 static enum ndr_err_code ndr_pull_lsa_OpenTrustedDomainByName(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomainByName *r)
10484 TALLOC_CTX *_mem_save_handle_0;
10485 TALLOC_CTX *_mem_save_trustdom_handle_0;
10486 if (flags & NDR_IN) {
10487 ZERO_STRUCT(r->out);
10489 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10490 NDR_PULL_ALLOC(ndr, r->in.handle);
10492 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10493 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10494 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10495 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10496 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
10497 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
10498 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10499 ZERO_STRUCTP(r->out.trustdom_handle);
10501 if (flags & NDR_OUT) {
10502 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10503 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
10505 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10506 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
10507 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
10508 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
10509 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10511 return NDR_ERR_SUCCESS;
10514 _PUBLIC_ void ndr_print_lsa_OpenTrustedDomainByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomainByName *r)
10516 ndr_print_struct(ndr, name, "lsa_OpenTrustedDomainByName");
10517 ndr->depth++;
10518 if (flags & NDR_SET_VALUES) {
10519 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10521 if (flags & NDR_IN) {
10522 ndr_print_struct(ndr, "in", "lsa_OpenTrustedDomainByName");
10523 ndr->depth++;
10524 ndr_print_ptr(ndr, "handle", r->in.handle);
10525 ndr->depth++;
10526 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10527 ndr->depth--;
10528 ndr_print_lsa_String(ndr, "name", &r->in.name);
10529 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
10530 ndr->depth--;
10532 if (flags & NDR_OUT) {
10533 ndr_print_struct(ndr, "out", "lsa_OpenTrustedDomainByName");
10534 ndr->depth++;
10535 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
10536 ndr->depth++;
10537 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
10538 ndr->depth--;
10539 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10540 ndr->depth--;
10542 ndr->depth--;
10545 static enum ndr_err_code ndr_push_lsa_TestCall(struct ndr_push *ndr, int flags, const struct lsa_TestCall *r)
10547 if (flags & NDR_IN) {
10549 if (flags & NDR_OUT) {
10550 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10552 return NDR_ERR_SUCCESS;
10555 static enum ndr_err_code ndr_pull_lsa_TestCall(struct ndr_pull *ndr, int flags, struct lsa_TestCall *r)
10557 if (flags & NDR_IN) {
10559 if (flags & NDR_OUT) {
10560 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10562 return NDR_ERR_SUCCESS;
10565 _PUBLIC_ void ndr_print_lsa_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct lsa_TestCall *r)
10567 ndr_print_struct(ndr, name, "lsa_TestCall");
10568 ndr->depth++;
10569 if (flags & NDR_SET_VALUES) {
10570 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10572 if (flags & NDR_IN) {
10573 ndr_print_struct(ndr, "in", "lsa_TestCall");
10574 ndr->depth++;
10575 ndr->depth--;
10577 if (flags & NDR_OUT) {
10578 ndr_print_struct(ndr, "out", "lsa_TestCall");
10579 ndr->depth++;
10580 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10581 ndr->depth--;
10583 ndr->depth--;
10586 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flags, const struct lsa_LookupSids2 *r)
10588 if (flags & NDR_IN) {
10589 if (r->in.handle == NULL) {
10590 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10592 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10593 if (r->in.sids == NULL) {
10594 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10596 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10597 if (r->in.names == NULL) {
10598 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10600 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
10601 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
10602 if (r->in.count == NULL) {
10603 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10605 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
10606 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
10607 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
10609 if (flags & NDR_OUT) {
10610 if (r->out.domains == NULL) {
10611 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10613 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
10614 if (*r->out.domains) {
10615 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
10617 if (r->out.names == NULL) {
10618 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10620 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
10621 if (r->out.count == NULL) {
10622 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10624 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
10625 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10627 return NDR_ERR_SUCCESS;
10630 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int flags, struct lsa_LookupSids2 *r)
10632 uint32_t _ptr_domains;
10633 TALLOC_CTX *_mem_save_handle_0;
10634 TALLOC_CTX *_mem_save_sids_0;
10635 TALLOC_CTX *_mem_save_domains_0;
10636 TALLOC_CTX *_mem_save_domains_1;
10637 TALLOC_CTX *_mem_save_names_0;
10638 TALLOC_CTX *_mem_save_count_0;
10639 if (flags & NDR_IN) {
10640 ZERO_STRUCT(r->out);
10642 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10643 NDR_PULL_ALLOC(ndr, r->in.handle);
10645 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10646 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10647 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10648 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10649 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10650 NDR_PULL_ALLOC(ndr, r->in.sids);
10652 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
10653 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
10654 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10655 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
10656 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10657 NDR_PULL_ALLOC(ndr, r->in.names);
10659 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
10660 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
10661 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
10662 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
10663 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
10664 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10665 NDR_PULL_ALLOC(ndr, r->in.count);
10667 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
10668 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
10669 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
10670 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
10671 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
10672 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
10673 NDR_PULL_ALLOC(ndr, r->out.domains);
10674 ZERO_STRUCTP(r->out.domains);
10675 NDR_PULL_ALLOC(ndr, r->out.names);
10676 *r->out.names = *r->in.names;
10677 NDR_PULL_ALLOC(ndr, r->out.count);
10678 *r->out.count = *r->in.count;
10680 if (flags & NDR_OUT) {
10681 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10682 NDR_PULL_ALLOC(ndr, r->out.domains);
10684 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
10685 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
10686 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
10687 if (_ptr_domains) {
10688 NDR_PULL_ALLOC(ndr, *r->out.domains);
10689 } else {
10690 *r->out.domains = NULL;
10692 if (*r->out.domains) {
10693 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
10694 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
10695 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
10696 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
10698 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
10699 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10700 NDR_PULL_ALLOC(ndr, r->out.names);
10702 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
10703 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
10704 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
10705 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
10706 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10707 NDR_PULL_ALLOC(ndr, r->out.count);
10709 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
10710 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
10711 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
10712 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
10713 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10715 return NDR_ERR_SUCCESS;
10718 _PUBLIC_ void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids2 *r)
10720 ndr_print_struct(ndr, name, "lsa_LookupSids2");
10721 ndr->depth++;
10722 if (flags & NDR_SET_VALUES) {
10723 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10725 if (flags & NDR_IN) {
10726 ndr_print_struct(ndr, "in", "lsa_LookupSids2");
10727 ndr->depth++;
10728 ndr_print_ptr(ndr, "handle", r->in.handle);
10729 ndr->depth++;
10730 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10731 ndr->depth--;
10732 ndr_print_ptr(ndr, "sids", r->in.sids);
10733 ndr->depth++;
10734 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
10735 ndr->depth--;
10736 ndr_print_ptr(ndr, "names", r->in.names);
10737 ndr->depth++;
10738 ndr_print_lsa_TransNameArray2(ndr, "names", r->in.names);
10739 ndr->depth--;
10740 ndr_print_uint16(ndr, "level", r->in.level);
10741 ndr_print_ptr(ndr, "count", r->in.count);
10742 ndr->depth++;
10743 ndr_print_uint32(ndr, "count", *r->in.count);
10744 ndr->depth--;
10745 ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
10746 ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
10747 ndr->depth--;
10749 if (flags & NDR_OUT) {
10750 ndr_print_struct(ndr, "out", "lsa_LookupSids2");
10751 ndr->depth++;
10752 ndr_print_ptr(ndr, "domains", r->out.domains);
10753 ndr->depth++;
10754 ndr_print_ptr(ndr, "domains", *r->out.domains);
10755 ndr->depth++;
10756 if (*r->out.domains) {
10757 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
10759 ndr->depth--;
10760 ndr->depth--;
10761 ndr_print_ptr(ndr, "names", r->out.names);
10762 ndr->depth++;
10763 ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names);
10764 ndr->depth--;
10765 ndr_print_ptr(ndr, "count", r->out.count);
10766 ndr->depth++;
10767 ndr_print_uint32(ndr, "count", *r->out.count);
10768 ndr->depth--;
10769 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10770 ndr->depth--;
10772 ndr->depth--;
10775 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int flags, const struct lsa_LookupNames2 *r)
10777 uint32_t cntr_names_0;
10778 if (flags & NDR_IN) {
10779 if (r->in.handle == NULL) {
10780 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10782 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10783 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
10784 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
10785 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
10786 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
10788 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
10789 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
10791 if (r->in.sids == NULL) {
10792 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10794 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10795 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
10796 if (r->in.count == NULL) {
10797 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10799 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
10800 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lookup_options));
10801 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision));
10803 if (flags & NDR_OUT) {
10804 if (r->out.domains == NULL) {
10805 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10807 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
10808 if (*r->out.domains) {
10809 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
10811 if (r->out.sids == NULL) {
10812 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10814 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
10815 if (r->out.count == NULL) {
10816 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10818 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
10819 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
10821 return NDR_ERR_SUCCESS;
10824 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int flags, struct lsa_LookupNames2 *r)
10826 uint32_t cntr_names_0;
10827 uint32_t _ptr_domains;
10828 TALLOC_CTX *_mem_save_handle_0;
10829 TALLOC_CTX *_mem_save_names_0;
10830 TALLOC_CTX *_mem_save_domains_0;
10831 TALLOC_CTX *_mem_save_domains_1;
10832 TALLOC_CTX *_mem_save_sids_0;
10833 TALLOC_CTX *_mem_save_count_0;
10834 if (flags & NDR_IN) {
10835 ZERO_STRUCT(r->out);
10837 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10838 NDR_PULL_ALLOC(ndr, r->in.handle);
10840 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10841 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
10842 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
10843 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
10844 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
10845 if (r->in.num_names > 1000) {
10846 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
10848 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
10849 NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
10850 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
10851 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
10852 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
10853 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
10855 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
10856 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
10858 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
10859 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10860 NDR_PULL_ALLOC(ndr, r->in.sids);
10862 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
10863 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
10864 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
10865 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
10866 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
10867 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10868 NDR_PULL_ALLOC(ndr, r->in.count);
10870 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
10871 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
10872 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
10873 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
10874 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lookup_options));
10875 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision));
10876 NDR_PULL_ALLOC(ndr, r->out.domains);
10877 ZERO_STRUCTP(r->out.domains);
10878 NDR_PULL_ALLOC(ndr, r->out.sids);
10879 *r->out.sids = *r->in.sids;
10880 NDR_PULL_ALLOC(ndr, r->out.count);
10881 *r->out.count = *r->in.count;
10882 if (r->in.names) {
10883 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
10886 if (flags & NDR_OUT) {
10887 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10888 NDR_PULL_ALLOC(ndr, r->out.domains);
10890 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
10891 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
10892 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
10893 if (_ptr_domains) {
10894 NDR_PULL_ALLOC(ndr, *r->out.domains);
10895 } else {
10896 *r->out.domains = NULL;
10898 if (*r->out.domains) {
10899 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
10900 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
10901 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
10902 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
10904 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
10905 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10906 NDR_PULL_ALLOC(ndr, r->out.sids);
10908 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
10909 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
10910 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
10911 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
10912 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10913 NDR_PULL_ALLOC(ndr, r->out.count);
10915 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
10916 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
10917 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
10918 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
10919 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
10921 return NDR_ERR_SUCCESS;
10924 _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames2 *r)
10926 uint32_t cntr_names_0;
10927 ndr_print_struct(ndr, name, "lsa_LookupNames2");
10928 ndr->depth++;
10929 if (flags & NDR_SET_VALUES) {
10930 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10932 if (flags & NDR_IN) {
10933 ndr_print_struct(ndr, "in", "lsa_LookupNames2");
10934 ndr->depth++;
10935 ndr_print_ptr(ndr, "handle", r->in.handle);
10936 ndr->depth++;
10937 ndr_print_policy_handle(ndr, "handle", r->in.handle);
10938 ndr->depth--;
10939 ndr_print_uint32(ndr, "num_names", r->in.num_names);
10940 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
10941 ndr->depth++;
10942 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
10943 char *idx_0=NULL;
10944 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
10945 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
10946 free(idx_0);
10949 ndr->depth--;
10950 ndr_print_ptr(ndr, "sids", r->in.sids);
10951 ndr->depth++;
10952 ndr_print_lsa_TransSidArray2(ndr, "sids", r->in.sids);
10953 ndr->depth--;
10954 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
10955 ndr_print_ptr(ndr, "count", r->in.count);
10956 ndr->depth++;
10957 ndr_print_uint32(ndr, "count", *r->in.count);
10958 ndr->depth--;
10959 ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options);
10960 ndr_print_uint32(ndr, "client_revision", r->in.client_revision);
10961 ndr->depth--;
10963 if (flags & NDR_OUT) {
10964 ndr_print_struct(ndr, "out", "lsa_LookupNames2");
10965 ndr->depth++;
10966 ndr_print_ptr(ndr, "domains", r->out.domains);
10967 ndr->depth++;
10968 ndr_print_ptr(ndr, "domains", *r->out.domains);
10969 ndr->depth++;
10970 if (*r->out.domains) {
10971 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
10973 ndr->depth--;
10974 ndr->depth--;
10975 ndr_print_ptr(ndr, "sids", r->out.sids);
10976 ndr->depth++;
10977 ndr_print_lsa_TransSidArray2(ndr, "sids", r->out.sids);
10978 ndr->depth--;
10979 ndr_print_ptr(ndr, "count", r->out.count);
10980 ndr->depth++;
10981 ndr_print_uint32(ndr, "count", *r->out.count);
10982 ndr->depth--;
10983 ndr_print_NTSTATUS(ndr, "result", r->out.result);
10984 ndr->depth--;
10986 ndr->depth--;
10989 static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx2 *r)
10991 if (flags & NDR_IN) {
10992 if (r->in.policy_handle == NULL) {
10993 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10995 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
10996 if (r->in.info == NULL) {
10997 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10999 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
11000 if (r->in.auth_info == NULL) {
11001 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11003 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
11004 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
11006 if (flags & NDR_OUT) {
11007 if (r->out.trustdom_handle == NULL) {
11008 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11010 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
11011 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11013 return NDR_ERR_SUCCESS;
11016 static enum ndr_err_code ndr_pull_lsa_CreateTrustedDomainEx2(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx2 *r)
11018 TALLOC_CTX *_mem_save_policy_handle_0;
11019 TALLOC_CTX *_mem_save_info_0;
11020 TALLOC_CTX *_mem_save_auth_info_0;
11021 TALLOC_CTX *_mem_save_trustdom_handle_0;
11022 if (flags & NDR_IN) {
11023 ZERO_STRUCT(r->out);
11025 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11026 NDR_PULL_ALLOC(ndr, r->in.policy_handle);
11028 _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11029 NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
11030 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
11031 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
11032 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11033 NDR_PULL_ALLOC(ndr, r->in.info);
11035 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11036 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
11037 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
11038 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
11039 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11040 NDR_PULL_ALLOC(ndr, r->in.auth_info);
11042 _mem_save_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11043 NDR_PULL_SET_MEM_CTX(ndr, r->in.auth_info, LIBNDR_FLAG_REF_ALLOC);
11044 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
11045 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_info_0, LIBNDR_FLAG_REF_ALLOC);
11046 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
11047 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
11048 ZERO_STRUCTP(r->out.trustdom_handle);
11050 if (flags & NDR_OUT) {
11051 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11052 NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
11054 _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11055 NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
11056 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
11057 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
11058 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11060 return NDR_ERR_SUCCESS;
11063 _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx2 *r)
11065 ndr_print_struct(ndr, name, "lsa_CreateTrustedDomainEx2");
11066 ndr->depth++;
11067 if (flags & NDR_SET_VALUES) {
11068 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11070 if (flags & NDR_IN) {
11071 ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomainEx2");
11072 ndr->depth++;
11073 ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
11074 ndr->depth++;
11075 ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
11076 ndr->depth--;
11077 ndr_print_ptr(ndr, "info", r->in.info);
11078 ndr->depth++;
11079 ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info", r->in.info);
11080 ndr->depth--;
11081 ndr_print_ptr(ndr, "auth_info", r->in.auth_info);
11082 ndr->depth++;
11083 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", r->in.auth_info);
11084 ndr->depth--;
11085 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
11086 ndr->depth--;
11088 if (flags & NDR_OUT) {
11089 ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomainEx2");
11090 ndr->depth++;
11091 ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
11092 ndr->depth++;
11093 ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
11094 ndr->depth--;
11095 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11096 ndr->depth--;
11098 ndr->depth--;
11101 static enum ndr_err_code ndr_push_lsa_CREDRWRITE(struct ndr_push *ndr, int flags, const struct lsa_CREDRWRITE *r)
11103 if (flags & NDR_IN) {
11105 if (flags & NDR_OUT) {
11106 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11108 return NDR_ERR_SUCCESS;
11111 static enum ndr_err_code ndr_pull_lsa_CREDRWRITE(struct ndr_pull *ndr, int flags, struct lsa_CREDRWRITE *r)
11113 if (flags & NDR_IN) {
11115 if (flags & NDR_OUT) {
11116 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11118 return NDR_ERR_SUCCESS;
11121 _PUBLIC_ void ndr_print_lsa_CREDRWRITE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITE *r)
11123 ndr_print_struct(ndr, name, "lsa_CREDRWRITE");
11124 ndr->depth++;
11125 if (flags & NDR_SET_VALUES) {
11126 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11128 if (flags & NDR_IN) {
11129 ndr_print_struct(ndr, "in", "lsa_CREDRWRITE");
11130 ndr->depth++;
11131 ndr->depth--;
11133 if (flags & NDR_OUT) {
11134 ndr_print_struct(ndr, "out", "lsa_CREDRWRITE");
11135 ndr->depth++;
11136 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11137 ndr->depth--;
11139 ndr->depth--;
11142 static enum ndr_err_code ndr_push_lsa_CREDRREAD(struct ndr_push *ndr, int flags, const struct lsa_CREDRREAD *r)
11144 if (flags & NDR_IN) {
11146 if (flags & NDR_OUT) {
11147 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11149 return NDR_ERR_SUCCESS;
11152 static enum ndr_err_code ndr_pull_lsa_CREDRREAD(struct ndr_pull *ndr, int flags, struct lsa_CREDRREAD *r)
11154 if (flags & NDR_IN) {
11156 if (flags & NDR_OUT) {
11157 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11159 return NDR_ERR_SUCCESS;
11162 _PUBLIC_ void ndr_print_lsa_CREDRREAD(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREAD *r)
11164 ndr_print_struct(ndr, name, "lsa_CREDRREAD");
11165 ndr->depth++;
11166 if (flags & NDR_SET_VALUES) {
11167 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11169 if (flags & NDR_IN) {
11170 ndr_print_struct(ndr, "in", "lsa_CREDRREAD");
11171 ndr->depth++;
11172 ndr->depth--;
11174 if (flags & NDR_OUT) {
11175 ndr_print_struct(ndr, "out", "lsa_CREDRREAD");
11176 ndr->depth++;
11177 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11178 ndr->depth--;
11180 ndr->depth--;
11183 static enum ndr_err_code ndr_push_lsa_CREDRENUMERATE(struct ndr_push *ndr, int flags, const struct lsa_CREDRENUMERATE *r)
11185 if (flags & NDR_IN) {
11187 if (flags & NDR_OUT) {
11188 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11190 return NDR_ERR_SUCCESS;
11193 static enum ndr_err_code ndr_pull_lsa_CREDRENUMERATE(struct ndr_pull *ndr, int flags, struct lsa_CREDRENUMERATE *r)
11195 if (flags & NDR_IN) {
11197 if (flags & NDR_OUT) {
11198 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11200 return NDR_ERR_SUCCESS;
11203 _PUBLIC_ void ndr_print_lsa_CREDRENUMERATE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRENUMERATE *r)
11205 ndr_print_struct(ndr, name, "lsa_CREDRENUMERATE");
11206 ndr->depth++;
11207 if (flags & NDR_SET_VALUES) {
11208 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11210 if (flags & NDR_IN) {
11211 ndr_print_struct(ndr, "in", "lsa_CREDRENUMERATE");
11212 ndr->depth++;
11213 ndr->depth--;
11215 if (flags & NDR_OUT) {
11216 ndr_print_struct(ndr, "out", "lsa_CREDRENUMERATE");
11217 ndr->depth++;
11218 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11219 ndr->depth--;
11221 ndr->depth--;
11224 static enum ndr_err_code ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_push *ndr, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
11226 if (flags & NDR_IN) {
11228 if (flags & NDR_OUT) {
11229 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11231 return NDR_ERR_SUCCESS;
11234 static enum ndr_err_code ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_pull *ndr, int flags, struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
11236 if (flags & NDR_IN) {
11238 if (flags & NDR_OUT) {
11239 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11241 return NDR_ERR_SUCCESS;
11244 _PUBLIC_ void ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
11246 ndr_print_struct(ndr, name, "lsa_CREDRWRITEDOMAINCREDENTIALS");
11247 ndr->depth++;
11248 if (flags & NDR_SET_VALUES) {
11249 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11251 if (flags & NDR_IN) {
11252 ndr_print_struct(ndr, "in", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11253 ndr->depth++;
11254 ndr->depth--;
11256 if (flags & NDR_OUT) {
11257 ndr_print_struct(ndr, "out", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11258 ndr->depth++;
11259 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11260 ndr->depth--;
11262 ndr->depth--;
11265 static enum ndr_err_code ndr_push_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_push *ndr, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r)
11267 if (flags & NDR_IN) {
11269 if (flags & NDR_OUT) {
11270 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11272 return NDR_ERR_SUCCESS;
11275 static enum ndr_err_code ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_pull *ndr, int flags, struct lsa_CREDRREADDOMAINCREDENTIALS *r)
11277 if (flags & NDR_IN) {
11279 if (flags & NDR_OUT) {
11280 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11282 return NDR_ERR_SUCCESS;
11285 _PUBLIC_ void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r)
11287 ndr_print_struct(ndr, name, "lsa_CREDRREADDOMAINCREDENTIALS");
11288 ndr->depth++;
11289 if (flags & NDR_SET_VALUES) {
11290 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11292 if (flags & NDR_IN) {
11293 ndr_print_struct(ndr, "in", "lsa_CREDRREADDOMAINCREDENTIALS");
11294 ndr->depth++;
11295 ndr->depth--;
11297 if (flags & NDR_OUT) {
11298 ndr_print_struct(ndr, "out", "lsa_CREDRREADDOMAINCREDENTIALS");
11299 ndr->depth++;
11300 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11301 ndr->depth--;
11303 ndr->depth--;
11306 static enum ndr_err_code ndr_push_lsa_CREDRDELETE(struct ndr_push *ndr, int flags, const struct lsa_CREDRDELETE *r)
11308 if (flags & NDR_IN) {
11310 if (flags & NDR_OUT) {
11311 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11313 return NDR_ERR_SUCCESS;
11316 static enum ndr_err_code ndr_pull_lsa_CREDRDELETE(struct ndr_pull *ndr, int flags, struct lsa_CREDRDELETE *r)
11318 if (flags & NDR_IN) {
11320 if (flags & NDR_OUT) {
11321 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11323 return NDR_ERR_SUCCESS;
11326 _PUBLIC_ void ndr_print_lsa_CREDRDELETE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRDELETE *r)
11328 ndr_print_struct(ndr, name, "lsa_CREDRDELETE");
11329 ndr->depth++;
11330 if (flags & NDR_SET_VALUES) {
11331 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11333 if (flags & NDR_IN) {
11334 ndr_print_struct(ndr, "in", "lsa_CREDRDELETE");
11335 ndr->depth++;
11336 ndr->depth--;
11338 if (flags & NDR_OUT) {
11339 ndr_print_struct(ndr, "out", "lsa_CREDRDELETE");
11340 ndr->depth++;
11341 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11342 ndr->depth--;
11344 ndr->depth--;
11347 static enum ndr_err_code ndr_push_lsa_CREDRGETTARGETINFO(struct ndr_push *ndr, int flags, const struct lsa_CREDRGETTARGETINFO *r)
11349 if (flags & NDR_IN) {
11351 if (flags & NDR_OUT) {
11352 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11354 return NDR_ERR_SUCCESS;
11357 static enum ndr_err_code ndr_pull_lsa_CREDRGETTARGETINFO(struct ndr_pull *ndr, int flags, struct lsa_CREDRGETTARGETINFO *r)
11359 if (flags & NDR_IN) {
11361 if (flags & NDR_OUT) {
11362 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11364 return NDR_ERR_SUCCESS;
11367 _PUBLIC_ void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETTARGETINFO *r)
11369 ndr_print_struct(ndr, name, "lsa_CREDRGETTARGETINFO");
11370 ndr->depth++;
11371 if (flags & NDR_SET_VALUES) {
11372 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11374 if (flags & NDR_IN) {
11375 ndr_print_struct(ndr, "in", "lsa_CREDRGETTARGETINFO");
11376 ndr->depth++;
11377 ndr->depth--;
11379 if (flags & NDR_OUT) {
11380 ndr_print_struct(ndr, "out", "lsa_CREDRGETTARGETINFO");
11381 ndr->depth++;
11382 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11383 ndr->depth--;
11385 ndr->depth--;
11388 static enum ndr_err_code ndr_push_lsa_CREDRPROFILELOADED(struct ndr_push *ndr, int flags, const struct lsa_CREDRPROFILELOADED *r)
11390 if (flags & NDR_IN) {
11392 if (flags & NDR_OUT) {
11393 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11395 return NDR_ERR_SUCCESS;
11398 static enum ndr_err_code ndr_pull_lsa_CREDRPROFILELOADED(struct ndr_pull *ndr, int flags, struct lsa_CREDRPROFILELOADED *r)
11400 if (flags & NDR_IN) {
11402 if (flags & NDR_OUT) {
11403 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11405 return NDR_ERR_SUCCESS;
11408 _PUBLIC_ void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRPROFILELOADED *r)
11410 ndr_print_struct(ndr, name, "lsa_CREDRPROFILELOADED");
11411 ndr->depth++;
11412 if (flags & NDR_SET_VALUES) {
11413 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11415 if (flags & NDR_IN) {
11416 ndr_print_struct(ndr, "in", "lsa_CREDRPROFILELOADED");
11417 ndr->depth++;
11418 ndr->depth--;
11420 if (flags & NDR_OUT) {
11421 ndr_print_struct(ndr, "out", "lsa_CREDRPROFILELOADED");
11422 ndr->depth++;
11423 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11424 ndr->depth--;
11426 ndr->depth--;
11429 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int flags, const struct lsa_LookupNames3 *r)
11431 uint32_t cntr_names_0;
11432 if (flags & NDR_IN) {
11433 if (r->in.handle == NULL) {
11434 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11436 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11437 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
11438 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
11439 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11440 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
11442 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11443 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
11445 if (r->in.sids == NULL) {
11446 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11448 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11449 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
11450 if (r->in.count == NULL) {
11451 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11453 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
11454 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lookup_options));
11455 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision));
11457 if (flags & NDR_OUT) {
11458 if (r->out.domains == NULL) {
11459 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11461 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
11462 if (*r->out.domains) {
11463 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11465 if (r->out.sids == NULL) {
11466 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11468 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
11469 if (r->out.count == NULL) {
11470 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11472 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
11473 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11475 return NDR_ERR_SUCCESS;
11478 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r)
11480 uint32_t cntr_names_0;
11481 uint32_t _ptr_domains;
11482 TALLOC_CTX *_mem_save_handle_0;
11483 TALLOC_CTX *_mem_save_names_0;
11484 TALLOC_CTX *_mem_save_domains_0;
11485 TALLOC_CTX *_mem_save_domains_1;
11486 TALLOC_CTX *_mem_save_sids_0;
11487 TALLOC_CTX *_mem_save_count_0;
11488 if (flags & NDR_IN) {
11489 ZERO_STRUCT(r->out);
11491 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11492 NDR_PULL_ALLOC(ndr, r->in.handle);
11494 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11495 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
11496 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11497 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
11498 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
11499 if (r->in.num_names > 1000) {
11500 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
11502 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
11503 NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
11504 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
11505 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
11506 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11507 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
11509 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
11510 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
11512 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
11513 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11514 NDR_PULL_ALLOC(ndr, r->in.sids);
11516 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11517 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
11518 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
11519 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11520 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
11521 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11522 NDR_PULL_ALLOC(ndr, r->in.count);
11524 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11525 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
11526 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
11527 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11528 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lookup_options));
11529 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision));
11530 NDR_PULL_ALLOC(ndr, r->out.domains);
11531 ZERO_STRUCTP(r->out.domains);
11532 NDR_PULL_ALLOC(ndr, r->out.sids);
11533 *r->out.sids = *r->in.sids;
11534 NDR_PULL_ALLOC(ndr, r->out.count);
11535 *r->out.count = *r->in.count;
11536 if (r->in.names) {
11537 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
11540 if (flags & NDR_OUT) {
11541 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11542 NDR_PULL_ALLOC(ndr, r->out.domains);
11544 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
11545 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
11546 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
11547 if (_ptr_domains) {
11548 NDR_PULL_ALLOC(ndr, *r->out.domains);
11549 } else {
11550 *r->out.domains = NULL;
11552 if (*r->out.domains) {
11553 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
11554 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
11555 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
11556 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
11558 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
11559 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11560 NDR_PULL_ALLOC(ndr, r->out.sids);
11562 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
11563 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
11564 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
11565 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
11566 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11567 NDR_PULL_ALLOC(ndr, r->out.count);
11569 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
11570 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
11571 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
11572 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
11573 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11575 return NDR_ERR_SUCCESS;
11578 _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames3 *r)
11580 uint32_t cntr_names_0;
11581 ndr_print_struct(ndr, name, "lsa_LookupNames3");
11582 ndr->depth++;
11583 if (flags & NDR_SET_VALUES) {
11584 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11586 if (flags & NDR_IN) {
11587 ndr_print_struct(ndr, "in", "lsa_LookupNames3");
11588 ndr->depth++;
11589 ndr_print_ptr(ndr, "handle", r->in.handle);
11590 ndr->depth++;
11591 ndr_print_policy_handle(ndr, "handle", r->in.handle);
11592 ndr->depth--;
11593 ndr_print_uint32(ndr, "num_names", r->in.num_names);
11594 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
11595 ndr->depth++;
11596 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
11597 char *idx_0=NULL;
11598 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
11599 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
11600 free(idx_0);
11603 ndr->depth--;
11604 ndr_print_ptr(ndr, "sids", r->in.sids);
11605 ndr->depth++;
11606 ndr_print_lsa_TransSidArray3(ndr, "sids", r->in.sids);
11607 ndr->depth--;
11608 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
11609 ndr_print_ptr(ndr, "count", r->in.count);
11610 ndr->depth++;
11611 ndr_print_uint32(ndr, "count", *r->in.count);
11612 ndr->depth--;
11613 ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options);
11614 ndr_print_uint32(ndr, "client_revision", r->in.client_revision);
11615 ndr->depth--;
11617 if (flags & NDR_OUT) {
11618 ndr_print_struct(ndr, "out", "lsa_LookupNames3");
11619 ndr->depth++;
11620 ndr_print_ptr(ndr, "domains", r->out.domains);
11621 ndr->depth++;
11622 ndr_print_ptr(ndr, "domains", *r->out.domains);
11623 ndr->depth++;
11624 if (*r->out.domains) {
11625 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
11627 ndr->depth--;
11628 ndr->depth--;
11629 ndr_print_ptr(ndr, "sids", r->out.sids);
11630 ndr->depth++;
11631 ndr_print_lsa_TransSidArray3(ndr, "sids", r->out.sids);
11632 ndr->depth--;
11633 ndr_print_ptr(ndr, "count", r->out.count);
11634 ndr->depth++;
11635 ndr_print_uint32(ndr, "count", *r->out.count);
11636 ndr->depth--;
11637 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11638 ndr->depth--;
11640 ndr->depth--;
11643 static enum ndr_err_code ndr_push_lsa_CREDRGETSESSIONTYPES(struct ndr_push *ndr, int flags, const struct lsa_CREDRGETSESSIONTYPES *r)
11645 if (flags & NDR_IN) {
11647 if (flags & NDR_OUT) {
11648 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11650 return NDR_ERR_SUCCESS;
11653 static enum ndr_err_code ndr_pull_lsa_CREDRGETSESSIONTYPES(struct ndr_pull *ndr, int flags, struct lsa_CREDRGETSESSIONTYPES *r)
11655 if (flags & NDR_IN) {
11657 if (flags & NDR_OUT) {
11658 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11660 return NDR_ERR_SUCCESS;
11663 _PUBLIC_ void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETSESSIONTYPES *r)
11665 ndr_print_struct(ndr, name, "lsa_CREDRGETSESSIONTYPES");
11666 ndr->depth++;
11667 if (flags & NDR_SET_VALUES) {
11668 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11670 if (flags & NDR_IN) {
11671 ndr_print_struct(ndr, "in", "lsa_CREDRGETSESSIONTYPES");
11672 ndr->depth++;
11673 ndr->depth--;
11675 if (flags & NDR_OUT) {
11676 ndr_print_struct(ndr, "out", "lsa_CREDRGETSESSIONTYPES");
11677 ndr->depth++;
11678 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11679 ndr->depth--;
11681 ndr->depth--;
11684 static enum ndr_err_code ndr_push_lsa_LSARREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r)
11686 if (flags & NDR_IN) {
11688 if (flags & NDR_OUT) {
11689 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11691 return NDR_ERR_SUCCESS;
11694 static enum ndr_err_code ndr_pull_lsa_LSARREGISTERAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARREGISTERAUDITEVENT *r)
11696 if (flags & NDR_IN) {
11698 if (flags & NDR_OUT) {
11699 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11701 return NDR_ERR_SUCCESS;
11704 _PUBLIC_ void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r)
11706 ndr_print_struct(ndr, name, "lsa_LSARREGISTERAUDITEVENT");
11707 ndr->depth++;
11708 if (flags & NDR_SET_VALUES) {
11709 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11711 if (flags & NDR_IN) {
11712 ndr_print_struct(ndr, "in", "lsa_LSARREGISTERAUDITEVENT");
11713 ndr->depth++;
11714 ndr->depth--;
11716 if (flags & NDR_OUT) {
11717 ndr_print_struct(ndr, "out", "lsa_LSARREGISTERAUDITEVENT");
11718 ndr->depth++;
11719 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11720 ndr->depth--;
11722 ndr->depth--;
11725 static enum ndr_err_code ndr_push_lsa_LSARGENAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARGENAUDITEVENT *r)
11727 if (flags & NDR_IN) {
11729 if (flags & NDR_OUT) {
11730 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11732 return NDR_ERR_SUCCESS;
11735 static enum ndr_err_code ndr_pull_lsa_LSARGENAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARGENAUDITEVENT *r)
11737 if (flags & NDR_IN) {
11739 if (flags & NDR_OUT) {
11740 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11742 return NDR_ERR_SUCCESS;
11745 _PUBLIC_ void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARGENAUDITEVENT *r)
11747 ndr_print_struct(ndr, name, "lsa_LSARGENAUDITEVENT");
11748 ndr->depth++;
11749 if (flags & NDR_SET_VALUES) {
11750 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11752 if (flags & NDR_IN) {
11753 ndr_print_struct(ndr, "in", "lsa_LSARGENAUDITEVENT");
11754 ndr->depth++;
11755 ndr->depth--;
11757 if (flags & NDR_OUT) {
11758 ndr_print_struct(ndr, "out", "lsa_LSARGENAUDITEVENT");
11759 ndr->depth++;
11760 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11761 ndr->depth--;
11763 ndr->depth--;
11766 static enum ndr_err_code ndr_push_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r)
11768 if (flags & NDR_IN) {
11770 if (flags & NDR_OUT) {
11771 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11773 return NDR_ERR_SUCCESS;
11776 static enum ndr_err_code ndr_pull_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARUNREGISTERAUDITEVENT *r)
11778 if (flags & NDR_IN) {
11780 if (flags & NDR_OUT) {
11781 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11783 return NDR_ERR_SUCCESS;
11786 _PUBLIC_ void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r)
11788 ndr_print_struct(ndr, name, "lsa_LSARUNREGISTERAUDITEVENT");
11789 ndr->depth++;
11790 if (flags & NDR_SET_VALUES) {
11791 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11793 if (flags & NDR_IN) {
11794 ndr_print_struct(ndr, "in", "lsa_LSARUNREGISTERAUDITEVENT");
11795 ndr->depth++;
11796 ndr->depth--;
11798 if (flags & NDR_OUT) {
11799 ndr_print_struct(ndr, "out", "lsa_LSARUNREGISTERAUDITEVENT");
11800 ndr->depth++;
11801 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11802 ndr->depth--;
11804 ndr->depth--;
11807 static enum ndr_err_code ndr_push_lsa_lsaRQueryForestTrustInformation(struct ndr_push *ndr, int flags, const struct lsa_lsaRQueryForestTrustInformation *r)
11809 if (flags & NDR_IN) {
11810 if (r->in.handle == NULL) {
11811 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11813 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11814 if (r->in.trusted_domain_name == NULL) {
11815 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11817 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain_name));
11818 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.unknown));
11820 if (flags & NDR_OUT) {
11821 if (r->out.forest_trust_info == NULL) {
11822 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11824 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.forest_trust_info));
11825 if (*r->out.forest_trust_info) {
11826 NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
11828 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11830 return NDR_ERR_SUCCESS;
11833 static enum ndr_err_code ndr_pull_lsa_lsaRQueryForestTrustInformation(struct ndr_pull *ndr, int flags, struct lsa_lsaRQueryForestTrustInformation *r)
11835 uint32_t _ptr_forest_trust_info;
11836 TALLOC_CTX *_mem_save_handle_0;
11837 TALLOC_CTX *_mem_save_trusted_domain_name_0;
11838 TALLOC_CTX *_mem_save_forest_trust_info_0;
11839 TALLOC_CTX *_mem_save_forest_trust_info_1;
11840 if (flags & NDR_IN) {
11841 ZERO_STRUCT(r->out);
11843 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11844 NDR_PULL_ALLOC(ndr, r->in.handle);
11846 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11847 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
11848 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
11849 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
11850 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11851 NDR_PULL_ALLOC(ndr, r->in.trusted_domain_name);
11853 _mem_save_trusted_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11854 NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain_name, LIBNDR_FLAG_REF_ALLOC);
11855 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain_name));
11856 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_name_0, LIBNDR_FLAG_REF_ALLOC);
11857 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.unknown));
11858 NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
11859 ZERO_STRUCTP(r->out.forest_trust_info);
11861 if (flags & NDR_OUT) {
11862 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11863 NDR_PULL_ALLOC(ndr, r->out.forest_trust_info);
11865 _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
11866 NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC);
11867 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_info));
11868 if (_ptr_forest_trust_info) {
11869 NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info);
11870 } else {
11871 *r->out.forest_trust_info = NULL;
11873 if (*r->out.forest_trust_info) {
11874 _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
11875 NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, 0);
11876 NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info));
11877 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, 0);
11879 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC);
11880 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11882 return NDR_ERR_SUCCESS;
11885 _PUBLIC_ void ndr_print_lsa_lsaRQueryForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct lsa_lsaRQueryForestTrustInformation *r)
11887 ndr_print_struct(ndr, name, "lsa_lsaRQueryForestTrustInformation");
11888 ndr->depth++;
11889 if (flags & NDR_SET_VALUES) {
11890 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11892 if (flags & NDR_IN) {
11893 ndr_print_struct(ndr, "in", "lsa_lsaRQueryForestTrustInformation");
11894 ndr->depth++;
11895 ndr_print_ptr(ndr, "handle", r->in.handle);
11896 ndr->depth++;
11897 ndr_print_policy_handle(ndr, "handle", r->in.handle);
11898 ndr->depth--;
11899 ndr_print_ptr(ndr, "trusted_domain_name", r->in.trusted_domain_name);
11900 ndr->depth++;
11901 ndr_print_lsa_String(ndr, "trusted_domain_name", r->in.trusted_domain_name);
11902 ndr->depth--;
11903 ndr_print_uint16(ndr, "unknown", r->in.unknown);
11904 ndr->depth--;
11906 if (flags & NDR_OUT) {
11907 ndr_print_struct(ndr, "out", "lsa_lsaRQueryForestTrustInformation");
11908 ndr->depth++;
11909 ndr_print_ptr(ndr, "forest_trust_info", r->out.forest_trust_info);
11910 ndr->depth++;
11911 ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info);
11912 ndr->depth++;
11913 if (*r->out.forest_trust_info) {
11914 ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info);
11916 ndr->depth--;
11917 ndr->depth--;
11918 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11919 ndr->depth--;
11921 ndr->depth--;
11924 static enum ndr_err_code ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
11926 if (flags & NDR_IN) {
11928 if (flags & NDR_OUT) {
11929 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11931 return NDR_ERR_SUCCESS;
11934 static enum ndr_err_code ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
11936 if (flags & NDR_IN) {
11938 if (flags & NDR_OUT) {
11939 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11941 return NDR_ERR_SUCCESS;
11944 _PUBLIC_ void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
11946 ndr_print_struct(ndr, name, "lsa_LSARSETFORESTTRUSTINFORMATION");
11947 ndr->depth++;
11948 if (flags & NDR_SET_VALUES) {
11949 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11951 if (flags & NDR_IN) {
11952 ndr_print_struct(ndr, "in", "lsa_LSARSETFORESTTRUSTINFORMATION");
11953 ndr->depth++;
11954 ndr->depth--;
11956 if (flags & NDR_OUT) {
11957 ndr_print_struct(ndr, "out", "lsa_LSARSETFORESTTRUSTINFORMATION");
11958 ndr->depth++;
11959 ndr_print_NTSTATUS(ndr, "result", r->out.result);
11960 ndr->depth--;
11962 ndr->depth--;
11965 static enum ndr_err_code ndr_push_lsa_CREDRRENAME(struct ndr_push *ndr, int flags, const struct lsa_CREDRRENAME *r)
11967 if (flags & NDR_IN) {
11969 if (flags & NDR_OUT) {
11970 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
11972 return NDR_ERR_SUCCESS;
11975 static enum ndr_err_code ndr_pull_lsa_CREDRRENAME(struct ndr_pull *ndr, int flags, struct lsa_CREDRRENAME *r)
11977 if (flags & NDR_IN) {
11979 if (flags & NDR_OUT) {
11980 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
11982 return NDR_ERR_SUCCESS;
11985 _PUBLIC_ void ndr_print_lsa_CREDRRENAME(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRRENAME *r)
11987 ndr_print_struct(ndr, name, "lsa_CREDRRENAME");
11988 ndr->depth++;
11989 if (flags & NDR_SET_VALUES) {
11990 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11992 if (flags & NDR_IN) {
11993 ndr_print_struct(ndr, "in", "lsa_CREDRRENAME");
11994 ndr->depth++;
11995 ndr->depth--;
11997 if (flags & NDR_OUT) {
11998 ndr_print_struct(ndr, "out", "lsa_CREDRRENAME");
11999 ndr->depth++;
12000 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12001 ndr->depth--;
12003 ndr->depth--;
12006 _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flags, const struct lsa_LookupSids3 *r)
12008 if (flags & NDR_IN) {
12009 if (r->in.sids == NULL) {
12010 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12012 NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12013 if (r->in.names == NULL) {
12014 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12016 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
12017 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
12018 if (r->in.count == NULL) {
12019 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12021 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
12022 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
12023 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
12025 if (flags & NDR_OUT) {
12026 if (r->out.domains == NULL) {
12027 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12029 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
12030 if (*r->out.domains) {
12031 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12033 if (r->out.names == NULL) {
12034 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12036 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
12037 if (r->out.count == NULL) {
12038 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12040 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
12041 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12043 return NDR_ERR_SUCCESS;
12046 _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int flags, struct lsa_LookupSids3 *r)
12048 uint32_t _ptr_domains;
12049 TALLOC_CTX *_mem_save_sids_0;
12050 TALLOC_CTX *_mem_save_domains_0;
12051 TALLOC_CTX *_mem_save_domains_1;
12052 TALLOC_CTX *_mem_save_names_0;
12053 TALLOC_CTX *_mem_save_count_0;
12054 if (flags & NDR_IN) {
12055 ZERO_STRUCT(r->out);
12057 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12058 NDR_PULL_ALLOC(ndr, r->in.sids);
12060 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
12061 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
12062 NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12063 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
12064 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12065 NDR_PULL_ALLOC(ndr, r->in.names);
12067 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
12068 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
12069 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
12070 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
12071 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
12072 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12073 NDR_PULL_ALLOC(ndr, r->in.count);
12075 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12076 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
12077 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
12078 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12079 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
12080 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
12081 NDR_PULL_ALLOC(ndr, r->out.domains);
12082 ZERO_STRUCTP(r->out.domains);
12083 NDR_PULL_ALLOC(ndr, r->out.names);
12084 *r->out.names = *r->in.names;
12085 NDR_PULL_ALLOC(ndr, r->out.count);
12086 *r->out.count = *r->in.count;
12088 if (flags & NDR_OUT) {
12089 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12090 NDR_PULL_ALLOC(ndr, r->out.domains);
12092 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
12093 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
12094 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
12095 if (_ptr_domains) {
12096 NDR_PULL_ALLOC(ndr, *r->out.domains);
12097 } else {
12098 *r->out.domains = NULL;
12100 if (*r->out.domains) {
12101 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
12102 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
12103 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12104 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
12106 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
12107 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12108 NDR_PULL_ALLOC(ndr, r->out.names);
12110 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
12111 NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
12112 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
12113 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
12114 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12115 NDR_PULL_ALLOC(ndr, r->out.count);
12117 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12118 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
12119 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
12120 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12121 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12123 return NDR_ERR_SUCCESS;
12126 _PUBLIC_ void ndr_print_lsa_LookupSids3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids3 *r)
12128 ndr_print_struct(ndr, name, "lsa_LookupSids3");
12129 ndr->depth++;
12130 if (flags & NDR_SET_VALUES) {
12131 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12133 if (flags & NDR_IN) {
12134 ndr_print_struct(ndr, "in", "lsa_LookupSids3");
12135 ndr->depth++;
12136 ndr_print_ptr(ndr, "sids", r->in.sids);
12137 ndr->depth++;
12138 ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
12139 ndr->depth--;
12140 ndr_print_ptr(ndr, "names", r->in.names);
12141 ndr->depth++;
12142 ndr_print_lsa_TransNameArray2(ndr, "names", r->in.names);
12143 ndr->depth--;
12144 ndr_print_uint16(ndr, "level", r->in.level);
12145 ndr_print_ptr(ndr, "count", r->in.count);
12146 ndr->depth++;
12147 ndr_print_uint32(ndr, "count", *r->in.count);
12148 ndr->depth--;
12149 ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
12150 ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
12151 ndr->depth--;
12153 if (flags & NDR_OUT) {
12154 ndr_print_struct(ndr, "out", "lsa_LookupSids3");
12155 ndr->depth++;
12156 ndr_print_ptr(ndr, "domains", r->out.domains);
12157 ndr->depth++;
12158 ndr_print_ptr(ndr, "domains", *r->out.domains);
12159 ndr->depth++;
12160 if (*r->out.domains) {
12161 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
12163 ndr->depth--;
12164 ndr->depth--;
12165 ndr_print_ptr(ndr, "names", r->out.names);
12166 ndr->depth++;
12167 ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names);
12168 ndr->depth--;
12169 ndr_print_ptr(ndr, "count", r->out.count);
12170 ndr->depth++;
12171 ndr_print_uint32(ndr, "count", *r->out.count);
12172 ndr->depth--;
12173 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12174 ndr->depth--;
12176 ndr->depth--;
12179 static enum ndr_err_code ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int flags, const struct lsa_LookupNames4 *r)
12181 uint32_t cntr_names_0;
12182 if (flags & NDR_IN) {
12183 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
12184 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
12185 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
12186 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
12188 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
12189 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
12191 if (r->in.sids == NULL) {
12192 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12194 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12195 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level));
12196 if (r->in.count == NULL) {
12197 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12199 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
12200 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lookup_options));
12201 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision));
12203 if (flags & NDR_OUT) {
12204 if (r->out.domains == NULL) {
12205 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12207 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
12208 if (*r->out.domains) {
12209 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12211 if (r->out.sids == NULL) {
12212 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12214 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
12215 if (r->out.count == NULL) {
12216 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
12218 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
12219 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12221 return NDR_ERR_SUCCESS;
12224 static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int flags, struct lsa_LookupNames4 *r)
12226 uint32_t cntr_names_0;
12227 uint32_t _ptr_domains;
12228 TALLOC_CTX *_mem_save_names_0;
12229 TALLOC_CTX *_mem_save_domains_0;
12230 TALLOC_CTX *_mem_save_domains_1;
12231 TALLOC_CTX *_mem_save_sids_0;
12232 TALLOC_CTX *_mem_save_count_0;
12233 if (flags & NDR_IN) {
12234 ZERO_STRUCT(r->out);
12236 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
12237 if (r->in.num_names > 1000) {
12238 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
12240 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
12241 NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
12242 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
12243 NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
12244 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
12245 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
12247 for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
12248 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
12250 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
12251 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12252 NDR_PULL_ALLOC(ndr, r->in.sids);
12254 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
12255 NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
12256 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
12257 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
12258 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level));
12259 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12260 NDR_PULL_ALLOC(ndr, r->in.count);
12262 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12263 NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
12264 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
12265 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12266 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lookup_options));
12267 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision));
12268 NDR_PULL_ALLOC(ndr, r->out.domains);
12269 ZERO_STRUCTP(r->out.domains);
12270 NDR_PULL_ALLOC(ndr, r->out.sids);
12271 *r->out.sids = *r->in.sids;
12272 NDR_PULL_ALLOC(ndr, r->out.count);
12273 *r->out.count = *r->in.count;
12274 if (r->in.names) {
12275 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
12278 if (flags & NDR_OUT) {
12279 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12280 NDR_PULL_ALLOC(ndr, r->out.domains);
12282 _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
12283 NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
12284 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
12285 if (_ptr_domains) {
12286 NDR_PULL_ALLOC(ndr, *r->out.domains);
12287 } else {
12288 *r->out.domains = NULL;
12290 if (*r->out.domains) {
12291 _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
12292 NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
12293 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
12294 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
12296 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
12297 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12298 NDR_PULL_ALLOC(ndr, r->out.sids);
12300 _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
12301 NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
12302 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
12303 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
12304 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
12305 NDR_PULL_ALLOC(ndr, r->out.count);
12307 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
12308 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
12309 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
12310 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
12311 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12313 return NDR_ERR_SUCCESS;
12316 _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames4 *r)
12318 uint32_t cntr_names_0;
12319 ndr_print_struct(ndr, name, "lsa_LookupNames4");
12320 ndr->depth++;
12321 if (flags & NDR_SET_VALUES) {
12322 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12324 if (flags & NDR_IN) {
12325 ndr_print_struct(ndr, "in", "lsa_LookupNames4");
12326 ndr->depth++;
12327 ndr_print_uint32(ndr, "num_names", r->in.num_names);
12328 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->in.num_names);
12329 ndr->depth++;
12330 for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
12331 char *idx_0=NULL;
12332 if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
12333 ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
12334 free(idx_0);
12337 ndr->depth--;
12338 ndr_print_ptr(ndr, "sids", r->in.sids);
12339 ndr->depth++;
12340 ndr_print_lsa_TransSidArray3(ndr, "sids", r->in.sids);
12341 ndr->depth--;
12342 ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level);
12343 ndr_print_ptr(ndr, "count", r->in.count);
12344 ndr->depth++;
12345 ndr_print_uint32(ndr, "count", *r->in.count);
12346 ndr->depth--;
12347 ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options);
12348 ndr_print_uint32(ndr, "client_revision", r->in.client_revision);
12349 ndr->depth--;
12351 if (flags & NDR_OUT) {
12352 ndr_print_struct(ndr, "out", "lsa_LookupNames4");
12353 ndr->depth++;
12354 ndr_print_ptr(ndr, "domains", r->out.domains);
12355 ndr->depth++;
12356 ndr_print_ptr(ndr, "domains", *r->out.domains);
12357 ndr->depth++;
12358 if (*r->out.domains) {
12359 ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
12361 ndr->depth--;
12362 ndr->depth--;
12363 ndr_print_ptr(ndr, "sids", r->out.sids);
12364 ndr->depth++;
12365 ndr_print_lsa_TransSidArray3(ndr, "sids", r->out.sids);
12366 ndr->depth--;
12367 ndr_print_ptr(ndr, "count", r->out.count);
12368 ndr->depth++;
12369 ndr_print_uint32(ndr, "count", *r->out.count);
12370 ndr->depth--;
12371 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12372 ndr->depth--;
12374 ndr->depth--;
12377 static enum ndr_err_code ndr_push_lsa_LSAROPENPOLICYSCE(struct ndr_push *ndr, int flags, const struct lsa_LSAROPENPOLICYSCE *r)
12379 if (flags & NDR_IN) {
12381 if (flags & NDR_OUT) {
12382 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12384 return NDR_ERR_SUCCESS;
12387 static enum ndr_err_code ndr_pull_lsa_LSAROPENPOLICYSCE(struct ndr_pull *ndr, int flags, struct lsa_LSAROPENPOLICYSCE *r)
12389 if (flags & NDR_IN) {
12391 if (flags & NDR_OUT) {
12392 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12394 return NDR_ERR_SUCCESS;
12397 _PUBLIC_ void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSAROPENPOLICYSCE *r)
12399 ndr_print_struct(ndr, name, "lsa_LSAROPENPOLICYSCE");
12400 ndr->depth++;
12401 if (flags & NDR_SET_VALUES) {
12402 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12404 if (flags & NDR_IN) {
12405 ndr_print_struct(ndr, "in", "lsa_LSAROPENPOLICYSCE");
12406 ndr->depth++;
12407 ndr->depth--;
12409 if (flags & NDR_OUT) {
12410 ndr_print_struct(ndr, "out", "lsa_LSAROPENPOLICYSCE");
12411 ndr->depth++;
12412 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12413 ndr->depth--;
12415 ndr->depth--;
12418 static enum ndr_err_code ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
12420 if (flags & NDR_IN) {
12422 if (flags & NDR_OUT) {
12423 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12425 return NDR_ERR_SUCCESS;
12428 static enum ndr_err_code ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_pull *ndr, int flags, struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
12430 if (flags & NDR_IN) {
12432 if (flags & NDR_OUT) {
12433 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12435 return NDR_ERR_SUCCESS;
12438 _PUBLIC_ void ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
12440 ndr_print_struct(ndr, name, "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12441 ndr->depth++;
12442 if (flags & NDR_SET_VALUES) {
12443 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12445 if (flags & NDR_IN) {
12446 ndr_print_struct(ndr, "in", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12447 ndr->depth++;
12448 ndr->depth--;
12450 if (flags & NDR_OUT) {
12451 ndr_print_struct(ndr, "out", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12452 ndr->depth++;
12453 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12454 ndr->depth--;
12456 ndr->depth--;
12459 static enum ndr_err_code ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
12461 if (flags & NDR_IN) {
12463 if (flags & NDR_OUT) {
12464 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12466 return NDR_ERR_SUCCESS;
12469 static enum ndr_err_code ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_pull *ndr, int flags, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
12471 if (flags & NDR_IN) {
12473 if (flags & NDR_OUT) {
12474 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12476 return NDR_ERR_SUCCESS;
12479 _PUBLIC_ void ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
12481 ndr_print_struct(ndr, name, "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12482 ndr->depth++;
12483 if (flags & NDR_SET_VALUES) {
12484 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12486 if (flags & NDR_IN) {
12487 ndr_print_struct(ndr, "in", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12488 ndr->depth++;
12489 ndr->depth--;
12491 if (flags & NDR_OUT) {
12492 ndr_print_struct(ndr, "out", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12493 ndr->depth++;
12494 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12495 ndr->depth--;
12497 ndr->depth--;
12500 static enum ndr_err_code ndr_push_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r)
12502 if (flags & NDR_IN) {
12504 if (flags & NDR_OUT) {
12505 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
12507 return NDR_ERR_SUCCESS;
12510 static enum ndr_err_code ndr_pull_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARADTREPORTSECURITYEVENT *r)
12512 if (flags & NDR_IN) {
12514 if (flags & NDR_OUT) {
12515 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
12517 return NDR_ERR_SUCCESS;
12520 _PUBLIC_ void ndr_print_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r)
12522 ndr_print_struct(ndr, name, "lsa_LSARADTREPORTSECURITYEVENT");
12523 ndr->depth++;
12524 if (flags & NDR_SET_VALUES) {
12525 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
12527 if (flags & NDR_IN) {
12528 ndr_print_struct(ndr, "in", "lsa_LSARADTREPORTSECURITYEVENT");
12529 ndr->depth++;
12530 ndr->depth--;
12532 if (flags & NDR_OUT) {
12533 ndr_print_struct(ndr, "out", "lsa_LSARADTREPORTSECURITYEVENT");
12534 ndr->depth++;
12535 ndr_print_NTSTATUS(ndr, "result", r->out.result);
12536 ndr->depth--;
12538 ndr->depth--;
12541 static const struct ndr_interface_call lsarpc_calls[] = {
12543 "lsa_Close",
12544 sizeof(struct lsa_Close),
12545 (ndr_push_flags_fn_t) ndr_push_lsa_Close,
12546 (ndr_pull_flags_fn_t) ndr_pull_lsa_Close,
12547 (ndr_print_function_t) ndr_print_lsa_Close,
12548 false,
12551 "lsa_Delete",
12552 sizeof(struct lsa_Delete),
12553 (ndr_push_flags_fn_t) ndr_push_lsa_Delete,
12554 (ndr_pull_flags_fn_t) ndr_pull_lsa_Delete,
12555 (ndr_print_function_t) ndr_print_lsa_Delete,
12556 false,
12559 "lsa_EnumPrivs",
12560 sizeof(struct lsa_EnumPrivs),
12561 (ndr_push_flags_fn_t) ndr_push_lsa_EnumPrivs,
12562 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumPrivs,
12563 (ndr_print_function_t) ndr_print_lsa_EnumPrivs,
12564 false,
12567 "lsa_QuerySecurity",
12568 sizeof(struct lsa_QuerySecurity),
12569 (ndr_push_flags_fn_t) ndr_push_lsa_QuerySecurity,
12570 (ndr_pull_flags_fn_t) ndr_pull_lsa_QuerySecurity,
12571 (ndr_print_function_t) ndr_print_lsa_QuerySecurity,
12572 false,
12575 "lsa_SetSecObj",
12576 sizeof(struct lsa_SetSecObj),
12577 (ndr_push_flags_fn_t) ndr_push_lsa_SetSecObj,
12578 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSecObj,
12579 (ndr_print_function_t) ndr_print_lsa_SetSecObj,
12580 false,
12583 "lsa_ChangePassword",
12584 sizeof(struct lsa_ChangePassword),
12585 (ndr_push_flags_fn_t) ndr_push_lsa_ChangePassword,
12586 (ndr_pull_flags_fn_t) ndr_pull_lsa_ChangePassword,
12587 (ndr_print_function_t) ndr_print_lsa_ChangePassword,
12588 false,
12591 "lsa_OpenPolicy",
12592 sizeof(struct lsa_OpenPolicy),
12593 (ndr_push_flags_fn_t) ndr_push_lsa_OpenPolicy,
12594 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenPolicy,
12595 (ndr_print_function_t) ndr_print_lsa_OpenPolicy,
12596 false,
12599 "lsa_QueryInfoPolicy",
12600 sizeof(struct lsa_QueryInfoPolicy),
12601 (ndr_push_flags_fn_t) ndr_push_lsa_QueryInfoPolicy,
12602 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryInfoPolicy,
12603 (ndr_print_function_t) ndr_print_lsa_QueryInfoPolicy,
12604 false,
12607 "lsa_SetInfoPolicy",
12608 sizeof(struct lsa_SetInfoPolicy),
12609 (ndr_push_flags_fn_t) ndr_push_lsa_SetInfoPolicy,
12610 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInfoPolicy,
12611 (ndr_print_function_t) ndr_print_lsa_SetInfoPolicy,
12612 false,
12615 "lsa_ClearAuditLog",
12616 sizeof(struct lsa_ClearAuditLog),
12617 (ndr_push_flags_fn_t) ndr_push_lsa_ClearAuditLog,
12618 (ndr_pull_flags_fn_t) ndr_pull_lsa_ClearAuditLog,
12619 (ndr_print_function_t) ndr_print_lsa_ClearAuditLog,
12620 false,
12623 "lsa_CreateAccount",
12624 sizeof(struct lsa_CreateAccount),
12625 (ndr_push_flags_fn_t) ndr_push_lsa_CreateAccount,
12626 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateAccount,
12627 (ndr_print_function_t) ndr_print_lsa_CreateAccount,
12628 false,
12631 "lsa_EnumAccounts",
12632 sizeof(struct lsa_EnumAccounts),
12633 (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccounts,
12634 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccounts,
12635 (ndr_print_function_t) ndr_print_lsa_EnumAccounts,
12636 false,
12639 "lsa_CreateTrustedDomain",
12640 sizeof(struct lsa_CreateTrustedDomain),
12641 (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomain,
12642 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomain,
12643 (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomain,
12644 false,
12647 "lsa_EnumTrustDom",
12648 sizeof(struct lsa_EnumTrustDom),
12649 (ndr_push_flags_fn_t) ndr_push_lsa_EnumTrustDom,
12650 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumTrustDom,
12651 (ndr_print_function_t) ndr_print_lsa_EnumTrustDom,
12652 false,
12655 "lsa_LookupNames",
12656 sizeof(struct lsa_LookupNames),
12657 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames,
12658 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames,
12659 (ndr_print_function_t) ndr_print_lsa_LookupNames,
12660 false,
12663 "lsa_LookupSids",
12664 sizeof(struct lsa_LookupSids),
12665 (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids,
12666 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids,
12667 (ndr_print_function_t) ndr_print_lsa_LookupSids,
12668 false,
12671 "lsa_CreateSecret",
12672 sizeof(struct lsa_CreateSecret),
12673 (ndr_push_flags_fn_t) ndr_push_lsa_CreateSecret,
12674 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateSecret,
12675 (ndr_print_function_t) ndr_print_lsa_CreateSecret,
12676 false,
12679 "lsa_OpenAccount",
12680 sizeof(struct lsa_OpenAccount),
12681 (ndr_push_flags_fn_t) ndr_push_lsa_OpenAccount,
12682 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenAccount,
12683 (ndr_print_function_t) ndr_print_lsa_OpenAccount,
12684 false,
12687 "lsa_EnumPrivsAccount",
12688 sizeof(struct lsa_EnumPrivsAccount),
12689 (ndr_push_flags_fn_t) ndr_push_lsa_EnumPrivsAccount,
12690 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumPrivsAccount,
12691 (ndr_print_function_t) ndr_print_lsa_EnumPrivsAccount,
12692 false,
12695 "lsa_AddPrivilegesToAccount",
12696 sizeof(struct lsa_AddPrivilegesToAccount),
12697 (ndr_push_flags_fn_t) ndr_push_lsa_AddPrivilegesToAccount,
12698 (ndr_pull_flags_fn_t) ndr_pull_lsa_AddPrivilegesToAccount,
12699 (ndr_print_function_t) ndr_print_lsa_AddPrivilegesToAccount,
12700 false,
12703 "lsa_RemovePrivilegesFromAccount",
12704 sizeof(struct lsa_RemovePrivilegesFromAccount),
12705 (ndr_push_flags_fn_t) ndr_push_lsa_RemovePrivilegesFromAccount,
12706 (ndr_pull_flags_fn_t) ndr_pull_lsa_RemovePrivilegesFromAccount,
12707 (ndr_print_function_t) ndr_print_lsa_RemovePrivilegesFromAccount,
12708 false,
12711 "lsa_GetQuotasForAccount",
12712 sizeof(struct lsa_GetQuotasForAccount),
12713 (ndr_push_flags_fn_t) ndr_push_lsa_GetQuotasForAccount,
12714 (ndr_pull_flags_fn_t) ndr_pull_lsa_GetQuotasForAccount,
12715 (ndr_print_function_t) ndr_print_lsa_GetQuotasForAccount,
12716 false,
12719 "lsa_SetQuotasForAccount",
12720 sizeof(struct lsa_SetQuotasForAccount),
12721 (ndr_push_flags_fn_t) ndr_push_lsa_SetQuotasForAccount,
12722 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetQuotasForAccount,
12723 (ndr_print_function_t) ndr_print_lsa_SetQuotasForAccount,
12724 false,
12727 "lsa_GetSystemAccessAccount",
12728 sizeof(struct lsa_GetSystemAccessAccount),
12729 (ndr_push_flags_fn_t) ndr_push_lsa_GetSystemAccessAccount,
12730 (ndr_pull_flags_fn_t) ndr_pull_lsa_GetSystemAccessAccount,
12731 (ndr_print_function_t) ndr_print_lsa_GetSystemAccessAccount,
12732 false,
12735 "lsa_SetSystemAccessAccount",
12736 sizeof(struct lsa_SetSystemAccessAccount),
12737 (ndr_push_flags_fn_t) ndr_push_lsa_SetSystemAccessAccount,
12738 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSystemAccessAccount,
12739 (ndr_print_function_t) ndr_print_lsa_SetSystemAccessAccount,
12740 false,
12743 "lsa_OpenTrustedDomain",
12744 sizeof(struct lsa_OpenTrustedDomain),
12745 (ndr_push_flags_fn_t) ndr_push_lsa_OpenTrustedDomain,
12746 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenTrustedDomain,
12747 (ndr_print_function_t) ndr_print_lsa_OpenTrustedDomain,
12748 false,
12751 "lsa_QueryTrustedDomainInfo",
12752 sizeof(struct lsa_QueryTrustedDomainInfo),
12753 (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfo,
12754 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfo,
12755 (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfo,
12756 false,
12759 "lsa_SetInformationTrustedDomain",
12760 sizeof(struct lsa_SetInformationTrustedDomain),
12761 (ndr_push_flags_fn_t) ndr_push_lsa_SetInformationTrustedDomain,
12762 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInformationTrustedDomain,
12763 (ndr_print_function_t) ndr_print_lsa_SetInformationTrustedDomain,
12764 false,
12767 "lsa_OpenSecret",
12768 sizeof(struct lsa_OpenSecret),
12769 (ndr_push_flags_fn_t) ndr_push_lsa_OpenSecret,
12770 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenSecret,
12771 (ndr_print_function_t) ndr_print_lsa_OpenSecret,
12772 false,
12775 "lsa_SetSecret",
12776 sizeof(struct lsa_SetSecret),
12777 (ndr_push_flags_fn_t) ndr_push_lsa_SetSecret,
12778 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSecret,
12779 (ndr_print_function_t) ndr_print_lsa_SetSecret,
12780 false,
12783 "lsa_QuerySecret",
12784 sizeof(struct lsa_QuerySecret),
12785 (ndr_push_flags_fn_t) ndr_push_lsa_QuerySecret,
12786 (ndr_pull_flags_fn_t) ndr_pull_lsa_QuerySecret,
12787 (ndr_print_function_t) ndr_print_lsa_QuerySecret,
12788 false,
12791 "lsa_LookupPrivValue",
12792 sizeof(struct lsa_LookupPrivValue),
12793 (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivValue,
12794 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivValue,
12795 (ndr_print_function_t) ndr_print_lsa_LookupPrivValue,
12796 false,
12799 "lsa_LookupPrivName",
12800 sizeof(struct lsa_LookupPrivName),
12801 (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivName,
12802 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivName,
12803 (ndr_print_function_t) ndr_print_lsa_LookupPrivName,
12804 false,
12807 "lsa_LookupPrivDisplayName",
12808 sizeof(struct lsa_LookupPrivDisplayName),
12809 (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivDisplayName,
12810 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivDisplayName,
12811 (ndr_print_function_t) ndr_print_lsa_LookupPrivDisplayName,
12812 false,
12815 "lsa_DeleteObject",
12816 sizeof(struct lsa_DeleteObject),
12817 (ndr_push_flags_fn_t) ndr_push_lsa_DeleteObject,
12818 (ndr_pull_flags_fn_t) ndr_pull_lsa_DeleteObject,
12819 (ndr_print_function_t) ndr_print_lsa_DeleteObject,
12820 false,
12823 "lsa_EnumAccountsWithUserRight",
12824 sizeof(struct lsa_EnumAccountsWithUserRight),
12825 (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccountsWithUserRight,
12826 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccountsWithUserRight,
12827 (ndr_print_function_t) ndr_print_lsa_EnumAccountsWithUserRight,
12828 false,
12831 "lsa_EnumAccountRights",
12832 sizeof(struct lsa_EnumAccountRights),
12833 (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccountRights,
12834 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccountRights,
12835 (ndr_print_function_t) ndr_print_lsa_EnumAccountRights,
12836 false,
12839 "lsa_AddAccountRights",
12840 sizeof(struct lsa_AddAccountRights),
12841 (ndr_push_flags_fn_t) ndr_push_lsa_AddAccountRights,
12842 (ndr_pull_flags_fn_t) ndr_pull_lsa_AddAccountRights,
12843 (ndr_print_function_t) ndr_print_lsa_AddAccountRights,
12844 false,
12847 "lsa_RemoveAccountRights",
12848 sizeof(struct lsa_RemoveAccountRights),
12849 (ndr_push_flags_fn_t) ndr_push_lsa_RemoveAccountRights,
12850 (ndr_pull_flags_fn_t) ndr_pull_lsa_RemoveAccountRights,
12851 (ndr_print_function_t) ndr_print_lsa_RemoveAccountRights,
12852 false,
12855 "lsa_QueryTrustedDomainInfoBySid",
12856 sizeof(struct lsa_QueryTrustedDomainInfoBySid),
12857 (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfoBySid,
12858 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfoBySid,
12859 (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfoBySid,
12860 false,
12863 "lsa_SetTrustedDomainInfo",
12864 sizeof(struct lsa_SetTrustedDomainInfo),
12865 (ndr_push_flags_fn_t) ndr_push_lsa_SetTrustedDomainInfo,
12866 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetTrustedDomainInfo,
12867 (ndr_print_function_t) ndr_print_lsa_SetTrustedDomainInfo,
12868 false,
12871 "lsa_DeleteTrustedDomain",
12872 sizeof(struct lsa_DeleteTrustedDomain),
12873 (ndr_push_flags_fn_t) ndr_push_lsa_DeleteTrustedDomain,
12874 (ndr_pull_flags_fn_t) ndr_pull_lsa_DeleteTrustedDomain,
12875 (ndr_print_function_t) ndr_print_lsa_DeleteTrustedDomain,
12876 false,
12879 "lsa_StorePrivateData",
12880 sizeof(struct lsa_StorePrivateData),
12881 (ndr_push_flags_fn_t) ndr_push_lsa_StorePrivateData,
12882 (ndr_pull_flags_fn_t) ndr_pull_lsa_StorePrivateData,
12883 (ndr_print_function_t) ndr_print_lsa_StorePrivateData,
12884 false,
12887 "lsa_RetrievePrivateData",
12888 sizeof(struct lsa_RetrievePrivateData),
12889 (ndr_push_flags_fn_t) ndr_push_lsa_RetrievePrivateData,
12890 (ndr_pull_flags_fn_t) ndr_pull_lsa_RetrievePrivateData,
12891 (ndr_print_function_t) ndr_print_lsa_RetrievePrivateData,
12892 false,
12895 "lsa_OpenPolicy2",
12896 sizeof(struct lsa_OpenPolicy2),
12897 (ndr_push_flags_fn_t) ndr_push_lsa_OpenPolicy2,
12898 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenPolicy2,
12899 (ndr_print_function_t) ndr_print_lsa_OpenPolicy2,
12900 false,
12903 "lsa_GetUserName",
12904 sizeof(struct lsa_GetUserName),
12905 (ndr_push_flags_fn_t) ndr_push_lsa_GetUserName,
12906 (ndr_pull_flags_fn_t) ndr_pull_lsa_GetUserName,
12907 (ndr_print_function_t) ndr_print_lsa_GetUserName,
12908 false,
12911 "lsa_QueryInfoPolicy2",
12912 sizeof(struct lsa_QueryInfoPolicy2),
12913 (ndr_push_flags_fn_t) ndr_push_lsa_QueryInfoPolicy2,
12914 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryInfoPolicy2,
12915 (ndr_print_function_t) ndr_print_lsa_QueryInfoPolicy2,
12916 false,
12919 "lsa_SetInfoPolicy2",
12920 sizeof(struct lsa_SetInfoPolicy2),
12921 (ndr_push_flags_fn_t) ndr_push_lsa_SetInfoPolicy2,
12922 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInfoPolicy2,
12923 (ndr_print_function_t) ndr_print_lsa_SetInfoPolicy2,
12924 false,
12927 "lsa_QueryTrustedDomainInfoByName",
12928 sizeof(struct lsa_QueryTrustedDomainInfoByName),
12929 (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfoByName,
12930 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfoByName,
12931 (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfoByName,
12932 false,
12935 "lsa_SetTrustedDomainInfoByName",
12936 sizeof(struct lsa_SetTrustedDomainInfoByName),
12937 (ndr_push_flags_fn_t) ndr_push_lsa_SetTrustedDomainInfoByName,
12938 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetTrustedDomainInfoByName,
12939 (ndr_print_function_t) ndr_print_lsa_SetTrustedDomainInfoByName,
12940 false,
12943 "lsa_EnumTrustedDomainsEx",
12944 sizeof(struct lsa_EnumTrustedDomainsEx),
12945 (ndr_push_flags_fn_t) ndr_push_lsa_EnumTrustedDomainsEx,
12946 (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumTrustedDomainsEx,
12947 (ndr_print_function_t) ndr_print_lsa_EnumTrustedDomainsEx,
12948 false,
12951 "lsa_CreateTrustedDomainEx",
12952 sizeof(struct lsa_CreateTrustedDomainEx),
12953 (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomainEx,
12954 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomainEx,
12955 (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomainEx,
12956 false,
12959 "lsa_CloseTrustedDomainEx",
12960 sizeof(struct lsa_CloseTrustedDomainEx),
12961 (ndr_push_flags_fn_t) ndr_push_lsa_CloseTrustedDomainEx,
12962 (ndr_pull_flags_fn_t) ndr_pull_lsa_CloseTrustedDomainEx,
12963 (ndr_print_function_t) ndr_print_lsa_CloseTrustedDomainEx,
12964 false,
12967 "lsa_QueryDomainInformationPolicy",
12968 sizeof(struct lsa_QueryDomainInformationPolicy),
12969 (ndr_push_flags_fn_t) ndr_push_lsa_QueryDomainInformationPolicy,
12970 (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryDomainInformationPolicy,
12971 (ndr_print_function_t) ndr_print_lsa_QueryDomainInformationPolicy,
12972 false,
12975 "lsa_SetDomainInformationPolicy",
12976 sizeof(struct lsa_SetDomainInformationPolicy),
12977 (ndr_push_flags_fn_t) ndr_push_lsa_SetDomainInformationPolicy,
12978 (ndr_pull_flags_fn_t) ndr_pull_lsa_SetDomainInformationPolicy,
12979 (ndr_print_function_t) ndr_print_lsa_SetDomainInformationPolicy,
12980 false,
12983 "lsa_OpenTrustedDomainByName",
12984 sizeof(struct lsa_OpenTrustedDomainByName),
12985 (ndr_push_flags_fn_t) ndr_push_lsa_OpenTrustedDomainByName,
12986 (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenTrustedDomainByName,
12987 (ndr_print_function_t) ndr_print_lsa_OpenTrustedDomainByName,
12988 false,
12991 "lsa_TestCall",
12992 sizeof(struct lsa_TestCall),
12993 (ndr_push_flags_fn_t) ndr_push_lsa_TestCall,
12994 (ndr_pull_flags_fn_t) ndr_pull_lsa_TestCall,
12995 (ndr_print_function_t) ndr_print_lsa_TestCall,
12996 false,
12999 "lsa_LookupSids2",
13000 sizeof(struct lsa_LookupSids2),
13001 (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids2,
13002 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids2,
13003 (ndr_print_function_t) ndr_print_lsa_LookupSids2,
13004 false,
13007 "lsa_LookupNames2",
13008 sizeof(struct lsa_LookupNames2),
13009 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames2,
13010 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames2,
13011 (ndr_print_function_t) ndr_print_lsa_LookupNames2,
13012 false,
13015 "lsa_CreateTrustedDomainEx2",
13016 sizeof(struct lsa_CreateTrustedDomainEx2),
13017 (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomainEx2,
13018 (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomainEx2,
13019 (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomainEx2,
13020 false,
13023 "lsa_CREDRWRITE",
13024 sizeof(struct lsa_CREDRWRITE),
13025 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRWRITE,
13026 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRWRITE,
13027 (ndr_print_function_t) ndr_print_lsa_CREDRWRITE,
13028 false,
13031 "lsa_CREDRREAD",
13032 sizeof(struct lsa_CREDRREAD),
13033 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRREAD,
13034 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRREAD,
13035 (ndr_print_function_t) ndr_print_lsa_CREDRREAD,
13036 false,
13039 "lsa_CREDRENUMERATE",
13040 sizeof(struct lsa_CREDRENUMERATE),
13041 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRENUMERATE,
13042 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRENUMERATE,
13043 (ndr_print_function_t) ndr_print_lsa_CREDRENUMERATE,
13044 false,
13047 "lsa_CREDRWRITEDOMAINCREDENTIALS",
13048 sizeof(struct lsa_CREDRWRITEDOMAINCREDENTIALS),
13049 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS,
13050 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS,
13051 (ndr_print_function_t) ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS,
13052 false,
13055 "lsa_CREDRREADDOMAINCREDENTIALS",
13056 sizeof(struct lsa_CREDRREADDOMAINCREDENTIALS),
13057 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRREADDOMAINCREDENTIALS,
13058 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS,
13059 (ndr_print_function_t) ndr_print_lsa_CREDRREADDOMAINCREDENTIALS,
13060 false,
13063 "lsa_CREDRDELETE",
13064 sizeof(struct lsa_CREDRDELETE),
13065 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRDELETE,
13066 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRDELETE,
13067 (ndr_print_function_t) ndr_print_lsa_CREDRDELETE,
13068 false,
13071 "lsa_CREDRGETTARGETINFO",
13072 sizeof(struct lsa_CREDRGETTARGETINFO),
13073 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRGETTARGETINFO,
13074 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRGETTARGETINFO,
13075 (ndr_print_function_t) ndr_print_lsa_CREDRGETTARGETINFO,
13076 false,
13079 "lsa_CREDRPROFILELOADED",
13080 sizeof(struct lsa_CREDRPROFILELOADED),
13081 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRPROFILELOADED,
13082 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRPROFILELOADED,
13083 (ndr_print_function_t) ndr_print_lsa_CREDRPROFILELOADED,
13084 false,
13087 "lsa_LookupNames3",
13088 sizeof(struct lsa_LookupNames3),
13089 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames3,
13090 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames3,
13091 (ndr_print_function_t) ndr_print_lsa_LookupNames3,
13092 false,
13095 "lsa_CREDRGETSESSIONTYPES",
13096 sizeof(struct lsa_CREDRGETSESSIONTYPES),
13097 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRGETSESSIONTYPES,
13098 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRGETSESSIONTYPES,
13099 (ndr_print_function_t) ndr_print_lsa_CREDRGETSESSIONTYPES,
13100 false,
13103 "lsa_LSARREGISTERAUDITEVENT",
13104 sizeof(struct lsa_LSARREGISTERAUDITEVENT),
13105 (ndr_push_flags_fn_t) ndr_push_lsa_LSARREGISTERAUDITEVENT,
13106 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARREGISTERAUDITEVENT,
13107 (ndr_print_function_t) ndr_print_lsa_LSARREGISTERAUDITEVENT,
13108 false,
13111 "lsa_LSARGENAUDITEVENT",
13112 sizeof(struct lsa_LSARGENAUDITEVENT),
13113 (ndr_push_flags_fn_t) ndr_push_lsa_LSARGENAUDITEVENT,
13114 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARGENAUDITEVENT,
13115 (ndr_print_function_t) ndr_print_lsa_LSARGENAUDITEVENT,
13116 false,
13119 "lsa_LSARUNREGISTERAUDITEVENT",
13120 sizeof(struct lsa_LSARUNREGISTERAUDITEVENT),
13121 (ndr_push_flags_fn_t) ndr_push_lsa_LSARUNREGISTERAUDITEVENT,
13122 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARUNREGISTERAUDITEVENT,
13123 (ndr_print_function_t) ndr_print_lsa_LSARUNREGISTERAUDITEVENT,
13124 false,
13127 "lsa_lsaRQueryForestTrustInformation",
13128 sizeof(struct lsa_lsaRQueryForestTrustInformation),
13129 (ndr_push_flags_fn_t) ndr_push_lsa_lsaRQueryForestTrustInformation,
13130 (ndr_pull_flags_fn_t) ndr_pull_lsa_lsaRQueryForestTrustInformation,
13131 (ndr_print_function_t) ndr_print_lsa_lsaRQueryForestTrustInformation,
13132 false,
13135 "lsa_LSARSETFORESTTRUSTINFORMATION",
13136 sizeof(struct lsa_LSARSETFORESTTRUSTINFORMATION),
13137 (ndr_push_flags_fn_t) ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION,
13138 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION,
13139 (ndr_print_function_t) ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION,
13140 false,
13143 "lsa_CREDRRENAME",
13144 sizeof(struct lsa_CREDRRENAME),
13145 (ndr_push_flags_fn_t) ndr_push_lsa_CREDRRENAME,
13146 (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRRENAME,
13147 (ndr_print_function_t) ndr_print_lsa_CREDRRENAME,
13148 false,
13151 "lsa_LookupSids3",
13152 sizeof(struct lsa_LookupSids3),
13153 (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids3,
13154 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids3,
13155 (ndr_print_function_t) ndr_print_lsa_LookupSids3,
13156 false,
13159 "lsa_LookupNames4",
13160 sizeof(struct lsa_LookupNames4),
13161 (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames4,
13162 (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames4,
13163 (ndr_print_function_t) ndr_print_lsa_LookupNames4,
13164 false,
13167 "lsa_LSAROPENPOLICYSCE",
13168 sizeof(struct lsa_LSAROPENPOLICYSCE),
13169 (ndr_push_flags_fn_t) ndr_push_lsa_LSAROPENPOLICYSCE,
13170 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSAROPENPOLICYSCE,
13171 (ndr_print_function_t) ndr_print_lsa_LSAROPENPOLICYSCE,
13172 false,
13175 "lsa_LSARADTREGISTERSECURITYEVENTSOURCE",
13176 sizeof(struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE),
13177 (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
13178 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
13179 (ndr_print_function_t) ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
13180 false,
13183 "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE",
13184 sizeof(struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE),
13185 (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
13186 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
13187 (ndr_print_function_t) ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
13188 false,
13191 "lsa_LSARADTREPORTSECURITYEVENT",
13192 sizeof(struct lsa_LSARADTREPORTSECURITYEVENT),
13193 (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTREPORTSECURITYEVENT,
13194 (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTREPORTSECURITYEVENT,
13195 (ndr_print_function_t) ndr_print_lsa_LSARADTREPORTSECURITYEVENT,
13196 false,
13198 { NULL, 0, NULL, NULL, NULL, false }
13201 static const char * const lsarpc_endpoint_strings[] = {
13202 "ncacn_np:[\\pipe\\lsarpc]",
13203 "ncacn_np:[\\pipe\\netlogon]",
13204 "ncacn_np:[\\pipe\\lsass]",
13205 "ncacn_ip_tcp:",
13206 "ncalrpc:",
13209 static const struct ndr_interface_string_array lsarpc_endpoints = {
13210 .count = 5,
13211 .names = lsarpc_endpoint_strings
13214 static const char * const lsarpc_authservice_strings[] = {
13215 "host",
13218 static const struct ndr_interface_string_array lsarpc_authservices = {
13219 .count = 1,
13220 .names = lsarpc_authservice_strings
13224 const struct ndr_interface_table ndr_table_lsarpc = {
13225 .name = "lsarpc",
13226 .syntax_id = {
13227 {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xab}},
13228 NDR_LSARPC_VERSION
13230 .helpstring = NDR_LSARPC_HELPSTRING,
13231 .num_calls = 82,
13232 .calls = lsarpc_calls,
13233 .endpoints = &lsarpc_endpoints,
13234 .authservices = &lsarpc_authservices