1 /* parser auto-generated by pidl */
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
) {
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
)
30 uint32_t size_string_1
= 0;
31 uint32_t length_string_1
= 0;
32 TALLOC_CTX
*_mem_save_string_0
;
33 if (ndr_flags
& NDR_SCALARS
) {
34 NDR_CHECK(ndr_pull_align(ndr
, 4));
35 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
36 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
37 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
39 NDR_PULL_ALLOC(ndr
, r
->string
);
44 if (ndr_flags
& NDR_BUFFERS
) {
46 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
47 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
48 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
49 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string
));
50 size_string_1
= ndr_get_array_size(ndr
, &r
->string
);
51 length_string_1
= ndr_get_array_length(ndr
, &r
->string
);
52 if (length_string_1
> size_string_1
) {
53 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", size_string_1
, length_string_1
);
55 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, length_string_1
, sizeof(uint16_t), CH_UTF16
));
56 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
59 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->size
/ 2));
62 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->string
, r
->length
/ 2));
65 return NDR_ERR_SUCCESS
;
68 _PUBLIC_
void ndr_print_lsa_String(struct ndr_print
*ndr
, const char *name
, const struct lsa_String
*r
)
70 ndr_print_struct(ndr
, name
, "lsa_String");
72 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m(r
->string
):r
->length
);
73 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m(r
->string
):r
->size
);
74 ndr_print_ptr(ndr
, "string", r
->string
);
77 ndr_print_string(ndr
, "string", r
->string
);
83 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_StringLarge(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_StringLarge
*r
)
85 if (ndr_flags
& NDR_SCALARS
) {
86 NDR_CHECK(ndr_push_align(ndr
, 4));
87 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
)));
88 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 2 * strlen_m_term(r
->string
)));
89 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
91 if (ndr_flags
& NDR_BUFFERS
) {
93 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2 * strlen_m_term(r
->string
) / 2));
94 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
95 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
) / 2));
96 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, 2 * strlen_m(r
->string
) / 2, sizeof(uint16_t), CH_UTF16
));
99 return NDR_ERR_SUCCESS
;
102 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_StringLarge(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_StringLarge
*r
)
104 uint32_t _ptr_string
;
105 uint32_t size_string_1
= 0;
106 uint32_t length_string_1
= 0;
107 TALLOC_CTX
*_mem_save_string_0
;
108 if (ndr_flags
& NDR_SCALARS
) {
109 NDR_CHECK(ndr_pull_align(ndr
, 4));
110 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
111 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
112 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
114 NDR_PULL_ALLOC(ndr
, r
->string
);
119 if (ndr_flags
& NDR_BUFFERS
) {
121 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
122 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
123 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
124 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string
));
125 size_string_1
= ndr_get_array_size(ndr
, &r
->string
);
126 length_string_1
= ndr_get_array_length(ndr
, &r
->string
);
127 if (length_string_1
> size_string_1
) {
128 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", size_string_1
, length_string_1
);
130 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, length_string_1
, sizeof(uint16_t), CH_UTF16
));
131 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
134 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->size
/ 2));
137 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->string
, r
->length
/ 2));
140 return NDR_ERR_SUCCESS
;
143 _PUBLIC_
void ndr_print_lsa_StringLarge(struct ndr_print
*ndr
, const char *name
, const struct lsa_StringLarge
*r
)
145 ndr_print_struct(ndr
, name
, "lsa_StringLarge");
147 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m(r
->string
):r
->length
);
148 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m_term(r
->string
):r
->size
);
149 ndr_print_ptr(ndr
, "string", r
->string
);
152 ndr_print_string(ndr
, "string", r
->string
);
158 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_Strings(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_Strings
*r
)
160 uint32_t cntr_names_1
;
161 if (ndr_flags
& NDR_SCALARS
) {
162 NDR_CHECK(ndr_push_align(ndr
, 4));
163 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
164 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
166 if (ndr_flags
& NDR_BUFFERS
) {
168 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
169 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
170 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
172 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
173 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
177 return NDR_ERR_SUCCESS
;
180 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_Strings(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_Strings
*r
)
183 uint32_t size_names_1
= 0;
184 uint32_t cntr_names_1
;
185 TALLOC_CTX
*_mem_save_names_0
;
186 TALLOC_CTX
*_mem_save_names_1
;
187 if (ndr_flags
& NDR_SCALARS
) {
188 NDR_CHECK(ndr_pull_align(ndr
, 4));
189 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
190 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
192 NDR_PULL_ALLOC(ndr
, r
->names
);
197 if (ndr_flags
& NDR_BUFFERS
) {
199 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
200 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
201 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
202 size_names_1
= ndr_get_array_size(ndr
, &r
->names
);
203 NDR_PULL_ALLOC_N(ndr
, r
->names
, size_names_1
);
204 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
205 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
206 for (cntr_names_1
= 0; cntr_names_1
< size_names_1
; cntr_names_1
++) {
207 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
209 for (cntr_names_1
= 0; cntr_names_1
< size_names_1
; cntr_names_1
++) {
210 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
212 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
213 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
216 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
219 return NDR_ERR_SUCCESS
;
222 _PUBLIC_
void ndr_print_lsa_Strings(struct ndr_print
*ndr
, const char *name
, const struct lsa_Strings
*r
)
224 uint32_t cntr_names_1
;
225 ndr_print_struct(ndr
, name
, "lsa_Strings");
227 ndr_print_uint32(ndr
, "count", r
->count
);
228 ndr_print_ptr(ndr
, "names", r
->names
);
231 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
233 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
235 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
236 ndr_print_lsa_String(ndr
, "names", &r
->names
[cntr_names_1
]);
246 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_AsciiString(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AsciiString
*r
)
248 if (ndr_flags
& NDR_SCALARS
) {
249 NDR_CHECK(ndr_push_align(ndr
, 4));
250 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
251 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
252 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
254 if (ndr_flags
& NDR_BUFFERS
) {
256 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
257 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
258 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
259 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, strlen_m(r
->string
), sizeof(uint8_t), CH_DOS
));
262 return NDR_ERR_SUCCESS
;
265 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_AsciiString(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AsciiString
*r
)
267 uint32_t _ptr_string
;
268 uint32_t size_string_1
= 0;
269 uint32_t length_string_1
= 0;
270 TALLOC_CTX
*_mem_save_string_0
;
271 if (ndr_flags
& NDR_SCALARS
) {
272 NDR_CHECK(ndr_pull_align(ndr
, 4));
273 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
274 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
275 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
277 NDR_PULL_ALLOC(ndr
, r
->string
);
282 if (ndr_flags
& NDR_BUFFERS
) {
284 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
285 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
286 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
287 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string
));
288 size_string_1
= ndr_get_array_size(ndr
, &r
->string
);
289 length_string_1
= ndr_get_array_length(ndr
, &r
->string
);
290 if (length_string_1
> size_string_1
) {
291 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", size_string_1
, length_string_1
);
293 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, length_string_1
, sizeof(uint8_t), CH_DOS
));
294 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
297 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->size
));
300 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->string
, r
->length
));
303 return NDR_ERR_SUCCESS
;
306 _PUBLIC_
void ndr_print_lsa_AsciiString(struct ndr_print
*ndr
, const char *name
, const struct lsa_AsciiString
*r
)
308 ndr_print_struct(ndr
, name
, "lsa_AsciiString");
310 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->string
):r
->length
);
311 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->string
):r
->size
);
312 ndr_print_ptr(ndr
, "string", r
->string
);
315 ndr_print_string(ndr
, "string", r
->string
);
321 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_AsciiStringLarge(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AsciiStringLarge
*r
)
323 if (ndr_flags
& NDR_SCALARS
) {
324 NDR_CHECK(ndr_push_align(ndr
, 4));
325 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
326 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m_term(r
->string
)));
327 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
329 if (ndr_flags
& NDR_BUFFERS
) {
331 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m_term(r
->string
)));
332 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
333 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
334 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, strlen_m(r
->string
), sizeof(uint8_t), CH_DOS
));
337 return NDR_ERR_SUCCESS
;
340 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_AsciiStringLarge(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AsciiStringLarge
*r
)
342 uint32_t _ptr_string
;
343 uint32_t size_string_1
= 0;
344 uint32_t length_string_1
= 0;
345 TALLOC_CTX
*_mem_save_string_0
;
346 if (ndr_flags
& NDR_SCALARS
) {
347 NDR_CHECK(ndr_pull_align(ndr
, 4));
348 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
349 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
350 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
352 NDR_PULL_ALLOC(ndr
, r
->string
);
357 if (ndr_flags
& NDR_BUFFERS
) {
359 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
360 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
361 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
362 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string
));
363 size_string_1
= ndr_get_array_size(ndr
, &r
->string
);
364 length_string_1
= ndr_get_array_length(ndr
, &r
->string
);
365 if (length_string_1
> size_string_1
) {
366 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", size_string_1
, length_string_1
);
368 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, length_string_1
, sizeof(uint8_t), CH_DOS
));
369 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
372 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->size
));
375 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->string
, r
->length
));
378 return NDR_ERR_SUCCESS
;
381 _PUBLIC_
void ndr_print_lsa_AsciiStringLarge(struct ndr_print
*ndr
, const char *name
, const struct lsa_AsciiStringLarge
*r
)
383 ndr_print_struct(ndr
, name
, "lsa_AsciiStringLarge");
385 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->string
):r
->length
);
386 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m_term(r
->string
):r
->size
);
387 ndr_print_ptr(ndr
, "string", r
->string
);
390 ndr_print_string(ndr
, "string", r
->string
);
396 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_BinaryString(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_BinaryString
*r
)
398 uint32_t cntr_array_1
;
399 if (ndr_flags
& NDR_SCALARS
) {
400 NDR_CHECK(ndr_push_align(ndr
, 4));
401 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->length
));
402 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->size
));
403 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
405 if (ndr_flags
& NDR_BUFFERS
) {
407 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
/ 2));
408 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
409 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
/ 2));
410 for (cntr_array_1
= 0; cntr_array_1
< r
->length
/ 2; cntr_array_1
++) {
411 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->array
[cntr_array_1
]));
415 return NDR_ERR_SUCCESS
;
418 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_BinaryString(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_BinaryString
*r
)
421 uint32_t size_array_1
= 0;
422 uint32_t length_array_1
= 0;
423 uint32_t cntr_array_1
;
424 TALLOC_CTX
*_mem_save_array_0
;
425 TALLOC_CTX
*_mem_save_array_1
;
426 if (ndr_flags
& NDR_SCALARS
) {
427 NDR_CHECK(ndr_pull_align(ndr
, 4));
428 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
429 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
430 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
432 NDR_PULL_ALLOC(ndr
, r
->array
);
437 if (ndr_flags
& NDR_BUFFERS
) {
439 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
440 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
441 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
442 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->array
));
443 size_array_1
= ndr_get_array_size(ndr
, &r
->array
);
444 length_array_1
= ndr_get_array_length(ndr
, &r
->array
);
445 if (length_array_1
> size_array_1
) {
446 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", size_array_1
, length_array_1
);
448 NDR_PULL_ALLOC_N(ndr
, r
->array
, size_array_1
);
449 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
450 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
451 for (cntr_array_1
= 0; cntr_array_1
< length_array_1
; cntr_array_1
++) {
452 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
454 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
455 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
458 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->size
/ 2));
461 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->array
, r
->length
/ 2));
464 return NDR_ERR_SUCCESS
;
467 _PUBLIC_
void ndr_print_lsa_BinaryString(struct ndr_print
*ndr
, const char *name
, const struct lsa_BinaryString
*r
)
469 uint32_t cntr_array_1
;
470 ndr_print_struct(ndr
, name
, "lsa_BinaryString");
472 ndr_print_uint16(ndr
, "length", r
->length
);
473 ndr_print_uint16(ndr
, "size", r
->size
);
474 ndr_print_ptr(ndr
, "array", r
->array
);
477 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->length
/ 2);
479 for (cntr_array_1
=0;cntr_array_1
<r
->length
/ 2;cntr_array_1
++) {
481 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
482 ndr_print_uint16(ndr
, "array", r
->array
[cntr_array_1
]);
492 static enum ndr_err_code
ndr_push_lsa_LUID(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_LUID
*r
)
494 if (ndr_flags
& NDR_SCALARS
) {
495 NDR_CHECK(ndr_push_align(ndr
, 4));
496 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->low
));
497 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->high
));
499 if (ndr_flags
& NDR_BUFFERS
) {
501 return NDR_ERR_SUCCESS
;
504 static enum ndr_err_code
ndr_pull_lsa_LUID(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_LUID
*r
)
506 if (ndr_flags
& NDR_SCALARS
) {
507 NDR_CHECK(ndr_pull_align(ndr
, 4));
508 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->low
));
509 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->high
));
511 if (ndr_flags
& NDR_BUFFERS
) {
513 return NDR_ERR_SUCCESS
;
516 _PUBLIC_
void ndr_print_lsa_LUID(struct ndr_print
*ndr
, const char *name
, const struct lsa_LUID
*r
)
518 ndr_print_struct(ndr
, name
, "lsa_LUID");
520 ndr_print_uint32(ndr
, "low", r
->low
);
521 ndr_print_uint32(ndr
, "high", r
->high
);
525 static enum ndr_err_code
ndr_push_lsa_PrivEntry(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_PrivEntry
*r
)
527 if (ndr_flags
& NDR_SCALARS
) {
528 NDR_CHECK(ndr_push_align(ndr
, 4));
529 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
530 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, &r
->luid
));
532 if (ndr_flags
& NDR_BUFFERS
) {
533 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
535 return NDR_ERR_SUCCESS
;
538 static enum ndr_err_code
ndr_pull_lsa_PrivEntry(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_PrivEntry
*r
)
540 if (ndr_flags
& NDR_SCALARS
) {
541 NDR_CHECK(ndr_pull_align(ndr
, 4));
542 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
543 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, &r
->luid
));
545 if (ndr_flags
& NDR_BUFFERS
) {
546 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
548 return NDR_ERR_SUCCESS
;
551 _PUBLIC_
void ndr_print_lsa_PrivEntry(struct ndr_print
*ndr
, const char *name
, const struct lsa_PrivEntry
*r
)
553 ndr_print_struct(ndr
, name
, "lsa_PrivEntry");
555 ndr_print_lsa_StringLarge(ndr
, "name", &r
->name
);
556 ndr_print_lsa_LUID(ndr
, "luid", &r
->luid
);
560 static enum ndr_err_code
ndr_push_lsa_PrivArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_PrivArray
*r
)
562 uint32_t cntr_privs_1
;
563 if (ndr_flags
& NDR_SCALARS
) {
564 NDR_CHECK(ndr_push_align(ndr
, 4));
565 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
566 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->privs
));
568 if (ndr_flags
& NDR_BUFFERS
) {
570 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
571 for (cntr_privs_1
= 0; cntr_privs_1
< r
->count
; cntr_privs_1
++) {
572 NDR_CHECK(ndr_push_lsa_PrivEntry(ndr
, NDR_SCALARS
, &r
->privs
[cntr_privs_1
]));
574 for (cntr_privs_1
= 0; cntr_privs_1
< r
->count
; cntr_privs_1
++) {
575 NDR_CHECK(ndr_push_lsa_PrivEntry(ndr
, NDR_BUFFERS
, &r
->privs
[cntr_privs_1
]));
579 return NDR_ERR_SUCCESS
;
582 static enum ndr_err_code
ndr_pull_lsa_PrivArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_PrivArray
*r
)
585 uint32_t size_privs_1
= 0;
586 uint32_t cntr_privs_1
;
587 TALLOC_CTX
*_mem_save_privs_0
;
588 TALLOC_CTX
*_mem_save_privs_1
;
589 if (ndr_flags
& NDR_SCALARS
) {
590 NDR_CHECK(ndr_pull_align(ndr
, 4));
591 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
592 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_privs
));
594 NDR_PULL_ALLOC(ndr
, r
->privs
);
599 if (ndr_flags
& NDR_BUFFERS
) {
601 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
602 NDR_PULL_SET_MEM_CTX(ndr
, r
->privs
, 0);
603 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->privs
));
604 size_privs_1
= ndr_get_array_size(ndr
, &r
->privs
);
605 NDR_PULL_ALLOC_N(ndr
, r
->privs
, size_privs_1
);
606 _mem_save_privs_1
= NDR_PULL_GET_MEM_CTX(ndr
);
607 NDR_PULL_SET_MEM_CTX(ndr
, r
->privs
, 0);
608 for (cntr_privs_1
= 0; cntr_privs_1
< size_privs_1
; cntr_privs_1
++) {
609 NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr
, NDR_SCALARS
, &r
->privs
[cntr_privs_1
]));
611 for (cntr_privs_1
= 0; cntr_privs_1
< size_privs_1
; cntr_privs_1
++) {
612 NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr
, NDR_BUFFERS
, &r
->privs
[cntr_privs_1
]));
614 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_1
, 0);
615 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, 0);
618 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->privs
, r
->count
));
621 return NDR_ERR_SUCCESS
;
624 _PUBLIC_
void ndr_print_lsa_PrivArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_PrivArray
*r
)
626 uint32_t cntr_privs_1
;
627 ndr_print_struct(ndr
, name
, "lsa_PrivArray");
629 ndr_print_uint32(ndr
, "count", r
->count
);
630 ndr_print_ptr(ndr
, "privs", r
->privs
);
633 ndr
->print(ndr
, "%s: ARRAY(%d)", "privs", (int)r
->count
);
635 for (cntr_privs_1
=0;cntr_privs_1
<r
->count
;cntr_privs_1
++) {
637 if (asprintf(&idx_1
, "[%d]", cntr_privs_1
) != -1) {
638 ndr_print_lsa_PrivEntry(ndr
, "privs", &r
->privs
[cntr_privs_1
]);
648 static enum ndr_err_code
ndr_push_lsa_QosInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_QosInfo
*r
)
650 if (ndr_flags
& NDR_SCALARS
) {
651 NDR_CHECK(ndr_push_align(ndr
, 4));
652 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->len
));
653 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->impersonation_level
));
654 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->context_mode
));
655 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->effective_only
));
657 if (ndr_flags
& NDR_BUFFERS
) {
659 return NDR_ERR_SUCCESS
;
662 static enum ndr_err_code
ndr_pull_lsa_QosInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_QosInfo
*r
)
664 if (ndr_flags
& NDR_SCALARS
) {
665 NDR_CHECK(ndr_pull_align(ndr
, 4));
666 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->len
));
667 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->impersonation_level
));
668 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->context_mode
));
669 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->effective_only
));
671 if (ndr_flags
& NDR_BUFFERS
) {
673 return NDR_ERR_SUCCESS
;
676 _PUBLIC_
void ndr_print_lsa_QosInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_QosInfo
*r
)
678 ndr_print_struct(ndr
, name
, "lsa_QosInfo");
680 ndr_print_uint32(ndr
, "len", r
->len
);
681 ndr_print_uint16(ndr
, "impersonation_level", r
->impersonation_level
);
682 ndr_print_uint8(ndr
, "context_mode", r
->context_mode
);
683 ndr_print_uint8(ndr
, "effective_only", r
->effective_only
);
687 static enum ndr_err_code
ndr_push_lsa_ObjectAttribute(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ObjectAttribute
*r
)
689 if (ndr_flags
& NDR_SCALARS
) {
690 NDR_CHECK(ndr_push_align(ndr
, 4));
691 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->len
));
692 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->root_dir
));
693 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->object_name
));
694 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->attributes
));
695 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sec_desc
));
696 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sec_qos
));
698 if (ndr_flags
& NDR_BUFFERS
) {
700 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, *r
->root_dir
));
702 if (r
->object_name
) {
703 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_name
, CH_UTF16
)));
704 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
705 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_name
, CH_UTF16
)));
706 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->object_name
, ndr_charset_length(r
->object_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
709 NDR_CHECK(ndr_push_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sec_desc
));
712 NDR_CHECK(ndr_push_lsa_QosInfo(ndr
, NDR_SCALARS
, r
->sec_qos
));
715 return NDR_ERR_SUCCESS
;
718 static enum ndr_err_code
ndr_pull_lsa_ObjectAttribute(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ObjectAttribute
*r
)
720 uint32_t _ptr_root_dir
;
721 TALLOC_CTX
*_mem_save_root_dir_0
;
722 uint32_t _ptr_object_name
;
723 uint32_t size_object_name_1
= 0;
724 uint32_t length_object_name_1
= 0;
725 TALLOC_CTX
*_mem_save_object_name_0
;
726 uint32_t _ptr_sec_desc
;
727 TALLOC_CTX
*_mem_save_sec_desc_0
;
728 uint32_t _ptr_sec_qos
;
729 TALLOC_CTX
*_mem_save_sec_qos_0
;
730 if (ndr_flags
& NDR_SCALARS
) {
731 NDR_CHECK(ndr_pull_align(ndr
, 4));
732 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->len
));
733 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_root_dir
));
735 NDR_PULL_ALLOC(ndr
, r
->root_dir
);
739 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_object_name
));
740 if (_ptr_object_name
) {
741 NDR_PULL_ALLOC(ndr
, r
->object_name
);
743 r
->object_name
= NULL
;
745 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->attributes
));
746 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sec_desc
));
748 NDR_PULL_ALLOC(ndr
, r
->sec_desc
);
752 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sec_qos
));
754 NDR_PULL_ALLOC(ndr
, r
->sec_qos
);
759 if (ndr_flags
& NDR_BUFFERS
) {
761 _mem_save_root_dir_0
= NDR_PULL_GET_MEM_CTX(ndr
);
762 NDR_PULL_SET_MEM_CTX(ndr
, r
->root_dir
, 0);
763 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, r
->root_dir
));
764 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_root_dir_0
, 0);
766 if (r
->object_name
) {
767 _mem_save_object_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
768 NDR_PULL_SET_MEM_CTX(ndr
, r
->object_name
, 0);
769 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->object_name
));
770 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->object_name
));
771 size_object_name_1
= ndr_get_array_size(ndr
, &r
->object_name
);
772 length_object_name_1
= ndr_get_array_length(ndr
, &r
->object_name
);
773 if (length_object_name_1
> size_object_name_1
) {
774 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", size_object_name_1
, length_object_name_1
);
776 NDR_CHECK(ndr_check_string_terminator(ndr
, length_object_name_1
, sizeof(uint16_t)));
777 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->object_name
, length_object_name_1
, sizeof(uint16_t), CH_UTF16
));
778 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_object_name_0
, 0);
781 _mem_save_sec_desc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
782 NDR_PULL_SET_MEM_CTX(ndr
, r
->sec_desc
, 0);
783 NDR_CHECK(ndr_pull_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sec_desc
));
784 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_desc_0
, 0);
787 _mem_save_sec_qos_0
= NDR_PULL_GET_MEM_CTX(ndr
);
788 NDR_PULL_SET_MEM_CTX(ndr
, r
->sec_qos
, 0);
789 NDR_CHECK(ndr_pull_lsa_QosInfo(ndr
, NDR_SCALARS
, r
->sec_qos
));
790 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_qos_0
, 0);
793 return NDR_ERR_SUCCESS
;
796 _PUBLIC_
void ndr_print_lsa_ObjectAttribute(struct ndr_print
*ndr
, const char *name
, const struct lsa_ObjectAttribute
*r
)
798 ndr_print_struct(ndr
, name
, "lsa_ObjectAttribute");
800 ndr_print_uint32(ndr
, "len", r
->len
);
801 ndr_print_ptr(ndr
, "root_dir", r
->root_dir
);
804 ndr_print_uint8(ndr
, "root_dir", *r
->root_dir
);
807 ndr_print_ptr(ndr
, "object_name", r
->object_name
);
809 if (r
->object_name
) {
810 ndr_print_string(ndr
, "object_name", r
->object_name
);
813 ndr_print_uint32(ndr
, "attributes", r
->attributes
);
814 ndr_print_ptr(ndr
, "sec_desc", r
->sec_desc
);
817 ndr_print_security_descriptor(ndr
, "sec_desc", r
->sec_desc
);
820 ndr_print_ptr(ndr
, "sec_qos", r
->sec_qos
);
823 ndr_print_lsa_QosInfo(ndr
, "sec_qos", r
->sec_qos
);
829 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_PolicyAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
831 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
832 return NDR_ERR_SUCCESS
;
835 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_PolicyAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
838 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
840 return NDR_ERR_SUCCESS
;
843 _PUBLIC_
void ndr_print_lsa_PolicyAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
845 ndr_print_uint32(ndr
, name
, r
);
847 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_VIEW_LOCAL_INFORMATION", LSA_POLICY_VIEW_LOCAL_INFORMATION
, r
);
848 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_VIEW_AUDIT_INFORMATION", LSA_POLICY_VIEW_AUDIT_INFORMATION
, r
);
849 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_GET_PRIVATE_INFORMATION", LSA_POLICY_GET_PRIVATE_INFORMATION
, r
);
850 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_TRUST_ADMIN", LSA_POLICY_TRUST_ADMIN
, r
);
851 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_CREATE_ACCOUNT", LSA_POLICY_CREATE_ACCOUNT
, r
);
852 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_CREATE_SECRET", LSA_POLICY_CREATE_SECRET
, r
);
853 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_CREATE_PRIVILEGE", LSA_POLICY_CREATE_PRIVILEGE
, r
);
854 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS", LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS
, r
);
855 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_SET_AUDIT_REQUIREMENTS", LSA_POLICY_SET_AUDIT_REQUIREMENTS
, r
);
856 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_AUDIT_LOG_ADMIN", LSA_POLICY_AUDIT_LOG_ADMIN
, r
);
857 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_SERVER_ADMIN", LSA_POLICY_SERVER_ADMIN
, r
);
858 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_LOOKUP_NAMES", LSA_POLICY_LOOKUP_NAMES
, r
);
859 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_NOTIFICATION", LSA_POLICY_NOTIFICATION
, r
);
863 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_AccountAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
865 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
866 return NDR_ERR_SUCCESS
;
869 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_AccountAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
872 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
874 return NDR_ERR_SUCCESS
;
877 _PUBLIC_
void ndr_print_lsa_AccountAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
879 ndr_print_uint32(ndr
, name
, r
);
881 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_ACCOUNT_VIEW", LSA_ACCOUNT_VIEW
, r
);
882 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_PRIVILEGES", LSA_ACCOUNT_ADJUST_PRIVILEGES
, r
);
883 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_QUOTAS", LSA_ACCOUNT_ADJUST_QUOTAS
, r
);
884 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS", LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS
, r
);
888 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SecretAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
890 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
891 return NDR_ERR_SUCCESS
;
894 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SecretAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
897 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
899 return NDR_ERR_SUCCESS
;
902 _PUBLIC_
void ndr_print_lsa_SecretAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
904 ndr_print_uint32(ndr
, name
, r
);
906 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_SECRET_SET_VALUE", LSA_SECRET_SET_VALUE
, r
);
907 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_SECRET_QUERY_VALUE", LSA_SECRET_QUERY_VALUE
, r
);
911 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustedAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
913 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
914 return NDR_ERR_SUCCESS
;
917 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustedAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
920 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
922 return NDR_ERR_SUCCESS
;
925 _PUBLIC_
void ndr_print_lsa_TrustedAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
927 ndr_print_uint32(ndr
, name
, r
);
929 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_QUERY_DOMAIN_NAME", LSA_TRUSTED_QUERY_DOMAIN_NAME
, r
);
930 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_QUERY_CONTROLLERS", LSA_TRUSTED_QUERY_CONTROLLERS
, r
);
931 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_SET_CONTROLLERS", LSA_TRUSTED_SET_CONTROLLERS
, r
);
932 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_QUERY_POSIX", LSA_TRUSTED_QUERY_POSIX
, r
);
933 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_SET_POSIX", LSA_TRUSTED_SET_POSIX
, r
);
934 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_SET_AUTH", LSA_TRUSTED_SET_AUTH
, r
);
935 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_QUERY_AUTH", LSA_TRUSTED_QUERY_AUTH
, r
);
939 static enum ndr_err_code
ndr_push_lsa_AuditLogInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditLogInfo
*r
)
941 if (ndr_flags
& NDR_SCALARS
) {
942 NDR_CHECK(ndr_push_align(ndr
, 8));
943 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->percent_full
));
944 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->maximum_log_size
));
945 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->retention_time
));
946 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->shutdown_in_progress
));
947 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->time_to_shutdown
));
948 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->next_audit_record
));
950 if (ndr_flags
& NDR_BUFFERS
) {
952 return NDR_ERR_SUCCESS
;
955 static enum ndr_err_code
ndr_pull_lsa_AuditLogInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditLogInfo
*r
)
957 if (ndr_flags
& NDR_SCALARS
) {
958 NDR_CHECK(ndr_pull_align(ndr
, 8));
959 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->percent_full
));
960 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->maximum_log_size
));
961 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->retention_time
));
962 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->shutdown_in_progress
));
963 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->time_to_shutdown
));
964 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->next_audit_record
));
966 if (ndr_flags
& NDR_BUFFERS
) {
968 return NDR_ERR_SUCCESS
;
971 _PUBLIC_
void ndr_print_lsa_AuditLogInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditLogInfo
*r
)
973 ndr_print_struct(ndr
, name
, "lsa_AuditLogInfo");
975 ndr_print_uint32(ndr
, "percent_full", r
->percent_full
);
976 ndr_print_uint32(ndr
, "maximum_log_size", r
->maximum_log_size
);
977 ndr_print_hyper(ndr
, "retention_time", r
->retention_time
);
978 ndr_print_uint8(ndr
, "shutdown_in_progress", r
->shutdown_in_progress
);
979 ndr_print_hyper(ndr
, "time_to_shutdown", r
->time_to_shutdown
);
980 ndr_print_uint32(ndr
, "next_audit_record", r
->next_audit_record
);
984 static enum ndr_err_code
ndr_push_lsa_PolicyAuditPolicy(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_PolicyAuditPolicy r
)
986 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
987 return NDR_ERR_SUCCESS
;
990 static enum ndr_err_code
ndr_pull_lsa_PolicyAuditPolicy(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_PolicyAuditPolicy
*r
)
993 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
995 return NDR_ERR_SUCCESS
;
998 _PUBLIC_
void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print
*ndr
, const char *name
, enum lsa_PolicyAuditPolicy r
)
1000 const char *val
= NULL
;
1003 case LSA_AUDIT_POLICY_NONE
: val
= "LSA_AUDIT_POLICY_NONE"; break;
1004 case LSA_AUDIT_POLICY_SUCCESS
: val
= "LSA_AUDIT_POLICY_SUCCESS"; break;
1005 case LSA_AUDIT_POLICY_FAILURE
: val
= "LSA_AUDIT_POLICY_FAILURE"; break;
1006 case LSA_AUDIT_POLICY_ALL
: val
= "LSA_AUDIT_POLICY_ALL"; break;
1007 case LSA_AUDIT_POLICY_CLEAR
: val
= "LSA_AUDIT_POLICY_CLEAR"; break;
1009 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1012 static enum ndr_err_code
ndr_push_lsa_AuditEventsInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditEventsInfo
*r
)
1014 uint32_t cntr_settings_1
;
1015 if (ndr_flags
& NDR_SCALARS
) {
1016 NDR_CHECK(ndr_push_align(ndr
, 4));
1017 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->auditing_mode
));
1018 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->settings
));
1019 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1021 if (ndr_flags
& NDR_BUFFERS
) {
1023 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1024 for (cntr_settings_1
= 0; cntr_settings_1
< r
->count
; cntr_settings_1
++) {
1025 NDR_CHECK(ndr_push_lsa_PolicyAuditPolicy(ndr
, NDR_SCALARS
, r
->settings
[cntr_settings_1
]));
1029 return NDR_ERR_SUCCESS
;
1032 static enum ndr_err_code
ndr_pull_lsa_AuditEventsInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditEventsInfo
*r
)
1034 uint32_t _ptr_settings
;
1035 uint32_t size_settings_1
= 0;
1036 uint32_t cntr_settings_1
;
1037 TALLOC_CTX
*_mem_save_settings_0
;
1038 TALLOC_CTX
*_mem_save_settings_1
;
1039 if (ndr_flags
& NDR_SCALARS
) {
1040 NDR_CHECK(ndr_pull_align(ndr
, 4));
1041 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->auditing_mode
));
1042 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_settings
));
1043 if (_ptr_settings
) {
1044 NDR_PULL_ALLOC(ndr
, r
->settings
);
1048 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
1050 if (ndr_flags
& NDR_BUFFERS
) {
1052 _mem_save_settings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1053 NDR_PULL_SET_MEM_CTX(ndr
, r
->settings
, 0);
1054 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->settings
));
1055 size_settings_1
= ndr_get_array_size(ndr
, &r
->settings
);
1056 NDR_PULL_ALLOC_N(ndr
, r
->settings
, size_settings_1
);
1057 _mem_save_settings_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1058 NDR_PULL_SET_MEM_CTX(ndr
, r
->settings
, 0);
1059 for (cntr_settings_1
= 0; cntr_settings_1
< size_settings_1
; cntr_settings_1
++) {
1060 NDR_CHECK(ndr_pull_lsa_PolicyAuditPolicy(ndr
, NDR_SCALARS
, &r
->settings
[cntr_settings_1
]));
1062 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_settings_1
, 0);
1063 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_settings_0
, 0);
1066 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->settings
, r
->count
));
1069 return NDR_ERR_SUCCESS
;
1072 _PUBLIC_
void ndr_print_lsa_AuditEventsInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditEventsInfo
*r
)
1074 uint32_t cntr_settings_1
;
1075 ndr_print_struct(ndr
, name
, "lsa_AuditEventsInfo");
1077 ndr_print_uint32(ndr
, "auditing_mode", r
->auditing_mode
);
1078 ndr_print_ptr(ndr
, "settings", r
->settings
);
1081 ndr
->print(ndr
, "%s: ARRAY(%d)", "settings", (int)r
->count
);
1083 for (cntr_settings_1
=0;cntr_settings_1
<r
->count
;cntr_settings_1
++) {
1085 if (asprintf(&idx_1
, "[%d]", cntr_settings_1
) != -1) {
1086 ndr_print_lsa_PolicyAuditPolicy(ndr
, "settings", r
->settings
[cntr_settings_1
]);
1093 ndr_print_uint32(ndr
, "count", r
->count
);
1097 static enum ndr_err_code
ndr_push_lsa_DomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainInfo
*r
)
1099 if (ndr_flags
& NDR_SCALARS
) {
1100 NDR_CHECK(ndr_push_align(ndr
, 4));
1101 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1102 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
1104 if (ndr_flags
& NDR_BUFFERS
) {
1105 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1107 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1110 return NDR_ERR_SUCCESS
;
1113 static enum ndr_err_code
ndr_pull_lsa_DomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainInfo
*r
)
1116 TALLOC_CTX
*_mem_save_sid_0
;
1117 if (ndr_flags
& NDR_SCALARS
) {
1118 NDR_CHECK(ndr_pull_align(ndr
, 4));
1119 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1120 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
1122 NDR_PULL_ALLOC(ndr
, r
->sid
);
1127 if (ndr_flags
& NDR_BUFFERS
) {
1128 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1130 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1131 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
1132 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1133 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
1136 return NDR_ERR_SUCCESS
;
1139 _PUBLIC_
void ndr_print_lsa_DomainInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainInfo
*r
)
1141 ndr_print_struct(ndr
, name
, "lsa_DomainInfo");
1143 ndr_print_lsa_StringLarge(ndr
, "name", &r
->name
);
1144 ndr_print_ptr(ndr
, "sid", r
->sid
);
1147 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
1153 static enum ndr_err_code
ndr_push_lsa_PDAccountInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_PDAccountInfo
*r
)
1155 if (ndr_flags
& NDR_SCALARS
) {
1156 NDR_CHECK(ndr_push_align(ndr
, 4));
1157 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1159 if (ndr_flags
& NDR_BUFFERS
) {
1160 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1162 return NDR_ERR_SUCCESS
;
1165 static enum ndr_err_code
ndr_pull_lsa_PDAccountInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_PDAccountInfo
*r
)
1167 if (ndr_flags
& NDR_SCALARS
) {
1168 NDR_CHECK(ndr_pull_align(ndr
, 4));
1169 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1171 if (ndr_flags
& NDR_BUFFERS
) {
1172 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1174 return NDR_ERR_SUCCESS
;
1177 _PUBLIC_
void ndr_print_lsa_PDAccountInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_PDAccountInfo
*r
)
1179 ndr_print_struct(ndr
, name
, "lsa_PDAccountInfo");
1181 ndr_print_lsa_String(ndr
, "name", &r
->name
);
1185 static enum ndr_err_code
ndr_push_lsa_Role(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_Role r
)
1187 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
1188 return NDR_ERR_SUCCESS
;
1191 static enum ndr_err_code
ndr_pull_lsa_Role(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_Role
*r
)
1194 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
1196 return NDR_ERR_SUCCESS
;
1199 _PUBLIC_
void ndr_print_lsa_Role(struct ndr_print
*ndr
, const char *name
, enum lsa_Role r
)
1201 const char *val
= NULL
;
1204 case LSA_ROLE_BACKUP
: val
= "LSA_ROLE_BACKUP"; break;
1205 case LSA_ROLE_PRIMARY
: val
= "LSA_ROLE_PRIMARY"; break;
1207 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1210 static enum ndr_err_code
ndr_push_lsa_ServerRole(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ServerRole
*r
)
1212 if (ndr_flags
& NDR_SCALARS
) {
1213 NDR_CHECK(ndr_push_align(ndr
, 4));
1214 NDR_CHECK(ndr_push_lsa_Role(ndr
, NDR_SCALARS
, r
->role
));
1216 if (ndr_flags
& NDR_BUFFERS
) {
1218 return NDR_ERR_SUCCESS
;
1221 static enum ndr_err_code
ndr_pull_lsa_ServerRole(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ServerRole
*r
)
1223 if (ndr_flags
& NDR_SCALARS
) {
1224 NDR_CHECK(ndr_pull_align(ndr
, 4));
1225 NDR_CHECK(ndr_pull_lsa_Role(ndr
, NDR_SCALARS
, &r
->role
));
1227 if (ndr_flags
& NDR_BUFFERS
) {
1229 return NDR_ERR_SUCCESS
;
1232 _PUBLIC_
void ndr_print_lsa_ServerRole(struct ndr_print
*ndr
, const char *name
, const struct lsa_ServerRole
*r
)
1234 ndr_print_struct(ndr
, name
, "lsa_ServerRole");
1236 ndr_print_lsa_Role(ndr
, "role", r
->role
);
1240 static enum ndr_err_code
ndr_push_lsa_ReplicaSourceInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ReplicaSourceInfo
*r
)
1242 if (ndr_flags
& NDR_SCALARS
) {
1243 NDR_CHECK(ndr_push_align(ndr
, 4));
1244 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->source
));
1245 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account
));
1247 if (ndr_flags
& NDR_BUFFERS
) {
1248 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->source
));
1249 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account
));
1251 return NDR_ERR_SUCCESS
;
1254 static enum ndr_err_code
ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ReplicaSourceInfo
*r
)
1256 if (ndr_flags
& NDR_SCALARS
) {
1257 NDR_CHECK(ndr_pull_align(ndr
, 4));
1258 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->source
));
1259 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account
));
1261 if (ndr_flags
& NDR_BUFFERS
) {
1262 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->source
));
1263 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account
));
1265 return NDR_ERR_SUCCESS
;
1268 _PUBLIC_
void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_ReplicaSourceInfo
*r
)
1270 ndr_print_struct(ndr
, name
, "lsa_ReplicaSourceInfo");
1272 ndr_print_lsa_String(ndr
, "source", &r
->source
);
1273 ndr_print_lsa_String(ndr
, "account", &r
->account
);
1277 static enum ndr_err_code
ndr_push_lsa_DefaultQuotaInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DefaultQuotaInfo
*r
)
1279 if (ndr_flags
& NDR_SCALARS
) {
1280 NDR_CHECK(ndr_push_align(ndr
, 8));
1281 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->paged_pool
));
1282 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->non_paged_pool
));
1283 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->min_wss
));
1284 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_wss
));
1285 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pagefile
));
1286 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown
));
1288 if (ndr_flags
& NDR_BUFFERS
) {
1290 return NDR_ERR_SUCCESS
;
1293 static enum ndr_err_code
ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DefaultQuotaInfo
*r
)
1295 if (ndr_flags
& NDR_SCALARS
) {
1296 NDR_CHECK(ndr_pull_align(ndr
, 8));
1297 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->paged_pool
));
1298 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->non_paged_pool
));
1299 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->min_wss
));
1300 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_wss
));
1301 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pagefile
));
1302 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown
));
1304 if (ndr_flags
& NDR_BUFFERS
) {
1306 return NDR_ERR_SUCCESS
;
1309 _PUBLIC_
void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_DefaultQuotaInfo
*r
)
1311 ndr_print_struct(ndr
, name
, "lsa_DefaultQuotaInfo");
1313 ndr_print_uint32(ndr
, "paged_pool", r
->paged_pool
);
1314 ndr_print_uint32(ndr
, "non_paged_pool", r
->non_paged_pool
);
1315 ndr_print_uint32(ndr
, "min_wss", r
->min_wss
);
1316 ndr_print_uint32(ndr
, "max_wss", r
->max_wss
);
1317 ndr_print_uint32(ndr
, "pagefile", r
->pagefile
);
1318 ndr_print_hyper(ndr
, "unknown", r
->unknown
);
1322 static enum ndr_err_code
ndr_push_lsa_ModificationInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ModificationInfo
*r
)
1324 if (ndr_flags
& NDR_SCALARS
) {
1325 NDR_CHECK(ndr_push_align(ndr
, 8));
1326 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->modified_id
));
1327 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->db_create_time
));
1329 if (ndr_flags
& NDR_BUFFERS
) {
1331 return NDR_ERR_SUCCESS
;
1334 static enum ndr_err_code
ndr_pull_lsa_ModificationInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ModificationInfo
*r
)
1336 if (ndr_flags
& NDR_SCALARS
) {
1337 NDR_CHECK(ndr_pull_align(ndr
, 8));
1338 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->modified_id
));
1339 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, &r
->db_create_time
));
1341 if (ndr_flags
& NDR_BUFFERS
) {
1343 return NDR_ERR_SUCCESS
;
1346 _PUBLIC_
void ndr_print_lsa_ModificationInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_ModificationInfo
*r
)
1348 ndr_print_struct(ndr
, name
, "lsa_ModificationInfo");
1350 ndr_print_hyper(ndr
, "modified_id", r
->modified_id
);
1351 ndr_print_NTTIME_hyper(ndr
, "db_create_time", r
->db_create_time
);
1355 static enum ndr_err_code
ndr_push_lsa_AuditFullSetInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditFullSetInfo
*r
)
1357 if (ndr_flags
& NDR_SCALARS
) {
1358 NDR_CHECK(ndr_push_align(ndr
, 1));
1359 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->shutdown_on_full
));
1361 if (ndr_flags
& NDR_BUFFERS
) {
1363 return NDR_ERR_SUCCESS
;
1366 static enum ndr_err_code
ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditFullSetInfo
*r
)
1368 if (ndr_flags
& NDR_SCALARS
) {
1369 NDR_CHECK(ndr_pull_align(ndr
, 1));
1370 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->shutdown_on_full
));
1372 if (ndr_flags
& NDR_BUFFERS
) {
1374 return NDR_ERR_SUCCESS
;
1377 _PUBLIC_
void ndr_print_lsa_AuditFullSetInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditFullSetInfo
*r
)
1379 ndr_print_struct(ndr
, name
, "lsa_AuditFullSetInfo");
1381 ndr_print_uint8(ndr
, "shutdown_on_full", r
->shutdown_on_full
);
1385 static enum ndr_err_code
ndr_push_lsa_AuditFullQueryInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditFullQueryInfo
*r
)
1387 if (ndr_flags
& NDR_SCALARS
) {
1388 NDR_CHECK(ndr_push_align(ndr
, 1));
1389 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->shutdown_on_full
));
1390 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->log_is_full
));
1392 if (ndr_flags
& NDR_BUFFERS
) {
1394 return NDR_ERR_SUCCESS
;
1397 static enum ndr_err_code
ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditFullQueryInfo
*r
)
1399 if (ndr_flags
& NDR_SCALARS
) {
1400 NDR_CHECK(ndr_pull_align(ndr
, 1));
1401 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->shutdown_on_full
));
1402 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->log_is_full
));
1404 if (ndr_flags
& NDR_BUFFERS
) {
1406 return NDR_ERR_SUCCESS
;
1409 _PUBLIC_
void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditFullQueryInfo
*r
)
1411 ndr_print_struct(ndr
, name
, "lsa_AuditFullQueryInfo");
1413 ndr_print_uint8(ndr
, "shutdown_on_full", r
->shutdown_on_full
);
1414 ndr_print_uint8(ndr
, "log_is_full", r
->log_is_full
);
1418 static enum ndr_err_code
ndr_push_lsa_DnsDomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DnsDomainInfo
*r
)
1420 if (ndr_flags
& NDR_SCALARS
) {
1421 NDR_CHECK(ndr_push_align(ndr
, 4));
1422 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1423 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain
));
1424 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_forest
));
1425 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->domain_guid
));
1426 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
1428 if (ndr_flags
& NDR_BUFFERS
) {
1429 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1430 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain
));
1431 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_forest
));
1433 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1436 return NDR_ERR_SUCCESS
;
1439 static enum ndr_err_code
ndr_pull_lsa_DnsDomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DnsDomainInfo
*r
)
1442 TALLOC_CTX
*_mem_save_sid_0
;
1443 if (ndr_flags
& NDR_SCALARS
) {
1444 NDR_CHECK(ndr_pull_align(ndr
, 4));
1445 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1446 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain
));
1447 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_forest
));
1448 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->domain_guid
));
1449 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
1451 NDR_PULL_ALLOC(ndr
, r
->sid
);
1456 if (ndr_flags
& NDR_BUFFERS
) {
1457 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1458 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain
));
1459 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_forest
));
1461 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1462 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
1463 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1464 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
1467 return NDR_ERR_SUCCESS
;
1470 _PUBLIC_
void ndr_print_lsa_DnsDomainInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_DnsDomainInfo
*r
)
1472 ndr_print_struct(ndr
, name
, "lsa_DnsDomainInfo");
1474 ndr_print_lsa_StringLarge(ndr
, "name", &r
->name
);
1475 ndr_print_lsa_StringLarge(ndr
, "dns_domain", &r
->dns_domain
);
1476 ndr_print_lsa_StringLarge(ndr
, "dns_forest", &r
->dns_forest
);
1477 ndr_print_GUID(ndr
, "domain_guid", &r
->domain_guid
);
1478 ndr_print_ptr(ndr
, "sid", r
->sid
);
1481 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
1487 static enum ndr_err_code
ndr_push_lsa_PolicyInfo(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_PolicyInfo r
)
1489 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
1490 return NDR_ERR_SUCCESS
;
1493 static enum ndr_err_code
ndr_pull_lsa_PolicyInfo(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_PolicyInfo
*r
)
1496 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
1498 return NDR_ERR_SUCCESS
;
1501 _PUBLIC_
void ndr_print_lsa_PolicyInfo(struct ndr_print
*ndr
, const char *name
, enum lsa_PolicyInfo r
)
1503 const char *val
= NULL
;
1506 case LSA_POLICY_INFO_AUDIT_LOG
: val
= "LSA_POLICY_INFO_AUDIT_LOG"; break;
1507 case LSA_POLICY_INFO_AUDIT_EVENTS
: val
= "LSA_POLICY_INFO_AUDIT_EVENTS"; break;
1508 case LSA_POLICY_INFO_DOMAIN
: val
= "LSA_POLICY_INFO_DOMAIN"; break;
1509 case LSA_POLICY_INFO_PD
: val
= "LSA_POLICY_INFO_PD"; break;
1510 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
: val
= "LSA_POLICY_INFO_ACCOUNT_DOMAIN"; break;
1511 case LSA_POLICY_INFO_ROLE
: val
= "LSA_POLICY_INFO_ROLE"; break;
1512 case LSA_POLICY_INFO_REPLICA
: val
= "LSA_POLICY_INFO_REPLICA"; break;
1513 case LSA_POLICY_INFO_QUOTA
: val
= "LSA_POLICY_INFO_QUOTA"; break;
1514 case LSA_POLICY_INFO_MOD
: val
= "LSA_POLICY_INFO_MOD"; break;
1515 case LSA_POLICY_INFO_AUDIT_FULL_SET
: val
= "LSA_POLICY_INFO_AUDIT_FULL_SET"; break;
1516 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
: val
= "LSA_POLICY_INFO_AUDIT_FULL_QUERY"; break;
1517 case LSA_POLICY_INFO_DNS
: val
= "LSA_POLICY_INFO_DNS"; break;
1518 case LSA_POLICY_INFO_DNS_INT
: val
= "LSA_POLICY_INFO_DNS_INT"; break;
1519 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
: val
= "LSA_POLICY_INFO_L_ACCOUNT_DOMAIN"; break;
1521 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1524 static enum ndr_err_code
ndr_push_lsa_PolicyInformation(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_PolicyInformation
*r
)
1526 if (ndr_flags
& NDR_SCALARS
) {
1527 int level
= ndr_push_get_switch_value(ndr
, r
);
1528 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
1530 case LSA_POLICY_INFO_AUDIT_LOG
: {
1531 NDR_CHECK(ndr_push_lsa_AuditLogInfo(ndr
, NDR_SCALARS
, &r
->audit_log
));
1534 case LSA_POLICY_INFO_AUDIT_EVENTS
: {
1535 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr
, NDR_SCALARS
, &r
->audit_events
));
1538 case LSA_POLICY_INFO_DOMAIN
: {
1539 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domain
));
1542 case LSA_POLICY_INFO_PD
: {
1543 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr
, NDR_SCALARS
, &r
->pd
));
1546 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
: {
1547 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->account_domain
));
1550 case LSA_POLICY_INFO_ROLE
: {
1551 NDR_CHECK(ndr_push_lsa_ServerRole(ndr
, NDR_SCALARS
, &r
->role
));
1554 case LSA_POLICY_INFO_REPLICA
: {
1555 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr
, NDR_SCALARS
, &r
->replica
));
1558 case LSA_POLICY_INFO_QUOTA
: {
1559 NDR_CHECK(ndr_push_lsa_DefaultQuotaInfo(ndr
, NDR_SCALARS
, &r
->quota
));
1562 case LSA_POLICY_INFO_MOD
: {
1563 NDR_CHECK(ndr_push_lsa_ModificationInfo(ndr
, NDR_SCALARS
, &r
->mod
));
1566 case LSA_POLICY_INFO_AUDIT_FULL_SET
: {
1567 NDR_CHECK(ndr_push_lsa_AuditFullSetInfo(ndr
, NDR_SCALARS
, &r
->auditfullset
));
1570 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
: {
1571 NDR_CHECK(ndr_push_lsa_AuditFullQueryInfo(ndr
, NDR_SCALARS
, &r
->auditfullquery
));
1574 case LSA_POLICY_INFO_DNS
: {
1575 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1578 case LSA_POLICY_INFO_DNS_INT
: {
1579 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1582 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
: {
1583 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->l_account_domain
));
1587 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1590 if (ndr_flags
& NDR_BUFFERS
) {
1591 int level
= ndr_push_get_switch_value(ndr
, r
);
1593 case LSA_POLICY_INFO_AUDIT_LOG
:
1596 case LSA_POLICY_INFO_AUDIT_EVENTS
:
1597 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr
, NDR_BUFFERS
, &r
->audit_events
));
1600 case LSA_POLICY_INFO_DOMAIN
:
1601 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domain
));
1604 case LSA_POLICY_INFO_PD
:
1605 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr
, NDR_BUFFERS
, &r
->pd
));
1608 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
:
1609 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->account_domain
));
1612 case LSA_POLICY_INFO_ROLE
:
1615 case LSA_POLICY_INFO_REPLICA
:
1616 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr
, NDR_BUFFERS
, &r
->replica
));
1619 case LSA_POLICY_INFO_QUOTA
:
1622 case LSA_POLICY_INFO_MOD
:
1625 case LSA_POLICY_INFO_AUDIT_FULL_SET
:
1628 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
:
1631 case LSA_POLICY_INFO_DNS
:
1632 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1635 case LSA_POLICY_INFO_DNS_INT
:
1636 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1639 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
:
1640 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->l_account_domain
));
1644 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1647 return NDR_ERR_SUCCESS
;
1650 static enum ndr_err_code
ndr_pull_lsa_PolicyInformation(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_PolicyInformation
*r
)
1654 level
= ndr_pull_get_switch_value(ndr
, r
);
1655 if (ndr_flags
& NDR_SCALARS
) {
1656 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
1657 if (_level
!= level
) {
1658 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
1661 case LSA_POLICY_INFO_AUDIT_LOG
: {
1662 NDR_CHECK(ndr_pull_lsa_AuditLogInfo(ndr
, NDR_SCALARS
, &r
->audit_log
));
1665 case LSA_POLICY_INFO_AUDIT_EVENTS
: {
1666 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr
, NDR_SCALARS
, &r
->audit_events
));
1669 case LSA_POLICY_INFO_DOMAIN
: {
1670 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domain
));
1673 case LSA_POLICY_INFO_PD
: {
1674 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr
, NDR_SCALARS
, &r
->pd
));
1677 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
: {
1678 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->account_domain
));
1681 case LSA_POLICY_INFO_ROLE
: {
1682 NDR_CHECK(ndr_pull_lsa_ServerRole(ndr
, NDR_SCALARS
, &r
->role
));
1685 case LSA_POLICY_INFO_REPLICA
: {
1686 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr
, NDR_SCALARS
, &r
->replica
));
1689 case LSA_POLICY_INFO_QUOTA
: {
1690 NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr
, NDR_SCALARS
, &r
->quota
));
1693 case LSA_POLICY_INFO_MOD
: {
1694 NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr
, NDR_SCALARS
, &r
->mod
));
1697 case LSA_POLICY_INFO_AUDIT_FULL_SET
: {
1698 NDR_CHECK(ndr_pull_lsa_AuditFullSetInfo(ndr
, NDR_SCALARS
, &r
->auditfullset
));
1701 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
: {
1702 NDR_CHECK(ndr_pull_lsa_AuditFullQueryInfo(ndr
, NDR_SCALARS
, &r
->auditfullquery
));
1705 case LSA_POLICY_INFO_DNS
: {
1706 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1709 case LSA_POLICY_INFO_DNS_INT
: {
1710 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1713 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
: {
1714 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->l_account_domain
));
1718 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1721 if (ndr_flags
& NDR_BUFFERS
) {
1723 case LSA_POLICY_INFO_AUDIT_LOG
:
1726 case LSA_POLICY_INFO_AUDIT_EVENTS
:
1727 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr
, NDR_BUFFERS
, &r
->audit_events
));
1730 case LSA_POLICY_INFO_DOMAIN
:
1731 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domain
));
1734 case LSA_POLICY_INFO_PD
:
1735 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr
, NDR_BUFFERS
, &r
->pd
));
1738 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
:
1739 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->account_domain
));
1742 case LSA_POLICY_INFO_ROLE
:
1745 case LSA_POLICY_INFO_REPLICA
:
1746 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr
, NDR_BUFFERS
, &r
->replica
));
1749 case LSA_POLICY_INFO_QUOTA
:
1752 case LSA_POLICY_INFO_MOD
:
1755 case LSA_POLICY_INFO_AUDIT_FULL_SET
:
1758 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
:
1761 case LSA_POLICY_INFO_DNS
:
1762 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1765 case LSA_POLICY_INFO_DNS_INT
:
1766 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1769 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
:
1770 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->l_account_domain
));
1774 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
1777 return NDR_ERR_SUCCESS
;
1780 _PUBLIC_
void ndr_print_lsa_PolicyInformation(struct ndr_print
*ndr
, const char *name
, const union lsa_PolicyInformation
*r
)
1783 level
= ndr_print_get_switch_value(ndr
, r
);
1784 ndr_print_union(ndr
, name
, level
, "lsa_PolicyInformation");
1786 case LSA_POLICY_INFO_AUDIT_LOG
:
1787 ndr_print_lsa_AuditLogInfo(ndr
, "audit_log", &r
->audit_log
);
1790 case LSA_POLICY_INFO_AUDIT_EVENTS
:
1791 ndr_print_lsa_AuditEventsInfo(ndr
, "audit_events", &r
->audit_events
);
1794 case LSA_POLICY_INFO_DOMAIN
:
1795 ndr_print_lsa_DomainInfo(ndr
, "domain", &r
->domain
);
1798 case LSA_POLICY_INFO_PD
:
1799 ndr_print_lsa_PDAccountInfo(ndr
, "pd", &r
->pd
);
1802 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
:
1803 ndr_print_lsa_DomainInfo(ndr
, "account_domain", &r
->account_domain
);
1806 case LSA_POLICY_INFO_ROLE
:
1807 ndr_print_lsa_ServerRole(ndr
, "role", &r
->role
);
1810 case LSA_POLICY_INFO_REPLICA
:
1811 ndr_print_lsa_ReplicaSourceInfo(ndr
, "replica", &r
->replica
);
1814 case LSA_POLICY_INFO_QUOTA
:
1815 ndr_print_lsa_DefaultQuotaInfo(ndr
, "quota", &r
->quota
);
1818 case LSA_POLICY_INFO_MOD
:
1819 ndr_print_lsa_ModificationInfo(ndr
, "mod", &r
->mod
);
1822 case LSA_POLICY_INFO_AUDIT_FULL_SET
:
1823 ndr_print_lsa_AuditFullSetInfo(ndr
, "auditfullset", &r
->auditfullset
);
1826 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
:
1827 ndr_print_lsa_AuditFullQueryInfo(ndr
, "auditfullquery", &r
->auditfullquery
);
1830 case LSA_POLICY_INFO_DNS
:
1831 ndr_print_lsa_DnsDomainInfo(ndr
, "dns", &r
->dns
);
1834 case LSA_POLICY_INFO_DNS_INT
:
1835 ndr_print_lsa_DnsDomainInfo(ndr
, "dns", &r
->dns
);
1838 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
:
1839 ndr_print_lsa_DomainInfo(ndr
, "l_account_domain", &r
->l_account_domain
);
1843 ndr_print_bad_level(ndr
, name
, level
);
1847 static enum ndr_err_code
ndr_push_lsa_SidPtr(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_SidPtr
*r
)
1849 if (ndr_flags
& NDR_SCALARS
) {
1850 NDR_CHECK(ndr_push_align(ndr
, 4));
1851 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
1853 if (ndr_flags
& NDR_BUFFERS
) {
1855 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1858 return NDR_ERR_SUCCESS
;
1861 static enum ndr_err_code
ndr_pull_lsa_SidPtr(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_SidPtr
*r
)
1864 TALLOC_CTX
*_mem_save_sid_0
;
1865 if (ndr_flags
& NDR_SCALARS
) {
1866 NDR_CHECK(ndr_pull_align(ndr
, 4));
1867 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
1869 NDR_PULL_ALLOC(ndr
, r
->sid
);
1874 if (ndr_flags
& NDR_BUFFERS
) {
1876 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1877 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
1878 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1879 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
1882 return NDR_ERR_SUCCESS
;
1885 _PUBLIC_
void ndr_print_lsa_SidPtr(struct ndr_print
*ndr
, const char *name
, const struct lsa_SidPtr
*r
)
1887 ndr_print_struct(ndr
, name
, "lsa_SidPtr");
1889 ndr_print_ptr(ndr
, "sid", r
->sid
);
1892 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
1898 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SidArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_SidArray
*r
)
1900 uint32_t cntr_sids_1
;
1901 if (ndr_flags
& NDR_SCALARS
) {
1902 NDR_CHECK(ndr_push_align(ndr
, 4));
1903 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_sids
));
1904 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
1906 if (ndr_flags
& NDR_BUFFERS
) {
1908 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_sids
));
1909 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
1910 NDR_CHECK(ndr_push_lsa_SidPtr(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
1912 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
1913 NDR_CHECK(ndr_push_lsa_SidPtr(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
1917 return NDR_ERR_SUCCESS
;
1920 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SidArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_SidArray
*r
)
1923 uint32_t size_sids_1
= 0;
1924 uint32_t cntr_sids_1
;
1925 TALLOC_CTX
*_mem_save_sids_0
;
1926 TALLOC_CTX
*_mem_save_sids_1
;
1927 if (ndr_flags
& NDR_SCALARS
) {
1928 NDR_CHECK(ndr_pull_align(ndr
, 4));
1929 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_sids
));
1930 if (r
->num_sids
> 1000) {
1931 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1933 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
1935 NDR_PULL_ALLOC(ndr
, r
->sids
);
1940 if (ndr_flags
& NDR_BUFFERS
) {
1942 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1943 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
1944 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
1945 size_sids_1
= ndr_get_array_size(ndr
, &r
->sids
);
1946 NDR_PULL_ALLOC_N(ndr
, r
->sids
, size_sids_1
);
1947 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1948 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
1949 for (cntr_sids_1
= 0; cntr_sids_1
< size_sids_1
; cntr_sids_1
++) {
1950 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
1952 for (cntr_sids_1
= 0; cntr_sids_1
< size_sids_1
; cntr_sids_1
++) {
1953 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
1955 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
1956 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
1959 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->num_sids
));
1962 return NDR_ERR_SUCCESS
;
1965 _PUBLIC_
void ndr_print_lsa_SidArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_SidArray
*r
)
1967 uint32_t cntr_sids_1
;
1968 ndr_print_struct(ndr
, name
, "lsa_SidArray");
1970 ndr_print_uint32(ndr
, "num_sids", r
->num_sids
);
1971 ndr_print_ptr(ndr
, "sids", r
->sids
);
1974 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->num_sids
);
1976 for (cntr_sids_1
=0;cntr_sids_1
<r
->num_sids
;cntr_sids_1
++) {
1978 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
1979 ndr_print_lsa_SidPtr(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
1989 static enum ndr_err_code
ndr_push_lsa_DomainList(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainList
*r
)
1991 uint32_t cntr_domains_1
;
1992 if (ndr_flags
& NDR_SCALARS
) {
1993 NDR_CHECK(ndr_push_align(ndr
, 4));
1994 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1995 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domains
));
1997 if (ndr_flags
& NDR_BUFFERS
) {
1999 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2000 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2001 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
2003 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2004 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
2008 return NDR_ERR_SUCCESS
;
2011 static enum ndr_err_code
ndr_pull_lsa_DomainList(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainList
*r
)
2013 uint32_t _ptr_domains
;
2014 uint32_t size_domains_1
= 0;
2015 uint32_t cntr_domains_1
;
2016 TALLOC_CTX
*_mem_save_domains_0
;
2017 TALLOC_CTX
*_mem_save_domains_1
;
2018 if (ndr_flags
& NDR_SCALARS
) {
2019 NDR_CHECK(ndr_pull_align(ndr
, 4));
2020 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2021 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
2023 NDR_PULL_ALLOC(ndr
, r
->domains
);
2028 if (ndr_flags
& NDR_BUFFERS
) {
2030 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2031 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
2032 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domains
));
2033 size_domains_1
= ndr_get_array_size(ndr
, &r
->domains
);
2034 NDR_PULL_ALLOC_N(ndr
, r
->domains
, size_domains_1
);
2035 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2036 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
2037 for (cntr_domains_1
= 0; cntr_domains_1
< size_domains_1
; cntr_domains_1
++) {
2038 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
2040 for (cntr_domains_1
= 0; cntr_domains_1
< size_domains_1
; cntr_domains_1
++) {
2041 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
2043 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
2044 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, 0);
2047 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->domains
, r
->count
));
2050 return NDR_ERR_SUCCESS
;
2053 _PUBLIC_
void ndr_print_lsa_DomainList(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainList
*r
)
2055 uint32_t cntr_domains_1
;
2056 ndr_print_struct(ndr
, name
, "lsa_DomainList");
2058 ndr_print_uint32(ndr
, "count", r
->count
);
2059 ndr_print_ptr(ndr
, "domains", r
->domains
);
2062 ndr
->print(ndr
, "%s: ARRAY(%d)", "domains", (int)r
->count
);
2064 for (cntr_domains_1
=0;cntr_domains_1
<r
->count
;cntr_domains_1
++) {
2066 if (asprintf(&idx_1
, "[%d]", cntr_domains_1
) != -1) {
2067 ndr_print_lsa_DomainInfo(ndr
, "domains", &r
->domains
[cntr_domains_1
]);
2077 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SidType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_SidType r
)
2079 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
2080 return NDR_ERR_SUCCESS
;
2083 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SidType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_SidType
*r
)
2086 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
2088 return NDR_ERR_SUCCESS
;
2091 _PUBLIC_
void ndr_print_lsa_SidType(struct ndr_print
*ndr
, const char *name
, enum lsa_SidType r
)
2093 const char *val
= NULL
;
2096 case SID_NAME_USE_NONE
: val
= "SID_NAME_USE_NONE"; break;
2097 case SID_NAME_USER
: val
= "SID_NAME_USER"; break;
2098 case SID_NAME_DOM_GRP
: val
= "SID_NAME_DOM_GRP"; break;
2099 case SID_NAME_DOMAIN
: val
= "SID_NAME_DOMAIN"; break;
2100 case SID_NAME_ALIAS
: val
= "SID_NAME_ALIAS"; break;
2101 case SID_NAME_WKN_GRP
: val
= "SID_NAME_WKN_GRP"; break;
2102 case SID_NAME_DELETED
: val
= "SID_NAME_DELETED"; break;
2103 case SID_NAME_INVALID
: val
= "SID_NAME_INVALID"; break;
2104 case SID_NAME_UNKNOWN
: val
= "SID_NAME_UNKNOWN"; break;
2105 case SID_NAME_COMPUTER
: val
= "SID_NAME_COMPUTER"; break;
2107 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2110 static enum ndr_err_code
ndr_push_lsa_TranslatedSid(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedSid
*r
)
2112 if (ndr_flags
& NDR_SCALARS
) {
2113 NDR_CHECK(ndr_push_align(ndr
, 4));
2114 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
2115 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
2116 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
2118 if (ndr_flags
& NDR_BUFFERS
) {
2120 return NDR_ERR_SUCCESS
;
2123 static enum ndr_err_code
ndr_pull_lsa_TranslatedSid(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedSid
*r
)
2125 if (ndr_flags
& NDR_SCALARS
) {
2126 NDR_CHECK(ndr_pull_align(ndr
, 4));
2127 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
2128 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
2129 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
2131 if (ndr_flags
& NDR_BUFFERS
) {
2133 return NDR_ERR_SUCCESS
;
2136 _PUBLIC_
void ndr_print_lsa_TranslatedSid(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedSid
*r
)
2138 ndr_print_struct(ndr
, name
, "lsa_TranslatedSid");
2140 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
2141 ndr_print_uint32(ndr
, "rid", r
->rid
);
2142 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
2146 static enum ndr_err_code
ndr_push_lsa_TransSidArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransSidArray
*r
)
2148 uint32_t cntr_sids_1
;
2149 if (ndr_flags
& NDR_SCALARS
) {
2150 NDR_CHECK(ndr_push_align(ndr
, 4));
2151 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2152 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
2154 if (ndr_flags
& NDR_BUFFERS
) {
2156 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2157 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
2158 NDR_CHECK(ndr_push_lsa_TranslatedSid(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
2162 return NDR_ERR_SUCCESS
;
2165 static enum ndr_err_code
ndr_pull_lsa_TransSidArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransSidArray
*r
)
2168 uint32_t size_sids_1
= 0;
2169 uint32_t cntr_sids_1
;
2170 TALLOC_CTX
*_mem_save_sids_0
;
2171 TALLOC_CTX
*_mem_save_sids_1
;
2172 if (ndr_flags
& NDR_SCALARS
) {
2173 NDR_CHECK(ndr_pull_align(ndr
, 4));
2174 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2175 if (r
->count
> 1000) {
2176 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2178 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
2180 NDR_PULL_ALLOC(ndr
, r
->sids
);
2185 if (ndr_flags
& NDR_BUFFERS
) {
2187 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2188 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
2189 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
2190 size_sids_1
= ndr_get_array_size(ndr
, &r
->sids
);
2191 NDR_PULL_ALLOC_N(ndr
, r
->sids
, size_sids_1
);
2192 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2193 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
2194 for (cntr_sids_1
= 0; cntr_sids_1
< size_sids_1
; cntr_sids_1
++) {
2195 NDR_CHECK(ndr_pull_lsa_TranslatedSid(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
2197 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
2198 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
2201 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->count
));
2204 return NDR_ERR_SUCCESS
;
2207 _PUBLIC_
void ndr_print_lsa_TransSidArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransSidArray
*r
)
2209 uint32_t cntr_sids_1
;
2210 ndr_print_struct(ndr
, name
, "lsa_TransSidArray");
2212 ndr_print_uint32(ndr
, "count", r
->count
);
2213 ndr_print_ptr(ndr
, "sids", r
->sids
);
2216 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->count
);
2218 for (cntr_sids_1
=0;cntr_sids_1
<r
->count
;cntr_sids_1
++) {
2220 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
2221 ndr_print_lsa_TranslatedSid(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
2231 static enum ndr_err_code
ndr_push_lsa_RefDomainList(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_RefDomainList
*r
)
2233 uint32_t cntr_domains_1
;
2234 if (ndr_flags
& NDR_SCALARS
) {
2235 NDR_CHECK(ndr_push_align(ndr
, 4));
2236 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2237 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domains
));
2238 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_size
));
2240 if (ndr_flags
& NDR_BUFFERS
) {
2242 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2243 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2244 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
2246 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2247 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
2251 return NDR_ERR_SUCCESS
;
2254 static enum ndr_err_code
ndr_pull_lsa_RefDomainList(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_RefDomainList
*r
)
2256 uint32_t _ptr_domains
;
2257 uint32_t size_domains_1
= 0;
2258 uint32_t cntr_domains_1
;
2259 TALLOC_CTX
*_mem_save_domains_0
;
2260 TALLOC_CTX
*_mem_save_domains_1
;
2261 if (ndr_flags
& NDR_SCALARS
) {
2262 NDR_CHECK(ndr_pull_align(ndr
, 4));
2263 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2264 if (r
->count
> 1000) {
2265 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2267 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
2269 NDR_PULL_ALLOC(ndr
, r
->domains
);
2273 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_size
));
2275 if (ndr_flags
& NDR_BUFFERS
) {
2277 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2278 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
2279 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domains
));
2280 size_domains_1
= ndr_get_array_size(ndr
, &r
->domains
);
2281 NDR_PULL_ALLOC_N(ndr
, r
->domains
, size_domains_1
);
2282 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2283 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
2284 for (cntr_domains_1
= 0; cntr_domains_1
< size_domains_1
; cntr_domains_1
++) {
2285 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
2287 for (cntr_domains_1
= 0; cntr_domains_1
< size_domains_1
; cntr_domains_1
++) {
2288 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
2290 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
2291 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, 0);
2294 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->domains
, r
->count
));
2297 return NDR_ERR_SUCCESS
;
2300 _PUBLIC_
void ndr_print_lsa_RefDomainList(struct ndr_print
*ndr
, const char *name
, const struct lsa_RefDomainList
*r
)
2302 uint32_t cntr_domains_1
;
2303 ndr_print_struct(ndr
, name
, "lsa_RefDomainList");
2305 ndr_print_uint32(ndr
, "count", r
->count
);
2306 ndr_print_ptr(ndr
, "domains", r
->domains
);
2309 ndr
->print(ndr
, "%s: ARRAY(%d)", "domains", (int)r
->count
);
2311 for (cntr_domains_1
=0;cntr_domains_1
<r
->count
;cntr_domains_1
++) {
2313 if (asprintf(&idx_1
, "[%d]", cntr_domains_1
) != -1) {
2314 ndr_print_lsa_DomainInfo(ndr
, "domains", &r
->domains
[cntr_domains_1
]);
2321 ndr_print_uint32(ndr
, "max_size", r
->max_size
);
2325 static enum ndr_err_code
ndr_push_lsa_LookupNamesLevel(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_LookupNamesLevel r
)
2327 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
2328 return NDR_ERR_SUCCESS
;
2331 static enum ndr_err_code
ndr_pull_lsa_LookupNamesLevel(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_LookupNamesLevel
*r
)
2334 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
2336 return NDR_ERR_SUCCESS
;
2339 _PUBLIC_
void ndr_print_lsa_LookupNamesLevel(struct ndr_print
*ndr
, const char *name
, enum lsa_LookupNamesLevel r
)
2341 const char *val
= NULL
;
2344 case LSA_LOOKUP_NAMES_ALL
: val
= "LSA_LOOKUP_NAMES_ALL"; break;
2345 case LSA_LOOKUP_NAMES_DOMAINS_ONLY
: val
= "LSA_LOOKUP_NAMES_DOMAINS_ONLY"; break;
2346 case LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY
: val
= "LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY"; break;
2347 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY
: val
= "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY"; break;
2348 case LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY
: val
= "LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY"; break;
2349 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2
: val
= "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2"; break;
2350 case LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC
: val
= "LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC"; break;
2352 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2355 static enum ndr_err_code
ndr_push_lsa_TranslatedName(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedName
*r
)
2357 if (ndr_flags
& NDR_SCALARS
) {
2358 NDR_CHECK(ndr_push_align(ndr
, 4));
2359 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
2360 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
2361 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
2363 if (ndr_flags
& NDR_BUFFERS
) {
2364 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
2366 return NDR_ERR_SUCCESS
;
2369 static enum ndr_err_code
ndr_pull_lsa_TranslatedName(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedName
*r
)
2371 if (ndr_flags
& NDR_SCALARS
) {
2372 NDR_CHECK(ndr_pull_align(ndr
, 4));
2373 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
2374 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
2375 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
2377 if (ndr_flags
& NDR_BUFFERS
) {
2378 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
2380 return NDR_ERR_SUCCESS
;
2383 _PUBLIC_
void ndr_print_lsa_TranslatedName(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedName
*r
)
2385 ndr_print_struct(ndr
, name
, "lsa_TranslatedName");
2387 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
2388 ndr_print_lsa_String(ndr
, "name", &r
->name
);
2389 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
2393 static enum ndr_err_code
ndr_push_lsa_TransNameArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransNameArray
*r
)
2395 uint32_t cntr_names_1
;
2396 if (ndr_flags
& NDR_SCALARS
) {
2397 NDR_CHECK(ndr_push_align(ndr
, 4));
2398 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2399 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
2401 if (ndr_flags
& NDR_BUFFERS
) {
2403 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2404 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
2405 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
2407 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
2408 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
2412 return NDR_ERR_SUCCESS
;
2415 static enum ndr_err_code
ndr_pull_lsa_TransNameArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransNameArray
*r
)
2417 uint32_t _ptr_names
;
2418 uint32_t size_names_1
= 0;
2419 uint32_t cntr_names_1
;
2420 TALLOC_CTX
*_mem_save_names_0
;
2421 TALLOC_CTX
*_mem_save_names_1
;
2422 if (ndr_flags
& NDR_SCALARS
) {
2423 NDR_CHECK(ndr_pull_align(ndr
, 4));
2424 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2425 if (r
->count
> 1000) {
2426 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2428 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
2430 NDR_PULL_ALLOC(ndr
, r
->names
);
2435 if (ndr_flags
& NDR_BUFFERS
) {
2437 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2438 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
2439 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
2440 size_names_1
= ndr_get_array_size(ndr
, &r
->names
);
2441 NDR_PULL_ALLOC_N(ndr
, r
->names
, size_names_1
);
2442 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2443 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
2444 for (cntr_names_1
= 0; cntr_names_1
< size_names_1
; cntr_names_1
++) {
2445 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
2447 for (cntr_names_1
= 0; cntr_names_1
< size_names_1
; cntr_names_1
++) {
2448 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
2450 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
2451 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
2454 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
2457 return NDR_ERR_SUCCESS
;
2460 _PUBLIC_
void ndr_print_lsa_TransNameArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransNameArray
*r
)
2462 uint32_t cntr_names_1
;
2463 ndr_print_struct(ndr
, name
, "lsa_TransNameArray");
2465 ndr_print_uint32(ndr
, "count", r
->count
);
2466 ndr_print_ptr(ndr
, "names", r
->names
);
2469 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
2471 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
2473 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
2474 ndr_print_lsa_TranslatedName(ndr
, "names", &r
->names
[cntr_names_1
]);
2484 static enum ndr_err_code
ndr_push_lsa_LUIDAttribute(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_LUIDAttribute
*r
)
2486 if (ndr_flags
& NDR_SCALARS
) {
2487 NDR_CHECK(ndr_push_align(ndr
, 4));
2488 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, &r
->luid
));
2489 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->attribute
));
2491 if (ndr_flags
& NDR_BUFFERS
) {
2493 return NDR_ERR_SUCCESS
;
2496 static enum ndr_err_code
ndr_pull_lsa_LUIDAttribute(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_LUIDAttribute
*r
)
2498 if (ndr_flags
& NDR_SCALARS
) {
2499 NDR_CHECK(ndr_pull_align(ndr
, 4));
2500 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, &r
->luid
));
2501 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->attribute
));
2503 if (ndr_flags
& NDR_BUFFERS
) {
2505 return NDR_ERR_SUCCESS
;
2508 _PUBLIC_
void ndr_print_lsa_LUIDAttribute(struct ndr_print
*ndr
, const char *name
, const struct lsa_LUIDAttribute
*r
)
2510 ndr_print_struct(ndr
, name
, "lsa_LUIDAttribute");
2512 ndr_print_lsa_LUID(ndr
, "luid", &r
->luid
);
2513 ndr_print_uint32(ndr
, "attribute", r
->attribute
);
2517 static enum ndr_err_code
ndr_push_lsa_PrivilegeSet(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_PrivilegeSet
*r
)
2519 uint32_t cntr_set_0
;
2520 if (ndr_flags
& NDR_SCALARS
) {
2521 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2522 NDR_CHECK(ndr_push_align(ndr
, 4));
2523 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2524 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
2525 for (cntr_set_0
= 0; cntr_set_0
< r
->count
; cntr_set_0
++) {
2526 NDR_CHECK(ndr_push_lsa_LUIDAttribute(ndr
, NDR_SCALARS
, &r
->set
[cntr_set_0
]));
2529 if (ndr_flags
& NDR_BUFFERS
) {
2531 return NDR_ERR_SUCCESS
;
2534 static enum ndr_err_code
ndr_pull_lsa_PrivilegeSet(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_PrivilegeSet
*r
)
2536 uint32_t size_set_0
= 0;
2537 uint32_t cntr_set_0
;
2538 TALLOC_CTX
*_mem_save_set_0
;
2539 if (ndr_flags
& NDR_SCALARS
) {
2540 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->set
));
2541 NDR_CHECK(ndr_pull_align(ndr
, 4));
2542 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2543 if (r
->count
> 1000) {
2544 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2546 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
2547 size_set_0
= ndr_get_array_size(ndr
, &r
->set
);
2548 NDR_PULL_ALLOC_N(ndr
, r
->set
, size_set_0
);
2549 _mem_save_set_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2550 NDR_PULL_SET_MEM_CTX(ndr
, r
->set
, 0);
2551 for (cntr_set_0
= 0; cntr_set_0
< size_set_0
; cntr_set_0
++) {
2552 NDR_CHECK(ndr_pull_lsa_LUIDAttribute(ndr
, NDR_SCALARS
, &r
->set
[cntr_set_0
]));
2554 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_set_0
, 0);
2556 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->set
, r
->count
));
2559 if (ndr_flags
& NDR_BUFFERS
) {
2561 return NDR_ERR_SUCCESS
;
2564 _PUBLIC_
void ndr_print_lsa_PrivilegeSet(struct ndr_print
*ndr
, const char *name
, const struct lsa_PrivilegeSet
*r
)
2566 uint32_t cntr_set_0
;
2567 ndr_print_struct(ndr
, name
, "lsa_PrivilegeSet");
2569 ndr_print_uint32(ndr
, "count", r
->count
);
2570 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
2571 ndr
->print(ndr
, "%s: ARRAY(%d)", "set", (int)r
->count
);
2573 for (cntr_set_0
=0;cntr_set_0
<r
->count
;cntr_set_0
++) {
2575 if (asprintf(&idx_0
, "[%d]", cntr_set_0
) != -1) {
2576 ndr_print_lsa_LUIDAttribute(ndr
, "set", &r
->set
[cntr_set_0
]);
2584 static enum ndr_err_code
ndr_push_lsa_DATA_BUF(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DATA_BUF
*r
)
2587 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2588 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2589 if (ndr_flags
& NDR_SCALARS
) {
2590 NDR_CHECK(ndr_push_align(ndr
, 4));
2591 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
2592 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2593 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
2595 if (ndr_flags
& NDR_BUFFERS
) {
2597 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2598 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
2599 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
2600 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
2603 ndr
->flags
= _flags_save_STRUCT
;
2605 return NDR_ERR_SUCCESS
;
2608 static enum ndr_err_code
ndr_pull_lsa_DATA_BUF(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DATA_BUF
*r
)
2611 uint32_t size_data_1
= 0;
2612 uint32_t length_data_1
= 0;
2613 TALLOC_CTX
*_mem_save_data_0
;
2615 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2616 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2617 if (ndr_flags
& NDR_SCALARS
) {
2618 NDR_CHECK(ndr_pull_align(ndr
, 4));
2619 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
2620 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
2621 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
2623 NDR_PULL_ALLOC(ndr
, r
->data
);
2628 if (ndr_flags
& NDR_BUFFERS
) {
2630 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2631 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
2632 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
2633 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data
));
2634 size_data_1
= ndr_get_array_size(ndr
, &r
->data
);
2635 length_data_1
= ndr_get_array_length(ndr
, &r
->data
);
2636 if (length_data_1
> size_data_1
) {
2637 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", size_data_1
, length_data_1
);
2639 NDR_PULL_ALLOC_N(ndr
, r
->data
, size_data_1
);
2640 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, length_data_1
));
2641 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
2644 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->size
));
2647 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->data
, r
->length
));
2650 ndr
->flags
= _flags_save_STRUCT
;
2652 return NDR_ERR_SUCCESS
;
2655 _PUBLIC_
void ndr_print_lsa_DATA_BUF(struct ndr_print
*ndr
, const char *name
, const struct lsa_DATA_BUF
*r
)
2657 ndr_print_struct(ndr
, name
, "lsa_DATA_BUF");
2659 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2660 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2662 ndr_print_uint32(ndr
, "length", r
->length
);
2663 ndr_print_uint32(ndr
, "size", r
->size
);
2664 ndr_print_ptr(ndr
, "data", r
->data
);
2667 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
2671 ndr
->flags
= _flags_save_STRUCT
;
2675 static enum ndr_err_code
ndr_push_lsa_DATA_BUF2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DATA_BUF2
*r
)
2678 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2679 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2680 if (ndr_flags
& NDR_SCALARS
) {
2681 NDR_CHECK(ndr_push_align(ndr
, 4));
2682 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2683 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
2685 if (ndr_flags
& NDR_BUFFERS
) {
2687 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2688 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->size
));
2691 ndr
->flags
= _flags_save_STRUCT
;
2693 return NDR_ERR_SUCCESS
;
2696 static enum ndr_err_code
ndr_pull_lsa_DATA_BUF2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DATA_BUF2
*r
)
2699 uint32_t size_data_1
= 0;
2700 TALLOC_CTX
*_mem_save_data_0
;
2702 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2703 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2704 if (ndr_flags
& NDR_SCALARS
) {
2705 NDR_CHECK(ndr_pull_align(ndr
, 4));
2706 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
2707 if (r
->size
> 65536) {
2708 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2710 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
2712 NDR_PULL_ALLOC(ndr
, r
->data
);
2717 if (ndr_flags
& NDR_BUFFERS
) {
2719 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2720 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
2721 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
2722 size_data_1
= ndr_get_array_size(ndr
, &r
->data
);
2723 NDR_PULL_ALLOC_N(ndr
, r
->data
, size_data_1
);
2724 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, size_data_1
));
2725 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
2728 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->size
));
2731 ndr
->flags
= _flags_save_STRUCT
;
2733 return NDR_ERR_SUCCESS
;
2736 _PUBLIC_
void ndr_print_lsa_DATA_BUF2(struct ndr_print
*ndr
, const char *name
, const struct lsa_DATA_BUF2
*r
)
2738 ndr_print_struct(ndr
, name
, "lsa_DATA_BUF2");
2740 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2741 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2743 ndr_print_uint32(ndr
, "size", r
->size
);
2744 ndr_print_ptr(ndr
, "data", r
->data
);
2747 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->size
);
2751 ndr
->flags
= _flags_save_STRUCT
;
2755 static enum ndr_err_code
ndr_push_lsa_TrustDomInfoEnum(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_TrustDomInfoEnum r
)
2757 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
2758 return NDR_ERR_SUCCESS
;
2761 static enum ndr_err_code
ndr_pull_lsa_TrustDomInfoEnum(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_TrustDomInfoEnum
*r
)
2764 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
2766 return NDR_ERR_SUCCESS
;
2769 _PUBLIC_
void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print
*ndr
, const char *name
, enum lsa_TrustDomInfoEnum r
)
2771 const char *val
= NULL
;
2774 case LSA_TRUSTED_DOMAIN_INFO_NAME
: val
= "LSA_TRUSTED_DOMAIN_INFO_NAME"; break;
2775 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
: val
= "LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS"; break;
2776 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
: val
= "LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET"; break;
2777 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
: val
= "LSA_TRUSTED_DOMAIN_INFO_PASSWORD"; break;
2778 case LSA_TRUSTED_DOMAIN_INFO_BASIC
: val
= "LSA_TRUSTED_DOMAIN_INFO_BASIC"; break;
2779 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
: val
= "LSA_TRUSTED_DOMAIN_INFO_INFO_EX"; break;
2780 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
: val
= "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO"; break;
2781 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
: val
= "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO"; break;
2782 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL"; break;
2783 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL"; break;
2784 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL"; break;
2785 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL"; break;
2786 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES
: val
= "LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES"; break;
2788 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2791 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustDirection(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2793 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2794 return NDR_ERR_SUCCESS
;
2797 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustDirection(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2800 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2802 return NDR_ERR_SUCCESS
;
2805 _PUBLIC_
void ndr_print_lsa_TrustDirection(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2807 ndr_print_uint32(ndr
, name
, r
);
2809 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_DIRECTION_INBOUND", LSA_TRUST_DIRECTION_INBOUND
, r
);
2810 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_DIRECTION_OUTBOUND", LSA_TRUST_DIRECTION_OUTBOUND
, r
);
2814 static enum ndr_err_code
ndr_push_lsa_TrustType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_TrustType r
)
2816 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2817 return NDR_ERR_SUCCESS
;
2820 static enum ndr_err_code
ndr_pull_lsa_TrustType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_TrustType
*r
)
2823 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2825 return NDR_ERR_SUCCESS
;
2828 _PUBLIC_
void ndr_print_lsa_TrustType(struct ndr_print
*ndr
, const char *name
, enum lsa_TrustType r
)
2830 const char *val
= NULL
;
2833 case LSA_TRUST_TYPE_DOWNLEVEL
: val
= "LSA_TRUST_TYPE_DOWNLEVEL"; break;
2834 case LSA_TRUST_TYPE_UPLEVEL
: val
= "LSA_TRUST_TYPE_UPLEVEL"; break;
2835 case LSA_TRUST_TYPE_MIT
: val
= "LSA_TRUST_TYPE_MIT"; break;
2837 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2840 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustAttributes(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2842 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2843 return NDR_ERR_SUCCESS
;
2846 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustAttributes(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2849 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2851 return NDR_ERR_SUCCESS
;
2854 _PUBLIC_
void ndr_print_lsa_TrustAttributes(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2856 ndr_print_uint32(ndr
, name
, r
);
2858 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE", LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE
, r
);
2859 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY", LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY
, r
);
2860 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN", LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN
, r
);
2861 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE", LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE
, r
);
2862 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION", LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION
, r
);
2863 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_WITHIN_FOREST", LSA_TRUST_ATTRIBUTE_WITHIN_FOREST
, r
);
2864 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL", LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL
, r
);
2865 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION", LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION
, r
);
2869 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoName(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoName
*r
)
2871 if (ndr_flags
& NDR_SCALARS
) {
2872 NDR_CHECK(ndr_push_align(ndr
, 4));
2873 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
2875 if (ndr_flags
& NDR_BUFFERS
) {
2876 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
2878 return NDR_ERR_SUCCESS
;
2881 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoName(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoName
*r
)
2883 if (ndr_flags
& NDR_SCALARS
) {
2884 NDR_CHECK(ndr_pull_align(ndr
, 4));
2885 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
2887 if (ndr_flags
& NDR_BUFFERS
) {
2888 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
2890 return NDR_ERR_SUCCESS
;
2893 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoName(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoName
*r
)
2895 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoName");
2897 ndr_print_lsa_StringLarge(ndr
, "netbios_name", &r
->netbios_name
);
2901 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoControllers(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoControllers
*r
)
2903 uint32_t cntr_netbios_names_1
;
2904 if (ndr_flags
& NDR_SCALARS
) {
2905 NDR_CHECK(ndr_push_align(ndr
, 4));
2906 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries
));
2907 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->netbios_names
));
2909 if (ndr_flags
& NDR_BUFFERS
) {
2910 if (r
->netbios_names
) {
2911 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries
));
2912 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< r
->entries
; cntr_netbios_names_1
++) {
2913 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2915 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< r
->entries
; cntr_netbios_names_1
++) {
2916 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2920 return NDR_ERR_SUCCESS
;
2923 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoControllers(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoControllers
*r
)
2925 uint32_t _ptr_netbios_names
;
2926 uint32_t size_netbios_names_1
= 0;
2927 uint32_t cntr_netbios_names_1
;
2928 TALLOC_CTX
*_mem_save_netbios_names_0
;
2929 TALLOC_CTX
*_mem_save_netbios_names_1
;
2930 if (ndr_flags
& NDR_SCALARS
) {
2931 NDR_CHECK(ndr_pull_align(ndr
, 4));
2932 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->entries
));
2933 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_netbios_names
));
2934 if (_ptr_netbios_names
) {
2935 NDR_PULL_ALLOC(ndr
, r
->netbios_names
);
2937 r
->netbios_names
= NULL
;
2940 if (ndr_flags
& NDR_BUFFERS
) {
2941 if (r
->netbios_names
) {
2942 _mem_save_netbios_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2943 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_names
, 0);
2944 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->netbios_names
));
2945 size_netbios_names_1
= ndr_get_array_size(ndr
, &r
->netbios_names
);
2946 NDR_PULL_ALLOC_N(ndr
, r
->netbios_names
, size_netbios_names_1
);
2947 _mem_save_netbios_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2948 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_names
, 0);
2949 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< size_netbios_names_1
; cntr_netbios_names_1
++) {
2950 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2952 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< size_netbios_names_1
; cntr_netbios_names_1
++) {
2953 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2955 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_names_1
, 0);
2956 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_names_0
, 0);
2958 if (r
->netbios_names
) {
2959 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->netbios_names
, r
->entries
));
2962 return NDR_ERR_SUCCESS
;
2965 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoControllers(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoControllers
*r
)
2967 uint32_t cntr_netbios_names_1
;
2968 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoControllers");
2970 ndr_print_uint32(ndr
, "entries", r
->entries
);
2971 ndr_print_ptr(ndr
, "netbios_names", r
->netbios_names
);
2973 if (r
->netbios_names
) {
2974 ndr
->print(ndr
, "%s: ARRAY(%d)", "netbios_names", (int)r
->entries
);
2976 for (cntr_netbios_names_1
=0;cntr_netbios_names_1
<r
->entries
;cntr_netbios_names_1
++) {
2978 if (asprintf(&idx_1
, "[%d]", cntr_netbios_names_1
) != -1) {
2979 ndr_print_lsa_StringLarge(ndr
, "netbios_names", &r
->netbios_names
[cntr_netbios_names_1
]);
2989 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoPosixOffset
*r
)
2991 if (ndr_flags
& NDR_SCALARS
) {
2992 NDR_CHECK(ndr_push_align(ndr
, 4));
2993 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->posix_offset
));
2995 if (ndr_flags
& NDR_BUFFERS
) {
2997 return NDR_ERR_SUCCESS
;
3000 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoPosixOffset(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoPosixOffset
*r
)
3002 if (ndr_flags
& NDR_SCALARS
) {
3003 NDR_CHECK(ndr_pull_align(ndr
, 4));
3004 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3006 if (ndr_flags
& NDR_BUFFERS
) {
3008 return NDR_ERR_SUCCESS
;
3011 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoPosixOffset
*r
)
3013 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoPosixOffset");
3015 ndr_print_uint32(ndr
, "posix_offset", r
->posix_offset
);
3019 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoPassword(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoPassword
*r
)
3021 if (ndr_flags
& NDR_SCALARS
) {
3022 NDR_CHECK(ndr_push_align(ndr
, 4));
3023 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->password
));
3024 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->old_password
));
3026 if (ndr_flags
& NDR_BUFFERS
) {
3028 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->password
));
3030 if (r
->old_password
) {
3031 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->old_password
));
3034 return NDR_ERR_SUCCESS
;
3037 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoPassword(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoPassword
*r
)
3039 uint32_t _ptr_password
;
3040 TALLOC_CTX
*_mem_save_password_0
;
3041 uint32_t _ptr_old_password
;
3042 TALLOC_CTX
*_mem_save_old_password_0
;
3043 if (ndr_flags
& NDR_SCALARS
) {
3044 NDR_CHECK(ndr_pull_align(ndr
, 4));
3045 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
3046 if (_ptr_password
) {
3047 NDR_PULL_ALLOC(ndr
, r
->password
);
3051 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_password
));
3052 if (_ptr_old_password
) {
3053 NDR_PULL_ALLOC(ndr
, r
->old_password
);
3055 r
->old_password
= NULL
;
3058 if (ndr_flags
& NDR_BUFFERS
) {
3060 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3061 NDR_PULL_SET_MEM_CTX(ndr
, r
->password
, 0);
3062 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->password
));
3063 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
3065 if (r
->old_password
) {
3066 _mem_save_old_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3067 NDR_PULL_SET_MEM_CTX(ndr
, r
->old_password
, 0);
3068 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->old_password
));
3069 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_password_0
, 0);
3072 return NDR_ERR_SUCCESS
;
3075 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoPassword
*r
)
3077 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoPassword");
3079 ndr_print_ptr(ndr
, "password", r
->password
);
3082 ndr_print_lsa_DATA_BUF(ndr
, "password", r
->password
);
3085 ndr_print_ptr(ndr
, "old_password", r
->old_password
);
3087 if (r
->old_password
) {
3088 ndr_print_lsa_DATA_BUF(ndr
, "old_password", r
->old_password
);
3094 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoBasic(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoBasic
*r
)
3096 if (ndr_flags
& NDR_SCALARS
) {
3097 NDR_CHECK(ndr_push_align(ndr
, 4));
3098 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->netbios_name
));
3099 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
3101 if (ndr_flags
& NDR_BUFFERS
) {
3102 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3104 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3107 return NDR_ERR_SUCCESS
;
3110 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoBasic(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoBasic
*r
)
3113 TALLOC_CTX
*_mem_save_sid_0
;
3114 if (ndr_flags
& NDR_SCALARS
) {
3115 NDR_CHECK(ndr_pull_align(ndr
, 4));
3116 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->netbios_name
));
3117 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
3119 NDR_PULL_ALLOC(ndr
, r
->sid
);
3124 if (ndr_flags
& NDR_BUFFERS
) {
3125 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3127 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3128 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
3129 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3130 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
3133 return NDR_ERR_SUCCESS
;
3136 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoBasic
*r
)
3138 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoBasic");
3140 ndr_print_lsa_String(ndr
, "netbios_name", &r
->netbios_name
);
3141 ndr_print_ptr(ndr
, "sid", r
->sid
);
3144 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
3150 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoInfoEx
*r
)
3152 if (ndr_flags
& NDR_SCALARS
) {
3153 NDR_CHECK(ndr_push_align(ndr
, 4));
3154 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->domain_name
));
3155 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
3156 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
3157 NDR_CHECK(ndr_push_lsa_TrustDirection(ndr
, NDR_SCALARS
, r
->trust_direction
));
3158 NDR_CHECK(ndr_push_lsa_TrustType(ndr
, NDR_SCALARS
, r
->trust_type
));
3159 NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr
, NDR_SCALARS
, r
->trust_attributes
));
3161 if (ndr_flags
& NDR_BUFFERS
) {
3162 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->domain_name
));
3163 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3165 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3168 return NDR_ERR_SUCCESS
;
3171 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoInfoEx
*r
)
3174 TALLOC_CTX
*_mem_save_sid_0
;
3175 if (ndr_flags
& NDR_SCALARS
) {
3176 NDR_CHECK(ndr_pull_align(ndr
, 4));
3177 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->domain_name
));
3178 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
3179 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
3181 NDR_PULL_ALLOC(ndr
, r
->sid
);
3185 NDR_CHECK(ndr_pull_lsa_TrustDirection(ndr
, NDR_SCALARS
, &r
->trust_direction
));
3186 NDR_CHECK(ndr_pull_lsa_TrustType(ndr
, NDR_SCALARS
, &r
->trust_type
));
3187 NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr
, NDR_SCALARS
, &r
->trust_attributes
));
3189 if (ndr_flags
& NDR_BUFFERS
) {
3190 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->domain_name
));
3191 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3193 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3194 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
3195 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3196 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
3199 return NDR_ERR_SUCCESS
;
3202 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoInfoEx
*r
)
3204 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoInfoEx");
3206 ndr_print_lsa_StringLarge(ndr
, "domain_name", &r
->domain_name
);
3207 ndr_print_lsa_StringLarge(ndr
, "netbios_name", &r
->netbios_name
);
3208 ndr_print_ptr(ndr
, "sid", r
->sid
);
3211 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
3214 ndr_print_lsa_TrustDirection(ndr
, "trust_direction", r
->trust_direction
);
3215 ndr_print_lsa_TrustType(ndr
, "trust_type", r
->trust_type
);
3216 ndr_print_lsa_TrustAttributes(ndr
, "trust_attributes", r
->trust_attributes
);
3220 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustAuthType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_TrustAuthType r
)
3222 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
3223 return NDR_ERR_SUCCESS
;
3226 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustAuthType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_TrustAuthType
*r
)
3229 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
3231 return NDR_ERR_SUCCESS
;
3234 _PUBLIC_
void ndr_print_lsa_TrustAuthType(struct ndr_print
*ndr
, const char *name
, enum lsa_TrustAuthType r
)
3236 const char *val
= NULL
;
3239 case TRUST_AUTH_TYPE_NONE
: val
= "TRUST_AUTH_TYPE_NONE"; break;
3240 case TRUST_AUTH_TYPE_NT4OWF
: val
= "TRUST_AUTH_TYPE_NT4OWF"; break;
3241 case TRUST_AUTH_TYPE_CLEAR
: val
= "TRUST_AUTH_TYPE_CLEAR"; break;
3242 case TRUST_AUTH_TYPE_VERSION
: val
= "TRUST_AUTH_TYPE_VERSION"; break;
3244 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
3247 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoBuffer
*r
)
3249 if (ndr_flags
& NDR_SCALARS
) {
3250 NDR_CHECK(ndr_push_align(ndr
, 8));
3251 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->last_update_time
));
3252 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr
, NDR_SCALARS
, r
->AuthType
));
3253 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->data
));
3255 if (ndr_flags
& NDR_BUFFERS
) {
3256 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->data
));
3258 return NDR_ERR_SUCCESS
;
3261 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoBuffer
*r
)
3263 if (ndr_flags
& NDR_SCALARS
) {
3264 NDR_CHECK(ndr_pull_align(ndr
, 8));
3265 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, &r
->last_update_time
));
3266 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr
, NDR_SCALARS
, &r
->AuthType
));
3267 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->data
));
3269 if (ndr_flags
& NDR_BUFFERS
) {
3270 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->data
));
3272 return NDR_ERR_SUCCESS
;
3275 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoBuffer
*r
)
3277 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoBuffer");
3279 ndr_print_NTTIME_hyper(ndr
, "last_update_time", r
->last_update_time
);
3280 ndr_print_lsa_TrustAuthType(ndr
, "AuthType", r
->AuthType
);
3281 ndr_print_lsa_DATA_BUF2(ndr
, "data", &r
->data
);
3285 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoAuthInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoAuthInfo
*r
)
3287 if (ndr_flags
& NDR_SCALARS
) {
3288 NDR_CHECK(ndr_push_align(ndr
, 4));
3289 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->incoming_count
));
3290 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->incoming_current_auth_info
));
3291 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->incoming_previous_auth_info
));
3292 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->outgoing_count
));
3293 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->outgoing_current_auth_info
));
3294 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->outgoing_previous_auth_info
));
3296 if (ndr_flags
& NDR_BUFFERS
) {
3297 if (r
->incoming_current_auth_info
) {
3298 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_current_auth_info
));
3300 if (r
->incoming_previous_auth_info
) {
3301 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_previous_auth_info
));
3303 if (r
->outgoing_current_auth_info
) {
3304 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_current_auth_info
));
3306 if (r
->outgoing_previous_auth_info
) {
3307 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_previous_auth_info
));
3310 return NDR_ERR_SUCCESS
;
3313 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoAuthInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoAuthInfo
*r
)
3315 uint32_t _ptr_incoming_current_auth_info
;
3316 TALLOC_CTX
*_mem_save_incoming_current_auth_info_0
;
3317 uint32_t _ptr_incoming_previous_auth_info
;
3318 TALLOC_CTX
*_mem_save_incoming_previous_auth_info_0
;
3319 uint32_t _ptr_outgoing_current_auth_info
;
3320 TALLOC_CTX
*_mem_save_outgoing_current_auth_info_0
;
3321 uint32_t _ptr_outgoing_previous_auth_info
;
3322 TALLOC_CTX
*_mem_save_outgoing_previous_auth_info_0
;
3323 if (ndr_flags
& NDR_SCALARS
) {
3324 NDR_CHECK(ndr_pull_align(ndr
, 4));
3325 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->incoming_count
));
3326 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_incoming_current_auth_info
));
3327 if (_ptr_incoming_current_auth_info
) {
3328 NDR_PULL_ALLOC(ndr
, r
->incoming_current_auth_info
);
3330 r
->incoming_current_auth_info
= NULL
;
3332 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_incoming_previous_auth_info
));
3333 if (_ptr_incoming_previous_auth_info
) {
3334 NDR_PULL_ALLOC(ndr
, r
->incoming_previous_auth_info
);
3336 r
->incoming_previous_auth_info
= NULL
;
3338 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->outgoing_count
));
3339 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_outgoing_current_auth_info
));
3340 if (_ptr_outgoing_current_auth_info
) {
3341 NDR_PULL_ALLOC(ndr
, r
->outgoing_current_auth_info
);
3343 r
->outgoing_current_auth_info
= NULL
;
3345 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_outgoing_previous_auth_info
));
3346 if (_ptr_outgoing_previous_auth_info
) {
3347 NDR_PULL_ALLOC(ndr
, r
->outgoing_previous_auth_info
);
3349 r
->outgoing_previous_auth_info
= NULL
;
3352 if (ndr_flags
& NDR_BUFFERS
) {
3353 if (r
->incoming_current_auth_info
) {
3354 _mem_save_incoming_current_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3355 NDR_PULL_SET_MEM_CTX(ndr
, r
->incoming_current_auth_info
, 0);
3356 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_current_auth_info
));
3357 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_incoming_current_auth_info_0
, 0);
3359 if (r
->incoming_previous_auth_info
) {
3360 _mem_save_incoming_previous_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3361 NDR_PULL_SET_MEM_CTX(ndr
, r
->incoming_previous_auth_info
, 0);
3362 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_previous_auth_info
));
3363 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_incoming_previous_auth_info_0
, 0);
3365 if (r
->outgoing_current_auth_info
) {
3366 _mem_save_outgoing_current_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3367 NDR_PULL_SET_MEM_CTX(ndr
, r
->outgoing_current_auth_info
, 0);
3368 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_current_auth_info
));
3369 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_outgoing_current_auth_info_0
, 0);
3371 if (r
->outgoing_previous_auth_info
) {
3372 _mem_save_outgoing_previous_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3373 NDR_PULL_SET_MEM_CTX(ndr
, r
->outgoing_previous_auth_info
, 0);
3374 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_previous_auth_info
));
3375 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_outgoing_previous_auth_info_0
, 0);
3378 return NDR_ERR_SUCCESS
;
3381 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoAuthInfo
*r
)
3383 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoAuthInfo");
3385 ndr_print_uint32(ndr
, "incoming_count", r
->incoming_count
);
3386 ndr_print_ptr(ndr
, "incoming_current_auth_info", r
->incoming_current_auth_info
);
3388 if (r
->incoming_current_auth_info
) {
3389 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "incoming_current_auth_info", r
->incoming_current_auth_info
);
3392 ndr_print_ptr(ndr
, "incoming_previous_auth_info", r
->incoming_previous_auth_info
);
3394 if (r
->incoming_previous_auth_info
) {
3395 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "incoming_previous_auth_info", r
->incoming_previous_auth_info
);
3398 ndr_print_uint32(ndr
, "outgoing_count", r
->outgoing_count
);
3399 ndr_print_ptr(ndr
, "outgoing_current_auth_info", r
->outgoing_current_auth_info
);
3401 if (r
->outgoing_current_auth_info
) {
3402 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "outgoing_current_auth_info", r
->outgoing_current_auth_info
);
3405 ndr_print_ptr(ndr
, "outgoing_previous_auth_info", r
->outgoing_previous_auth_info
);
3407 if (r
->outgoing_previous_auth_info
) {
3408 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "outgoing_previous_auth_info", r
->outgoing_previous_auth_info
);
3414 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoFullInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoFullInfo
*r
)
3416 if (ndr_flags
& NDR_SCALARS
) {
3417 NDR_CHECK(ndr_push_align(ndr
, 4));
3418 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3419 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3420 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3422 if (ndr_flags
& NDR_BUFFERS
) {
3423 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3424 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3426 return NDR_ERR_SUCCESS
;
3429 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoFullInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoFullInfo
*r
)
3431 if (ndr_flags
& NDR_SCALARS
) {
3432 NDR_CHECK(ndr_pull_align(ndr
, 4));
3433 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3434 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3435 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3437 if (ndr_flags
& NDR_BUFFERS
) {
3438 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3439 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3441 return NDR_ERR_SUCCESS
;
3444 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoFullInfo
*r
)
3446 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoFullInfo");
3448 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3449 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3450 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr
, "auth_info", &r
->auth_info
);
3454 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoAuthInfoInternal
*r
)
3456 if (ndr_flags
& NDR_SCALARS
) {
3457 NDR_CHECK(ndr_push_align(ndr
, 4));
3458 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->auth_blob
));
3460 if (ndr_flags
& NDR_BUFFERS
) {
3461 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->auth_blob
));
3463 return NDR_ERR_SUCCESS
;
3466 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoAuthInfoInternal
*r
)
3468 if (ndr_flags
& NDR_SCALARS
) {
3469 NDR_CHECK(ndr_pull_align(ndr
, 4));
3470 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->auth_blob
));
3472 if (ndr_flags
& NDR_BUFFERS
) {
3473 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->auth_blob
));
3475 return NDR_ERR_SUCCESS
;
3478 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoAuthInfoInternal
*r
)
3480 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoAuthInfoInternal");
3482 ndr_print_lsa_DATA_BUF2(ndr
, "auth_blob", &r
->auth_blob
);
3486 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoFullInfoInternal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoFullInfoInternal
*r
)
3488 if (ndr_flags
& NDR_SCALARS
) {
3489 NDR_CHECK(ndr_push_align(ndr
, 4));
3490 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3491 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3492 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info
));
3494 if (ndr_flags
& NDR_BUFFERS
) {
3495 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3496 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3498 return NDR_ERR_SUCCESS
;
3501 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoFullInfoInternal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoFullInfoInternal
*r
)
3503 if (ndr_flags
& NDR_SCALARS
) {
3504 NDR_CHECK(ndr_pull_align(ndr
, 4));
3505 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3506 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3507 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info
));
3509 if (ndr_flags
& NDR_BUFFERS
) {
3510 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3511 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3513 return NDR_ERR_SUCCESS
;
3516 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoFullInfoInternal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoFullInfoInternal
*r
)
3518 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoFullInfoInternal");
3520 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3521 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3522 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info", &r
->auth_info
);
3526 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoInfoEx2Internal
*r
)
3528 if (ndr_flags
& NDR_SCALARS
) {
3529 NDR_CHECK(ndr_push_align(ndr
, 4));
3530 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3531 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->forest_trust_length
));
3532 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->forest_trust_data
));
3534 if (ndr_flags
& NDR_BUFFERS
) {
3535 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3536 if (r
->forest_trust_data
) {
3537 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->forest_trust_length
));
3538 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->forest_trust_data
, r
->forest_trust_length
));
3541 return NDR_ERR_SUCCESS
;
3544 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoInfoEx2Internal
*r
)
3546 uint32_t _ptr_forest_trust_data
;
3547 uint32_t size_forest_trust_data_1
= 0;
3548 TALLOC_CTX
*_mem_save_forest_trust_data_0
;
3549 if (ndr_flags
& NDR_SCALARS
) {
3550 NDR_CHECK(ndr_pull_align(ndr
, 4));
3551 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3552 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->forest_trust_length
));
3553 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_forest_trust_data
));
3554 if (_ptr_forest_trust_data
) {
3555 NDR_PULL_ALLOC(ndr
, r
->forest_trust_data
);
3557 r
->forest_trust_data
= NULL
;
3560 if (ndr_flags
& NDR_BUFFERS
) {
3561 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3562 if (r
->forest_trust_data
) {
3563 _mem_save_forest_trust_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3564 NDR_PULL_SET_MEM_CTX(ndr
, r
->forest_trust_data
, 0);
3565 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->forest_trust_data
));
3566 size_forest_trust_data_1
= ndr_get_array_size(ndr
, &r
->forest_trust_data
);
3567 NDR_PULL_ALLOC_N(ndr
, r
->forest_trust_data
, size_forest_trust_data_1
);
3568 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->forest_trust_data
, size_forest_trust_data_1
));
3569 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_data_0
, 0);
3571 if (r
->forest_trust_data
) {
3572 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->forest_trust_data
, r
->forest_trust_length
));
3575 return NDR_ERR_SUCCESS
;
3578 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoInfoEx2Internal
*r
)
3580 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoInfoEx2Internal");
3582 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3583 ndr_print_uint32(ndr
, "forest_trust_length", r
->forest_trust_length
);
3584 ndr_print_ptr(ndr
, "forest_trust_data", r
->forest_trust_data
);
3586 if (r
->forest_trust_data
) {
3587 ndr_print_array_uint8(ndr
, "forest_trust_data", r
->forest_trust_data
, r
->forest_trust_length
);
3593 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoFullInfo2Internal
*r
)
3595 if (ndr_flags
& NDR_SCALARS
) {
3596 NDR_CHECK(ndr_push_align(ndr
, 4));
3597 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info
));
3598 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3599 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3601 if (ndr_flags
& NDR_BUFFERS
) {
3602 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info
));
3603 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3605 return NDR_ERR_SUCCESS
;
3608 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoFullInfo2Internal
*r
)
3610 if (ndr_flags
& NDR_SCALARS
) {
3611 NDR_CHECK(ndr_pull_align(ndr
, 4));
3612 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info
));
3613 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3614 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3616 if (ndr_flags
& NDR_BUFFERS
) {
3617 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info
));
3618 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3620 return NDR_ERR_SUCCESS
;
3623 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoFullInfo2Internal
*r
)
3625 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoFullInfo2Internal");
3627 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr
, "info", &r
->info
);
3628 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3629 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr
, "auth_info", &r
->auth_info
);
3633 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoSupportedEncTypes
*r
)
3635 if (ndr_flags
& NDR_SCALARS
) {
3636 NDR_CHECK(ndr_push_align(ndr
, 4));
3637 NDR_CHECK(ndr_push_kerb_EncTypes(ndr
, NDR_SCALARS
, r
->enc_types
));
3639 if (ndr_flags
& NDR_BUFFERS
) {
3641 return NDR_ERR_SUCCESS
;
3644 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoSupportedEncTypes
*r
)
3646 if (ndr_flags
& NDR_SCALARS
) {
3647 NDR_CHECK(ndr_pull_align(ndr
, 4));
3648 NDR_CHECK(ndr_pull_kerb_EncTypes(ndr
, NDR_SCALARS
, &r
->enc_types
));
3650 if (ndr_flags
& NDR_BUFFERS
) {
3652 return NDR_ERR_SUCCESS
;
3655 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoSupportedEncTypes
*r
)
3657 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoSupportedEncTypes");
3659 ndr_print_kerb_EncTypes(ndr
, "enc_types", r
->enc_types
);
3663 static enum ndr_err_code
ndr_push_lsa_TrustedDomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_TrustedDomainInfo
*r
)
3665 if (ndr_flags
& NDR_SCALARS
) {
3666 int level
= ndr_push_get_switch_value(ndr
, r
);
3667 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, level
));
3669 case LSA_TRUSTED_DOMAIN_INFO_NAME
: {
3670 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr
, NDR_SCALARS
, &r
->name
));
3673 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
: {
3674 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr
, NDR_SCALARS
, &r
->controllers
));
3677 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
: {
3678 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3681 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
: {
3682 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr
, NDR_SCALARS
, &r
->password
));
3685 case LSA_TRUSTED_DOMAIN_INFO_BASIC
: {
3686 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr
, NDR_SCALARS
, &r
->info_basic
));
3689 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
: {
3690 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3693 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
: {
3694 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3697 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
: {
3698 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr
, NDR_SCALARS
, &r
->full_info
));
3701 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
: {
3702 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info_internal
));
3705 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
: {
3706 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_SCALARS
, &r
->full_info_internal
));
3709 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
: {
3710 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info_ex2_internal
));
3713 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
: {
3714 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_SCALARS
, &r
->full_info2_internal
));
3717 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES
: {
3718 NDR_CHECK(ndr_push_lsa_TrustDomainInfoSupportedEncTypes(ndr
, NDR_SCALARS
, &r
->enc_types
));
3722 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3725 if (ndr_flags
& NDR_BUFFERS
) {
3726 int level
= ndr_push_get_switch_value(ndr
, r
);
3728 case LSA_TRUSTED_DOMAIN_INFO_NAME
:
3729 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr
, NDR_BUFFERS
, &r
->name
));
3732 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
:
3733 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr
, NDR_BUFFERS
, &r
->controllers
));
3736 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
:
3739 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
:
3740 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr
, NDR_BUFFERS
, &r
->password
));
3743 case LSA_TRUSTED_DOMAIN_INFO_BASIC
:
3744 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr
, NDR_BUFFERS
, &r
->info_basic
));
3747 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
:
3748 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3751 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
:
3752 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3755 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
:
3756 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr
, NDR_BUFFERS
, &r
->full_info
));
3759 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
:
3760 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info_internal
));
3763 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
:
3764 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_BUFFERS
, &r
->full_info_internal
));
3767 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
:
3768 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info_ex2_internal
));
3771 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
:
3772 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_BUFFERS
, &r
->full_info2_internal
));
3775 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES
:
3779 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3782 return NDR_ERR_SUCCESS
;
3785 static enum ndr_err_code
ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_TrustedDomainInfo
*r
)
3789 level
= ndr_pull_get_switch_value(ndr
, r
);
3790 if (ndr_flags
& NDR_SCALARS
) {
3791 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
3792 if (_level
!= level
) {
3793 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
3796 case LSA_TRUSTED_DOMAIN_INFO_NAME
: {
3797 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr
, NDR_SCALARS
, &r
->name
));
3800 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
: {
3801 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr
, NDR_SCALARS
, &r
->controllers
));
3804 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
: {
3805 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3808 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
: {
3809 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr
, NDR_SCALARS
, &r
->password
));
3812 case LSA_TRUSTED_DOMAIN_INFO_BASIC
: {
3813 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr
, NDR_SCALARS
, &r
->info_basic
));
3816 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
: {
3817 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3820 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
: {
3821 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3824 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
: {
3825 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr
, NDR_SCALARS
, &r
->full_info
));
3828 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
: {
3829 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info_internal
));
3832 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
: {
3833 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_SCALARS
, &r
->full_info_internal
));
3836 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
: {
3837 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info_ex2_internal
));
3840 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
: {
3841 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_SCALARS
, &r
->full_info2_internal
));
3844 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES
: {
3845 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(ndr
, NDR_SCALARS
, &r
->enc_types
));
3849 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3852 if (ndr_flags
& NDR_BUFFERS
) {
3854 case LSA_TRUSTED_DOMAIN_INFO_NAME
:
3855 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr
, NDR_BUFFERS
, &r
->name
));
3858 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
:
3859 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr
, NDR_BUFFERS
, &r
->controllers
));
3862 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
:
3865 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
:
3866 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr
, NDR_BUFFERS
, &r
->password
));
3869 case LSA_TRUSTED_DOMAIN_INFO_BASIC
:
3870 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr
, NDR_BUFFERS
, &r
->info_basic
));
3873 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
:
3874 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3877 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
:
3878 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3881 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
:
3882 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr
, NDR_BUFFERS
, &r
->full_info
));
3885 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
:
3886 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info_internal
));
3889 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
:
3890 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_BUFFERS
, &r
->full_info_internal
));
3893 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
:
3894 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info_ex2_internal
));
3897 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
:
3898 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_BUFFERS
, &r
->full_info2_internal
));
3901 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES
:
3905 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
3908 return NDR_ERR_SUCCESS
;
3911 _PUBLIC_
void ndr_print_lsa_TrustedDomainInfo(struct ndr_print
*ndr
, const char *name
, const union lsa_TrustedDomainInfo
*r
)
3914 level
= ndr_print_get_switch_value(ndr
, r
);
3915 ndr_print_union(ndr
, name
, level
, "lsa_TrustedDomainInfo");
3917 case LSA_TRUSTED_DOMAIN_INFO_NAME
:
3918 ndr_print_lsa_TrustDomainInfoName(ndr
, "name", &r
->name
);
3921 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
:
3922 ndr_print_lsa_TrustDomainInfoControllers(ndr
, "controllers", &r
->controllers
);
3925 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
:
3926 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3929 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
:
3930 ndr_print_lsa_TrustDomainInfoPassword(ndr
, "password", &r
->password
);
3933 case LSA_TRUSTED_DOMAIN_INFO_BASIC
:
3934 ndr_print_lsa_TrustDomainInfoBasic(ndr
, "info_basic", &r
->info_basic
);
3937 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
:
3938 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3941 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
:
3942 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr
, "auth_info", &r
->auth_info
);
3945 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
:
3946 ndr_print_lsa_TrustDomainInfoFullInfo(ndr
, "full_info", &r
->full_info
);
3949 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
:
3950 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info_internal", &r
->auth_info_internal
);
3953 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
:
3954 ndr_print_lsa_TrustDomainInfoFullInfoInternal(ndr
, "full_info_internal", &r
->full_info_internal
);
3957 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
:
3958 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr
, "info_ex2_internal", &r
->info_ex2_internal
);
3961 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
:
3962 ndr_print_lsa_TrustDomainInfoFullInfo2Internal(ndr
, "full_info2_internal", &r
->full_info2_internal
);
3965 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES
:
3966 ndr_print_lsa_TrustDomainInfoSupportedEncTypes(ndr
, "enc_types", &r
->enc_types
);
3970 ndr_print_bad_level(ndr
, name
, level
);
3974 static enum ndr_err_code
ndr_push_lsa_DATA_BUF_PTR(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DATA_BUF_PTR
*r
)
3976 if (ndr_flags
& NDR_SCALARS
) {
3977 NDR_CHECK(ndr_push_align(ndr
, 4));
3978 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->buf
));
3980 if (ndr_flags
& NDR_BUFFERS
) {
3982 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->buf
));
3985 return NDR_ERR_SUCCESS
;
3988 static enum ndr_err_code
ndr_pull_lsa_DATA_BUF_PTR(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DATA_BUF_PTR
*r
)
3991 TALLOC_CTX
*_mem_save_buf_0
;
3992 if (ndr_flags
& NDR_SCALARS
) {
3993 NDR_CHECK(ndr_pull_align(ndr
, 4));
3994 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buf
));
3996 NDR_PULL_ALLOC(ndr
, r
->buf
);
4001 if (ndr_flags
& NDR_BUFFERS
) {
4003 _mem_save_buf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4004 NDR_PULL_SET_MEM_CTX(ndr
, r
->buf
, 0);
4005 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->buf
));
4006 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buf_0
, 0);
4009 return NDR_ERR_SUCCESS
;
4012 _PUBLIC_
void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print
*ndr
, const char *name
, const struct lsa_DATA_BUF_PTR
*r
)
4014 ndr_print_struct(ndr
, name
, "lsa_DATA_BUF_PTR");
4016 ndr_print_ptr(ndr
, "buf", r
->buf
);
4019 ndr_print_lsa_DATA_BUF(ndr
, "buf", r
->buf
);
4025 static enum ndr_err_code
ndr_push_lsa_RightSet(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_RightSet
*r
)
4027 uint32_t cntr_names_1
;
4028 if (ndr_flags
& NDR_SCALARS
) {
4029 NDR_CHECK(ndr_push_align(ndr
, 4));
4030 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4031 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
4033 if (ndr_flags
& NDR_BUFFERS
) {
4035 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4036 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4037 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4039 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4040 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4044 return NDR_ERR_SUCCESS
;
4047 static enum ndr_err_code
ndr_pull_lsa_RightSet(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_RightSet
*r
)
4049 uint32_t _ptr_names
;
4050 uint32_t size_names_1
= 0;
4051 uint32_t cntr_names_1
;
4052 TALLOC_CTX
*_mem_save_names_0
;
4053 TALLOC_CTX
*_mem_save_names_1
;
4054 if (ndr_flags
& NDR_SCALARS
) {
4055 NDR_CHECK(ndr_pull_align(ndr
, 4));
4056 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4057 if (r
->count
> 256) {
4058 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4060 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
4062 NDR_PULL_ALLOC(ndr
, r
->names
);
4067 if (ndr_flags
& NDR_BUFFERS
) {
4069 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4070 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4071 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
4072 size_names_1
= ndr_get_array_size(ndr
, &r
->names
);
4073 NDR_PULL_ALLOC_N(ndr
, r
->names
, size_names_1
);
4074 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4075 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4076 for (cntr_names_1
= 0; cntr_names_1
< size_names_1
; cntr_names_1
++) {
4077 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4079 for (cntr_names_1
= 0; cntr_names_1
< size_names_1
; cntr_names_1
++) {
4080 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4082 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
4083 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
4086 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
4089 return NDR_ERR_SUCCESS
;
4092 _PUBLIC_
void ndr_print_lsa_RightSet(struct ndr_print
*ndr
, const char *name
, const struct lsa_RightSet
*r
)
4094 uint32_t cntr_names_1
;
4095 ndr_print_struct(ndr
, name
, "lsa_RightSet");
4097 ndr_print_uint32(ndr
, "count", r
->count
);
4098 ndr_print_ptr(ndr
, "names", r
->names
);
4101 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
4103 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
4105 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
4106 ndr_print_lsa_StringLarge(ndr
, "names", &r
->names
[cntr_names_1
]);
4116 static enum ndr_err_code
ndr_push_lsa_DomainListEx(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainListEx
*r
)
4118 uint32_t cntr_domains_1
;
4119 if (ndr_flags
& NDR_SCALARS
) {
4120 NDR_CHECK(ndr_push_align(ndr
, 4));
4121 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4122 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domains
));
4124 if (ndr_flags
& NDR_BUFFERS
) {
4126 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4127 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
4128 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
4130 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
4131 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
4135 return NDR_ERR_SUCCESS
;
4138 static enum ndr_err_code
ndr_pull_lsa_DomainListEx(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainListEx
*r
)
4140 uint32_t _ptr_domains
;
4141 uint32_t size_domains_1
= 0;
4142 uint32_t cntr_domains_1
;
4143 TALLOC_CTX
*_mem_save_domains_0
;
4144 TALLOC_CTX
*_mem_save_domains_1
;
4145 if (ndr_flags
& NDR_SCALARS
) {
4146 NDR_CHECK(ndr_pull_align(ndr
, 4));
4147 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4148 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
4150 NDR_PULL_ALLOC(ndr
, r
->domains
);
4155 if (ndr_flags
& NDR_BUFFERS
) {
4157 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4158 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
4159 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domains
));
4160 size_domains_1
= ndr_get_array_size(ndr
, &r
->domains
);
4161 NDR_PULL_ALLOC_N(ndr
, r
->domains
, size_domains_1
);
4162 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4163 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
4164 for (cntr_domains_1
= 0; cntr_domains_1
< size_domains_1
; cntr_domains_1
++) {
4165 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
4167 for (cntr_domains_1
= 0; cntr_domains_1
< size_domains_1
; cntr_domains_1
++) {
4168 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
4170 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
4171 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, 0);
4174 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->domains
, r
->count
));
4177 return NDR_ERR_SUCCESS
;
4180 _PUBLIC_
void ndr_print_lsa_DomainListEx(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainListEx
*r
)
4182 uint32_t cntr_domains_1
;
4183 ndr_print_struct(ndr
, name
, "lsa_DomainListEx");
4185 ndr_print_uint32(ndr
, "count", r
->count
);
4186 ndr_print_ptr(ndr
, "domains", r
->domains
);
4189 ndr
->print(ndr
, "%s: ARRAY(%d)", "domains", (int)r
->count
);
4191 for (cntr_domains_1
=0;cntr_domains_1
<r
->count
;cntr_domains_1
++) {
4193 if (asprintf(&idx_1
, "[%d]", cntr_domains_1
) != -1) {
4194 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "domains", &r
->domains
[cntr_domains_1
]);
4204 static enum ndr_err_code
ndr_push_lsa_DomainInfoKerberos(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainInfoKerberos
*r
)
4206 if (ndr_flags
& NDR_SCALARS
) {
4207 NDR_CHECK(ndr_push_align(ndr
, 8));
4208 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->enforce_restrictions
));
4209 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->service_tkt_lifetime
));
4210 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->user_tkt_lifetime
));
4211 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->user_tkt_renewaltime
));
4212 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->clock_skew
));
4213 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown6
));
4215 if (ndr_flags
& NDR_BUFFERS
) {
4217 return NDR_ERR_SUCCESS
;
4220 static enum ndr_err_code
ndr_pull_lsa_DomainInfoKerberos(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainInfoKerberos
*r
)
4222 if (ndr_flags
& NDR_SCALARS
) {
4223 NDR_CHECK(ndr_pull_align(ndr
, 8));
4224 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->enforce_restrictions
));
4225 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->service_tkt_lifetime
));
4226 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->user_tkt_lifetime
));
4227 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->user_tkt_renewaltime
));
4228 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->clock_skew
));
4229 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown6
));
4231 if (ndr_flags
& NDR_BUFFERS
) {
4233 return NDR_ERR_SUCCESS
;
4236 _PUBLIC_
void ndr_print_lsa_DomainInfoKerberos(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainInfoKerberos
*r
)
4238 ndr_print_struct(ndr
, name
, "lsa_DomainInfoKerberos");
4240 ndr_print_uint32(ndr
, "enforce_restrictions", r
->enforce_restrictions
);
4241 ndr_print_hyper(ndr
, "service_tkt_lifetime", r
->service_tkt_lifetime
);
4242 ndr_print_hyper(ndr
, "user_tkt_lifetime", r
->user_tkt_lifetime
);
4243 ndr_print_hyper(ndr
, "user_tkt_renewaltime", r
->user_tkt_renewaltime
);
4244 ndr_print_hyper(ndr
, "clock_skew", r
->clock_skew
);
4245 ndr_print_hyper(ndr
, "unknown6", r
->unknown6
);
4249 static enum ndr_err_code
ndr_push_lsa_DomainInfoEfs(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainInfoEfs
*r
)
4251 if (ndr_flags
& NDR_SCALARS
) {
4252 NDR_CHECK(ndr_push_align(ndr
, 4));
4253 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->blob_size
));
4254 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->efs_blob
));
4256 if (ndr_flags
& NDR_BUFFERS
) {
4258 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->blob_size
));
4259 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->efs_blob
, r
->blob_size
));
4262 return NDR_ERR_SUCCESS
;
4265 static enum ndr_err_code
ndr_pull_lsa_DomainInfoEfs(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainInfoEfs
*r
)
4267 uint32_t _ptr_efs_blob
;
4268 uint32_t size_efs_blob_1
= 0;
4269 TALLOC_CTX
*_mem_save_efs_blob_0
;
4270 if (ndr_flags
& NDR_SCALARS
) {
4271 NDR_CHECK(ndr_pull_align(ndr
, 4));
4272 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->blob_size
));
4273 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_efs_blob
));
4274 if (_ptr_efs_blob
) {
4275 NDR_PULL_ALLOC(ndr
, r
->efs_blob
);
4280 if (ndr_flags
& NDR_BUFFERS
) {
4282 _mem_save_efs_blob_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4283 NDR_PULL_SET_MEM_CTX(ndr
, r
->efs_blob
, 0);
4284 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->efs_blob
));
4285 size_efs_blob_1
= ndr_get_array_size(ndr
, &r
->efs_blob
);
4286 NDR_PULL_ALLOC_N(ndr
, r
->efs_blob
, size_efs_blob_1
);
4287 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->efs_blob
, size_efs_blob_1
));
4288 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_efs_blob_0
, 0);
4291 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->efs_blob
, r
->blob_size
));
4294 return NDR_ERR_SUCCESS
;
4297 _PUBLIC_
void ndr_print_lsa_DomainInfoEfs(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainInfoEfs
*r
)
4299 ndr_print_struct(ndr
, name
, "lsa_DomainInfoEfs");
4301 ndr_print_uint32(ndr
, "blob_size", r
->blob_size
);
4302 ndr_print_ptr(ndr
, "efs_blob", r
->efs_blob
);
4305 ndr_print_array_uint8(ndr
, "efs_blob", r
->efs_blob
, r
->blob_size
);
4311 static enum ndr_err_code
ndr_push_lsa_DomainInformationPolicy(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_DomainInformationPolicy
*r
)
4313 if (ndr_flags
& NDR_SCALARS
) {
4314 int level
= ndr_push_get_switch_value(ndr
, r
);
4315 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
4317 case LSA_DOMAIN_INFO_POLICY_EFS
: {
4318 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr
, NDR_SCALARS
, &r
->efs_info
));
4321 case LSA_DOMAIN_INFO_POLICY_KERBEROS
: {
4322 NDR_CHECK(ndr_push_lsa_DomainInfoKerberos(ndr
, NDR_SCALARS
, &r
->kerberos_info
));
4326 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4329 if (ndr_flags
& NDR_BUFFERS
) {
4330 int level
= ndr_push_get_switch_value(ndr
, r
);
4332 case LSA_DOMAIN_INFO_POLICY_EFS
:
4333 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr
, NDR_BUFFERS
, &r
->efs_info
));
4336 case LSA_DOMAIN_INFO_POLICY_KERBEROS
:
4340 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4343 return NDR_ERR_SUCCESS
;
4346 static enum ndr_err_code
ndr_pull_lsa_DomainInformationPolicy(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_DomainInformationPolicy
*r
)
4350 level
= ndr_pull_get_switch_value(ndr
, r
);
4351 if (ndr_flags
& NDR_SCALARS
) {
4352 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
4353 if (_level
!= level
) {
4354 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
4357 case LSA_DOMAIN_INFO_POLICY_EFS
: {
4358 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr
, NDR_SCALARS
, &r
->efs_info
));
4361 case LSA_DOMAIN_INFO_POLICY_KERBEROS
: {
4362 NDR_CHECK(ndr_pull_lsa_DomainInfoKerberos(ndr
, NDR_SCALARS
, &r
->kerberos_info
));
4366 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4369 if (ndr_flags
& NDR_BUFFERS
) {
4371 case LSA_DOMAIN_INFO_POLICY_EFS
:
4372 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr
, NDR_BUFFERS
, &r
->efs_info
));
4375 case LSA_DOMAIN_INFO_POLICY_KERBEROS
:
4379 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
4382 return NDR_ERR_SUCCESS
;
4385 _PUBLIC_
void ndr_print_lsa_DomainInformationPolicy(struct ndr_print
*ndr
, const char *name
, const union lsa_DomainInformationPolicy
*r
)
4388 level
= ndr_print_get_switch_value(ndr
, r
);
4389 ndr_print_union(ndr
, name
, level
, "lsa_DomainInformationPolicy");
4391 case LSA_DOMAIN_INFO_POLICY_EFS
:
4392 ndr_print_lsa_DomainInfoEfs(ndr
, "efs_info", &r
->efs_info
);
4395 case LSA_DOMAIN_INFO_POLICY_KERBEROS
:
4396 ndr_print_lsa_DomainInfoKerberos(ndr
, "kerberos_info", &r
->kerberos_info
);
4400 ndr_print_bad_level(ndr
, name
, level
);
4404 static enum ndr_err_code
ndr_push_lsa_TranslatedName2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedName2
*r
)
4406 if (ndr_flags
& NDR_SCALARS
) {
4407 NDR_CHECK(ndr_push_align(ndr
, 4));
4408 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
4409 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
4410 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
4411 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
4413 if (ndr_flags
& NDR_BUFFERS
) {
4414 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
4416 return NDR_ERR_SUCCESS
;
4419 static enum ndr_err_code
ndr_pull_lsa_TranslatedName2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedName2
*r
)
4421 if (ndr_flags
& NDR_SCALARS
) {
4422 NDR_CHECK(ndr_pull_align(ndr
, 4));
4423 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
4424 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
4425 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
4426 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
4428 if (ndr_flags
& NDR_BUFFERS
) {
4429 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
4431 return NDR_ERR_SUCCESS
;
4434 _PUBLIC_
void ndr_print_lsa_TranslatedName2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedName2
*r
)
4436 ndr_print_struct(ndr
, name
, "lsa_TranslatedName2");
4438 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
4439 ndr_print_lsa_String(ndr
, "name", &r
->name
);
4440 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
4441 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
4445 static enum ndr_err_code
ndr_push_lsa_TransNameArray2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransNameArray2
*r
)
4447 uint32_t cntr_names_1
;
4448 if (ndr_flags
& NDR_SCALARS
) {
4449 NDR_CHECK(ndr_push_align(ndr
, 4));
4450 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4451 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
4453 if (ndr_flags
& NDR_BUFFERS
) {
4455 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4456 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4457 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4459 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4460 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4464 return NDR_ERR_SUCCESS
;
4467 static enum ndr_err_code
ndr_pull_lsa_TransNameArray2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransNameArray2
*r
)
4469 uint32_t _ptr_names
;
4470 uint32_t size_names_1
= 0;
4471 uint32_t cntr_names_1
;
4472 TALLOC_CTX
*_mem_save_names_0
;
4473 TALLOC_CTX
*_mem_save_names_1
;
4474 if (ndr_flags
& NDR_SCALARS
) {
4475 NDR_CHECK(ndr_pull_align(ndr
, 4));
4476 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4477 if (r
->count
> 1000) {
4478 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4480 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
4482 NDR_PULL_ALLOC(ndr
, r
->names
);
4487 if (ndr_flags
& NDR_BUFFERS
) {
4489 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4490 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4491 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
4492 size_names_1
= ndr_get_array_size(ndr
, &r
->names
);
4493 NDR_PULL_ALLOC_N(ndr
, r
->names
, size_names_1
);
4494 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4495 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4496 for (cntr_names_1
= 0; cntr_names_1
< size_names_1
; cntr_names_1
++) {
4497 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4499 for (cntr_names_1
= 0; cntr_names_1
< size_names_1
; cntr_names_1
++) {
4500 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4502 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
4503 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
4506 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
4509 return NDR_ERR_SUCCESS
;
4512 _PUBLIC_
void ndr_print_lsa_TransNameArray2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransNameArray2
*r
)
4514 uint32_t cntr_names_1
;
4515 ndr_print_struct(ndr
, name
, "lsa_TransNameArray2");
4517 ndr_print_uint32(ndr
, "count", r
->count
);
4518 ndr_print_ptr(ndr
, "names", r
->names
);
4521 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
4523 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
4525 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
4526 ndr_print_lsa_TranslatedName2(ndr
, "names", &r
->names
[cntr_names_1
]);
4536 static enum ndr_err_code
ndr_push_lsa_TranslatedSid2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedSid2
*r
)
4538 if (ndr_flags
& NDR_SCALARS
) {
4539 NDR_CHECK(ndr_push_align(ndr
, 4));
4540 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
4541 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4542 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
4543 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
4545 if (ndr_flags
& NDR_BUFFERS
) {
4547 return NDR_ERR_SUCCESS
;
4550 static enum ndr_err_code
ndr_pull_lsa_TranslatedSid2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedSid2
*r
)
4552 if (ndr_flags
& NDR_SCALARS
) {
4553 NDR_CHECK(ndr_pull_align(ndr
, 4));
4554 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
4555 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4556 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
4557 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
4559 if (ndr_flags
& NDR_BUFFERS
) {
4561 return NDR_ERR_SUCCESS
;
4564 _PUBLIC_
void ndr_print_lsa_TranslatedSid2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedSid2
*r
)
4566 ndr_print_struct(ndr
, name
, "lsa_TranslatedSid2");
4568 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
4569 ndr_print_uint32(ndr
, "rid", r
->rid
);
4570 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
4571 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
4575 static enum ndr_err_code
ndr_push_lsa_TransSidArray2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransSidArray2
*r
)
4577 uint32_t cntr_sids_1
;
4578 if (ndr_flags
& NDR_SCALARS
) {
4579 NDR_CHECK(ndr_push_align(ndr
, 4));
4580 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4581 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
4583 if (ndr_flags
& NDR_BUFFERS
) {
4585 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4586 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4587 NDR_CHECK(ndr_push_lsa_TranslatedSid2(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4591 return NDR_ERR_SUCCESS
;
4594 static enum ndr_err_code
ndr_pull_lsa_TransSidArray2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransSidArray2
*r
)
4597 uint32_t size_sids_1
= 0;
4598 uint32_t cntr_sids_1
;
4599 TALLOC_CTX
*_mem_save_sids_0
;
4600 TALLOC_CTX
*_mem_save_sids_1
;
4601 if (ndr_flags
& NDR_SCALARS
) {
4602 NDR_CHECK(ndr_pull_align(ndr
, 4));
4603 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4604 if (r
->count
> 1000) {
4605 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4607 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
4609 NDR_PULL_ALLOC(ndr
, r
->sids
);
4614 if (ndr_flags
& NDR_BUFFERS
) {
4616 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4617 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4618 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
4619 size_sids_1
= ndr_get_array_size(ndr
, &r
->sids
);
4620 NDR_PULL_ALLOC_N(ndr
, r
->sids
, size_sids_1
);
4621 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4622 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4623 for (cntr_sids_1
= 0; cntr_sids_1
< size_sids_1
; cntr_sids_1
++) {
4624 NDR_CHECK(ndr_pull_lsa_TranslatedSid2(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4626 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
4627 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
4630 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->count
));
4633 return NDR_ERR_SUCCESS
;
4636 _PUBLIC_
void ndr_print_lsa_TransSidArray2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransSidArray2
*r
)
4638 uint32_t cntr_sids_1
;
4639 ndr_print_struct(ndr
, name
, "lsa_TransSidArray2");
4641 ndr_print_uint32(ndr
, "count", r
->count
);
4642 ndr_print_ptr(ndr
, "sids", r
->sids
);
4645 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->count
);
4647 for (cntr_sids_1
=0;cntr_sids_1
<r
->count
;cntr_sids_1
++) {
4649 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
4650 ndr_print_lsa_TranslatedSid2(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
4660 static enum ndr_err_code
ndr_push_lsa_TranslatedSid3(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedSid3
*r
)
4662 if (ndr_flags
& NDR_SCALARS
) {
4663 NDR_CHECK(ndr_push_align(ndr
, 4));
4664 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
4665 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
4666 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
4667 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
4669 if (ndr_flags
& NDR_BUFFERS
) {
4671 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4674 return NDR_ERR_SUCCESS
;
4677 static enum ndr_err_code
ndr_pull_lsa_TranslatedSid3(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedSid3
*r
)
4680 TALLOC_CTX
*_mem_save_sid_0
;
4681 if (ndr_flags
& NDR_SCALARS
) {
4682 NDR_CHECK(ndr_pull_align(ndr
, 4));
4683 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
4684 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
4686 NDR_PULL_ALLOC(ndr
, r
->sid
);
4690 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
4691 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
4693 if (ndr_flags
& NDR_BUFFERS
) {
4695 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4696 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
4697 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4698 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
4701 return NDR_ERR_SUCCESS
;
4704 _PUBLIC_
void ndr_print_lsa_TranslatedSid3(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedSid3
*r
)
4706 ndr_print_struct(ndr
, name
, "lsa_TranslatedSid3");
4708 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
4709 ndr_print_ptr(ndr
, "sid", r
->sid
);
4712 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
4715 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
4716 ndr_print_uint32(ndr
, "flags", r
->flags
);
4720 static enum ndr_err_code
ndr_push_lsa_TransSidArray3(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransSidArray3
*r
)
4722 uint32_t cntr_sids_1
;
4723 if (ndr_flags
& NDR_SCALARS
) {
4724 NDR_CHECK(ndr_push_align(ndr
, 4));
4725 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4726 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
4728 if (ndr_flags
& NDR_BUFFERS
) {
4730 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4731 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4732 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4734 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4735 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
4739 return NDR_ERR_SUCCESS
;
4742 static enum ndr_err_code
ndr_pull_lsa_TransSidArray3(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransSidArray3
*r
)
4745 uint32_t size_sids_1
= 0;
4746 uint32_t cntr_sids_1
;
4747 TALLOC_CTX
*_mem_save_sids_0
;
4748 TALLOC_CTX
*_mem_save_sids_1
;
4749 if (ndr_flags
& NDR_SCALARS
) {
4750 NDR_CHECK(ndr_pull_align(ndr
, 4));
4751 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4752 if (r
->count
> 1000) {
4753 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4755 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
4757 NDR_PULL_ALLOC(ndr
, r
->sids
);
4762 if (ndr_flags
& NDR_BUFFERS
) {
4764 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4765 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4766 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
4767 size_sids_1
= ndr_get_array_size(ndr
, &r
->sids
);
4768 NDR_PULL_ALLOC_N(ndr
, r
->sids
, size_sids_1
);
4769 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4770 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4771 for (cntr_sids_1
= 0; cntr_sids_1
< size_sids_1
; cntr_sids_1
++) {
4772 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4774 for (cntr_sids_1
= 0; cntr_sids_1
< size_sids_1
; cntr_sids_1
++) {
4775 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
4777 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
4778 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
4781 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->count
));
4784 return NDR_ERR_SUCCESS
;
4787 _PUBLIC_
void ndr_print_lsa_TransSidArray3(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransSidArray3
*r
)
4789 uint32_t cntr_sids_1
;
4790 ndr_print_struct(ndr
, name
, "lsa_TransSidArray3");
4792 ndr_print_uint32(ndr
, "count", r
->count
);
4793 ndr_print_ptr(ndr
, "sids", r
->sids
);
4796 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->count
);
4798 for (cntr_sids_1
=0;cntr_sids_1
<r
->count
;cntr_sids_1
++) {
4800 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
4801 ndr_print_lsa_TranslatedSid3(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
4811 static enum ndr_err_code
ndr_push_lsa_ForestTrustBinaryData(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustBinaryData
*r
)
4813 if (ndr_flags
& NDR_SCALARS
) {
4814 NDR_CHECK(ndr_push_align(ndr
, 4));
4815 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
4816 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
4818 if (ndr_flags
& NDR_BUFFERS
) {
4820 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
4821 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
4824 return NDR_ERR_SUCCESS
;
4827 static enum ndr_err_code
ndr_pull_lsa_ForestTrustBinaryData(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustBinaryData
*r
)
4830 uint32_t size_data_1
= 0;
4831 TALLOC_CTX
*_mem_save_data_0
;
4832 if (ndr_flags
& NDR_SCALARS
) {
4833 NDR_CHECK(ndr_pull_align(ndr
, 4));
4834 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
4835 if (r
->length
> 131072) {
4836 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4838 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
4840 NDR_PULL_ALLOC(ndr
, r
->data
);
4845 if (ndr_flags
& NDR_BUFFERS
) {
4847 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4848 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
4849 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
4850 size_data_1
= ndr_get_array_size(ndr
, &r
->data
);
4851 NDR_PULL_ALLOC_N(ndr
, r
->data
, size_data_1
);
4852 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, size_data_1
));
4853 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
4856 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->length
));
4859 return NDR_ERR_SUCCESS
;
4862 _PUBLIC_
void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustBinaryData
*r
)
4864 ndr_print_struct(ndr
, name
, "lsa_ForestTrustBinaryData");
4866 ndr_print_uint32(ndr
, "length", r
->length
);
4867 ndr_print_ptr(ndr
, "data", r
->data
);
4870 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
4876 static enum ndr_err_code
ndr_push_lsa_ForestTrustDomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustDomainInfo
*r
)
4878 if (ndr_flags
& NDR_SCALARS
) {
4879 NDR_CHECK(ndr_push_align(ndr
, 4));
4880 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_sid
));
4881 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain_name
));
4882 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_domain_name
));
4884 if (ndr_flags
& NDR_BUFFERS
) {
4885 if (r
->domain_sid
) {
4886 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain_sid
));
4888 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain_name
));
4889 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_domain_name
));
4891 return NDR_ERR_SUCCESS
;
4894 static enum ndr_err_code
ndr_pull_lsa_ForestTrustDomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustDomainInfo
*r
)
4896 uint32_t _ptr_domain_sid
;
4897 TALLOC_CTX
*_mem_save_domain_sid_0
;
4898 if (ndr_flags
& NDR_SCALARS
) {
4899 NDR_CHECK(ndr_pull_align(ndr
, 4));
4900 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_sid
));
4901 if (_ptr_domain_sid
) {
4902 NDR_PULL_ALLOC(ndr
, r
->domain_sid
);
4904 r
->domain_sid
= NULL
;
4906 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain_name
));
4907 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_domain_name
));
4909 if (ndr_flags
& NDR_BUFFERS
) {
4910 if (r
->domain_sid
) {
4911 _mem_save_domain_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4912 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_sid
, 0);
4913 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain_sid
));
4914 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_sid_0
, 0);
4916 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain_name
));
4917 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_domain_name
));
4919 return NDR_ERR_SUCCESS
;
4922 _PUBLIC_
void ndr_print_lsa_ForestTrustDomainInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustDomainInfo
*r
)
4924 ndr_print_struct(ndr
, name
, "lsa_ForestTrustDomainInfo");
4926 ndr_print_ptr(ndr
, "domain_sid", r
->domain_sid
);
4928 if (r
->domain_sid
) {
4929 ndr_print_dom_sid2(ndr
, "domain_sid", r
->domain_sid
);
4932 ndr_print_lsa_StringLarge(ndr
, "dns_domain_name", &r
->dns_domain_name
);
4933 ndr_print_lsa_StringLarge(ndr
, "netbios_domain_name", &r
->netbios_domain_name
);
4937 static enum ndr_err_code
ndr_push_lsa_ForestTrustData(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_ForestTrustData
*r
)
4939 if (ndr_flags
& NDR_SCALARS
) {
4940 int level
= ndr_push_get_switch_value(ndr
, r
);
4941 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
4943 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
: {
4944 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->top_level_name
));
4947 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
: {
4948 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->top_level_name_ex
));
4951 case LSA_FOREST_TRUST_DOMAIN_INFO
: {
4952 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr
, NDR_SCALARS
, &r
->domain_info
));
4956 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr
, NDR_SCALARS
, &r
->data
));
4961 if (ndr_flags
& NDR_BUFFERS
) {
4962 int level
= ndr_push_get_switch_value(ndr
, r
);
4964 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
:
4965 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->top_level_name
));
4968 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
:
4969 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->top_level_name_ex
));
4972 case LSA_FOREST_TRUST_DOMAIN_INFO
:
4973 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr
, NDR_BUFFERS
, &r
->domain_info
));
4977 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr
, NDR_BUFFERS
, &r
->data
));
4982 return NDR_ERR_SUCCESS
;
4985 static enum ndr_err_code
ndr_pull_lsa_ForestTrustData(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_ForestTrustData
*r
)
4989 level
= ndr_pull_get_switch_value(ndr
, r
);
4990 if (ndr_flags
& NDR_SCALARS
) {
4991 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
4992 if (_level
!= level
) {
4993 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
4996 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
: {
4997 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->top_level_name
));
5000 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
: {
5001 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->top_level_name_ex
));
5004 case LSA_FOREST_TRUST_DOMAIN_INFO
: {
5005 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr
, NDR_SCALARS
, &r
->domain_info
));
5009 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr
, NDR_SCALARS
, &r
->data
));
5014 if (ndr_flags
& NDR_BUFFERS
) {
5016 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
:
5017 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->top_level_name
));
5020 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
:
5021 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->top_level_name_ex
));
5024 case LSA_FOREST_TRUST_DOMAIN_INFO
:
5025 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr
, NDR_BUFFERS
, &r
->domain_info
));
5029 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr
, NDR_BUFFERS
, &r
->data
));
5034 return NDR_ERR_SUCCESS
;
5037 _PUBLIC_
void ndr_print_lsa_ForestTrustData(struct ndr_print
*ndr
, const char *name
, const union lsa_ForestTrustData
*r
)
5040 level
= ndr_print_get_switch_value(ndr
, r
);
5041 ndr_print_union(ndr
, name
, level
, "lsa_ForestTrustData");
5043 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
:
5044 ndr_print_lsa_String(ndr
, "top_level_name", &r
->top_level_name
);
5047 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
:
5048 ndr_print_lsa_StringLarge(ndr
, "top_level_name_ex", &r
->top_level_name_ex
);
5051 case LSA_FOREST_TRUST_DOMAIN_INFO
:
5052 ndr_print_lsa_ForestTrustDomainInfo(ndr
, "domain_info", &r
->domain_info
);
5056 ndr_print_lsa_ForestTrustBinaryData(ndr
, "data", &r
->data
);
5062 static enum ndr_err_code
ndr_push_lsa_ForestTrustRecordType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_ForestTrustRecordType r
)
5064 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
5065 return NDR_ERR_SUCCESS
;
5068 static enum ndr_err_code
ndr_pull_lsa_ForestTrustRecordType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_ForestTrustRecordType
*r
)
5071 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
5073 return NDR_ERR_SUCCESS
;
5076 _PUBLIC_
void ndr_print_lsa_ForestTrustRecordType(struct ndr_print
*ndr
, const char *name
, enum lsa_ForestTrustRecordType r
)
5078 const char *val
= NULL
;
5081 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
: val
= "LSA_FOREST_TRUST_TOP_LEVEL_NAME"; break;
5082 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
: val
= "LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX"; break;
5083 case LSA_FOREST_TRUST_DOMAIN_INFO
: val
= "LSA_FOREST_TRUST_DOMAIN_INFO"; break;
5084 case LSA_FOREST_TRUST_RECORD_TYPE_LAST
: val
= "LSA_FOREST_TRUST_RECORD_TYPE_LAST"; break;
5086 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
5089 static enum ndr_err_code
ndr_push_lsa_ForestTrustRecord(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustRecord
*r
)
5091 if (ndr_flags
& NDR_SCALARS
) {
5092 NDR_CHECK(ndr_push_align(ndr
, 8));
5093 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
5094 NDR_CHECK(ndr_push_lsa_ForestTrustRecordType(ndr
, NDR_SCALARS
, r
->level
));
5095 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown
));
5096 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->forest_trust_data
, r
->level
));
5097 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr
, NDR_SCALARS
, &r
->forest_trust_data
));
5099 if (ndr_flags
& NDR_BUFFERS
) {
5100 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr
, NDR_BUFFERS
, &r
->forest_trust_data
));
5102 return NDR_ERR_SUCCESS
;
5105 static enum ndr_err_code
ndr_pull_lsa_ForestTrustRecord(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustRecord
*r
)
5107 if (ndr_flags
& NDR_SCALARS
) {
5108 NDR_CHECK(ndr_pull_align(ndr
, 8));
5109 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
5110 NDR_CHECK(ndr_pull_lsa_ForestTrustRecordType(ndr
, NDR_SCALARS
, &r
->level
));
5111 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown
));
5112 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->forest_trust_data
, r
->level
));
5113 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr
, NDR_SCALARS
, &r
->forest_trust_data
));
5115 if (ndr_flags
& NDR_BUFFERS
) {
5116 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr
, NDR_BUFFERS
, &r
->forest_trust_data
));
5118 return NDR_ERR_SUCCESS
;
5121 _PUBLIC_
void ndr_print_lsa_ForestTrustRecord(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustRecord
*r
)
5123 ndr_print_struct(ndr
, name
, "lsa_ForestTrustRecord");
5125 ndr_print_uint32(ndr
, "flags", r
->flags
);
5126 ndr_print_lsa_ForestTrustRecordType(ndr
, "level", r
->level
);
5127 ndr_print_hyper(ndr
, "unknown", r
->unknown
);
5128 ndr_print_set_switch_value(ndr
, &r
->forest_trust_data
, r
->level
);
5129 ndr_print_lsa_ForestTrustData(ndr
, "forest_trust_data", &r
->forest_trust_data
);
5133 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_ForestTrustInformation(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustInformation
*r
)
5135 uint32_t cntr_entries_1
;
5136 if (ndr_flags
& NDR_SCALARS
) {
5137 NDR_CHECK(ndr_push_align(ndr
, 4));
5138 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
5139 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
));
5141 if (ndr_flags
& NDR_BUFFERS
) {
5143 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
5144 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
5145 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
[cntr_entries_1
]));
5147 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
5148 if (r
->entries
[cntr_entries_1
]) {
5149 NDR_CHECK(ndr_push_lsa_ForestTrustRecord(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->entries
[cntr_entries_1
]));
5154 return NDR_ERR_SUCCESS
;
5157 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_ForestTrustInformation(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustInformation
*r
)
5159 uint32_t _ptr_entries
;
5160 uint32_t size_entries_1
= 0;
5161 uint32_t cntr_entries_1
;
5162 TALLOC_CTX
*_mem_save_entries_0
;
5163 TALLOC_CTX
*_mem_save_entries_1
;
5164 TALLOC_CTX
*_mem_save_entries_2
;
5165 if (ndr_flags
& NDR_SCALARS
) {
5166 NDR_CHECK(ndr_pull_align(ndr
, 4));
5167 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
5168 if (r
->count
> 4000) {
5169 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
5171 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
5173 NDR_PULL_ALLOC(ndr
, r
->entries
);
5178 if (ndr_flags
& NDR_BUFFERS
) {
5180 _mem_save_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5181 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
5182 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entries
));
5183 size_entries_1
= ndr_get_array_size(ndr
, &r
->entries
);
5184 NDR_PULL_ALLOC_N(ndr
, r
->entries
, size_entries_1
);
5185 _mem_save_entries_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5186 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
5187 for (cntr_entries_1
= 0; cntr_entries_1
< size_entries_1
; cntr_entries_1
++) {
5188 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
5190 NDR_PULL_ALLOC(ndr
, r
->entries
[cntr_entries_1
]);
5192 r
->entries
[cntr_entries_1
] = NULL
;
5195 for (cntr_entries_1
= 0; cntr_entries_1
< size_entries_1
; cntr_entries_1
++) {
5196 if (r
->entries
[cntr_entries_1
]) {
5197 _mem_save_entries_2
= NDR_PULL_GET_MEM_CTX(ndr
);
5198 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
[cntr_entries_1
], 0);
5199 NDR_CHECK(ndr_pull_lsa_ForestTrustRecord(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->entries
[cntr_entries_1
]));
5200 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_2
, 0);
5203 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_1
, 0);
5204 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_0
, 0);
5207 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->entries
, r
->count
));
5210 return NDR_ERR_SUCCESS
;
5213 _PUBLIC_
void ndr_print_lsa_ForestTrustInformation(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustInformation
*r
)
5215 uint32_t cntr_entries_1
;
5216 ndr_print_struct(ndr
, name
, "lsa_ForestTrustInformation");
5218 ndr_print_uint32(ndr
, "count", r
->count
);
5219 ndr_print_ptr(ndr
, "entries", r
->entries
);
5222 ndr
->print(ndr
, "%s: ARRAY(%d)", "entries", (int)r
->count
);
5224 for (cntr_entries_1
=0;cntr_entries_1
<r
->count
;cntr_entries_1
++) {
5226 if (asprintf(&idx_1
, "[%d]", cntr_entries_1
) != -1) {
5227 ndr_print_ptr(ndr
, "entries", r
->entries
[cntr_entries_1
]);
5229 if (r
->entries
[cntr_entries_1
]) {
5230 ndr_print_lsa_ForestTrustRecord(ndr
, "entries", r
->entries
[cntr_entries_1
]);
5242 static enum ndr_err_code
ndr_push_lsa_Close(struct ndr_push
*ndr
, int flags
, const struct lsa_Close
*r
)
5244 if (flags
& NDR_IN
) {
5245 if (r
->in
.handle
== NULL
) {
5246 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5248 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5250 if (flags
& NDR_OUT
) {
5251 if (r
->out
.handle
== NULL
) {
5252 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5254 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5255 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5257 return NDR_ERR_SUCCESS
;
5260 static enum ndr_err_code
ndr_pull_lsa_Close(struct ndr_pull
*ndr
, int flags
, struct lsa_Close
*r
)
5262 TALLOC_CTX
*_mem_save_handle_0
;
5263 if (flags
& NDR_IN
) {
5264 ZERO_STRUCT(r
->out
);
5266 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5267 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5269 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5270 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5271 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5272 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5273 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5274 *r
->out
.handle
= *r
->in
.handle
;
5276 if (flags
& NDR_OUT
) {
5277 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5278 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5280 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5281 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5282 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5283 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5284 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5286 return NDR_ERR_SUCCESS
;
5289 _PUBLIC_
void ndr_print_lsa_Close(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_Close
*r
)
5291 ndr_print_struct(ndr
, name
, "lsa_Close");
5293 if (flags
& NDR_SET_VALUES
) {
5294 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5296 if (flags
& NDR_IN
) {
5297 ndr_print_struct(ndr
, "in", "lsa_Close");
5299 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5301 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5305 if (flags
& NDR_OUT
) {
5306 ndr_print_struct(ndr
, "out", "lsa_Close");
5308 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
5310 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
5312 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5318 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_Delete(struct ndr_push
*ndr
, int flags
, const struct lsa_Delete
*r
)
5320 if (flags
& NDR_IN
) {
5321 if (r
->in
.handle
== NULL
) {
5322 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5324 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5326 if (flags
& NDR_OUT
) {
5327 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5329 return NDR_ERR_SUCCESS
;
5332 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_Delete(struct ndr_pull
*ndr
, int flags
, struct lsa_Delete
*r
)
5334 TALLOC_CTX
*_mem_save_handle_0
;
5335 if (flags
& NDR_IN
) {
5336 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5337 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5339 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5340 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5341 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5342 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5344 if (flags
& NDR_OUT
) {
5345 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5347 return NDR_ERR_SUCCESS
;
5350 _PUBLIC_
void ndr_print_lsa_Delete(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_Delete
*r
)
5352 ndr_print_struct(ndr
, name
, "lsa_Delete");
5354 if (flags
& NDR_SET_VALUES
) {
5355 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5357 if (flags
& NDR_IN
) {
5358 ndr_print_struct(ndr
, "in", "lsa_Delete");
5360 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5362 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5366 if (flags
& NDR_OUT
) {
5367 ndr_print_struct(ndr
, "out", "lsa_Delete");
5369 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5375 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_EnumPrivs(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumPrivs
*r
)
5377 if (flags
& NDR_IN
) {
5378 if (r
->in
.handle
== NULL
) {
5379 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5381 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5382 if (r
->in
.resume_handle
== NULL
) {
5383 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5385 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
5386 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_count
));
5388 if (flags
& NDR_OUT
) {
5389 if (r
->out
.resume_handle
== NULL
) {
5390 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5392 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
5393 if (r
->out
.privs
== NULL
) {
5394 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5396 NDR_CHECK(ndr_push_lsa_PrivArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.privs
));
5397 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5399 return NDR_ERR_SUCCESS
;
5402 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_EnumPrivs(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumPrivs
*r
)
5404 TALLOC_CTX
*_mem_save_handle_0
;
5405 TALLOC_CTX
*_mem_save_resume_handle_0
;
5406 TALLOC_CTX
*_mem_save_privs_0
;
5407 if (flags
& NDR_IN
) {
5408 ZERO_STRUCT(r
->out
);
5410 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5411 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5413 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5414 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5415 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5416 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5417 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5418 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
5420 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5421 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
5422 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
5423 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5424 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_count
));
5425 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
5426 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
5427 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
5428 ZERO_STRUCTP(r
->out
.privs
);
5430 if (flags
& NDR_OUT
) {
5431 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5432 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
5434 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5435 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
5436 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
5437 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5438 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5439 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
5441 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5442 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.privs
, LIBNDR_FLAG_REF_ALLOC
);
5443 NDR_CHECK(ndr_pull_lsa_PrivArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.privs
));
5444 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, LIBNDR_FLAG_REF_ALLOC
);
5445 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5447 return NDR_ERR_SUCCESS
;
5450 _PUBLIC_
void ndr_print_lsa_EnumPrivs(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumPrivs
*r
)
5452 ndr_print_struct(ndr
, name
, "lsa_EnumPrivs");
5454 if (flags
& NDR_SET_VALUES
) {
5455 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5457 if (flags
& NDR_IN
) {
5458 ndr_print_struct(ndr
, "in", "lsa_EnumPrivs");
5460 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5462 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5464 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
5466 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
5468 ndr_print_uint32(ndr
, "max_count", r
->in
.max_count
);
5471 if (flags
& NDR_OUT
) {
5472 ndr_print_struct(ndr
, "out", "lsa_EnumPrivs");
5474 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
5476 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
5478 ndr_print_ptr(ndr
, "privs", r
->out
.privs
);
5480 ndr_print_lsa_PrivArray(ndr
, "privs", r
->out
.privs
);
5482 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5488 static enum ndr_err_code
ndr_push_lsa_QuerySecurity(struct ndr_push
*ndr
, int flags
, const struct lsa_QuerySecurity
*r
)
5490 if (flags
& NDR_IN
) {
5491 if (r
->in
.handle
== NULL
) {
5492 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5494 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5495 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.sec_info
));
5497 if (flags
& NDR_OUT
) {
5498 if (r
->out
.sdbuf
== NULL
) {
5499 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5501 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sdbuf
));
5502 if (*r
->out
.sdbuf
) {
5503 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sdbuf
));
5505 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5507 return NDR_ERR_SUCCESS
;
5510 static enum ndr_err_code
ndr_pull_lsa_QuerySecurity(struct ndr_pull
*ndr
, int flags
, struct lsa_QuerySecurity
*r
)
5512 uint32_t _ptr_sdbuf
;
5513 TALLOC_CTX
*_mem_save_handle_0
;
5514 TALLOC_CTX
*_mem_save_sdbuf_0
;
5515 TALLOC_CTX
*_mem_save_sdbuf_1
;
5516 if (flags
& NDR_IN
) {
5517 ZERO_STRUCT(r
->out
);
5519 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5520 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5522 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5523 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5524 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5525 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5526 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.sec_info
));
5527 NDR_PULL_ALLOC(ndr
, r
->out
.sdbuf
);
5528 ZERO_STRUCTP(r
->out
.sdbuf
);
5530 if (flags
& NDR_OUT
) {
5531 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5532 NDR_PULL_ALLOC(ndr
, r
->out
.sdbuf
);
5534 _mem_save_sdbuf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5535 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sdbuf
, LIBNDR_FLAG_REF_ALLOC
);
5536 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sdbuf
));
5538 NDR_PULL_ALLOC(ndr
, *r
->out
.sdbuf
);
5540 *r
->out
.sdbuf
= NULL
;
5542 if (*r
->out
.sdbuf
) {
5543 _mem_save_sdbuf_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5544 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sdbuf
, 0);
5545 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sdbuf
));
5546 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_1
, 0);
5548 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_0
, LIBNDR_FLAG_REF_ALLOC
);
5549 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5551 return NDR_ERR_SUCCESS
;
5554 _PUBLIC_
void ndr_print_lsa_QuerySecurity(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QuerySecurity
*r
)
5556 ndr_print_struct(ndr
, name
, "lsa_QuerySecurity");
5558 if (flags
& NDR_SET_VALUES
) {
5559 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5561 if (flags
& NDR_IN
) {
5562 ndr_print_struct(ndr
, "in", "lsa_QuerySecurity");
5564 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5566 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5568 ndr_print_security_secinfo(ndr
, "sec_info", r
->in
.sec_info
);
5571 if (flags
& NDR_OUT
) {
5572 ndr_print_struct(ndr
, "out", "lsa_QuerySecurity");
5574 ndr_print_ptr(ndr
, "sdbuf", r
->out
.sdbuf
);
5576 ndr_print_ptr(ndr
, "sdbuf", *r
->out
.sdbuf
);
5578 if (*r
->out
.sdbuf
) {
5579 ndr_print_sec_desc_buf(ndr
, "sdbuf", *r
->out
.sdbuf
);
5583 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5589 static enum ndr_err_code
ndr_push_lsa_SetSecObj(struct ndr_push
*ndr
, int flags
, const struct lsa_SetSecObj
*r
)
5591 if (flags
& NDR_IN
) {
5592 if (r
->in
.handle
== NULL
) {
5593 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5595 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5596 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.sec_info
));
5597 if (r
->in
.sdbuf
== NULL
) {
5598 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5600 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sdbuf
));
5602 if (flags
& NDR_OUT
) {
5603 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5605 return NDR_ERR_SUCCESS
;
5608 static enum ndr_err_code
ndr_pull_lsa_SetSecObj(struct ndr_pull
*ndr
, int flags
, struct lsa_SetSecObj
*r
)
5610 TALLOC_CTX
*_mem_save_handle_0
;
5611 TALLOC_CTX
*_mem_save_sdbuf_0
;
5612 if (flags
& NDR_IN
) {
5613 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5614 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5616 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5617 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5618 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5619 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5620 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.sec_info
));
5621 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5622 NDR_PULL_ALLOC(ndr
, r
->in
.sdbuf
);
5624 _mem_save_sdbuf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5625 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sdbuf
, LIBNDR_FLAG_REF_ALLOC
);
5626 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sdbuf
));
5627 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_0
, LIBNDR_FLAG_REF_ALLOC
);
5629 if (flags
& NDR_OUT
) {
5630 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5632 return NDR_ERR_SUCCESS
;
5635 _PUBLIC_
void ndr_print_lsa_SetSecObj(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetSecObj
*r
)
5637 ndr_print_struct(ndr
, name
, "lsa_SetSecObj");
5639 if (flags
& NDR_SET_VALUES
) {
5640 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5642 if (flags
& NDR_IN
) {
5643 ndr_print_struct(ndr
, "in", "lsa_SetSecObj");
5645 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5647 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5649 ndr_print_security_secinfo(ndr
, "sec_info", r
->in
.sec_info
);
5650 ndr_print_ptr(ndr
, "sdbuf", r
->in
.sdbuf
);
5652 ndr_print_sec_desc_buf(ndr
, "sdbuf", r
->in
.sdbuf
);
5656 if (flags
& NDR_OUT
) {
5657 ndr_print_struct(ndr
, "out", "lsa_SetSecObj");
5659 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5665 static enum ndr_err_code
ndr_push_lsa_ChangePassword(struct ndr_push
*ndr
, int flags
, const struct lsa_ChangePassword
*r
)
5667 if (flags
& NDR_IN
) {
5669 if (flags
& NDR_OUT
) {
5670 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5672 return NDR_ERR_SUCCESS
;
5675 static enum ndr_err_code
ndr_pull_lsa_ChangePassword(struct ndr_pull
*ndr
, int flags
, struct lsa_ChangePassword
*r
)
5677 if (flags
& NDR_IN
) {
5679 if (flags
& NDR_OUT
) {
5680 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5682 return NDR_ERR_SUCCESS
;
5685 _PUBLIC_
void ndr_print_lsa_ChangePassword(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_ChangePassword
*r
)
5687 ndr_print_struct(ndr
, name
, "lsa_ChangePassword");
5689 if (flags
& NDR_SET_VALUES
) {
5690 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5692 if (flags
& NDR_IN
) {
5693 ndr_print_struct(ndr
, "in", "lsa_ChangePassword");
5697 if (flags
& NDR_OUT
) {
5698 ndr_print_struct(ndr
, "out", "lsa_ChangePassword");
5700 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5706 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_OpenPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenPolicy
*r
)
5708 if (flags
& NDR_IN
) {
5709 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
5710 if (r
->in
.system_name
) {
5711 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
5713 if (r
->in
.attr
== NULL
) {
5714 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5716 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
5717 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
5719 if (flags
& NDR_OUT
) {
5720 if (r
->out
.handle
== NULL
) {
5721 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5723 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5724 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5726 return NDR_ERR_SUCCESS
;
5729 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_OpenPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenPolicy
*r
)
5731 uint32_t _ptr_system_name
;
5732 TALLOC_CTX
*_mem_save_system_name_0
;
5733 TALLOC_CTX
*_mem_save_attr_0
;
5734 TALLOC_CTX
*_mem_save_handle_0
;
5735 if (flags
& NDR_IN
) {
5736 ZERO_STRUCT(r
->out
);
5738 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
5739 if (_ptr_system_name
) {
5740 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
5742 r
->in
.system_name
= NULL
;
5744 if (r
->in
.system_name
) {
5745 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5746 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
5747 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
5748 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
5750 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5751 NDR_PULL_ALLOC(ndr
, r
->in
.attr
);
5753 _mem_save_attr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5754 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.attr
, LIBNDR_FLAG_REF_ALLOC
);
5755 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
5756 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attr_0
, LIBNDR_FLAG_REF_ALLOC
);
5757 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
5758 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5759 ZERO_STRUCTP(r
->out
.handle
);
5761 if (flags
& NDR_OUT
) {
5762 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5763 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5765 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5766 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5767 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5768 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5769 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5771 return NDR_ERR_SUCCESS
;
5774 _PUBLIC_
void ndr_print_lsa_OpenPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenPolicy
*r
)
5776 ndr_print_struct(ndr
, name
, "lsa_OpenPolicy");
5778 if (flags
& NDR_SET_VALUES
) {
5779 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5781 if (flags
& NDR_IN
) {
5782 ndr_print_struct(ndr
, "in", "lsa_OpenPolicy");
5784 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
5786 if (r
->in
.system_name
) {
5787 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
5790 ndr_print_ptr(ndr
, "attr", r
->in
.attr
);
5792 ndr_print_lsa_ObjectAttribute(ndr
, "attr", r
->in
.attr
);
5794 ndr_print_lsa_PolicyAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
5797 if (flags
& NDR_OUT
) {
5798 ndr_print_struct(ndr
, "out", "lsa_OpenPolicy");
5800 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
5802 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
5804 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5810 static enum ndr_err_code
ndr_push_lsa_QueryInfoPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryInfoPolicy
*r
)
5812 if (flags
& NDR_IN
) {
5813 if (r
->in
.handle
== NULL
) {
5814 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5816 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5817 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
5819 if (flags
& NDR_OUT
) {
5820 if (r
->out
.info
== NULL
) {
5821 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5823 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
5825 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
5826 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
5828 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5830 return NDR_ERR_SUCCESS
;
5833 static enum ndr_err_code
ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryInfoPolicy
*r
)
5836 TALLOC_CTX
*_mem_save_handle_0
;
5837 TALLOC_CTX
*_mem_save_info_0
;
5838 TALLOC_CTX
*_mem_save_info_1
;
5839 if (flags
& NDR_IN
) {
5840 ZERO_STRUCT(r
->out
);
5842 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5843 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5845 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5846 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5847 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5848 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5849 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
5850 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
5851 ZERO_STRUCTP(r
->out
.info
);
5853 if (flags
& NDR_OUT
) {
5854 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5855 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
5857 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5858 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
5859 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
5861 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
5863 *r
->out
.info
= NULL
;
5866 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5867 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
5868 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
5869 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
5870 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
5872 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
5873 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5875 return NDR_ERR_SUCCESS
;
5878 _PUBLIC_
void ndr_print_lsa_QueryInfoPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryInfoPolicy
*r
)
5880 ndr_print_struct(ndr
, name
, "lsa_QueryInfoPolicy");
5882 if (flags
& NDR_SET_VALUES
) {
5883 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5885 if (flags
& NDR_IN
) {
5886 ndr_print_struct(ndr
, "in", "lsa_QueryInfoPolicy");
5888 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5890 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5892 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
5895 if (flags
& NDR_OUT
) {
5896 ndr_print_struct(ndr
, "out", "lsa_QueryInfoPolicy");
5898 ndr_print_ptr(ndr
, "info", r
->out
.info
);
5900 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
5903 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
5904 ndr_print_lsa_PolicyInformation(ndr
, "info", *r
->out
.info
);
5908 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5914 static enum ndr_err_code
ndr_push_lsa_SetInfoPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_SetInfoPolicy
*r
)
5916 if (flags
& NDR_IN
) {
5917 if (r
->in
.handle
== NULL
) {
5918 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5920 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5921 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
5922 if (r
->in
.info
== NULL
) {
5923 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5925 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
5926 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5928 if (flags
& NDR_OUT
) {
5929 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5931 return NDR_ERR_SUCCESS
;
5934 static enum ndr_err_code
ndr_pull_lsa_SetInfoPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_SetInfoPolicy
*r
)
5936 TALLOC_CTX
*_mem_save_handle_0
;
5937 TALLOC_CTX
*_mem_save_info_0
;
5938 if (flags
& NDR_IN
) {
5939 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5940 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5942 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5943 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5944 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5945 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5946 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
5947 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5948 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
5950 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5951 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
5952 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
5953 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
5954 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
5956 if (flags
& NDR_OUT
) {
5957 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5959 return NDR_ERR_SUCCESS
;
5962 _PUBLIC_
void ndr_print_lsa_SetInfoPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetInfoPolicy
*r
)
5964 ndr_print_struct(ndr
, name
, "lsa_SetInfoPolicy");
5966 if (flags
& NDR_SET_VALUES
) {
5967 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5969 if (flags
& NDR_IN
) {
5970 ndr_print_struct(ndr
, "in", "lsa_SetInfoPolicy");
5972 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5974 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5976 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
5977 ndr_print_ptr(ndr
, "info", r
->in
.info
);
5979 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
5980 ndr_print_lsa_PolicyInformation(ndr
, "info", r
->in
.info
);
5984 if (flags
& NDR_OUT
) {
5985 ndr_print_struct(ndr
, "out", "lsa_SetInfoPolicy");
5987 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5993 static enum ndr_err_code
ndr_push_lsa_ClearAuditLog(struct ndr_push
*ndr
, int flags
, const struct lsa_ClearAuditLog
*r
)
5995 if (flags
& NDR_IN
) {
5997 if (flags
& NDR_OUT
) {
5998 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6000 return NDR_ERR_SUCCESS
;
6003 static enum ndr_err_code
ndr_pull_lsa_ClearAuditLog(struct ndr_pull
*ndr
, int flags
, struct lsa_ClearAuditLog
*r
)
6005 if (flags
& NDR_IN
) {
6007 if (flags
& NDR_OUT
) {
6008 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6010 return NDR_ERR_SUCCESS
;
6013 _PUBLIC_
void ndr_print_lsa_ClearAuditLog(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_ClearAuditLog
*r
)
6015 ndr_print_struct(ndr
, name
, "lsa_ClearAuditLog");
6017 if (flags
& NDR_SET_VALUES
) {
6018 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6020 if (flags
& NDR_IN
) {
6021 ndr_print_struct(ndr
, "in", "lsa_ClearAuditLog");
6025 if (flags
& NDR_OUT
) {
6026 ndr_print_struct(ndr
, "out", "lsa_ClearAuditLog");
6028 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6034 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_CreateAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateAccount
*r
)
6036 if (flags
& NDR_IN
) {
6037 if (r
->in
.handle
== NULL
) {
6038 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6040 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6041 if (r
->in
.sid
== NULL
) {
6042 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6044 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6045 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6047 if (flags
& NDR_OUT
) {
6048 if (r
->out
.acct_handle
== NULL
) {
6049 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6051 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
6052 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6054 return NDR_ERR_SUCCESS
;
6057 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_CreateAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateAccount
*r
)
6059 TALLOC_CTX
*_mem_save_handle_0
;
6060 TALLOC_CTX
*_mem_save_sid_0
;
6061 TALLOC_CTX
*_mem_save_acct_handle_0
;
6062 if (flags
& NDR_IN
) {
6063 ZERO_STRUCT(r
->out
);
6065 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6066 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6068 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6069 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6070 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6071 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6072 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6073 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
6075 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6076 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
6077 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6078 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
6079 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6080 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
6081 ZERO_STRUCTP(r
->out
.acct_handle
);
6083 if (flags
& NDR_OUT
) {
6084 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6085 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
6087 _mem_save_acct_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6088 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.acct_handle
, LIBNDR_FLAG_REF_ALLOC
);
6089 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
6090 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_acct_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6091 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6093 return NDR_ERR_SUCCESS
;
6096 _PUBLIC_
void ndr_print_lsa_CreateAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateAccount
*r
)
6098 ndr_print_struct(ndr
, name
, "lsa_CreateAccount");
6100 if (flags
& NDR_SET_VALUES
) {
6101 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6103 if (flags
& NDR_IN
) {
6104 ndr_print_struct(ndr
, "in", "lsa_CreateAccount");
6106 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6108 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6110 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
6112 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
6114 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
6117 if (flags
& NDR_OUT
) {
6118 ndr_print_struct(ndr
, "out", "lsa_CreateAccount");
6120 ndr_print_ptr(ndr
, "acct_handle", r
->out
.acct_handle
);
6122 ndr_print_policy_handle(ndr
, "acct_handle", r
->out
.acct_handle
);
6124 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6130 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_EnumAccounts(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumAccounts
*r
)
6132 if (flags
& NDR_IN
) {
6133 if (r
->in
.handle
== NULL
) {
6134 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6136 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6137 if (r
->in
.resume_handle
== NULL
) {
6138 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6140 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
6141 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_entries
));
6143 if (flags
& NDR_OUT
) {
6144 if (r
->out
.resume_handle
== NULL
) {
6145 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6147 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6148 if (r
->out
.sids
== NULL
) {
6149 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6151 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6152 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6154 return NDR_ERR_SUCCESS
;
6157 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_EnumAccounts(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumAccounts
*r
)
6159 TALLOC_CTX
*_mem_save_handle_0
;
6160 TALLOC_CTX
*_mem_save_resume_handle_0
;
6161 TALLOC_CTX
*_mem_save_sids_0
;
6162 if (flags
& NDR_IN
) {
6163 ZERO_STRUCT(r
->out
);
6165 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6166 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6168 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6169 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6170 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6171 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6172 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6173 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6175 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6176 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6177 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6178 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6179 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_entries
));
6180 if (r
->in
.num_entries
> 8192) {
6181 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6183 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6184 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
6185 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6186 ZERO_STRUCTP(r
->out
.sids
);
6188 if (flags
& NDR_OUT
) {
6189 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6190 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6192 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6193 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6194 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6195 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6196 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6197 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6199 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6200 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6201 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6202 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6203 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6205 return NDR_ERR_SUCCESS
;
6208 _PUBLIC_
void ndr_print_lsa_EnumAccounts(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumAccounts
*r
)
6210 ndr_print_struct(ndr
, name
, "lsa_EnumAccounts");
6212 if (flags
& NDR_SET_VALUES
) {
6213 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6215 if (flags
& NDR_IN
) {
6216 ndr_print_struct(ndr
, "in", "lsa_EnumAccounts");
6218 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6220 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6222 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6224 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6226 ndr_print_uint32(ndr
, "num_entries", r
->in
.num_entries
);
6229 if (flags
& NDR_OUT
) {
6230 ndr_print_struct(ndr
, "out", "lsa_EnumAccounts");
6232 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6234 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6236 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
6238 ndr_print_lsa_SidArray(ndr
, "sids", r
->out
.sids
);
6240 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6246 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_CreateTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateTrustedDomain
*r
)
6248 if (flags
& NDR_IN
) {
6249 if (r
->in
.policy_handle
== NULL
) {
6250 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6252 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
6253 if (r
->in
.info
== NULL
) {
6254 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6256 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6257 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6259 if (flags
& NDR_OUT
) {
6260 if (r
->out
.trustdom_handle
== NULL
) {
6261 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6263 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
6264 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6266 return NDR_ERR_SUCCESS
;
6269 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateTrustedDomain
*r
)
6271 TALLOC_CTX
*_mem_save_policy_handle_0
;
6272 TALLOC_CTX
*_mem_save_info_0
;
6273 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
6274 if (flags
& NDR_IN
) {
6275 ZERO_STRUCT(r
->out
);
6277 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6278 NDR_PULL_ALLOC(ndr
, r
->in
.policy_handle
);
6280 _mem_save_policy_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6281 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.policy_handle
, LIBNDR_FLAG_REF_ALLOC
);
6282 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
6283 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_policy_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6284 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6285 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
6287 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6288 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
6289 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6290 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
6291 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6292 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
6293 ZERO_STRUCTP(r
->out
.trustdom_handle
);
6295 if (flags
& NDR_OUT
) {
6296 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6297 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
6299 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6300 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
6301 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
6302 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6303 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6305 return NDR_ERR_SUCCESS
;
6308 _PUBLIC_
void ndr_print_lsa_CreateTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateTrustedDomain
*r
)
6310 ndr_print_struct(ndr
, name
, "lsa_CreateTrustedDomain");
6312 if (flags
& NDR_SET_VALUES
) {
6313 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6315 if (flags
& NDR_IN
) {
6316 ndr_print_struct(ndr
, "in", "lsa_CreateTrustedDomain");
6318 ndr_print_ptr(ndr
, "policy_handle", r
->in
.policy_handle
);
6320 ndr_print_policy_handle(ndr
, "policy_handle", r
->in
.policy_handle
);
6322 ndr_print_ptr(ndr
, "info", r
->in
.info
);
6324 ndr_print_lsa_DomainInfo(ndr
, "info", r
->in
.info
);
6326 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
6329 if (flags
& NDR_OUT
) {
6330 ndr_print_struct(ndr
, "out", "lsa_CreateTrustedDomain");
6332 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
6334 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
6336 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6342 static enum ndr_err_code
ndr_push_lsa_EnumTrustDom(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumTrustDom
*r
)
6344 if (flags
& NDR_IN
) {
6345 if (r
->in
.handle
== NULL
) {
6346 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6348 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6349 if (r
->in
.resume_handle
== NULL
) {
6350 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6352 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
6353 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_size
));
6355 if (flags
& NDR_OUT
) {
6356 if (r
->out
.resume_handle
== NULL
) {
6357 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6359 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6360 if (r
->out
.domains
== NULL
) {
6361 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6363 NDR_CHECK(ndr_push_lsa_DomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
6364 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6366 return NDR_ERR_SUCCESS
;
6369 static enum ndr_err_code
ndr_pull_lsa_EnumTrustDom(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumTrustDom
*r
)
6371 TALLOC_CTX
*_mem_save_handle_0
;
6372 TALLOC_CTX
*_mem_save_resume_handle_0
;
6373 TALLOC_CTX
*_mem_save_domains_0
;
6374 if (flags
& NDR_IN
) {
6375 ZERO_STRUCT(r
->out
);
6377 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6378 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6380 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6381 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6382 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6383 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6384 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6385 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6387 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6388 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6389 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6390 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6391 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_size
));
6392 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6393 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
6394 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6395 ZERO_STRUCTP(r
->out
.domains
);
6397 if (flags
& NDR_OUT
) {
6398 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6399 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6401 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6402 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6403 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6404 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6405 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6406 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6408 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6409 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
6410 NDR_CHECK(ndr_pull_lsa_DomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
6411 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
6412 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6414 return NDR_ERR_SUCCESS
;
6417 _PUBLIC_
void ndr_print_lsa_EnumTrustDom(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumTrustDom
*r
)
6419 ndr_print_struct(ndr
, name
, "lsa_EnumTrustDom");
6421 if (flags
& NDR_SET_VALUES
) {
6422 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6424 if (flags
& NDR_IN
) {
6425 ndr_print_struct(ndr
, "in", "lsa_EnumTrustDom");
6427 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6429 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6431 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6433 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6435 ndr_print_uint32(ndr
, "max_size", r
->in
.max_size
);
6438 if (flags
& NDR_OUT
) {
6439 ndr_print_struct(ndr
, "out", "lsa_EnumTrustDom");
6441 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6443 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6445 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
6447 ndr_print_lsa_DomainList(ndr
, "domains", r
->out
.domains
);
6449 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6455 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupNames(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames
*r
)
6457 uint32_t cntr_names_0
;
6458 if (flags
& NDR_IN
) {
6459 if (r
->in
.handle
== NULL
) {
6460 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6462 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6463 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
6464 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
6465 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
6466 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
6468 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
6469 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
6471 if (r
->in
.sids
== NULL
) {
6472 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6474 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6475 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
6476 if (r
->in
.count
== NULL
) {
6477 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6479 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
6481 if (flags
& NDR_OUT
) {
6482 if (r
->out
.domains
== NULL
) {
6483 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6485 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
6486 if (*r
->out
.domains
) {
6487 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6489 if (r
->out
.sids
== NULL
) {
6490 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6492 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6493 if (r
->out
.count
== NULL
) {
6494 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6496 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
6497 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6499 return NDR_ERR_SUCCESS
;
6502 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupNames(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames
*r
)
6504 uint32_t size_names_0
= 0;
6505 uint32_t cntr_names_0
;
6506 uint32_t _ptr_domains
;
6507 TALLOC_CTX
*_mem_save_handle_0
;
6508 TALLOC_CTX
*_mem_save_names_0
;
6509 TALLOC_CTX
*_mem_save_domains_0
;
6510 TALLOC_CTX
*_mem_save_domains_1
;
6511 TALLOC_CTX
*_mem_save_sids_0
;
6512 TALLOC_CTX
*_mem_save_count_0
;
6513 if (flags
& NDR_IN
) {
6514 ZERO_STRUCT(r
->out
);
6516 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6517 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6519 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6520 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6521 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6522 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6523 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
6524 if (r
->in
.num_names
> 1000) {
6525 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6527 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
6528 size_names_0
= ndr_get_array_size(ndr
, &r
->in
.names
);
6529 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, size_names_0
);
6530 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6531 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
6532 for (cntr_names_0
= 0; cntr_names_0
< size_names_0
; cntr_names_0
++) {
6533 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
6535 for (cntr_names_0
= 0; cntr_names_0
< size_names_0
; cntr_names_0
++) {
6536 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
6538 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
6539 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6540 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
6542 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6543 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6544 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6545 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6546 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
6547 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6548 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
6550 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6551 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
6552 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
6553 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6554 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6555 ZERO_STRUCTP(r
->out
.domains
);
6556 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6557 *r
->out
.sids
= *r
->in
.sids
;
6558 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6559 *r
->out
.count
= *r
->in
.count
;
6561 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
6564 if (flags
& NDR_OUT
) {
6565 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6566 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6568 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6569 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
6570 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
6572 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
6574 *r
->out
.domains
= NULL
;
6576 if (*r
->out
.domains
) {
6577 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6578 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
6579 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6580 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
6582 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
6583 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6584 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6586 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6587 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6588 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6589 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6590 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6591 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6593 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6594 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
6595 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
6596 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6597 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6599 return NDR_ERR_SUCCESS
;
6602 _PUBLIC_
void ndr_print_lsa_LookupNames(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames
*r
)
6604 uint32_t cntr_names_0
;
6605 ndr_print_struct(ndr
, name
, "lsa_LookupNames");
6607 if (flags
& NDR_SET_VALUES
) {
6608 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6610 if (flags
& NDR_IN
) {
6611 ndr_print_struct(ndr
, "in", "lsa_LookupNames");
6613 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6615 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6617 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
6618 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
6620 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
6622 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
6623 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
6628 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
6630 ndr_print_lsa_TransSidArray(ndr
, "sids", r
->in
.sids
);
6632 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
6633 ndr_print_ptr(ndr
, "count", r
->in
.count
);
6635 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
6639 if (flags
& NDR_OUT
) {
6640 ndr_print_struct(ndr
, "out", "lsa_LookupNames");
6642 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
6644 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
6646 if (*r
->out
.domains
) {
6647 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
6651 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
6653 ndr_print_lsa_TransSidArray(ndr
, "sids", r
->out
.sids
);
6655 ndr_print_ptr(ndr
, "count", r
->out
.count
);
6657 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
6659 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6665 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupSids(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupSids
*r
)
6667 if (flags
& NDR_IN
) {
6668 if (r
->in
.handle
== NULL
) {
6669 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6671 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6672 if (r
->in
.sids
== NULL
) {
6673 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6675 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6676 if (r
->in
.names
== NULL
) {
6677 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6679 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
6680 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
6681 if (r
->in
.count
== NULL
) {
6682 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6684 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
6686 if (flags
& NDR_OUT
) {
6687 if (r
->out
.domains
== NULL
) {
6688 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6690 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
6691 if (*r
->out
.domains
) {
6692 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6694 if (r
->out
.names
== NULL
) {
6695 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6697 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
6698 if (r
->out
.count
== NULL
) {
6699 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6701 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
6702 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6704 return NDR_ERR_SUCCESS
;
6707 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupSids(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupSids
*r
)
6709 uint32_t _ptr_domains
;
6710 TALLOC_CTX
*_mem_save_handle_0
;
6711 TALLOC_CTX
*_mem_save_sids_0
;
6712 TALLOC_CTX
*_mem_save_domains_0
;
6713 TALLOC_CTX
*_mem_save_domains_1
;
6714 TALLOC_CTX
*_mem_save_names_0
;
6715 TALLOC_CTX
*_mem_save_count_0
;
6716 if (flags
& NDR_IN
) {
6717 ZERO_STRUCT(r
->out
);
6719 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6720 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6722 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6723 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6724 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6725 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6726 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6727 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
6729 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6730 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6731 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6732 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6733 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6734 NDR_PULL_ALLOC(ndr
, r
->in
.names
);
6736 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6737 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, LIBNDR_FLAG_REF_ALLOC
);
6738 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
6739 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
6740 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
6741 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6742 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
6744 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6745 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
6746 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
6747 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6748 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6749 ZERO_STRUCTP(r
->out
.domains
);
6750 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
6751 *r
->out
.names
= *r
->in
.names
;
6752 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6753 *r
->out
.count
= *r
->in
.count
;
6755 if (flags
& NDR_OUT
) {
6756 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6757 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6759 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6760 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
6761 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
6763 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
6765 *r
->out
.domains
= NULL
;
6767 if (*r
->out
.domains
) {
6768 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6769 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
6770 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6771 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
6773 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
6774 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6775 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
6777 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6778 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.names
, LIBNDR_FLAG_REF_ALLOC
);
6779 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
6780 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
6781 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6782 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6784 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6785 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
6786 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
6787 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6788 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6790 return NDR_ERR_SUCCESS
;
6793 _PUBLIC_
void ndr_print_lsa_LookupSids(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupSids
*r
)
6795 ndr_print_struct(ndr
, name
, "lsa_LookupSids");
6797 if (flags
& NDR_SET_VALUES
) {
6798 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6800 if (flags
& NDR_IN
) {
6801 ndr_print_struct(ndr
, "in", "lsa_LookupSids");
6803 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6805 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6807 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
6809 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
6811 ndr_print_ptr(ndr
, "names", r
->in
.names
);
6813 ndr_print_lsa_TransNameArray(ndr
, "names", r
->in
.names
);
6815 ndr_print_uint16(ndr
, "level", r
->in
.level
);
6816 ndr_print_ptr(ndr
, "count", r
->in
.count
);
6818 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
6822 if (flags
& NDR_OUT
) {
6823 ndr_print_struct(ndr
, "out", "lsa_LookupSids");
6825 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
6827 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
6829 if (*r
->out
.domains
) {
6830 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
6834 ndr_print_ptr(ndr
, "names", r
->out
.names
);
6836 ndr_print_lsa_TransNameArray(ndr
, "names", r
->out
.names
);
6838 ndr_print_ptr(ndr
, "count", r
->out
.count
);
6840 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
6842 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6848 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_CreateSecret(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateSecret
*r
)
6850 if (flags
& NDR_IN
) {
6851 if (r
->in
.handle
== NULL
) {
6852 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6854 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6855 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
6856 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6858 if (flags
& NDR_OUT
) {
6859 if (r
->out
.sec_handle
== NULL
) {
6860 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6862 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
6863 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6865 return NDR_ERR_SUCCESS
;
6868 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_CreateSecret(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateSecret
*r
)
6870 TALLOC_CTX
*_mem_save_handle_0
;
6871 TALLOC_CTX
*_mem_save_sec_handle_0
;
6872 if (flags
& NDR_IN
) {
6873 ZERO_STRUCT(r
->out
);
6875 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6876 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6878 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6879 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6880 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6881 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6882 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
6883 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6884 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
6885 ZERO_STRUCTP(r
->out
.sec_handle
);
6887 if (flags
& NDR_OUT
) {
6888 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6889 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
6891 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6892 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
6893 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
6894 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6895 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6897 return NDR_ERR_SUCCESS
;
6900 _PUBLIC_
void ndr_print_lsa_CreateSecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateSecret
*r
)
6902 ndr_print_struct(ndr
, name
, "lsa_CreateSecret");
6904 if (flags
& NDR_SET_VALUES
) {
6905 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6907 if (flags
& NDR_IN
) {
6908 ndr_print_struct(ndr
, "in", "lsa_CreateSecret");
6910 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6912 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6914 ndr_print_lsa_String(ndr
, "name", &r
->in
.name
);
6915 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
6918 if (flags
& NDR_OUT
) {
6919 ndr_print_struct(ndr
, "out", "lsa_CreateSecret");
6921 ndr_print_ptr(ndr
, "sec_handle", r
->out
.sec_handle
);
6923 ndr_print_policy_handle(ndr
, "sec_handle", r
->out
.sec_handle
);
6925 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6931 static enum ndr_err_code
ndr_push_lsa_OpenAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenAccount
*r
)
6933 if (flags
& NDR_IN
) {
6934 if (r
->in
.handle
== NULL
) {
6935 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6937 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6938 if (r
->in
.sid
== NULL
) {
6939 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6941 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6942 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6944 if (flags
& NDR_OUT
) {
6945 if (r
->out
.acct_handle
== NULL
) {
6946 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6948 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
6949 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6951 return NDR_ERR_SUCCESS
;
6954 static enum ndr_err_code
ndr_pull_lsa_OpenAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenAccount
*r
)
6956 TALLOC_CTX
*_mem_save_handle_0
;
6957 TALLOC_CTX
*_mem_save_sid_0
;
6958 TALLOC_CTX
*_mem_save_acct_handle_0
;
6959 if (flags
& NDR_IN
) {
6960 ZERO_STRUCT(r
->out
);
6962 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6963 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6965 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6966 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6967 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6968 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6969 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6970 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
6972 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6973 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
6974 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6975 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
6976 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6977 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
6978 ZERO_STRUCTP(r
->out
.acct_handle
);
6980 if (flags
& NDR_OUT
) {
6981 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6982 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
6984 _mem_save_acct_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6985 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.acct_handle
, LIBNDR_FLAG_REF_ALLOC
);
6986 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
6987 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_acct_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6988 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6990 return NDR_ERR_SUCCESS
;
6993 _PUBLIC_
void ndr_print_lsa_OpenAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenAccount
*r
)
6995 ndr_print_struct(ndr
, name
, "lsa_OpenAccount");
6997 if (flags
& NDR_SET_VALUES
) {
6998 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7000 if (flags
& NDR_IN
) {
7001 ndr_print_struct(ndr
, "in", "lsa_OpenAccount");
7003 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7005 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7007 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
7009 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
7011 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
7014 if (flags
& NDR_OUT
) {
7015 ndr_print_struct(ndr
, "out", "lsa_OpenAccount");
7017 ndr_print_ptr(ndr
, "acct_handle", r
->out
.acct_handle
);
7019 ndr_print_policy_handle(ndr
, "acct_handle", r
->out
.acct_handle
);
7021 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7027 static enum ndr_err_code
ndr_push_lsa_EnumPrivsAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumPrivsAccount
*r
)
7029 if (flags
& NDR_IN
) {
7030 if (r
->in
.handle
== NULL
) {
7031 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7033 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7035 if (flags
& NDR_OUT
) {
7036 if (r
->out
.privs
== NULL
) {
7037 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7039 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.privs
));
7040 if (*r
->out
.privs
) {
7041 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, *r
->out
.privs
));
7043 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7045 return NDR_ERR_SUCCESS
;
7048 static enum ndr_err_code
ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumPrivsAccount
*r
)
7050 uint32_t _ptr_privs
;
7051 TALLOC_CTX
*_mem_save_handle_0
;
7052 TALLOC_CTX
*_mem_save_privs_0
;
7053 TALLOC_CTX
*_mem_save_privs_1
;
7054 if (flags
& NDR_IN
) {
7055 ZERO_STRUCT(r
->out
);
7057 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7058 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7060 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7061 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7062 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7063 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7064 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
7065 ZERO_STRUCTP(r
->out
.privs
);
7067 if (flags
& NDR_OUT
) {
7068 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7069 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
7071 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7072 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.privs
, LIBNDR_FLAG_REF_ALLOC
);
7073 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_privs
));
7075 NDR_PULL_ALLOC(ndr
, *r
->out
.privs
);
7077 *r
->out
.privs
= NULL
;
7079 if (*r
->out
.privs
) {
7080 _mem_save_privs_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7081 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.privs
, 0);
7082 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, *r
->out
.privs
));
7083 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_1
, 0);
7085 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, LIBNDR_FLAG_REF_ALLOC
);
7086 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7088 return NDR_ERR_SUCCESS
;
7091 _PUBLIC_
void ndr_print_lsa_EnumPrivsAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumPrivsAccount
*r
)
7093 ndr_print_struct(ndr
, name
, "lsa_EnumPrivsAccount");
7095 if (flags
& NDR_SET_VALUES
) {
7096 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7098 if (flags
& NDR_IN
) {
7099 ndr_print_struct(ndr
, "in", "lsa_EnumPrivsAccount");
7101 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7103 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7107 if (flags
& NDR_OUT
) {
7108 ndr_print_struct(ndr
, "out", "lsa_EnumPrivsAccount");
7110 ndr_print_ptr(ndr
, "privs", r
->out
.privs
);
7112 ndr_print_ptr(ndr
, "privs", *r
->out
.privs
);
7114 if (*r
->out
.privs
) {
7115 ndr_print_lsa_PrivilegeSet(ndr
, "privs", *r
->out
.privs
);
7119 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7125 static enum ndr_err_code
ndr_push_lsa_AddPrivilegesToAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_AddPrivilegesToAccount
*r
)
7127 if (flags
& NDR_IN
) {
7128 if (r
->in
.handle
== NULL
) {
7129 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7131 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7132 if (r
->in
.privs
== NULL
) {
7133 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7135 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7137 if (flags
& NDR_OUT
) {
7138 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7140 return NDR_ERR_SUCCESS
;
7143 static enum ndr_err_code
ndr_pull_lsa_AddPrivilegesToAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_AddPrivilegesToAccount
*r
)
7145 TALLOC_CTX
*_mem_save_handle_0
;
7146 TALLOC_CTX
*_mem_save_privs_0
;
7147 if (flags
& NDR_IN
) {
7148 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7149 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7151 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7152 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7153 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7154 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7155 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7156 NDR_PULL_ALLOC(ndr
, r
->in
.privs
);
7158 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7159 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.privs
, LIBNDR_FLAG_REF_ALLOC
);
7160 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7161 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, LIBNDR_FLAG_REF_ALLOC
);
7163 if (flags
& NDR_OUT
) {
7164 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7166 return NDR_ERR_SUCCESS
;
7169 _PUBLIC_
void ndr_print_lsa_AddPrivilegesToAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_AddPrivilegesToAccount
*r
)
7171 ndr_print_struct(ndr
, name
, "lsa_AddPrivilegesToAccount");
7173 if (flags
& NDR_SET_VALUES
) {
7174 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7176 if (flags
& NDR_IN
) {
7177 ndr_print_struct(ndr
, "in", "lsa_AddPrivilegesToAccount");
7179 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7181 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7183 ndr_print_ptr(ndr
, "privs", r
->in
.privs
);
7185 ndr_print_lsa_PrivilegeSet(ndr
, "privs", r
->in
.privs
);
7189 if (flags
& NDR_OUT
) {
7190 ndr_print_struct(ndr
, "out", "lsa_AddPrivilegesToAccount");
7192 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7198 static enum ndr_err_code
ndr_push_lsa_RemovePrivilegesFromAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_RemovePrivilegesFromAccount
*r
)
7200 if (flags
& NDR_IN
) {
7201 if (r
->in
.handle
== NULL
) {
7202 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7204 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7205 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.remove_all
));
7206 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.privs
));
7208 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7211 if (flags
& NDR_OUT
) {
7212 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7214 return NDR_ERR_SUCCESS
;
7217 static enum ndr_err_code
ndr_pull_lsa_RemovePrivilegesFromAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_RemovePrivilegesFromAccount
*r
)
7219 uint32_t _ptr_privs
;
7220 TALLOC_CTX
*_mem_save_handle_0
;
7221 TALLOC_CTX
*_mem_save_privs_0
;
7222 if (flags
& NDR_IN
) {
7223 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7224 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7226 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7227 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7228 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7229 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7230 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.remove_all
));
7231 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_privs
));
7233 NDR_PULL_ALLOC(ndr
, r
->in
.privs
);
7238 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7239 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.privs
, 0);
7240 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7241 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, 0);
7244 if (flags
& NDR_OUT
) {
7245 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7247 return NDR_ERR_SUCCESS
;
7250 _PUBLIC_
void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_RemovePrivilegesFromAccount
*r
)
7252 ndr_print_struct(ndr
, name
, "lsa_RemovePrivilegesFromAccount");
7254 if (flags
& NDR_SET_VALUES
) {
7255 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7257 if (flags
& NDR_IN
) {
7258 ndr_print_struct(ndr
, "in", "lsa_RemovePrivilegesFromAccount");
7260 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7262 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7264 ndr_print_uint8(ndr
, "remove_all", r
->in
.remove_all
);
7265 ndr_print_ptr(ndr
, "privs", r
->in
.privs
);
7268 ndr_print_lsa_PrivilegeSet(ndr
, "privs", r
->in
.privs
);
7273 if (flags
& NDR_OUT
) {
7274 ndr_print_struct(ndr
, "out", "lsa_RemovePrivilegesFromAccount");
7276 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7282 static enum ndr_err_code
ndr_push_lsa_GetQuotasForAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_GetQuotasForAccount
*r
)
7284 if (flags
& NDR_IN
) {
7286 if (flags
& NDR_OUT
) {
7287 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7289 return NDR_ERR_SUCCESS
;
7292 static enum ndr_err_code
ndr_pull_lsa_GetQuotasForAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_GetQuotasForAccount
*r
)
7294 if (flags
& NDR_IN
) {
7296 if (flags
& NDR_OUT
) {
7297 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7299 return NDR_ERR_SUCCESS
;
7302 _PUBLIC_
void ndr_print_lsa_GetQuotasForAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_GetQuotasForAccount
*r
)
7304 ndr_print_struct(ndr
, name
, "lsa_GetQuotasForAccount");
7306 if (flags
& NDR_SET_VALUES
) {
7307 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7309 if (flags
& NDR_IN
) {
7310 ndr_print_struct(ndr
, "in", "lsa_GetQuotasForAccount");
7314 if (flags
& NDR_OUT
) {
7315 ndr_print_struct(ndr
, "out", "lsa_GetQuotasForAccount");
7317 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7323 static enum ndr_err_code
ndr_push_lsa_SetQuotasForAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_SetQuotasForAccount
*r
)
7325 if (flags
& NDR_IN
) {
7327 if (flags
& NDR_OUT
) {
7328 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7330 return NDR_ERR_SUCCESS
;
7333 static enum ndr_err_code
ndr_pull_lsa_SetQuotasForAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_SetQuotasForAccount
*r
)
7335 if (flags
& NDR_IN
) {
7337 if (flags
& NDR_OUT
) {
7338 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7340 return NDR_ERR_SUCCESS
;
7343 _PUBLIC_
void ndr_print_lsa_SetQuotasForAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetQuotasForAccount
*r
)
7345 ndr_print_struct(ndr
, name
, "lsa_SetQuotasForAccount");
7347 if (flags
& NDR_SET_VALUES
) {
7348 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7350 if (flags
& NDR_IN
) {
7351 ndr_print_struct(ndr
, "in", "lsa_SetQuotasForAccount");
7355 if (flags
& NDR_OUT
) {
7356 ndr_print_struct(ndr
, "out", "lsa_SetQuotasForAccount");
7358 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7364 static enum ndr_err_code
ndr_push_lsa_GetSystemAccessAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_GetSystemAccessAccount
*r
)
7366 if (flags
& NDR_IN
) {
7367 if (r
->in
.handle
== NULL
) {
7368 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7370 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7372 if (flags
& NDR_OUT
) {
7373 if (r
->out
.access_mask
== NULL
) {
7374 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7376 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.access_mask
));
7377 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7379 return NDR_ERR_SUCCESS
;
7382 static enum ndr_err_code
ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_GetSystemAccessAccount
*r
)
7384 TALLOC_CTX
*_mem_save_handle_0
;
7385 TALLOC_CTX
*_mem_save_access_mask_0
;
7386 if (flags
& NDR_IN
) {
7387 ZERO_STRUCT(r
->out
);
7389 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7390 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7392 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7393 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7394 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7395 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7396 NDR_PULL_ALLOC(ndr
, r
->out
.access_mask
);
7397 ZERO_STRUCTP(r
->out
.access_mask
);
7399 if (flags
& NDR_OUT
) {
7400 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7401 NDR_PULL_ALLOC(ndr
, r
->out
.access_mask
);
7403 _mem_save_access_mask_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7404 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.access_mask
, LIBNDR_FLAG_REF_ALLOC
);
7405 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.access_mask
));
7406 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_access_mask_0
, LIBNDR_FLAG_REF_ALLOC
);
7407 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7409 return NDR_ERR_SUCCESS
;
7412 _PUBLIC_
void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_GetSystemAccessAccount
*r
)
7414 ndr_print_struct(ndr
, name
, "lsa_GetSystemAccessAccount");
7416 if (flags
& NDR_SET_VALUES
) {
7417 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7419 if (flags
& NDR_IN
) {
7420 ndr_print_struct(ndr
, "in", "lsa_GetSystemAccessAccount");
7422 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7424 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7428 if (flags
& NDR_OUT
) {
7429 ndr_print_struct(ndr
, "out", "lsa_GetSystemAccessAccount");
7431 ndr_print_ptr(ndr
, "access_mask", r
->out
.access_mask
);
7433 ndr_print_uint32(ndr
, "access_mask", *r
->out
.access_mask
);
7435 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7441 static enum ndr_err_code
ndr_push_lsa_SetSystemAccessAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_SetSystemAccessAccount
*r
)
7443 if (flags
& NDR_IN
) {
7444 if (r
->in
.handle
== NULL
) {
7445 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7447 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7448 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7450 if (flags
& NDR_OUT
) {
7451 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7453 return NDR_ERR_SUCCESS
;
7456 static enum ndr_err_code
ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_SetSystemAccessAccount
*r
)
7458 TALLOC_CTX
*_mem_save_handle_0
;
7459 if (flags
& NDR_IN
) {
7460 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7461 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7463 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7464 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7465 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7466 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7467 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7469 if (flags
& NDR_OUT
) {
7470 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7472 return NDR_ERR_SUCCESS
;
7475 _PUBLIC_
void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetSystemAccessAccount
*r
)
7477 ndr_print_struct(ndr
, name
, "lsa_SetSystemAccessAccount");
7479 if (flags
& NDR_SET_VALUES
) {
7480 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7482 if (flags
& NDR_IN
) {
7483 ndr_print_struct(ndr
, "in", "lsa_SetSystemAccessAccount");
7485 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7487 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7489 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
7492 if (flags
& NDR_OUT
) {
7493 ndr_print_struct(ndr
, "out", "lsa_SetSystemAccessAccount");
7495 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7501 static enum ndr_err_code
ndr_push_lsa_OpenTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenTrustedDomain
*r
)
7503 if (flags
& NDR_IN
) {
7504 if (r
->in
.handle
== NULL
) {
7505 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7507 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7508 if (r
->in
.sid
== NULL
) {
7509 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7511 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
7512 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7514 if (flags
& NDR_OUT
) {
7515 if (r
->out
.trustdom_handle
== NULL
) {
7516 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7518 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
7519 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7521 return NDR_ERR_SUCCESS
;
7524 static enum ndr_err_code
ndr_pull_lsa_OpenTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenTrustedDomain
*r
)
7526 TALLOC_CTX
*_mem_save_handle_0
;
7527 TALLOC_CTX
*_mem_save_sid_0
;
7528 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
7529 if (flags
& NDR_IN
) {
7530 ZERO_STRUCT(r
->out
);
7532 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7533 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7535 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7536 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7537 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7538 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7539 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7540 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
7542 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7543 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
7544 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
7545 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
7546 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7547 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
7548 ZERO_STRUCTP(r
->out
.trustdom_handle
);
7550 if (flags
& NDR_OUT
) {
7551 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7552 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
7554 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7555 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
7556 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
7557 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7558 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7560 return NDR_ERR_SUCCESS
;
7563 _PUBLIC_
void ndr_print_lsa_OpenTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenTrustedDomain
*r
)
7565 ndr_print_struct(ndr
, name
, "lsa_OpenTrustedDomain");
7567 if (flags
& NDR_SET_VALUES
) {
7568 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7570 if (flags
& NDR_IN
) {
7571 ndr_print_struct(ndr
, "in", "lsa_OpenTrustedDomain");
7573 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7575 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7577 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
7579 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
7581 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
7584 if (flags
& NDR_OUT
) {
7585 ndr_print_struct(ndr
, "out", "lsa_OpenTrustedDomain");
7587 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
7589 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
7591 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7597 static enum ndr_err_code
ndr_push_lsa_QueryTrustedDomainInfo(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryTrustedDomainInfo
*r
)
7599 if (flags
& NDR_IN
) {
7600 if (r
->in
.trustdom_handle
== NULL
) {
7601 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7603 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7604 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
7606 if (flags
& NDR_OUT
) {
7607 if (r
->out
.info
== NULL
) {
7608 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7610 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
7612 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
7613 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
7615 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7617 return NDR_ERR_SUCCESS
;
7620 static enum ndr_err_code
ndr_pull_lsa_QueryTrustedDomainInfo(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryTrustedDomainInfo
*r
)
7623 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
7624 TALLOC_CTX
*_mem_save_info_0
;
7625 TALLOC_CTX
*_mem_save_info_1
;
7626 if (flags
& NDR_IN
) {
7627 ZERO_STRUCT(r
->out
);
7629 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7630 NDR_PULL_ALLOC(ndr
, r
->in
.trustdom_handle
);
7632 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7633 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
7634 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7635 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7636 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
7637 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7638 ZERO_STRUCTP(r
->out
.info
);
7640 if (flags
& NDR_OUT
) {
7641 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7642 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7644 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7645 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
7646 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
7648 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
7650 *r
->out
.info
= NULL
;
7653 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7654 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
7655 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
7656 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
7657 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
7659 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7660 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7662 return NDR_ERR_SUCCESS
;
7665 _PUBLIC_
void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryTrustedDomainInfo
*r
)
7667 ndr_print_struct(ndr
, name
, "lsa_QueryTrustedDomainInfo");
7669 if (flags
& NDR_SET_VALUES
) {
7670 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7672 if (flags
& NDR_IN
) {
7673 ndr_print_struct(ndr
, "in", "lsa_QueryTrustedDomainInfo");
7675 ndr_print_ptr(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7677 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7679 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
7682 if (flags
& NDR_OUT
) {
7683 ndr_print_struct(ndr
, "out", "lsa_QueryTrustedDomainInfo");
7685 ndr_print_ptr(ndr
, "info", r
->out
.info
);
7687 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
7690 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
7691 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", *r
->out
.info
);
7695 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7701 static enum ndr_err_code
ndr_push_lsa_SetInformationTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_SetInformationTrustedDomain
*r
)
7703 if (flags
& NDR_IN
) {
7704 if (r
->in
.trustdom_handle
== NULL
) {
7705 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7707 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7708 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
7709 if (r
->in
.info
== NULL
) {
7710 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7712 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
7713 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
7715 if (flags
& NDR_OUT
) {
7716 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7718 return NDR_ERR_SUCCESS
;
7721 static enum ndr_err_code
ndr_pull_lsa_SetInformationTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_SetInformationTrustedDomain
*r
)
7723 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
7724 TALLOC_CTX
*_mem_save_info_0
;
7725 if (flags
& NDR_IN
) {
7726 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7727 NDR_PULL_ALLOC(ndr
, r
->in
.trustdom_handle
);
7729 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7730 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
7731 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7732 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7733 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
7734 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7735 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
7737 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7738 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
7739 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
7740 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
7741 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7743 if (flags
& NDR_OUT
) {
7744 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7746 return NDR_ERR_SUCCESS
;
7749 _PUBLIC_
void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetInformationTrustedDomain
*r
)
7751 ndr_print_struct(ndr
, name
, "lsa_SetInformationTrustedDomain");
7753 if (flags
& NDR_SET_VALUES
) {
7754 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7756 if (flags
& NDR_IN
) {
7757 ndr_print_struct(ndr
, "in", "lsa_SetInformationTrustedDomain");
7759 ndr_print_ptr(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7761 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7763 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
7764 ndr_print_ptr(ndr
, "info", r
->in
.info
);
7766 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
7767 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", r
->in
.info
);
7771 if (flags
& NDR_OUT
) {
7772 ndr_print_struct(ndr
, "out", "lsa_SetInformationTrustedDomain");
7774 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7780 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_OpenSecret(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenSecret
*r
)
7782 if (flags
& NDR_IN
) {
7783 if (r
->in
.handle
== NULL
) {
7784 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7786 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7787 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
7788 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7790 if (flags
& NDR_OUT
) {
7791 if (r
->out
.sec_handle
== NULL
) {
7792 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7794 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
7795 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7797 return NDR_ERR_SUCCESS
;
7800 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_OpenSecret(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenSecret
*r
)
7802 TALLOC_CTX
*_mem_save_handle_0
;
7803 TALLOC_CTX
*_mem_save_sec_handle_0
;
7804 if (flags
& NDR_IN
) {
7805 ZERO_STRUCT(r
->out
);
7807 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7808 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7810 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7811 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7812 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7813 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7814 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
7815 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7816 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
7817 ZERO_STRUCTP(r
->out
.sec_handle
);
7819 if (flags
& NDR_OUT
) {
7820 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7821 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
7823 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7824 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
7825 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
7826 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7827 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7829 return NDR_ERR_SUCCESS
;
7832 _PUBLIC_
void ndr_print_lsa_OpenSecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenSecret
*r
)
7834 ndr_print_struct(ndr
, name
, "lsa_OpenSecret");
7836 if (flags
& NDR_SET_VALUES
) {
7837 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7839 if (flags
& NDR_IN
) {
7840 ndr_print_struct(ndr
, "in", "lsa_OpenSecret");
7842 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7844 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7846 ndr_print_lsa_String(ndr
, "name", &r
->in
.name
);
7847 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
7850 if (flags
& NDR_OUT
) {
7851 ndr_print_struct(ndr
, "out", "lsa_OpenSecret");
7853 ndr_print_ptr(ndr
, "sec_handle", r
->out
.sec_handle
);
7855 ndr_print_policy_handle(ndr
, "sec_handle", r
->out
.sec_handle
);
7857 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7863 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SetSecret(struct ndr_push
*ndr
, int flags
, const struct lsa_SetSecret
*r
)
7865 if (flags
& NDR_IN
) {
7866 if (r
->in
.sec_handle
== NULL
) {
7867 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7869 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
7870 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_val
));
7871 if (r
->in
.new_val
) {
7872 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
7874 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_val
));
7875 if (r
->in
.old_val
) {
7876 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
7879 if (flags
& NDR_OUT
) {
7880 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7882 return NDR_ERR_SUCCESS
;
7885 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SetSecret(struct ndr_pull
*ndr
, int flags
, struct lsa_SetSecret
*r
)
7887 uint32_t _ptr_new_val
;
7888 uint32_t _ptr_old_val
;
7889 TALLOC_CTX
*_mem_save_sec_handle_0
;
7890 TALLOC_CTX
*_mem_save_new_val_0
;
7891 TALLOC_CTX
*_mem_save_old_val_0
;
7892 if (flags
& NDR_IN
) {
7893 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7894 NDR_PULL_ALLOC(ndr
, r
->in
.sec_handle
);
7896 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7897 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
7898 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
7899 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7900 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_val
));
7902 NDR_PULL_ALLOC(ndr
, r
->in
.new_val
);
7904 r
->in
.new_val
= NULL
;
7906 if (r
->in
.new_val
) {
7907 _mem_save_new_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7908 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_val
, 0);
7909 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
7910 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_val_0
, 0);
7912 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_val
));
7914 NDR_PULL_ALLOC(ndr
, r
->in
.old_val
);
7916 r
->in
.old_val
= NULL
;
7918 if (r
->in
.old_val
) {
7919 _mem_save_old_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7920 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_val
, 0);
7921 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
7922 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_val_0
, 0);
7925 if (flags
& NDR_OUT
) {
7926 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7928 return NDR_ERR_SUCCESS
;
7931 _PUBLIC_
void ndr_print_lsa_SetSecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetSecret
*r
)
7933 ndr_print_struct(ndr
, name
, "lsa_SetSecret");
7935 if (flags
& NDR_SET_VALUES
) {
7936 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7938 if (flags
& NDR_IN
) {
7939 ndr_print_struct(ndr
, "in", "lsa_SetSecret");
7941 ndr_print_ptr(ndr
, "sec_handle", r
->in
.sec_handle
);
7943 ndr_print_policy_handle(ndr
, "sec_handle", r
->in
.sec_handle
);
7945 ndr_print_ptr(ndr
, "new_val", r
->in
.new_val
);
7947 if (r
->in
.new_val
) {
7948 ndr_print_lsa_DATA_BUF(ndr
, "new_val", r
->in
.new_val
);
7951 ndr_print_ptr(ndr
, "old_val", r
->in
.old_val
);
7953 if (r
->in
.old_val
) {
7954 ndr_print_lsa_DATA_BUF(ndr
, "old_val", r
->in
.old_val
);
7959 if (flags
& NDR_OUT
) {
7960 ndr_print_struct(ndr
, "out", "lsa_SetSecret");
7962 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7968 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_QuerySecret(struct ndr_push
*ndr
, int flags
, const struct lsa_QuerySecret
*r
)
7970 if (flags
& NDR_IN
) {
7971 if (r
->in
.sec_handle
== NULL
) {
7972 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7974 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
7975 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_val
));
7976 if (r
->in
.new_val
) {
7977 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
7979 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_mtime
));
7980 if (r
->in
.new_mtime
) {
7981 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->in
.new_mtime
));
7983 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_val
));
7984 if (r
->in
.old_val
) {
7985 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
7987 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_mtime
));
7988 if (r
->in
.old_mtime
) {
7989 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->in
.old_mtime
));
7992 if (flags
& NDR_OUT
) {
7993 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.new_val
));
7994 if (r
->out
.new_val
) {
7995 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.new_val
));
7997 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.new_mtime
));
7998 if (r
->out
.new_mtime
) {
7999 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->out
.new_mtime
));
8001 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.old_val
));
8002 if (r
->out
.old_val
) {
8003 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.old_val
));
8005 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.old_mtime
));
8006 if (r
->out
.old_mtime
) {
8007 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->out
.old_mtime
));
8009 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8011 return NDR_ERR_SUCCESS
;
8014 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_QuerySecret(struct ndr_pull
*ndr
, int flags
, struct lsa_QuerySecret
*r
)
8016 uint32_t _ptr_new_val
;
8017 uint32_t _ptr_new_mtime
;
8018 uint32_t _ptr_old_val
;
8019 uint32_t _ptr_old_mtime
;
8020 TALLOC_CTX
*_mem_save_sec_handle_0
;
8021 TALLOC_CTX
*_mem_save_new_val_0
;
8022 TALLOC_CTX
*_mem_save_new_mtime_0
;
8023 TALLOC_CTX
*_mem_save_old_val_0
;
8024 TALLOC_CTX
*_mem_save_old_mtime_0
;
8025 if (flags
& NDR_IN
) {
8026 ZERO_STRUCT(r
->out
);
8028 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8029 NDR_PULL_ALLOC(ndr
, r
->in
.sec_handle
);
8031 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8032 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
8033 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
8034 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8035 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_val
));
8037 NDR_PULL_ALLOC(ndr
, r
->in
.new_val
);
8039 r
->in
.new_val
= NULL
;
8041 if (r
->in
.new_val
) {
8042 _mem_save_new_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8043 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_val
, 0);
8044 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
8045 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_val_0
, 0);
8047 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_mtime
));
8048 if (_ptr_new_mtime
) {
8049 NDR_PULL_ALLOC(ndr
, r
->in
.new_mtime
);
8051 r
->in
.new_mtime
= NULL
;
8053 if (r
->in
.new_mtime
) {
8054 _mem_save_new_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8055 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_mtime
, 0);
8056 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->in
.new_mtime
));
8057 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_mtime_0
, 0);
8059 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_val
));
8061 NDR_PULL_ALLOC(ndr
, r
->in
.old_val
);
8063 r
->in
.old_val
= NULL
;
8065 if (r
->in
.old_val
) {
8066 _mem_save_old_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8067 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_val
, 0);
8068 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
8069 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_val_0
, 0);
8071 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_mtime
));
8072 if (_ptr_old_mtime
) {
8073 NDR_PULL_ALLOC(ndr
, r
->in
.old_mtime
);
8075 r
->in
.old_mtime
= NULL
;
8077 if (r
->in
.old_mtime
) {
8078 _mem_save_old_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8079 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_mtime
, 0);
8080 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->in
.old_mtime
));
8081 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_mtime_0
, 0);
8084 if (flags
& NDR_OUT
) {
8085 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_val
));
8087 NDR_PULL_ALLOC(ndr
, r
->out
.new_val
);
8089 r
->out
.new_val
= NULL
;
8091 if (r
->out
.new_val
) {
8092 _mem_save_new_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8093 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.new_val
, 0);
8094 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.new_val
));
8095 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_val_0
, 0);
8097 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_mtime
));
8098 if (_ptr_new_mtime
) {
8099 NDR_PULL_ALLOC(ndr
, r
->out
.new_mtime
);
8101 r
->out
.new_mtime
= NULL
;
8103 if (r
->out
.new_mtime
) {
8104 _mem_save_new_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8105 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.new_mtime
, 0);
8106 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->out
.new_mtime
));
8107 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_mtime_0
, 0);
8109 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_val
));
8111 NDR_PULL_ALLOC(ndr
, r
->out
.old_val
);
8113 r
->out
.old_val
= NULL
;
8115 if (r
->out
.old_val
) {
8116 _mem_save_old_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8117 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.old_val
, 0);
8118 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.old_val
));
8119 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_val_0
, 0);
8121 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_mtime
));
8122 if (_ptr_old_mtime
) {
8123 NDR_PULL_ALLOC(ndr
, r
->out
.old_mtime
);
8125 r
->out
.old_mtime
= NULL
;
8127 if (r
->out
.old_mtime
) {
8128 _mem_save_old_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8129 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.old_mtime
, 0);
8130 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->out
.old_mtime
));
8131 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_mtime_0
, 0);
8133 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8135 return NDR_ERR_SUCCESS
;
8138 _PUBLIC_
void ndr_print_lsa_QuerySecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QuerySecret
*r
)
8140 ndr_print_struct(ndr
, name
, "lsa_QuerySecret");
8142 if (flags
& NDR_SET_VALUES
) {
8143 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8145 if (flags
& NDR_IN
) {
8146 ndr_print_struct(ndr
, "in", "lsa_QuerySecret");
8148 ndr_print_ptr(ndr
, "sec_handle", r
->in
.sec_handle
);
8150 ndr_print_policy_handle(ndr
, "sec_handle", r
->in
.sec_handle
);
8152 ndr_print_ptr(ndr
, "new_val", r
->in
.new_val
);
8154 if (r
->in
.new_val
) {
8155 ndr_print_lsa_DATA_BUF_PTR(ndr
, "new_val", r
->in
.new_val
);
8158 ndr_print_ptr(ndr
, "new_mtime", r
->in
.new_mtime
);
8160 if (r
->in
.new_mtime
) {
8161 ndr_print_NTTIME_hyper(ndr
, "new_mtime", *r
->in
.new_mtime
);
8164 ndr_print_ptr(ndr
, "old_val", r
->in
.old_val
);
8166 if (r
->in
.old_val
) {
8167 ndr_print_lsa_DATA_BUF_PTR(ndr
, "old_val", r
->in
.old_val
);
8170 ndr_print_ptr(ndr
, "old_mtime", r
->in
.old_mtime
);
8172 if (r
->in
.old_mtime
) {
8173 ndr_print_NTTIME_hyper(ndr
, "old_mtime", *r
->in
.old_mtime
);
8178 if (flags
& NDR_OUT
) {
8179 ndr_print_struct(ndr
, "out", "lsa_QuerySecret");
8181 ndr_print_ptr(ndr
, "new_val", r
->out
.new_val
);
8183 if (r
->out
.new_val
) {
8184 ndr_print_lsa_DATA_BUF_PTR(ndr
, "new_val", r
->out
.new_val
);
8187 ndr_print_ptr(ndr
, "new_mtime", r
->out
.new_mtime
);
8189 if (r
->out
.new_mtime
) {
8190 ndr_print_NTTIME_hyper(ndr
, "new_mtime", *r
->out
.new_mtime
);
8193 ndr_print_ptr(ndr
, "old_val", r
->out
.old_val
);
8195 if (r
->out
.old_val
) {
8196 ndr_print_lsa_DATA_BUF_PTR(ndr
, "old_val", r
->out
.old_val
);
8199 ndr_print_ptr(ndr
, "old_mtime", r
->out
.old_mtime
);
8201 if (r
->out
.old_mtime
) {
8202 ndr_print_NTTIME_hyper(ndr
, "old_mtime", *r
->out
.old_mtime
);
8205 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8211 static enum ndr_err_code
ndr_push_lsa_LookupPrivValue(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupPrivValue
*r
)
8213 if (flags
& NDR_IN
) {
8214 if (r
->in
.handle
== NULL
) {
8215 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8217 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8218 if (r
->in
.name
== NULL
) {
8219 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8221 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8223 if (flags
& NDR_OUT
) {
8224 if (r
->out
.luid
== NULL
) {
8225 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8227 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, r
->out
.luid
));
8228 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8230 return NDR_ERR_SUCCESS
;
8233 static enum ndr_err_code
ndr_pull_lsa_LookupPrivValue(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupPrivValue
*r
)
8235 TALLOC_CTX
*_mem_save_handle_0
;
8236 TALLOC_CTX
*_mem_save_name_0
;
8237 TALLOC_CTX
*_mem_save_luid_0
;
8238 if (flags
& NDR_IN
) {
8239 ZERO_STRUCT(r
->out
);
8241 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8242 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8244 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8245 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8246 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8247 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8248 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8249 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
8251 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8252 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
8253 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8254 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8255 NDR_PULL_ALLOC(ndr
, r
->out
.luid
);
8256 ZERO_STRUCTP(r
->out
.luid
);
8258 if (flags
& NDR_OUT
) {
8259 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8260 NDR_PULL_ALLOC(ndr
, r
->out
.luid
);
8262 _mem_save_luid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8263 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.luid
, LIBNDR_FLAG_REF_ALLOC
);
8264 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, r
->out
.luid
));
8265 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_luid_0
, LIBNDR_FLAG_REF_ALLOC
);
8266 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8268 return NDR_ERR_SUCCESS
;
8271 _PUBLIC_
void ndr_print_lsa_LookupPrivValue(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupPrivValue
*r
)
8273 ndr_print_struct(ndr
, name
, "lsa_LookupPrivValue");
8275 if (flags
& NDR_SET_VALUES
) {
8276 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8278 if (flags
& NDR_IN
) {
8279 ndr_print_struct(ndr
, "in", "lsa_LookupPrivValue");
8281 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8283 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8285 ndr_print_ptr(ndr
, "name", r
->in
.name
);
8287 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
8291 if (flags
& NDR_OUT
) {
8292 ndr_print_struct(ndr
, "out", "lsa_LookupPrivValue");
8294 ndr_print_ptr(ndr
, "luid", r
->out
.luid
);
8296 ndr_print_lsa_LUID(ndr
, "luid", r
->out
.luid
);
8298 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8304 static enum ndr_err_code
ndr_push_lsa_LookupPrivName(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupPrivName
*r
)
8306 if (flags
& NDR_IN
) {
8307 if (r
->in
.handle
== NULL
) {
8308 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8310 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8311 if (r
->in
.luid
== NULL
) {
8312 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8314 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, r
->in
.luid
));
8316 if (flags
& NDR_OUT
) {
8317 if (r
->out
.name
== NULL
) {
8318 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8320 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.name
));
8322 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.name
));
8324 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8326 return NDR_ERR_SUCCESS
;
8329 static enum ndr_err_code
ndr_pull_lsa_LookupPrivName(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupPrivName
*r
)
8332 TALLOC_CTX
*_mem_save_handle_0
;
8333 TALLOC_CTX
*_mem_save_luid_0
;
8334 TALLOC_CTX
*_mem_save_name_0
;
8335 TALLOC_CTX
*_mem_save_name_1
;
8336 if (flags
& NDR_IN
) {
8337 ZERO_STRUCT(r
->out
);
8339 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8340 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8342 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8343 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8344 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8345 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8346 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8347 NDR_PULL_ALLOC(ndr
, r
->in
.luid
);
8349 _mem_save_luid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8350 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.luid
, LIBNDR_FLAG_REF_ALLOC
);
8351 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, r
->in
.luid
));
8352 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_luid_0
, LIBNDR_FLAG_REF_ALLOC
);
8353 NDR_PULL_ALLOC(ndr
, r
->out
.name
);
8354 ZERO_STRUCTP(r
->out
.name
);
8356 if (flags
& NDR_OUT
) {
8357 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8358 NDR_PULL_ALLOC(ndr
, r
->out
.name
);
8360 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8361 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.name
, LIBNDR_FLAG_REF_ALLOC
);
8362 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
8364 NDR_PULL_ALLOC(ndr
, *r
->out
.name
);
8366 *r
->out
.name
= NULL
;
8369 _mem_save_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8370 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.name
, 0);
8371 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.name
));
8372 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_1
, 0);
8374 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8375 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8377 return NDR_ERR_SUCCESS
;
8380 _PUBLIC_
void ndr_print_lsa_LookupPrivName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupPrivName
*r
)
8382 ndr_print_struct(ndr
, name
, "lsa_LookupPrivName");
8384 if (flags
& NDR_SET_VALUES
) {
8385 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8387 if (flags
& NDR_IN
) {
8388 ndr_print_struct(ndr
, "in", "lsa_LookupPrivName");
8390 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8392 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8394 ndr_print_ptr(ndr
, "luid", r
->in
.luid
);
8396 ndr_print_lsa_LUID(ndr
, "luid", r
->in
.luid
);
8400 if (flags
& NDR_OUT
) {
8401 ndr_print_struct(ndr
, "out", "lsa_LookupPrivName");
8403 ndr_print_ptr(ndr
, "name", r
->out
.name
);
8405 ndr_print_ptr(ndr
, "name", *r
->out
.name
);
8408 ndr_print_lsa_StringLarge(ndr
, "name", *r
->out
.name
);
8412 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8418 static enum ndr_err_code
ndr_push_lsa_LookupPrivDisplayName(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupPrivDisplayName
*r
)
8420 if (flags
& NDR_IN
) {
8421 if (r
->in
.handle
== NULL
) {
8422 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8424 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8425 if (r
->in
.name
== NULL
) {
8426 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8428 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8429 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.language_id
));
8430 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.language_id_sys
));
8432 if (flags
& NDR_OUT
) {
8433 if (r
->out
.disp_name
== NULL
) {
8434 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8436 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.disp_name
));
8437 if (*r
->out
.disp_name
) {
8438 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.disp_name
));
8440 if (r
->out
.returned_language_id
== NULL
) {
8441 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8443 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->out
.returned_language_id
));
8444 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8446 return NDR_ERR_SUCCESS
;
8449 static enum ndr_err_code
ndr_pull_lsa_LookupPrivDisplayName(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupPrivDisplayName
*r
)
8451 uint32_t _ptr_disp_name
;
8452 TALLOC_CTX
*_mem_save_handle_0
;
8453 TALLOC_CTX
*_mem_save_name_0
;
8454 TALLOC_CTX
*_mem_save_disp_name_0
;
8455 TALLOC_CTX
*_mem_save_disp_name_1
;
8456 TALLOC_CTX
*_mem_save_returned_language_id_0
;
8457 if (flags
& NDR_IN
) {
8458 ZERO_STRUCT(r
->out
);
8460 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8461 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8463 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8464 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8465 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8466 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8467 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8468 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
8470 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8471 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
8472 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8473 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8474 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.language_id
));
8475 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.language_id_sys
));
8476 NDR_PULL_ALLOC(ndr
, r
->out
.disp_name
);
8477 ZERO_STRUCTP(r
->out
.disp_name
);
8478 NDR_PULL_ALLOC(ndr
, r
->out
.returned_language_id
);
8479 ZERO_STRUCTP(r
->out
.returned_language_id
);
8481 if (flags
& NDR_OUT
) {
8482 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8483 NDR_PULL_ALLOC(ndr
, r
->out
.disp_name
);
8485 _mem_save_disp_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8486 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.disp_name
, LIBNDR_FLAG_REF_ALLOC
);
8487 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_disp_name
));
8488 if (_ptr_disp_name
) {
8489 NDR_PULL_ALLOC(ndr
, *r
->out
.disp_name
);
8491 *r
->out
.disp_name
= NULL
;
8493 if (*r
->out
.disp_name
) {
8494 _mem_save_disp_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8495 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.disp_name
, 0);
8496 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.disp_name
));
8497 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_disp_name_1
, 0);
8499 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_disp_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8500 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8501 NDR_PULL_ALLOC(ndr
, r
->out
.returned_language_id
);
8503 _mem_save_returned_language_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8504 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.returned_language_id
, LIBNDR_FLAG_REF_ALLOC
);
8505 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->out
.returned_language_id
));
8506 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_returned_language_id_0
, LIBNDR_FLAG_REF_ALLOC
);
8507 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8509 return NDR_ERR_SUCCESS
;
8512 _PUBLIC_
void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupPrivDisplayName
*r
)
8514 ndr_print_struct(ndr
, name
, "lsa_LookupPrivDisplayName");
8516 if (flags
& NDR_SET_VALUES
) {
8517 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8519 if (flags
& NDR_IN
) {
8520 ndr_print_struct(ndr
, "in", "lsa_LookupPrivDisplayName");
8522 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8524 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8526 ndr_print_ptr(ndr
, "name", r
->in
.name
);
8528 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
8530 ndr_print_uint16(ndr
, "language_id", r
->in
.language_id
);
8531 ndr_print_uint16(ndr
, "language_id_sys", r
->in
.language_id_sys
);
8534 if (flags
& NDR_OUT
) {
8535 ndr_print_struct(ndr
, "out", "lsa_LookupPrivDisplayName");
8537 ndr_print_ptr(ndr
, "disp_name", r
->out
.disp_name
);
8539 ndr_print_ptr(ndr
, "disp_name", *r
->out
.disp_name
);
8541 if (*r
->out
.disp_name
) {
8542 ndr_print_lsa_StringLarge(ndr
, "disp_name", *r
->out
.disp_name
);
8546 ndr_print_ptr(ndr
, "returned_language_id", r
->out
.returned_language_id
);
8548 ndr_print_uint16(ndr
, "returned_language_id", *r
->out
.returned_language_id
);
8550 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8556 static enum ndr_err_code
ndr_push_lsa_DeleteObject(struct ndr_push
*ndr
, int flags
, const struct lsa_DeleteObject
*r
)
8558 if (flags
& NDR_IN
) {
8559 if (r
->in
.handle
== NULL
) {
8560 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8562 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8564 if (flags
& NDR_OUT
) {
8565 if (r
->out
.handle
== NULL
) {
8566 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8568 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
8569 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8571 return NDR_ERR_SUCCESS
;
8574 static enum ndr_err_code
ndr_pull_lsa_DeleteObject(struct ndr_pull
*ndr
, int flags
, struct lsa_DeleteObject
*r
)
8576 TALLOC_CTX
*_mem_save_handle_0
;
8577 if (flags
& NDR_IN
) {
8578 ZERO_STRUCT(r
->out
);
8580 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8581 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8583 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8584 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8585 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8586 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8587 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
8588 *r
->out
.handle
= *r
->in
.handle
;
8590 if (flags
& NDR_OUT
) {
8591 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8592 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
8594 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8595 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8596 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
8597 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8598 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8600 return NDR_ERR_SUCCESS
;
8603 _PUBLIC_
void ndr_print_lsa_DeleteObject(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_DeleteObject
*r
)
8605 ndr_print_struct(ndr
, name
, "lsa_DeleteObject");
8607 if (flags
& NDR_SET_VALUES
) {
8608 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8610 if (flags
& NDR_IN
) {
8611 ndr_print_struct(ndr
, "in", "lsa_DeleteObject");
8613 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8615 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8619 if (flags
& NDR_OUT
) {
8620 ndr_print_struct(ndr
, "out", "lsa_DeleteObject");
8622 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
8624 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
8626 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8632 static enum ndr_err_code
ndr_push_lsa_EnumAccountsWithUserRight(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumAccountsWithUserRight
*r
)
8634 if (flags
& NDR_IN
) {
8635 if (r
->in
.handle
== NULL
) {
8636 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8638 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8639 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.name
));
8641 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8644 if (flags
& NDR_OUT
) {
8645 if (r
->out
.sids
== NULL
) {
8646 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8648 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
8649 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8651 return NDR_ERR_SUCCESS
;
8654 static enum ndr_err_code
ndr_pull_lsa_EnumAccountsWithUserRight(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumAccountsWithUserRight
*r
)
8657 TALLOC_CTX
*_mem_save_handle_0
;
8658 TALLOC_CTX
*_mem_save_name_0
;
8659 TALLOC_CTX
*_mem_save_sids_0
;
8660 if (flags
& NDR_IN
) {
8661 ZERO_STRUCT(r
->out
);
8663 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8664 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8666 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8667 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8668 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8669 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8670 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
8672 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
8677 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8678 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, 0);
8679 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8680 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
8682 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
8683 ZERO_STRUCTP(r
->out
.sids
);
8685 if (flags
& NDR_OUT
) {
8686 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8687 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
8689 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8690 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
8691 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
8692 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
8693 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8695 return NDR_ERR_SUCCESS
;
8698 _PUBLIC_
void ndr_print_lsa_EnumAccountsWithUserRight(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumAccountsWithUserRight
*r
)
8700 ndr_print_struct(ndr
, name
, "lsa_EnumAccountsWithUserRight");
8702 if (flags
& NDR_SET_VALUES
) {
8703 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8705 if (flags
& NDR_IN
) {
8706 ndr_print_struct(ndr
, "in", "lsa_EnumAccountsWithUserRight");
8708 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8710 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8712 ndr_print_ptr(ndr
, "name", r
->in
.name
);
8715 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
8720 if (flags
& NDR_OUT
) {
8721 ndr_print_struct(ndr
, "out", "lsa_EnumAccountsWithUserRight");
8723 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
8725 ndr_print_lsa_SidArray(ndr
, "sids", r
->out
.sids
);
8727 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8733 static enum ndr_err_code
ndr_push_lsa_EnumAccountRights(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumAccountRights
*r
)
8735 if (flags
& NDR_IN
) {
8736 if (r
->in
.handle
== NULL
) {
8737 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8739 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8740 if (r
->in
.sid
== NULL
) {
8741 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8743 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8745 if (flags
& NDR_OUT
) {
8746 if (r
->out
.rights
== NULL
) {
8747 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8749 NDR_CHECK(ndr_push_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rights
));
8750 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8752 return NDR_ERR_SUCCESS
;
8755 static enum ndr_err_code
ndr_pull_lsa_EnumAccountRights(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumAccountRights
*r
)
8757 TALLOC_CTX
*_mem_save_handle_0
;
8758 TALLOC_CTX
*_mem_save_sid_0
;
8759 TALLOC_CTX
*_mem_save_rights_0
;
8760 if (flags
& NDR_IN
) {
8761 ZERO_STRUCT(r
->out
);
8763 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8764 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8766 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8767 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8768 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8769 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8770 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8771 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8773 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8774 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8775 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8776 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8777 NDR_PULL_ALLOC(ndr
, r
->out
.rights
);
8778 ZERO_STRUCTP(r
->out
.rights
);
8780 if (flags
& NDR_OUT
) {
8781 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8782 NDR_PULL_ALLOC(ndr
, r
->out
.rights
);
8784 _mem_save_rights_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8785 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rights
, LIBNDR_FLAG_REF_ALLOC
);
8786 NDR_CHECK(ndr_pull_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rights
));
8787 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rights_0
, LIBNDR_FLAG_REF_ALLOC
);
8788 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8790 return NDR_ERR_SUCCESS
;
8793 _PUBLIC_
void ndr_print_lsa_EnumAccountRights(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumAccountRights
*r
)
8795 ndr_print_struct(ndr
, name
, "lsa_EnumAccountRights");
8797 if (flags
& NDR_SET_VALUES
) {
8798 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8800 if (flags
& NDR_IN
) {
8801 ndr_print_struct(ndr
, "in", "lsa_EnumAccountRights");
8803 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8805 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8807 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
8809 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
8813 if (flags
& NDR_OUT
) {
8814 ndr_print_struct(ndr
, "out", "lsa_EnumAccountRights");
8816 ndr_print_ptr(ndr
, "rights", r
->out
.rights
);
8818 ndr_print_lsa_RightSet(ndr
, "rights", r
->out
.rights
);
8820 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8826 static enum ndr_err_code
ndr_push_lsa_AddAccountRights(struct ndr_push
*ndr
, int flags
, const struct lsa_AddAccountRights
*r
)
8828 if (flags
& NDR_IN
) {
8829 if (r
->in
.handle
== NULL
) {
8830 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8832 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8833 if (r
->in
.sid
== NULL
) {
8834 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8836 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8837 if (r
->in
.rights
== NULL
) {
8838 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8840 NDR_CHECK(ndr_push_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
8842 if (flags
& NDR_OUT
) {
8843 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8845 return NDR_ERR_SUCCESS
;
8848 static enum ndr_err_code
ndr_pull_lsa_AddAccountRights(struct ndr_pull
*ndr
, int flags
, struct lsa_AddAccountRights
*r
)
8850 TALLOC_CTX
*_mem_save_handle_0
;
8851 TALLOC_CTX
*_mem_save_sid_0
;
8852 TALLOC_CTX
*_mem_save_rights_0
;
8853 if (flags
& NDR_IN
) {
8854 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8855 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8857 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8858 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8859 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8860 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8861 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8862 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8864 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8865 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8866 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8867 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8868 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8869 NDR_PULL_ALLOC(ndr
, r
->in
.rights
);
8871 _mem_save_rights_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8872 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.rights
, LIBNDR_FLAG_REF_ALLOC
);
8873 NDR_CHECK(ndr_pull_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
8874 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rights_0
, LIBNDR_FLAG_REF_ALLOC
);
8876 if (flags
& NDR_OUT
) {
8877 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8879 return NDR_ERR_SUCCESS
;
8882 _PUBLIC_
void ndr_print_lsa_AddAccountRights(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_AddAccountRights
*r
)
8884 ndr_print_struct(ndr
, name
, "lsa_AddAccountRights");
8886 if (flags
& NDR_SET_VALUES
) {
8887 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8889 if (flags
& NDR_IN
) {
8890 ndr_print_struct(ndr
, "in", "lsa_AddAccountRights");
8892 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8894 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8896 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
8898 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
8900 ndr_print_ptr(ndr
, "rights", r
->in
.rights
);
8902 ndr_print_lsa_RightSet(ndr
, "rights", r
->in
.rights
);
8906 if (flags
& NDR_OUT
) {
8907 ndr_print_struct(ndr
, "out", "lsa_AddAccountRights");
8909 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8915 static enum ndr_err_code
ndr_push_lsa_RemoveAccountRights(struct ndr_push
*ndr
, int flags
, const struct lsa_RemoveAccountRights
*r
)
8917 if (flags
& NDR_IN
) {
8918 if (r
->in
.handle
== NULL
) {
8919 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8921 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8922 if (r
->in
.sid
== NULL
) {
8923 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8925 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8926 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.remove_all
));
8927 if (r
->in
.rights
== NULL
) {
8928 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8930 NDR_CHECK(ndr_push_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
8932 if (flags
& NDR_OUT
) {
8933 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8935 return NDR_ERR_SUCCESS
;
8938 static enum ndr_err_code
ndr_pull_lsa_RemoveAccountRights(struct ndr_pull
*ndr
, int flags
, struct lsa_RemoveAccountRights
*r
)
8940 TALLOC_CTX
*_mem_save_handle_0
;
8941 TALLOC_CTX
*_mem_save_sid_0
;
8942 TALLOC_CTX
*_mem_save_rights_0
;
8943 if (flags
& NDR_IN
) {
8944 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8945 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8947 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8948 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8949 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8950 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8951 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8952 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8954 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8955 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8956 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8957 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8958 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.remove_all
));
8959 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8960 NDR_PULL_ALLOC(ndr
, r
->in
.rights
);
8962 _mem_save_rights_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8963 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.rights
, LIBNDR_FLAG_REF_ALLOC
);
8964 NDR_CHECK(ndr_pull_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
8965 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rights_0
, LIBNDR_FLAG_REF_ALLOC
);
8967 if (flags
& NDR_OUT
) {
8968 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8970 return NDR_ERR_SUCCESS
;
8973 _PUBLIC_
void ndr_print_lsa_RemoveAccountRights(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_RemoveAccountRights
*r
)
8975 ndr_print_struct(ndr
, name
, "lsa_RemoveAccountRights");
8977 if (flags
& NDR_SET_VALUES
) {
8978 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8980 if (flags
& NDR_IN
) {
8981 ndr_print_struct(ndr
, "in", "lsa_RemoveAccountRights");
8983 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8985 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8987 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
8989 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
8991 ndr_print_uint8(ndr
, "remove_all", r
->in
.remove_all
);
8992 ndr_print_ptr(ndr
, "rights", r
->in
.rights
);
8994 ndr_print_lsa_RightSet(ndr
, "rights", r
->in
.rights
);
8998 if (flags
& NDR_OUT
) {
8999 ndr_print_struct(ndr
, "out", "lsa_RemoveAccountRights");
9001 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9007 static enum ndr_err_code
ndr_push_lsa_QueryTrustedDomainInfoBySid(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryTrustedDomainInfoBySid
*r
)
9009 if (flags
& NDR_IN
) {
9010 if (r
->in
.handle
== NULL
) {
9011 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9013 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9014 if (r
->in
.dom_sid
== NULL
) {
9015 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9017 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9018 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
9020 if (flags
& NDR_OUT
) {
9021 if (r
->out
.info
== NULL
) {
9022 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9024 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
9026 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9027 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9029 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9031 return NDR_ERR_SUCCESS
;
9034 static enum ndr_err_code
ndr_pull_lsa_QueryTrustedDomainInfoBySid(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryTrustedDomainInfoBySid
*r
)
9037 TALLOC_CTX
*_mem_save_handle_0
;
9038 TALLOC_CTX
*_mem_save_dom_sid_0
;
9039 TALLOC_CTX
*_mem_save_info_0
;
9040 TALLOC_CTX
*_mem_save_info_1
;
9041 if (flags
& NDR_IN
) {
9042 ZERO_STRUCT(r
->out
);
9044 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9045 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9047 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9048 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9049 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9050 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9051 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9052 NDR_PULL_ALLOC(ndr
, r
->in
.dom_sid
);
9054 _mem_save_dom_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9055 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dom_sid
, LIBNDR_FLAG_REF_ALLOC
);
9056 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9057 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
9058 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
9059 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9060 ZERO_STRUCTP(r
->out
.info
);
9062 if (flags
& NDR_OUT
) {
9063 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9064 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9066 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9067 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
9068 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
9070 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
9072 *r
->out
.info
= NULL
;
9075 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9076 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
9077 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9078 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9079 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
9081 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9082 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9084 return NDR_ERR_SUCCESS
;
9087 _PUBLIC_
void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryTrustedDomainInfoBySid
*r
)
9089 ndr_print_struct(ndr
, name
, "lsa_QueryTrustedDomainInfoBySid");
9091 if (flags
& NDR_SET_VALUES
) {
9092 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9094 if (flags
& NDR_IN
) {
9095 ndr_print_struct(ndr
, "in", "lsa_QueryTrustedDomainInfoBySid");
9097 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9099 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9101 ndr_print_ptr(ndr
, "dom_sid", r
->in
.dom_sid
);
9103 ndr_print_dom_sid2(ndr
, "dom_sid", r
->in
.dom_sid
);
9105 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
9108 if (flags
& NDR_OUT
) {
9109 ndr_print_struct(ndr
, "out", "lsa_QueryTrustedDomainInfoBySid");
9111 ndr_print_ptr(ndr
, "info", r
->out
.info
);
9113 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
9116 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
9117 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", *r
->out
.info
);
9121 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9127 static enum ndr_err_code
ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push
*ndr
, int flags
, const struct lsa_SetTrustedDomainInfo
*r
)
9129 if (flags
& NDR_IN
) {
9130 if (r
->in
.handle
== NULL
) {
9131 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9133 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9134 if (r
->in
.dom_sid
== NULL
) {
9135 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9137 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9138 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
9139 if (r
->in
.info
== NULL
) {
9140 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9142 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9143 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9145 if (flags
& NDR_OUT
) {
9146 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9148 return NDR_ERR_SUCCESS
;
9151 static enum ndr_err_code
ndr_pull_lsa_SetTrustedDomainInfo(struct ndr_pull
*ndr
, int flags
, struct lsa_SetTrustedDomainInfo
*r
)
9153 TALLOC_CTX
*_mem_save_handle_0
;
9154 TALLOC_CTX
*_mem_save_dom_sid_0
;
9155 TALLOC_CTX
*_mem_save_info_0
;
9156 if (flags
& NDR_IN
) {
9157 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9158 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9160 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9161 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9162 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9163 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9164 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9165 NDR_PULL_ALLOC(ndr
, r
->in
.dom_sid
);
9167 _mem_save_dom_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9168 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dom_sid
, LIBNDR_FLAG_REF_ALLOC
);
9169 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9170 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
9171 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
9172 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9173 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
9175 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9176 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
9177 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9178 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9179 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9181 if (flags
& NDR_OUT
) {
9182 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9184 return NDR_ERR_SUCCESS
;
9187 _PUBLIC_
void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetTrustedDomainInfo
*r
)
9189 ndr_print_struct(ndr
, name
, "lsa_SetTrustedDomainInfo");
9191 if (flags
& NDR_SET_VALUES
) {
9192 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9194 if (flags
& NDR_IN
) {
9195 ndr_print_struct(ndr
, "in", "lsa_SetTrustedDomainInfo");
9197 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9199 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9201 ndr_print_ptr(ndr
, "dom_sid", r
->in
.dom_sid
);
9203 ndr_print_dom_sid2(ndr
, "dom_sid", r
->in
.dom_sid
);
9205 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
9206 ndr_print_ptr(ndr
, "info", r
->in
.info
);
9208 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
9209 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", r
->in
.info
);
9213 if (flags
& NDR_OUT
) {
9214 ndr_print_struct(ndr
, "out", "lsa_SetTrustedDomainInfo");
9216 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9222 static enum ndr_err_code
ndr_push_lsa_DeleteTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_DeleteTrustedDomain
*r
)
9224 if (flags
& NDR_IN
) {
9225 if (r
->in
.handle
== NULL
) {
9226 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9228 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9229 if (r
->in
.dom_sid
== NULL
) {
9230 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9232 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9234 if (flags
& NDR_OUT
) {
9235 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9237 return NDR_ERR_SUCCESS
;
9240 static enum ndr_err_code
ndr_pull_lsa_DeleteTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_DeleteTrustedDomain
*r
)
9242 TALLOC_CTX
*_mem_save_handle_0
;
9243 TALLOC_CTX
*_mem_save_dom_sid_0
;
9244 if (flags
& NDR_IN
) {
9245 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9246 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9248 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9249 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9250 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9251 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9252 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9253 NDR_PULL_ALLOC(ndr
, r
->in
.dom_sid
);
9255 _mem_save_dom_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9256 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dom_sid
, LIBNDR_FLAG_REF_ALLOC
);
9257 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9258 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
9260 if (flags
& NDR_OUT
) {
9261 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9263 return NDR_ERR_SUCCESS
;
9266 _PUBLIC_
void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_DeleteTrustedDomain
*r
)
9268 ndr_print_struct(ndr
, name
, "lsa_DeleteTrustedDomain");
9270 if (flags
& NDR_SET_VALUES
) {
9271 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9273 if (flags
& NDR_IN
) {
9274 ndr_print_struct(ndr
, "in", "lsa_DeleteTrustedDomain");
9276 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9278 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9280 ndr_print_ptr(ndr
, "dom_sid", r
->in
.dom_sid
);
9282 ndr_print_dom_sid2(ndr
, "dom_sid", r
->in
.dom_sid
);
9286 if (flags
& NDR_OUT
) {
9287 ndr_print_struct(ndr
, "out", "lsa_DeleteTrustedDomain");
9289 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9295 static enum ndr_err_code
ndr_push_lsa_StorePrivateData(struct ndr_push
*ndr
, int flags
, const struct lsa_StorePrivateData
*r
)
9297 if (flags
& NDR_IN
) {
9299 if (flags
& NDR_OUT
) {
9300 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9302 return NDR_ERR_SUCCESS
;
9305 static enum ndr_err_code
ndr_pull_lsa_StorePrivateData(struct ndr_pull
*ndr
, int flags
, struct lsa_StorePrivateData
*r
)
9307 if (flags
& NDR_IN
) {
9309 if (flags
& NDR_OUT
) {
9310 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9312 return NDR_ERR_SUCCESS
;
9315 _PUBLIC_
void ndr_print_lsa_StorePrivateData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_StorePrivateData
*r
)
9317 ndr_print_struct(ndr
, name
, "lsa_StorePrivateData");
9319 if (flags
& NDR_SET_VALUES
) {
9320 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9322 if (flags
& NDR_IN
) {
9323 ndr_print_struct(ndr
, "in", "lsa_StorePrivateData");
9327 if (flags
& NDR_OUT
) {
9328 ndr_print_struct(ndr
, "out", "lsa_StorePrivateData");
9330 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9336 static enum ndr_err_code
ndr_push_lsa_RetrievePrivateData(struct ndr_push
*ndr
, int flags
, const struct lsa_RetrievePrivateData
*r
)
9338 if (flags
& NDR_IN
) {
9340 if (flags
& NDR_OUT
) {
9341 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9343 return NDR_ERR_SUCCESS
;
9346 static enum ndr_err_code
ndr_pull_lsa_RetrievePrivateData(struct ndr_pull
*ndr
, int flags
, struct lsa_RetrievePrivateData
*r
)
9348 if (flags
& NDR_IN
) {
9350 if (flags
& NDR_OUT
) {
9351 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9353 return NDR_ERR_SUCCESS
;
9356 _PUBLIC_
void ndr_print_lsa_RetrievePrivateData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_RetrievePrivateData
*r
)
9358 ndr_print_struct(ndr
, name
, "lsa_RetrievePrivateData");
9360 if (flags
& NDR_SET_VALUES
) {
9361 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9363 if (flags
& NDR_IN
) {
9364 ndr_print_struct(ndr
, "in", "lsa_RetrievePrivateData");
9368 if (flags
& NDR_OUT
) {
9369 ndr_print_struct(ndr
, "out", "lsa_RetrievePrivateData");
9371 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9377 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_OpenPolicy2(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenPolicy2
*r
)
9379 if (flags
& NDR_IN
) {
9380 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
9381 if (r
->in
.system_name
) {
9382 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9383 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9384 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9385 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.system_name
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9387 if (r
->in
.attr
== NULL
) {
9388 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9390 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
9391 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
9393 if (flags
& NDR_OUT
) {
9394 if (r
->out
.handle
== NULL
) {
9395 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9397 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
9398 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9400 return NDR_ERR_SUCCESS
;
9403 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_OpenPolicy2(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenPolicy2
*r
)
9405 uint32_t _ptr_system_name
;
9406 uint32_t size_system_name_1
= 0;
9407 uint32_t length_system_name_1
= 0;
9408 TALLOC_CTX
*_mem_save_system_name_0
;
9409 TALLOC_CTX
*_mem_save_attr_0
;
9410 TALLOC_CTX
*_mem_save_handle_0
;
9411 if (flags
& NDR_IN
) {
9412 ZERO_STRUCT(r
->out
);
9414 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
9415 if (_ptr_system_name
) {
9416 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
9418 r
->in
.system_name
= NULL
;
9420 if (r
->in
.system_name
) {
9421 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9422 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
9423 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
9424 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
9425 size_system_name_1
= ndr_get_array_size(ndr
, &r
->in
.system_name
);
9426 length_system_name_1
= ndr_get_array_length(ndr
, &r
->in
.system_name
);
9427 if (length_system_name_1
> size_system_name_1
) {
9428 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", size_system_name_1
, length_system_name_1
);
9430 NDR_CHECK(ndr_check_string_terminator(ndr
, length_system_name_1
, sizeof(uint16_t)));
9431 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.system_name
, length_system_name_1
, sizeof(uint16_t), CH_UTF16
));
9432 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
9434 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9435 NDR_PULL_ALLOC(ndr
, r
->in
.attr
);
9437 _mem_save_attr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9438 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.attr
, LIBNDR_FLAG_REF_ALLOC
);
9439 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
9440 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attr_0
, LIBNDR_FLAG_REF_ALLOC
);
9441 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
9442 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
9443 ZERO_STRUCTP(r
->out
.handle
);
9445 if (flags
& NDR_OUT
) {
9446 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9447 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
9449 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9450 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9451 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
9452 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9453 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9455 return NDR_ERR_SUCCESS
;
9458 _PUBLIC_
void ndr_print_lsa_OpenPolicy2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenPolicy2
*r
)
9460 ndr_print_struct(ndr
, name
, "lsa_OpenPolicy2");
9462 if (flags
& NDR_SET_VALUES
) {
9463 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9465 if (flags
& NDR_IN
) {
9466 ndr_print_struct(ndr
, "in", "lsa_OpenPolicy2");
9468 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
9470 if (r
->in
.system_name
) {
9471 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
9474 ndr_print_ptr(ndr
, "attr", r
->in
.attr
);
9476 ndr_print_lsa_ObjectAttribute(ndr
, "attr", r
->in
.attr
);
9478 ndr_print_lsa_PolicyAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
9481 if (flags
& NDR_OUT
) {
9482 ndr_print_struct(ndr
, "out", "lsa_OpenPolicy2");
9484 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
9486 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
9488 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9494 static enum ndr_err_code
ndr_push_lsa_GetUserName(struct ndr_push
*ndr
, int flags
, const struct lsa_GetUserName
*r
)
9496 if (flags
& NDR_IN
) {
9497 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
9498 if (r
->in
.system_name
) {
9499 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9500 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9501 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9502 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.system_name
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9504 if (r
->in
.account_name
== NULL
) {
9505 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9507 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.account_name
));
9508 if (*r
->in
.account_name
) {
9509 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.account_name
));
9511 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.authority_name
));
9512 if (r
->in
.authority_name
) {
9513 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.authority_name
));
9514 if (*r
->in
.authority_name
) {
9515 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.authority_name
));
9519 if (flags
& NDR_OUT
) {
9520 if (r
->out
.account_name
== NULL
) {
9521 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9523 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.account_name
));
9524 if (*r
->out
.account_name
) {
9525 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.account_name
));
9527 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.authority_name
));
9528 if (r
->out
.authority_name
) {
9529 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.authority_name
));
9530 if (*r
->out
.authority_name
) {
9531 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.authority_name
));
9534 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9536 return NDR_ERR_SUCCESS
;
9539 static enum ndr_err_code
ndr_pull_lsa_GetUserName(struct ndr_pull
*ndr
, int flags
, struct lsa_GetUserName
*r
)
9541 uint32_t _ptr_system_name
;
9542 uint32_t size_system_name_1
= 0;
9543 uint32_t length_system_name_1
= 0;
9544 uint32_t _ptr_account_name
;
9545 uint32_t _ptr_authority_name
;
9546 TALLOC_CTX
*_mem_save_system_name_0
;
9547 TALLOC_CTX
*_mem_save_account_name_0
;
9548 TALLOC_CTX
*_mem_save_account_name_1
;
9549 TALLOC_CTX
*_mem_save_authority_name_0
;
9550 TALLOC_CTX
*_mem_save_authority_name_1
;
9551 if (flags
& NDR_IN
) {
9552 ZERO_STRUCT(r
->out
);
9554 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
9555 if (_ptr_system_name
) {
9556 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
9558 r
->in
.system_name
= NULL
;
9560 if (r
->in
.system_name
) {
9561 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9562 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
9563 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
9564 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
9565 size_system_name_1
= ndr_get_array_size(ndr
, &r
->in
.system_name
);
9566 length_system_name_1
= ndr_get_array_length(ndr
, &r
->in
.system_name
);
9567 if (length_system_name_1
> size_system_name_1
) {
9568 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", size_system_name_1
, length_system_name_1
);
9570 NDR_CHECK(ndr_check_string_terminator(ndr
, length_system_name_1
, sizeof(uint16_t)));
9571 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.system_name
, length_system_name_1
, sizeof(uint16_t), CH_UTF16
));
9572 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
9574 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9575 NDR_PULL_ALLOC(ndr
, r
->in
.account_name
);
9577 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9578 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account_name
, LIBNDR_FLAG_REF_ALLOC
);
9579 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account_name
));
9580 if (_ptr_account_name
) {
9581 NDR_PULL_ALLOC(ndr
, *r
->in
.account_name
);
9583 *r
->in
.account_name
= NULL
;
9585 if (*r
->in
.account_name
) {
9586 _mem_save_account_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9587 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.account_name
, 0);
9588 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.account_name
));
9589 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_1
, 0);
9591 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, LIBNDR_FLAG_REF_ALLOC
);
9592 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9593 if (_ptr_authority_name
) {
9594 NDR_PULL_ALLOC(ndr
, r
->in
.authority_name
);
9596 r
->in
.authority_name
= NULL
;
9598 if (r
->in
.authority_name
) {
9599 _mem_save_authority_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9600 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.authority_name
, 0);
9601 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9602 if (_ptr_authority_name
) {
9603 NDR_PULL_ALLOC(ndr
, *r
->in
.authority_name
);
9605 *r
->in
.authority_name
= NULL
;
9607 if (*r
->in
.authority_name
) {
9608 _mem_save_authority_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9609 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.authority_name
, 0);
9610 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.authority_name
));
9611 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_1
, 0);
9613 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_0
, 0);
9615 NDR_PULL_ALLOC(ndr
, r
->out
.account_name
);
9616 *r
->out
.account_name
= *r
->in
.account_name
;
9618 if (flags
& NDR_OUT
) {
9619 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9620 NDR_PULL_ALLOC(ndr
, r
->out
.account_name
);
9622 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9623 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.account_name
, LIBNDR_FLAG_REF_ALLOC
);
9624 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account_name
));
9625 if (_ptr_account_name
) {
9626 NDR_PULL_ALLOC(ndr
, *r
->out
.account_name
);
9628 *r
->out
.account_name
= NULL
;
9630 if (*r
->out
.account_name
) {
9631 _mem_save_account_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9632 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.account_name
, 0);
9633 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.account_name
));
9634 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_1
, 0);
9636 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, LIBNDR_FLAG_REF_ALLOC
);
9637 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9638 if (_ptr_authority_name
) {
9639 NDR_PULL_ALLOC(ndr
, r
->out
.authority_name
);
9641 r
->out
.authority_name
= NULL
;
9643 if (r
->out
.authority_name
) {
9644 _mem_save_authority_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9645 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.authority_name
, 0);
9646 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9647 if (_ptr_authority_name
) {
9648 NDR_PULL_ALLOC(ndr
, *r
->out
.authority_name
);
9650 *r
->out
.authority_name
= NULL
;
9652 if (*r
->out
.authority_name
) {
9653 _mem_save_authority_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9654 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.authority_name
, 0);
9655 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.authority_name
));
9656 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_1
, 0);
9658 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_0
, 0);
9660 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9662 return NDR_ERR_SUCCESS
;
9665 _PUBLIC_
void ndr_print_lsa_GetUserName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_GetUserName
*r
)
9667 ndr_print_struct(ndr
, name
, "lsa_GetUserName");
9669 if (flags
& NDR_SET_VALUES
) {
9670 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9672 if (flags
& NDR_IN
) {
9673 ndr_print_struct(ndr
, "in", "lsa_GetUserName");
9675 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
9677 if (r
->in
.system_name
) {
9678 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
9681 ndr_print_ptr(ndr
, "account_name", r
->in
.account_name
);
9683 ndr_print_ptr(ndr
, "account_name", *r
->in
.account_name
);
9685 if (*r
->in
.account_name
) {
9686 ndr_print_lsa_String(ndr
, "account_name", *r
->in
.account_name
);
9690 ndr_print_ptr(ndr
, "authority_name", r
->in
.authority_name
);
9692 if (r
->in
.authority_name
) {
9693 ndr_print_ptr(ndr
, "authority_name", *r
->in
.authority_name
);
9695 if (*r
->in
.authority_name
) {
9696 ndr_print_lsa_String(ndr
, "authority_name", *r
->in
.authority_name
);
9703 if (flags
& NDR_OUT
) {
9704 ndr_print_struct(ndr
, "out", "lsa_GetUserName");
9706 ndr_print_ptr(ndr
, "account_name", r
->out
.account_name
);
9708 ndr_print_ptr(ndr
, "account_name", *r
->out
.account_name
);
9710 if (*r
->out
.account_name
) {
9711 ndr_print_lsa_String(ndr
, "account_name", *r
->out
.account_name
);
9715 ndr_print_ptr(ndr
, "authority_name", r
->out
.authority_name
);
9717 if (r
->out
.authority_name
) {
9718 ndr_print_ptr(ndr
, "authority_name", *r
->out
.authority_name
);
9720 if (*r
->out
.authority_name
) {
9721 ndr_print_lsa_String(ndr
, "authority_name", *r
->out
.authority_name
);
9726 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9732 static enum ndr_err_code
ndr_push_lsa_QueryInfoPolicy2(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryInfoPolicy2
*r
)
9734 if (flags
& NDR_IN
) {
9735 if (r
->in
.handle
== NULL
) {
9736 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9738 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9739 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
9741 if (flags
& NDR_OUT
) {
9742 if (r
->out
.info
== NULL
) {
9743 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9745 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
9747 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9748 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9750 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9752 return NDR_ERR_SUCCESS
;
9755 static enum ndr_err_code
ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryInfoPolicy2
*r
)
9758 TALLOC_CTX
*_mem_save_handle_0
;
9759 TALLOC_CTX
*_mem_save_info_0
;
9760 TALLOC_CTX
*_mem_save_info_1
;
9761 if (flags
& NDR_IN
) {
9762 ZERO_STRUCT(r
->out
);
9764 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9765 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9767 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9768 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9769 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9770 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9771 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
9772 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9773 ZERO_STRUCTP(r
->out
.info
);
9775 if (flags
& NDR_OUT
) {
9776 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9777 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9779 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9780 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
9781 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
9783 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
9785 *r
->out
.info
= NULL
;
9788 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9789 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
9790 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9791 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9792 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
9794 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9795 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9797 return NDR_ERR_SUCCESS
;
9800 _PUBLIC_
void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryInfoPolicy2
*r
)
9802 ndr_print_struct(ndr
, name
, "lsa_QueryInfoPolicy2");
9804 if (flags
& NDR_SET_VALUES
) {
9805 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9807 if (flags
& NDR_IN
) {
9808 ndr_print_struct(ndr
, "in", "lsa_QueryInfoPolicy2");
9810 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9812 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9814 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
9817 if (flags
& NDR_OUT
) {
9818 ndr_print_struct(ndr
, "out", "lsa_QueryInfoPolicy2");
9820 ndr_print_ptr(ndr
, "info", r
->out
.info
);
9822 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
9825 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
9826 ndr_print_lsa_PolicyInformation(ndr
, "info", *r
->out
.info
);
9830 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9836 static enum ndr_err_code
ndr_push_lsa_SetInfoPolicy2(struct ndr_push
*ndr
, int flags
, const struct lsa_SetInfoPolicy2
*r
)
9838 if (flags
& NDR_IN
) {
9839 if (r
->in
.handle
== NULL
) {
9840 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9842 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9843 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
9844 if (r
->in
.info
== NULL
) {
9845 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9847 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9848 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9850 if (flags
& NDR_OUT
) {
9851 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9853 return NDR_ERR_SUCCESS
;
9856 static enum ndr_err_code
ndr_pull_lsa_SetInfoPolicy2(struct ndr_pull
*ndr
, int flags
, struct lsa_SetInfoPolicy2
*r
)
9858 TALLOC_CTX
*_mem_save_handle_0
;
9859 TALLOC_CTX
*_mem_save_info_0
;
9860 if (flags
& NDR_IN
) {
9861 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9862 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9864 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9865 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9866 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9867 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9868 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
9869 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9870 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
9872 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9873 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
9874 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9875 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9876 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9878 if (flags
& NDR_OUT
) {
9879 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9881 return NDR_ERR_SUCCESS
;
9884 _PUBLIC_
void ndr_print_lsa_SetInfoPolicy2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetInfoPolicy2
*r
)
9886 ndr_print_struct(ndr
, name
, "lsa_SetInfoPolicy2");
9888 if (flags
& NDR_SET_VALUES
) {
9889 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9891 if (flags
& NDR_IN
) {
9892 ndr_print_struct(ndr
, "in", "lsa_SetInfoPolicy2");
9894 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9896 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9898 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
9899 ndr_print_ptr(ndr
, "info", r
->in
.info
);
9901 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
9902 ndr_print_lsa_PolicyInformation(ndr
, "info", r
->in
.info
);
9906 if (flags
& NDR_OUT
) {
9907 ndr_print_struct(ndr
, "out", "lsa_SetInfoPolicy2");
9909 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9915 static enum ndr_err_code
ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryTrustedDomainInfoByName
*r
)
9917 if (flags
& NDR_IN
) {
9918 if (r
->in
.handle
== NULL
) {
9919 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9921 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9922 if (r
->in
.trusted_domain
== NULL
) {
9923 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9925 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain
));
9926 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
9928 if (flags
& NDR_OUT
) {
9929 if (r
->out
.info
== NULL
) {
9930 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9932 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
9934 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9935 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9937 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9939 return NDR_ERR_SUCCESS
;
9942 static enum ndr_err_code
ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryTrustedDomainInfoByName
*r
)
9945 TALLOC_CTX
*_mem_save_handle_0
;
9946 TALLOC_CTX
*_mem_save_trusted_domain_0
;
9947 TALLOC_CTX
*_mem_save_info_0
;
9948 TALLOC_CTX
*_mem_save_info_1
;
9949 if (flags
& NDR_IN
) {
9950 ZERO_STRUCT(r
->out
);
9952 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9953 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9955 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9956 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9957 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9958 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9959 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9960 NDR_PULL_ALLOC(ndr
, r
->in
.trusted_domain
);
9962 _mem_save_trusted_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9963 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trusted_domain
, LIBNDR_FLAG_REF_ALLOC
);
9964 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain
));
9965 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusted_domain_0
, LIBNDR_FLAG_REF_ALLOC
);
9966 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
9967 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9968 ZERO_STRUCTP(r
->out
.info
);
9970 if (flags
& NDR_OUT
) {
9971 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9972 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9974 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9975 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
9976 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
9978 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
9980 *r
->out
.info
= NULL
;
9983 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9984 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
9985 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9986 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9987 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
9989 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9990 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9992 return NDR_ERR_SUCCESS
;
9995 _PUBLIC_
void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryTrustedDomainInfoByName
*r
)
9997 ndr_print_struct(ndr
, name
, "lsa_QueryTrustedDomainInfoByName");
9999 if (flags
& NDR_SET_VALUES
) {
10000 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10002 if (flags
& NDR_IN
) {
10003 ndr_print_struct(ndr
, "in", "lsa_QueryTrustedDomainInfoByName");
10005 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10007 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10009 ndr_print_ptr(ndr
, "trusted_domain", r
->in
.trusted_domain
);
10011 ndr_print_lsa_String(ndr
, "trusted_domain", r
->in
.trusted_domain
);
10013 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
10016 if (flags
& NDR_OUT
) {
10017 ndr_print_struct(ndr
, "out", "lsa_QueryTrustedDomainInfoByName");
10019 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10021 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
10023 if (*r
->out
.info
) {
10024 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
10025 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", *r
->out
.info
);
10029 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10035 static enum ndr_err_code
ndr_push_lsa_SetTrustedDomainInfoByName(struct ndr_push
*ndr
, int flags
, const struct lsa_SetTrustedDomainInfoByName
*r
)
10037 if (flags
& NDR_IN
) {
10038 if (r
->in
.handle
== NULL
) {
10039 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10041 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10042 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.trusted_domain
));
10043 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
10044 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
10046 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10047 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10050 if (flags
& NDR_OUT
) {
10051 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10053 return NDR_ERR_SUCCESS
;
10056 static enum ndr_err_code
ndr_pull_lsa_SetTrustedDomainInfoByName(struct ndr_pull
*ndr
, int flags
, struct lsa_SetTrustedDomainInfoByName
*r
)
10058 uint32_t _ptr_info
;
10059 TALLOC_CTX
*_mem_save_handle_0
;
10060 TALLOC_CTX
*_mem_save_info_0
;
10061 if (flags
& NDR_IN
) {
10062 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10063 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10065 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10066 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10067 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10068 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10069 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.trusted_domain
));
10070 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
10071 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10073 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
10078 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10079 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
10080 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10081 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10082 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
10085 if (flags
& NDR_OUT
) {
10086 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10088 return NDR_ERR_SUCCESS
;
10091 _PUBLIC_
void ndr_print_lsa_SetTrustedDomainInfoByName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetTrustedDomainInfoByName
*r
)
10093 ndr_print_struct(ndr
, name
, "lsa_SetTrustedDomainInfoByName");
10095 if (flags
& NDR_SET_VALUES
) {
10096 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10098 if (flags
& NDR_IN
) {
10099 ndr_print_struct(ndr
, "in", "lsa_SetTrustedDomainInfoByName");
10101 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10103 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10105 ndr_print_lsa_String(ndr
, "trusted_domain", &r
->in
.trusted_domain
);
10106 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
10107 ndr_print_ptr(ndr
, "info", r
->in
.info
);
10110 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
10111 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", r
->in
.info
);
10116 if (flags
& NDR_OUT
) {
10117 ndr_print_struct(ndr
, "out", "lsa_SetTrustedDomainInfoByName");
10119 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10125 static enum ndr_err_code
ndr_push_lsa_EnumTrustedDomainsEx(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumTrustedDomainsEx
*r
)
10127 if (flags
& NDR_IN
) {
10128 if (r
->in
.handle
== NULL
) {
10129 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10131 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10132 if (r
->in
.resume_handle
== NULL
) {
10133 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10135 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
10136 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_size
));
10138 if (flags
& NDR_OUT
) {
10139 if (r
->out
.resume_handle
== NULL
) {
10140 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10142 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
10143 if (r
->out
.domains
== NULL
) {
10144 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10146 NDR_CHECK(ndr_push_lsa_DomainListEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
10147 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10149 return NDR_ERR_SUCCESS
;
10152 static enum ndr_err_code
ndr_pull_lsa_EnumTrustedDomainsEx(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumTrustedDomainsEx
*r
)
10154 TALLOC_CTX
*_mem_save_handle_0
;
10155 TALLOC_CTX
*_mem_save_resume_handle_0
;
10156 TALLOC_CTX
*_mem_save_domains_0
;
10157 if (flags
& NDR_IN
) {
10158 ZERO_STRUCT(r
->out
);
10160 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10161 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10163 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10164 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10165 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10166 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10167 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10168 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
10170 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10171 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
10172 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
10173 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10174 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_size
));
10175 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
10176 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
10177 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10178 ZERO_STRUCTP(r
->out
.domains
);
10180 if (flags
& NDR_OUT
) {
10181 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10182 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
10184 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10185 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
10186 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
10187 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10188 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10189 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10191 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10192 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
10193 NDR_CHECK(ndr_pull_lsa_DomainListEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
10194 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
10195 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10197 return NDR_ERR_SUCCESS
;
10200 _PUBLIC_
void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumTrustedDomainsEx
*r
)
10202 ndr_print_struct(ndr
, name
, "lsa_EnumTrustedDomainsEx");
10204 if (flags
& NDR_SET_VALUES
) {
10205 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10207 if (flags
& NDR_IN
) {
10208 ndr_print_struct(ndr
, "in", "lsa_EnumTrustedDomainsEx");
10210 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10212 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10214 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
10216 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
10218 ndr_print_uint32(ndr
, "max_size", r
->in
.max_size
);
10221 if (flags
& NDR_OUT
) {
10222 ndr_print_struct(ndr
, "out", "lsa_EnumTrustedDomainsEx");
10224 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
10226 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
10228 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
10230 ndr_print_lsa_DomainListEx(ndr
, "domains", r
->out
.domains
);
10232 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10238 static enum ndr_err_code
ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateTrustedDomainEx
*r
)
10240 if (flags
& NDR_IN
) {
10241 if (r
->in
.policy_handle
== NULL
) {
10242 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10244 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
10245 if (r
->in
.info
== NULL
) {
10246 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10248 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10249 if (r
->in
.auth_info
== NULL
) {
10250 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10252 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
10253 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
10255 if (flags
& NDR_OUT
) {
10256 if (r
->out
.trustdom_handle
== NULL
) {
10257 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10259 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10260 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10262 return NDR_ERR_SUCCESS
;
10265 static enum ndr_err_code
ndr_pull_lsa_CreateTrustedDomainEx(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateTrustedDomainEx
*r
)
10267 TALLOC_CTX
*_mem_save_policy_handle_0
;
10268 TALLOC_CTX
*_mem_save_info_0
;
10269 TALLOC_CTX
*_mem_save_auth_info_0
;
10270 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
10271 if (flags
& NDR_IN
) {
10272 ZERO_STRUCT(r
->out
);
10274 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10275 NDR_PULL_ALLOC(ndr
, r
->in
.policy_handle
);
10277 _mem_save_policy_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10278 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.policy_handle
, LIBNDR_FLAG_REF_ALLOC
);
10279 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
10280 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_policy_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10281 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10282 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
10284 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10285 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
10286 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10287 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10288 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10289 NDR_PULL_ALLOC(ndr
, r
->in
.auth_info
);
10291 _mem_save_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10292 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.auth_info
, LIBNDR_FLAG_REF_ALLOC
);
10293 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
10294 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_auth_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10295 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
10296 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10297 ZERO_STRUCTP(r
->out
.trustdom_handle
);
10299 if (flags
& NDR_OUT
) {
10300 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10301 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10303 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10304 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
10305 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10306 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10307 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10309 return NDR_ERR_SUCCESS
;
10312 _PUBLIC_
void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateTrustedDomainEx
*r
)
10314 ndr_print_struct(ndr
, name
, "lsa_CreateTrustedDomainEx");
10316 if (flags
& NDR_SET_VALUES
) {
10317 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10319 if (flags
& NDR_IN
) {
10320 ndr_print_struct(ndr
, "in", "lsa_CreateTrustedDomainEx");
10322 ndr_print_ptr(ndr
, "policy_handle", r
->in
.policy_handle
);
10324 ndr_print_policy_handle(ndr
, "policy_handle", r
->in
.policy_handle
);
10326 ndr_print_ptr(ndr
, "info", r
->in
.info
);
10328 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info", r
->in
.info
);
10330 ndr_print_ptr(ndr
, "auth_info", r
->in
.auth_info
);
10332 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info", r
->in
.auth_info
);
10334 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
10337 if (flags
& NDR_OUT
) {
10338 ndr_print_struct(ndr
, "out", "lsa_CreateTrustedDomainEx");
10340 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10342 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10344 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10350 static enum ndr_err_code
ndr_push_lsa_CloseTrustedDomainEx(struct ndr_push
*ndr
, int flags
, const struct lsa_CloseTrustedDomainEx
*r
)
10352 if (flags
& NDR_IN
) {
10353 if (r
->in
.handle
== NULL
) {
10354 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10356 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10358 if (flags
& NDR_OUT
) {
10359 if (r
->out
.handle
== NULL
) {
10360 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10362 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
10363 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10365 return NDR_ERR_SUCCESS
;
10368 static enum ndr_err_code
ndr_pull_lsa_CloseTrustedDomainEx(struct ndr_pull
*ndr
, int flags
, struct lsa_CloseTrustedDomainEx
*r
)
10370 TALLOC_CTX
*_mem_save_handle_0
;
10371 if (flags
& NDR_IN
) {
10372 ZERO_STRUCT(r
->out
);
10374 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10375 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10377 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10378 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10379 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10380 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10381 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
10382 *r
->out
.handle
= *r
->in
.handle
;
10384 if (flags
& NDR_OUT
) {
10385 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10386 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
10388 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10389 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10390 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
10391 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10392 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10394 return NDR_ERR_SUCCESS
;
10397 _PUBLIC_
void ndr_print_lsa_CloseTrustedDomainEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CloseTrustedDomainEx
*r
)
10399 ndr_print_struct(ndr
, name
, "lsa_CloseTrustedDomainEx");
10401 if (flags
& NDR_SET_VALUES
) {
10402 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10404 if (flags
& NDR_IN
) {
10405 ndr_print_struct(ndr
, "in", "lsa_CloseTrustedDomainEx");
10407 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10409 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10413 if (flags
& NDR_OUT
) {
10414 ndr_print_struct(ndr
, "out", "lsa_CloseTrustedDomainEx");
10416 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
10418 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
10420 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10426 static enum ndr_err_code
ndr_push_lsa_QueryDomainInformationPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryDomainInformationPolicy
*r
)
10428 if (flags
& NDR_IN
) {
10429 if (r
->in
.handle
== NULL
) {
10430 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10432 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10433 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10435 if (flags
& NDR_OUT
) {
10436 if (r
->out
.info
== NULL
) {
10437 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10439 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
10440 if (*r
->out
.info
) {
10441 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10442 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10444 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10446 return NDR_ERR_SUCCESS
;
10449 static enum ndr_err_code
ndr_pull_lsa_QueryDomainInformationPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryDomainInformationPolicy
*r
)
10451 uint32_t _ptr_info
;
10452 TALLOC_CTX
*_mem_save_handle_0
;
10453 TALLOC_CTX
*_mem_save_info_0
;
10454 TALLOC_CTX
*_mem_save_info_1
;
10455 if (flags
& NDR_IN
) {
10456 ZERO_STRUCT(r
->out
);
10458 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10459 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10461 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10462 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10463 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10464 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10465 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10466 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10467 ZERO_STRUCTP(r
->out
.info
);
10469 if (flags
& NDR_OUT
) {
10470 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10471 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10473 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10474 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10475 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10477 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
10479 *r
->out
.info
= NULL
;
10481 if (*r
->out
.info
) {
10482 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10483 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
10484 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10485 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10486 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
10488 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10489 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10491 return NDR_ERR_SUCCESS
;
10494 _PUBLIC_
void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryDomainInformationPolicy
*r
)
10496 ndr_print_struct(ndr
, name
, "lsa_QueryDomainInformationPolicy");
10498 if (flags
& NDR_SET_VALUES
) {
10499 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10501 if (flags
& NDR_IN
) {
10502 ndr_print_struct(ndr
, "in", "lsa_QueryDomainInformationPolicy");
10504 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10506 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10508 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10511 if (flags
& NDR_OUT
) {
10512 ndr_print_struct(ndr
, "out", "lsa_QueryDomainInformationPolicy");
10514 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10516 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
10518 if (*r
->out
.info
) {
10519 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
10520 ndr_print_lsa_DomainInformationPolicy(ndr
, "info", *r
->out
.info
);
10524 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10530 static enum ndr_err_code
ndr_push_lsa_SetDomainInformationPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_SetDomainInformationPolicy
*r
)
10532 if (flags
& NDR_IN
) {
10533 if (r
->in
.handle
== NULL
) {
10534 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10536 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10537 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10538 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
10540 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10541 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10544 if (flags
& NDR_OUT
) {
10545 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10547 return NDR_ERR_SUCCESS
;
10550 static enum ndr_err_code
ndr_pull_lsa_SetDomainInformationPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_SetDomainInformationPolicy
*r
)
10552 uint32_t _ptr_info
;
10553 TALLOC_CTX
*_mem_save_handle_0
;
10554 TALLOC_CTX
*_mem_save_info_0
;
10555 if (flags
& NDR_IN
) {
10556 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10557 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10559 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10560 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10561 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10562 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10563 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10564 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10566 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
10571 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10572 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
10573 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10574 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10575 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
10578 if (flags
& NDR_OUT
) {
10579 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10581 return NDR_ERR_SUCCESS
;
10584 _PUBLIC_
void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetDomainInformationPolicy
*r
)
10586 ndr_print_struct(ndr
, name
, "lsa_SetDomainInformationPolicy");
10588 if (flags
& NDR_SET_VALUES
) {
10589 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10591 if (flags
& NDR_IN
) {
10592 ndr_print_struct(ndr
, "in", "lsa_SetDomainInformationPolicy");
10594 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10596 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10598 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10599 ndr_print_ptr(ndr
, "info", r
->in
.info
);
10602 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
10603 ndr_print_lsa_DomainInformationPolicy(ndr
, "info", r
->in
.info
);
10608 if (flags
& NDR_OUT
) {
10609 ndr_print_struct(ndr
, "out", "lsa_SetDomainInformationPolicy");
10611 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10617 static enum ndr_err_code
ndr_push_lsa_OpenTrustedDomainByName(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenTrustedDomainByName
*r
)
10619 if (flags
& NDR_IN
) {
10620 if (r
->in
.handle
== NULL
) {
10621 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10623 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10624 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
10625 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
10627 if (flags
& NDR_OUT
) {
10628 if (r
->out
.trustdom_handle
== NULL
) {
10629 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10631 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10632 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10634 return NDR_ERR_SUCCESS
;
10637 static enum ndr_err_code
ndr_pull_lsa_OpenTrustedDomainByName(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenTrustedDomainByName
*r
)
10639 TALLOC_CTX
*_mem_save_handle_0
;
10640 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
10641 if (flags
& NDR_IN
) {
10642 ZERO_STRUCT(r
->out
);
10644 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10645 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10647 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10648 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10649 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10650 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10651 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
10652 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
10653 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10654 ZERO_STRUCTP(r
->out
.trustdom_handle
);
10656 if (flags
& NDR_OUT
) {
10657 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10658 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10660 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10661 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
10662 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10663 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10664 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10666 return NDR_ERR_SUCCESS
;
10669 _PUBLIC_
void ndr_print_lsa_OpenTrustedDomainByName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenTrustedDomainByName
*r
)
10671 ndr_print_struct(ndr
, name
, "lsa_OpenTrustedDomainByName");
10673 if (flags
& NDR_SET_VALUES
) {
10674 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10676 if (flags
& NDR_IN
) {
10677 ndr_print_struct(ndr
, "in", "lsa_OpenTrustedDomainByName");
10679 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10681 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10683 ndr_print_lsa_String(ndr
, "name", &r
->in
.name
);
10684 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
10687 if (flags
& NDR_OUT
) {
10688 ndr_print_struct(ndr
, "out", "lsa_OpenTrustedDomainByName");
10690 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10692 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10694 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10700 static enum ndr_err_code
ndr_push_lsa_TestCall(struct ndr_push
*ndr
, int flags
, const struct lsa_TestCall
*r
)
10702 if (flags
& NDR_IN
) {
10704 if (flags
& NDR_OUT
) {
10705 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10707 return NDR_ERR_SUCCESS
;
10710 static enum ndr_err_code
ndr_pull_lsa_TestCall(struct ndr_pull
*ndr
, int flags
, struct lsa_TestCall
*r
)
10712 if (flags
& NDR_IN
) {
10714 if (flags
& NDR_OUT
) {
10715 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10717 return NDR_ERR_SUCCESS
;
10720 _PUBLIC_
void ndr_print_lsa_TestCall(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_TestCall
*r
)
10722 ndr_print_struct(ndr
, name
, "lsa_TestCall");
10724 if (flags
& NDR_SET_VALUES
) {
10725 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10727 if (flags
& NDR_IN
) {
10728 ndr_print_struct(ndr
, "in", "lsa_TestCall");
10732 if (flags
& NDR_OUT
) {
10733 ndr_print_struct(ndr
, "out", "lsa_TestCall");
10735 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10741 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupSids2(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupSids2
*r
)
10743 if (flags
& NDR_IN
) {
10744 if (r
->in
.handle
== NULL
) {
10745 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10747 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10748 if (r
->in
.sids
== NULL
) {
10749 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10751 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10752 if (r
->in
.names
== NULL
) {
10753 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10755 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
10756 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10757 if (r
->in
.count
== NULL
) {
10758 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10760 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
10761 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown1
));
10762 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown2
));
10764 if (flags
& NDR_OUT
) {
10765 if (r
->out
.domains
== NULL
) {
10766 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10768 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
10769 if (*r
->out
.domains
) {
10770 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
10772 if (r
->out
.names
== NULL
) {
10773 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10775 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
10776 if (r
->out
.count
== NULL
) {
10777 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10779 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
10780 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10782 return NDR_ERR_SUCCESS
;
10785 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupSids2(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupSids2
*r
)
10787 uint32_t _ptr_domains
;
10788 TALLOC_CTX
*_mem_save_handle_0
;
10789 TALLOC_CTX
*_mem_save_sids_0
;
10790 TALLOC_CTX
*_mem_save_domains_0
;
10791 TALLOC_CTX
*_mem_save_domains_1
;
10792 TALLOC_CTX
*_mem_save_names_0
;
10793 TALLOC_CTX
*_mem_save_count_0
;
10794 if (flags
& NDR_IN
) {
10795 ZERO_STRUCT(r
->out
);
10797 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10798 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10800 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10801 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10802 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10803 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10804 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10805 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
10807 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10808 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
10809 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10810 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
10811 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10812 NDR_PULL_ALLOC(ndr
, r
->in
.names
);
10814 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10815 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, LIBNDR_FLAG_REF_ALLOC
);
10816 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
10817 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
10818 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10819 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10820 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
10822 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10823 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
10824 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
10825 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
10826 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown1
));
10827 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown2
));
10828 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10829 ZERO_STRUCTP(r
->out
.domains
);
10830 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
10831 *r
->out
.names
= *r
->in
.names
;
10832 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
10833 *r
->out
.count
= *r
->in
.count
;
10835 if (flags
& NDR_OUT
) {
10836 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10837 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10839 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10840 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
10841 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
10842 if (_ptr_domains
) {
10843 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
10845 *r
->out
.domains
= NULL
;
10847 if (*r
->out
.domains
) {
10848 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10849 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
10850 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
10851 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
10853 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
10854 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10855 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
10857 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10858 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.names
, LIBNDR_FLAG_REF_ALLOC
);
10859 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
10860 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
10861 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10862 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
10864 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10865 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
10866 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
10867 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
10868 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10870 return NDR_ERR_SUCCESS
;
10873 _PUBLIC_
void ndr_print_lsa_LookupSids2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupSids2
*r
)
10875 ndr_print_struct(ndr
, name
, "lsa_LookupSids2");
10877 if (flags
& NDR_SET_VALUES
) {
10878 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10880 if (flags
& NDR_IN
) {
10881 ndr_print_struct(ndr
, "in", "lsa_LookupSids2");
10883 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10885 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10887 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
10889 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
10891 ndr_print_ptr(ndr
, "names", r
->in
.names
);
10893 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->in
.names
);
10895 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10896 ndr_print_ptr(ndr
, "count", r
->in
.count
);
10898 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
10900 ndr_print_uint32(ndr
, "unknown1", r
->in
.unknown1
);
10901 ndr_print_uint32(ndr
, "unknown2", r
->in
.unknown2
);
10904 if (flags
& NDR_OUT
) {
10905 ndr_print_struct(ndr
, "out", "lsa_LookupSids2");
10907 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
10909 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
10911 if (*r
->out
.domains
) {
10912 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
10916 ndr_print_ptr(ndr
, "names", r
->out
.names
);
10918 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->out
.names
);
10920 ndr_print_ptr(ndr
, "count", r
->out
.count
);
10922 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
10924 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10930 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupNames2(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames2
*r
)
10932 uint32_t cntr_names_0
;
10933 if (flags
& NDR_IN
) {
10934 if (r
->in
.handle
== NULL
) {
10935 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10937 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10938 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
10939 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
10940 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
10941 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
10943 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
10944 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
10946 if (r
->in
.sids
== NULL
) {
10947 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10949 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
10950 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
10951 if (r
->in
.count
== NULL
) {
10952 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10954 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
10955 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
10956 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
10958 if (flags
& NDR_OUT
) {
10959 if (r
->out
.domains
== NULL
) {
10960 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10962 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
10963 if (*r
->out
.domains
) {
10964 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
10966 if (r
->out
.sids
== NULL
) {
10967 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10969 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
10970 if (r
->out
.count
== NULL
) {
10971 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10973 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
10974 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10976 return NDR_ERR_SUCCESS
;
10979 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupNames2(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames2
*r
)
10981 uint32_t size_names_0
= 0;
10982 uint32_t cntr_names_0
;
10983 uint32_t _ptr_domains
;
10984 TALLOC_CTX
*_mem_save_handle_0
;
10985 TALLOC_CTX
*_mem_save_names_0
;
10986 TALLOC_CTX
*_mem_save_domains_0
;
10987 TALLOC_CTX
*_mem_save_domains_1
;
10988 TALLOC_CTX
*_mem_save_sids_0
;
10989 TALLOC_CTX
*_mem_save_count_0
;
10990 if (flags
& NDR_IN
) {
10991 ZERO_STRUCT(r
->out
);
10993 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10994 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10996 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10997 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10998 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10999 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11000 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
11001 if (r
->in
.num_names
> 1000) {
11002 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
11004 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
11005 size_names_0
= ndr_get_array_size(ndr
, &r
->in
.names
);
11006 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, size_names_0
);
11007 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11008 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
11009 for (cntr_names_0
= 0; cntr_names_0
< size_names_0
; cntr_names_0
++) {
11010 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
11012 for (cntr_names_0
= 0; cntr_names_0
< size_names_0
; cntr_names_0
++) {
11013 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
11015 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
11016 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11017 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
11019 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11020 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11021 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11022 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11023 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
11024 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11025 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
11027 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11028 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
11029 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
11030 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11031 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
11032 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
11033 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11034 ZERO_STRUCTP(r
->out
.domains
);
11035 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
11036 *r
->out
.sids
= *r
->in
.sids
;
11037 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11038 *r
->out
.count
= *r
->in
.count
;
11040 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
11043 if (flags
& NDR_OUT
) {
11044 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11045 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11047 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11048 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
11049 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
11050 if (_ptr_domains
) {
11051 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
11053 *r
->out
.domains
= NULL
;
11055 if (*r
->out
.domains
) {
11056 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11057 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
11058 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11059 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
11061 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
11062 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11063 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
11065 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11066 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11067 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
11068 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11069 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11070 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11072 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11073 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
11074 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
11075 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11076 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11078 return NDR_ERR_SUCCESS
;
11081 _PUBLIC_
void ndr_print_lsa_LookupNames2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames2
*r
)
11083 uint32_t cntr_names_0
;
11084 ndr_print_struct(ndr
, name
, "lsa_LookupNames2");
11086 if (flags
& NDR_SET_VALUES
) {
11087 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11089 if (flags
& NDR_IN
) {
11090 ndr_print_struct(ndr
, "in", "lsa_LookupNames2");
11092 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
11094 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
11096 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
11097 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
11099 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
11101 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
11102 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
11107 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
11109 ndr_print_lsa_TransSidArray2(ndr
, "sids", r
->in
.sids
);
11111 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
11112 ndr_print_ptr(ndr
, "count", r
->in
.count
);
11114 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
11116 ndr_print_uint32(ndr
, "lookup_options", r
->in
.lookup_options
);
11117 ndr_print_uint32(ndr
, "client_revision", r
->in
.client_revision
);
11120 if (flags
& NDR_OUT
) {
11121 ndr_print_struct(ndr
, "out", "lsa_LookupNames2");
11123 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
11125 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
11127 if (*r
->out
.domains
) {
11128 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
11132 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
11134 ndr_print_lsa_TransSidArray2(ndr
, "sids", r
->out
.sids
);
11136 ndr_print_ptr(ndr
, "count", r
->out
.count
);
11138 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
11140 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11146 static enum ndr_err_code
ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateTrustedDomainEx2
*r
)
11148 if (flags
& NDR_IN
) {
11149 if (r
->in
.policy_handle
== NULL
) {
11150 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11152 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
11153 if (r
->in
.info
== NULL
) {
11154 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11156 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
11157 if (r
->in
.auth_info
== NULL
) {
11158 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11160 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
11161 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
11163 if (flags
& NDR_OUT
) {
11164 if (r
->out
.trustdom_handle
== NULL
) {
11165 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11167 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
11168 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11170 return NDR_ERR_SUCCESS
;
11173 static enum ndr_err_code
ndr_pull_lsa_CreateTrustedDomainEx2(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateTrustedDomainEx2
*r
)
11175 TALLOC_CTX
*_mem_save_policy_handle_0
;
11176 TALLOC_CTX
*_mem_save_info_0
;
11177 TALLOC_CTX
*_mem_save_auth_info_0
;
11178 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
11179 if (flags
& NDR_IN
) {
11180 ZERO_STRUCT(r
->out
);
11182 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11183 NDR_PULL_ALLOC(ndr
, r
->in
.policy_handle
);
11185 _mem_save_policy_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11186 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.policy_handle
, LIBNDR_FLAG_REF_ALLOC
);
11187 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
11188 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_policy_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11189 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11190 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
11192 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11193 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
11194 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
11195 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11196 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11197 NDR_PULL_ALLOC(ndr
, r
->in
.auth_info
);
11199 _mem_save_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11200 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.auth_info
, LIBNDR_FLAG_REF_ALLOC
);
11201 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
11202 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_auth_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11203 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
11204 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
11205 ZERO_STRUCTP(r
->out
.trustdom_handle
);
11207 if (flags
& NDR_OUT
) {
11208 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11209 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
11211 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11212 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
11213 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
11214 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11215 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11217 return NDR_ERR_SUCCESS
;
11220 _PUBLIC_
void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateTrustedDomainEx2
*r
)
11222 ndr_print_struct(ndr
, name
, "lsa_CreateTrustedDomainEx2");
11224 if (flags
& NDR_SET_VALUES
) {
11225 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11227 if (flags
& NDR_IN
) {
11228 ndr_print_struct(ndr
, "in", "lsa_CreateTrustedDomainEx2");
11230 ndr_print_ptr(ndr
, "policy_handle", r
->in
.policy_handle
);
11232 ndr_print_policy_handle(ndr
, "policy_handle", r
->in
.policy_handle
);
11234 ndr_print_ptr(ndr
, "info", r
->in
.info
);
11236 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info", r
->in
.info
);
11238 ndr_print_ptr(ndr
, "auth_info", r
->in
.auth_info
);
11240 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info", r
->in
.auth_info
);
11242 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
11245 if (flags
& NDR_OUT
) {
11246 ndr_print_struct(ndr
, "out", "lsa_CreateTrustedDomainEx2");
11248 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
11250 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
11252 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11258 static enum ndr_err_code
ndr_push_lsa_CREDRWRITE(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRWRITE
*r
)
11260 if (flags
& NDR_IN
) {
11262 if (flags
& NDR_OUT
) {
11263 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11265 return NDR_ERR_SUCCESS
;
11268 static enum ndr_err_code
ndr_pull_lsa_CREDRWRITE(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRWRITE
*r
)
11270 if (flags
& NDR_IN
) {
11272 if (flags
& NDR_OUT
) {
11273 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11275 return NDR_ERR_SUCCESS
;
11278 _PUBLIC_
void ndr_print_lsa_CREDRWRITE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRWRITE
*r
)
11280 ndr_print_struct(ndr
, name
, "lsa_CREDRWRITE");
11282 if (flags
& NDR_SET_VALUES
) {
11283 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11285 if (flags
& NDR_IN
) {
11286 ndr_print_struct(ndr
, "in", "lsa_CREDRWRITE");
11290 if (flags
& NDR_OUT
) {
11291 ndr_print_struct(ndr
, "out", "lsa_CREDRWRITE");
11293 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11299 static enum ndr_err_code
ndr_push_lsa_CREDRREAD(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRREAD
*r
)
11301 if (flags
& NDR_IN
) {
11303 if (flags
& NDR_OUT
) {
11304 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11306 return NDR_ERR_SUCCESS
;
11309 static enum ndr_err_code
ndr_pull_lsa_CREDRREAD(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRREAD
*r
)
11311 if (flags
& NDR_IN
) {
11313 if (flags
& NDR_OUT
) {
11314 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11316 return NDR_ERR_SUCCESS
;
11319 _PUBLIC_
void ndr_print_lsa_CREDRREAD(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRREAD
*r
)
11321 ndr_print_struct(ndr
, name
, "lsa_CREDRREAD");
11323 if (flags
& NDR_SET_VALUES
) {
11324 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11326 if (flags
& NDR_IN
) {
11327 ndr_print_struct(ndr
, "in", "lsa_CREDRREAD");
11331 if (flags
& NDR_OUT
) {
11332 ndr_print_struct(ndr
, "out", "lsa_CREDRREAD");
11334 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11340 static enum ndr_err_code
ndr_push_lsa_CREDRENUMERATE(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRENUMERATE
*r
)
11342 if (flags
& NDR_IN
) {
11344 if (flags
& NDR_OUT
) {
11345 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11347 return NDR_ERR_SUCCESS
;
11350 static enum ndr_err_code
ndr_pull_lsa_CREDRENUMERATE(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRENUMERATE
*r
)
11352 if (flags
& NDR_IN
) {
11354 if (flags
& NDR_OUT
) {
11355 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11357 return NDR_ERR_SUCCESS
;
11360 _PUBLIC_
void ndr_print_lsa_CREDRENUMERATE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRENUMERATE
*r
)
11362 ndr_print_struct(ndr
, name
, "lsa_CREDRENUMERATE");
11364 if (flags
& NDR_SET_VALUES
) {
11365 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11367 if (flags
& NDR_IN
) {
11368 ndr_print_struct(ndr
, "in", "lsa_CREDRENUMERATE");
11372 if (flags
& NDR_OUT
) {
11373 ndr_print_struct(ndr
, "out", "lsa_CREDRENUMERATE");
11375 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11381 static enum ndr_err_code
ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRWRITEDOMAINCREDENTIALS
*r
)
11383 if (flags
& NDR_IN
) {
11385 if (flags
& NDR_OUT
) {
11386 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11388 return NDR_ERR_SUCCESS
;
11391 static enum ndr_err_code
ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRWRITEDOMAINCREDENTIALS
*r
)
11393 if (flags
& NDR_IN
) {
11395 if (flags
& NDR_OUT
) {
11396 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11398 return NDR_ERR_SUCCESS
;
11401 _PUBLIC_
void ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRWRITEDOMAINCREDENTIALS
*r
)
11403 ndr_print_struct(ndr
, name
, "lsa_CREDRWRITEDOMAINCREDENTIALS");
11405 if (flags
& NDR_SET_VALUES
) {
11406 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11408 if (flags
& NDR_IN
) {
11409 ndr_print_struct(ndr
, "in", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11413 if (flags
& NDR_OUT
) {
11414 ndr_print_struct(ndr
, "out", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11416 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11422 static enum ndr_err_code
ndr_push_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRREADDOMAINCREDENTIALS
*r
)
11424 if (flags
& NDR_IN
) {
11426 if (flags
& NDR_OUT
) {
11427 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11429 return NDR_ERR_SUCCESS
;
11432 static enum ndr_err_code
ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRREADDOMAINCREDENTIALS
*r
)
11434 if (flags
& NDR_IN
) {
11436 if (flags
& NDR_OUT
) {
11437 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11439 return NDR_ERR_SUCCESS
;
11442 _PUBLIC_
void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRREADDOMAINCREDENTIALS
*r
)
11444 ndr_print_struct(ndr
, name
, "lsa_CREDRREADDOMAINCREDENTIALS");
11446 if (flags
& NDR_SET_VALUES
) {
11447 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11449 if (flags
& NDR_IN
) {
11450 ndr_print_struct(ndr
, "in", "lsa_CREDRREADDOMAINCREDENTIALS");
11454 if (flags
& NDR_OUT
) {
11455 ndr_print_struct(ndr
, "out", "lsa_CREDRREADDOMAINCREDENTIALS");
11457 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11463 static enum ndr_err_code
ndr_push_lsa_CREDRDELETE(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRDELETE
*r
)
11465 if (flags
& NDR_IN
) {
11467 if (flags
& NDR_OUT
) {
11468 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11470 return NDR_ERR_SUCCESS
;
11473 static enum ndr_err_code
ndr_pull_lsa_CREDRDELETE(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRDELETE
*r
)
11475 if (flags
& NDR_IN
) {
11477 if (flags
& NDR_OUT
) {
11478 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11480 return NDR_ERR_SUCCESS
;
11483 _PUBLIC_
void ndr_print_lsa_CREDRDELETE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRDELETE
*r
)
11485 ndr_print_struct(ndr
, name
, "lsa_CREDRDELETE");
11487 if (flags
& NDR_SET_VALUES
) {
11488 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11490 if (flags
& NDR_IN
) {
11491 ndr_print_struct(ndr
, "in", "lsa_CREDRDELETE");
11495 if (flags
& NDR_OUT
) {
11496 ndr_print_struct(ndr
, "out", "lsa_CREDRDELETE");
11498 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11504 static enum ndr_err_code
ndr_push_lsa_CREDRGETTARGETINFO(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRGETTARGETINFO
*r
)
11506 if (flags
& NDR_IN
) {
11508 if (flags
& NDR_OUT
) {
11509 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11511 return NDR_ERR_SUCCESS
;
11514 static enum ndr_err_code
ndr_pull_lsa_CREDRGETTARGETINFO(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRGETTARGETINFO
*r
)
11516 if (flags
& NDR_IN
) {
11518 if (flags
& NDR_OUT
) {
11519 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11521 return NDR_ERR_SUCCESS
;
11524 _PUBLIC_
void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRGETTARGETINFO
*r
)
11526 ndr_print_struct(ndr
, name
, "lsa_CREDRGETTARGETINFO");
11528 if (flags
& NDR_SET_VALUES
) {
11529 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11531 if (flags
& NDR_IN
) {
11532 ndr_print_struct(ndr
, "in", "lsa_CREDRGETTARGETINFO");
11536 if (flags
& NDR_OUT
) {
11537 ndr_print_struct(ndr
, "out", "lsa_CREDRGETTARGETINFO");
11539 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11545 static enum ndr_err_code
ndr_push_lsa_CREDRPROFILELOADED(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRPROFILELOADED
*r
)
11547 if (flags
& NDR_IN
) {
11549 if (flags
& NDR_OUT
) {
11550 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11552 return NDR_ERR_SUCCESS
;
11555 static enum ndr_err_code
ndr_pull_lsa_CREDRPROFILELOADED(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRPROFILELOADED
*r
)
11557 if (flags
& NDR_IN
) {
11559 if (flags
& NDR_OUT
) {
11560 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11562 return NDR_ERR_SUCCESS
;
11565 _PUBLIC_
void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRPROFILELOADED
*r
)
11567 ndr_print_struct(ndr
, name
, "lsa_CREDRPROFILELOADED");
11569 if (flags
& NDR_SET_VALUES
) {
11570 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11572 if (flags
& NDR_IN
) {
11573 ndr_print_struct(ndr
, "in", "lsa_CREDRPROFILELOADED");
11577 if (flags
& NDR_OUT
) {
11578 ndr_print_struct(ndr
, "out", "lsa_CREDRPROFILELOADED");
11580 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11586 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupNames3(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames3
*r
)
11588 uint32_t cntr_names_0
;
11589 if (flags
& NDR_IN
) {
11590 if (r
->in
.handle
== NULL
) {
11591 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11593 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11594 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
11595 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
11596 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11597 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
11599 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11600 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
11602 if (r
->in
.sids
== NULL
) {
11603 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11605 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11606 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
11607 if (r
->in
.count
== NULL
) {
11608 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11610 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
11611 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
11612 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
11614 if (flags
& NDR_OUT
) {
11615 if (r
->out
.domains
== NULL
) {
11616 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11618 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
11619 if (*r
->out
.domains
) {
11620 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11622 if (r
->out
.sids
== NULL
) {
11623 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11625 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
11626 if (r
->out
.count
== NULL
) {
11627 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11629 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
11630 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11632 return NDR_ERR_SUCCESS
;
11635 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupNames3(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames3
*r
)
11637 uint32_t size_names_0
= 0;
11638 uint32_t cntr_names_0
;
11639 uint32_t _ptr_domains
;
11640 TALLOC_CTX
*_mem_save_handle_0
;
11641 TALLOC_CTX
*_mem_save_names_0
;
11642 TALLOC_CTX
*_mem_save_domains_0
;
11643 TALLOC_CTX
*_mem_save_domains_1
;
11644 TALLOC_CTX
*_mem_save_sids_0
;
11645 TALLOC_CTX
*_mem_save_count_0
;
11646 if (flags
& NDR_IN
) {
11647 ZERO_STRUCT(r
->out
);
11649 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11650 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
11652 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11653 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
11654 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11655 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11656 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
11657 if (r
->in
.num_names
> 1000) {
11658 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
11660 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
11661 size_names_0
= ndr_get_array_size(ndr
, &r
->in
.names
);
11662 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, size_names_0
);
11663 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11664 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
11665 for (cntr_names_0
= 0; cntr_names_0
< size_names_0
; cntr_names_0
++) {
11666 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
11668 for (cntr_names_0
= 0; cntr_names_0
< size_names_0
; cntr_names_0
++) {
11669 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
11671 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
11672 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11673 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
11675 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11676 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11677 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11678 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11679 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
11680 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11681 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
11683 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11684 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
11685 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
11686 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11687 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
11688 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
11689 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11690 ZERO_STRUCTP(r
->out
.domains
);
11691 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
11692 *r
->out
.sids
= *r
->in
.sids
;
11693 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11694 *r
->out
.count
= *r
->in
.count
;
11696 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
11699 if (flags
& NDR_OUT
) {
11700 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11701 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11703 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11704 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
11705 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
11706 if (_ptr_domains
) {
11707 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
11709 *r
->out
.domains
= NULL
;
11711 if (*r
->out
.domains
) {
11712 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11713 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
11714 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11715 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
11717 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
11718 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11719 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
11721 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11722 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11723 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
11724 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11725 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11726 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11728 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11729 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
11730 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
11731 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11732 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11734 return NDR_ERR_SUCCESS
;
11737 _PUBLIC_
void ndr_print_lsa_LookupNames3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames3
*r
)
11739 uint32_t cntr_names_0
;
11740 ndr_print_struct(ndr
, name
, "lsa_LookupNames3");
11742 if (flags
& NDR_SET_VALUES
) {
11743 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11745 if (flags
& NDR_IN
) {
11746 ndr_print_struct(ndr
, "in", "lsa_LookupNames3");
11748 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
11750 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
11752 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
11753 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
11755 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
11757 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
11758 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
11763 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
11765 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->in
.sids
);
11767 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
11768 ndr_print_ptr(ndr
, "count", r
->in
.count
);
11770 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
11772 ndr_print_uint32(ndr
, "lookup_options", r
->in
.lookup_options
);
11773 ndr_print_uint32(ndr
, "client_revision", r
->in
.client_revision
);
11776 if (flags
& NDR_OUT
) {
11777 ndr_print_struct(ndr
, "out", "lsa_LookupNames3");
11779 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
11781 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
11783 if (*r
->out
.domains
) {
11784 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
11788 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
11790 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->out
.sids
);
11792 ndr_print_ptr(ndr
, "count", r
->out
.count
);
11794 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
11796 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11802 static enum ndr_err_code
ndr_push_lsa_CREDRGETSESSIONTYPES(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRGETSESSIONTYPES
*r
)
11804 if (flags
& NDR_IN
) {
11806 if (flags
& NDR_OUT
) {
11807 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11809 return NDR_ERR_SUCCESS
;
11812 static enum ndr_err_code
ndr_pull_lsa_CREDRGETSESSIONTYPES(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRGETSESSIONTYPES
*r
)
11814 if (flags
& NDR_IN
) {
11816 if (flags
& NDR_OUT
) {
11817 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11819 return NDR_ERR_SUCCESS
;
11822 _PUBLIC_
void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRGETSESSIONTYPES
*r
)
11824 ndr_print_struct(ndr
, name
, "lsa_CREDRGETSESSIONTYPES");
11826 if (flags
& NDR_SET_VALUES
) {
11827 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11829 if (flags
& NDR_IN
) {
11830 ndr_print_struct(ndr
, "in", "lsa_CREDRGETSESSIONTYPES");
11834 if (flags
& NDR_OUT
) {
11835 ndr_print_struct(ndr
, "out", "lsa_CREDRGETSESSIONTYPES");
11837 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11843 static enum ndr_err_code
ndr_push_lsa_LSARREGISTERAUDITEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARREGISTERAUDITEVENT
*r
)
11845 if (flags
& NDR_IN
) {
11847 if (flags
& NDR_OUT
) {
11848 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11850 return NDR_ERR_SUCCESS
;
11853 static enum ndr_err_code
ndr_pull_lsa_LSARREGISTERAUDITEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARREGISTERAUDITEVENT
*r
)
11855 if (flags
& NDR_IN
) {
11857 if (flags
& NDR_OUT
) {
11858 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11860 return NDR_ERR_SUCCESS
;
11863 _PUBLIC_
void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARREGISTERAUDITEVENT
*r
)
11865 ndr_print_struct(ndr
, name
, "lsa_LSARREGISTERAUDITEVENT");
11867 if (flags
& NDR_SET_VALUES
) {
11868 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11870 if (flags
& NDR_IN
) {
11871 ndr_print_struct(ndr
, "in", "lsa_LSARREGISTERAUDITEVENT");
11875 if (flags
& NDR_OUT
) {
11876 ndr_print_struct(ndr
, "out", "lsa_LSARREGISTERAUDITEVENT");
11878 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11884 static enum ndr_err_code
ndr_push_lsa_LSARGENAUDITEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARGENAUDITEVENT
*r
)
11886 if (flags
& NDR_IN
) {
11888 if (flags
& NDR_OUT
) {
11889 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11891 return NDR_ERR_SUCCESS
;
11894 static enum ndr_err_code
ndr_pull_lsa_LSARGENAUDITEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARGENAUDITEVENT
*r
)
11896 if (flags
& NDR_IN
) {
11898 if (flags
& NDR_OUT
) {
11899 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11901 return NDR_ERR_SUCCESS
;
11904 _PUBLIC_
void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARGENAUDITEVENT
*r
)
11906 ndr_print_struct(ndr
, name
, "lsa_LSARGENAUDITEVENT");
11908 if (flags
& NDR_SET_VALUES
) {
11909 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11911 if (flags
& NDR_IN
) {
11912 ndr_print_struct(ndr
, "in", "lsa_LSARGENAUDITEVENT");
11916 if (flags
& NDR_OUT
) {
11917 ndr_print_struct(ndr
, "out", "lsa_LSARGENAUDITEVENT");
11919 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11925 static enum ndr_err_code
ndr_push_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARUNREGISTERAUDITEVENT
*r
)
11927 if (flags
& NDR_IN
) {
11929 if (flags
& NDR_OUT
) {
11930 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11932 return NDR_ERR_SUCCESS
;
11935 static enum ndr_err_code
ndr_pull_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARUNREGISTERAUDITEVENT
*r
)
11937 if (flags
& NDR_IN
) {
11939 if (flags
& NDR_OUT
) {
11940 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11942 return NDR_ERR_SUCCESS
;
11945 _PUBLIC_
void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARUNREGISTERAUDITEVENT
*r
)
11947 ndr_print_struct(ndr
, name
, "lsa_LSARUNREGISTERAUDITEVENT");
11949 if (flags
& NDR_SET_VALUES
) {
11950 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11952 if (flags
& NDR_IN
) {
11953 ndr_print_struct(ndr
, "in", "lsa_LSARUNREGISTERAUDITEVENT");
11957 if (flags
& NDR_OUT
) {
11958 ndr_print_struct(ndr
, "out", "lsa_LSARUNREGISTERAUDITEVENT");
11960 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11966 static enum ndr_err_code
ndr_push_lsa_lsaRQueryForestTrustInformation(struct ndr_push
*ndr
, int flags
, const struct lsa_lsaRQueryForestTrustInformation
*r
)
11968 if (flags
& NDR_IN
) {
11969 if (r
->in
.handle
== NULL
) {
11970 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11972 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11973 if (r
->in
.trusted_domain_name
== NULL
) {
11974 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11976 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain_name
));
11977 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.unknown
));
11979 if (flags
& NDR_OUT
) {
11980 if (r
->out
.forest_trust_info
== NULL
) {
11981 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11983 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.forest_trust_info
));
11984 if (*r
->out
.forest_trust_info
) {
11985 NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.forest_trust_info
));
11987 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11989 return NDR_ERR_SUCCESS
;
11992 static enum ndr_err_code
ndr_pull_lsa_lsaRQueryForestTrustInformation(struct ndr_pull
*ndr
, int flags
, struct lsa_lsaRQueryForestTrustInformation
*r
)
11994 uint32_t _ptr_forest_trust_info
;
11995 TALLOC_CTX
*_mem_save_handle_0
;
11996 TALLOC_CTX
*_mem_save_trusted_domain_name_0
;
11997 TALLOC_CTX
*_mem_save_forest_trust_info_0
;
11998 TALLOC_CTX
*_mem_save_forest_trust_info_1
;
11999 if (flags
& NDR_IN
) {
12000 ZERO_STRUCT(r
->out
);
12002 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12003 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
12005 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12006 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
12007 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
12008 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
12009 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12010 NDR_PULL_ALLOC(ndr
, r
->in
.trusted_domain_name
);
12012 _mem_save_trusted_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12013 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trusted_domain_name
, LIBNDR_FLAG_REF_ALLOC
);
12014 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain_name
));
12015 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusted_domain_name_0
, LIBNDR_FLAG_REF_ALLOC
);
12016 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.unknown
));
12017 NDR_PULL_ALLOC(ndr
, r
->out
.forest_trust_info
);
12018 ZERO_STRUCTP(r
->out
.forest_trust_info
);
12020 if (flags
& NDR_OUT
) {
12021 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12022 NDR_PULL_ALLOC(ndr
, r
->out
.forest_trust_info
);
12024 _mem_save_forest_trust_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12025 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.forest_trust_info
, LIBNDR_FLAG_REF_ALLOC
);
12026 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_forest_trust_info
));
12027 if (_ptr_forest_trust_info
) {
12028 NDR_PULL_ALLOC(ndr
, *r
->out
.forest_trust_info
);
12030 *r
->out
.forest_trust_info
= NULL
;
12032 if (*r
->out
.forest_trust_info
) {
12033 _mem_save_forest_trust_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12034 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.forest_trust_info
, 0);
12035 NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.forest_trust_info
));
12036 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_info_1
, 0);
12038 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_info_0
, LIBNDR_FLAG_REF_ALLOC
);
12039 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12041 return NDR_ERR_SUCCESS
;
12044 _PUBLIC_
void ndr_print_lsa_lsaRQueryForestTrustInformation(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_lsaRQueryForestTrustInformation
*r
)
12046 ndr_print_struct(ndr
, name
, "lsa_lsaRQueryForestTrustInformation");
12048 if (flags
& NDR_SET_VALUES
) {
12049 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12051 if (flags
& NDR_IN
) {
12052 ndr_print_struct(ndr
, "in", "lsa_lsaRQueryForestTrustInformation");
12054 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
12056 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
12058 ndr_print_ptr(ndr
, "trusted_domain_name", r
->in
.trusted_domain_name
);
12060 ndr_print_lsa_String(ndr
, "trusted_domain_name", r
->in
.trusted_domain_name
);
12062 ndr_print_uint16(ndr
, "unknown", r
->in
.unknown
);
12065 if (flags
& NDR_OUT
) {
12066 ndr_print_struct(ndr
, "out", "lsa_lsaRQueryForestTrustInformation");
12068 ndr_print_ptr(ndr
, "forest_trust_info", r
->out
.forest_trust_info
);
12070 ndr_print_ptr(ndr
, "forest_trust_info", *r
->out
.forest_trust_info
);
12072 if (*r
->out
.forest_trust_info
) {
12073 ndr_print_lsa_ForestTrustInformation(ndr
, "forest_trust_info", *r
->out
.forest_trust_info
);
12077 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12083 static enum ndr_err_code
ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARSETFORESTTRUSTINFORMATION
*r
)
12085 if (flags
& NDR_IN
) {
12087 if (flags
& NDR_OUT
) {
12088 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12090 return NDR_ERR_SUCCESS
;
12093 static enum ndr_err_code
ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARSETFORESTTRUSTINFORMATION
*r
)
12095 if (flags
& NDR_IN
) {
12097 if (flags
& NDR_OUT
) {
12098 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12100 return NDR_ERR_SUCCESS
;
12103 _PUBLIC_
void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARSETFORESTTRUSTINFORMATION
*r
)
12105 ndr_print_struct(ndr
, name
, "lsa_LSARSETFORESTTRUSTINFORMATION");
12107 if (flags
& NDR_SET_VALUES
) {
12108 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12110 if (flags
& NDR_IN
) {
12111 ndr_print_struct(ndr
, "in", "lsa_LSARSETFORESTTRUSTINFORMATION");
12115 if (flags
& NDR_OUT
) {
12116 ndr_print_struct(ndr
, "out", "lsa_LSARSETFORESTTRUSTINFORMATION");
12118 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12124 static enum ndr_err_code
ndr_push_lsa_CREDRRENAME(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRRENAME
*r
)
12126 if (flags
& NDR_IN
) {
12128 if (flags
& NDR_OUT
) {
12129 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12131 return NDR_ERR_SUCCESS
;
12134 static enum ndr_err_code
ndr_pull_lsa_CREDRRENAME(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRRENAME
*r
)
12136 if (flags
& NDR_IN
) {
12138 if (flags
& NDR_OUT
) {
12139 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12141 return NDR_ERR_SUCCESS
;
12144 _PUBLIC_
void ndr_print_lsa_CREDRRENAME(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRRENAME
*r
)
12146 ndr_print_struct(ndr
, name
, "lsa_CREDRRENAME");
12148 if (flags
& NDR_SET_VALUES
) {
12149 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12151 if (flags
& NDR_IN
) {
12152 ndr_print_struct(ndr
, "in", "lsa_CREDRRENAME");
12156 if (flags
& NDR_OUT
) {
12157 ndr_print_struct(ndr
, "out", "lsa_CREDRRENAME");
12159 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12165 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupSids3(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupSids3
*r
)
12167 if (flags
& NDR_IN
) {
12168 if (r
->in
.sids
== NULL
) {
12169 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12171 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12172 if (r
->in
.names
== NULL
) {
12173 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12175 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
12176 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
12177 if (r
->in
.count
== NULL
) {
12178 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12180 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
12181 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown1
));
12182 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown2
));
12184 if (flags
& NDR_OUT
) {
12185 if (r
->out
.domains
== NULL
) {
12186 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12188 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
12189 if (*r
->out
.domains
) {
12190 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12192 if (r
->out
.names
== NULL
) {
12193 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12195 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
12196 if (r
->out
.count
== NULL
) {
12197 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12199 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
12200 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12202 return NDR_ERR_SUCCESS
;
12205 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupSids3(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupSids3
*r
)
12207 uint32_t _ptr_domains
;
12208 TALLOC_CTX
*_mem_save_sids_0
;
12209 TALLOC_CTX
*_mem_save_domains_0
;
12210 TALLOC_CTX
*_mem_save_domains_1
;
12211 TALLOC_CTX
*_mem_save_names_0
;
12212 TALLOC_CTX
*_mem_save_count_0
;
12213 if (flags
& NDR_IN
) {
12214 ZERO_STRUCT(r
->out
);
12216 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12217 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
12219 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12220 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
12221 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12222 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
12223 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12224 NDR_PULL_ALLOC(ndr
, r
->in
.names
);
12226 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12227 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, LIBNDR_FLAG_REF_ALLOC
);
12228 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
12229 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
12230 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
12231 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12232 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
12234 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12235 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
12236 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
12237 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12238 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown1
));
12239 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown2
));
12240 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12241 ZERO_STRUCTP(r
->out
.domains
);
12242 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
12243 *r
->out
.names
= *r
->in
.names
;
12244 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12245 *r
->out
.count
= *r
->in
.count
;
12247 if (flags
& NDR_OUT
) {
12248 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12249 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12251 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12252 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
12253 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
12254 if (_ptr_domains
) {
12255 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
12257 *r
->out
.domains
= NULL
;
12259 if (*r
->out
.domains
) {
12260 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12261 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
12262 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12263 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
12265 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
12266 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12267 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
12269 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12270 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.names
, LIBNDR_FLAG_REF_ALLOC
);
12271 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
12272 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
12273 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12274 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12276 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12277 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
12278 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
12279 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12280 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12282 return NDR_ERR_SUCCESS
;
12285 _PUBLIC_
void ndr_print_lsa_LookupSids3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupSids3
*r
)
12287 ndr_print_struct(ndr
, name
, "lsa_LookupSids3");
12289 if (flags
& NDR_SET_VALUES
) {
12290 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12292 if (flags
& NDR_IN
) {
12293 ndr_print_struct(ndr
, "in", "lsa_LookupSids3");
12295 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
12297 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
12299 ndr_print_ptr(ndr
, "names", r
->in
.names
);
12301 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->in
.names
);
12303 ndr_print_uint16(ndr
, "level", r
->in
.level
);
12304 ndr_print_ptr(ndr
, "count", r
->in
.count
);
12306 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
12308 ndr_print_uint32(ndr
, "unknown1", r
->in
.unknown1
);
12309 ndr_print_uint32(ndr
, "unknown2", r
->in
.unknown2
);
12312 if (flags
& NDR_OUT
) {
12313 ndr_print_struct(ndr
, "out", "lsa_LookupSids3");
12315 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
12317 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
12319 if (*r
->out
.domains
) {
12320 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
12324 ndr_print_ptr(ndr
, "names", r
->out
.names
);
12326 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->out
.names
);
12328 ndr_print_ptr(ndr
, "count", r
->out
.count
);
12330 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
12332 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12338 static enum ndr_err_code
ndr_push_lsa_LookupNames4(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames4
*r
)
12340 uint32_t cntr_names_0
;
12341 if (flags
& NDR_IN
) {
12342 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
12343 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
12344 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
12345 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
12347 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
12348 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
12350 if (r
->in
.sids
== NULL
) {
12351 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12353 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12354 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
12355 if (r
->in
.count
== NULL
) {
12356 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12358 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
12359 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
12360 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
12362 if (flags
& NDR_OUT
) {
12363 if (r
->out
.domains
== NULL
) {
12364 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12366 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
12367 if (*r
->out
.domains
) {
12368 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12370 if (r
->out
.sids
== NULL
) {
12371 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12373 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
12374 if (r
->out
.count
== NULL
) {
12375 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12377 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
12378 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12380 return NDR_ERR_SUCCESS
;
12383 static enum ndr_err_code
ndr_pull_lsa_LookupNames4(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames4
*r
)
12385 uint32_t size_names_0
= 0;
12386 uint32_t cntr_names_0
;
12387 uint32_t _ptr_domains
;
12388 TALLOC_CTX
*_mem_save_names_0
;
12389 TALLOC_CTX
*_mem_save_domains_0
;
12390 TALLOC_CTX
*_mem_save_domains_1
;
12391 TALLOC_CTX
*_mem_save_sids_0
;
12392 TALLOC_CTX
*_mem_save_count_0
;
12393 if (flags
& NDR_IN
) {
12394 ZERO_STRUCT(r
->out
);
12396 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
12397 if (r
->in
.num_names
> 1000) {
12398 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
12400 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
12401 size_names_0
= ndr_get_array_size(ndr
, &r
->in
.names
);
12402 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, size_names_0
);
12403 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12404 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
12405 for (cntr_names_0
= 0; cntr_names_0
< size_names_0
; cntr_names_0
++) {
12406 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
12408 for (cntr_names_0
= 0; cntr_names_0
< size_names_0
; cntr_names_0
++) {
12409 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
12411 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
12412 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12413 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
12415 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12416 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
12417 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12418 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
12419 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
12420 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12421 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
12423 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12424 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
12425 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
12426 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12427 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
12428 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
12429 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12430 ZERO_STRUCTP(r
->out
.domains
);
12431 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
12432 *r
->out
.sids
= *r
->in
.sids
;
12433 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12434 *r
->out
.count
= *r
->in
.count
;
12436 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
12439 if (flags
& NDR_OUT
) {
12440 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12441 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12443 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12444 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
12445 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
12446 if (_ptr_domains
) {
12447 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
12449 *r
->out
.domains
= NULL
;
12451 if (*r
->out
.domains
) {
12452 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12453 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
12454 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12455 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
12457 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
12458 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12459 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
12461 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12462 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
12463 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
12464 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
12465 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12466 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12468 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12469 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
12470 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
12471 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12472 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12474 return NDR_ERR_SUCCESS
;
12477 _PUBLIC_
void ndr_print_lsa_LookupNames4(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames4
*r
)
12479 uint32_t cntr_names_0
;
12480 ndr_print_struct(ndr
, name
, "lsa_LookupNames4");
12482 if (flags
& NDR_SET_VALUES
) {
12483 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12485 if (flags
& NDR_IN
) {
12486 ndr_print_struct(ndr
, "in", "lsa_LookupNames4");
12488 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
12489 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
12491 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
12493 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
12494 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
12499 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
12501 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->in
.sids
);
12503 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
12504 ndr_print_ptr(ndr
, "count", r
->in
.count
);
12506 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
12508 ndr_print_uint32(ndr
, "lookup_options", r
->in
.lookup_options
);
12509 ndr_print_uint32(ndr
, "client_revision", r
->in
.client_revision
);
12512 if (flags
& NDR_OUT
) {
12513 ndr_print_struct(ndr
, "out", "lsa_LookupNames4");
12515 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
12517 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
12519 if (*r
->out
.domains
) {
12520 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
12524 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
12526 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->out
.sids
);
12528 ndr_print_ptr(ndr
, "count", r
->out
.count
);
12530 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
12532 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12538 static enum ndr_err_code
ndr_push_lsa_LSAROPENPOLICYSCE(struct ndr_push
*ndr
, int flags
, const struct lsa_LSAROPENPOLICYSCE
*r
)
12540 if (flags
& NDR_IN
) {
12542 if (flags
& NDR_OUT
) {
12543 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12545 return NDR_ERR_SUCCESS
;
12548 static enum ndr_err_code
ndr_pull_lsa_LSAROPENPOLICYSCE(struct ndr_pull
*ndr
, int flags
, struct lsa_LSAROPENPOLICYSCE
*r
)
12550 if (flags
& NDR_IN
) {
12552 if (flags
& NDR_OUT
) {
12553 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12555 return NDR_ERR_SUCCESS
;
12558 _PUBLIC_
void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSAROPENPOLICYSCE
*r
)
12560 ndr_print_struct(ndr
, name
, "lsa_LSAROPENPOLICYSCE");
12562 if (flags
& NDR_SET_VALUES
) {
12563 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12565 if (flags
& NDR_IN
) {
12566 ndr_print_struct(ndr
, "in", "lsa_LSAROPENPOLICYSCE");
12570 if (flags
& NDR_OUT
) {
12571 ndr_print_struct(ndr
, "out", "lsa_LSAROPENPOLICYSCE");
12573 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12579 static enum ndr_err_code
ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
*r
)
12581 if (flags
& NDR_IN
) {
12583 if (flags
& NDR_OUT
) {
12584 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12586 return NDR_ERR_SUCCESS
;
12589 static enum ndr_err_code
ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
*r
)
12591 if (flags
& NDR_IN
) {
12593 if (flags
& NDR_OUT
) {
12594 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12596 return NDR_ERR_SUCCESS
;
12599 _PUBLIC_
void ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
*r
)
12601 ndr_print_struct(ndr
, name
, "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12603 if (flags
& NDR_SET_VALUES
) {
12604 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12606 if (flags
& NDR_IN
) {
12607 ndr_print_struct(ndr
, "in", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12611 if (flags
& NDR_OUT
) {
12612 ndr_print_struct(ndr
, "out", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12614 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12620 static enum ndr_err_code
ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
*r
)
12622 if (flags
& NDR_IN
) {
12624 if (flags
& NDR_OUT
) {
12625 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12627 return NDR_ERR_SUCCESS
;
12630 static enum ndr_err_code
ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
*r
)
12632 if (flags
& NDR_IN
) {
12634 if (flags
& NDR_OUT
) {
12635 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12637 return NDR_ERR_SUCCESS
;
12640 _PUBLIC_
void ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
*r
)
12642 ndr_print_struct(ndr
, name
, "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12644 if (flags
& NDR_SET_VALUES
) {
12645 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12647 if (flags
& NDR_IN
) {
12648 ndr_print_struct(ndr
, "in", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12652 if (flags
& NDR_OUT
) {
12653 ndr_print_struct(ndr
, "out", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12655 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12661 static enum ndr_err_code
ndr_push_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARADTREPORTSECURITYEVENT
*r
)
12663 if (flags
& NDR_IN
) {
12665 if (flags
& NDR_OUT
) {
12666 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12668 return NDR_ERR_SUCCESS
;
12671 static enum ndr_err_code
ndr_pull_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARADTREPORTSECURITYEVENT
*r
)
12673 if (flags
& NDR_IN
) {
12675 if (flags
& NDR_OUT
) {
12676 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12678 return NDR_ERR_SUCCESS
;
12681 _PUBLIC_
void ndr_print_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARADTREPORTSECURITYEVENT
*r
)
12683 ndr_print_struct(ndr
, name
, "lsa_LSARADTREPORTSECURITYEVENT");
12685 if (flags
& NDR_SET_VALUES
) {
12686 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12688 if (flags
& NDR_IN
) {
12689 ndr_print_struct(ndr
, "in", "lsa_LSARADTREPORTSECURITYEVENT");
12693 if (flags
& NDR_OUT
) {
12694 ndr_print_struct(ndr
, "out", "lsa_LSARADTREPORTSECURITYEVENT");
12696 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12702 static const struct ndr_interface_call lsarpc_calls
[] = {
12705 sizeof(struct lsa_Close
),
12706 (ndr_push_flags_fn_t
) ndr_push_lsa_Close
,
12707 (ndr_pull_flags_fn_t
) ndr_pull_lsa_Close
,
12708 (ndr_print_function_t
) ndr_print_lsa_Close
,
12713 sizeof(struct lsa_Delete
),
12714 (ndr_push_flags_fn_t
) ndr_push_lsa_Delete
,
12715 (ndr_pull_flags_fn_t
) ndr_pull_lsa_Delete
,
12716 (ndr_print_function_t
) ndr_print_lsa_Delete
,
12721 sizeof(struct lsa_EnumPrivs
),
12722 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumPrivs
,
12723 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumPrivs
,
12724 (ndr_print_function_t
) ndr_print_lsa_EnumPrivs
,
12728 "lsa_QuerySecurity",
12729 sizeof(struct lsa_QuerySecurity
),
12730 (ndr_push_flags_fn_t
) ndr_push_lsa_QuerySecurity
,
12731 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QuerySecurity
,
12732 (ndr_print_function_t
) ndr_print_lsa_QuerySecurity
,
12737 sizeof(struct lsa_SetSecObj
),
12738 (ndr_push_flags_fn_t
) ndr_push_lsa_SetSecObj
,
12739 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetSecObj
,
12740 (ndr_print_function_t
) ndr_print_lsa_SetSecObj
,
12744 "lsa_ChangePassword",
12745 sizeof(struct lsa_ChangePassword
),
12746 (ndr_push_flags_fn_t
) ndr_push_lsa_ChangePassword
,
12747 (ndr_pull_flags_fn_t
) ndr_pull_lsa_ChangePassword
,
12748 (ndr_print_function_t
) ndr_print_lsa_ChangePassword
,
12753 sizeof(struct lsa_OpenPolicy
),
12754 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenPolicy
,
12755 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenPolicy
,
12756 (ndr_print_function_t
) ndr_print_lsa_OpenPolicy
,
12760 "lsa_QueryInfoPolicy",
12761 sizeof(struct lsa_QueryInfoPolicy
),
12762 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryInfoPolicy
,
12763 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryInfoPolicy
,
12764 (ndr_print_function_t
) ndr_print_lsa_QueryInfoPolicy
,
12768 "lsa_SetInfoPolicy",
12769 sizeof(struct lsa_SetInfoPolicy
),
12770 (ndr_push_flags_fn_t
) ndr_push_lsa_SetInfoPolicy
,
12771 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetInfoPolicy
,
12772 (ndr_print_function_t
) ndr_print_lsa_SetInfoPolicy
,
12776 "lsa_ClearAuditLog",
12777 sizeof(struct lsa_ClearAuditLog
),
12778 (ndr_push_flags_fn_t
) ndr_push_lsa_ClearAuditLog
,
12779 (ndr_pull_flags_fn_t
) ndr_pull_lsa_ClearAuditLog
,
12780 (ndr_print_function_t
) ndr_print_lsa_ClearAuditLog
,
12784 "lsa_CreateAccount",
12785 sizeof(struct lsa_CreateAccount
),
12786 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateAccount
,
12787 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateAccount
,
12788 (ndr_print_function_t
) ndr_print_lsa_CreateAccount
,
12792 "lsa_EnumAccounts",
12793 sizeof(struct lsa_EnumAccounts
),
12794 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumAccounts
,
12795 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumAccounts
,
12796 (ndr_print_function_t
) ndr_print_lsa_EnumAccounts
,
12800 "lsa_CreateTrustedDomain",
12801 sizeof(struct lsa_CreateTrustedDomain
),
12802 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateTrustedDomain
,
12803 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateTrustedDomain
,
12804 (ndr_print_function_t
) ndr_print_lsa_CreateTrustedDomain
,
12808 "lsa_EnumTrustDom",
12809 sizeof(struct lsa_EnumTrustDom
),
12810 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumTrustDom
,
12811 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumTrustDom
,
12812 (ndr_print_function_t
) ndr_print_lsa_EnumTrustDom
,
12817 sizeof(struct lsa_LookupNames
),
12818 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames
,
12819 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames
,
12820 (ndr_print_function_t
) ndr_print_lsa_LookupNames
,
12825 sizeof(struct lsa_LookupSids
),
12826 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupSids
,
12827 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupSids
,
12828 (ndr_print_function_t
) ndr_print_lsa_LookupSids
,
12832 "lsa_CreateSecret",
12833 sizeof(struct lsa_CreateSecret
),
12834 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateSecret
,
12835 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateSecret
,
12836 (ndr_print_function_t
) ndr_print_lsa_CreateSecret
,
12841 sizeof(struct lsa_OpenAccount
),
12842 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenAccount
,
12843 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenAccount
,
12844 (ndr_print_function_t
) ndr_print_lsa_OpenAccount
,
12848 "lsa_EnumPrivsAccount",
12849 sizeof(struct lsa_EnumPrivsAccount
),
12850 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumPrivsAccount
,
12851 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumPrivsAccount
,
12852 (ndr_print_function_t
) ndr_print_lsa_EnumPrivsAccount
,
12856 "lsa_AddPrivilegesToAccount",
12857 sizeof(struct lsa_AddPrivilegesToAccount
),
12858 (ndr_push_flags_fn_t
) ndr_push_lsa_AddPrivilegesToAccount
,
12859 (ndr_pull_flags_fn_t
) ndr_pull_lsa_AddPrivilegesToAccount
,
12860 (ndr_print_function_t
) ndr_print_lsa_AddPrivilegesToAccount
,
12864 "lsa_RemovePrivilegesFromAccount",
12865 sizeof(struct lsa_RemovePrivilegesFromAccount
),
12866 (ndr_push_flags_fn_t
) ndr_push_lsa_RemovePrivilegesFromAccount
,
12867 (ndr_pull_flags_fn_t
) ndr_pull_lsa_RemovePrivilegesFromAccount
,
12868 (ndr_print_function_t
) ndr_print_lsa_RemovePrivilegesFromAccount
,
12872 "lsa_GetQuotasForAccount",
12873 sizeof(struct lsa_GetQuotasForAccount
),
12874 (ndr_push_flags_fn_t
) ndr_push_lsa_GetQuotasForAccount
,
12875 (ndr_pull_flags_fn_t
) ndr_pull_lsa_GetQuotasForAccount
,
12876 (ndr_print_function_t
) ndr_print_lsa_GetQuotasForAccount
,
12880 "lsa_SetQuotasForAccount",
12881 sizeof(struct lsa_SetQuotasForAccount
),
12882 (ndr_push_flags_fn_t
) ndr_push_lsa_SetQuotasForAccount
,
12883 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetQuotasForAccount
,
12884 (ndr_print_function_t
) ndr_print_lsa_SetQuotasForAccount
,
12888 "lsa_GetSystemAccessAccount",
12889 sizeof(struct lsa_GetSystemAccessAccount
),
12890 (ndr_push_flags_fn_t
) ndr_push_lsa_GetSystemAccessAccount
,
12891 (ndr_pull_flags_fn_t
) ndr_pull_lsa_GetSystemAccessAccount
,
12892 (ndr_print_function_t
) ndr_print_lsa_GetSystemAccessAccount
,
12896 "lsa_SetSystemAccessAccount",
12897 sizeof(struct lsa_SetSystemAccessAccount
),
12898 (ndr_push_flags_fn_t
) ndr_push_lsa_SetSystemAccessAccount
,
12899 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetSystemAccessAccount
,
12900 (ndr_print_function_t
) ndr_print_lsa_SetSystemAccessAccount
,
12904 "lsa_OpenTrustedDomain",
12905 sizeof(struct lsa_OpenTrustedDomain
),
12906 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenTrustedDomain
,
12907 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenTrustedDomain
,
12908 (ndr_print_function_t
) ndr_print_lsa_OpenTrustedDomain
,
12912 "lsa_QueryTrustedDomainInfo",
12913 sizeof(struct lsa_QueryTrustedDomainInfo
),
12914 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryTrustedDomainInfo
,
12915 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryTrustedDomainInfo
,
12916 (ndr_print_function_t
) ndr_print_lsa_QueryTrustedDomainInfo
,
12920 "lsa_SetInformationTrustedDomain",
12921 sizeof(struct lsa_SetInformationTrustedDomain
),
12922 (ndr_push_flags_fn_t
) ndr_push_lsa_SetInformationTrustedDomain
,
12923 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetInformationTrustedDomain
,
12924 (ndr_print_function_t
) ndr_print_lsa_SetInformationTrustedDomain
,
12929 sizeof(struct lsa_OpenSecret
),
12930 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenSecret
,
12931 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenSecret
,
12932 (ndr_print_function_t
) ndr_print_lsa_OpenSecret
,
12937 sizeof(struct lsa_SetSecret
),
12938 (ndr_push_flags_fn_t
) ndr_push_lsa_SetSecret
,
12939 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetSecret
,
12940 (ndr_print_function_t
) ndr_print_lsa_SetSecret
,
12945 sizeof(struct lsa_QuerySecret
),
12946 (ndr_push_flags_fn_t
) ndr_push_lsa_QuerySecret
,
12947 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QuerySecret
,
12948 (ndr_print_function_t
) ndr_print_lsa_QuerySecret
,
12952 "lsa_LookupPrivValue",
12953 sizeof(struct lsa_LookupPrivValue
),
12954 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupPrivValue
,
12955 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupPrivValue
,
12956 (ndr_print_function_t
) ndr_print_lsa_LookupPrivValue
,
12960 "lsa_LookupPrivName",
12961 sizeof(struct lsa_LookupPrivName
),
12962 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupPrivName
,
12963 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupPrivName
,
12964 (ndr_print_function_t
) ndr_print_lsa_LookupPrivName
,
12968 "lsa_LookupPrivDisplayName",
12969 sizeof(struct lsa_LookupPrivDisplayName
),
12970 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupPrivDisplayName
,
12971 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupPrivDisplayName
,
12972 (ndr_print_function_t
) ndr_print_lsa_LookupPrivDisplayName
,
12976 "lsa_DeleteObject",
12977 sizeof(struct lsa_DeleteObject
),
12978 (ndr_push_flags_fn_t
) ndr_push_lsa_DeleteObject
,
12979 (ndr_pull_flags_fn_t
) ndr_pull_lsa_DeleteObject
,
12980 (ndr_print_function_t
) ndr_print_lsa_DeleteObject
,
12984 "lsa_EnumAccountsWithUserRight",
12985 sizeof(struct lsa_EnumAccountsWithUserRight
),
12986 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumAccountsWithUserRight
,
12987 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumAccountsWithUserRight
,
12988 (ndr_print_function_t
) ndr_print_lsa_EnumAccountsWithUserRight
,
12992 "lsa_EnumAccountRights",
12993 sizeof(struct lsa_EnumAccountRights
),
12994 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumAccountRights
,
12995 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumAccountRights
,
12996 (ndr_print_function_t
) ndr_print_lsa_EnumAccountRights
,
13000 "lsa_AddAccountRights",
13001 sizeof(struct lsa_AddAccountRights
),
13002 (ndr_push_flags_fn_t
) ndr_push_lsa_AddAccountRights
,
13003 (ndr_pull_flags_fn_t
) ndr_pull_lsa_AddAccountRights
,
13004 (ndr_print_function_t
) ndr_print_lsa_AddAccountRights
,
13008 "lsa_RemoveAccountRights",
13009 sizeof(struct lsa_RemoveAccountRights
),
13010 (ndr_push_flags_fn_t
) ndr_push_lsa_RemoveAccountRights
,
13011 (ndr_pull_flags_fn_t
) ndr_pull_lsa_RemoveAccountRights
,
13012 (ndr_print_function_t
) ndr_print_lsa_RemoveAccountRights
,
13016 "lsa_QueryTrustedDomainInfoBySid",
13017 sizeof(struct lsa_QueryTrustedDomainInfoBySid
),
13018 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryTrustedDomainInfoBySid
,
13019 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryTrustedDomainInfoBySid
,
13020 (ndr_print_function_t
) ndr_print_lsa_QueryTrustedDomainInfoBySid
,
13024 "lsa_SetTrustedDomainInfo",
13025 sizeof(struct lsa_SetTrustedDomainInfo
),
13026 (ndr_push_flags_fn_t
) ndr_push_lsa_SetTrustedDomainInfo
,
13027 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetTrustedDomainInfo
,
13028 (ndr_print_function_t
) ndr_print_lsa_SetTrustedDomainInfo
,
13032 "lsa_DeleteTrustedDomain",
13033 sizeof(struct lsa_DeleteTrustedDomain
),
13034 (ndr_push_flags_fn_t
) ndr_push_lsa_DeleteTrustedDomain
,
13035 (ndr_pull_flags_fn_t
) ndr_pull_lsa_DeleteTrustedDomain
,
13036 (ndr_print_function_t
) ndr_print_lsa_DeleteTrustedDomain
,
13040 "lsa_StorePrivateData",
13041 sizeof(struct lsa_StorePrivateData
),
13042 (ndr_push_flags_fn_t
) ndr_push_lsa_StorePrivateData
,
13043 (ndr_pull_flags_fn_t
) ndr_pull_lsa_StorePrivateData
,
13044 (ndr_print_function_t
) ndr_print_lsa_StorePrivateData
,
13048 "lsa_RetrievePrivateData",
13049 sizeof(struct lsa_RetrievePrivateData
),
13050 (ndr_push_flags_fn_t
) ndr_push_lsa_RetrievePrivateData
,
13051 (ndr_pull_flags_fn_t
) ndr_pull_lsa_RetrievePrivateData
,
13052 (ndr_print_function_t
) ndr_print_lsa_RetrievePrivateData
,
13057 sizeof(struct lsa_OpenPolicy2
),
13058 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenPolicy2
,
13059 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenPolicy2
,
13060 (ndr_print_function_t
) ndr_print_lsa_OpenPolicy2
,
13065 sizeof(struct lsa_GetUserName
),
13066 (ndr_push_flags_fn_t
) ndr_push_lsa_GetUserName
,
13067 (ndr_pull_flags_fn_t
) ndr_pull_lsa_GetUserName
,
13068 (ndr_print_function_t
) ndr_print_lsa_GetUserName
,
13072 "lsa_QueryInfoPolicy2",
13073 sizeof(struct lsa_QueryInfoPolicy2
),
13074 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryInfoPolicy2
,
13075 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryInfoPolicy2
,
13076 (ndr_print_function_t
) ndr_print_lsa_QueryInfoPolicy2
,
13080 "lsa_SetInfoPolicy2",
13081 sizeof(struct lsa_SetInfoPolicy2
),
13082 (ndr_push_flags_fn_t
) ndr_push_lsa_SetInfoPolicy2
,
13083 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetInfoPolicy2
,
13084 (ndr_print_function_t
) ndr_print_lsa_SetInfoPolicy2
,
13088 "lsa_QueryTrustedDomainInfoByName",
13089 sizeof(struct lsa_QueryTrustedDomainInfoByName
),
13090 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryTrustedDomainInfoByName
,
13091 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryTrustedDomainInfoByName
,
13092 (ndr_print_function_t
) ndr_print_lsa_QueryTrustedDomainInfoByName
,
13096 "lsa_SetTrustedDomainInfoByName",
13097 sizeof(struct lsa_SetTrustedDomainInfoByName
),
13098 (ndr_push_flags_fn_t
) ndr_push_lsa_SetTrustedDomainInfoByName
,
13099 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetTrustedDomainInfoByName
,
13100 (ndr_print_function_t
) ndr_print_lsa_SetTrustedDomainInfoByName
,
13104 "lsa_EnumTrustedDomainsEx",
13105 sizeof(struct lsa_EnumTrustedDomainsEx
),
13106 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumTrustedDomainsEx
,
13107 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumTrustedDomainsEx
,
13108 (ndr_print_function_t
) ndr_print_lsa_EnumTrustedDomainsEx
,
13112 "lsa_CreateTrustedDomainEx",
13113 sizeof(struct lsa_CreateTrustedDomainEx
),
13114 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateTrustedDomainEx
,
13115 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateTrustedDomainEx
,
13116 (ndr_print_function_t
) ndr_print_lsa_CreateTrustedDomainEx
,
13120 "lsa_CloseTrustedDomainEx",
13121 sizeof(struct lsa_CloseTrustedDomainEx
),
13122 (ndr_push_flags_fn_t
) ndr_push_lsa_CloseTrustedDomainEx
,
13123 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CloseTrustedDomainEx
,
13124 (ndr_print_function_t
) ndr_print_lsa_CloseTrustedDomainEx
,
13128 "lsa_QueryDomainInformationPolicy",
13129 sizeof(struct lsa_QueryDomainInformationPolicy
),
13130 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryDomainInformationPolicy
,
13131 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryDomainInformationPolicy
,
13132 (ndr_print_function_t
) ndr_print_lsa_QueryDomainInformationPolicy
,
13136 "lsa_SetDomainInformationPolicy",
13137 sizeof(struct lsa_SetDomainInformationPolicy
),
13138 (ndr_push_flags_fn_t
) ndr_push_lsa_SetDomainInformationPolicy
,
13139 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetDomainInformationPolicy
,
13140 (ndr_print_function_t
) ndr_print_lsa_SetDomainInformationPolicy
,
13144 "lsa_OpenTrustedDomainByName",
13145 sizeof(struct lsa_OpenTrustedDomainByName
),
13146 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenTrustedDomainByName
,
13147 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenTrustedDomainByName
,
13148 (ndr_print_function_t
) ndr_print_lsa_OpenTrustedDomainByName
,
13153 sizeof(struct lsa_TestCall
),
13154 (ndr_push_flags_fn_t
) ndr_push_lsa_TestCall
,
13155 (ndr_pull_flags_fn_t
) ndr_pull_lsa_TestCall
,
13156 (ndr_print_function_t
) ndr_print_lsa_TestCall
,
13161 sizeof(struct lsa_LookupSids2
),
13162 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupSids2
,
13163 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupSids2
,
13164 (ndr_print_function_t
) ndr_print_lsa_LookupSids2
,
13168 "lsa_LookupNames2",
13169 sizeof(struct lsa_LookupNames2
),
13170 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames2
,
13171 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames2
,
13172 (ndr_print_function_t
) ndr_print_lsa_LookupNames2
,
13176 "lsa_CreateTrustedDomainEx2",
13177 sizeof(struct lsa_CreateTrustedDomainEx2
),
13178 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateTrustedDomainEx2
,
13179 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateTrustedDomainEx2
,
13180 (ndr_print_function_t
) ndr_print_lsa_CreateTrustedDomainEx2
,
13185 sizeof(struct lsa_CREDRWRITE
),
13186 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRWRITE
,
13187 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRWRITE
,
13188 (ndr_print_function_t
) ndr_print_lsa_CREDRWRITE
,
13193 sizeof(struct lsa_CREDRREAD
),
13194 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRREAD
,
13195 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRREAD
,
13196 (ndr_print_function_t
) ndr_print_lsa_CREDRREAD
,
13200 "lsa_CREDRENUMERATE",
13201 sizeof(struct lsa_CREDRENUMERATE
),
13202 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRENUMERATE
,
13203 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRENUMERATE
,
13204 (ndr_print_function_t
) ndr_print_lsa_CREDRENUMERATE
,
13208 "lsa_CREDRWRITEDOMAINCREDENTIALS",
13209 sizeof(struct lsa_CREDRWRITEDOMAINCREDENTIALS
),
13210 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS
,
13211 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS
,
13212 (ndr_print_function_t
) ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS
,
13216 "lsa_CREDRREADDOMAINCREDENTIALS",
13217 sizeof(struct lsa_CREDRREADDOMAINCREDENTIALS
),
13218 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRREADDOMAINCREDENTIALS
,
13219 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS
,
13220 (ndr_print_function_t
) ndr_print_lsa_CREDRREADDOMAINCREDENTIALS
,
13225 sizeof(struct lsa_CREDRDELETE
),
13226 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRDELETE
,
13227 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRDELETE
,
13228 (ndr_print_function_t
) ndr_print_lsa_CREDRDELETE
,
13232 "lsa_CREDRGETTARGETINFO",
13233 sizeof(struct lsa_CREDRGETTARGETINFO
),
13234 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRGETTARGETINFO
,
13235 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRGETTARGETINFO
,
13236 (ndr_print_function_t
) ndr_print_lsa_CREDRGETTARGETINFO
,
13240 "lsa_CREDRPROFILELOADED",
13241 sizeof(struct lsa_CREDRPROFILELOADED
),
13242 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRPROFILELOADED
,
13243 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRPROFILELOADED
,
13244 (ndr_print_function_t
) ndr_print_lsa_CREDRPROFILELOADED
,
13248 "lsa_LookupNames3",
13249 sizeof(struct lsa_LookupNames3
),
13250 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames3
,
13251 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames3
,
13252 (ndr_print_function_t
) ndr_print_lsa_LookupNames3
,
13256 "lsa_CREDRGETSESSIONTYPES",
13257 sizeof(struct lsa_CREDRGETSESSIONTYPES
),
13258 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRGETSESSIONTYPES
,
13259 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRGETSESSIONTYPES
,
13260 (ndr_print_function_t
) ndr_print_lsa_CREDRGETSESSIONTYPES
,
13264 "lsa_LSARREGISTERAUDITEVENT",
13265 sizeof(struct lsa_LSARREGISTERAUDITEVENT
),
13266 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARREGISTERAUDITEVENT
,
13267 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARREGISTERAUDITEVENT
,
13268 (ndr_print_function_t
) ndr_print_lsa_LSARREGISTERAUDITEVENT
,
13272 "lsa_LSARGENAUDITEVENT",
13273 sizeof(struct lsa_LSARGENAUDITEVENT
),
13274 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARGENAUDITEVENT
,
13275 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARGENAUDITEVENT
,
13276 (ndr_print_function_t
) ndr_print_lsa_LSARGENAUDITEVENT
,
13280 "lsa_LSARUNREGISTERAUDITEVENT",
13281 sizeof(struct lsa_LSARUNREGISTERAUDITEVENT
),
13282 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARUNREGISTERAUDITEVENT
,
13283 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARUNREGISTERAUDITEVENT
,
13284 (ndr_print_function_t
) ndr_print_lsa_LSARUNREGISTERAUDITEVENT
,
13288 "lsa_lsaRQueryForestTrustInformation",
13289 sizeof(struct lsa_lsaRQueryForestTrustInformation
),
13290 (ndr_push_flags_fn_t
) ndr_push_lsa_lsaRQueryForestTrustInformation
,
13291 (ndr_pull_flags_fn_t
) ndr_pull_lsa_lsaRQueryForestTrustInformation
,
13292 (ndr_print_function_t
) ndr_print_lsa_lsaRQueryForestTrustInformation
,
13296 "lsa_LSARSETFORESTTRUSTINFORMATION",
13297 sizeof(struct lsa_LSARSETFORESTTRUSTINFORMATION
),
13298 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION
,
13299 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION
,
13300 (ndr_print_function_t
) ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION
,
13305 sizeof(struct lsa_CREDRRENAME
),
13306 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRRENAME
,
13307 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRRENAME
,
13308 (ndr_print_function_t
) ndr_print_lsa_CREDRRENAME
,
13313 sizeof(struct lsa_LookupSids3
),
13314 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupSids3
,
13315 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupSids3
,
13316 (ndr_print_function_t
) ndr_print_lsa_LookupSids3
,
13320 "lsa_LookupNames4",
13321 sizeof(struct lsa_LookupNames4
),
13322 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames4
,
13323 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames4
,
13324 (ndr_print_function_t
) ndr_print_lsa_LookupNames4
,
13328 "lsa_LSAROPENPOLICYSCE",
13329 sizeof(struct lsa_LSAROPENPOLICYSCE
),
13330 (ndr_push_flags_fn_t
) ndr_push_lsa_LSAROPENPOLICYSCE
,
13331 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSAROPENPOLICYSCE
,
13332 (ndr_print_function_t
) ndr_print_lsa_LSAROPENPOLICYSCE
,
13336 "lsa_LSARADTREGISTERSECURITYEVENTSOURCE",
13337 sizeof(struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
),
13338 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE
,
13339 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE
,
13340 (ndr_print_function_t
) ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE
,
13344 "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE",
13345 sizeof(struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
),
13346 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
13347 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
13348 (ndr_print_function_t
) ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
13352 "lsa_LSARADTREPORTSECURITYEVENT",
13353 sizeof(struct lsa_LSARADTREPORTSECURITYEVENT
),
13354 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARADTREPORTSECURITYEVENT
,
13355 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARADTREPORTSECURITYEVENT
,
13356 (ndr_print_function_t
) ndr_print_lsa_LSARADTREPORTSECURITYEVENT
,
13359 { NULL
, 0, NULL
, NULL
, NULL
, false }
13362 static const char * const lsarpc_endpoint_strings
[] = {
13363 "ncacn_np:[\\pipe\\lsarpc]",
13364 "ncacn_np:[\\pipe\\netlogon]",
13365 "ncacn_np:[\\pipe\\lsass]",
13370 static const struct ndr_interface_string_array lsarpc_endpoints
= {
13372 .names
= lsarpc_endpoint_strings
13375 static const char * const lsarpc_authservice_strings
[] = {
13379 static const struct ndr_interface_string_array lsarpc_authservices
= {
13381 .names
= lsarpc_authservice_strings
13385 const struct ndr_interface_table ndr_table_lsarpc
= {
13388 {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xab}},
13391 .helpstring
= NDR_LSARPC_HELPSTRING
,
13393 .calls
= lsarpc_calls
,
13394 .endpoints
= &lsarpc_endpoints
,
13395 .authservices
= &lsarpc_authservices