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
, 5));
12 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
)));
13 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
)));
14 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
15 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
17 if (ndr_flags
& NDR_BUFFERS
) {
19 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
) / 2));
20 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
21 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
) / 2));
22 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, 2 * strlen_m(r
->string
) / 2, sizeof(uint16_t), CH_UTF16
));
25 return NDR_ERR_SUCCESS
;
28 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_String(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_String
*r
)
31 TALLOC_CTX
*_mem_save_string_0
;
32 if (ndr_flags
& NDR_SCALARS
) {
33 NDR_CHECK(ndr_pull_align(ndr
, 5));
34 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
35 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
36 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
38 NDR_PULL_ALLOC(ndr
, r
->string
);
42 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
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 if (ndr_get_array_length(ndr
, &r
->string
) > ndr_get_array_size(ndr
, &r
->string
)) {
51 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->string
), ndr_get_array_length(ndr
, &r
->string
));
53 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, ndr_get_array_length(ndr
, &r
->string
), sizeof(uint16_t), CH_UTF16
));
54 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
57 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->size
/ 2));
60 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->string
, r
->length
/ 2));
63 return NDR_ERR_SUCCESS
;
66 _PUBLIC_
void ndr_print_lsa_String(struct ndr_print
*ndr
, const char *name
, const struct lsa_String
*r
)
68 ndr_print_struct(ndr
, name
, "lsa_String");
70 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m(r
->string
):r
->length
);
71 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m(r
->string
):r
->size
);
72 ndr_print_ptr(ndr
, "string", r
->string
);
75 ndr_print_string(ndr
, "string", r
->string
);
81 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_StringLarge(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_StringLarge
*r
)
83 if (ndr_flags
& NDR_SCALARS
) {
84 NDR_CHECK(ndr_push_align(ndr
, 5));
85 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
)));
86 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 2 * strlen_m_term(r
->string
)));
87 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
88 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
90 if (ndr_flags
& NDR_BUFFERS
) {
92 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 2 * strlen_m_term(r
->string
) / 2));
93 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
94 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 2 * strlen_m(r
->string
) / 2));
95 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, 2 * strlen_m(r
->string
) / 2, sizeof(uint16_t), CH_UTF16
));
98 return NDR_ERR_SUCCESS
;
101 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_StringLarge(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_StringLarge
*r
)
103 uint32_t _ptr_string
;
104 TALLOC_CTX
*_mem_save_string_0
;
105 if (ndr_flags
& NDR_SCALARS
) {
106 NDR_CHECK(ndr_pull_align(ndr
, 5));
107 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
108 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
109 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
111 NDR_PULL_ALLOC(ndr
, r
->string
);
115 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
117 if (ndr_flags
& NDR_BUFFERS
) {
119 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
120 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
121 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
122 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string
));
123 if (ndr_get_array_length(ndr
, &r
->string
) > ndr_get_array_size(ndr
, &r
->string
)) {
124 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->string
), ndr_get_array_length(ndr
, &r
->string
));
126 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, ndr_get_array_length(ndr
, &r
->string
), sizeof(uint16_t), CH_UTF16
));
127 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
130 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->size
/ 2));
133 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->string
, r
->length
/ 2));
136 return NDR_ERR_SUCCESS
;
139 _PUBLIC_
void ndr_print_lsa_StringLarge(struct ndr_print
*ndr
, const char *name
, const struct lsa_StringLarge
*r
)
141 ndr_print_struct(ndr
, name
, "lsa_StringLarge");
143 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m(r
->string
):r
->length
);
144 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m_term(r
->string
):r
->size
);
145 ndr_print_ptr(ndr
, "string", r
->string
);
148 ndr_print_string(ndr
, "string", r
->string
);
154 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_Strings(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_Strings
*r
)
156 uint32_t cntr_names_1
;
157 if (ndr_flags
& NDR_SCALARS
) {
158 NDR_CHECK(ndr_push_align(ndr
, 5));
159 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
160 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
161 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
163 if (ndr_flags
& NDR_BUFFERS
) {
165 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
166 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
167 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
169 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
170 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
174 return NDR_ERR_SUCCESS
;
177 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_Strings(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_Strings
*r
)
180 uint32_t cntr_names_1
;
181 TALLOC_CTX
*_mem_save_names_0
;
182 TALLOC_CTX
*_mem_save_names_1
;
183 if (ndr_flags
& NDR_SCALARS
) {
184 NDR_CHECK(ndr_pull_align(ndr
, 5));
185 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
186 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
188 NDR_PULL_ALLOC(ndr
, r
->names
);
192 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
194 if (ndr_flags
& NDR_BUFFERS
) {
196 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
197 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
198 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
199 NDR_PULL_ALLOC_N(ndr
, r
->names
, ndr_get_array_size(ndr
, &r
->names
));
200 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
201 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
202 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
203 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
205 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
206 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
208 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
209 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
212 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
215 return NDR_ERR_SUCCESS
;
218 _PUBLIC_
void ndr_print_lsa_Strings(struct ndr_print
*ndr
, const char *name
, const struct lsa_Strings
*r
)
220 uint32_t cntr_names_1
;
221 ndr_print_struct(ndr
, name
, "lsa_Strings");
223 ndr_print_uint32(ndr
, "count", r
->count
);
224 ndr_print_ptr(ndr
, "names", r
->names
);
227 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
229 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
231 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
232 ndr_print_lsa_String(ndr
, "names", &r
->names
[cntr_names_1
]);
242 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_AsciiString(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AsciiString
*r
)
244 if (ndr_flags
& NDR_SCALARS
) {
245 NDR_CHECK(ndr_push_align(ndr
, 5));
246 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
247 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
248 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
249 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
251 if (ndr_flags
& NDR_BUFFERS
) {
253 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
254 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
255 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
256 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, strlen_m(r
->string
), sizeof(uint8_t), CH_DOS
));
259 return NDR_ERR_SUCCESS
;
262 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_AsciiString(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AsciiString
*r
)
264 uint32_t _ptr_string
;
265 TALLOC_CTX
*_mem_save_string_0
;
266 if (ndr_flags
& NDR_SCALARS
) {
267 NDR_CHECK(ndr_pull_align(ndr
, 5));
268 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
269 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
270 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
272 NDR_PULL_ALLOC(ndr
, r
->string
);
276 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
278 if (ndr_flags
& NDR_BUFFERS
) {
280 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
281 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
282 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
283 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string
));
284 if (ndr_get_array_length(ndr
, &r
->string
) > ndr_get_array_size(ndr
, &r
->string
)) {
285 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->string
), ndr_get_array_length(ndr
, &r
->string
));
287 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, ndr_get_array_length(ndr
, &r
->string
), sizeof(uint8_t), CH_DOS
));
288 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
291 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->size
));
294 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->string
, r
->length
));
297 return NDR_ERR_SUCCESS
;
300 _PUBLIC_
void ndr_print_lsa_AsciiString(struct ndr_print
*ndr
, const char *name
, const struct lsa_AsciiString
*r
)
302 ndr_print_struct(ndr
, name
, "lsa_AsciiString");
304 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->string
):r
->length
);
305 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->string
):r
->size
);
306 ndr_print_ptr(ndr
, "string", r
->string
);
309 ndr_print_string(ndr
, "string", r
->string
);
315 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_AsciiStringLarge(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AsciiStringLarge
*r
)
317 if (ndr_flags
& NDR_SCALARS
) {
318 NDR_CHECK(ndr_push_align(ndr
, 5));
319 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
320 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, strlen_m_term(r
->string
)));
321 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
322 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
324 if (ndr_flags
& NDR_BUFFERS
) {
326 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, strlen_m_term(r
->string
)));
327 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
328 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, strlen_m(r
->string
)));
329 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, strlen_m(r
->string
), sizeof(uint8_t), CH_DOS
));
332 return NDR_ERR_SUCCESS
;
335 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_AsciiStringLarge(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AsciiStringLarge
*r
)
337 uint32_t _ptr_string
;
338 TALLOC_CTX
*_mem_save_string_0
;
339 if (ndr_flags
& NDR_SCALARS
) {
340 NDR_CHECK(ndr_pull_align(ndr
, 5));
341 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
342 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
343 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
345 NDR_PULL_ALLOC(ndr
, r
->string
);
349 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
351 if (ndr_flags
& NDR_BUFFERS
) {
353 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
354 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
355 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
356 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string
));
357 if (ndr_get_array_length(ndr
, &r
->string
) > ndr_get_array_size(ndr
, &r
->string
)) {
358 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->string
), ndr_get_array_length(ndr
, &r
->string
));
360 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, ndr_get_array_length(ndr
, &r
->string
), sizeof(uint8_t), CH_DOS
));
361 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
364 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->size
));
367 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->string
, r
->length
));
370 return NDR_ERR_SUCCESS
;
373 _PUBLIC_
void ndr_print_lsa_AsciiStringLarge(struct ndr_print
*ndr
, const char *name
, const struct lsa_AsciiStringLarge
*r
)
375 ndr_print_struct(ndr
, name
, "lsa_AsciiStringLarge");
377 ndr_print_uint16(ndr
, "length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m(r
->string
):r
->length
);
378 ndr_print_uint16(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?strlen_m_term(r
->string
):r
->size
);
379 ndr_print_ptr(ndr
, "string", r
->string
);
382 ndr_print_string(ndr
, "string", r
->string
);
388 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_BinaryString(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_BinaryString
*r
)
390 uint32_t cntr_array_1
;
391 if (ndr_flags
& NDR_SCALARS
) {
392 NDR_CHECK(ndr_push_align(ndr
, 5));
393 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->length
));
394 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->size
));
395 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->array
));
396 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
398 if (ndr_flags
& NDR_BUFFERS
) {
400 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->size
/ 2));
401 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
402 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->length
/ 2));
403 for (cntr_array_1
= 0; cntr_array_1
< r
->length
/ 2; cntr_array_1
++) {
404 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->array
[cntr_array_1
]));
408 return NDR_ERR_SUCCESS
;
411 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_BinaryString(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_BinaryString
*r
)
414 uint32_t cntr_array_1
;
415 TALLOC_CTX
*_mem_save_array_0
;
416 TALLOC_CTX
*_mem_save_array_1
;
417 if (ndr_flags
& NDR_SCALARS
) {
418 NDR_CHECK(ndr_pull_align(ndr
, 5));
419 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->length
));
420 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
421 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_array
));
423 NDR_PULL_ALLOC(ndr
, r
->array
);
427 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
429 if (ndr_flags
& NDR_BUFFERS
) {
431 _mem_save_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
432 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
433 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->array
));
434 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->array
));
435 if (ndr_get_array_length(ndr
, &r
->array
) > ndr_get_array_size(ndr
, &r
->array
)) {
436 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->array
), ndr_get_array_length(ndr
, &r
->array
));
438 NDR_PULL_ALLOC_N(ndr
, r
->array
, ndr_get_array_size(ndr
, &r
->array
));
439 _mem_save_array_1
= NDR_PULL_GET_MEM_CTX(ndr
);
440 NDR_PULL_SET_MEM_CTX(ndr
, r
->array
, 0);
441 for (cntr_array_1
= 0; cntr_array_1
< ndr_get_array_length(ndr
, &r
->array
); cntr_array_1
++) {
442 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->array
[cntr_array_1
]));
444 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_1
, 0);
445 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_array_0
, 0);
448 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->array
, r
->size
/ 2));
451 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->array
, r
->length
/ 2));
454 return NDR_ERR_SUCCESS
;
457 _PUBLIC_
void ndr_print_lsa_BinaryString(struct ndr_print
*ndr
, const char *name
, const struct lsa_BinaryString
*r
)
459 uint32_t cntr_array_1
;
460 ndr_print_struct(ndr
, name
, "lsa_BinaryString");
462 ndr_print_uint16(ndr
, "length", r
->length
);
463 ndr_print_uint16(ndr
, "size", r
->size
);
464 ndr_print_ptr(ndr
, "array", r
->array
);
467 ndr
->print(ndr
, "%s: ARRAY(%d)", "array", (int)r
->length
/ 2);
469 for (cntr_array_1
=0;cntr_array_1
<r
->length
/ 2;cntr_array_1
++) {
471 if (asprintf(&idx_1
, "[%d]", cntr_array_1
) != -1) {
472 ndr_print_uint16(ndr
, "array", r
->array
[cntr_array_1
]);
482 static enum ndr_err_code
ndr_push_lsa_LUID(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_LUID
*r
)
484 if (ndr_flags
& NDR_SCALARS
) {
485 NDR_CHECK(ndr_push_align(ndr
, 4));
486 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->low
));
487 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->high
));
488 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
490 if (ndr_flags
& NDR_BUFFERS
) {
492 return NDR_ERR_SUCCESS
;
495 static enum ndr_err_code
ndr_pull_lsa_LUID(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_LUID
*r
)
497 if (ndr_flags
& NDR_SCALARS
) {
498 NDR_CHECK(ndr_pull_align(ndr
, 4));
499 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->low
));
500 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->high
));
501 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
503 if (ndr_flags
& NDR_BUFFERS
) {
505 return NDR_ERR_SUCCESS
;
508 _PUBLIC_
void ndr_print_lsa_LUID(struct ndr_print
*ndr
, const char *name
, const struct lsa_LUID
*r
)
510 ndr_print_struct(ndr
, name
, "lsa_LUID");
512 ndr_print_uint32(ndr
, "low", r
->low
);
513 ndr_print_uint32(ndr
, "high", r
->high
);
517 static enum ndr_err_code
ndr_push_lsa_PrivEntry(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_PrivEntry
*r
)
519 if (ndr_flags
& NDR_SCALARS
) {
520 NDR_CHECK(ndr_push_align(ndr
, 5));
521 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
522 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, &r
->luid
));
523 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
525 if (ndr_flags
& NDR_BUFFERS
) {
526 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
528 return NDR_ERR_SUCCESS
;
531 static enum ndr_err_code
ndr_pull_lsa_PrivEntry(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_PrivEntry
*r
)
533 if (ndr_flags
& NDR_SCALARS
) {
534 NDR_CHECK(ndr_pull_align(ndr
, 5));
535 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
536 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, &r
->luid
));
537 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
539 if (ndr_flags
& NDR_BUFFERS
) {
540 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
542 return NDR_ERR_SUCCESS
;
545 _PUBLIC_
void ndr_print_lsa_PrivEntry(struct ndr_print
*ndr
, const char *name
, const struct lsa_PrivEntry
*r
)
547 ndr_print_struct(ndr
, name
, "lsa_PrivEntry");
549 ndr_print_lsa_StringLarge(ndr
, "name", &r
->name
);
550 ndr_print_lsa_LUID(ndr
, "luid", &r
->luid
);
554 static enum ndr_err_code
ndr_push_lsa_PrivArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_PrivArray
*r
)
556 uint32_t cntr_privs_1
;
557 if (ndr_flags
& NDR_SCALARS
) {
558 NDR_CHECK(ndr_push_align(ndr
, 5));
559 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
560 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->privs
));
561 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
563 if (ndr_flags
& NDR_BUFFERS
) {
565 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
566 for (cntr_privs_1
= 0; cntr_privs_1
< r
->count
; cntr_privs_1
++) {
567 NDR_CHECK(ndr_push_lsa_PrivEntry(ndr
, NDR_SCALARS
, &r
->privs
[cntr_privs_1
]));
569 for (cntr_privs_1
= 0; cntr_privs_1
< r
->count
; cntr_privs_1
++) {
570 NDR_CHECK(ndr_push_lsa_PrivEntry(ndr
, NDR_BUFFERS
, &r
->privs
[cntr_privs_1
]));
574 return NDR_ERR_SUCCESS
;
577 static enum ndr_err_code
ndr_pull_lsa_PrivArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_PrivArray
*r
)
580 uint32_t cntr_privs_1
;
581 TALLOC_CTX
*_mem_save_privs_0
;
582 TALLOC_CTX
*_mem_save_privs_1
;
583 if (ndr_flags
& NDR_SCALARS
) {
584 NDR_CHECK(ndr_pull_align(ndr
, 5));
585 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
586 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_privs
));
588 NDR_PULL_ALLOC(ndr
, r
->privs
);
592 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
594 if (ndr_flags
& NDR_BUFFERS
) {
596 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
597 NDR_PULL_SET_MEM_CTX(ndr
, r
->privs
, 0);
598 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->privs
));
599 NDR_PULL_ALLOC_N(ndr
, r
->privs
, ndr_get_array_size(ndr
, &r
->privs
));
600 _mem_save_privs_1
= NDR_PULL_GET_MEM_CTX(ndr
);
601 NDR_PULL_SET_MEM_CTX(ndr
, r
->privs
, 0);
602 for (cntr_privs_1
= 0; cntr_privs_1
< r
->count
; cntr_privs_1
++) {
603 NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr
, NDR_SCALARS
, &r
->privs
[cntr_privs_1
]));
605 for (cntr_privs_1
= 0; cntr_privs_1
< r
->count
; cntr_privs_1
++) {
606 NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr
, NDR_BUFFERS
, &r
->privs
[cntr_privs_1
]));
608 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_1
, 0);
609 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, 0);
612 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->privs
, r
->count
));
615 return NDR_ERR_SUCCESS
;
618 _PUBLIC_
void ndr_print_lsa_PrivArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_PrivArray
*r
)
620 uint32_t cntr_privs_1
;
621 ndr_print_struct(ndr
, name
, "lsa_PrivArray");
623 ndr_print_uint32(ndr
, "count", r
->count
);
624 ndr_print_ptr(ndr
, "privs", r
->privs
);
627 ndr
->print(ndr
, "%s: ARRAY(%d)", "privs", (int)r
->count
);
629 for (cntr_privs_1
=0;cntr_privs_1
<r
->count
;cntr_privs_1
++) {
631 if (asprintf(&idx_1
, "[%d]", cntr_privs_1
) != -1) {
632 ndr_print_lsa_PrivEntry(ndr
, "privs", &r
->privs
[cntr_privs_1
]);
642 static enum ndr_err_code
ndr_push_lsa_QosInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_QosInfo
*r
)
644 if (ndr_flags
& NDR_SCALARS
) {
645 NDR_CHECK(ndr_push_align(ndr
, 4));
646 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->len
));
647 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->impersonation_level
));
648 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->context_mode
));
649 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->effective_only
));
650 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
652 if (ndr_flags
& NDR_BUFFERS
) {
654 return NDR_ERR_SUCCESS
;
657 static enum ndr_err_code
ndr_pull_lsa_QosInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_QosInfo
*r
)
659 if (ndr_flags
& NDR_SCALARS
) {
660 NDR_CHECK(ndr_pull_align(ndr
, 4));
661 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->len
));
662 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->impersonation_level
));
663 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->context_mode
));
664 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->effective_only
));
665 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
667 if (ndr_flags
& NDR_BUFFERS
) {
669 return NDR_ERR_SUCCESS
;
672 _PUBLIC_
void ndr_print_lsa_QosInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_QosInfo
*r
)
674 ndr_print_struct(ndr
, name
, "lsa_QosInfo");
676 ndr_print_uint32(ndr
, "len", r
->len
);
677 ndr_print_uint16(ndr
, "impersonation_level", r
->impersonation_level
);
678 ndr_print_uint8(ndr
, "context_mode", r
->context_mode
);
679 ndr_print_uint8(ndr
, "effective_only", r
->effective_only
);
683 static enum ndr_err_code
ndr_push_lsa_ObjectAttribute(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ObjectAttribute
*r
)
685 if (ndr_flags
& NDR_SCALARS
) {
686 NDR_CHECK(ndr_push_align(ndr
, 5));
687 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->len
));
688 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->root_dir
));
689 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->object_name
));
690 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->attributes
));
691 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sec_desc
));
692 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sec_qos
));
693 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
695 if (ndr_flags
& NDR_BUFFERS
) {
697 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, *r
->root_dir
));
699 if (r
->object_name
) {
700 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_name
, CH_UTF16
)));
701 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
702 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->object_name
, CH_UTF16
)));
703 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->object_name
, ndr_charset_length(r
->object_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
706 NDR_CHECK(ndr_push_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sec_desc
));
709 NDR_CHECK(ndr_push_lsa_QosInfo(ndr
, NDR_SCALARS
, r
->sec_qos
));
712 return NDR_ERR_SUCCESS
;
715 static enum ndr_err_code
ndr_pull_lsa_ObjectAttribute(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ObjectAttribute
*r
)
717 uint32_t _ptr_root_dir
;
718 TALLOC_CTX
*_mem_save_root_dir_0
;
719 uint32_t _ptr_object_name
;
720 TALLOC_CTX
*_mem_save_object_name_0
;
721 uint32_t _ptr_sec_desc
;
722 TALLOC_CTX
*_mem_save_sec_desc_0
;
723 uint32_t _ptr_sec_qos
;
724 TALLOC_CTX
*_mem_save_sec_qos_0
;
725 if (ndr_flags
& NDR_SCALARS
) {
726 NDR_CHECK(ndr_pull_align(ndr
, 5));
727 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->len
));
728 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_root_dir
));
730 NDR_PULL_ALLOC(ndr
, r
->root_dir
);
734 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_object_name
));
735 if (_ptr_object_name
) {
736 NDR_PULL_ALLOC(ndr
, r
->object_name
);
738 r
->object_name
= NULL
;
740 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->attributes
));
741 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sec_desc
));
743 NDR_PULL_ALLOC(ndr
, r
->sec_desc
);
747 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sec_qos
));
749 NDR_PULL_ALLOC(ndr
, r
->sec_qos
);
753 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
755 if (ndr_flags
& NDR_BUFFERS
) {
757 _mem_save_root_dir_0
= NDR_PULL_GET_MEM_CTX(ndr
);
758 NDR_PULL_SET_MEM_CTX(ndr
, r
->root_dir
, 0);
759 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, r
->root_dir
));
760 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_root_dir_0
, 0);
762 if (r
->object_name
) {
763 _mem_save_object_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
764 NDR_PULL_SET_MEM_CTX(ndr
, r
->object_name
, 0);
765 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->object_name
));
766 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->object_name
));
767 if (ndr_get_array_length(ndr
, &r
->object_name
) > ndr_get_array_size(ndr
, &r
->object_name
)) {
768 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->object_name
), ndr_get_array_length(ndr
, &r
->object_name
));
770 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->object_name
), sizeof(uint16_t)));
771 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->object_name
, ndr_get_array_length(ndr
, &r
->object_name
), sizeof(uint16_t), CH_UTF16
));
772 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_object_name_0
, 0);
775 _mem_save_sec_desc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
776 NDR_PULL_SET_MEM_CTX(ndr
, r
->sec_desc
, 0);
777 NDR_CHECK(ndr_pull_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sec_desc
));
778 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_desc_0
, 0);
781 _mem_save_sec_qos_0
= NDR_PULL_GET_MEM_CTX(ndr
);
782 NDR_PULL_SET_MEM_CTX(ndr
, r
->sec_qos
, 0);
783 NDR_CHECK(ndr_pull_lsa_QosInfo(ndr
, NDR_SCALARS
, r
->sec_qos
));
784 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_qos_0
, 0);
787 return NDR_ERR_SUCCESS
;
790 _PUBLIC_
void ndr_print_lsa_ObjectAttribute(struct ndr_print
*ndr
, const char *name
, const struct lsa_ObjectAttribute
*r
)
792 ndr_print_struct(ndr
, name
, "lsa_ObjectAttribute");
794 ndr_print_uint32(ndr
, "len", r
->len
);
795 ndr_print_ptr(ndr
, "root_dir", r
->root_dir
);
798 ndr_print_uint8(ndr
, "root_dir", *r
->root_dir
);
801 ndr_print_ptr(ndr
, "object_name", r
->object_name
);
803 if (r
->object_name
) {
804 ndr_print_string(ndr
, "object_name", r
->object_name
);
807 ndr_print_uint32(ndr
, "attributes", r
->attributes
);
808 ndr_print_ptr(ndr
, "sec_desc", r
->sec_desc
);
811 ndr_print_security_descriptor(ndr
, "sec_desc", r
->sec_desc
);
814 ndr_print_ptr(ndr
, "sec_qos", r
->sec_qos
);
817 ndr_print_lsa_QosInfo(ndr
, "sec_qos", r
->sec_qos
);
823 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_PolicyAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
825 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
826 return NDR_ERR_SUCCESS
;
829 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_PolicyAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
832 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
834 return NDR_ERR_SUCCESS
;
837 _PUBLIC_
void ndr_print_lsa_PolicyAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
839 ndr_print_uint32(ndr
, name
, r
);
841 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_VIEW_LOCAL_INFORMATION", LSA_POLICY_VIEW_LOCAL_INFORMATION
, r
);
842 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_VIEW_AUDIT_INFORMATION", LSA_POLICY_VIEW_AUDIT_INFORMATION
, r
);
843 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_GET_PRIVATE_INFORMATION", LSA_POLICY_GET_PRIVATE_INFORMATION
, r
);
844 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_TRUST_ADMIN", LSA_POLICY_TRUST_ADMIN
, r
);
845 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_CREATE_ACCOUNT", LSA_POLICY_CREATE_ACCOUNT
, r
);
846 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_CREATE_SECRET", LSA_POLICY_CREATE_SECRET
, r
);
847 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_CREATE_PRIVILEGE", LSA_POLICY_CREATE_PRIVILEGE
, r
);
848 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS", LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS
, r
);
849 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_SET_AUDIT_REQUIREMENTS", LSA_POLICY_SET_AUDIT_REQUIREMENTS
, r
);
850 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_AUDIT_LOG_ADMIN", LSA_POLICY_AUDIT_LOG_ADMIN
, r
);
851 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_SERVER_ADMIN", LSA_POLICY_SERVER_ADMIN
, r
);
852 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_LOOKUP_NAMES", LSA_POLICY_LOOKUP_NAMES
, r
);
853 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_POLICY_NOTIFICATION", LSA_POLICY_NOTIFICATION
, r
);
857 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_AccountAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
859 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
860 return NDR_ERR_SUCCESS
;
863 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_AccountAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
866 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
868 return NDR_ERR_SUCCESS
;
871 _PUBLIC_
void ndr_print_lsa_AccountAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
873 ndr_print_uint32(ndr
, name
, r
);
875 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_ACCOUNT_VIEW", LSA_ACCOUNT_VIEW
, r
);
876 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_PRIVILEGES", LSA_ACCOUNT_ADJUST_PRIVILEGES
, r
);
877 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_QUOTAS", LSA_ACCOUNT_ADJUST_QUOTAS
, r
);
878 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS", LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS
, r
);
882 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SecretAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
884 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
885 return NDR_ERR_SUCCESS
;
888 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SecretAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
891 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
893 return NDR_ERR_SUCCESS
;
896 _PUBLIC_
void ndr_print_lsa_SecretAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
898 ndr_print_uint32(ndr
, name
, r
);
900 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_SECRET_SET_VALUE", LSA_SECRET_SET_VALUE
, r
);
901 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_SECRET_QUERY_VALUE", LSA_SECRET_QUERY_VALUE
, r
);
905 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustedAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
907 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
908 return NDR_ERR_SUCCESS
;
911 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustedAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
914 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
916 return NDR_ERR_SUCCESS
;
919 _PUBLIC_
void ndr_print_lsa_TrustedAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
921 ndr_print_uint32(ndr
, name
, r
);
923 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_QUERY_DOMAIN_NAME", LSA_TRUSTED_QUERY_DOMAIN_NAME
, r
);
924 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_QUERY_CONTROLLERS", LSA_TRUSTED_QUERY_CONTROLLERS
, r
);
925 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_SET_CONTROLLERS", LSA_TRUSTED_SET_CONTROLLERS
, r
);
926 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_QUERY_POSIX", LSA_TRUSTED_QUERY_POSIX
, r
);
927 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_SET_POSIX", LSA_TRUSTED_SET_POSIX
, r
);
928 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_SET_AUTH", LSA_TRUSTED_SET_AUTH
, r
);
929 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUSTED_QUERY_AUTH", LSA_TRUSTED_QUERY_AUTH
, r
);
933 static enum ndr_err_code
ndr_push_lsa_AuditLogInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditLogInfo
*r
)
935 if (ndr_flags
& NDR_SCALARS
) {
936 NDR_CHECK(ndr_push_align(ndr
, 8));
937 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->percent_full
));
938 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->maximum_log_size
));
939 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->retention_time
));
940 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->shutdown_in_progress
));
941 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->time_to_shutdown
));
942 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->next_audit_record
));
943 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
945 if (ndr_flags
& NDR_BUFFERS
) {
947 return NDR_ERR_SUCCESS
;
950 static enum ndr_err_code
ndr_pull_lsa_AuditLogInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditLogInfo
*r
)
952 if (ndr_flags
& NDR_SCALARS
) {
953 NDR_CHECK(ndr_pull_align(ndr
, 8));
954 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->percent_full
));
955 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->maximum_log_size
));
956 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->retention_time
));
957 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->shutdown_in_progress
));
958 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->time_to_shutdown
));
959 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->next_audit_record
));
960 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
962 if (ndr_flags
& NDR_BUFFERS
) {
964 return NDR_ERR_SUCCESS
;
967 _PUBLIC_
void ndr_print_lsa_AuditLogInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditLogInfo
*r
)
969 ndr_print_struct(ndr
, name
, "lsa_AuditLogInfo");
971 ndr_print_uint32(ndr
, "percent_full", r
->percent_full
);
972 ndr_print_uint32(ndr
, "maximum_log_size", r
->maximum_log_size
);
973 ndr_print_hyper(ndr
, "retention_time", r
->retention_time
);
974 ndr_print_uint8(ndr
, "shutdown_in_progress", r
->shutdown_in_progress
);
975 ndr_print_hyper(ndr
, "time_to_shutdown", r
->time_to_shutdown
);
976 ndr_print_uint32(ndr
, "next_audit_record", r
->next_audit_record
);
980 static enum ndr_err_code
ndr_push_lsa_PolicyAuditPolicy(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_PolicyAuditPolicy r
)
982 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
983 return NDR_ERR_SUCCESS
;
986 static enum ndr_err_code
ndr_pull_lsa_PolicyAuditPolicy(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_PolicyAuditPolicy
*r
)
989 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
991 return NDR_ERR_SUCCESS
;
994 _PUBLIC_
void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print
*ndr
, const char *name
, enum lsa_PolicyAuditPolicy r
)
996 const char *val
= NULL
;
999 case LSA_AUDIT_POLICY_NONE
: val
= "LSA_AUDIT_POLICY_NONE"; break;
1000 case LSA_AUDIT_POLICY_SUCCESS
: val
= "LSA_AUDIT_POLICY_SUCCESS"; break;
1001 case LSA_AUDIT_POLICY_FAILURE
: val
= "LSA_AUDIT_POLICY_FAILURE"; break;
1002 case LSA_AUDIT_POLICY_ALL
: val
= "LSA_AUDIT_POLICY_ALL"; break;
1003 case LSA_AUDIT_POLICY_CLEAR
: val
= "LSA_AUDIT_POLICY_CLEAR"; break;
1005 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1008 static enum ndr_err_code
ndr_push_lsa_AuditEventsInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditEventsInfo
*r
)
1010 uint32_t cntr_settings_1
;
1011 if (ndr_flags
& NDR_SCALARS
) {
1012 NDR_CHECK(ndr_push_align(ndr
, 5));
1013 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->auditing_mode
));
1014 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->settings
));
1015 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
1016 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1018 if (ndr_flags
& NDR_BUFFERS
) {
1020 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
1021 for (cntr_settings_1
= 0; cntr_settings_1
< r
->count
; cntr_settings_1
++) {
1022 NDR_CHECK(ndr_push_lsa_PolicyAuditPolicy(ndr
, NDR_SCALARS
, r
->settings
[cntr_settings_1
]));
1026 return NDR_ERR_SUCCESS
;
1029 static enum ndr_err_code
ndr_pull_lsa_AuditEventsInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditEventsInfo
*r
)
1031 uint32_t _ptr_settings
;
1032 uint32_t cntr_settings_1
;
1033 TALLOC_CTX
*_mem_save_settings_0
;
1034 TALLOC_CTX
*_mem_save_settings_1
;
1035 if (ndr_flags
& NDR_SCALARS
) {
1036 NDR_CHECK(ndr_pull_align(ndr
, 5));
1037 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->auditing_mode
));
1038 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_settings
));
1039 if (_ptr_settings
) {
1040 NDR_PULL_ALLOC(ndr
, r
->settings
);
1044 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
1045 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1047 if (ndr_flags
& NDR_BUFFERS
) {
1049 _mem_save_settings_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1050 NDR_PULL_SET_MEM_CTX(ndr
, r
->settings
, 0);
1051 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->settings
));
1052 NDR_PULL_ALLOC_N(ndr
, r
->settings
, ndr_get_array_size(ndr
, &r
->settings
));
1053 _mem_save_settings_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1054 NDR_PULL_SET_MEM_CTX(ndr
, r
->settings
, 0);
1055 for (cntr_settings_1
= 0; cntr_settings_1
< r
->count
; cntr_settings_1
++) {
1056 NDR_CHECK(ndr_pull_lsa_PolicyAuditPolicy(ndr
, NDR_SCALARS
, &r
->settings
[cntr_settings_1
]));
1058 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_settings_1
, 0);
1059 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_settings_0
, 0);
1062 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->settings
, r
->count
));
1065 return NDR_ERR_SUCCESS
;
1068 _PUBLIC_
void ndr_print_lsa_AuditEventsInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditEventsInfo
*r
)
1070 uint32_t cntr_settings_1
;
1071 ndr_print_struct(ndr
, name
, "lsa_AuditEventsInfo");
1073 ndr_print_uint32(ndr
, "auditing_mode", r
->auditing_mode
);
1074 ndr_print_ptr(ndr
, "settings", r
->settings
);
1077 ndr
->print(ndr
, "%s: ARRAY(%d)", "settings", (int)r
->count
);
1079 for (cntr_settings_1
=0;cntr_settings_1
<r
->count
;cntr_settings_1
++) {
1081 if (asprintf(&idx_1
, "[%d]", cntr_settings_1
) != -1) {
1082 ndr_print_lsa_PolicyAuditPolicy(ndr
, "settings", r
->settings
[cntr_settings_1
]);
1089 ndr_print_uint32(ndr
, "count", r
->count
);
1093 static enum ndr_err_code
ndr_push_lsa_DomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainInfo
*r
)
1095 if (ndr_flags
& NDR_SCALARS
) {
1096 NDR_CHECK(ndr_push_align(ndr
, 5));
1097 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1098 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
1099 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1101 if (ndr_flags
& NDR_BUFFERS
) {
1102 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1104 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1107 return NDR_ERR_SUCCESS
;
1110 static enum ndr_err_code
ndr_pull_lsa_DomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainInfo
*r
)
1113 TALLOC_CTX
*_mem_save_sid_0
;
1114 if (ndr_flags
& NDR_SCALARS
) {
1115 NDR_CHECK(ndr_pull_align(ndr
, 5));
1116 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1117 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
1119 NDR_PULL_ALLOC(ndr
, r
->sid
);
1123 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1125 if (ndr_flags
& NDR_BUFFERS
) {
1126 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1128 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1129 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
1130 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1131 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
1134 return NDR_ERR_SUCCESS
;
1137 _PUBLIC_
void ndr_print_lsa_DomainInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainInfo
*r
)
1139 ndr_print_struct(ndr
, name
, "lsa_DomainInfo");
1141 ndr_print_lsa_StringLarge(ndr
, "name", &r
->name
);
1142 ndr_print_ptr(ndr
, "sid", r
->sid
);
1145 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
1151 static enum ndr_err_code
ndr_push_lsa_PDAccountInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_PDAccountInfo
*r
)
1153 if (ndr_flags
& NDR_SCALARS
) {
1154 NDR_CHECK(ndr_push_align(ndr
, 5));
1155 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1156 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1158 if (ndr_flags
& NDR_BUFFERS
) {
1159 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1161 return NDR_ERR_SUCCESS
;
1164 static enum ndr_err_code
ndr_pull_lsa_PDAccountInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_PDAccountInfo
*r
)
1166 if (ndr_flags
& NDR_SCALARS
) {
1167 NDR_CHECK(ndr_pull_align(ndr
, 5));
1168 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
1169 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1171 if (ndr_flags
& NDR_BUFFERS
) {
1172 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
1174 return NDR_ERR_SUCCESS
;
1177 _PUBLIC_
void ndr_print_lsa_PDAccountInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_PDAccountInfo
*r
)
1179 ndr_print_struct(ndr
, name
, "lsa_PDAccountInfo");
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_enum_uint32(ndr
, NDR_SCALARS
, r
));
1188 return NDR_ERR_SUCCESS
;
1191 static enum ndr_err_code
ndr_pull_lsa_Role(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_Role
*r
)
1194 NDR_CHECK(ndr_pull_enum_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
));
1215 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1217 if (ndr_flags
& NDR_BUFFERS
) {
1219 return NDR_ERR_SUCCESS
;
1222 static enum ndr_err_code
ndr_pull_lsa_ServerRole(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ServerRole
*r
)
1224 if (ndr_flags
& NDR_SCALARS
) {
1225 NDR_CHECK(ndr_pull_align(ndr
, 4));
1226 NDR_CHECK(ndr_pull_lsa_Role(ndr
, NDR_SCALARS
, &r
->role
));
1227 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1229 if (ndr_flags
& NDR_BUFFERS
) {
1231 return NDR_ERR_SUCCESS
;
1234 _PUBLIC_
void ndr_print_lsa_ServerRole(struct ndr_print
*ndr
, const char *name
, const struct lsa_ServerRole
*r
)
1236 ndr_print_struct(ndr
, name
, "lsa_ServerRole");
1238 ndr_print_lsa_Role(ndr
, "role", r
->role
);
1242 static enum ndr_err_code
ndr_push_lsa_ReplicaSourceInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ReplicaSourceInfo
*r
)
1244 if (ndr_flags
& NDR_SCALARS
) {
1245 NDR_CHECK(ndr_push_align(ndr
, 5));
1246 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->source
));
1247 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->account
));
1248 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1250 if (ndr_flags
& NDR_BUFFERS
) {
1251 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->source
));
1252 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->account
));
1254 return NDR_ERR_SUCCESS
;
1257 static enum ndr_err_code
ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ReplicaSourceInfo
*r
)
1259 if (ndr_flags
& NDR_SCALARS
) {
1260 NDR_CHECK(ndr_pull_align(ndr
, 5));
1261 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->source
));
1262 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->account
));
1263 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1265 if (ndr_flags
& NDR_BUFFERS
) {
1266 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->source
));
1267 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->account
));
1269 return NDR_ERR_SUCCESS
;
1272 _PUBLIC_
void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_ReplicaSourceInfo
*r
)
1274 ndr_print_struct(ndr
, name
, "lsa_ReplicaSourceInfo");
1276 ndr_print_lsa_String(ndr
, "source", &r
->source
);
1277 ndr_print_lsa_String(ndr
, "account", &r
->account
);
1281 static enum ndr_err_code
ndr_push_lsa_DefaultQuotaInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DefaultQuotaInfo
*r
)
1283 if (ndr_flags
& NDR_SCALARS
) {
1284 NDR_CHECK(ndr_push_align(ndr
, 8));
1285 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->paged_pool
));
1286 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->non_paged_pool
));
1287 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->min_wss
));
1288 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_wss
));
1289 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pagefile
));
1290 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown
));
1291 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
1293 if (ndr_flags
& NDR_BUFFERS
) {
1295 return NDR_ERR_SUCCESS
;
1298 static enum ndr_err_code
ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DefaultQuotaInfo
*r
)
1300 if (ndr_flags
& NDR_SCALARS
) {
1301 NDR_CHECK(ndr_pull_align(ndr
, 8));
1302 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->paged_pool
));
1303 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->non_paged_pool
));
1304 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->min_wss
));
1305 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_wss
));
1306 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pagefile
));
1307 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown
));
1308 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
1310 if (ndr_flags
& NDR_BUFFERS
) {
1312 return NDR_ERR_SUCCESS
;
1315 _PUBLIC_
void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_DefaultQuotaInfo
*r
)
1317 ndr_print_struct(ndr
, name
, "lsa_DefaultQuotaInfo");
1319 ndr_print_uint32(ndr
, "paged_pool", r
->paged_pool
);
1320 ndr_print_uint32(ndr
, "non_paged_pool", r
->non_paged_pool
);
1321 ndr_print_uint32(ndr
, "min_wss", r
->min_wss
);
1322 ndr_print_uint32(ndr
, "max_wss", r
->max_wss
);
1323 ndr_print_uint32(ndr
, "pagefile", r
->pagefile
);
1324 ndr_print_hyper(ndr
, "unknown", r
->unknown
);
1328 static enum ndr_err_code
ndr_push_lsa_ModificationInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ModificationInfo
*r
)
1330 if (ndr_flags
& NDR_SCALARS
) {
1331 NDR_CHECK(ndr_push_align(ndr
, 8));
1332 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->modified_id
));
1333 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->db_create_time
));
1334 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
1336 if (ndr_flags
& NDR_BUFFERS
) {
1338 return NDR_ERR_SUCCESS
;
1341 static enum ndr_err_code
ndr_pull_lsa_ModificationInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ModificationInfo
*r
)
1343 if (ndr_flags
& NDR_SCALARS
) {
1344 NDR_CHECK(ndr_pull_align(ndr
, 8));
1345 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->modified_id
));
1346 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, &r
->db_create_time
));
1347 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
1349 if (ndr_flags
& NDR_BUFFERS
) {
1351 return NDR_ERR_SUCCESS
;
1354 _PUBLIC_
void ndr_print_lsa_ModificationInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_ModificationInfo
*r
)
1356 ndr_print_struct(ndr
, name
, "lsa_ModificationInfo");
1358 ndr_print_hyper(ndr
, "modified_id", r
->modified_id
);
1359 ndr_print_NTTIME_hyper(ndr
, "db_create_time", r
->db_create_time
);
1363 static enum ndr_err_code
ndr_push_lsa_AuditFullSetInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditFullSetInfo
*r
)
1365 if (ndr_flags
& NDR_SCALARS
) {
1366 NDR_CHECK(ndr_push_align(ndr
, 1));
1367 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->shutdown_on_full
));
1368 NDR_CHECK(ndr_push_trailer_align(ndr
, 1));
1370 if (ndr_flags
& NDR_BUFFERS
) {
1372 return NDR_ERR_SUCCESS
;
1375 static enum ndr_err_code
ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditFullSetInfo
*r
)
1377 if (ndr_flags
& NDR_SCALARS
) {
1378 NDR_CHECK(ndr_pull_align(ndr
, 1));
1379 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->shutdown_on_full
));
1380 NDR_CHECK(ndr_pull_trailer_align(ndr
, 1));
1382 if (ndr_flags
& NDR_BUFFERS
) {
1384 return NDR_ERR_SUCCESS
;
1387 _PUBLIC_
void ndr_print_lsa_AuditFullSetInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditFullSetInfo
*r
)
1389 ndr_print_struct(ndr
, name
, "lsa_AuditFullSetInfo");
1391 ndr_print_uint8(ndr
, "shutdown_on_full", r
->shutdown_on_full
);
1395 static enum ndr_err_code
ndr_push_lsa_AuditFullQueryInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_AuditFullQueryInfo
*r
)
1397 if (ndr_flags
& NDR_SCALARS
) {
1398 NDR_CHECK(ndr_push_align(ndr
, 1));
1399 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->shutdown_on_full
));
1400 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->log_is_full
));
1401 NDR_CHECK(ndr_push_trailer_align(ndr
, 1));
1403 if (ndr_flags
& NDR_BUFFERS
) {
1405 return NDR_ERR_SUCCESS
;
1408 static enum ndr_err_code
ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_AuditFullQueryInfo
*r
)
1410 if (ndr_flags
& NDR_SCALARS
) {
1411 NDR_CHECK(ndr_pull_align(ndr
, 1));
1412 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->shutdown_on_full
));
1413 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->log_is_full
));
1414 NDR_CHECK(ndr_pull_trailer_align(ndr
, 1));
1416 if (ndr_flags
& NDR_BUFFERS
) {
1418 return NDR_ERR_SUCCESS
;
1421 _PUBLIC_
void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_AuditFullQueryInfo
*r
)
1423 ndr_print_struct(ndr
, name
, "lsa_AuditFullQueryInfo");
1425 ndr_print_uint8(ndr
, "shutdown_on_full", r
->shutdown_on_full
);
1426 ndr_print_uint8(ndr
, "log_is_full", r
->log_is_full
);
1430 static enum ndr_err_code
ndr_push_lsa_DnsDomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DnsDomainInfo
*r
)
1432 if (ndr_flags
& NDR_SCALARS
) {
1433 NDR_CHECK(ndr_push_align(ndr
, 5));
1434 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1435 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain
));
1436 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_forest
));
1437 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->domain_guid
));
1438 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
1439 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1441 if (ndr_flags
& NDR_BUFFERS
) {
1442 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1443 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain
));
1444 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_forest
));
1446 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1449 return NDR_ERR_SUCCESS
;
1452 static enum ndr_err_code
ndr_pull_lsa_DnsDomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DnsDomainInfo
*r
)
1455 TALLOC_CTX
*_mem_save_sid_0
;
1456 if (ndr_flags
& NDR_SCALARS
) {
1457 NDR_CHECK(ndr_pull_align(ndr
, 5));
1458 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->name
));
1459 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain
));
1460 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_forest
));
1461 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->domain_guid
));
1462 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
1464 NDR_PULL_ALLOC(ndr
, r
->sid
);
1468 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1470 if (ndr_flags
& NDR_BUFFERS
) {
1471 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->name
));
1472 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain
));
1473 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_forest
));
1475 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1476 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
1477 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1478 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
1481 return NDR_ERR_SUCCESS
;
1484 _PUBLIC_
void ndr_print_lsa_DnsDomainInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_DnsDomainInfo
*r
)
1486 ndr_print_struct(ndr
, name
, "lsa_DnsDomainInfo");
1488 ndr_print_lsa_StringLarge(ndr
, "name", &r
->name
);
1489 ndr_print_lsa_StringLarge(ndr
, "dns_domain", &r
->dns_domain
);
1490 ndr_print_lsa_StringLarge(ndr
, "dns_forest", &r
->dns_forest
);
1491 ndr_print_GUID(ndr
, "domain_guid", &r
->domain_guid
);
1492 ndr_print_ptr(ndr
, "sid", r
->sid
);
1495 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
1501 static enum ndr_err_code
ndr_push_lsa_PolicyInfo(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_PolicyInfo r
)
1503 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
1504 return NDR_ERR_SUCCESS
;
1507 static enum ndr_err_code
ndr_pull_lsa_PolicyInfo(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_PolicyInfo
*r
)
1510 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
1512 return NDR_ERR_SUCCESS
;
1515 _PUBLIC_
void ndr_print_lsa_PolicyInfo(struct ndr_print
*ndr
, const char *name
, enum lsa_PolicyInfo r
)
1517 const char *val
= NULL
;
1520 case LSA_POLICY_INFO_AUDIT_LOG
: val
= "LSA_POLICY_INFO_AUDIT_LOG"; break;
1521 case LSA_POLICY_INFO_AUDIT_EVENTS
: val
= "LSA_POLICY_INFO_AUDIT_EVENTS"; break;
1522 case LSA_POLICY_INFO_DOMAIN
: val
= "LSA_POLICY_INFO_DOMAIN"; break;
1523 case LSA_POLICY_INFO_PD
: val
= "LSA_POLICY_INFO_PD"; break;
1524 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
: val
= "LSA_POLICY_INFO_ACCOUNT_DOMAIN"; break;
1525 case LSA_POLICY_INFO_ROLE
: val
= "LSA_POLICY_INFO_ROLE"; break;
1526 case LSA_POLICY_INFO_REPLICA
: val
= "LSA_POLICY_INFO_REPLICA"; break;
1527 case LSA_POLICY_INFO_QUOTA
: val
= "LSA_POLICY_INFO_QUOTA"; break;
1528 case LSA_POLICY_INFO_MOD
: val
= "LSA_POLICY_INFO_MOD"; break;
1529 case LSA_POLICY_INFO_AUDIT_FULL_SET
: val
= "LSA_POLICY_INFO_AUDIT_FULL_SET"; break;
1530 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
: val
= "LSA_POLICY_INFO_AUDIT_FULL_QUERY"; break;
1531 case LSA_POLICY_INFO_DNS
: val
= "LSA_POLICY_INFO_DNS"; break;
1532 case LSA_POLICY_INFO_DNS_INT
: val
= "LSA_POLICY_INFO_DNS_INT"; break;
1533 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
: val
= "LSA_POLICY_INFO_L_ACCOUNT_DOMAIN"; break;
1535 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1538 static enum ndr_err_code
ndr_push_lsa_PolicyInformation(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_PolicyInformation
*r
)
1540 if (ndr_flags
& NDR_SCALARS
) {
1541 int level
= ndr_push_get_switch_value(ndr
, r
);
1542 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
1543 NDR_CHECK(ndr_push_union_align(ndr
, 8));
1545 case LSA_POLICY_INFO_AUDIT_LOG
: {
1546 NDR_CHECK(ndr_push_lsa_AuditLogInfo(ndr
, NDR_SCALARS
, &r
->audit_log
));
1549 case LSA_POLICY_INFO_AUDIT_EVENTS
: {
1550 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr
, NDR_SCALARS
, &r
->audit_events
));
1553 case LSA_POLICY_INFO_DOMAIN
: {
1554 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domain
));
1557 case LSA_POLICY_INFO_PD
: {
1558 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr
, NDR_SCALARS
, &r
->pd
));
1561 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
: {
1562 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->account_domain
));
1565 case LSA_POLICY_INFO_ROLE
: {
1566 NDR_CHECK(ndr_push_lsa_ServerRole(ndr
, NDR_SCALARS
, &r
->role
));
1569 case LSA_POLICY_INFO_REPLICA
: {
1570 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr
, NDR_SCALARS
, &r
->replica
));
1573 case LSA_POLICY_INFO_QUOTA
: {
1574 NDR_CHECK(ndr_push_lsa_DefaultQuotaInfo(ndr
, NDR_SCALARS
, &r
->quota
));
1577 case LSA_POLICY_INFO_MOD
: {
1578 NDR_CHECK(ndr_push_lsa_ModificationInfo(ndr
, NDR_SCALARS
, &r
->mod
));
1581 case LSA_POLICY_INFO_AUDIT_FULL_SET
: {
1582 NDR_CHECK(ndr_push_lsa_AuditFullSetInfo(ndr
, NDR_SCALARS
, &r
->auditfullset
));
1585 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
: {
1586 NDR_CHECK(ndr_push_lsa_AuditFullQueryInfo(ndr
, NDR_SCALARS
, &r
->auditfullquery
));
1589 case LSA_POLICY_INFO_DNS
: {
1590 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1593 case LSA_POLICY_INFO_DNS_INT
: {
1594 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1597 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
: {
1598 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->l_account_domain
));
1602 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1605 if (ndr_flags
& NDR_BUFFERS
) {
1606 int level
= ndr_push_get_switch_value(ndr
, r
);
1608 case LSA_POLICY_INFO_AUDIT_LOG
:
1611 case LSA_POLICY_INFO_AUDIT_EVENTS
:
1612 NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr
, NDR_BUFFERS
, &r
->audit_events
));
1615 case LSA_POLICY_INFO_DOMAIN
:
1616 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domain
));
1619 case LSA_POLICY_INFO_PD
:
1620 NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr
, NDR_BUFFERS
, &r
->pd
));
1623 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
:
1624 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->account_domain
));
1627 case LSA_POLICY_INFO_ROLE
:
1630 case LSA_POLICY_INFO_REPLICA
:
1631 NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr
, NDR_BUFFERS
, &r
->replica
));
1634 case LSA_POLICY_INFO_QUOTA
:
1637 case LSA_POLICY_INFO_MOD
:
1640 case LSA_POLICY_INFO_AUDIT_FULL_SET
:
1643 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
:
1646 case LSA_POLICY_INFO_DNS
:
1647 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1650 case LSA_POLICY_INFO_DNS_INT
:
1651 NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1654 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
:
1655 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->l_account_domain
));
1659 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1662 return NDR_ERR_SUCCESS
;
1665 static enum ndr_err_code
ndr_pull_lsa_PolicyInformation(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_PolicyInformation
*r
)
1669 level
= ndr_pull_get_switch_value(ndr
, r
);
1670 if (ndr_flags
& NDR_SCALARS
) {
1671 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
1672 if (_level
!= level
) {
1673 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
1675 NDR_CHECK(ndr_pull_union_align(ndr
, 8));
1677 case LSA_POLICY_INFO_AUDIT_LOG
: {
1678 NDR_CHECK(ndr_pull_lsa_AuditLogInfo(ndr
, NDR_SCALARS
, &r
->audit_log
));
1681 case LSA_POLICY_INFO_AUDIT_EVENTS
: {
1682 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr
, NDR_SCALARS
, &r
->audit_events
));
1685 case LSA_POLICY_INFO_DOMAIN
: {
1686 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domain
));
1689 case LSA_POLICY_INFO_PD
: {
1690 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr
, NDR_SCALARS
, &r
->pd
));
1693 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
: {
1694 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->account_domain
));
1697 case LSA_POLICY_INFO_ROLE
: {
1698 NDR_CHECK(ndr_pull_lsa_ServerRole(ndr
, NDR_SCALARS
, &r
->role
));
1701 case LSA_POLICY_INFO_REPLICA
: {
1702 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr
, NDR_SCALARS
, &r
->replica
));
1705 case LSA_POLICY_INFO_QUOTA
: {
1706 NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr
, NDR_SCALARS
, &r
->quota
));
1709 case LSA_POLICY_INFO_MOD
: {
1710 NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr
, NDR_SCALARS
, &r
->mod
));
1713 case LSA_POLICY_INFO_AUDIT_FULL_SET
: {
1714 NDR_CHECK(ndr_pull_lsa_AuditFullSetInfo(ndr
, NDR_SCALARS
, &r
->auditfullset
));
1717 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
: {
1718 NDR_CHECK(ndr_pull_lsa_AuditFullQueryInfo(ndr
, NDR_SCALARS
, &r
->auditfullquery
));
1721 case LSA_POLICY_INFO_DNS
: {
1722 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1725 case LSA_POLICY_INFO_DNS_INT
: {
1726 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_SCALARS
, &r
->dns
));
1729 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
: {
1730 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->l_account_domain
));
1734 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1737 if (ndr_flags
& NDR_BUFFERS
) {
1739 case LSA_POLICY_INFO_AUDIT_LOG
:
1742 case LSA_POLICY_INFO_AUDIT_EVENTS
:
1743 NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr
, NDR_BUFFERS
, &r
->audit_events
));
1746 case LSA_POLICY_INFO_DOMAIN
:
1747 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domain
));
1750 case LSA_POLICY_INFO_PD
:
1751 NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr
, NDR_BUFFERS
, &r
->pd
));
1754 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
:
1755 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->account_domain
));
1758 case LSA_POLICY_INFO_ROLE
:
1761 case LSA_POLICY_INFO_REPLICA
:
1762 NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr
, NDR_BUFFERS
, &r
->replica
));
1765 case LSA_POLICY_INFO_QUOTA
:
1768 case LSA_POLICY_INFO_MOD
:
1771 case LSA_POLICY_INFO_AUDIT_FULL_SET
:
1774 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
:
1777 case LSA_POLICY_INFO_DNS
:
1778 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1781 case LSA_POLICY_INFO_DNS_INT
:
1782 NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr
, NDR_BUFFERS
, &r
->dns
));
1785 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
:
1786 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->l_account_domain
));
1790 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
1793 return NDR_ERR_SUCCESS
;
1796 _PUBLIC_
void ndr_print_lsa_PolicyInformation(struct ndr_print
*ndr
, const char *name
, const union lsa_PolicyInformation
*r
)
1799 level
= ndr_print_get_switch_value(ndr
, r
);
1800 ndr_print_union(ndr
, name
, level
, "lsa_PolicyInformation");
1802 case LSA_POLICY_INFO_AUDIT_LOG
:
1803 ndr_print_lsa_AuditLogInfo(ndr
, "audit_log", &r
->audit_log
);
1806 case LSA_POLICY_INFO_AUDIT_EVENTS
:
1807 ndr_print_lsa_AuditEventsInfo(ndr
, "audit_events", &r
->audit_events
);
1810 case LSA_POLICY_INFO_DOMAIN
:
1811 ndr_print_lsa_DomainInfo(ndr
, "domain", &r
->domain
);
1814 case LSA_POLICY_INFO_PD
:
1815 ndr_print_lsa_PDAccountInfo(ndr
, "pd", &r
->pd
);
1818 case LSA_POLICY_INFO_ACCOUNT_DOMAIN
:
1819 ndr_print_lsa_DomainInfo(ndr
, "account_domain", &r
->account_domain
);
1822 case LSA_POLICY_INFO_ROLE
:
1823 ndr_print_lsa_ServerRole(ndr
, "role", &r
->role
);
1826 case LSA_POLICY_INFO_REPLICA
:
1827 ndr_print_lsa_ReplicaSourceInfo(ndr
, "replica", &r
->replica
);
1830 case LSA_POLICY_INFO_QUOTA
:
1831 ndr_print_lsa_DefaultQuotaInfo(ndr
, "quota", &r
->quota
);
1834 case LSA_POLICY_INFO_MOD
:
1835 ndr_print_lsa_ModificationInfo(ndr
, "mod", &r
->mod
);
1838 case LSA_POLICY_INFO_AUDIT_FULL_SET
:
1839 ndr_print_lsa_AuditFullSetInfo(ndr
, "auditfullset", &r
->auditfullset
);
1842 case LSA_POLICY_INFO_AUDIT_FULL_QUERY
:
1843 ndr_print_lsa_AuditFullQueryInfo(ndr
, "auditfullquery", &r
->auditfullquery
);
1846 case LSA_POLICY_INFO_DNS
:
1847 ndr_print_lsa_DnsDomainInfo(ndr
, "dns", &r
->dns
);
1850 case LSA_POLICY_INFO_DNS_INT
:
1851 ndr_print_lsa_DnsDomainInfo(ndr
, "dns", &r
->dns
);
1854 case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
:
1855 ndr_print_lsa_DomainInfo(ndr
, "l_account_domain", &r
->l_account_domain
);
1859 ndr_print_bad_level(ndr
, name
, level
);
1863 static enum ndr_err_code
ndr_push_lsa_SidPtr(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_SidPtr
*r
)
1865 if (ndr_flags
& NDR_SCALARS
) {
1866 NDR_CHECK(ndr_push_align(ndr
, 5));
1867 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
1868 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1870 if (ndr_flags
& NDR_BUFFERS
) {
1872 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1875 return NDR_ERR_SUCCESS
;
1878 static enum ndr_err_code
ndr_pull_lsa_SidPtr(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_SidPtr
*r
)
1881 TALLOC_CTX
*_mem_save_sid_0
;
1882 if (ndr_flags
& NDR_SCALARS
) {
1883 NDR_CHECK(ndr_pull_align(ndr
, 5));
1884 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
1886 NDR_PULL_ALLOC(ndr
, r
->sid
);
1890 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1892 if (ndr_flags
& NDR_BUFFERS
) {
1894 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1895 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
1896 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
1897 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
1900 return NDR_ERR_SUCCESS
;
1903 _PUBLIC_
void ndr_print_lsa_SidPtr(struct ndr_print
*ndr
, const char *name
, const struct lsa_SidPtr
*r
)
1905 ndr_print_struct(ndr
, name
, "lsa_SidPtr");
1907 ndr_print_ptr(ndr
, "sid", r
->sid
);
1910 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
1916 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SidArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_SidArray
*r
)
1918 uint32_t cntr_sids_1
;
1919 if (ndr_flags
& NDR_SCALARS
) {
1920 NDR_CHECK(ndr_push_align(ndr
, 5));
1921 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_sids
));
1922 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
1923 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1925 if (ndr_flags
& NDR_BUFFERS
) {
1927 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_sids
));
1928 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
1929 NDR_CHECK(ndr_push_lsa_SidPtr(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
1931 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
1932 NDR_CHECK(ndr_push_lsa_SidPtr(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
1936 return NDR_ERR_SUCCESS
;
1939 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SidArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_SidArray
*r
)
1942 uint32_t cntr_sids_1
;
1943 TALLOC_CTX
*_mem_save_sids_0
;
1944 TALLOC_CTX
*_mem_save_sids_1
;
1945 if (ndr_flags
& NDR_SCALARS
) {
1946 NDR_CHECK(ndr_pull_align(ndr
, 5));
1947 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_sids
));
1948 if (r
->num_sids
> 20480) {
1949 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1951 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
1953 NDR_PULL_ALLOC(ndr
, r
->sids
);
1957 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1959 if (ndr_flags
& NDR_BUFFERS
) {
1961 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1962 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
1963 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
1964 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
1965 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1966 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
1967 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
1968 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
1970 for (cntr_sids_1
= 0; cntr_sids_1
< r
->num_sids
; cntr_sids_1
++) {
1971 NDR_CHECK(ndr_pull_lsa_SidPtr(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
1973 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
1974 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
1977 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->num_sids
));
1980 return NDR_ERR_SUCCESS
;
1983 _PUBLIC_
void ndr_print_lsa_SidArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_SidArray
*r
)
1985 uint32_t cntr_sids_1
;
1986 ndr_print_struct(ndr
, name
, "lsa_SidArray");
1988 ndr_print_uint32(ndr
, "num_sids", r
->num_sids
);
1989 ndr_print_ptr(ndr
, "sids", r
->sids
);
1992 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->num_sids
);
1994 for (cntr_sids_1
=0;cntr_sids_1
<r
->num_sids
;cntr_sids_1
++) {
1996 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
1997 ndr_print_lsa_SidPtr(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
2007 static enum ndr_err_code
ndr_push_lsa_DomainList(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainList
*r
)
2009 uint32_t cntr_domains_1
;
2010 if (ndr_flags
& NDR_SCALARS
) {
2011 NDR_CHECK(ndr_push_align(ndr
, 5));
2012 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2013 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domains
));
2014 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2016 if (ndr_flags
& NDR_BUFFERS
) {
2018 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
2019 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2020 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
2022 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2023 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
2027 return NDR_ERR_SUCCESS
;
2030 static enum ndr_err_code
ndr_pull_lsa_DomainList(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainList
*r
)
2032 uint32_t _ptr_domains
;
2033 uint32_t cntr_domains_1
;
2034 TALLOC_CTX
*_mem_save_domains_0
;
2035 TALLOC_CTX
*_mem_save_domains_1
;
2036 if (ndr_flags
& NDR_SCALARS
) {
2037 NDR_CHECK(ndr_pull_align(ndr
, 5));
2038 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2039 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
2041 NDR_PULL_ALLOC(ndr
, r
->domains
);
2045 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2047 if (ndr_flags
& NDR_BUFFERS
) {
2049 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2050 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
2051 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domains
));
2052 NDR_PULL_ALLOC_N(ndr
, r
->domains
, ndr_get_array_size(ndr
, &r
->domains
));
2053 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2054 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
2055 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2056 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
2058 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2059 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
2061 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
2062 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, 0);
2065 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->domains
, r
->count
));
2068 return NDR_ERR_SUCCESS
;
2071 _PUBLIC_
void ndr_print_lsa_DomainList(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainList
*r
)
2073 uint32_t cntr_domains_1
;
2074 ndr_print_struct(ndr
, name
, "lsa_DomainList");
2076 ndr_print_uint32(ndr
, "count", r
->count
);
2077 ndr_print_ptr(ndr
, "domains", r
->domains
);
2080 ndr
->print(ndr
, "%s: ARRAY(%d)", "domains", (int)r
->count
);
2082 for (cntr_domains_1
=0;cntr_domains_1
<r
->count
;cntr_domains_1
++) {
2084 if (asprintf(&idx_1
, "[%d]", cntr_domains_1
) != -1) {
2085 ndr_print_lsa_DomainInfo(ndr
, "domains", &r
->domains
[cntr_domains_1
]);
2095 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SidType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_SidType r
)
2097 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
2098 return NDR_ERR_SUCCESS
;
2101 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SidType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_SidType
*r
)
2104 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
2106 return NDR_ERR_SUCCESS
;
2109 _PUBLIC_
void ndr_print_lsa_SidType(struct ndr_print
*ndr
, const char *name
, enum lsa_SidType r
)
2111 const char *val
= NULL
;
2114 case SID_NAME_USE_NONE
: val
= "SID_NAME_USE_NONE"; break;
2115 case SID_NAME_USER
: val
= "SID_NAME_USER"; break;
2116 case SID_NAME_DOM_GRP
: val
= "SID_NAME_DOM_GRP"; break;
2117 case SID_NAME_DOMAIN
: val
= "SID_NAME_DOMAIN"; break;
2118 case SID_NAME_ALIAS
: val
= "SID_NAME_ALIAS"; break;
2119 case SID_NAME_WKN_GRP
: val
= "SID_NAME_WKN_GRP"; break;
2120 case SID_NAME_DELETED
: val
= "SID_NAME_DELETED"; break;
2121 case SID_NAME_INVALID
: val
= "SID_NAME_INVALID"; break;
2122 case SID_NAME_UNKNOWN
: val
= "SID_NAME_UNKNOWN"; break;
2123 case SID_NAME_COMPUTER
: val
= "SID_NAME_COMPUTER"; break;
2125 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2128 static enum ndr_err_code
ndr_push_lsa_TranslatedSid(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedSid
*r
)
2130 if (ndr_flags
& NDR_SCALARS
) {
2131 NDR_CHECK(ndr_push_align(ndr
, 4));
2132 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
2133 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
2134 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
2135 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2137 if (ndr_flags
& NDR_BUFFERS
) {
2139 return NDR_ERR_SUCCESS
;
2142 static enum ndr_err_code
ndr_pull_lsa_TranslatedSid(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedSid
*r
)
2144 if (ndr_flags
& NDR_SCALARS
) {
2145 NDR_CHECK(ndr_pull_align(ndr
, 4));
2146 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
2147 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
2148 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
2149 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2151 if (ndr_flags
& NDR_BUFFERS
) {
2153 return NDR_ERR_SUCCESS
;
2156 _PUBLIC_
void ndr_print_lsa_TranslatedSid(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedSid
*r
)
2158 ndr_print_struct(ndr
, name
, "lsa_TranslatedSid");
2160 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
2161 ndr_print_uint32(ndr
, "rid", r
->rid
);
2162 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
2166 static enum ndr_err_code
ndr_push_lsa_TransSidArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransSidArray
*r
)
2168 uint32_t cntr_sids_1
;
2169 if (ndr_flags
& NDR_SCALARS
) {
2170 NDR_CHECK(ndr_push_align(ndr
, 5));
2171 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2172 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
2173 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2175 if (ndr_flags
& NDR_BUFFERS
) {
2177 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
2178 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
2179 NDR_CHECK(ndr_push_lsa_TranslatedSid(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
2183 return NDR_ERR_SUCCESS
;
2186 static enum ndr_err_code
ndr_pull_lsa_TransSidArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransSidArray
*r
)
2189 uint32_t cntr_sids_1
;
2190 TALLOC_CTX
*_mem_save_sids_0
;
2191 TALLOC_CTX
*_mem_save_sids_1
;
2192 if (ndr_flags
& NDR_SCALARS
) {
2193 NDR_CHECK(ndr_pull_align(ndr
, 5));
2194 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2195 if (r
->count
> 1000) {
2196 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2198 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
2200 NDR_PULL_ALLOC(ndr
, r
->sids
);
2204 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2206 if (ndr_flags
& NDR_BUFFERS
) {
2208 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2209 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
2210 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
2211 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
2212 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2213 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
2214 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
2215 NDR_CHECK(ndr_pull_lsa_TranslatedSid(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
2217 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
2218 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
2221 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->count
));
2224 return NDR_ERR_SUCCESS
;
2227 _PUBLIC_
void ndr_print_lsa_TransSidArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransSidArray
*r
)
2229 uint32_t cntr_sids_1
;
2230 ndr_print_struct(ndr
, name
, "lsa_TransSidArray");
2232 ndr_print_uint32(ndr
, "count", r
->count
);
2233 ndr_print_ptr(ndr
, "sids", r
->sids
);
2236 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->count
);
2238 for (cntr_sids_1
=0;cntr_sids_1
<r
->count
;cntr_sids_1
++) {
2240 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
2241 ndr_print_lsa_TranslatedSid(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
2251 static enum ndr_err_code
ndr_push_lsa_RefDomainList(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_RefDomainList
*r
)
2253 uint32_t cntr_domains_1
;
2254 if (ndr_flags
& NDR_SCALARS
) {
2255 NDR_CHECK(ndr_push_align(ndr
, 5));
2256 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2257 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domains
));
2258 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_size
));
2259 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2261 if (ndr_flags
& NDR_BUFFERS
) {
2263 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
2264 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2265 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
2267 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2268 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
2272 return NDR_ERR_SUCCESS
;
2275 static enum ndr_err_code
ndr_pull_lsa_RefDomainList(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_RefDomainList
*r
)
2277 uint32_t _ptr_domains
;
2278 uint32_t cntr_domains_1
;
2279 TALLOC_CTX
*_mem_save_domains_0
;
2280 TALLOC_CTX
*_mem_save_domains_1
;
2281 if (ndr_flags
& NDR_SCALARS
) {
2282 NDR_CHECK(ndr_pull_align(ndr
, 5));
2283 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2284 if (r
->count
> 1000) {
2285 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2287 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
2289 NDR_PULL_ALLOC(ndr
, r
->domains
);
2293 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_size
));
2294 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2296 if (ndr_flags
& NDR_BUFFERS
) {
2298 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2299 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
2300 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domains
));
2301 NDR_PULL_ALLOC_N(ndr
, r
->domains
, ndr_get_array_size(ndr
, &r
->domains
));
2302 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2303 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
2304 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2305 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
2307 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
2308 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
2310 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
2311 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, 0);
2314 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->domains
, r
->count
));
2317 return NDR_ERR_SUCCESS
;
2320 _PUBLIC_
void ndr_print_lsa_RefDomainList(struct ndr_print
*ndr
, const char *name
, const struct lsa_RefDomainList
*r
)
2322 uint32_t cntr_domains_1
;
2323 ndr_print_struct(ndr
, name
, "lsa_RefDomainList");
2325 ndr_print_uint32(ndr
, "count", r
->count
);
2326 ndr_print_ptr(ndr
, "domains", r
->domains
);
2329 ndr
->print(ndr
, "%s: ARRAY(%d)", "domains", (int)r
->count
);
2331 for (cntr_domains_1
=0;cntr_domains_1
<r
->count
;cntr_domains_1
++) {
2333 if (asprintf(&idx_1
, "[%d]", cntr_domains_1
) != -1) {
2334 ndr_print_lsa_DomainInfo(ndr
, "domains", &r
->domains
[cntr_domains_1
]);
2341 ndr_print_uint32(ndr
, "max_size", r
->max_size
);
2345 static enum ndr_err_code
ndr_push_lsa_LookupNamesLevel(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_LookupNamesLevel r
)
2347 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
2348 return NDR_ERR_SUCCESS
;
2351 static enum ndr_err_code
ndr_pull_lsa_LookupNamesLevel(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_LookupNamesLevel
*r
)
2354 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
2356 return NDR_ERR_SUCCESS
;
2359 _PUBLIC_
void ndr_print_lsa_LookupNamesLevel(struct ndr_print
*ndr
, const char *name
, enum lsa_LookupNamesLevel r
)
2361 const char *val
= NULL
;
2364 case LSA_LOOKUP_NAMES_ALL
: val
= "LSA_LOOKUP_NAMES_ALL"; break;
2365 case LSA_LOOKUP_NAMES_DOMAINS_ONLY
: val
= "LSA_LOOKUP_NAMES_DOMAINS_ONLY"; break;
2366 case LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY
: val
= "LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY"; break;
2367 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY
: val
= "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY"; break;
2368 case LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY
: val
= "LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY"; break;
2369 case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2
: val
= "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2"; break;
2370 case LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC
: val
= "LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC"; break;
2372 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2375 static enum ndr_err_code
ndr_push_lsa_TranslatedName(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedName
*r
)
2377 if (ndr_flags
& NDR_SCALARS
) {
2378 NDR_CHECK(ndr_push_align(ndr
, 5));
2379 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
2380 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
2381 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
2382 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2384 if (ndr_flags
& NDR_BUFFERS
) {
2385 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
2387 return NDR_ERR_SUCCESS
;
2390 static enum ndr_err_code
ndr_pull_lsa_TranslatedName(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedName
*r
)
2392 if (ndr_flags
& NDR_SCALARS
) {
2393 NDR_CHECK(ndr_pull_align(ndr
, 5));
2394 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
2395 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
2396 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
2397 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2399 if (ndr_flags
& NDR_BUFFERS
) {
2400 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
2402 return NDR_ERR_SUCCESS
;
2405 _PUBLIC_
void ndr_print_lsa_TranslatedName(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedName
*r
)
2407 ndr_print_struct(ndr
, name
, "lsa_TranslatedName");
2409 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
2410 ndr_print_lsa_String(ndr
, "name", &r
->name
);
2411 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
2415 static enum ndr_err_code
ndr_push_lsa_TransNameArray(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransNameArray
*r
)
2417 uint32_t cntr_names_1
;
2418 if (ndr_flags
& NDR_SCALARS
) {
2419 NDR_CHECK(ndr_push_align(ndr
, 5));
2420 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2421 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
2422 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2424 if (ndr_flags
& NDR_BUFFERS
) {
2426 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
2427 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
2428 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
2430 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
2431 NDR_CHECK(ndr_push_lsa_TranslatedName(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
2435 return NDR_ERR_SUCCESS
;
2438 static enum ndr_err_code
ndr_pull_lsa_TransNameArray(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransNameArray
*r
)
2440 uint32_t _ptr_names
;
2441 uint32_t cntr_names_1
;
2442 TALLOC_CTX
*_mem_save_names_0
;
2443 TALLOC_CTX
*_mem_save_names_1
;
2444 if (ndr_flags
& NDR_SCALARS
) {
2445 NDR_CHECK(ndr_pull_align(ndr
, 5));
2446 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2447 if (r
->count
> 20480) {
2448 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2450 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
2452 NDR_PULL_ALLOC(ndr
, r
->names
);
2456 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2458 if (ndr_flags
& NDR_BUFFERS
) {
2460 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2461 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
2462 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
2463 NDR_PULL_ALLOC_N(ndr
, r
->names
, ndr_get_array_size(ndr
, &r
->names
));
2464 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2465 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
2466 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
2467 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
2469 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
2470 NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
2472 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
2473 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
2476 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
2479 return NDR_ERR_SUCCESS
;
2482 _PUBLIC_
void ndr_print_lsa_TransNameArray(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransNameArray
*r
)
2484 uint32_t cntr_names_1
;
2485 ndr_print_struct(ndr
, name
, "lsa_TransNameArray");
2487 ndr_print_uint32(ndr
, "count", r
->count
);
2488 ndr_print_ptr(ndr
, "names", r
->names
);
2491 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
2493 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
2495 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
2496 ndr_print_lsa_TranslatedName(ndr
, "names", &r
->names
[cntr_names_1
]);
2506 static enum ndr_err_code
ndr_push_lsa_LUIDAttribute(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_LUIDAttribute
*r
)
2508 if (ndr_flags
& NDR_SCALARS
) {
2509 NDR_CHECK(ndr_push_align(ndr
, 4));
2510 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, &r
->luid
));
2511 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->attribute
));
2512 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2514 if (ndr_flags
& NDR_BUFFERS
) {
2516 return NDR_ERR_SUCCESS
;
2519 static enum ndr_err_code
ndr_pull_lsa_LUIDAttribute(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_LUIDAttribute
*r
)
2521 if (ndr_flags
& NDR_SCALARS
) {
2522 NDR_CHECK(ndr_pull_align(ndr
, 4));
2523 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, &r
->luid
));
2524 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->attribute
));
2525 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2527 if (ndr_flags
& NDR_BUFFERS
) {
2529 return NDR_ERR_SUCCESS
;
2532 _PUBLIC_
void ndr_print_lsa_LUIDAttribute(struct ndr_print
*ndr
, const char *name
, const struct lsa_LUIDAttribute
*r
)
2534 ndr_print_struct(ndr
, name
, "lsa_LUIDAttribute");
2536 ndr_print_lsa_LUID(ndr
, "luid", &r
->luid
);
2537 ndr_print_uint32(ndr
, "attribute", r
->attribute
);
2541 static enum ndr_err_code
ndr_push_lsa_PrivilegeSet(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_PrivilegeSet
*r
)
2543 uint32_t cntr_set_0
;
2544 if (ndr_flags
& NDR_SCALARS
) {
2545 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
2546 NDR_CHECK(ndr_push_align(ndr
, 4));
2547 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
2548 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
2549 for (cntr_set_0
= 0; cntr_set_0
< r
->count
; cntr_set_0
++) {
2550 NDR_CHECK(ndr_push_lsa_LUIDAttribute(ndr
, NDR_SCALARS
, &r
->set
[cntr_set_0
]));
2552 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2554 if (ndr_flags
& NDR_BUFFERS
) {
2556 return NDR_ERR_SUCCESS
;
2559 static enum ndr_err_code
ndr_pull_lsa_PrivilegeSet(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_PrivilegeSet
*r
)
2561 uint32_t cntr_set_0
;
2562 TALLOC_CTX
*_mem_save_set_0
;
2563 if (ndr_flags
& NDR_SCALARS
) {
2564 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->set
));
2565 NDR_CHECK(ndr_pull_align(ndr
, 4));
2566 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
2567 if (r
->count
> 1000) {
2568 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2570 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
2571 NDR_PULL_ALLOC_N(ndr
, r
->set
, ndr_get_array_size(ndr
, &r
->set
));
2572 _mem_save_set_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2573 NDR_PULL_SET_MEM_CTX(ndr
, r
->set
, 0);
2574 for (cntr_set_0
= 0; cntr_set_0
< r
->count
; cntr_set_0
++) {
2575 NDR_CHECK(ndr_pull_lsa_LUIDAttribute(ndr
, NDR_SCALARS
, &r
->set
[cntr_set_0
]));
2577 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_set_0
, 0);
2579 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->set
, r
->count
));
2581 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2583 if (ndr_flags
& NDR_BUFFERS
) {
2585 return NDR_ERR_SUCCESS
;
2588 _PUBLIC_
void ndr_print_lsa_PrivilegeSet(struct ndr_print
*ndr
, const char *name
, const struct lsa_PrivilegeSet
*r
)
2590 uint32_t cntr_set_0
;
2591 ndr_print_struct(ndr
, name
, "lsa_PrivilegeSet");
2593 ndr_print_uint32(ndr
, "count", r
->count
);
2594 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
2595 ndr
->print(ndr
, "%s: ARRAY(%d)", "set", (int)r
->count
);
2597 for (cntr_set_0
=0;cntr_set_0
<r
->count
;cntr_set_0
++) {
2599 if (asprintf(&idx_0
, "[%d]", cntr_set_0
) != -1) {
2600 ndr_print_lsa_LUIDAttribute(ndr
, "set", &r
->set
[cntr_set_0
]);
2608 static enum ndr_err_code
ndr_push_lsa_DATA_BUF(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DATA_BUF
*r
)
2611 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2612 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2613 if (ndr_flags
& NDR_SCALARS
) {
2614 NDR_CHECK(ndr_push_align(ndr
, 5));
2615 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
2616 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2617 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
2618 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2620 if (ndr_flags
& NDR_BUFFERS
) {
2622 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->size
));
2623 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
2624 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->length
));
2625 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
2628 ndr
->flags
= _flags_save_STRUCT
;
2630 return NDR_ERR_SUCCESS
;
2633 static enum ndr_err_code
ndr_pull_lsa_DATA_BUF(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DATA_BUF
*r
)
2636 TALLOC_CTX
*_mem_save_data_0
;
2638 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2639 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2640 if (ndr_flags
& NDR_SCALARS
) {
2641 NDR_CHECK(ndr_pull_align(ndr
, 5));
2642 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
2643 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
2644 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
2646 NDR_PULL_ALLOC(ndr
, r
->data
);
2650 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2652 if (ndr_flags
& NDR_BUFFERS
) {
2654 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2655 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
2656 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
2657 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data
));
2658 if (ndr_get_array_length(ndr
, &r
->data
) > ndr_get_array_size(ndr
, &r
->data
)) {
2659 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->data
), ndr_get_array_length(ndr
, &r
->data
));
2661 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
2662 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_length(ndr
, &r
->data
)));
2663 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
2666 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->size
));
2669 NDR_CHECK(ndr_check_array_length(ndr
, (void*)&r
->data
, r
->length
));
2672 ndr
->flags
= _flags_save_STRUCT
;
2674 return NDR_ERR_SUCCESS
;
2677 _PUBLIC_
void ndr_print_lsa_DATA_BUF(struct ndr_print
*ndr
, const char *name
, const struct lsa_DATA_BUF
*r
)
2679 ndr_print_struct(ndr
, name
, "lsa_DATA_BUF");
2681 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2682 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2684 ndr_print_uint32(ndr
, "length", r
->length
);
2685 ndr_print_uint32(ndr
, "size", r
->size
);
2686 ndr_print_ptr(ndr
, "data", r
->data
);
2689 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
2693 ndr
->flags
= _flags_save_STRUCT
;
2697 static enum ndr_err_code
ndr_push_lsa_DATA_BUF2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DATA_BUF2
*r
)
2700 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2701 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2702 if (ndr_flags
& NDR_SCALARS
) {
2703 NDR_CHECK(ndr_push_align(ndr
, 5));
2704 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
2705 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
2706 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2708 if (ndr_flags
& NDR_BUFFERS
) {
2710 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->size
));
2711 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->size
));
2714 ndr
->flags
= _flags_save_STRUCT
;
2716 return NDR_ERR_SUCCESS
;
2719 static enum ndr_err_code
ndr_pull_lsa_DATA_BUF2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DATA_BUF2
*r
)
2722 TALLOC_CTX
*_mem_save_data_0
;
2724 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2725 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2726 if (ndr_flags
& NDR_SCALARS
) {
2727 NDR_CHECK(ndr_pull_align(ndr
, 5));
2728 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
2729 if (r
->size
> 65536) {
2730 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2732 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
2734 NDR_PULL_ALLOC(ndr
, r
->data
);
2738 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2740 if (ndr_flags
& NDR_BUFFERS
) {
2742 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2743 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
2744 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
2745 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
2746 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_size(ndr
, &r
->data
)));
2747 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
2750 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->size
));
2753 ndr
->flags
= _flags_save_STRUCT
;
2755 return NDR_ERR_SUCCESS
;
2758 _PUBLIC_
void ndr_print_lsa_DATA_BUF2(struct ndr_print
*ndr
, const char *name
, const struct lsa_DATA_BUF2
*r
)
2760 ndr_print_struct(ndr
, name
, "lsa_DATA_BUF2");
2762 uint32_t _flags_save_STRUCT
= ndr
->flags
;
2763 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
2765 ndr_print_uint32(ndr
, "size", r
->size
);
2766 ndr_print_ptr(ndr
, "data", r
->data
);
2769 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->size
);
2773 ndr
->flags
= _flags_save_STRUCT
;
2777 static enum ndr_err_code
ndr_push_lsa_TrustDomInfoEnum(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_TrustDomInfoEnum r
)
2779 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
2780 return NDR_ERR_SUCCESS
;
2783 static enum ndr_err_code
ndr_pull_lsa_TrustDomInfoEnum(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_TrustDomInfoEnum
*r
)
2786 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
2788 return NDR_ERR_SUCCESS
;
2791 _PUBLIC_
void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print
*ndr
, const char *name
, enum lsa_TrustDomInfoEnum r
)
2793 const char *val
= NULL
;
2796 case LSA_TRUSTED_DOMAIN_INFO_NAME
: val
= "LSA_TRUSTED_DOMAIN_INFO_NAME"; break;
2797 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
: val
= "LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS"; break;
2798 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
: val
= "LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET"; break;
2799 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
: val
= "LSA_TRUSTED_DOMAIN_INFO_PASSWORD"; break;
2800 case LSA_TRUSTED_DOMAIN_INFO_BASIC
: val
= "LSA_TRUSTED_DOMAIN_INFO_BASIC"; break;
2801 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
: val
= "LSA_TRUSTED_DOMAIN_INFO_INFO_EX"; break;
2802 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
: val
= "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO"; break;
2803 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
: val
= "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO"; break;
2804 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL"; break;
2805 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL"; break;
2806 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL"; break;
2807 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
: val
= "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL"; break;
2808 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES
: val
= "LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES"; break;
2810 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2813 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustDirection(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2815 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2816 return NDR_ERR_SUCCESS
;
2819 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustDirection(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2822 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2824 return NDR_ERR_SUCCESS
;
2827 _PUBLIC_
void ndr_print_lsa_TrustDirection(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2829 ndr_print_uint32(ndr
, name
, r
);
2831 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_DIRECTION_INBOUND", LSA_TRUST_DIRECTION_INBOUND
, r
);
2832 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_DIRECTION_OUTBOUND", LSA_TRUST_DIRECTION_OUTBOUND
, r
);
2836 static enum ndr_err_code
ndr_push_lsa_TrustType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_TrustType r
)
2838 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
2839 return NDR_ERR_SUCCESS
;
2842 static enum ndr_err_code
ndr_pull_lsa_TrustType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_TrustType
*r
)
2845 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
2847 return NDR_ERR_SUCCESS
;
2850 _PUBLIC_
void ndr_print_lsa_TrustType(struct ndr_print
*ndr
, const char *name
, enum lsa_TrustType r
)
2852 const char *val
= NULL
;
2855 case LSA_TRUST_TYPE_DOWNLEVEL
: val
= "LSA_TRUST_TYPE_DOWNLEVEL"; break;
2856 case LSA_TRUST_TYPE_UPLEVEL
: val
= "LSA_TRUST_TYPE_UPLEVEL"; break;
2857 case LSA_TRUST_TYPE_MIT
: val
= "LSA_TRUST_TYPE_MIT"; break;
2859 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
2862 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustAttributes(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2864 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2865 return NDR_ERR_SUCCESS
;
2868 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustAttributes(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2871 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2873 return NDR_ERR_SUCCESS
;
2876 _PUBLIC_
void ndr_print_lsa_TrustAttributes(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2878 ndr_print_uint32(ndr
, name
, r
);
2880 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE", LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE
, r
);
2881 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY", LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY
, r
);
2882 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN", LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN
, r
);
2883 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE", LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE
, r
);
2884 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION", LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION
, r
);
2885 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_WITHIN_FOREST", LSA_TRUST_ATTRIBUTE_WITHIN_FOREST
, r
);
2886 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL", LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL
, r
);
2887 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION", LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION
, r
);
2891 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoName(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoName
*r
)
2893 if (ndr_flags
& NDR_SCALARS
) {
2894 NDR_CHECK(ndr_push_align(ndr
, 5));
2895 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
2896 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2898 if (ndr_flags
& NDR_BUFFERS
) {
2899 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
2901 return NDR_ERR_SUCCESS
;
2904 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoName(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoName
*r
)
2906 if (ndr_flags
& NDR_SCALARS
) {
2907 NDR_CHECK(ndr_pull_align(ndr
, 5));
2908 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
2909 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2911 if (ndr_flags
& NDR_BUFFERS
) {
2912 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
2914 return NDR_ERR_SUCCESS
;
2917 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoName(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoName
*r
)
2919 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoName");
2921 ndr_print_lsa_StringLarge(ndr
, "netbios_name", &r
->netbios_name
);
2925 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoControllers(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoControllers
*r
)
2927 uint32_t cntr_netbios_names_1
;
2928 if (ndr_flags
& NDR_SCALARS
) {
2929 NDR_CHECK(ndr_push_align(ndr
, 5));
2930 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->entries
));
2931 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->netbios_names
));
2932 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2934 if (ndr_flags
& NDR_BUFFERS
) {
2935 if (r
->netbios_names
) {
2936 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->entries
));
2937 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< r
->entries
; cntr_netbios_names_1
++) {
2938 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2940 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< r
->entries
; cntr_netbios_names_1
++) {
2941 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2945 return NDR_ERR_SUCCESS
;
2948 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoControllers(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoControllers
*r
)
2950 uint32_t _ptr_netbios_names
;
2951 uint32_t cntr_netbios_names_1
;
2952 TALLOC_CTX
*_mem_save_netbios_names_0
;
2953 TALLOC_CTX
*_mem_save_netbios_names_1
;
2954 if (ndr_flags
& NDR_SCALARS
) {
2955 NDR_CHECK(ndr_pull_align(ndr
, 5));
2956 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->entries
));
2957 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_netbios_names
));
2958 if (_ptr_netbios_names
) {
2959 NDR_PULL_ALLOC(ndr
, r
->netbios_names
);
2961 r
->netbios_names
= NULL
;
2963 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2965 if (ndr_flags
& NDR_BUFFERS
) {
2966 if (r
->netbios_names
) {
2967 _mem_save_netbios_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2968 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_names
, 0);
2969 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->netbios_names
));
2970 NDR_PULL_ALLOC_N(ndr
, r
->netbios_names
, ndr_get_array_size(ndr
, &r
->netbios_names
));
2971 _mem_save_netbios_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
2972 NDR_PULL_SET_MEM_CTX(ndr
, r
->netbios_names
, 0);
2973 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< r
->entries
; cntr_netbios_names_1
++) {
2974 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2976 for (cntr_netbios_names_1
= 0; cntr_netbios_names_1
< r
->entries
; cntr_netbios_names_1
++) {
2977 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_names
[cntr_netbios_names_1
]));
2979 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_names_1
, 0);
2980 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_netbios_names_0
, 0);
2982 if (r
->netbios_names
) {
2983 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->netbios_names
, r
->entries
));
2986 return NDR_ERR_SUCCESS
;
2989 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoControllers(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoControllers
*r
)
2991 uint32_t cntr_netbios_names_1
;
2992 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoControllers");
2994 ndr_print_uint32(ndr
, "entries", r
->entries
);
2995 ndr_print_ptr(ndr
, "netbios_names", r
->netbios_names
);
2997 if (r
->netbios_names
) {
2998 ndr
->print(ndr
, "%s: ARRAY(%d)", "netbios_names", (int)r
->entries
);
3000 for (cntr_netbios_names_1
=0;cntr_netbios_names_1
<r
->entries
;cntr_netbios_names_1
++) {
3002 if (asprintf(&idx_1
, "[%d]", cntr_netbios_names_1
) != -1) {
3003 ndr_print_lsa_StringLarge(ndr
, "netbios_names", &r
->netbios_names
[cntr_netbios_names_1
]);
3013 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoPosixOffset
*r
)
3015 if (ndr_flags
& NDR_SCALARS
) {
3016 NDR_CHECK(ndr_push_align(ndr
, 4));
3017 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->posix_offset
));
3018 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
3020 if (ndr_flags
& NDR_BUFFERS
) {
3022 return NDR_ERR_SUCCESS
;
3025 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoPosixOffset(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoPosixOffset
*r
)
3027 if (ndr_flags
& NDR_SCALARS
) {
3028 NDR_CHECK(ndr_pull_align(ndr
, 4));
3029 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3030 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
3032 if (ndr_flags
& NDR_BUFFERS
) {
3034 return NDR_ERR_SUCCESS
;
3037 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoPosixOffset
*r
)
3039 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoPosixOffset");
3041 ndr_print_uint32(ndr
, "posix_offset", r
->posix_offset
);
3045 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoPassword(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoPassword
*r
)
3047 if (ndr_flags
& NDR_SCALARS
) {
3048 NDR_CHECK(ndr_push_align(ndr
, 5));
3049 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->password
));
3050 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->old_password
));
3051 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3053 if (ndr_flags
& NDR_BUFFERS
) {
3055 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->password
));
3057 if (r
->old_password
) {
3058 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->old_password
));
3061 return NDR_ERR_SUCCESS
;
3064 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoPassword(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoPassword
*r
)
3066 uint32_t _ptr_password
;
3067 TALLOC_CTX
*_mem_save_password_0
;
3068 uint32_t _ptr_old_password
;
3069 TALLOC_CTX
*_mem_save_old_password_0
;
3070 if (ndr_flags
& NDR_SCALARS
) {
3071 NDR_CHECK(ndr_pull_align(ndr
, 5));
3072 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
3073 if (_ptr_password
) {
3074 NDR_PULL_ALLOC(ndr
, r
->password
);
3078 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_password
));
3079 if (_ptr_old_password
) {
3080 NDR_PULL_ALLOC(ndr
, r
->old_password
);
3082 r
->old_password
= NULL
;
3084 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3086 if (ndr_flags
& NDR_BUFFERS
) {
3088 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3089 NDR_PULL_SET_MEM_CTX(ndr
, r
->password
, 0);
3090 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->password
));
3091 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
3093 if (r
->old_password
) {
3094 _mem_save_old_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3095 NDR_PULL_SET_MEM_CTX(ndr
, r
->old_password
, 0);
3096 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->old_password
));
3097 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_password_0
, 0);
3100 return NDR_ERR_SUCCESS
;
3103 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoPassword
*r
)
3105 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoPassword");
3107 ndr_print_ptr(ndr
, "password", r
->password
);
3110 ndr_print_lsa_DATA_BUF(ndr
, "password", r
->password
);
3113 ndr_print_ptr(ndr
, "old_password", r
->old_password
);
3115 if (r
->old_password
) {
3116 ndr_print_lsa_DATA_BUF(ndr
, "old_password", r
->old_password
);
3122 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoBasic(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoBasic
*r
)
3124 if (ndr_flags
& NDR_SCALARS
) {
3125 NDR_CHECK(ndr_push_align(ndr
, 5));
3126 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->netbios_name
));
3127 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
3128 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3130 if (ndr_flags
& NDR_BUFFERS
) {
3131 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3133 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3136 return NDR_ERR_SUCCESS
;
3139 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoBasic(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoBasic
*r
)
3142 TALLOC_CTX
*_mem_save_sid_0
;
3143 if (ndr_flags
& NDR_SCALARS
) {
3144 NDR_CHECK(ndr_pull_align(ndr
, 5));
3145 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->netbios_name
));
3146 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
3148 NDR_PULL_ALLOC(ndr
, r
->sid
);
3152 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3154 if (ndr_flags
& NDR_BUFFERS
) {
3155 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3157 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3158 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
3159 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3160 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
3163 return NDR_ERR_SUCCESS
;
3166 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoBasic
*r
)
3168 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoBasic");
3170 ndr_print_lsa_String(ndr
, "netbios_name", &r
->netbios_name
);
3171 ndr_print_ptr(ndr
, "sid", r
->sid
);
3174 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
3180 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoInfoEx
*r
)
3182 if (ndr_flags
& NDR_SCALARS
) {
3183 NDR_CHECK(ndr_push_align(ndr
, 5));
3184 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->domain_name
));
3185 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
3186 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
3187 NDR_CHECK(ndr_push_lsa_TrustDirection(ndr
, NDR_SCALARS
, r
->trust_direction
));
3188 NDR_CHECK(ndr_push_lsa_TrustType(ndr
, NDR_SCALARS
, r
->trust_type
));
3189 NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr
, NDR_SCALARS
, r
->trust_attributes
));
3190 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3192 if (ndr_flags
& NDR_BUFFERS
) {
3193 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->domain_name
));
3194 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3196 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3199 return NDR_ERR_SUCCESS
;
3202 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoInfoEx
*r
)
3205 TALLOC_CTX
*_mem_save_sid_0
;
3206 if (ndr_flags
& NDR_SCALARS
) {
3207 NDR_CHECK(ndr_pull_align(ndr
, 5));
3208 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->domain_name
));
3209 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_name
));
3210 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
3212 NDR_PULL_ALLOC(ndr
, r
->sid
);
3216 NDR_CHECK(ndr_pull_lsa_TrustDirection(ndr
, NDR_SCALARS
, &r
->trust_direction
));
3217 NDR_CHECK(ndr_pull_lsa_TrustType(ndr
, NDR_SCALARS
, &r
->trust_type
));
3218 NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr
, NDR_SCALARS
, &r
->trust_attributes
));
3219 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3221 if (ndr_flags
& NDR_BUFFERS
) {
3222 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->domain_name
));
3223 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_name
));
3225 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3226 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
3227 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
3228 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
3231 return NDR_ERR_SUCCESS
;
3234 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoInfoEx
*r
)
3236 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoInfoEx");
3238 ndr_print_lsa_StringLarge(ndr
, "domain_name", &r
->domain_name
);
3239 ndr_print_lsa_StringLarge(ndr
, "netbios_name", &r
->netbios_name
);
3240 ndr_print_ptr(ndr
, "sid", r
->sid
);
3243 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
3246 ndr_print_lsa_TrustDirection(ndr
, "trust_direction", r
->trust_direction
);
3247 ndr_print_lsa_TrustType(ndr
, "trust_type", r
->trust_type
);
3248 ndr_print_lsa_TrustAttributes(ndr
, "trust_attributes", r
->trust_attributes
);
3252 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_TrustAuthType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_TrustAuthType r
)
3254 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
3255 return NDR_ERR_SUCCESS
;
3258 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_TrustAuthType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_TrustAuthType
*r
)
3261 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
3263 return NDR_ERR_SUCCESS
;
3266 _PUBLIC_
void ndr_print_lsa_TrustAuthType(struct ndr_print
*ndr
, const char *name
, enum lsa_TrustAuthType r
)
3268 const char *val
= NULL
;
3271 case TRUST_AUTH_TYPE_NONE
: val
= "TRUST_AUTH_TYPE_NONE"; break;
3272 case TRUST_AUTH_TYPE_NT4OWF
: val
= "TRUST_AUTH_TYPE_NT4OWF"; break;
3273 case TRUST_AUTH_TYPE_CLEAR
: val
= "TRUST_AUTH_TYPE_CLEAR"; break;
3274 case TRUST_AUTH_TYPE_VERSION
: val
= "TRUST_AUTH_TYPE_VERSION"; break;
3276 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
3279 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoBuffer
*r
)
3281 if (ndr_flags
& NDR_SCALARS
) {
3282 NDR_CHECK(ndr_push_align(ndr
, 8));
3283 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->last_update_time
));
3284 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr
, NDR_SCALARS
, r
->AuthType
));
3285 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->data
));
3286 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
3288 if (ndr_flags
& NDR_BUFFERS
) {
3289 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->data
));
3291 return NDR_ERR_SUCCESS
;
3294 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoBuffer
*r
)
3296 if (ndr_flags
& NDR_SCALARS
) {
3297 NDR_CHECK(ndr_pull_align(ndr
, 8));
3298 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, &r
->last_update_time
));
3299 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr
, NDR_SCALARS
, &r
->AuthType
));
3300 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->data
));
3301 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
3303 if (ndr_flags
& NDR_BUFFERS
) {
3304 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->data
));
3306 return NDR_ERR_SUCCESS
;
3309 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoBuffer
*r
)
3311 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoBuffer");
3313 ndr_print_NTTIME_hyper(ndr
, "last_update_time", r
->last_update_time
);
3314 ndr_print_lsa_TrustAuthType(ndr
, "AuthType", r
->AuthType
);
3315 ndr_print_lsa_DATA_BUF2(ndr
, "data", &r
->data
);
3319 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoAuthInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoAuthInfo
*r
)
3321 if (ndr_flags
& NDR_SCALARS
) {
3322 NDR_CHECK(ndr_push_align(ndr
, 5));
3323 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->incoming_count
));
3324 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->incoming_current_auth_info
));
3325 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->incoming_previous_auth_info
));
3326 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->outgoing_count
));
3327 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->outgoing_current_auth_info
));
3328 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->outgoing_previous_auth_info
));
3329 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3331 if (ndr_flags
& NDR_BUFFERS
) {
3332 if (r
->incoming_current_auth_info
) {
3333 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_current_auth_info
));
3335 if (r
->incoming_previous_auth_info
) {
3336 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_previous_auth_info
));
3338 if (r
->outgoing_current_auth_info
) {
3339 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_current_auth_info
));
3341 if (r
->outgoing_previous_auth_info
) {
3342 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_previous_auth_info
));
3345 return NDR_ERR_SUCCESS
;
3348 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoAuthInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoAuthInfo
*r
)
3350 uint32_t _ptr_incoming_current_auth_info
;
3351 TALLOC_CTX
*_mem_save_incoming_current_auth_info_0
;
3352 uint32_t _ptr_incoming_previous_auth_info
;
3353 TALLOC_CTX
*_mem_save_incoming_previous_auth_info_0
;
3354 uint32_t _ptr_outgoing_current_auth_info
;
3355 TALLOC_CTX
*_mem_save_outgoing_current_auth_info_0
;
3356 uint32_t _ptr_outgoing_previous_auth_info
;
3357 TALLOC_CTX
*_mem_save_outgoing_previous_auth_info_0
;
3358 if (ndr_flags
& NDR_SCALARS
) {
3359 NDR_CHECK(ndr_pull_align(ndr
, 5));
3360 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->incoming_count
));
3361 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_incoming_current_auth_info
));
3362 if (_ptr_incoming_current_auth_info
) {
3363 NDR_PULL_ALLOC(ndr
, r
->incoming_current_auth_info
);
3365 r
->incoming_current_auth_info
= NULL
;
3367 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_incoming_previous_auth_info
));
3368 if (_ptr_incoming_previous_auth_info
) {
3369 NDR_PULL_ALLOC(ndr
, r
->incoming_previous_auth_info
);
3371 r
->incoming_previous_auth_info
= NULL
;
3373 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->outgoing_count
));
3374 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_outgoing_current_auth_info
));
3375 if (_ptr_outgoing_current_auth_info
) {
3376 NDR_PULL_ALLOC(ndr
, r
->outgoing_current_auth_info
);
3378 r
->outgoing_current_auth_info
= NULL
;
3380 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_outgoing_previous_auth_info
));
3381 if (_ptr_outgoing_previous_auth_info
) {
3382 NDR_PULL_ALLOC(ndr
, r
->outgoing_previous_auth_info
);
3384 r
->outgoing_previous_auth_info
= NULL
;
3386 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3388 if (ndr_flags
& NDR_BUFFERS
) {
3389 if (r
->incoming_current_auth_info
) {
3390 _mem_save_incoming_current_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3391 NDR_PULL_SET_MEM_CTX(ndr
, r
->incoming_current_auth_info
, 0);
3392 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_current_auth_info
));
3393 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_incoming_current_auth_info_0
, 0);
3395 if (r
->incoming_previous_auth_info
) {
3396 _mem_save_incoming_previous_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3397 NDR_PULL_SET_MEM_CTX(ndr
, r
->incoming_previous_auth_info
, 0);
3398 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->incoming_previous_auth_info
));
3399 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_incoming_previous_auth_info_0
, 0);
3401 if (r
->outgoing_current_auth_info
) {
3402 _mem_save_outgoing_current_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3403 NDR_PULL_SET_MEM_CTX(ndr
, r
->outgoing_current_auth_info
, 0);
3404 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_current_auth_info
));
3405 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_outgoing_current_auth_info_0
, 0);
3407 if (r
->outgoing_previous_auth_info
) {
3408 _mem_save_outgoing_previous_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3409 NDR_PULL_SET_MEM_CTX(ndr
, r
->outgoing_previous_auth_info
, 0);
3410 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->outgoing_previous_auth_info
));
3411 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_outgoing_previous_auth_info_0
, 0);
3414 return NDR_ERR_SUCCESS
;
3417 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoAuthInfo
*r
)
3419 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoAuthInfo");
3421 ndr_print_uint32(ndr
, "incoming_count", r
->incoming_count
);
3422 ndr_print_ptr(ndr
, "incoming_current_auth_info", r
->incoming_current_auth_info
);
3424 if (r
->incoming_current_auth_info
) {
3425 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "incoming_current_auth_info", r
->incoming_current_auth_info
);
3428 ndr_print_ptr(ndr
, "incoming_previous_auth_info", r
->incoming_previous_auth_info
);
3430 if (r
->incoming_previous_auth_info
) {
3431 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "incoming_previous_auth_info", r
->incoming_previous_auth_info
);
3434 ndr_print_uint32(ndr
, "outgoing_count", r
->outgoing_count
);
3435 ndr_print_ptr(ndr
, "outgoing_current_auth_info", r
->outgoing_current_auth_info
);
3437 if (r
->outgoing_current_auth_info
) {
3438 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "outgoing_current_auth_info", r
->outgoing_current_auth_info
);
3441 ndr_print_ptr(ndr
, "outgoing_previous_auth_info", r
->outgoing_previous_auth_info
);
3443 if (r
->outgoing_previous_auth_info
) {
3444 ndr_print_lsa_TrustDomainInfoBuffer(ndr
, "outgoing_previous_auth_info", r
->outgoing_previous_auth_info
);
3450 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoFullInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoFullInfo
*r
)
3452 if (ndr_flags
& NDR_SCALARS
) {
3453 NDR_CHECK(ndr_push_align(ndr
, 5));
3454 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3455 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3456 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3457 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3459 if (ndr_flags
& NDR_BUFFERS
) {
3460 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3461 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3463 return NDR_ERR_SUCCESS
;
3466 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoFullInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoFullInfo
*r
)
3468 if (ndr_flags
& NDR_SCALARS
) {
3469 NDR_CHECK(ndr_pull_align(ndr
, 5));
3470 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3471 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3472 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3473 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3475 if (ndr_flags
& NDR_BUFFERS
) {
3476 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3477 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3479 return NDR_ERR_SUCCESS
;
3482 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoFullInfo
*r
)
3484 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoFullInfo");
3486 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3487 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3488 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr
, "auth_info", &r
->auth_info
);
3492 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoAuthInfoInternal
*r
)
3494 if (ndr_flags
& NDR_SCALARS
) {
3495 NDR_CHECK(ndr_push_align(ndr
, 5));
3496 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->auth_blob
));
3497 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3499 if (ndr_flags
& NDR_BUFFERS
) {
3500 NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->auth_blob
));
3502 return NDR_ERR_SUCCESS
;
3505 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoAuthInfoInternal
*r
)
3507 if (ndr_flags
& NDR_SCALARS
) {
3508 NDR_CHECK(ndr_pull_align(ndr
, 5));
3509 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_SCALARS
, &r
->auth_blob
));
3510 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3512 if (ndr_flags
& NDR_BUFFERS
) {
3513 NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr
, NDR_BUFFERS
, &r
->auth_blob
));
3515 return NDR_ERR_SUCCESS
;
3518 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoAuthInfoInternal
*r
)
3520 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoAuthInfoInternal");
3522 ndr_print_lsa_DATA_BUF2(ndr
, "auth_blob", &r
->auth_blob
);
3526 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoFullInfoInternal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoFullInfoInternal
*r
)
3528 if (ndr_flags
& NDR_SCALARS
) {
3529 NDR_CHECK(ndr_push_align(ndr
, 5));
3530 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3531 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3532 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info
));
3533 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3535 if (ndr_flags
& NDR_BUFFERS
) {
3536 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3537 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3539 return NDR_ERR_SUCCESS
;
3542 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoFullInfoInternal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoFullInfoInternal
*r
)
3544 if (ndr_flags
& NDR_SCALARS
) {
3545 NDR_CHECK(ndr_pull_align(ndr
, 5));
3546 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3547 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3548 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info
));
3549 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3551 if (ndr_flags
& NDR_BUFFERS
) {
3552 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3553 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3555 return NDR_ERR_SUCCESS
;
3558 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoFullInfoInternal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoFullInfoInternal
*r
)
3560 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoFullInfoInternal");
3562 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3563 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3564 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info", &r
->auth_info
);
3568 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoInfoEx2Internal
*r
)
3570 if (ndr_flags
& NDR_SCALARS
) {
3571 NDR_CHECK(ndr_push_align(ndr
, 5));
3572 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3573 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->forest_trust_length
));
3574 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->forest_trust_data
));
3575 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3577 if (ndr_flags
& NDR_BUFFERS
) {
3578 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3579 if (r
->forest_trust_data
) {
3580 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->forest_trust_length
));
3581 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->forest_trust_data
, r
->forest_trust_length
));
3584 return NDR_ERR_SUCCESS
;
3587 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoInfoEx2Internal
*r
)
3589 uint32_t _ptr_forest_trust_data
;
3590 TALLOC_CTX
*_mem_save_forest_trust_data_0
;
3591 if (ndr_flags
& NDR_SCALARS
) {
3592 NDR_CHECK(ndr_pull_align(ndr
, 5));
3593 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3594 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->forest_trust_length
));
3595 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_forest_trust_data
));
3596 if (_ptr_forest_trust_data
) {
3597 NDR_PULL_ALLOC(ndr
, r
->forest_trust_data
);
3599 r
->forest_trust_data
= NULL
;
3601 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3603 if (ndr_flags
& NDR_BUFFERS
) {
3604 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3605 if (r
->forest_trust_data
) {
3606 _mem_save_forest_trust_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3607 NDR_PULL_SET_MEM_CTX(ndr
, r
->forest_trust_data
, 0);
3608 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->forest_trust_data
));
3609 NDR_PULL_ALLOC_N(ndr
, r
->forest_trust_data
, ndr_get_array_size(ndr
, &r
->forest_trust_data
));
3610 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->forest_trust_data
, ndr_get_array_size(ndr
, &r
->forest_trust_data
)));
3611 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_data_0
, 0);
3613 if (r
->forest_trust_data
) {
3614 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->forest_trust_data
, r
->forest_trust_length
));
3617 return NDR_ERR_SUCCESS
;
3620 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoInfoEx2Internal
*r
)
3622 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoInfoEx2Internal");
3624 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3625 ndr_print_uint32(ndr
, "forest_trust_length", r
->forest_trust_length
);
3626 ndr_print_ptr(ndr
, "forest_trust_data", r
->forest_trust_data
);
3628 if (r
->forest_trust_data
) {
3629 ndr_print_array_uint8(ndr
, "forest_trust_data", r
->forest_trust_data
, r
->forest_trust_length
);
3635 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoFullInfo2Internal
*r
)
3637 if (ndr_flags
& NDR_SCALARS
) {
3638 NDR_CHECK(ndr_push_align(ndr
, 5));
3639 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info
));
3640 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3641 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3642 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3644 if (ndr_flags
& NDR_BUFFERS
) {
3645 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info
));
3646 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3648 return NDR_ERR_SUCCESS
;
3651 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoFullInfo2Internal
*r
)
3653 if (ndr_flags
& NDR_SCALARS
) {
3654 NDR_CHECK(ndr_pull_align(ndr
, 5));
3655 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info
));
3656 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3657 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3658 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3660 if (ndr_flags
& NDR_BUFFERS
) {
3661 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info
));
3662 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3664 return NDR_ERR_SUCCESS
;
3667 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoFullInfo2Internal
*r
)
3669 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoFullInfo2Internal");
3671 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr
, "info", &r
->info
);
3672 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3673 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr
, "auth_info", &r
->auth_info
);
3677 static enum ndr_err_code
ndr_push_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TrustDomainInfoSupportedEncTypes
*r
)
3679 if (ndr_flags
& NDR_SCALARS
) {
3680 NDR_CHECK(ndr_push_align(ndr
, 4));
3681 NDR_CHECK(ndr_push_kerb_EncTypes(ndr
, NDR_SCALARS
, r
->enc_types
));
3682 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
3684 if (ndr_flags
& NDR_BUFFERS
) {
3686 return NDR_ERR_SUCCESS
;
3689 static enum ndr_err_code
ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TrustDomainInfoSupportedEncTypes
*r
)
3691 if (ndr_flags
& NDR_SCALARS
) {
3692 NDR_CHECK(ndr_pull_align(ndr
, 4));
3693 NDR_CHECK(ndr_pull_kerb_EncTypes(ndr
, NDR_SCALARS
, &r
->enc_types
));
3694 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
3696 if (ndr_flags
& NDR_BUFFERS
) {
3698 return NDR_ERR_SUCCESS
;
3701 _PUBLIC_
void ndr_print_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_print
*ndr
, const char *name
, const struct lsa_TrustDomainInfoSupportedEncTypes
*r
)
3703 ndr_print_struct(ndr
, name
, "lsa_TrustDomainInfoSupportedEncTypes");
3705 ndr_print_kerb_EncTypes(ndr
, "enc_types", r
->enc_types
);
3709 static enum ndr_err_code
ndr_push_lsa_TrustedDomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_TrustedDomainInfo
*r
)
3711 if (ndr_flags
& NDR_SCALARS
) {
3712 int level
= ndr_push_get_switch_value(ndr
, r
);
3713 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, level
));
3714 NDR_CHECK(ndr_push_union_align(ndr
, 5));
3716 case LSA_TRUSTED_DOMAIN_INFO_NAME
: {
3717 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr
, NDR_SCALARS
, &r
->name
));
3720 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
: {
3721 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr
, NDR_SCALARS
, &r
->controllers
));
3724 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
: {
3725 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3728 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
: {
3729 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr
, NDR_SCALARS
, &r
->password
));
3732 case LSA_TRUSTED_DOMAIN_INFO_BASIC
: {
3733 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr
, NDR_SCALARS
, &r
->info_basic
));
3736 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
: {
3737 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3740 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
: {
3741 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3744 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
: {
3745 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr
, NDR_SCALARS
, &r
->full_info
));
3748 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
: {
3749 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info_internal
));
3752 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
: {
3753 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_SCALARS
, &r
->full_info_internal
));
3756 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
: {
3757 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info_ex2_internal
));
3760 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
: {
3761 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_SCALARS
, &r
->full_info2_internal
));
3764 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES
: {
3765 NDR_CHECK(ndr_push_lsa_TrustDomainInfoSupportedEncTypes(ndr
, NDR_SCALARS
, &r
->enc_types
));
3769 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3772 if (ndr_flags
& NDR_BUFFERS
) {
3773 int level
= ndr_push_get_switch_value(ndr
, r
);
3775 case LSA_TRUSTED_DOMAIN_INFO_NAME
:
3776 NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr
, NDR_BUFFERS
, &r
->name
));
3779 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
:
3780 NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr
, NDR_BUFFERS
, &r
->controllers
));
3783 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
:
3786 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
:
3787 NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr
, NDR_BUFFERS
, &r
->password
));
3790 case LSA_TRUSTED_DOMAIN_INFO_BASIC
:
3791 NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr
, NDR_BUFFERS
, &r
->info_basic
));
3794 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
:
3795 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3798 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
:
3799 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3802 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
:
3803 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr
, NDR_BUFFERS
, &r
->full_info
));
3806 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
:
3807 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info_internal
));
3810 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
:
3811 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_BUFFERS
, &r
->full_info_internal
));
3814 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
:
3815 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info_ex2_internal
));
3818 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
:
3819 NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_BUFFERS
, &r
->full_info2_internal
));
3822 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES
:
3826 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3829 return NDR_ERR_SUCCESS
;
3832 static enum ndr_err_code
ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_TrustedDomainInfo
*r
)
3836 level
= ndr_pull_get_switch_value(ndr
, r
);
3837 if (ndr_flags
& NDR_SCALARS
) {
3838 NDR_CHECK(ndr_pull_uint1632(ndr
, NDR_SCALARS
, &_level
));
3839 if (_level
!= level
) {
3840 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
3842 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
3844 case LSA_TRUSTED_DOMAIN_INFO_NAME
: {
3845 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr
, NDR_SCALARS
, &r
->name
));
3848 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
: {
3849 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr
, NDR_SCALARS
, &r
->controllers
));
3852 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
: {
3853 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr
, NDR_SCALARS
, &r
->posix_offset
));
3856 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
: {
3857 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr
, NDR_SCALARS
, &r
->password
));
3860 case LSA_TRUSTED_DOMAIN_INFO_BASIC
: {
3861 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr
, NDR_SCALARS
, &r
->info_basic
));
3864 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
: {
3865 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->info_ex
));
3868 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
: {
3869 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_SCALARS
, &r
->auth_info
));
3872 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
: {
3873 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr
, NDR_SCALARS
, &r
->full_info
));
3876 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
: {
3877 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
, &r
->auth_info_internal
));
3880 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
: {
3881 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_SCALARS
, &r
->full_info_internal
));
3884 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
: {
3885 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_SCALARS
, &r
->info_ex2_internal
));
3888 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
: {
3889 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_SCALARS
, &r
->full_info2_internal
));
3892 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES
: {
3893 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(ndr
, NDR_SCALARS
, &r
->enc_types
));
3897 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3900 if (ndr_flags
& NDR_BUFFERS
) {
3902 case LSA_TRUSTED_DOMAIN_INFO_NAME
:
3903 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr
, NDR_BUFFERS
, &r
->name
));
3906 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
:
3907 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr
, NDR_BUFFERS
, &r
->controllers
));
3910 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
:
3913 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
:
3914 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr
, NDR_BUFFERS
, &r
->password
));
3917 case LSA_TRUSTED_DOMAIN_INFO_BASIC
:
3918 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr
, NDR_BUFFERS
, &r
->info_basic
));
3921 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
:
3922 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->info_ex
));
3925 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
:
3926 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr
, NDR_BUFFERS
, &r
->auth_info
));
3929 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
:
3930 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr
, NDR_BUFFERS
, &r
->full_info
));
3933 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
:
3934 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_BUFFERS
, &r
->auth_info_internal
));
3937 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
:
3938 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr
, NDR_BUFFERS
, &r
->full_info_internal
));
3941 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
:
3942 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr
, NDR_BUFFERS
, &r
->info_ex2_internal
));
3945 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
:
3946 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr
, NDR_BUFFERS
, &r
->full_info2_internal
));
3949 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES
:
3953 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
3956 return NDR_ERR_SUCCESS
;
3959 _PUBLIC_
void ndr_print_lsa_TrustedDomainInfo(struct ndr_print
*ndr
, const char *name
, const union lsa_TrustedDomainInfo
*r
)
3962 level
= ndr_print_get_switch_value(ndr
, r
);
3963 ndr_print_union(ndr
, name
, level
, "lsa_TrustedDomainInfo");
3965 case LSA_TRUSTED_DOMAIN_INFO_NAME
:
3966 ndr_print_lsa_TrustDomainInfoName(ndr
, "name", &r
->name
);
3969 case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
:
3970 ndr_print_lsa_TrustDomainInfoControllers(ndr
, "controllers", &r
->controllers
);
3973 case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
:
3974 ndr_print_lsa_TrustDomainInfoPosixOffset(ndr
, "posix_offset", &r
->posix_offset
);
3977 case LSA_TRUSTED_DOMAIN_INFO_PASSWORD
:
3978 ndr_print_lsa_TrustDomainInfoPassword(ndr
, "password", &r
->password
);
3981 case LSA_TRUSTED_DOMAIN_INFO_BASIC
:
3982 ndr_print_lsa_TrustDomainInfoBasic(ndr
, "info_basic", &r
->info_basic
);
3985 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX
:
3986 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info_ex", &r
->info_ex
);
3989 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
:
3990 ndr_print_lsa_TrustDomainInfoAuthInfo(ndr
, "auth_info", &r
->auth_info
);
3993 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
:
3994 ndr_print_lsa_TrustDomainInfoFullInfo(ndr
, "full_info", &r
->full_info
);
3997 case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
:
3998 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info_internal", &r
->auth_info_internal
);
4001 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
:
4002 ndr_print_lsa_TrustDomainInfoFullInfoInternal(ndr
, "full_info_internal", &r
->full_info_internal
);
4005 case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
:
4006 ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr
, "info_ex2_internal", &r
->info_ex2_internal
);
4009 case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
:
4010 ndr_print_lsa_TrustDomainInfoFullInfo2Internal(ndr
, "full_info2_internal", &r
->full_info2_internal
);
4013 case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES
:
4014 ndr_print_lsa_TrustDomainInfoSupportedEncTypes(ndr
, "enc_types", &r
->enc_types
);
4018 ndr_print_bad_level(ndr
, name
, level
);
4022 static enum ndr_err_code
ndr_push_lsa_DATA_BUF_PTR(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DATA_BUF_PTR
*r
)
4024 if (ndr_flags
& NDR_SCALARS
) {
4025 NDR_CHECK(ndr_push_align(ndr
, 5));
4026 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->buf
));
4027 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4029 if (ndr_flags
& NDR_BUFFERS
) {
4031 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->buf
));
4034 return NDR_ERR_SUCCESS
;
4037 static enum ndr_err_code
ndr_pull_lsa_DATA_BUF_PTR(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DATA_BUF_PTR
*r
)
4040 TALLOC_CTX
*_mem_save_buf_0
;
4041 if (ndr_flags
& NDR_SCALARS
) {
4042 NDR_CHECK(ndr_pull_align(ndr
, 5));
4043 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buf
));
4045 NDR_PULL_ALLOC(ndr
, r
->buf
);
4049 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4051 if (ndr_flags
& NDR_BUFFERS
) {
4053 _mem_save_buf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4054 NDR_PULL_SET_MEM_CTX(ndr
, r
->buf
, 0);
4055 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->buf
));
4056 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buf_0
, 0);
4059 return NDR_ERR_SUCCESS
;
4062 _PUBLIC_
void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print
*ndr
, const char *name
, const struct lsa_DATA_BUF_PTR
*r
)
4064 ndr_print_struct(ndr
, name
, "lsa_DATA_BUF_PTR");
4066 ndr_print_ptr(ndr
, "buf", r
->buf
);
4069 ndr_print_lsa_DATA_BUF(ndr
, "buf", r
->buf
);
4075 static enum ndr_err_code
ndr_push_lsa_RightSet(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_RightSet
*r
)
4077 uint32_t cntr_names_1
;
4078 if (ndr_flags
& NDR_SCALARS
) {
4079 NDR_CHECK(ndr_push_align(ndr
, 5));
4080 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4081 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
4082 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4084 if (ndr_flags
& NDR_BUFFERS
) {
4086 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
4087 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4088 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4090 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4091 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4095 return NDR_ERR_SUCCESS
;
4098 static enum ndr_err_code
ndr_pull_lsa_RightSet(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_RightSet
*r
)
4100 uint32_t _ptr_names
;
4101 uint32_t cntr_names_1
;
4102 TALLOC_CTX
*_mem_save_names_0
;
4103 TALLOC_CTX
*_mem_save_names_1
;
4104 if (ndr_flags
& NDR_SCALARS
) {
4105 NDR_CHECK(ndr_pull_align(ndr
, 5));
4106 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4107 if (r
->count
> 256) {
4108 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4110 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
4112 NDR_PULL_ALLOC(ndr
, r
->names
);
4116 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4118 if (ndr_flags
& NDR_BUFFERS
) {
4120 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4121 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4122 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
4123 NDR_PULL_ALLOC_N(ndr
, r
->names
, ndr_get_array_size(ndr
, &r
->names
));
4124 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4125 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4126 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4127 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4129 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4130 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4132 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
4133 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
4136 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
4139 return NDR_ERR_SUCCESS
;
4142 _PUBLIC_
void ndr_print_lsa_RightSet(struct ndr_print
*ndr
, const char *name
, const struct lsa_RightSet
*r
)
4144 uint32_t cntr_names_1
;
4145 ndr_print_struct(ndr
, name
, "lsa_RightSet");
4147 ndr_print_uint32(ndr
, "count", r
->count
);
4148 ndr_print_ptr(ndr
, "names", r
->names
);
4151 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
4153 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
4155 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
4156 ndr_print_lsa_StringLarge(ndr
, "names", &r
->names
[cntr_names_1
]);
4166 static enum ndr_err_code
ndr_push_lsa_DomainListEx(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainListEx
*r
)
4168 uint32_t cntr_domains_1
;
4169 if (ndr_flags
& NDR_SCALARS
) {
4170 NDR_CHECK(ndr_push_align(ndr
, 5));
4171 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4172 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domains
));
4173 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4175 if (ndr_flags
& NDR_BUFFERS
) {
4177 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
4178 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
4179 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
4181 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
4182 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
4186 return NDR_ERR_SUCCESS
;
4189 static enum ndr_err_code
ndr_pull_lsa_DomainListEx(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainListEx
*r
)
4191 uint32_t _ptr_domains
;
4192 uint32_t cntr_domains_1
;
4193 TALLOC_CTX
*_mem_save_domains_0
;
4194 TALLOC_CTX
*_mem_save_domains_1
;
4195 if (ndr_flags
& NDR_SCALARS
) {
4196 NDR_CHECK(ndr_pull_align(ndr
, 5));
4197 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4198 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
4200 NDR_PULL_ALLOC(ndr
, r
->domains
);
4204 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4206 if (ndr_flags
& NDR_BUFFERS
) {
4208 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4209 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
4210 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->domains
));
4211 NDR_PULL_ALLOC_N(ndr
, r
->domains
, ndr_get_array_size(ndr
, &r
->domains
));
4212 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4213 NDR_PULL_SET_MEM_CTX(ndr
, r
->domains
, 0);
4214 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
4215 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
, &r
->domains
[cntr_domains_1
]));
4217 for (cntr_domains_1
= 0; cntr_domains_1
< r
->count
; cntr_domains_1
++) {
4218 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_BUFFERS
, &r
->domains
[cntr_domains_1
]));
4220 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
4221 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, 0);
4224 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->domains
, r
->count
));
4227 return NDR_ERR_SUCCESS
;
4230 _PUBLIC_
void ndr_print_lsa_DomainListEx(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainListEx
*r
)
4232 uint32_t cntr_domains_1
;
4233 ndr_print_struct(ndr
, name
, "lsa_DomainListEx");
4235 ndr_print_uint32(ndr
, "count", r
->count
);
4236 ndr_print_ptr(ndr
, "domains", r
->domains
);
4239 ndr
->print(ndr
, "%s: ARRAY(%d)", "domains", (int)r
->count
);
4241 for (cntr_domains_1
=0;cntr_domains_1
<r
->count
;cntr_domains_1
++) {
4243 if (asprintf(&idx_1
, "[%d]", cntr_domains_1
) != -1) {
4244 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "domains", &r
->domains
[cntr_domains_1
]);
4254 static enum ndr_err_code
ndr_push_lsa_DomainInfoKerberos(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainInfoKerberos
*r
)
4256 if (ndr_flags
& NDR_SCALARS
) {
4257 NDR_CHECK(ndr_push_align(ndr
, 8));
4258 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->enforce_restrictions
));
4259 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->service_tkt_lifetime
));
4260 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->user_tkt_lifetime
));
4261 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->user_tkt_renewaltime
));
4262 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->clock_skew
));
4263 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown6
));
4264 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
4266 if (ndr_flags
& NDR_BUFFERS
) {
4268 return NDR_ERR_SUCCESS
;
4271 static enum ndr_err_code
ndr_pull_lsa_DomainInfoKerberos(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainInfoKerberos
*r
)
4273 if (ndr_flags
& NDR_SCALARS
) {
4274 NDR_CHECK(ndr_pull_align(ndr
, 8));
4275 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->enforce_restrictions
));
4276 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->service_tkt_lifetime
));
4277 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->user_tkt_lifetime
));
4278 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->user_tkt_renewaltime
));
4279 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->clock_skew
));
4280 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown6
));
4281 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
4283 if (ndr_flags
& NDR_BUFFERS
) {
4285 return NDR_ERR_SUCCESS
;
4288 _PUBLIC_
void ndr_print_lsa_DomainInfoKerberos(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainInfoKerberos
*r
)
4290 ndr_print_struct(ndr
, name
, "lsa_DomainInfoKerberos");
4292 ndr_print_uint32(ndr
, "enforce_restrictions", r
->enforce_restrictions
);
4293 ndr_print_hyper(ndr
, "service_tkt_lifetime", r
->service_tkt_lifetime
);
4294 ndr_print_hyper(ndr
, "user_tkt_lifetime", r
->user_tkt_lifetime
);
4295 ndr_print_hyper(ndr
, "user_tkt_renewaltime", r
->user_tkt_renewaltime
);
4296 ndr_print_hyper(ndr
, "clock_skew", r
->clock_skew
);
4297 ndr_print_hyper(ndr
, "unknown6", r
->unknown6
);
4301 static enum ndr_err_code
ndr_push_lsa_DomainInfoEfs(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_DomainInfoEfs
*r
)
4303 if (ndr_flags
& NDR_SCALARS
) {
4304 NDR_CHECK(ndr_push_align(ndr
, 5));
4305 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->blob_size
));
4306 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->efs_blob
));
4307 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4309 if (ndr_flags
& NDR_BUFFERS
) {
4311 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->blob_size
));
4312 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->efs_blob
, r
->blob_size
));
4315 return NDR_ERR_SUCCESS
;
4318 static enum ndr_err_code
ndr_pull_lsa_DomainInfoEfs(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_DomainInfoEfs
*r
)
4320 uint32_t _ptr_efs_blob
;
4321 TALLOC_CTX
*_mem_save_efs_blob_0
;
4322 if (ndr_flags
& NDR_SCALARS
) {
4323 NDR_CHECK(ndr_pull_align(ndr
, 5));
4324 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->blob_size
));
4325 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_efs_blob
));
4326 if (_ptr_efs_blob
) {
4327 NDR_PULL_ALLOC(ndr
, r
->efs_blob
);
4331 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4333 if (ndr_flags
& NDR_BUFFERS
) {
4335 _mem_save_efs_blob_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4336 NDR_PULL_SET_MEM_CTX(ndr
, r
->efs_blob
, 0);
4337 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->efs_blob
));
4338 NDR_PULL_ALLOC_N(ndr
, r
->efs_blob
, ndr_get_array_size(ndr
, &r
->efs_blob
));
4339 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->efs_blob
, ndr_get_array_size(ndr
, &r
->efs_blob
)));
4340 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_efs_blob_0
, 0);
4343 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->efs_blob
, r
->blob_size
));
4346 return NDR_ERR_SUCCESS
;
4349 _PUBLIC_
void ndr_print_lsa_DomainInfoEfs(struct ndr_print
*ndr
, const char *name
, const struct lsa_DomainInfoEfs
*r
)
4351 ndr_print_struct(ndr
, name
, "lsa_DomainInfoEfs");
4353 ndr_print_uint32(ndr
, "blob_size", r
->blob_size
);
4354 ndr_print_ptr(ndr
, "efs_blob", r
->efs_blob
);
4357 ndr_print_array_uint8(ndr
, "efs_blob", r
->efs_blob
, r
->blob_size
);
4363 static enum ndr_err_code
ndr_push_lsa_DomainInformationPolicy(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_DomainInformationPolicy
*r
)
4365 if (ndr_flags
& NDR_SCALARS
) {
4366 int level
= ndr_push_get_switch_value(ndr
, r
);
4367 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, level
));
4368 NDR_CHECK(ndr_push_union_align(ndr
, 8));
4370 case LSA_DOMAIN_INFO_POLICY_EFS
: {
4371 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr
, NDR_SCALARS
, &r
->efs_info
));
4374 case LSA_DOMAIN_INFO_POLICY_KERBEROS
: {
4375 NDR_CHECK(ndr_push_lsa_DomainInfoKerberos(ndr
, NDR_SCALARS
, &r
->kerberos_info
));
4379 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4382 if (ndr_flags
& NDR_BUFFERS
) {
4383 int level
= ndr_push_get_switch_value(ndr
, r
);
4385 case LSA_DOMAIN_INFO_POLICY_EFS
:
4386 NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr
, NDR_BUFFERS
, &r
->efs_info
));
4389 case LSA_DOMAIN_INFO_POLICY_KERBEROS
:
4393 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4396 return NDR_ERR_SUCCESS
;
4399 static enum ndr_err_code
ndr_pull_lsa_DomainInformationPolicy(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_DomainInformationPolicy
*r
)
4403 level
= ndr_pull_get_switch_value(ndr
, r
);
4404 if (ndr_flags
& NDR_SCALARS
) {
4405 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &_level
));
4406 if (_level
!= level
) {
4407 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
4409 NDR_CHECK(ndr_pull_union_align(ndr
, 8));
4411 case LSA_DOMAIN_INFO_POLICY_EFS
: {
4412 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr
, NDR_SCALARS
, &r
->efs_info
));
4415 case LSA_DOMAIN_INFO_POLICY_KERBEROS
: {
4416 NDR_CHECK(ndr_pull_lsa_DomainInfoKerberos(ndr
, NDR_SCALARS
, &r
->kerberos_info
));
4420 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4423 if (ndr_flags
& NDR_BUFFERS
) {
4425 case LSA_DOMAIN_INFO_POLICY_EFS
:
4426 NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr
, NDR_BUFFERS
, &r
->efs_info
));
4429 case LSA_DOMAIN_INFO_POLICY_KERBEROS
:
4433 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
4436 return NDR_ERR_SUCCESS
;
4439 _PUBLIC_
void ndr_print_lsa_DomainInformationPolicy(struct ndr_print
*ndr
, const char *name
, const union lsa_DomainInformationPolicy
*r
)
4442 level
= ndr_print_get_switch_value(ndr
, r
);
4443 ndr_print_union(ndr
, name
, level
, "lsa_DomainInformationPolicy");
4445 case LSA_DOMAIN_INFO_POLICY_EFS
:
4446 ndr_print_lsa_DomainInfoEfs(ndr
, "efs_info", &r
->efs_info
);
4449 case LSA_DOMAIN_INFO_POLICY_KERBEROS
:
4450 ndr_print_lsa_DomainInfoKerberos(ndr
, "kerberos_info", &r
->kerberos_info
);
4454 ndr_print_bad_level(ndr
, name
, level
);
4458 static enum ndr_err_code
ndr_push_lsa_TranslatedName2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedName2
*r
)
4460 if (ndr_flags
& NDR_SCALARS
) {
4461 NDR_CHECK(ndr_push_align(ndr
, 5));
4462 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
4463 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
4464 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
4465 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
4466 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4468 if (ndr_flags
& NDR_BUFFERS
) {
4469 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
4471 return NDR_ERR_SUCCESS
;
4474 static enum ndr_err_code
ndr_pull_lsa_TranslatedName2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedName2
*r
)
4476 if (ndr_flags
& NDR_SCALARS
) {
4477 NDR_CHECK(ndr_pull_align(ndr
, 5));
4478 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
4479 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->name
));
4480 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
4481 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
4482 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4484 if (ndr_flags
& NDR_BUFFERS
) {
4485 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->name
));
4487 return NDR_ERR_SUCCESS
;
4490 _PUBLIC_
void ndr_print_lsa_TranslatedName2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedName2
*r
)
4492 ndr_print_struct(ndr
, name
, "lsa_TranslatedName2");
4494 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
4495 ndr_print_lsa_String(ndr
, "name", &r
->name
);
4496 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
4497 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
4501 static enum ndr_err_code
ndr_push_lsa_TransNameArray2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransNameArray2
*r
)
4503 uint32_t cntr_names_1
;
4504 if (ndr_flags
& NDR_SCALARS
) {
4505 NDR_CHECK(ndr_push_align(ndr
, 5));
4506 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4507 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->names
));
4508 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4510 if (ndr_flags
& NDR_BUFFERS
) {
4512 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
4513 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4514 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4516 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4517 NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4521 return NDR_ERR_SUCCESS
;
4524 static enum ndr_err_code
ndr_pull_lsa_TransNameArray2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransNameArray2
*r
)
4526 uint32_t _ptr_names
;
4527 uint32_t cntr_names_1
;
4528 TALLOC_CTX
*_mem_save_names_0
;
4529 TALLOC_CTX
*_mem_save_names_1
;
4530 if (ndr_flags
& NDR_SCALARS
) {
4531 NDR_CHECK(ndr_pull_align(ndr
, 5));
4532 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4533 if (r
->count
> 1000) {
4534 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4536 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_names
));
4538 NDR_PULL_ALLOC(ndr
, r
->names
);
4542 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4544 if (ndr_flags
& NDR_BUFFERS
) {
4546 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4547 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4548 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->names
));
4549 NDR_PULL_ALLOC_N(ndr
, r
->names
, ndr_get_array_size(ndr
, &r
->names
));
4550 _mem_save_names_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4551 NDR_PULL_SET_MEM_CTX(ndr
, r
->names
, 0);
4552 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4553 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr
, NDR_SCALARS
, &r
->names
[cntr_names_1
]));
4555 for (cntr_names_1
= 0; cntr_names_1
< r
->count
; cntr_names_1
++) {
4556 NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr
, NDR_BUFFERS
, &r
->names
[cntr_names_1
]));
4558 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_1
, 0);
4559 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
4562 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->names
, r
->count
));
4565 return NDR_ERR_SUCCESS
;
4568 _PUBLIC_
void ndr_print_lsa_TransNameArray2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransNameArray2
*r
)
4570 uint32_t cntr_names_1
;
4571 ndr_print_struct(ndr
, name
, "lsa_TransNameArray2");
4573 ndr_print_uint32(ndr
, "count", r
->count
);
4574 ndr_print_ptr(ndr
, "names", r
->names
);
4577 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->count
);
4579 for (cntr_names_1
=0;cntr_names_1
<r
->count
;cntr_names_1
++) {
4581 if (asprintf(&idx_1
, "[%d]", cntr_names_1
) != -1) {
4582 ndr_print_lsa_TranslatedName2(ndr
, "names", &r
->names
[cntr_names_1
]);
4592 static enum ndr_err_code
ndr_push_lsa_LookupOptions(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_LookupOptions r
)
4594 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
4595 return NDR_ERR_SUCCESS
;
4598 static enum ndr_err_code
ndr_pull_lsa_LookupOptions(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_LookupOptions
*r
)
4601 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
4603 return NDR_ERR_SUCCESS
;
4606 _PUBLIC_
void ndr_print_lsa_LookupOptions(struct ndr_print
*ndr
, const char *name
, enum lsa_LookupOptions r
)
4608 const char *val
= NULL
;
4611 case LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES
: val
= "LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES"; break;
4612 case LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL
: val
= "LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL"; break;
4614 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4617 static enum ndr_err_code
ndr_push_lsa_ClientRevision(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_ClientRevision r
)
4619 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
4620 return NDR_ERR_SUCCESS
;
4623 static enum ndr_err_code
ndr_pull_lsa_ClientRevision(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_ClientRevision
*r
)
4626 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
4628 return NDR_ERR_SUCCESS
;
4631 _PUBLIC_
void ndr_print_lsa_ClientRevision(struct ndr_print
*ndr
, const char *name
, enum lsa_ClientRevision r
)
4633 const char *val
= NULL
;
4636 case LSA_CLIENT_REVISION_1
: val
= "LSA_CLIENT_REVISION_1"; break;
4637 case LSA_CLIENT_REVISION_2
: val
= "LSA_CLIENT_REVISION_2"; break;
4639 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
4642 static enum ndr_err_code
ndr_push_lsa_TranslatedSid2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedSid2
*r
)
4644 if (ndr_flags
& NDR_SCALARS
) {
4645 NDR_CHECK(ndr_push_align(ndr
, 4));
4646 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
4647 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->rid
));
4648 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
4649 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown
));
4650 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
4652 if (ndr_flags
& NDR_BUFFERS
) {
4654 return NDR_ERR_SUCCESS
;
4657 static enum ndr_err_code
ndr_pull_lsa_TranslatedSid2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedSid2
*r
)
4659 if (ndr_flags
& NDR_SCALARS
) {
4660 NDR_CHECK(ndr_pull_align(ndr
, 4));
4661 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
4662 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->rid
));
4663 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
4664 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
4665 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
4667 if (ndr_flags
& NDR_BUFFERS
) {
4669 return NDR_ERR_SUCCESS
;
4672 _PUBLIC_
void ndr_print_lsa_TranslatedSid2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedSid2
*r
)
4674 ndr_print_struct(ndr
, name
, "lsa_TranslatedSid2");
4676 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
4677 ndr_print_uint32(ndr
, "rid", r
->rid
);
4678 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
4679 ndr_print_uint32(ndr
, "unknown", r
->unknown
);
4683 static enum ndr_err_code
ndr_push_lsa_TransSidArray2(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransSidArray2
*r
)
4685 uint32_t cntr_sids_1
;
4686 if (ndr_flags
& NDR_SCALARS
) {
4687 NDR_CHECK(ndr_push_align(ndr
, 5));
4688 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4689 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
4690 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4692 if (ndr_flags
& NDR_BUFFERS
) {
4694 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
4695 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4696 NDR_CHECK(ndr_push_lsa_TranslatedSid2(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4700 return NDR_ERR_SUCCESS
;
4703 static enum ndr_err_code
ndr_pull_lsa_TransSidArray2(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransSidArray2
*r
)
4706 uint32_t cntr_sids_1
;
4707 TALLOC_CTX
*_mem_save_sids_0
;
4708 TALLOC_CTX
*_mem_save_sids_1
;
4709 if (ndr_flags
& NDR_SCALARS
) {
4710 NDR_CHECK(ndr_pull_align(ndr
, 5));
4711 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4712 if (r
->count
> 1000) {
4713 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4715 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
4717 NDR_PULL_ALLOC(ndr
, r
->sids
);
4721 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4723 if (ndr_flags
& NDR_BUFFERS
) {
4725 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4726 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4727 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
4728 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
4729 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4730 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4731 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4732 NDR_CHECK(ndr_pull_lsa_TranslatedSid2(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4734 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
4735 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
4738 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->count
));
4741 return NDR_ERR_SUCCESS
;
4744 _PUBLIC_
void ndr_print_lsa_TransSidArray2(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransSidArray2
*r
)
4746 uint32_t cntr_sids_1
;
4747 ndr_print_struct(ndr
, name
, "lsa_TransSidArray2");
4749 ndr_print_uint32(ndr
, "count", r
->count
);
4750 ndr_print_ptr(ndr
, "sids", r
->sids
);
4753 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->count
);
4755 for (cntr_sids_1
=0;cntr_sids_1
<r
->count
;cntr_sids_1
++) {
4757 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
4758 ndr_print_lsa_TranslatedSid2(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
4768 static enum ndr_err_code
ndr_push_lsa_TranslatedSid3(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TranslatedSid3
*r
)
4770 if (ndr_flags
& NDR_SCALARS
) {
4771 NDR_CHECK(ndr_push_align(ndr
, 5));
4772 NDR_CHECK(ndr_push_lsa_SidType(ndr
, NDR_SCALARS
, r
->sid_type
));
4773 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sid
));
4774 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sid_index
));
4775 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
4776 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4778 if (ndr_flags
& NDR_BUFFERS
) {
4780 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4783 return NDR_ERR_SUCCESS
;
4786 static enum ndr_err_code
ndr_pull_lsa_TranslatedSid3(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TranslatedSid3
*r
)
4789 TALLOC_CTX
*_mem_save_sid_0
;
4790 if (ndr_flags
& NDR_SCALARS
) {
4791 NDR_CHECK(ndr_pull_align(ndr
, 5));
4792 NDR_CHECK(ndr_pull_lsa_SidType(ndr
, NDR_SCALARS
, &r
->sid_type
));
4793 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sid
));
4795 NDR_PULL_ALLOC(ndr
, r
->sid
);
4799 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sid_index
));
4800 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
4801 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4803 if (ndr_flags
& NDR_BUFFERS
) {
4805 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4806 NDR_PULL_SET_MEM_CTX(ndr
, r
->sid
, 0);
4807 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->sid
));
4808 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, 0);
4811 return NDR_ERR_SUCCESS
;
4814 _PUBLIC_
void ndr_print_lsa_TranslatedSid3(struct ndr_print
*ndr
, const char *name
, const struct lsa_TranslatedSid3
*r
)
4816 ndr_print_struct(ndr
, name
, "lsa_TranslatedSid3");
4818 ndr_print_lsa_SidType(ndr
, "sid_type", r
->sid_type
);
4819 ndr_print_ptr(ndr
, "sid", r
->sid
);
4822 ndr_print_dom_sid2(ndr
, "sid", r
->sid
);
4825 ndr_print_uint32(ndr
, "sid_index", r
->sid_index
);
4826 ndr_print_uint32(ndr
, "flags", r
->flags
);
4830 static enum ndr_err_code
ndr_push_lsa_TransSidArray3(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_TransSidArray3
*r
)
4832 uint32_t cntr_sids_1
;
4833 if (ndr_flags
& NDR_SCALARS
) {
4834 NDR_CHECK(ndr_push_align(ndr
, 5));
4835 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
4836 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sids
));
4837 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4839 if (ndr_flags
& NDR_BUFFERS
) {
4841 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
4842 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4843 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4845 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4846 NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
4850 return NDR_ERR_SUCCESS
;
4853 static enum ndr_err_code
ndr_pull_lsa_TransSidArray3(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_TransSidArray3
*r
)
4856 uint32_t cntr_sids_1
;
4857 TALLOC_CTX
*_mem_save_sids_0
;
4858 TALLOC_CTX
*_mem_save_sids_1
;
4859 if (ndr_flags
& NDR_SCALARS
) {
4860 NDR_CHECK(ndr_pull_align(ndr
, 5));
4861 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
4862 if (r
->count
> 1000) {
4863 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4865 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sids
));
4867 NDR_PULL_ALLOC(ndr
, r
->sids
);
4871 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4873 if (ndr_flags
& NDR_BUFFERS
) {
4875 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4876 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4877 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sids
));
4878 NDR_PULL_ALLOC_N(ndr
, r
->sids
, ndr_get_array_size(ndr
, &r
->sids
));
4879 _mem_save_sids_1
= NDR_PULL_GET_MEM_CTX(ndr
);
4880 NDR_PULL_SET_MEM_CTX(ndr
, r
->sids
, 0);
4881 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4882 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr
, NDR_SCALARS
, &r
->sids
[cntr_sids_1
]));
4884 for (cntr_sids_1
= 0; cntr_sids_1
< r
->count
; cntr_sids_1
++) {
4885 NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr
, NDR_BUFFERS
, &r
->sids
[cntr_sids_1
]));
4887 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_1
, 0);
4888 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, 0);
4891 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->sids
, r
->count
));
4894 return NDR_ERR_SUCCESS
;
4897 _PUBLIC_
void ndr_print_lsa_TransSidArray3(struct ndr_print
*ndr
, const char *name
, const struct lsa_TransSidArray3
*r
)
4899 uint32_t cntr_sids_1
;
4900 ndr_print_struct(ndr
, name
, "lsa_TransSidArray3");
4902 ndr_print_uint32(ndr
, "count", r
->count
);
4903 ndr_print_ptr(ndr
, "sids", r
->sids
);
4906 ndr
->print(ndr
, "%s: ARRAY(%d)", "sids", (int)r
->count
);
4908 for (cntr_sids_1
=0;cntr_sids_1
<r
->count
;cntr_sids_1
++) {
4910 if (asprintf(&idx_1
, "[%d]", cntr_sids_1
) != -1) {
4911 ndr_print_lsa_TranslatedSid3(ndr
, "sids", &r
->sids
[cntr_sids_1
]);
4921 static enum ndr_err_code
ndr_push_lsa_ForestTrustBinaryData(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustBinaryData
*r
)
4923 if (ndr_flags
& NDR_SCALARS
) {
4924 NDR_CHECK(ndr_push_align(ndr
, 5));
4925 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->length
));
4926 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data
));
4927 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4929 if (ndr_flags
& NDR_BUFFERS
) {
4931 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->length
));
4932 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->data
, r
->length
));
4935 return NDR_ERR_SUCCESS
;
4938 static enum ndr_err_code
ndr_pull_lsa_ForestTrustBinaryData(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustBinaryData
*r
)
4941 TALLOC_CTX
*_mem_save_data_0
;
4942 if (ndr_flags
& NDR_SCALARS
) {
4943 NDR_CHECK(ndr_pull_align(ndr
, 5));
4944 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->length
));
4945 if (r
->length
> 131072) {
4946 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4948 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
4950 NDR_PULL_ALLOC(ndr
, r
->data
);
4954 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4956 if (ndr_flags
& NDR_BUFFERS
) {
4958 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4959 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
4960 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data
));
4961 NDR_PULL_ALLOC_N(ndr
, r
->data
, ndr_get_array_size(ndr
, &r
->data
));
4962 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->data
, ndr_get_array_size(ndr
, &r
->data
)));
4963 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
4966 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->data
, r
->length
));
4969 return NDR_ERR_SUCCESS
;
4972 _PUBLIC_
void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustBinaryData
*r
)
4974 ndr_print_struct(ndr
, name
, "lsa_ForestTrustBinaryData");
4976 ndr_print_uint32(ndr
, "length", r
->length
);
4977 ndr_print_ptr(ndr
, "data", r
->data
);
4980 ndr_print_array_uint8(ndr
, "data", r
->data
, r
->length
);
4986 static enum ndr_err_code
ndr_push_lsa_ForestTrustDomainInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustDomainInfo
*r
)
4988 if (ndr_flags
& NDR_SCALARS
) {
4989 NDR_CHECK(ndr_push_align(ndr
, 5));
4990 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->domain_sid
));
4991 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain_name
));
4992 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_domain_name
));
4993 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4995 if (ndr_flags
& NDR_BUFFERS
) {
4996 if (r
->domain_sid
) {
4997 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain_sid
));
4999 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain_name
));
5000 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_domain_name
));
5002 return NDR_ERR_SUCCESS
;
5005 static enum ndr_err_code
ndr_pull_lsa_ForestTrustDomainInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustDomainInfo
*r
)
5007 uint32_t _ptr_domain_sid
;
5008 TALLOC_CTX
*_mem_save_domain_sid_0
;
5009 if (ndr_flags
& NDR_SCALARS
) {
5010 NDR_CHECK(ndr_pull_align(ndr
, 5));
5011 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domain_sid
));
5012 if (_ptr_domain_sid
) {
5013 NDR_PULL_ALLOC(ndr
, r
->domain_sid
);
5015 r
->domain_sid
= NULL
;
5017 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->dns_domain_name
));
5018 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->netbios_domain_name
));
5019 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
5021 if (ndr_flags
& NDR_BUFFERS
) {
5022 if (r
->domain_sid
) {
5023 _mem_save_domain_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5024 NDR_PULL_SET_MEM_CTX(ndr
, r
->domain_sid
, 0);
5025 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->domain_sid
));
5026 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domain_sid_0
, 0);
5028 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->dns_domain_name
));
5029 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->netbios_domain_name
));
5031 return NDR_ERR_SUCCESS
;
5034 _PUBLIC_
void ndr_print_lsa_ForestTrustDomainInfo(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustDomainInfo
*r
)
5036 ndr_print_struct(ndr
, name
, "lsa_ForestTrustDomainInfo");
5038 ndr_print_ptr(ndr
, "domain_sid", r
->domain_sid
);
5040 if (r
->domain_sid
) {
5041 ndr_print_dom_sid2(ndr
, "domain_sid", r
->domain_sid
);
5044 ndr_print_lsa_StringLarge(ndr
, "dns_domain_name", &r
->dns_domain_name
);
5045 ndr_print_lsa_StringLarge(ndr
, "netbios_domain_name", &r
->netbios_domain_name
);
5049 static enum ndr_err_code
ndr_push_lsa_ForestTrustData(struct ndr_push
*ndr
, int ndr_flags
, const union lsa_ForestTrustData
*r
)
5051 if (ndr_flags
& NDR_SCALARS
) {
5052 int level
= ndr_push_get_switch_value(ndr
, r
);
5053 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
5054 NDR_CHECK(ndr_push_union_align(ndr
, 5));
5056 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
: {
5057 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->top_level_name
));
5060 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
: {
5061 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->top_level_name_ex
));
5064 case LSA_FOREST_TRUST_DOMAIN_INFO
: {
5065 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr
, NDR_SCALARS
, &r
->domain_info
));
5069 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr
, NDR_SCALARS
, &r
->data
));
5074 if (ndr_flags
& NDR_BUFFERS
) {
5075 int level
= ndr_push_get_switch_value(ndr
, r
);
5077 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
:
5078 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->top_level_name
));
5081 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
:
5082 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->top_level_name_ex
));
5085 case LSA_FOREST_TRUST_DOMAIN_INFO
:
5086 NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr
, NDR_BUFFERS
, &r
->domain_info
));
5090 NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr
, NDR_BUFFERS
, &r
->data
));
5095 return NDR_ERR_SUCCESS
;
5098 static enum ndr_err_code
ndr_pull_lsa_ForestTrustData(struct ndr_pull
*ndr
, int ndr_flags
, union lsa_ForestTrustData
*r
)
5102 level
= ndr_pull_get_switch_value(ndr
, r
);
5103 if (ndr_flags
& NDR_SCALARS
) {
5104 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
5105 if (_level
!= level
) {
5106 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
5108 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
5110 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
: {
5111 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->top_level_name
));
5114 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
: {
5115 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
, &r
->top_level_name_ex
));
5118 case LSA_FOREST_TRUST_DOMAIN_INFO
: {
5119 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr
, NDR_SCALARS
, &r
->domain_info
));
5123 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr
, NDR_SCALARS
, &r
->data
));
5128 if (ndr_flags
& NDR_BUFFERS
) {
5130 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
:
5131 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->top_level_name
));
5134 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
:
5135 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_BUFFERS
, &r
->top_level_name_ex
));
5138 case LSA_FOREST_TRUST_DOMAIN_INFO
:
5139 NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr
, NDR_BUFFERS
, &r
->domain_info
));
5143 NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr
, NDR_BUFFERS
, &r
->data
));
5148 return NDR_ERR_SUCCESS
;
5151 _PUBLIC_
void ndr_print_lsa_ForestTrustData(struct ndr_print
*ndr
, const char *name
, const union lsa_ForestTrustData
*r
)
5154 level
= ndr_print_get_switch_value(ndr
, r
);
5155 ndr_print_union(ndr
, name
, level
, "lsa_ForestTrustData");
5157 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
:
5158 ndr_print_lsa_String(ndr
, "top_level_name", &r
->top_level_name
);
5161 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
:
5162 ndr_print_lsa_StringLarge(ndr
, "top_level_name_ex", &r
->top_level_name_ex
);
5165 case LSA_FOREST_TRUST_DOMAIN_INFO
:
5166 ndr_print_lsa_ForestTrustDomainInfo(ndr
, "domain_info", &r
->domain_info
);
5170 ndr_print_lsa_ForestTrustBinaryData(ndr
, "data", &r
->data
);
5176 static enum ndr_err_code
ndr_push_lsa_ForestTrustRecordType(struct ndr_push
*ndr
, int ndr_flags
, enum lsa_ForestTrustRecordType r
)
5178 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
5179 return NDR_ERR_SUCCESS
;
5182 static enum ndr_err_code
ndr_pull_lsa_ForestTrustRecordType(struct ndr_pull
*ndr
, int ndr_flags
, enum lsa_ForestTrustRecordType
*r
)
5185 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
5187 return NDR_ERR_SUCCESS
;
5190 _PUBLIC_
void ndr_print_lsa_ForestTrustRecordType(struct ndr_print
*ndr
, const char *name
, enum lsa_ForestTrustRecordType r
)
5192 const char *val
= NULL
;
5195 case LSA_FOREST_TRUST_TOP_LEVEL_NAME
: val
= "LSA_FOREST_TRUST_TOP_LEVEL_NAME"; break;
5196 case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
: val
= "LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX"; break;
5197 case LSA_FOREST_TRUST_DOMAIN_INFO
: val
= "LSA_FOREST_TRUST_DOMAIN_INFO"; break;
5198 case LSA_FOREST_TRUST_RECORD_TYPE_LAST
: val
= "LSA_FOREST_TRUST_RECORD_TYPE_LAST"; break;
5200 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
5203 static enum ndr_err_code
ndr_push_lsa_ForestTrustRecord(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustRecord
*r
)
5205 if (ndr_flags
& NDR_SCALARS
) {
5206 NDR_CHECK(ndr_push_align(ndr
, 8));
5207 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
5208 NDR_CHECK(ndr_push_lsa_ForestTrustRecordType(ndr
, NDR_SCALARS
, r
->level
));
5209 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->unknown
));
5210 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->forest_trust_data
, r
->level
));
5211 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr
, NDR_SCALARS
, &r
->forest_trust_data
));
5212 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
5214 if (ndr_flags
& NDR_BUFFERS
) {
5215 NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr
, NDR_BUFFERS
, &r
->forest_trust_data
));
5217 return NDR_ERR_SUCCESS
;
5220 static enum ndr_err_code
ndr_pull_lsa_ForestTrustRecord(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustRecord
*r
)
5222 if (ndr_flags
& NDR_SCALARS
) {
5223 NDR_CHECK(ndr_pull_align(ndr
, 8));
5224 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
5225 NDR_CHECK(ndr_pull_lsa_ForestTrustRecordType(ndr
, NDR_SCALARS
, &r
->level
));
5226 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->unknown
));
5227 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->forest_trust_data
, r
->level
));
5228 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr
, NDR_SCALARS
, &r
->forest_trust_data
));
5229 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
5231 if (ndr_flags
& NDR_BUFFERS
) {
5232 NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr
, NDR_BUFFERS
, &r
->forest_trust_data
));
5234 return NDR_ERR_SUCCESS
;
5237 _PUBLIC_
void ndr_print_lsa_ForestTrustRecord(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustRecord
*r
)
5239 ndr_print_struct(ndr
, name
, "lsa_ForestTrustRecord");
5241 ndr_print_uint32(ndr
, "flags", r
->flags
);
5242 ndr_print_lsa_ForestTrustRecordType(ndr
, "level", r
->level
);
5243 ndr_print_hyper(ndr
, "unknown", r
->unknown
);
5244 ndr_print_set_switch_value(ndr
, &r
->forest_trust_data
, r
->level
);
5245 ndr_print_lsa_ForestTrustData(ndr
, "forest_trust_data", &r
->forest_trust_data
);
5249 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_ForestTrustInformation(struct ndr_push
*ndr
, int ndr_flags
, const struct lsa_ForestTrustInformation
*r
)
5251 uint32_t cntr_entries_1
;
5252 if (ndr_flags
& NDR_SCALARS
) {
5253 NDR_CHECK(ndr_push_align(ndr
, 5));
5254 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
5255 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
));
5256 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
5258 if (ndr_flags
& NDR_BUFFERS
) {
5260 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
5261 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
5262 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->entries
[cntr_entries_1
]));
5264 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
5265 if (r
->entries
[cntr_entries_1
]) {
5266 NDR_CHECK(ndr_push_lsa_ForestTrustRecord(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->entries
[cntr_entries_1
]));
5271 return NDR_ERR_SUCCESS
;
5274 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_ForestTrustInformation(struct ndr_pull
*ndr
, int ndr_flags
, struct lsa_ForestTrustInformation
*r
)
5276 uint32_t _ptr_entries
;
5277 uint32_t cntr_entries_1
;
5278 TALLOC_CTX
*_mem_save_entries_0
;
5279 TALLOC_CTX
*_mem_save_entries_1
;
5280 TALLOC_CTX
*_mem_save_entries_2
;
5281 if (ndr_flags
& NDR_SCALARS
) {
5282 NDR_CHECK(ndr_pull_align(ndr
, 5));
5283 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
5284 if (r
->count
> 4000) {
5285 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
5287 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
5289 NDR_PULL_ALLOC(ndr
, r
->entries
);
5293 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
5295 if (ndr_flags
& NDR_BUFFERS
) {
5297 _mem_save_entries_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5298 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
5299 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->entries
));
5300 NDR_PULL_ALLOC_N(ndr
, r
->entries
, ndr_get_array_size(ndr
, &r
->entries
));
5301 _mem_save_entries_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5302 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
, 0);
5303 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
5304 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_entries
));
5306 NDR_PULL_ALLOC(ndr
, r
->entries
[cntr_entries_1
]);
5308 r
->entries
[cntr_entries_1
] = NULL
;
5311 for (cntr_entries_1
= 0; cntr_entries_1
< r
->count
; cntr_entries_1
++) {
5312 if (r
->entries
[cntr_entries_1
]) {
5313 _mem_save_entries_2
= NDR_PULL_GET_MEM_CTX(ndr
);
5314 NDR_PULL_SET_MEM_CTX(ndr
, r
->entries
[cntr_entries_1
], 0);
5315 NDR_CHECK(ndr_pull_lsa_ForestTrustRecord(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->entries
[cntr_entries_1
]));
5316 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_2
, 0);
5319 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_1
, 0);
5320 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_entries_0
, 0);
5323 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->entries
, r
->count
));
5326 return NDR_ERR_SUCCESS
;
5329 _PUBLIC_
void ndr_print_lsa_ForestTrustInformation(struct ndr_print
*ndr
, const char *name
, const struct lsa_ForestTrustInformation
*r
)
5331 uint32_t cntr_entries_1
;
5332 ndr_print_struct(ndr
, name
, "lsa_ForestTrustInformation");
5334 ndr_print_uint32(ndr
, "count", r
->count
);
5335 ndr_print_ptr(ndr
, "entries", r
->entries
);
5338 ndr
->print(ndr
, "%s: ARRAY(%d)", "entries", (int)r
->count
);
5340 for (cntr_entries_1
=0;cntr_entries_1
<r
->count
;cntr_entries_1
++) {
5342 if (asprintf(&idx_1
, "[%d]", cntr_entries_1
) != -1) {
5343 ndr_print_ptr(ndr
, "entries", r
->entries
[cntr_entries_1
]);
5345 if (r
->entries
[cntr_entries_1
]) {
5346 ndr_print_lsa_ForestTrustRecord(ndr
, "entries", r
->entries
[cntr_entries_1
]);
5358 static enum ndr_err_code
ndr_push_lsa_Close(struct ndr_push
*ndr
, int flags
, const struct lsa_Close
*r
)
5360 if (flags
& NDR_IN
) {
5361 if (r
->in
.handle
== NULL
) {
5362 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5364 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5366 if (flags
& NDR_OUT
) {
5367 if (r
->out
.handle
== NULL
) {
5368 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5370 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5371 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5373 return NDR_ERR_SUCCESS
;
5376 static enum ndr_err_code
ndr_pull_lsa_Close(struct ndr_pull
*ndr
, int flags
, struct lsa_Close
*r
)
5378 TALLOC_CTX
*_mem_save_handle_0
;
5379 if (flags
& NDR_IN
) {
5380 ZERO_STRUCT(r
->out
);
5382 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5383 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5385 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5386 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5387 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5388 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5389 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5390 *r
->out
.handle
= *r
->in
.handle
;
5392 if (flags
& NDR_OUT
) {
5393 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5394 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5396 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5397 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5398 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5399 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5400 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5402 return NDR_ERR_SUCCESS
;
5405 _PUBLIC_
void ndr_print_lsa_Close(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_Close
*r
)
5407 ndr_print_struct(ndr
, name
, "lsa_Close");
5409 if (flags
& NDR_SET_VALUES
) {
5410 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5412 if (flags
& NDR_IN
) {
5413 ndr_print_struct(ndr
, "in", "lsa_Close");
5415 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5417 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5421 if (flags
& NDR_OUT
) {
5422 ndr_print_struct(ndr
, "out", "lsa_Close");
5424 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
5426 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
5428 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5434 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_Delete(struct ndr_push
*ndr
, int flags
, const struct lsa_Delete
*r
)
5436 if (flags
& NDR_IN
) {
5437 if (r
->in
.handle
== NULL
) {
5438 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5440 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5442 if (flags
& NDR_OUT
) {
5443 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5445 return NDR_ERR_SUCCESS
;
5448 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_Delete(struct ndr_pull
*ndr
, int flags
, struct lsa_Delete
*r
)
5450 TALLOC_CTX
*_mem_save_handle_0
;
5451 if (flags
& NDR_IN
) {
5452 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5453 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5455 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5456 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5457 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5458 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5460 if (flags
& NDR_OUT
) {
5461 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5463 return NDR_ERR_SUCCESS
;
5466 _PUBLIC_
void ndr_print_lsa_Delete(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_Delete
*r
)
5468 ndr_print_struct(ndr
, name
, "lsa_Delete");
5470 if (flags
& NDR_SET_VALUES
) {
5471 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5473 if (flags
& NDR_IN
) {
5474 ndr_print_struct(ndr
, "in", "lsa_Delete");
5476 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5478 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5482 if (flags
& NDR_OUT
) {
5483 ndr_print_struct(ndr
, "out", "lsa_Delete");
5485 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5491 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_EnumPrivs(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumPrivs
*r
)
5493 if (flags
& NDR_IN
) {
5494 if (r
->in
.handle
== NULL
) {
5495 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5497 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5498 if (r
->in
.resume_handle
== NULL
) {
5499 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5501 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
5502 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_count
));
5504 if (flags
& NDR_OUT
) {
5505 if (r
->out
.resume_handle
== NULL
) {
5506 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5508 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
5509 if (r
->out
.privs
== NULL
) {
5510 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5512 NDR_CHECK(ndr_push_lsa_PrivArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.privs
));
5513 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5515 return NDR_ERR_SUCCESS
;
5518 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_EnumPrivs(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumPrivs
*r
)
5520 TALLOC_CTX
*_mem_save_handle_0
;
5521 TALLOC_CTX
*_mem_save_resume_handle_0
;
5522 TALLOC_CTX
*_mem_save_privs_0
;
5523 if (flags
& NDR_IN
) {
5524 ZERO_STRUCT(r
->out
);
5526 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5527 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5529 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5530 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5531 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5532 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5533 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5534 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
5536 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5537 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
5538 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
5539 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5540 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_count
));
5541 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
5542 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
5543 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
5544 ZERO_STRUCTP(r
->out
.privs
);
5546 if (flags
& NDR_OUT
) {
5547 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5548 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
5550 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5551 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
5552 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
5553 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5554 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5555 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
5557 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5558 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.privs
, LIBNDR_FLAG_REF_ALLOC
);
5559 NDR_CHECK(ndr_pull_lsa_PrivArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.privs
));
5560 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, LIBNDR_FLAG_REF_ALLOC
);
5561 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5563 return NDR_ERR_SUCCESS
;
5566 _PUBLIC_
void ndr_print_lsa_EnumPrivs(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumPrivs
*r
)
5568 ndr_print_struct(ndr
, name
, "lsa_EnumPrivs");
5570 if (flags
& NDR_SET_VALUES
) {
5571 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5573 if (flags
& NDR_IN
) {
5574 ndr_print_struct(ndr
, "in", "lsa_EnumPrivs");
5576 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5578 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5580 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
5582 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
5584 ndr_print_uint32(ndr
, "max_count", r
->in
.max_count
);
5587 if (flags
& NDR_OUT
) {
5588 ndr_print_struct(ndr
, "out", "lsa_EnumPrivs");
5590 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
5592 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
5594 ndr_print_ptr(ndr
, "privs", r
->out
.privs
);
5596 ndr_print_lsa_PrivArray(ndr
, "privs", r
->out
.privs
);
5598 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5604 static enum ndr_err_code
ndr_push_lsa_QuerySecurity(struct ndr_push
*ndr
, int flags
, const struct lsa_QuerySecurity
*r
)
5606 if (flags
& NDR_IN
) {
5607 if (r
->in
.handle
== NULL
) {
5608 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5610 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5611 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.sec_info
));
5613 if (flags
& NDR_OUT
) {
5614 if (r
->out
.sdbuf
== NULL
) {
5615 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5617 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.sdbuf
));
5618 if (*r
->out
.sdbuf
) {
5619 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sdbuf
));
5621 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5623 return NDR_ERR_SUCCESS
;
5626 static enum ndr_err_code
ndr_pull_lsa_QuerySecurity(struct ndr_pull
*ndr
, int flags
, struct lsa_QuerySecurity
*r
)
5628 uint32_t _ptr_sdbuf
;
5629 TALLOC_CTX
*_mem_save_handle_0
;
5630 TALLOC_CTX
*_mem_save_sdbuf_0
;
5631 TALLOC_CTX
*_mem_save_sdbuf_1
;
5632 if (flags
& NDR_IN
) {
5633 ZERO_STRUCT(r
->out
);
5635 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5636 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5638 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5639 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5640 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5641 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5642 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.sec_info
));
5643 NDR_PULL_ALLOC(ndr
, r
->out
.sdbuf
);
5644 ZERO_STRUCTP(r
->out
.sdbuf
);
5646 if (flags
& NDR_OUT
) {
5647 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5648 NDR_PULL_ALLOC(ndr
, r
->out
.sdbuf
);
5650 _mem_save_sdbuf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5651 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sdbuf
, LIBNDR_FLAG_REF_ALLOC
);
5652 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sdbuf
));
5654 NDR_PULL_ALLOC(ndr
, *r
->out
.sdbuf
);
5656 *r
->out
.sdbuf
= NULL
;
5658 if (*r
->out
.sdbuf
) {
5659 _mem_save_sdbuf_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5660 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.sdbuf
, 0);
5661 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.sdbuf
));
5662 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_1
, 0);
5664 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_0
, LIBNDR_FLAG_REF_ALLOC
);
5665 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5667 return NDR_ERR_SUCCESS
;
5670 _PUBLIC_
void ndr_print_lsa_QuerySecurity(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QuerySecurity
*r
)
5672 ndr_print_struct(ndr
, name
, "lsa_QuerySecurity");
5674 if (flags
& NDR_SET_VALUES
) {
5675 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5677 if (flags
& NDR_IN
) {
5678 ndr_print_struct(ndr
, "in", "lsa_QuerySecurity");
5680 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5682 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5684 ndr_print_security_secinfo(ndr
, "sec_info", r
->in
.sec_info
);
5687 if (flags
& NDR_OUT
) {
5688 ndr_print_struct(ndr
, "out", "lsa_QuerySecurity");
5690 ndr_print_ptr(ndr
, "sdbuf", r
->out
.sdbuf
);
5692 ndr_print_ptr(ndr
, "sdbuf", *r
->out
.sdbuf
);
5694 if (*r
->out
.sdbuf
) {
5695 ndr_print_sec_desc_buf(ndr
, "sdbuf", *r
->out
.sdbuf
);
5699 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5705 static enum ndr_err_code
ndr_push_lsa_SetSecObj(struct ndr_push
*ndr
, int flags
, const struct lsa_SetSecObj
*r
)
5707 if (flags
& NDR_IN
) {
5708 if (r
->in
.handle
== NULL
) {
5709 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5711 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5712 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.sec_info
));
5713 if (r
->in
.sdbuf
== NULL
) {
5714 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5716 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sdbuf
));
5718 if (flags
& NDR_OUT
) {
5719 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5721 return NDR_ERR_SUCCESS
;
5724 static enum ndr_err_code
ndr_pull_lsa_SetSecObj(struct ndr_pull
*ndr
, int flags
, struct lsa_SetSecObj
*r
)
5726 TALLOC_CTX
*_mem_save_handle_0
;
5727 TALLOC_CTX
*_mem_save_sdbuf_0
;
5728 if (flags
& NDR_IN
) {
5729 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5730 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5732 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5733 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5734 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5735 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5736 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.sec_info
));
5737 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5738 NDR_PULL_ALLOC(ndr
, r
->in
.sdbuf
);
5740 _mem_save_sdbuf_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5741 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sdbuf
, LIBNDR_FLAG_REF_ALLOC
);
5742 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sdbuf
));
5743 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sdbuf_0
, LIBNDR_FLAG_REF_ALLOC
);
5745 if (flags
& NDR_OUT
) {
5746 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5748 return NDR_ERR_SUCCESS
;
5751 _PUBLIC_
void ndr_print_lsa_SetSecObj(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetSecObj
*r
)
5753 ndr_print_struct(ndr
, name
, "lsa_SetSecObj");
5755 if (flags
& NDR_SET_VALUES
) {
5756 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5758 if (flags
& NDR_IN
) {
5759 ndr_print_struct(ndr
, "in", "lsa_SetSecObj");
5761 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5763 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5765 ndr_print_security_secinfo(ndr
, "sec_info", r
->in
.sec_info
);
5766 ndr_print_ptr(ndr
, "sdbuf", r
->in
.sdbuf
);
5768 ndr_print_sec_desc_buf(ndr
, "sdbuf", r
->in
.sdbuf
);
5772 if (flags
& NDR_OUT
) {
5773 ndr_print_struct(ndr
, "out", "lsa_SetSecObj");
5775 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5781 static enum ndr_err_code
ndr_push_lsa_ChangePassword(struct ndr_push
*ndr
, int flags
, const struct lsa_ChangePassword
*r
)
5783 if (flags
& NDR_IN
) {
5785 if (flags
& NDR_OUT
) {
5786 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5788 return NDR_ERR_SUCCESS
;
5791 static enum ndr_err_code
ndr_pull_lsa_ChangePassword(struct ndr_pull
*ndr
, int flags
, struct lsa_ChangePassword
*r
)
5793 if (flags
& NDR_IN
) {
5795 if (flags
& NDR_OUT
) {
5796 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5798 return NDR_ERR_SUCCESS
;
5801 _PUBLIC_
void ndr_print_lsa_ChangePassword(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_ChangePassword
*r
)
5803 ndr_print_struct(ndr
, name
, "lsa_ChangePassword");
5805 if (flags
& NDR_SET_VALUES
) {
5806 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5808 if (flags
& NDR_IN
) {
5809 ndr_print_struct(ndr
, "in", "lsa_ChangePassword");
5813 if (flags
& NDR_OUT
) {
5814 ndr_print_struct(ndr
, "out", "lsa_ChangePassword");
5816 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5822 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_OpenPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenPolicy
*r
)
5824 if (flags
& NDR_IN
) {
5825 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
5826 if (r
->in
.system_name
) {
5827 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->in
.system_name
));
5829 if (r
->in
.attr
== NULL
) {
5830 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5832 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
5833 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
5835 if (flags
& NDR_OUT
) {
5836 if (r
->out
.handle
== NULL
) {
5837 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5839 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5840 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5842 return NDR_ERR_SUCCESS
;
5845 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_OpenPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenPolicy
*r
)
5847 uint32_t _ptr_system_name
;
5848 TALLOC_CTX
*_mem_save_system_name_0
;
5849 TALLOC_CTX
*_mem_save_attr_0
;
5850 TALLOC_CTX
*_mem_save_handle_0
;
5851 if (flags
& NDR_IN
) {
5852 ZERO_STRUCT(r
->out
);
5854 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
5855 if (_ptr_system_name
) {
5856 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
5858 r
->in
.system_name
= NULL
;
5860 if (r
->in
.system_name
) {
5861 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5862 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
5863 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->in
.system_name
));
5864 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
5866 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5867 NDR_PULL_ALLOC(ndr
, r
->in
.attr
);
5869 _mem_save_attr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5870 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.attr
, LIBNDR_FLAG_REF_ALLOC
);
5871 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
5872 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attr_0
, LIBNDR_FLAG_REF_ALLOC
);
5873 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
5874 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5875 ZERO_STRUCTP(r
->out
.handle
);
5877 if (flags
& NDR_OUT
) {
5878 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5879 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5881 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5882 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5883 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5884 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5885 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5887 return NDR_ERR_SUCCESS
;
5890 _PUBLIC_
void ndr_print_lsa_OpenPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenPolicy
*r
)
5892 ndr_print_struct(ndr
, name
, "lsa_OpenPolicy");
5894 if (flags
& NDR_SET_VALUES
) {
5895 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5897 if (flags
& NDR_IN
) {
5898 ndr_print_struct(ndr
, "in", "lsa_OpenPolicy");
5900 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
5902 if (r
->in
.system_name
) {
5903 ndr_print_uint16(ndr
, "system_name", *r
->in
.system_name
);
5906 ndr_print_ptr(ndr
, "attr", r
->in
.attr
);
5908 ndr_print_lsa_ObjectAttribute(ndr
, "attr", r
->in
.attr
);
5910 ndr_print_lsa_PolicyAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
5913 if (flags
& NDR_OUT
) {
5914 ndr_print_struct(ndr
, "out", "lsa_OpenPolicy");
5916 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
5918 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
5920 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
5926 static enum ndr_err_code
ndr_push_lsa_QueryInfoPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryInfoPolicy
*r
)
5928 if (flags
& NDR_IN
) {
5929 if (r
->in
.handle
== NULL
) {
5930 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5932 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5933 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
5935 if (flags
& NDR_OUT
) {
5936 if (r
->out
.info
== NULL
) {
5937 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5939 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
5941 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
5942 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
5944 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
5946 return NDR_ERR_SUCCESS
;
5949 static enum ndr_err_code
ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryInfoPolicy
*r
)
5952 TALLOC_CTX
*_mem_save_handle_0
;
5953 TALLOC_CTX
*_mem_save_info_0
;
5954 TALLOC_CTX
*_mem_save_info_1
;
5955 if (flags
& NDR_IN
) {
5956 ZERO_STRUCT(r
->out
);
5958 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5959 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5961 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5962 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5963 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5964 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5965 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
5966 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
5967 ZERO_STRUCTP(r
->out
.info
);
5969 if (flags
& NDR_OUT
) {
5970 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5971 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
5973 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5974 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
5975 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
5977 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
5979 *r
->out
.info
= NULL
;
5982 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5983 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
5984 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
5985 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
5986 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
5988 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
5989 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
5991 return NDR_ERR_SUCCESS
;
5994 _PUBLIC_
void ndr_print_lsa_QueryInfoPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryInfoPolicy
*r
)
5996 ndr_print_struct(ndr
, name
, "lsa_QueryInfoPolicy");
5998 if (flags
& NDR_SET_VALUES
) {
5999 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6001 if (flags
& NDR_IN
) {
6002 ndr_print_struct(ndr
, "in", "lsa_QueryInfoPolicy");
6004 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6006 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6008 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
6011 if (flags
& NDR_OUT
) {
6012 ndr_print_struct(ndr
, "out", "lsa_QueryInfoPolicy");
6014 ndr_print_ptr(ndr
, "info", r
->out
.info
);
6016 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
6019 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
6020 ndr_print_lsa_PolicyInformation(ndr
, "info", *r
->out
.info
);
6024 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6030 static enum ndr_err_code
ndr_push_lsa_SetInfoPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_SetInfoPolicy
*r
)
6032 if (flags
& NDR_IN
) {
6033 if (r
->in
.handle
== NULL
) {
6034 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6036 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6037 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
6038 if (r
->in
.info
== NULL
) {
6039 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6041 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
6042 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6044 if (flags
& NDR_OUT
) {
6045 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6047 return NDR_ERR_SUCCESS
;
6050 static enum ndr_err_code
ndr_pull_lsa_SetInfoPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_SetInfoPolicy
*r
)
6052 TALLOC_CTX
*_mem_save_handle_0
;
6053 TALLOC_CTX
*_mem_save_info_0
;
6054 if (flags
& NDR_IN
) {
6055 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6056 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6058 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6059 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6060 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6061 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6062 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
6063 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6064 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
6066 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6067 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
6068 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
6069 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6070 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
6072 if (flags
& NDR_OUT
) {
6073 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6075 return NDR_ERR_SUCCESS
;
6078 _PUBLIC_
void ndr_print_lsa_SetInfoPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetInfoPolicy
*r
)
6080 ndr_print_struct(ndr
, name
, "lsa_SetInfoPolicy");
6082 if (flags
& NDR_SET_VALUES
) {
6083 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6085 if (flags
& NDR_IN
) {
6086 ndr_print_struct(ndr
, "in", "lsa_SetInfoPolicy");
6088 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6090 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6092 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
6093 ndr_print_ptr(ndr
, "info", r
->in
.info
);
6095 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
6096 ndr_print_lsa_PolicyInformation(ndr
, "info", r
->in
.info
);
6100 if (flags
& NDR_OUT
) {
6101 ndr_print_struct(ndr
, "out", "lsa_SetInfoPolicy");
6103 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6109 static enum ndr_err_code
ndr_push_lsa_ClearAuditLog(struct ndr_push
*ndr
, int flags
, const struct lsa_ClearAuditLog
*r
)
6111 if (flags
& NDR_IN
) {
6113 if (flags
& NDR_OUT
) {
6114 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6116 return NDR_ERR_SUCCESS
;
6119 static enum ndr_err_code
ndr_pull_lsa_ClearAuditLog(struct ndr_pull
*ndr
, int flags
, struct lsa_ClearAuditLog
*r
)
6121 if (flags
& NDR_IN
) {
6123 if (flags
& NDR_OUT
) {
6124 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6126 return NDR_ERR_SUCCESS
;
6129 _PUBLIC_
void ndr_print_lsa_ClearAuditLog(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_ClearAuditLog
*r
)
6131 ndr_print_struct(ndr
, name
, "lsa_ClearAuditLog");
6133 if (flags
& NDR_SET_VALUES
) {
6134 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6136 if (flags
& NDR_IN
) {
6137 ndr_print_struct(ndr
, "in", "lsa_ClearAuditLog");
6141 if (flags
& NDR_OUT
) {
6142 ndr_print_struct(ndr
, "out", "lsa_ClearAuditLog");
6144 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6150 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_CreateAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateAccount
*r
)
6152 if (flags
& NDR_IN
) {
6153 if (r
->in
.handle
== NULL
) {
6154 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6156 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6157 if (r
->in
.sid
== NULL
) {
6158 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6160 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6161 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6163 if (flags
& NDR_OUT
) {
6164 if (r
->out
.acct_handle
== NULL
) {
6165 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6167 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
6168 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6170 return NDR_ERR_SUCCESS
;
6173 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_CreateAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateAccount
*r
)
6175 TALLOC_CTX
*_mem_save_handle_0
;
6176 TALLOC_CTX
*_mem_save_sid_0
;
6177 TALLOC_CTX
*_mem_save_acct_handle_0
;
6178 if (flags
& NDR_IN
) {
6179 ZERO_STRUCT(r
->out
);
6181 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6182 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6184 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6185 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6186 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6187 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6188 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6189 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
6191 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6192 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
6193 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
6194 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
6195 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6196 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
6197 ZERO_STRUCTP(r
->out
.acct_handle
);
6199 if (flags
& NDR_OUT
) {
6200 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6201 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
6203 _mem_save_acct_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6204 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.acct_handle
, LIBNDR_FLAG_REF_ALLOC
);
6205 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
6206 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_acct_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6207 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6209 return NDR_ERR_SUCCESS
;
6212 _PUBLIC_
void ndr_print_lsa_CreateAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateAccount
*r
)
6214 ndr_print_struct(ndr
, name
, "lsa_CreateAccount");
6216 if (flags
& NDR_SET_VALUES
) {
6217 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6219 if (flags
& NDR_IN
) {
6220 ndr_print_struct(ndr
, "in", "lsa_CreateAccount");
6222 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6224 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6226 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
6228 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
6230 ndr_print_lsa_AccountAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
6233 if (flags
& NDR_OUT
) {
6234 ndr_print_struct(ndr
, "out", "lsa_CreateAccount");
6236 ndr_print_ptr(ndr
, "acct_handle", r
->out
.acct_handle
);
6238 ndr_print_policy_handle(ndr
, "acct_handle", r
->out
.acct_handle
);
6240 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6246 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_EnumAccounts(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumAccounts
*r
)
6248 if (flags
& NDR_IN
) {
6249 if (r
->in
.handle
== NULL
) {
6250 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6252 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6253 if (r
->in
.resume_handle
== NULL
) {
6254 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6256 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
6257 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_entries
));
6259 if (flags
& NDR_OUT
) {
6260 if (r
->out
.resume_handle
== NULL
) {
6261 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6263 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6264 if (r
->out
.sids
== NULL
) {
6265 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6267 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6268 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6270 return NDR_ERR_SUCCESS
;
6273 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_EnumAccounts(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumAccounts
*r
)
6275 TALLOC_CTX
*_mem_save_handle_0
;
6276 TALLOC_CTX
*_mem_save_resume_handle_0
;
6277 TALLOC_CTX
*_mem_save_sids_0
;
6278 if (flags
& NDR_IN
) {
6279 ZERO_STRUCT(r
->out
);
6281 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6282 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6284 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6285 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6286 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6287 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6288 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6289 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6291 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6292 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6293 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6294 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6295 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_entries
));
6296 if (r
->in
.num_entries
> 8192) {
6297 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6299 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6300 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
6301 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6302 ZERO_STRUCTP(r
->out
.sids
);
6304 if (flags
& NDR_OUT
) {
6305 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6306 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6308 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6309 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6310 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6311 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6312 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6313 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6315 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6316 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6317 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6318 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6319 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6321 return NDR_ERR_SUCCESS
;
6324 _PUBLIC_
void ndr_print_lsa_EnumAccounts(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumAccounts
*r
)
6326 ndr_print_struct(ndr
, name
, "lsa_EnumAccounts");
6328 if (flags
& NDR_SET_VALUES
) {
6329 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6331 if (flags
& NDR_IN
) {
6332 ndr_print_struct(ndr
, "in", "lsa_EnumAccounts");
6334 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6336 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6338 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6340 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6342 ndr_print_uint32(ndr
, "num_entries", r
->in
.num_entries
);
6345 if (flags
& NDR_OUT
) {
6346 ndr_print_struct(ndr
, "out", "lsa_EnumAccounts");
6348 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6350 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6352 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
6354 ndr_print_lsa_SidArray(ndr
, "sids", r
->out
.sids
);
6356 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6362 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_CreateTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateTrustedDomain
*r
)
6364 if (flags
& NDR_IN
) {
6365 if (r
->in
.policy_handle
== NULL
) {
6366 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6368 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
6369 if (r
->in
.info
== NULL
) {
6370 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6372 NDR_CHECK(ndr_push_lsa_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6373 NDR_CHECK(ndr_push_lsa_TrustedAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6375 if (flags
& NDR_OUT
) {
6376 if (r
->out
.trustdom_handle
== NULL
) {
6377 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6379 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
6380 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6382 return NDR_ERR_SUCCESS
;
6385 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateTrustedDomain
*r
)
6387 TALLOC_CTX
*_mem_save_policy_handle_0
;
6388 TALLOC_CTX
*_mem_save_info_0
;
6389 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
6390 if (flags
& NDR_IN
) {
6391 ZERO_STRUCT(r
->out
);
6393 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6394 NDR_PULL_ALLOC(ndr
, r
->in
.policy_handle
);
6396 _mem_save_policy_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6397 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.policy_handle
, LIBNDR_FLAG_REF_ALLOC
);
6398 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
6399 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_policy_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6400 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6401 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
6403 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6404 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
6405 NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
6406 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
6407 NDR_CHECK(ndr_pull_lsa_TrustedAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6408 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
6409 ZERO_STRUCTP(r
->out
.trustdom_handle
);
6411 if (flags
& NDR_OUT
) {
6412 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6413 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
6415 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6416 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
6417 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
6418 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6419 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6421 return NDR_ERR_SUCCESS
;
6424 _PUBLIC_
void ndr_print_lsa_CreateTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateTrustedDomain
*r
)
6426 ndr_print_struct(ndr
, name
, "lsa_CreateTrustedDomain");
6428 if (flags
& NDR_SET_VALUES
) {
6429 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6431 if (flags
& NDR_IN
) {
6432 ndr_print_struct(ndr
, "in", "lsa_CreateTrustedDomain");
6434 ndr_print_ptr(ndr
, "policy_handle", r
->in
.policy_handle
);
6436 ndr_print_policy_handle(ndr
, "policy_handle", r
->in
.policy_handle
);
6438 ndr_print_ptr(ndr
, "info", r
->in
.info
);
6440 ndr_print_lsa_DomainInfo(ndr
, "info", r
->in
.info
);
6442 ndr_print_lsa_TrustedAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
6445 if (flags
& NDR_OUT
) {
6446 ndr_print_struct(ndr
, "out", "lsa_CreateTrustedDomain");
6448 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
6450 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
6452 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6458 static enum ndr_err_code
ndr_push_lsa_EnumTrustDom(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumTrustDom
*r
)
6460 if (flags
& NDR_IN
) {
6461 if (r
->in
.handle
== NULL
) {
6462 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6464 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6465 if (r
->in
.resume_handle
== NULL
) {
6466 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6468 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
6469 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_size
));
6471 if (flags
& NDR_OUT
) {
6472 if (r
->out
.resume_handle
== NULL
) {
6473 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6475 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6476 if (r
->out
.domains
== NULL
) {
6477 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6479 NDR_CHECK(ndr_push_lsa_DomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
6480 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6482 return NDR_ERR_SUCCESS
;
6485 static enum ndr_err_code
ndr_pull_lsa_EnumTrustDom(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumTrustDom
*r
)
6487 TALLOC_CTX
*_mem_save_handle_0
;
6488 TALLOC_CTX
*_mem_save_resume_handle_0
;
6489 TALLOC_CTX
*_mem_save_domains_0
;
6490 if (flags
& NDR_IN
) {
6491 ZERO_STRUCT(r
->out
);
6493 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6494 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6496 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6497 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6498 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6499 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6500 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6501 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6503 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6504 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6505 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6506 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6507 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_size
));
6508 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6509 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
6510 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6511 ZERO_STRUCTP(r
->out
.domains
);
6513 if (flags
& NDR_OUT
) {
6514 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6515 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6517 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6518 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
6519 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6520 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6521 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6522 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6524 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6525 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
6526 NDR_CHECK(ndr_pull_lsa_DomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
6527 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
6528 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6530 return NDR_ERR_SUCCESS
;
6533 _PUBLIC_
void ndr_print_lsa_EnumTrustDom(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumTrustDom
*r
)
6535 ndr_print_struct(ndr
, name
, "lsa_EnumTrustDom");
6537 if (flags
& NDR_SET_VALUES
) {
6538 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6540 if (flags
& NDR_IN
) {
6541 ndr_print_struct(ndr
, "in", "lsa_EnumTrustDom");
6543 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6545 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6547 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6549 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6551 ndr_print_uint32(ndr
, "max_size", r
->in
.max_size
);
6554 if (flags
& NDR_OUT
) {
6555 ndr_print_struct(ndr
, "out", "lsa_EnumTrustDom");
6557 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6559 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6561 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
6563 ndr_print_lsa_DomainList(ndr
, "domains", r
->out
.domains
);
6565 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6571 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupNames(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames
*r
)
6573 uint32_t cntr_names_0
;
6574 if (flags
& NDR_IN
) {
6575 if (r
->in
.handle
== NULL
) {
6576 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6578 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6579 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
6580 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.num_names
));
6581 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
6582 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
6584 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
6585 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
6587 if (r
->in
.sids
== NULL
) {
6588 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6590 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6591 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
6592 if (r
->in
.count
== NULL
) {
6593 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6595 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
6597 if (flags
& NDR_OUT
) {
6598 if (r
->out
.domains
== NULL
) {
6599 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6601 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
6602 if (*r
->out
.domains
) {
6603 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6605 if (r
->out
.sids
== NULL
) {
6606 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6608 NDR_CHECK(ndr_push_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6609 if (r
->out
.count
== NULL
) {
6610 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6612 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
6613 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6615 return NDR_ERR_SUCCESS
;
6618 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupNames(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames
*r
)
6620 uint32_t cntr_names_0
;
6621 uint32_t _ptr_domains
;
6622 TALLOC_CTX
*_mem_save_handle_0
;
6623 TALLOC_CTX
*_mem_save_names_0
;
6624 TALLOC_CTX
*_mem_save_domains_0
;
6625 TALLOC_CTX
*_mem_save_domains_1
;
6626 TALLOC_CTX
*_mem_save_sids_0
;
6627 TALLOC_CTX
*_mem_save_count_0
;
6628 if (flags
& NDR_IN
) {
6629 ZERO_STRUCT(r
->out
);
6631 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6632 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6634 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6635 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6636 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6637 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6638 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
6639 if (r
->in
.num_names
> 1000) {
6640 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6642 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
6643 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, ndr_get_array_size(ndr
, &r
->in
.names
));
6644 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6645 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
6646 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
6647 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
6649 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
6650 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
6652 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
6653 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6654 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
6656 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6657 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6658 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6659 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6660 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
6661 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6662 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
6664 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6665 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
6666 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
6667 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6668 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6669 ZERO_STRUCTP(r
->out
.domains
);
6670 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6671 *r
->out
.sids
= *r
->in
.sids
;
6672 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6673 *r
->out
.count
= *r
->in
.count
;
6675 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
6678 if (flags
& NDR_OUT
) {
6679 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6680 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6682 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6683 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
6684 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
6686 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
6688 *r
->out
.domains
= NULL
;
6690 if (*r
->out
.domains
) {
6691 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6692 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
6693 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6694 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
6696 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
6697 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6698 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
6700 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6701 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6702 NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
6703 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6704 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6705 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6707 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6708 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
6709 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
6710 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6711 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6713 return NDR_ERR_SUCCESS
;
6716 _PUBLIC_
void ndr_print_lsa_LookupNames(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames
*r
)
6718 uint32_t cntr_names_0
;
6719 ndr_print_struct(ndr
, name
, "lsa_LookupNames");
6721 if (flags
& NDR_SET_VALUES
) {
6722 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6724 if (flags
& NDR_IN
) {
6725 ndr_print_struct(ndr
, "in", "lsa_LookupNames");
6727 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6729 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6731 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
6732 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
6734 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
6736 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
6737 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
6742 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
6744 ndr_print_lsa_TransSidArray(ndr
, "sids", r
->in
.sids
);
6746 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
6747 ndr_print_ptr(ndr
, "count", r
->in
.count
);
6749 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
6753 if (flags
& NDR_OUT
) {
6754 ndr_print_struct(ndr
, "out", "lsa_LookupNames");
6756 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
6758 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
6760 if (*r
->out
.domains
) {
6761 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
6765 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
6767 ndr_print_lsa_TransSidArray(ndr
, "sids", r
->out
.sids
);
6769 ndr_print_ptr(ndr
, "count", r
->out
.count
);
6771 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
6773 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6779 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupSids(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupSids
*r
)
6781 if (flags
& NDR_IN
) {
6782 if (r
->in
.handle
== NULL
) {
6783 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6785 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6786 if (r
->in
.sids
== NULL
) {
6787 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6789 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6790 if (r
->in
.names
== NULL
) {
6791 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6793 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
6794 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
6795 if (r
->in
.count
== NULL
) {
6796 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6798 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
6800 if (flags
& NDR_OUT
) {
6801 if (r
->out
.domains
== NULL
) {
6802 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6804 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
6805 if (*r
->out
.domains
) {
6806 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6808 if (r
->out
.names
== NULL
) {
6809 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6811 NDR_CHECK(ndr_push_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
6812 if (r
->out
.count
== NULL
) {
6813 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6815 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
6816 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6818 return NDR_ERR_SUCCESS
;
6821 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupSids(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupSids
*r
)
6823 uint32_t _ptr_domains
;
6824 TALLOC_CTX
*_mem_save_handle_0
;
6825 TALLOC_CTX
*_mem_save_sids_0
;
6826 TALLOC_CTX
*_mem_save_domains_0
;
6827 TALLOC_CTX
*_mem_save_domains_1
;
6828 TALLOC_CTX
*_mem_save_names_0
;
6829 TALLOC_CTX
*_mem_save_count_0
;
6830 if (flags
& NDR_IN
) {
6831 ZERO_STRUCT(r
->out
);
6833 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6834 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6836 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6837 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6838 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6839 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6840 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6841 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
6843 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6844 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
6845 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
6846 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
6847 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6848 NDR_PULL_ALLOC(ndr
, r
->in
.names
);
6850 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6851 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, LIBNDR_FLAG_REF_ALLOC
);
6852 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
6853 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
6854 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
6855 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6856 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
6858 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6859 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
6860 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
6861 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6862 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6863 ZERO_STRUCTP(r
->out
.domains
);
6864 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
6865 *r
->out
.names
= *r
->in
.names
;
6866 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6867 *r
->out
.count
= *r
->in
.count
;
6869 if (flags
& NDR_OUT
) {
6870 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6871 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
6873 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6874 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
6875 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
6877 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
6879 *r
->out
.domains
= NULL
;
6881 if (*r
->out
.domains
) {
6882 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6883 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
6884 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
6885 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
6887 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
6888 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6889 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
6891 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6892 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.names
, LIBNDR_FLAG_REF_ALLOC
);
6893 NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
6894 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
6895 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6896 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
6898 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6899 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
6900 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
6901 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
6902 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
6904 return NDR_ERR_SUCCESS
;
6907 _PUBLIC_
void ndr_print_lsa_LookupSids(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupSids
*r
)
6909 ndr_print_struct(ndr
, name
, "lsa_LookupSids");
6911 if (flags
& NDR_SET_VALUES
) {
6912 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6914 if (flags
& NDR_IN
) {
6915 ndr_print_struct(ndr
, "in", "lsa_LookupSids");
6917 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6919 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6921 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
6923 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
6925 ndr_print_ptr(ndr
, "names", r
->in
.names
);
6927 ndr_print_lsa_TransNameArray(ndr
, "names", r
->in
.names
);
6929 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
6930 ndr_print_ptr(ndr
, "count", r
->in
.count
);
6932 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
6936 if (flags
& NDR_OUT
) {
6937 ndr_print_struct(ndr
, "out", "lsa_LookupSids");
6939 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
6941 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
6943 if (*r
->out
.domains
) {
6944 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
6948 ndr_print_ptr(ndr
, "names", r
->out
.names
);
6950 ndr_print_lsa_TransNameArray(ndr
, "names", r
->out
.names
);
6952 ndr_print_ptr(ndr
, "count", r
->out
.count
);
6954 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
6956 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
6962 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_CreateSecret(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateSecret
*r
)
6964 if (flags
& NDR_IN
) {
6965 if (r
->in
.handle
== NULL
) {
6966 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6968 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6969 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
6970 NDR_CHECK(ndr_push_lsa_SecretAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
6972 if (flags
& NDR_OUT
) {
6973 if (r
->out
.sec_handle
== NULL
) {
6974 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6976 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
6977 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
6979 return NDR_ERR_SUCCESS
;
6982 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_CreateSecret(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateSecret
*r
)
6984 TALLOC_CTX
*_mem_save_handle_0
;
6985 TALLOC_CTX
*_mem_save_sec_handle_0
;
6986 if (flags
& NDR_IN
) {
6987 ZERO_STRUCT(r
->out
);
6989 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6990 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6992 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6993 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6994 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6995 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6996 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
6997 NDR_CHECK(ndr_pull_lsa_SecretAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
6998 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
6999 ZERO_STRUCTP(r
->out
.sec_handle
);
7001 if (flags
& NDR_OUT
) {
7002 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7003 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
7005 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7006 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
7007 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
7008 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7009 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7011 return NDR_ERR_SUCCESS
;
7014 _PUBLIC_
void ndr_print_lsa_CreateSecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateSecret
*r
)
7016 ndr_print_struct(ndr
, name
, "lsa_CreateSecret");
7018 if (flags
& NDR_SET_VALUES
) {
7019 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7021 if (flags
& NDR_IN
) {
7022 ndr_print_struct(ndr
, "in", "lsa_CreateSecret");
7024 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7026 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7028 ndr_print_lsa_String(ndr
, "name", &r
->in
.name
);
7029 ndr_print_lsa_SecretAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
7032 if (flags
& NDR_OUT
) {
7033 ndr_print_struct(ndr
, "out", "lsa_CreateSecret");
7035 ndr_print_ptr(ndr
, "sec_handle", r
->out
.sec_handle
);
7037 ndr_print_policy_handle(ndr
, "sec_handle", r
->out
.sec_handle
);
7039 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7045 static enum ndr_err_code
ndr_push_lsa_OpenAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenAccount
*r
)
7047 if (flags
& NDR_IN
) {
7048 if (r
->in
.handle
== NULL
) {
7049 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7051 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7052 if (r
->in
.sid
== NULL
) {
7053 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7055 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
7056 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7058 if (flags
& NDR_OUT
) {
7059 if (r
->out
.acct_handle
== NULL
) {
7060 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7062 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
7063 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7065 return NDR_ERR_SUCCESS
;
7068 static enum ndr_err_code
ndr_pull_lsa_OpenAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenAccount
*r
)
7070 TALLOC_CTX
*_mem_save_handle_0
;
7071 TALLOC_CTX
*_mem_save_sid_0
;
7072 TALLOC_CTX
*_mem_save_acct_handle_0
;
7073 if (flags
& NDR_IN
) {
7074 ZERO_STRUCT(r
->out
);
7076 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7077 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7079 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7080 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7081 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7082 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7083 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7084 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
7086 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7087 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
7088 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
7089 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
7090 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7091 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
7092 ZERO_STRUCTP(r
->out
.acct_handle
);
7094 if (flags
& NDR_OUT
) {
7095 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7096 NDR_PULL_ALLOC(ndr
, r
->out
.acct_handle
);
7098 _mem_save_acct_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7099 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.acct_handle
, LIBNDR_FLAG_REF_ALLOC
);
7100 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.acct_handle
));
7101 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_acct_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7102 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7104 return NDR_ERR_SUCCESS
;
7107 _PUBLIC_
void ndr_print_lsa_OpenAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenAccount
*r
)
7109 ndr_print_struct(ndr
, name
, "lsa_OpenAccount");
7111 if (flags
& NDR_SET_VALUES
) {
7112 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7114 if (flags
& NDR_IN
) {
7115 ndr_print_struct(ndr
, "in", "lsa_OpenAccount");
7117 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7119 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7121 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
7123 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
7125 ndr_print_lsa_AccountAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
7128 if (flags
& NDR_OUT
) {
7129 ndr_print_struct(ndr
, "out", "lsa_OpenAccount");
7131 ndr_print_ptr(ndr
, "acct_handle", r
->out
.acct_handle
);
7133 ndr_print_policy_handle(ndr
, "acct_handle", r
->out
.acct_handle
);
7135 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7141 static enum ndr_err_code
ndr_push_lsa_EnumPrivsAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumPrivsAccount
*r
)
7143 if (flags
& NDR_IN
) {
7144 if (r
->in
.handle
== NULL
) {
7145 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7147 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7149 if (flags
& NDR_OUT
) {
7150 if (r
->out
.privs
== NULL
) {
7151 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7153 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.privs
));
7154 if (*r
->out
.privs
) {
7155 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, *r
->out
.privs
));
7157 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7159 return NDR_ERR_SUCCESS
;
7162 static enum ndr_err_code
ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumPrivsAccount
*r
)
7164 uint32_t _ptr_privs
;
7165 TALLOC_CTX
*_mem_save_handle_0
;
7166 TALLOC_CTX
*_mem_save_privs_0
;
7167 TALLOC_CTX
*_mem_save_privs_1
;
7168 if (flags
& NDR_IN
) {
7169 ZERO_STRUCT(r
->out
);
7171 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7172 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7174 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7175 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7176 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7177 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7178 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
7179 ZERO_STRUCTP(r
->out
.privs
);
7181 if (flags
& NDR_OUT
) {
7182 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7183 NDR_PULL_ALLOC(ndr
, r
->out
.privs
);
7185 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7186 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.privs
, LIBNDR_FLAG_REF_ALLOC
);
7187 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_privs
));
7189 NDR_PULL_ALLOC(ndr
, *r
->out
.privs
);
7191 *r
->out
.privs
= NULL
;
7193 if (*r
->out
.privs
) {
7194 _mem_save_privs_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7195 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.privs
, 0);
7196 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, *r
->out
.privs
));
7197 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_1
, 0);
7199 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, LIBNDR_FLAG_REF_ALLOC
);
7200 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7202 return NDR_ERR_SUCCESS
;
7205 _PUBLIC_
void ndr_print_lsa_EnumPrivsAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumPrivsAccount
*r
)
7207 ndr_print_struct(ndr
, name
, "lsa_EnumPrivsAccount");
7209 if (flags
& NDR_SET_VALUES
) {
7210 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7212 if (flags
& NDR_IN
) {
7213 ndr_print_struct(ndr
, "in", "lsa_EnumPrivsAccount");
7215 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7217 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7221 if (flags
& NDR_OUT
) {
7222 ndr_print_struct(ndr
, "out", "lsa_EnumPrivsAccount");
7224 ndr_print_ptr(ndr
, "privs", r
->out
.privs
);
7226 ndr_print_ptr(ndr
, "privs", *r
->out
.privs
);
7228 if (*r
->out
.privs
) {
7229 ndr_print_lsa_PrivilegeSet(ndr
, "privs", *r
->out
.privs
);
7233 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7239 static enum ndr_err_code
ndr_push_lsa_AddPrivilegesToAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_AddPrivilegesToAccount
*r
)
7241 if (flags
& NDR_IN
) {
7242 if (r
->in
.handle
== NULL
) {
7243 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7245 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7246 if (r
->in
.privs
== NULL
) {
7247 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7249 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7251 if (flags
& NDR_OUT
) {
7252 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7254 return NDR_ERR_SUCCESS
;
7257 static enum ndr_err_code
ndr_pull_lsa_AddPrivilegesToAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_AddPrivilegesToAccount
*r
)
7259 TALLOC_CTX
*_mem_save_handle_0
;
7260 TALLOC_CTX
*_mem_save_privs_0
;
7261 if (flags
& NDR_IN
) {
7262 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7263 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7265 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7266 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7267 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7268 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7269 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7270 NDR_PULL_ALLOC(ndr
, r
->in
.privs
);
7272 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7273 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.privs
, LIBNDR_FLAG_REF_ALLOC
);
7274 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7275 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, LIBNDR_FLAG_REF_ALLOC
);
7277 if (flags
& NDR_OUT
) {
7278 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7280 return NDR_ERR_SUCCESS
;
7283 _PUBLIC_
void ndr_print_lsa_AddPrivilegesToAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_AddPrivilegesToAccount
*r
)
7285 ndr_print_struct(ndr
, name
, "lsa_AddPrivilegesToAccount");
7287 if (flags
& NDR_SET_VALUES
) {
7288 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7290 if (flags
& NDR_IN
) {
7291 ndr_print_struct(ndr
, "in", "lsa_AddPrivilegesToAccount");
7293 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7295 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7297 ndr_print_ptr(ndr
, "privs", r
->in
.privs
);
7299 ndr_print_lsa_PrivilegeSet(ndr
, "privs", r
->in
.privs
);
7303 if (flags
& NDR_OUT
) {
7304 ndr_print_struct(ndr
, "out", "lsa_AddPrivilegesToAccount");
7306 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7312 static enum ndr_err_code
ndr_push_lsa_RemovePrivilegesFromAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_RemovePrivilegesFromAccount
*r
)
7314 if (flags
& NDR_IN
) {
7315 if (r
->in
.handle
== NULL
) {
7316 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7318 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7319 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.remove_all
));
7320 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.privs
));
7322 NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7325 if (flags
& NDR_OUT
) {
7326 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7328 return NDR_ERR_SUCCESS
;
7331 static enum ndr_err_code
ndr_pull_lsa_RemovePrivilegesFromAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_RemovePrivilegesFromAccount
*r
)
7333 uint32_t _ptr_privs
;
7334 TALLOC_CTX
*_mem_save_handle_0
;
7335 TALLOC_CTX
*_mem_save_privs_0
;
7336 if (flags
& NDR_IN
) {
7337 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7338 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7340 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7341 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7342 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7343 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7344 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.remove_all
));
7345 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_privs
));
7347 NDR_PULL_ALLOC(ndr
, r
->in
.privs
);
7352 _mem_save_privs_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7353 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.privs
, 0);
7354 NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr
, NDR_SCALARS
, r
->in
.privs
));
7355 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_privs_0
, 0);
7358 if (flags
& NDR_OUT
) {
7359 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7361 return NDR_ERR_SUCCESS
;
7364 _PUBLIC_
void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_RemovePrivilegesFromAccount
*r
)
7366 ndr_print_struct(ndr
, name
, "lsa_RemovePrivilegesFromAccount");
7368 if (flags
& NDR_SET_VALUES
) {
7369 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7371 if (flags
& NDR_IN
) {
7372 ndr_print_struct(ndr
, "in", "lsa_RemovePrivilegesFromAccount");
7374 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7376 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7378 ndr_print_uint8(ndr
, "remove_all", r
->in
.remove_all
);
7379 ndr_print_ptr(ndr
, "privs", r
->in
.privs
);
7382 ndr_print_lsa_PrivilegeSet(ndr
, "privs", r
->in
.privs
);
7387 if (flags
& NDR_OUT
) {
7388 ndr_print_struct(ndr
, "out", "lsa_RemovePrivilegesFromAccount");
7390 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7396 static enum ndr_err_code
ndr_push_lsa_GetQuotasForAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_GetQuotasForAccount
*r
)
7398 if (flags
& NDR_IN
) {
7400 if (flags
& NDR_OUT
) {
7401 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7403 return NDR_ERR_SUCCESS
;
7406 static enum ndr_err_code
ndr_pull_lsa_GetQuotasForAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_GetQuotasForAccount
*r
)
7408 if (flags
& NDR_IN
) {
7410 if (flags
& NDR_OUT
) {
7411 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7413 return NDR_ERR_SUCCESS
;
7416 _PUBLIC_
void ndr_print_lsa_GetQuotasForAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_GetQuotasForAccount
*r
)
7418 ndr_print_struct(ndr
, name
, "lsa_GetQuotasForAccount");
7420 if (flags
& NDR_SET_VALUES
) {
7421 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7423 if (flags
& NDR_IN
) {
7424 ndr_print_struct(ndr
, "in", "lsa_GetQuotasForAccount");
7428 if (flags
& NDR_OUT
) {
7429 ndr_print_struct(ndr
, "out", "lsa_GetQuotasForAccount");
7431 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7437 static enum ndr_err_code
ndr_push_lsa_SetQuotasForAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_SetQuotasForAccount
*r
)
7439 if (flags
& NDR_IN
) {
7441 if (flags
& NDR_OUT
) {
7442 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7444 return NDR_ERR_SUCCESS
;
7447 static enum ndr_err_code
ndr_pull_lsa_SetQuotasForAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_SetQuotasForAccount
*r
)
7449 if (flags
& NDR_IN
) {
7451 if (flags
& NDR_OUT
) {
7452 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7454 return NDR_ERR_SUCCESS
;
7457 _PUBLIC_
void ndr_print_lsa_SetQuotasForAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetQuotasForAccount
*r
)
7459 ndr_print_struct(ndr
, name
, "lsa_SetQuotasForAccount");
7461 if (flags
& NDR_SET_VALUES
) {
7462 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7464 if (flags
& NDR_IN
) {
7465 ndr_print_struct(ndr
, "in", "lsa_SetQuotasForAccount");
7469 if (flags
& NDR_OUT
) {
7470 ndr_print_struct(ndr
, "out", "lsa_SetQuotasForAccount");
7472 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7478 static enum ndr_err_code
ndr_push_lsa_GetSystemAccessAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_GetSystemAccessAccount
*r
)
7480 if (flags
& NDR_IN
) {
7481 if (r
->in
.handle
== NULL
) {
7482 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7484 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7486 if (flags
& NDR_OUT
) {
7487 if (r
->out
.access_mask
== NULL
) {
7488 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7490 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, *r
->out
.access_mask
));
7491 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7493 return NDR_ERR_SUCCESS
;
7496 static enum ndr_err_code
ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_GetSystemAccessAccount
*r
)
7498 TALLOC_CTX
*_mem_save_handle_0
;
7499 TALLOC_CTX
*_mem_save_access_mask_0
;
7500 if (flags
& NDR_IN
) {
7501 ZERO_STRUCT(r
->out
);
7503 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7504 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7506 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7507 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7508 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7509 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7510 NDR_PULL_ALLOC(ndr
, r
->out
.access_mask
);
7511 ZERO_STRUCTP(r
->out
.access_mask
);
7513 if (flags
& NDR_OUT
) {
7514 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7515 NDR_PULL_ALLOC(ndr
, r
->out
.access_mask
);
7517 _mem_save_access_mask_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7518 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.access_mask
, LIBNDR_FLAG_REF_ALLOC
);
7519 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, r
->out
.access_mask
));
7520 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_access_mask_0
, LIBNDR_FLAG_REF_ALLOC
);
7521 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7523 return NDR_ERR_SUCCESS
;
7526 _PUBLIC_
void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_GetSystemAccessAccount
*r
)
7528 ndr_print_struct(ndr
, name
, "lsa_GetSystemAccessAccount");
7530 if (flags
& NDR_SET_VALUES
) {
7531 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7533 if (flags
& NDR_IN
) {
7534 ndr_print_struct(ndr
, "in", "lsa_GetSystemAccessAccount");
7536 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7538 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7542 if (flags
& NDR_OUT
) {
7543 ndr_print_struct(ndr
, "out", "lsa_GetSystemAccessAccount");
7545 ndr_print_ptr(ndr
, "access_mask", r
->out
.access_mask
);
7547 ndr_print_lsa_AccountAccessMask(ndr
, "access_mask", *r
->out
.access_mask
);
7549 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7555 static enum ndr_err_code
ndr_push_lsa_SetSystemAccessAccount(struct ndr_push
*ndr
, int flags
, const struct lsa_SetSystemAccessAccount
*r
)
7557 if (flags
& NDR_IN
) {
7558 if (r
->in
.handle
== NULL
) {
7559 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7561 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7562 NDR_CHECK(ndr_push_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7564 if (flags
& NDR_OUT
) {
7565 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7567 return NDR_ERR_SUCCESS
;
7570 static enum ndr_err_code
ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull
*ndr
, int flags
, struct lsa_SetSystemAccessAccount
*r
)
7572 TALLOC_CTX
*_mem_save_handle_0
;
7573 if (flags
& NDR_IN
) {
7574 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7575 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7577 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7578 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7579 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7580 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7581 NDR_CHECK(ndr_pull_lsa_AccountAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7583 if (flags
& NDR_OUT
) {
7584 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7586 return NDR_ERR_SUCCESS
;
7589 _PUBLIC_
void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetSystemAccessAccount
*r
)
7591 ndr_print_struct(ndr
, name
, "lsa_SetSystemAccessAccount");
7593 if (flags
& NDR_SET_VALUES
) {
7594 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7596 if (flags
& NDR_IN
) {
7597 ndr_print_struct(ndr
, "in", "lsa_SetSystemAccessAccount");
7599 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7601 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7603 ndr_print_lsa_AccountAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
7606 if (flags
& NDR_OUT
) {
7607 ndr_print_struct(ndr
, "out", "lsa_SetSystemAccessAccount");
7609 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7615 static enum ndr_err_code
ndr_push_lsa_OpenTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenTrustedDomain
*r
)
7617 if (flags
& NDR_IN
) {
7618 if (r
->in
.handle
== NULL
) {
7619 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7621 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7622 if (r
->in
.sid
== NULL
) {
7623 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7625 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
7626 NDR_CHECK(ndr_push_lsa_TrustedAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7628 if (flags
& NDR_OUT
) {
7629 if (r
->out
.trustdom_handle
== NULL
) {
7630 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7632 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
7633 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7635 return NDR_ERR_SUCCESS
;
7638 static enum ndr_err_code
ndr_pull_lsa_OpenTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenTrustedDomain
*r
)
7640 TALLOC_CTX
*_mem_save_handle_0
;
7641 TALLOC_CTX
*_mem_save_sid_0
;
7642 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
7643 if (flags
& NDR_IN
) {
7644 ZERO_STRUCT(r
->out
);
7646 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7647 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7649 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7650 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7651 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7652 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7653 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7654 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
7656 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7657 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
7658 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
7659 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
7660 NDR_CHECK(ndr_pull_lsa_TrustedAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7661 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
7662 ZERO_STRUCTP(r
->out
.trustdom_handle
);
7664 if (flags
& NDR_OUT
) {
7665 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7666 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
7668 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7669 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
7670 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
7671 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7672 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7674 return NDR_ERR_SUCCESS
;
7677 _PUBLIC_
void ndr_print_lsa_OpenTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenTrustedDomain
*r
)
7679 ndr_print_struct(ndr
, name
, "lsa_OpenTrustedDomain");
7681 if (flags
& NDR_SET_VALUES
) {
7682 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7684 if (flags
& NDR_IN
) {
7685 ndr_print_struct(ndr
, "in", "lsa_OpenTrustedDomain");
7687 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7689 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7691 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
7693 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
7695 ndr_print_lsa_TrustedAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
7698 if (flags
& NDR_OUT
) {
7699 ndr_print_struct(ndr
, "out", "lsa_OpenTrustedDomain");
7701 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
7703 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
7705 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7711 static enum ndr_err_code
ndr_push_lsa_QueryTrustedDomainInfo(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryTrustedDomainInfo
*r
)
7713 if (flags
& NDR_IN
) {
7714 if (r
->in
.trustdom_handle
== NULL
) {
7715 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7717 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7718 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
7720 if (flags
& NDR_OUT
) {
7721 if (r
->out
.info
== NULL
) {
7722 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7724 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
7726 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
7727 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
7729 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7731 return NDR_ERR_SUCCESS
;
7734 static enum ndr_err_code
ndr_pull_lsa_QueryTrustedDomainInfo(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryTrustedDomainInfo
*r
)
7737 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
7738 TALLOC_CTX
*_mem_save_info_0
;
7739 TALLOC_CTX
*_mem_save_info_1
;
7740 if (flags
& NDR_IN
) {
7741 ZERO_STRUCT(r
->out
);
7743 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7744 NDR_PULL_ALLOC(ndr
, r
->in
.trustdom_handle
);
7746 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7747 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
7748 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7749 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7750 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
7751 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7752 ZERO_STRUCTP(r
->out
.info
);
7754 if (flags
& NDR_OUT
) {
7755 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7756 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
7758 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7759 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
7760 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
7762 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
7764 *r
->out
.info
= NULL
;
7767 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
7768 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
7769 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
7770 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
7771 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
7773 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7774 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7776 return NDR_ERR_SUCCESS
;
7779 _PUBLIC_
void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryTrustedDomainInfo
*r
)
7781 ndr_print_struct(ndr
, name
, "lsa_QueryTrustedDomainInfo");
7783 if (flags
& NDR_SET_VALUES
) {
7784 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7786 if (flags
& NDR_IN
) {
7787 ndr_print_struct(ndr
, "in", "lsa_QueryTrustedDomainInfo");
7789 ndr_print_ptr(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7791 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7793 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
7796 if (flags
& NDR_OUT
) {
7797 ndr_print_struct(ndr
, "out", "lsa_QueryTrustedDomainInfo");
7799 ndr_print_ptr(ndr
, "info", r
->out
.info
);
7801 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
7804 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
7805 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", *r
->out
.info
);
7809 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7815 static enum ndr_err_code
ndr_push_lsa_SetInformationTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_SetInformationTrustedDomain
*r
)
7817 if (flags
& NDR_IN
) {
7818 if (r
->in
.trustdom_handle
== NULL
) {
7819 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7821 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7822 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
7823 if (r
->in
.info
== NULL
) {
7824 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7826 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
7827 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
7829 if (flags
& NDR_OUT
) {
7830 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7832 return NDR_ERR_SUCCESS
;
7835 static enum ndr_err_code
ndr_pull_lsa_SetInformationTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_SetInformationTrustedDomain
*r
)
7837 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
7838 TALLOC_CTX
*_mem_save_info_0
;
7839 if (flags
& NDR_IN
) {
7840 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7841 NDR_PULL_ALLOC(ndr
, r
->in
.trustdom_handle
);
7843 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7844 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
7845 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.trustdom_handle
));
7846 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7847 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
7848 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7849 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
7851 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7852 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
7853 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
7854 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
7855 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
7857 if (flags
& NDR_OUT
) {
7858 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7860 return NDR_ERR_SUCCESS
;
7863 _PUBLIC_
void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetInformationTrustedDomain
*r
)
7865 ndr_print_struct(ndr
, name
, "lsa_SetInformationTrustedDomain");
7867 if (flags
& NDR_SET_VALUES
) {
7868 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7870 if (flags
& NDR_IN
) {
7871 ndr_print_struct(ndr
, "in", "lsa_SetInformationTrustedDomain");
7873 ndr_print_ptr(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7875 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->in
.trustdom_handle
);
7877 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
7878 ndr_print_ptr(ndr
, "info", r
->in
.info
);
7880 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
7881 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", r
->in
.info
);
7885 if (flags
& NDR_OUT
) {
7886 ndr_print_struct(ndr
, "out", "lsa_SetInformationTrustedDomain");
7888 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7894 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_OpenSecret(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenSecret
*r
)
7896 if (flags
& NDR_IN
) {
7897 if (r
->in
.handle
== NULL
) {
7898 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7900 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7901 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
7902 NDR_CHECK(ndr_push_lsa_SecretAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
7904 if (flags
& NDR_OUT
) {
7905 if (r
->out
.sec_handle
== NULL
) {
7906 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7908 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
7909 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7911 return NDR_ERR_SUCCESS
;
7914 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_OpenSecret(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenSecret
*r
)
7916 TALLOC_CTX
*_mem_save_handle_0
;
7917 TALLOC_CTX
*_mem_save_sec_handle_0
;
7918 if (flags
& NDR_IN
) {
7919 ZERO_STRUCT(r
->out
);
7921 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7922 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
7924 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7925 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
7926 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
7927 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7928 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
7929 NDR_CHECK(ndr_pull_lsa_SecretAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
7930 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
7931 ZERO_STRUCTP(r
->out
.sec_handle
);
7933 if (flags
& NDR_OUT
) {
7934 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
7935 NDR_PULL_ALLOC(ndr
, r
->out
.sec_handle
);
7937 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7938 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
7939 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.sec_handle
));
7940 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
7941 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
7943 return NDR_ERR_SUCCESS
;
7946 _PUBLIC_
void ndr_print_lsa_OpenSecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenSecret
*r
)
7948 ndr_print_struct(ndr
, name
, "lsa_OpenSecret");
7950 if (flags
& NDR_SET_VALUES
) {
7951 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
7953 if (flags
& NDR_IN
) {
7954 ndr_print_struct(ndr
, "in", "lsa_OpenSecret");
7956 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
7958 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
7960 ndr_print_lsa_String(ndr
, "name", &r
->in
.name
);
7961 ndr_print_lsa_SecretAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
7964 if (flags
& NDR_OUT
) {
7965 ndr_print_struct(ndr
, "out", "lsa_OpenSecret");
7967 ndr_print_ptr(ndr
, "sec_handle", r
->out
.sec_handle
);
7969 ndr_print_policy_handle(ndr
, "sec_handle", r
->out
.sec_handle
);
7971 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
7977 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_SetSecret(struct ndr_push
*ndr
, int flags
, const struct lsa_SetSecret
*r
)
7979 if (flags
& NDR_IN
) {
7980 if (r
->in
.sec_handle
== NULL
) {
7981 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
7983 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
7984 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_val
));
7985 if (r
->in
.new_val
) {
7986 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
7988 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_val
));
7989 if (r
->in
.old_val
) {
7990 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
7993 if (flags
& NDR_OUT
) {
7994 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
7996 return NDR_ERR_SUCCESS
;
7999 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_SetSecret(struct ndr_pull
*ndr
, int flags
, struct lsa_SetSecret
*r
)
8001 uint32_t _ptr_new_val
;
8002 uint32_t _ptr_old_val
;
8003 TALLOC_CTX
*_mem_save_sec_handle_0
;
8004 TALLOC_CTX
*_mem_save_new_val_0
;
8005 TALLOC_CTX
*_mem_save_old_val_0
;
8006 if (flags
& NDR_IN
) {
8007 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8008 NDR_PULL_ALLOC(ndr
, r
->in
.sec_handle
);
8010 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8011 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
8012 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
8013 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8014 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_val
));
8016 NDR_PULL_ALLOC(ndr
, r
->in
.new_val
);
8018 r
->in
.new_val
= NULL
;
8020 if (r
->in
.new_val
) {
8021 _mem_save_new_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8022 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_val
, 0);
8023 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
8024 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_val_0
, 0);
8026 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_val
));
8028 NDR_PULL_ALLOC(ndr
, r
->in
.old_val
);
8030 r
->in
.old_val
= NULL
;
8032 if (r
->in
.old_val
) {
8033 _mem_save_old_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8034 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_val
, 0);
8035 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
8036 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_val_0
, 0);
8039 if (flags
& NDR_OUT
) {
8040 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8042 return NDR_ERR_SUCCESS
;
8045 _PUBLIC_
void ndr_print_lsa_SetSecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetSecret
*r
)
8047 ndr_print_struct(ndr
, name
, "lsa_SetSecret");
8049 if (flags
& NDR_SET_VALUES
) {
8050 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8052 if (flags
& NDR_IN
) {
8053 ndr_print_struct(ndr
, "in", "lsa_SetSecret");
8055 ndr_print_ptr(ndr
, "sec_handle", r
->in
.sec_handle
);
8057 ndr_print_policy_handle(ndr
, "sec_handle", r
->in
.sec_handle
);
8059 ndr_print_ptr(ndr
, "new_val", r
->in
.new_val
);
8061 if (r
->in
.new_val
) {
8062 ndr_print_lsa_DATA_BUF(ndr
, "new_val", r
->in
.new_val
);
8065 ndr_print_ptr(ndr
, "old_val", r
->in
.old_val
);
8067 if (r
->in
.old_val
) {
8068 ndr_print_lsa_DATA_BUF(ndr
, "old_val", r
->in
.old_val
);
8073 if (flags
& NDR_OUT
) {
8074 ndr_print_struct(ndr
, "out", "lsa_SetSecret");
8076 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8082 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_QuerySecret(struct ndr_push
*ndr
, int flags
, const struct lsa_QuerySecret
*r
)
8084 if (flags
& NDR_IN
) {
8085 if (r
->in
.sec_handle
== NULL
) {
8086 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8088 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
8089 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_val
));
8090 if (r
->in
.new_val
) {
8091 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
8093 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.new_mtime
));
8094 if (r
->in
.new_mtime
) {
8095 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->in
.new_mtime
));
8097 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_val
));
8098 if (r
->in
.old_val
) {
8099 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
8101 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.old_mtime
));
8102 if (r
->in
.old_mtime
) {
8103 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->in
.old_mtime
));
8106 if (flags
& NDR_OUT
) {
8107 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.new_val
));
8108 if (r
->out
.new_val
) {
8109 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.new_val
));
8111 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.new_mtime
));
8112 if (r
->out
.new_mtime
) {
8113 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->out
.new_mtime
));
8115 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.old_val
));
8116 if (r
->out
.old_val
) {
8117 NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.old_val
));
8119 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.old_mtime
));
8120 if (r
->out
.old_mtime
) {
8121 NDR_CHECK(ndr_push_NTTIME_hyper(ndr
, NDR_SCALARS
, *r
->out
.old_mtime
));
8123 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8125 return NDR_ERR_SUCCESS
;
8128 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_QuerySecret(struct ndr_pull
*ndr
, int flags
, struct lsa_QuerySecret
*r
)
8130 uint32_t _ptr_new_val
;
8131 uint32_t _ptr_new_mtime
;
8132 uint32_t _ptr_old_val
;
8133 uint32_t _ptr_old_mtime
;
8134 TALLOC_CTX
*_mem_save_sec_handle_0
;
8135 TALLOC_CTX
*_mem_save_new_val_0
;
8136 TALLOC_CTX
*_mem_save_new_mtime_0
;
8137 TALLOC_CTX
*_mem_save_old_val_0
;
8138 TALLOC_CTX
*_mem_save_old_mtime_0
;
8139 if (flags
& NDR_IN
) {
8140 ZERO_STRUCT(r
->out
);
8142 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8143 NDR_PULL_ALLOC(ndr
, r
->in
.sec_handle
);
8145 _mem_save_sec_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8146 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sec_handle
, LIBNDR_FLAG_REF_ALLOC
);
8147 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.sec_handle
));
8148 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sec_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8149 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_val
));
8151 NDR_PULL_ALLOC(ndr
, r
->in
.new_val
);
8153 r
->in
.new_val
= NULL
;
8155 if (r
->in
.new_val
) {
8156 _mem_save_new_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8157 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_val
, 0);
8158 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.new_val
));
8159 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_val_0
, 0);
8161 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_mtime
));
8162 if (_ptr_new_mtime
) {
8163 NDR_PULL_ALLOC(ndr
, r
->in
.new_mtime
);
8165 r
->in
.new_mtime
= NULL
;
8167 if (r
->in
.new_mtime
) {
8168 _mem_save_new_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8169 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.new_mtime
, 0);
8170 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->in
.new_mtime
));
8171 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_mtime_0
, 0);
8173 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_val
));
8175 NDR_PULL_ALLOC(ndr
, r
->in
.old_val
);
8177 r
->in
.old_val
= NULL
;
8179 if (r
->in
.old_val
) {
8180 _mem_save_old_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8181 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_val
, 0);
8182 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.old_val
));
8183 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_val_0
, 0);
8185 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_mtime
));
8186 if (_ptr_old_mtime
) {
8187 NDR_PULL_ALLOC(ndr
, r
->in
.old_mtime
);
8189 r
->in
.old_mtime
= NULL
;
8191 if (r
->in
.old_mtime
) {
8192 _mem_save_old_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8193 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.old_mtime
, 0);
8194 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->in
.old_mtime
));
8195 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_mtime_0
, 0);
8198 if (flags
& NDR_OUT
) {
8199 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_val
));
8201 NDR_PULL_ALLOC(ndr
, r
->out
.new_val
);
8203 r
->out
.new_val
= NULL
;
8205 if (r
->out
.new_val
) {
8206 _mem_save_new_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8207 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.new_val
, 0);
8208 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.new_val
));
8209 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_val_0
, 0);
8211 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_new_mtime
));
8212 if (_ptr_new_mtime
) {
8213 NDR_PULL_ALLOC(ndr
, r
->out
.new_mtime
);
8215 r
->out
.new_mtime
= NULL
;
8217 if (r
->out
.new_mtime
) {
8218 _mem_save_new_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8219 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.new_mtime
, 0);
8220 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->out
.new_mtime
));
8221 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_new_mtime_0
, 0);
8223 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_val
));
8225 NDR_PULL_ALLOC(ndr
, r
->out
.old_val
);
8227 r
->out
.old_val
= NULL
;
8229 if (r
->out
.old_val
) {
8230 _mem_save_old_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8231 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.old_val
, 0);
8232 NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.old_val
));
8233 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_val_0
, 0);
8235 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_old_mtime
));
8236 if (_ptr_old_mtime
) {
8237 NDR_PULL_ALLOC(ndr
, r
->out
.old_mtime
);
8239 r
->out
.old_mtime
= NULL
;
8241 if (r
->out
.old_mtime
) {
8242 _mem_save_old_mtime_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8243 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.old_mtime
, 0);
8244 NDR_CHECK(ndr_pull_NTTIME_hyper(ndr
, NDR_SCALARS
, r
->out
.old_mtime
));
8245 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_old_mtime_0
, 0);
8247 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8249 return NDR_ERR_SUCCESS
;
8252 _PUBLIC_
void ndr_print_lsa_QuerySecret(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QuerySecret
*r
)
8254 ndr_print_struct(ndr
, name
, "lsa_QuerySecret");
8256 if (flags
& NDR_SET_VALUES
) {
8257 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8259 if (flags
& NDR_IN
) {
8260 ndr_print_struct(ndr
, "in", "lsa_QuerySecret");
8262 ndr_print_ptr(ndr
, "sec_handle", r
->in
.sec_handle
);
8264 ndr_print_policy_handle(ndr
, "sec_handle", r
->in
.sec_handle
);
8266 ndr_print_ptr(ndr
, "new_val", r
->in
.new_val
);
8268 if (r
->in
.new_val
) {
8269 ndr_print_lsa_DATA_BUF_PTR(ndr
, "new_val", r
->in
.new_val
);
8272 ndr_print_ptr(ndr
, "new_mtime", r
->in
.new_mtime
);
8274 if (r
->in
.new_mtime
) {
8275 ndr_print_NTTIME_hyper(ndr
, "new_mtime", *r
->in
.new_mtime
);
8278 ndr_print_ptr(ndr
, "old_val", r
->in
.old_val
);
8280 if (r
->in
.old_val
) {
8281 ndr_print_lsa_DATA_BUF_PTR(ndr
, "old_val", r
->in
.old_val
);
8284 ndr_print_ptr(ndr
, "old_mtime", r
->in
.old_mtime
);
8286 if (r
->in
.old_mtime
) {
8287 ndr_print_NTTIME_hyper(ndr
, "old_mtime", *r
->in
.old_mtime
);
8292 if (flags
& NDR_OUT
) {
8293 ndr_print_struct(ndr
, "out", "lsa_QuerySecret");
8295 ndr_print_ptr(ndr
, "new_val", r
->out
.new_val
);
8297 if (r
->out
.new_val
) {
8298 ndr_print_lsa_DATA_BUF_PTR(ndr
, "new_val", r
->out
.new_val
);
8301 ndr_print_ptr(ndr
, "new_mtime", r
->out
.new_mtime
);
8303 if (r
->out
.new_mtime
) {
8304 ndr_print_NTTIME_hyper(ndr
, "new_mtime", *r
->out
.new_mtime
);
8307 ndr_print_ptr(ndr
, "old_val", r
->out
.old_val
);
8309 if (r
->out
.old_val
) {
8310 ndr_print_lsa_DATA_BUF_PTR(ndr
, "old_val", r
->out
.old_val
);
8313 ndr_print_ptr(ndr
, "old_mtime", r
->out
.old_mtime
);
8315 if (r
->out
.old_mtime
) {
8316 ndr_print_NTTIME_hyper(ndr
, "old_mtime", *r
->out
.old_mtime
);
8319 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8325 static enum ndr_err_code
ndr_push_lsa_LookupPrivValue(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupPrivValue
*r
)
8327 if (flags
& NDR_IN
) {
8328 if (r
->in
.handle
== NULL
) {
8329 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8331 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8332 if (r
->in
.name
== NULL
) {
8333 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8335 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8337 if (flags
& NDR_OUT
) {
8338 if (r
->out
.luid
== NULL
) {
8339 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8341 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, r
->out
.luid
));
8342 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8344 return NDR_ERR_SUCCESS
;
8347 static enum ndr_err_code
ndr_pull_lsa_LookupPrivValue(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupPrivValue
*r
)
8349 TALLOC_CTX
*_mem_save_handle_0
;
8350 TALLOC_CTX
*_mem_save_name_0
;
8351 TALLOC_CTX
*_mem_save_luid_0
;
8352 if (flags
& NDR_IN
) {
8353 ZERO_STRUCT(r
->out
);
8355 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8356 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8358 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8359 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8360 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8361 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8362 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8363 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
8365 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8366 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
8367 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8368 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8369 NDR_PULL_ALLOC(ndr
, r
->out
.luid
);
8370 ZERO_STRUCTP(r
->out
.luid
);
8372 if (flags
& NDR_OUT
) {
8373 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8374 NDR_PULL_ALLOC(ndr
, r
->out
.luid
);
8376 _mem_save_luid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8377 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.luid
, LIBNDR_FLAG_REF_ALLOC
);
8378 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, r
->out
.luid
));
8379 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_luid_0
, LIBNDR_FLAG_REF_ALLOC
);
8380 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8382 return NDR_ERR_SUCCESS
;
8385 _PUBLIC_
void ndr_print_lsa_LookupPrivValue(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupPrivValue
*r
)
8387 ndr_print_struct(ndr
, name
, "lsa_LookupPrivValue");
8389 if (flags
& NDR_SET_VALUES
) {
8390 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8392 if (flags
& NDR_IN
) {
8393 ndr_print_struct(ndr
, "in", "lsa_LookupPrivValue");
8395 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8397 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8399 ndr_print_ptr(ndr
, "name", r
->in
.name
);
8401 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
8405 if (flags
& NDR_OUT
) {
8406 ndr_print_struct(ndr
, "out", "lsa_LookupPrivValue");
8408 ndr_print_ptr(ndr
, "luid", r
->out
.luid
);
8410 ndr_print_lsa_LUID(ndr
, "luid", r
->out
.luid
);
8412 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8418 static enum ndr_err_code
ndr_push_lsa_LookupPrivName(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupPrivName
*r
)
8420 if (flags
& NDR_IN
) {
8421 if (r
->in
.handle
== NULL
) {
8422 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8424 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8425 if (r
->in
.luid
== NULL
) {
8426 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8428 NDR_CHECK(ndr_push_lsa_LUID(ndr
, NDR_SCALARS
, r
->in
.luid
));
8430 if (flags
& NDR_OUT
) {
8431 if (r
->out
.name
== NULL
) {
8432 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8434 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.name
));
8436 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.name
));
8438 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8440 return NDR_ERR_SUCCESS
;
8443 static enum ndr_err_code
ndr_pull_lsa_LookupPrivName(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupPrivName
*r
)
8446 TALLOC_CTX
*_mem_save_handle_0
;
8447 TALLOC_CTX
*_mem_save_luid_0
;
8448 TALLOC_CTX
*_mem_save_name_0
;
8449 TALLOC_CTX
*_mem_save_name_1
;
8450 if (flags
& NDR_IN
) {
8451 ZERO_STRUCT(r
->out
);
8453 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8454 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8456 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8457 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8458 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8459 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8460 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8461 NDR_PULL_ALLOC(ndr
, r
->in
.luid
);
8463 _mem_save_luid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8464 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.luid
, LIBNDR_FLAG_REF_ALLOC
);
8465 NDR_CHECK(ndr_pull_lsa_LUID(ndr
, NDR_SCALARS
, r
->in
.luid
));
8466 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_luid_0
, LIBNDR_FLAG_REF_ALLOC
);
8467 NDR_PULL_ALLOC(ndr
, r
->out
.name
);
8468 ZERO_STRUCTP(r
->out
.name
);
8470 if (flags
& NDR_OUT
) {
8471 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8472 NDR_PULL_ALLOC(ndr
, r
->out
.name
);
8474 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8475 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.name
, LIBNDR_FLAG_REF_ALLOC
);
8476 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
8478 NDR_PULL_ALLOC(ndr
, *r
->out
.name
);
8480 *r
->out
.name
= NULL
;
8483 _mem_save_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8484 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.name
, 0);
8485 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.name
));
8486 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_1
, 0);
8488 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8489 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8491 return NDR_ERR_SUCCESS
;
8494 _PUBLIC_
void ndr_print_lsa_LookupPrivName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupPrivName
*r
)
8496 ndr_print_struct(ndr
, name
, "lsa_LookupPrivName");
8498 if (flags
& NDR_SET_VALUES
) {
8499 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8501 if (flags
& NDR_IN
) {
8502 ndr_print_struct(ndr
, "in", "lsa_LookupPrivName");
8504 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8506 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8508 ndr_print_ptr(ndr
, "luid", r
->in
.luid
);
8510 ndr_print_lsa_LUID(ndr
, "luid", r
->in
.luid
);
8514 if (flags
& NDR_OUT
) {
8515 ndr_print_struct(ndr
, "out", "lsa_LookupPrivName");
8517 ndr_print_ptr(ndr
, "name", r
->out
.name
);
8519 ndr_print_ptr(ndr
, "name", *r
->out
.name
);
8522 ndr_print_lsa_StringLarge(ndr
, "name", *r
->out
.name
);
8526 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8532 static enum ndr_err_code
ndr_push_lsa_LookupPrivDisplayName(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupPrivDisplayName
*r
)
8534 if (flags
& NDR_IN
) {
8535 if (r
->in
.handle
== NULL
) {
8536 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8538 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8539 if (r
->in
.name
== NULL
) {
8540 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8542 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8543 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.language_id
));
8544 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.language_id_sys
));
8546 if (flags
& NDR_OUT
) {
8547 if (r
->out
.disp_name
== NULL
) {
8548 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8550 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.disp_name
));
8551 if (*r
->out
.disp_name
) {
8552 NDR_CHECK(ndr_push_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.disp_name
));
8554 if (r
->out
.returned_language_id
== NULL
) {
8555 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8557 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, *r
->out
.returned_language_id
));
8558 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8560 return NDR_ERR_SUCCESS
;
8563 static enum ndr_err_code
ndr_pull_lsa_LookupPrivDisplayName(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupPrivDisplayName
*r
)
8565 uint32_t _ptr_disp_name
;
8566 TALLOC_CTX
*_mem_save_handle_0
;
8567 TALLOC_CTX
*_mem_save_name_0
;
8568 TALLOC_CTX
*_mem_save_disp_name_0
;
8569 TALLOC_CTX
*_mem_save_disp_name_1
;
8570 TALLOC_CTX
*_mem_save_returned_language_id_0
;
8571 if (flags
& NDR_IN
) {
8572 ZERO_STRUCT(r
->out
);
8574 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8575 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8577 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8578 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8579 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8580 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8581 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8582 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
8584 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8585 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
8586 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8587 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8588 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.language_id
));
8589 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.language_id_sys
));
8590 NDR_PULL_ALLOC(ndr
, r
->out
.disp_name
);
8591 ZERO_STRUCTP(r
->out
.disp_name
);
8592 NDR_PULL_ALLOC(ndr
, r
->out
.returned_language_id
);
8593 ZERO_STRUCTP(r
->out
.returned_language_id
);
8595 if (flags
& NDR_OUT
) {
8596 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8597 NDR_PULL_ALLOC(ndr
, r
->out
.disp_name
);
8599 _mem_save_disp_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8600 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.disp_name
, LIBNDR_FLAG_REF_ALLOC
);
8601 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_disp_name
));
8602 if (_ptr_disp_name
) {
8603 NDR_PULL_ALLOC(ndr
, *r
->out
.disp_name
);
8605 *r
->out
.disp_name
= NULL
;
8607 if (*r
->out
.disp_name
) {
8608 _mem_save_disp_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
8609 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.disp_name
, 0);
8610 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.disp_name
));
8611 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_disp_name_1
, 0);
8613 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_disp_name_0
, LIBNDR_FLAG_REF_ALLOC
);
8614 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8615 NDR_PULL_ALLOC(ndr
, r
->out
.returned_language_id
);
8617 _mem_save_returned_language_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8618 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.returned_language_id
, LIBNDR_FLAG_REF_ALLOC
);
8619 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, r
->out
.returned_language_id
));
8620 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_returned_language_id_0
, LIBNDR_FLAG_REF_ALLOC
);
8621 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8623 return NDR_ERR_SUCCESS
;
8626 _PUBLIC_
void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupPrivDisplayName
*r
)
8628 ndr_print_struct(ndr
, name
, "lsa_LookupPrivDisplayName");
8630 if (flags
& NDR_SET_VALUES
) {
8631 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8633 if (flags
& NDR_IN
) {
8634 ndr_print_struct(ndr
, "in", "lsa_LookupPrivDisplayName");
8636 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8638 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8640 ndr_print_ptr(ndr
, "name", r
->in
.name
);
8642 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
8644 ndr_print_uint16(ndr
, "language_id", r
->in
.language_id
);
8645 ndr_print_uint16(ndr
, "language_id_sys", r
->in
.language_id_sys
);
8648 if (flags
& NDR_OUT
) {
8649 ndr_print_struct(ndr
, "out", "lsa_LookupPrivDisplayName");
8651 ndr_print_ptr(ndr
, "disp_name", r
->out
.disp_name
);
8653 ndr_print_ptr(ndr
, "disp_name", *r
->out
.disp_name
);
8655 if (*r
->out
.disp_name
) {
8656 ndr_print_lsa_StringLarge(ndr
, "disp_name", *r
->out
.disp_name
);
8660 ndr_print_ptr(ndr
, "returned_language_id", r
->out
.returned_language_id
);
8662 ndr_print_uint16(ndr
, "returned_language_id", *r
->out
.returned_language_id
);
8664 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8670 static enum ndr_err_code
ndr_push_lsa_DeleteObject(struct ndr_push
*ndr
, int flags
, const struct lsa_DeleteObject
*r
)
8672 if (flags
& NDR_IN
) {
8673 if (r
->in
.handle
== NULL
) {
8674 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8676 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8678 if (flags
& NDR_OUT
) {
8679 if (r
->out
.handle
== NULL
) {
8680 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8682 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
8683 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8685 return NDR_ERR_SUCCESS
;
8688 static enum ndr_err_code
ndr_pull_lsa_DeleteObject(struct ndr_pull
*ndr
, int flags
, struct lsa_DeleteObject
*r
)
8690 TALLOC_CTX
*_mem_save_handle_0
;
8691 if (flags
& NDR_IN
) {
8692 ZERO_STRUCT(r
->out
);
8694 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8695 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8697 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8698 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8699 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8700 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8701 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
8702 *r
->out
.handle
= *r
->in
.handle
;
8704 if (flags
& NDR_OUT
) {
8705 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8706 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
8708 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8709 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8710 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
8711 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8712 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8714 return NDR_ERR_SUCCESS
;
8717 _PUBLIC_
void ndr_print_lsa_DeleteObject(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_DeleteObject
*r
)
8719 ndr_print_struct(ndr
, name
, "lsa_DeleteObject");
8721 if (flags
& NDR_SET_VALUES
) {
8722 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8724 if (flags
& NDR_IN
) {
8725 ndr_print_struct(ndr
, "in", "lsa_DeleteObject");
8727 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8729 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8733 if (flags
& NDR_OUT
) {
8734 ndr_print_struct(ndr
, "out", "lsa_DeleteObject");
8736 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
8738 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
8740 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8746 static enum ndr_err_code
ndr_push_lsa_EnumAccountsWithUserRight(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumAccountsWithUserRight
*r
)
8748 if (flags
& NDR_IN
) {
8749 if (r
->in
.handle
== NULL
) {
8750 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8752 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8753 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.name
));
8755 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8758 if (flags
& NDR_OUT
) {
8759 if (r
->out
.sids
== NULL
) {
8760 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8762 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
8763 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8765 return NDR_ERR_SUCCESS
;
8768 static enum ndr_err_code
ndr_pull_lsa_EnumAccountsWithUserRight(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumAccountsWithUserRight
*r
)
8771 TALLOC_CTX
*_mem_save_handle_0
;
8772 TALLOC_CTX
*_mem_save_name_0
;
8773 TALLOC_CTX
*_mem_save_sids_0
;
8774 if (flags
& NDR_IN
) {
8775 ZERO_STRUCT(r
->out
);
8777 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8778 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8780 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8781 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8782 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8783 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8784 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
8786 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
8791 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8792 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, 0);
8793 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
8794 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
8796 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
8797 ZERO_STRUCTP(r
->out
.sids
);
8799 if (flags
& NDR_OUT
) {
8800 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8801 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
8803 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8804 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
8805 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
8806 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
8807 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8809 return NDR_ERR_SUCCESS
;
8812 _PUBLIC_
void ndr_print_lsa_EnumAccountsWithUserRight(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumAccountsWithUserRight
*r
)
8814 ndr_print_struct(ndr
, name
, "lsa_EnumAccountsWithUserRight");
8816 if (flags
& NDR_SET_VALUES
) {
8817 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8819 if (flags
& NDR_IN
) {
8820 ndr_print_struct(ndr
, "in", "lsa_EnumAccountsWithUserRight");
8822 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8824 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8826 ndr_print_ptr(ndr
, "name", r
->in
.name
);
8829 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
8834 if (flags
& NDR_OUT
) {
8835 ndr_print_struct(ndr
, "out", "lsa_EnumAccountsWithUserRight");
8837 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
8839 ndr_print_lsa_SidArray(ndr
, "sids", r
->out
.sids
);
8841 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8847 static enum ndr_err_code
ndr_push_lsa_EnumAccountRights(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumAccountRights
*r
)
8849 if (flags
& NDR_IN
) {
8850 if (r
->in
.handle
== NULL
) {
8851 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8853 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8854 if (r
->in
.sid
== NULL
) {
8855 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8857 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8859 if (flags
& NDR_OUT
) {
8860 if (r
->out
.rights
== NULL
) {
8861 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8863 NDR_CHECK(ndr_push_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rights
));
8864 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8866 return NDR_ERR_SUCCESS
;
8869 static enum ndr_err_code
ndr_pull_lsa_EnumAccountRights(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumAccountRights
*r
)
8871 TALLOC_CTX
*_mem_save_handle_0
;
8872 TALLOC_CTX
*_mem_save_sid_0
;
8873 TALLOC_CTX
*_mem_save_rights_0
;
8874 if (flags
& NDR_IN
) {
8875 ZERO_STRUCT(r
->out
);
8877 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8878 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8880 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8881 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8882 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8883 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8884 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8885 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8887 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8888 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8889 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8890 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8891 NDR_PULL_ALLOC(ndr
, r
->out
.rights
);
8892 ZERO_STRUCTP(r
->out
.rights
);
8894 if (flags
& NDR_OUT
) {
8895 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8896 NDR_PULL_ALLOC(ndr
, r
->out
.rights
);
8898 _mem_save_rights_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8899 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.rights
, LIBNDR_FLAG_REF_ALLOC
);
8900 NDR_CHECK(ndr_pull_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.rights
));
8901 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rights_0
, LIBNDR_FLAG_REF_ALLOC
);
8902 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8904 return NDR_ERR_SUCCESS
;
8907 _PUBLIC_
void ndr_print_lsa_EnumAccountRights(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumAccountRights
*r
)
8909 ndr_print_struct(ndr
, name
, "lsa_EnumAccountRights");
8911 if (flags
& NDR_SET_VALUES
) {
8912 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
8914 if (flags
& NDR_IN
) {
8915 ndr_print_struct(ndr
, "in", "lsa_EnumAccountRights");
8917 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
8919 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
8921 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
8923 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
8927 if (flags
& NDR_OUT
) {
8928 ndr_print_struct(ndr
, "out", "lsa_EnumAccountRights");
8930 ndr_print_ptr(ndr
, "rights", r
->out
.rights
);
8932 ndr_print_lsa_RightSet(ndr
, "rights", r
->out
.rights
);
8934 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
8940 static enum ndr_err_code
ndr_push_lsa_AddAccountRights(struct ndr_push
*ndr
, int flags
, const struct lsa_AddAccountRights
*r
)
8942 if (flags
& NDR_IN
) {
8943 if (r
->in
.handle
== NULL
) {
8944 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8946 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8947 if (r
->in
.sid
== NULL
) {
8948 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8950 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8951 if (r
->in
.rights
== NULL
) {
8952 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
8954 NDR_CHECK(ndr_push_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
8956 if (flags
& NDR_OUT
) {
8957 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
8959 return NDR_ERR_SUCCESS
;
8962 static enum ndr_err_code
ndr_pull_lsa_AddAccountRights(struct ndr_pull
*ndr
, int flags
, struct lsa_AddAccountRights
*r
)
8964 TALLOC_CTX
*_mem_save_handle_0
;
8965 TALLOC_CTX
*_mem_save_sid_0
;
8966 TALLOC_CTX
*_mem_save_rights_0
;
8967 if (flags
& NDR_IN
) {
8968 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8969 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
8971 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8972 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
8973 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
8974 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
8975 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8976 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
8978 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8979 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
8980 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
8981 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
8982 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
8983 NDR_PULL_ALLOC(ndr
, r
->in
.rights
);
8985 _mem_save_rights_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8986 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.rights
, LIBNDR_FLAG_REF_ALLOC
);
8987 NDR_CHECK(ndr_pull_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
8988 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rights_0
, LIBNDR_FLAG_REF_ALLOC
);
8990 if (flags
& NDR_OUT
) {
8991 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
8993 return NDR_ERR_SUCCESS
;
8996 _PUBLIC_
void ndr_print_lsa_AddAccountRights(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_AddAccountRights
*r
)
8998 ndr_print_struct(ndr
, name
, "lsa_AddAccountRights");
9000 if (flags
& NDR_SET_VALUES
) {
9001 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9003 if (flags
& NDR_IN
) {
9004 ndr_print_struct(ndr
, "in", "lsa_AddAccountRights");
9006 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9008 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9010 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
9012 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
9014 ndr_print_ptr(ndr
, "rights", r
->in
.rights
);
9016 ndr_print_lsa_RightSet(ndr
, "rights", r
->in
.rights
);
9020 if (flags
& NDR_OUT
) {
9021 ndr_print_struct(ndr
, "out", "lsa_AddAccountRights");
9023 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9029 static enum ndr_err_code
ndr_push_lsa_RemoveAccountRights(struct ndr_push
*ndr
, int flags
, const struct lsa_RemoveAccountRights
*r
)
9031 if (flags
& NDR_IN
) {
9032 if (r
->in
.handle
== NULL
) {
9033 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9035 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9036 if (r
->in
.sid
== NULL
) {
9037 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9039 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
9040 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->in
.remove_all
));
9041 if (r
->in
.rights
== NULL
) {
9042 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9044 NDR_CHECK(ndr_push_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
9046 if (flags
& NDR_OUT
) {
9047 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9049 return NDR_ERR_SUCCESS
;
9052 static enum ndr_err_code
ndr_pull_lsa_RemoveAccountRights(struct ndr_pull
*ndr
, int flags
, struct lsa_RemoveAccountRights
*r
)
9054 TALLOC_CTX
*_mem_save_handle_0
;
9055 TALLOC_CTX
*_mem_save_sid_0
;
9056 TALLOC_CTX
*_mem_save_rights_0
;
9057 if (flags
& NDR_IN
) {
9058 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9059 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9061 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9062 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9063 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9064 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9065 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9066 NDR_PULL_ALLOC(ndr
, r
->in
.sid
);
9068 _mem_save_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9069 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sid
, LIBNDR_FLAG_REF_ALLOC
);
9070 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sid
));
9071 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
9072 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->in
.remove_all
));
9073 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9074 NDR_PULL_ALLOC(ndr
, r
->in
.rights
);
9076 _mem_save_rights_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9077 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.rights
, LIBNDR_FLAG_REF_ALLOC
);
9078 NDR_CHECK(ndr_pull_lsa_RightSet(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.rights
));
9079 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rights_0
, LIBNDR_FLAG_REF_ALLOC
);
9081 if (flags
& NDR_OUT
) {
9082 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9084 return NDR_ERR_SUCCESS
;
9087 _PUBLIC_
void ndr_print_lsa_RemoveAccountRights(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_RemoveAccountRights
*r
)
9089 ndr_print_struct(ndr
, name
, "lsa_RemoveAccountRights");
9091 if (flags
& NDR_SET_VALUES
) {
9092 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9094 if (flags
& NDR_IN
) {
9095 ndr_print_struct(ndr
, "in", "lsa_RemoveAccountRights");
9097 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9099 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9101 ndr_print_ptr(ndr
, "sid", r
->in
.sid
);
9103 ndr_print_dom_sid2(ndr
, "sid", r
->in
.sid
);
9105 ndr_print_uint8(ndr
, "remove_all", r
->in
.remove_all
);
9106 ndr_print_ptr(ndr
, "rights", r
->in
.rights
);
9108 ndr_print_lsa_RightSet(ndr
, "rights", r
->in
.rights
);
9112 if (flags
& NDR_OUT
) {
9113 ndr_print_struct(ndr
, "out", "lsa_RemoveAccountRights");
9115 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9121 static enum ndr_err_code
ndr_push_lsa_QueryTrustedDomainInfoBySid(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryTrustedDomainInfoBySid
*r
)
9123 if (flags
& NDR_IN
) {
9124 if (r
->in
.handle
== NULL
) {
9125 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9127 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9128 if (r
->in
.dom_sid
== NULL
) {
9129 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9131 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9132 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
9134 if (flags
& NDR_OUT
) {
9135 if (r
->out
.info
== NULL
) {
9136 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9138 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
9140 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9141 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9143 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9145 return NDR_ERR_SUCCESS
;
9148 static enum ndr_err_code
ndr_pull_lsa_QueryTrustedDomainInfoBySid(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryTrustedDomainInfoBySid
*r
)
9151 TALLOC_CTX
*_mem_save_handle_0
;
9152 TALLOC_CTX
*_mem_save_dom_sid_0
;
9153 TALLOC_CTX
*_mem_save_info_0
;
9154 TALLOC_CTX
*_mem_save_info_1
;
9155 if (flags
& NDR_IN
) {
9156 ZERO_STRUCT(r
->out
);
9158 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9159 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9161 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9162 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9163 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9164 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9165 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9166 NDR_PULL_ALLOC(ndr
, r
->in
.dom_sid
);
9168 _mem_save_dom_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9169 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dom_sid
, LIBNDR_FLAG_REF_ALLOC
);
9170 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9171 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
9172 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
9173 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9174 ZERO_STRUCTP(r
->out
.info
);
9176 if (flags
& NDR_OUT
) {
9177 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9178 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
9180 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9181 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
9182 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
9184 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
9186 *r
->out
.info
= NULL
;
9189 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9190 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
9191 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
9192 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
9193 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
9195 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9196 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9198 return NDR_ERR_SUCCESS
;
9201 _PUBLIC_
void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryTrustedDomainInfoBySid
*r
)
9203 ndr_print_struct(ndr
, name
, "lsa_QueryTrustedDomainInfoBySid");
9205 if (flags
& NDR_SET_VALUES
) {
9206 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9208 if (flags
& NDR_IN
) {
9209 ndr_print_struct(ndr
, "in", "lsa_QueryTrustedDomainInfoBySid");
9211 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9213 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9215 ndr_print_ptr(ndr
, "dom_sid", r
->in
.dom_sid
);
9217 ndr_print_dom_sid2(ndr
, "dom_sid", r
->in
.dom_sid
);
9219 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
9222 if (flags
& NDR_OUT
) {
9223 ndr_print_struct(ndr
, "out", "lsa_QueryTrustedDomainInfoBySid");
9225 ndr_print_ptr(ndr
, "info", r
->out
.info
);
9227 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
9230 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
9231 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", *r
->out
.info
);
9235 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9241 static enum ndr_err_code
ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push
*ndr
, int flags
, const struct lsa_SetTrustedDomainInfo
*r
)
9243 if (flags
& NDR_IN
) {
9244 if (r
->in
.handle
== NULL
) {
9245 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9247 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9248 if (r
->in
.dom_sid
== NULL
) {
9249 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9251 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9252 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
9253 if (r
->in
.info
== NULL
) {
9254 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9256 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9257 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9259 if (flags
& NDR_OUT
) {
9260 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9262 return NDR_ERR_SUCCESS
;
9265 static enum ndr_err_code
ndr_pull_lsa_SetTrustedDomainInfo(struct ndr_pull
*ndr
, int flags
, struct lsa_SetTrustedDomainInfo
*r
)
9267 TALLOC_CTX
*_mem_save_handle_0
;
9268 TALLOC_CTX
*_mem_save_dom_sid_0
;
9269 TALLOC_CTX
*_mem_save_info_0
;
9270 if (flags
& NDR_IN
) {
9271 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9272 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9274 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9275 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9276 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9277 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9278 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9279 NDR_PULL_ALLOC(ndr
, r
->in
.dom_sid
);
9281 _mem_save_dom_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9282 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dom_sid
, LIBNDR_FLAG_REF_ALLOC
);
9283 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9284 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
9285 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
9286 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9287 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
9289 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9290 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
9291 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
9292 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
9293 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
9295 if (flags
& NDR_OUT
) {
9296 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9298 return NDR_ERR_SUCCESS
;
9301 _PUBLIC_
void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetTrustedDomainInfo
*r
)
9303 ndr_print_struct(ndr
, name
, "lsa_SetTrustedDomainInfo");
9305 if (flags
& NDR_SET_VALUES
) {
9306 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9308 if (flags
& NDR_IN
) {
9309 ndr_print_struct(ndr
, "in", "lsa_SetTrustedDomainInfo");
9311 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9313 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9315 ndr_print_ptr(ndr
, "dom_sid", r
->in
.dom_sid
);
9317 ndr_print_dom_sid2(ndr
, "dom_sid", r
->in
.dom_sid
);
9319 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
9320 ndr_print_ptr(ndr
, "info", r
->in
.info
);
9322 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
9323 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", r
->in
.info
);
9327 if (flags
& NDR_OUT
) {
9328 ndr_print_struct(ndr
, "out", "lsa_SetTrustedDomainInfo");
9330 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9336 static enum ndr_err_code
ndr_push_lsa_DeleteTrustedDomain(struct ndr_push
*ndr
, int flags
, const struct lsa_DeleteTrustedDomain
*r
)
9338 if (flags
& NDR_IN
) {
9339 if (r
->in
.handle
== NULL
) {
9340 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9342 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9343 if (r
->in
.dom_sid
== NULL
) {
9344 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9346 NDR_CHECK(ndr_push_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9348 if (flags
& NDR_OUT
) {
9349 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9351 return NDR_ERR_SUCCESS
;
9354 static enum ndr_err_code
ndr_pull_lsa_DeleteTrustedDomain(struct ndr_pull
*ndr
, int flags
, struct lsa_DeleteTrustedDomain
*r
)
9356 TALLOC_CTX
*_mem_save_handle_0
;
9357 TALLOC_CTX
*_mem_save_dom_sid_0
;
9358 if (flags
& NDR_IN
) {
9359 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9360 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9362 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9363 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9364 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9365 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9366 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9367 NDR_PULL_ALLOC(ndr
, r
->in
.dom_sid
);
9369 _mem_save_dom_sid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9370 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dom_sid
, LIBNDR_FLAG_REF_ALLOC
);
9371 NDR_CHECK(ndr_pull_dom_sid2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.dom_sid
));
9372 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dom_sid_0
, LIBNDR_FLAG_REF_ALLOC
);
9374 if (flags
& NDR_OUT
) {
9375 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9377 return NDR_ERR_SUCCESS
;
9380 _PUBLIC_
void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_DeleteTrustedDomain
*r
)
9382 ndr_print_struct(ndr
, name
, "lsa_DeleteTrustedDomain");
9384 if (flags
& NDR_SET_VALUES
) {
9385 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9387 if (flags
& NDR_IN
) {
9388 ndr_print_struct(ndr
, "in", "lsa_DeleteTrustedDomain");
9390 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9392 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9394 ndr_print_ptr(ndr
, "dom_sid", r
->in
.dom_sid
);
9396 ndr_print_dom_sid2(ndr
, "dom_sid", r
->in
.dom_sid
);
9400 if (flags
& NDR_OUT
) {
9401 ndr_print_struct(ndr
, "out", "lsa_DeleteTrustedDomain");
9403 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9409 static enum ndr_err_code
ndr_push_lsa_StorePrivateData(struct ndr_push
*ndr
, int flags
, const struct lsa_StorePrivateData
*r
)
9411 if (flags
& NDR_IN
) {
9412 if (r
->in
.handle
== NULL
) {
9413 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9415 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9416 if (r
->in
.name
== NULL
) {
9417 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9419 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
9420 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.val
));
9422 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.val
));
9425 if (flags
& NDR_OUT
) {
9426 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9428 return NDR_ERR_SUCCESS
;
9431 static enum ndr_err_code
ndr_pull_lsa_StorePrivateData(struct ndr_pull
*ndr
, int flags
, struct lsa_StorePrivateData
*r
)
9434 TALLOC_CTX
*_mem_save_handle_0
;
9435 TALLOC_CTX
*_mem_save_name_0
;
9436 TALLOC_CTX
*_mem_save_val_0
;
9437 if (flags
& NDR_IN
) {
9438 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9439 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9441 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9442 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9443 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9444 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9445 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9446 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
9448 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9449 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
9450 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
9451 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
9452 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_val
));
9454 NDR_PULL_ALLOC(ndr
, r
->in
.val
);
9459 _mem_save_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9460 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.val
, 0);
9461 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.val
));
9462 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_val_0
, 0);
9465 if (flags
& NDR_OUT
) {
9466 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9468 return NDR_ERR_SUCCESS
;
9471 _PUBLIC_
void ndr_print_lsa_StorePrivateData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_StorePrivateData
*r
)
9473 ndr_print_struct(ndr
, name
, "lsa_StorePrivateData");
9475 if (flags
& NDR_SET_VALUES
) {
9476 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9478 if (flags
& NDR_IN
) {
9479 ndr_print_struct(ndr
, "in", "lsa_StorePrivateData");
9481 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9483 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9485 ndr_print_ptr(ndr
, "name", r
->in
.name
);
9487 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
9489 ndr_print_ptr(ndr
, "val", r
->in
.val
);
9492 ndr_print_lsa_DATA_BUF(ndr
, "val", r
->in
.val
);
9497 if (flags
& NDR_OUT
) {
9498 ndr_print_struct(ndr
, "out", "lsa_StorePrivateData");
9500 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9506 static enum ndr_err_code
ndr_push_lsa_RetrievePrivateData(struct ndr_push
*ndr
, int flags
, const struct lsa_RetrievePrivateData
*r
)
9508 if (flags
& NDR_IN
) {
9509 if (r
->in
.handle
== NULL
) {
9510 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9512 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9513 if (r
->in
.name
== NULL
) {
9514 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9516 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
9517 if (r
->in
.val
== NULL
) {
9518 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9520 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.val
));
9522 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.val
));
9525 if (flags
& NDR_OUT
) {
9526 if (r
->out
.val
== NULL
) {
9527 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9529 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.val
));
9531 NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.val
));
9533 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9535 return NDR_ERR_SUCCESS
;
9538 static enum ndr_err_code
ndr_pull_lsa_RetrievePrivateData(struct ndr_pull
*ndr
, int flags
, struct lsa_RetrievePrivateData
*r
)
9541 TALLOC_CTX
*_mem_save_handle_0
;
9542 TALLOC_CTX
*_mem_save_name_0
;
9543 TALLOC_CTX
*_mem_save_val_0
;
9544 TALLOC_CTX
*_mem_save_val_1
;
9545 if (flags
& NDR_IN
) {
9546 ZERO_STRUCT(r
->out
);
9548 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9549 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
9551 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9552 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9553 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
9554 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9555 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9556 NDR_PULL_ALLOC(ndr
, r
->in
.name
);
9558 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9559 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.name
, LIBNDR_FLAG_REF_ALLOC
);
9560 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.name
));
9561 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, LIBNDR_FLAG_REF_ALLOC
);
9562 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9563 NDR_PULL_ALLOC(ndr
, r
->in
.val
);
9565 _mem_save_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9566 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.val
, LIBNDR_FLAG_REF_ALLOC
);
9567 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_val
));
9569 NDR_PULL_ALLOC(ndr
, *r
->in
.val
);
9574 _mem_save_val_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9575 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.val
, 0);
9576 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.val
));
9577 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_val_1
, 0);
9579 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_val_0
, LIBNDR_FLAG_REF_ALLOC
);
9580 NDR_PULL_ALLOC(ndr
, r
->out
.val
);
9581 *r
->out
.val
= *r
->in
.val
;
9583 if (flags
& NDR_OUT
) {
9584 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9585 NDR_PULL_ALLOC(ndr
, r
->out
.val
);
9587 _mem_save_val_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9588 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.val
, LIBNDR_FLAG_REF_ALLOC
);
9589 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_val
));
9591 NDR_PULL_ALLOC(ndr
, *r
->out
.val
);
9596 _mem_save_val_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9597 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.val
, 0);
9598 NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.val
));
9599 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_val_1
, 0);
9601 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_val_0
, LIBNDR_FLAG_REF_ALLOC
);
9602 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9604 return NDR_ERR_SUCCESS
;
9607 _PUBLIC_
void ndr_print_lsa_RetrievePrivateData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_RetrievePrivateData
*r
)
9609 ndr_print_struct(ndr
, name
, "lsa_RetrievePrivateData");
9611 if (flags
& NDR_SET_VALUES
) {
9612 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9614 if (flags
& NDR_IN
) {
9615 ndr_print_struct(ndr
, "in", "lsa_RetrievePrivateData");
9617 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
9619 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
9621 ndr_print_ptr(ndr
, "name", r
->in
.name
);
9623 ndr_print_lsa_String(ndr
, "name", r
->in
.name
);
9625 ndr_print_ptr(ndr
, "val", r
->in
.val
);
9627 ndr_print_ptr(ndr
, "val", *r
->in
.val
);
9630 ndr_print_lsa_DATA_BUF(ndr
, "val", *r
->in
.val
);
9636 if (flags
& NDR_OUT
) {
9637 ndr_print_struct(ndr
, "out", "lsa_RetrievePrivateData");
9639 ndr_print_ptr(ndr
, "val", r
->out
.val
);
9641 ndr_print_ptr(ndr
, "val", *r
->out
.val
);
9644 ndr_print_lsa_DATA_BUF(ndr
, "val", *r
->out
.val
);
9648 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9654 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_OpenPolicy2(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenPolicy2
*r
)
9656 if (flags
& NDR_IN
) {
9657 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
9658 if (r
->in
.system_name
) {
9659 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9660 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9661 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9662 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.system_name
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9664 if (r
->in
.attr
== NULL
) {
9665 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9667 NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
9668 NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
9670 if (flags
& NDR_OUT
) {
9671 if (r
->out
.handle
== NULL
) {
9672 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9674 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
9675 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9677 return NDR_ERR_SUCCESS
;
9680 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_OpenPolicy2(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenPolicy2
*r
)
9682 uint32_t _ptr_system_name
;
9683 TALLOC_CTX
*_mem_save_system_name_0
;
9684 TALLOC_CTX
*_mem_save_attr_0
;
9685 TALLOC_CTX
*_mem_save_handle_0
;
9686 if (flags
& NDR_IN
) {
9687 ZERO_STRUCT(r
->out
);
9689 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
9690 if (_ptr_system_name
) {
9691 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
9693 r
->in
.system_name
= NULL
;
9695 if (r
->in
.system_name
) {
9696 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9697 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
9698 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
9699 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
9700 if (ndr_get_array_length(ndr
, &r
->in
.system_name
) > ndr_get_array_size(ndr
, &r
->in
.system_name
)) {
9701 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.system_name
), ndr_get_array_length(ndr
, &r
->in
.system_name
));
9703 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t)));
9704 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.system_name
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t), CH_UTF16
));
9705 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
9707 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9708 NDR_PULL_ALLOC(ndr
, r
->in
.attr
);
9710 _mem_save_attr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9711 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.attr
, LIBNDR_FLAG_REF_ALLOC
);
9712 NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.attr
));
9713 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_attr_0
, LIBNDR_FLAG_REF_ALLOC
);
9714 NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
9715 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
9716 ZERO_STRUCTP(r
->out
.handle
);
9718 if (flags
& NDR_OUT
) {
9719 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9720 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
9722 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9723 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
9724 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
9725 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
9726 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9728 return NDR_ERR_SUCCESS
;
9731 _PUBLIC_
void ndr_print_lsa_OpenPolicy2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenPolicy2
*r
)
9733 ndr_print_struct(ndr
, name
, "lsa_OpenPolicy2");
9735 if (flags
& NDR_SET_VALUES
) {
9736 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9738 if (flags
& NDR_IN
) {
9739 ndr_print_struct(ndr
, "in", "lsa_OpenPolicy2");
9741 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
9743 if (r
->in
.system_name
) {
9744 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
9747 ndr_print_ptr(ndr
, "attr", r
->in
.attr
);
9749 ndr_print_lsa_ObjectAttribute(ndr
, "attr", r
->in
.attr
);
9751 ndr_print_lsa_PolicyAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
9754 if (flags
& NDR_OUT
) {
9755 ndr_print_struct(ndr
, "out", "lsa_OpenPolicy2");
9757 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
9759 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
9761 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
9767 static enum ndr_err_code
ndr_push_lsa_GetUserName(struct ndr_push
*ndr
, int flags
, const struct lsa_GetUserName
*r
)
9769 if (flags
& NDR_IN
) {
9770 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.system_name
));
9771 if (r
->in
.system_name
) {
9772 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9773 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9774 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
)));
9775 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.system_name
, ndr_charset_length(r
->in
.system_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9777 if (r
->in
.account_name
== NULL
) {
9778 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9780 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.account_name
));
9781 if (*r
->in
.account_name
) {
9782 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.account_name
));
9784 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.authority_name
));
9785 if (r
->in
.authority_name
) {
9786 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->in
.authority_name
));
9787 if (*r
->in
.authority_name
) {
9788 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.authority_name
));
9792 if (flags
& NDR_OUT
) {
9793 if (r
->out
.account_name
== NULL
) {
9794 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
9796 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.account_name
));
9797 if (*r
->out
.account_name
) {
9798 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.account_name
));
9800 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.authority_name
));
9801 if (r
->out
.authority_name
) {
9802 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.authority_name
));
9803 if (*r
->out
.authority_name
) {
9804 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.authority_name
));
9807 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
9809 return NDR_ERR_SUCCESS
;
9812 static enum ndr_err_code
ndr_pull_lsa_GetUserName(struct ndr_pull
*ndr
, int flags
, struct lsa_GetUserName
*r
)
9814 uint32_t _ptr_system_name
;
9815 uint32_t _ptr_account_name
;
9816 uint32_t _ptr_authority_name
;
9817 TALLOC_CTX
*_mem_save_system_name_0
;
9818 TALLOC_CTX
*_mem_save_account_name_0
;
9819 TALLOC_CTX
*_mem_save_account_name_1
;
9820 TALLOC_CTX
*_mem_save_authority_name_0
;
9821 TALLOC_CTX
*_mem_save_authority_name_1
;
9822 if (flags
& NDR_IN
) {
9823 ZERO_STRUCT(r
->out
);
9825 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_system_name
));
9826 if (_ptr_system_name
) {
9827 NDR_PULL_ALLOC(ndr
, r
->in
.system_name
);
9829 r
->in
.system_name
= NULL
;
9831 if (r
->in
.system_name
) {
9832 _mem_save_system_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9833 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.system_name
, 0);
9834 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.system_name
));
9835 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.system_name
));
9836 if (ndr_get_array_length(ndr
, &r
->in
.system_name
) > ndr_get_array_size(ndr
, &r
->in
.system_name
)) {
9837 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.system_name
), ndr_get_array_length(ndr
, &r
->in
.system_name
));
9839 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t)));
9840 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.system_name
, ndr_get_array_length(ndr
, &r
->in
.system_name
), sizeof(uint16_t), CH_UTF16
));
9841 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_system_name_0
, 0);
9843 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9844 NDR_PULL_ALLOC(ndr
, r
->in
.account_name
);
9846 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9847 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.account_name
, LIBNDR_FLAG_REF_ALLOC
);
9848 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account_name
));
9849 if (_ptr_account_name
) {
9850 NDR_PULL_ALLOC(ndr
, *r
->in
.account_name
);
9852 *r
->in
.account_name
= NULL
;
9854 if (*r
->in
.account_name
) {
9855 _mem_save_account_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9856 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.account_name
, 0);
9857 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.account_name
));
9858 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_1
, 0);
9860 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, LIBNDR_FLAG_REF_ALLOC
);
9861 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9862 if (_ptr_authority_name
) {
9863 NDR_PULL_ALLOC(ndr
, r
->in
.authority_name
);
9865 r
->in
.authority_name
= NULL
;
9867 if (r
->in
.authority_name
) {
9868 _mem_save_authority_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9869 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.authority_name
, 0);
9870 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9871 if (_ptr_authority_name
) {
9872 NDR_PULL_ALLOC(ndr
, *r
->in
.authority_name
);
9874 *r
->in
.authority_name
= NULL
;
9876 if (*r
->in
.authority_name
) {
9877 _mem_save_authority_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9878 NDR_PULL_SET_MEM_CTX(ndr
, *r
->in
.authority_name
, 0);
9879 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->in
.authority_name
));
9880 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_1
, 0);
9882 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_0
, 0);
9884 NDR_PULL_ALLOC(ndr
, r
->out
.account_name
);
9885 *r
->out
.account_name
= *r
->in
.account_name
;
9887 if (flags
& NDR_OUT
) {
9888 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
9889 NDR_PULL_ALLOC(ndr
, r
->out
.account_name
);
9891 _mem_save_account_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9892 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.account_name
, LIBNDR_FLAG_REF_ALLOC
);
9893 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_account_name
));
9894 if (_ptr_account_name
) {
9895 NDR_PULL_ALLOC(ndr
, *r
->out
.account_name
);
9897 *r
->out
.account_name
= NULL
;
9899 if (*r
->out
.account_name
) {
9900 _mem_save_account_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9901 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.account_name
, 0);
9902 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.account_name
));
9903 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_1
, 0);
9905 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_account_name_0
, LIBNDR_FLAG_REF_ALLOC
);
9906 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9907 if (_ptr_authority_name
) {
9908 NDR_PULL_ALLOC(ndr
, r
->out
.authority_name
);
9910 r
->out
.authority_name
= NULL
;
9912 if (r
->out
.authority_name
) {
9913 _mem_save_authority_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9914 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.authority_name
, 0);
9915 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_authority_name
));
9916 if (_ptr_authority_name
) {
9917 NDR_PULL_ALLOC(ndr
, *r
->out
.authority_name
);
9919 *r
->out
.authority_name
= NULL
;
9921 if (*r
->out
.authority_name
) {
9922 _mem_save_authority_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
9923 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.authority_name
, 0);
9924 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.authority_name
));
9925 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_1
, 0);
9927 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_authority_name_0
, 0);
9929 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
9931 return NDR_ERR_SUCCESS
;
9934 _PUBLIC_
void ndr_print_lsa_GetUserName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_GetUserName
*r
)
9936 ndr_print_struct(ndr
, name
, "lsa_GetUserName");
9938 if (flags
& NDR_SET_VALUES
) {
9939 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
9941 if (flags
& NDR_IN
) {
9942 ndr_print_struct(ndr
, "in", "lsa_GetUserName");
9944 ndr_print_ptr(ndr
, "system_name", r
->in
.system_name
);
9946 if (r
->in
.system_name
) {
9947 ndr_print_string(ndr
, "system_name", r
->in
.system_name
);
9950 ndr_print_ptr(ndr
, "account_name", r
->in
.account_name
);
9952 ndr_print_ptr(ndr
, "account_name", *r
->in
.account_name
);
9954 if (*r
->in
.account_name
) {
9955 ndr_print_lsa_String(ndr
, "account_name", *r
->in
.account_name
);
9959 ndr_print_ptr(ndr
, "authority_name", r
->in
.authority_name
);
9961 if (r
->in
.authority_name
) {
9962 ndr_print_ptr(ndr
, "authority_name", *r
->in
.authority_name
);
9964 if (*r
->in
.authority_name
) {
9965 ndr_print_lsa_String(ndr
, "authority_name", *r
->in
.authority_name
);
9972 if (flags
& NDR_OUT
) {
9973 ndr_print_struct(ndr
, "out", "lsa_GetUserName");
9975 ndr_print_ptr(ndr
, "account_name", r
->out
.account_name
);
9977 ndr_print_ptr(ndr
, "account_name", *r
->out
.account_name
);
9979 if (*r
->out
.account_name
) {
9980 ndr_print_lsa_String(ndr
, "account_name", *r
->out
.account_name
);
9984 ndr_print_ptr(ndr
, "authority_name", r
->out
.authority_name
);
9986 if (r
->out
.authority_name
) {
9987 ndr_print_ptr(ndr
, "authority_name", *r
->out
.authority_name
);
9989 if (*r
->out
.authority_name
) {
9990 ndr_print_lsa_String(ndr
, "authority_name", *r
->out
.authority_name
);
9995 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10001 static enum ndr_err_code
ndr_push_lsa_QueryInfoPolicy2(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryInfoPolicy2
*r
)
10003 if (flags
& NDR_IN
) {
10004 if (r
->in
.handle
== NULL
) {
10005 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10007 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10008 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
10010 if (flags
& NDR_OUT
) {
10011 if (r
->out
.info
== NULL
) {
10012 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10014 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
10015 if (*r
->out
.info
) {
10016 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10017 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10019 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10021 return NDR_ERR_SUCCESS
;
10024 static enum ndr_err_code
ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryInfoPolicy2
*r
)
10026 uint32_t _ptr_info
;
10027 TALLOC_CTX
*_mem_save_handle_0
;
10028 TALLOC_CTX
*_mem_save_info_0
;
10029 TALLOC_CTX
*_mem_save_info_1
;
10030 if (flags
& NDR_IN
) {
10031 ZERO_STRUCT(r
->out
);
10033 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10034 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10036 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10037 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10038 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10039 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10040 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
10041 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10042 ZERO_STRUCTP(r
->out
.info
);
10044 if (flags
& NDR_OUT
) {
10045 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10046 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10048 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10049 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10050 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10052 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
10054 *r
->out
.info
= NULL
;
10056 if (*r
->out
.info
) {
10057 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10058 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
10059 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10060 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10061 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
10063 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10064 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10066 return NDR_ERR_SUCCESS
;
10069 _PUBLIC_
void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryInfoPolicy2
*r
)
10071 ndr_print_struct(ndr
, name
, "lsa_QueryInfoPolicy2");
10073 if (flags
& NDR_SET_VALUES
) {
10074 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10076 if (flags
& NDR_IN
) {
10077 ndr_print_struct(ndr
, "in", "lsa_QueryInfoPolicy2");
10079 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10081 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10083 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
10086 if (flags
& NDR_OUT
) {
10087 ndr_print_struct(ndr
, "out", "lsa_QueryInfoPolicy2");
10089 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10091 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
10093 if (*r
->out
.info
) {
10094 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
10095 ndr_print_lsa_PolicyInformation(ndr
, "info", *r
->out
.info
);
10099 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10105 static enum ndr_err_code
ndr_push_lsa_SetInfoPolicy2(struct ndr_push
*ndr
, int flags
, const struct lsa_SetInfoPolicy2
*r
)
10107 if (flags
& NDR_IN
) {
10108 if (r
->in
.handle
== NULL
) {
10109 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10111 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10112 NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr
, NDR_SCALARS
, r
->in
.level
));
10113 if (r
->in
.info
== NULL
) {
10114 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10116 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10117 NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10119 if (flags
& NDR_OUT
) {
10120 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10122 return NDR_ERR_SUCCESS
;
10125 static enum ndr_err_code
ndr_pull_lsa_SetInfoPolicy2(struct ndr_pull
*ndr
, int flags
, struct lsa_SetInfoPolicy2
*r
)
10127 TALLOC_CTX
*_mem_save_handle_0
;
10128 TALLOC_CTX
*_mem_save_info_0
;
10129 if (flags
& NDR_IN
) {
10130 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10131 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10133 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10134 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10135 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10136 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10137 NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr
, NDR_SCALARS
, &r
->in
.level
));
10138 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10139 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
10141 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10142 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
10143 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10144 NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10145 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10147 if (flags
& NDR_OUT
) {
10148 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10150 return NDR_ERR_SUCCESS
;
10153 _PUBLIC_
void ndr_print_lsa_SetInfoPolicy2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetInfoPolicy2
*r
)
10155 ndr_print_struct(ndr
, name
, "lsa_SetInfoPolicy2");
10157 if (flags
& NDR_SET_VALUES
) {
10158 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10160 if (flags
& NDR_IN
) {
10161 ndr_print_struct(ndr
, "in", "lsa_SetInfoPolicy2");
10163 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10165 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10167 ndr_print_lsa_PolicyInfo(ndr
, "level", r
->in
.level
);
10168 ndr_print_ptr(ndr
, "info", r
->in
.info
);
10170 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
10171 ndr_print_lsa_PolicyInformation(ndr
, "info", r
->in
.info
);
10175 if (flags
& NDR_OUT
) {
10176 ndr_print_struct(ndr
, "out", "lsa_SetInfoPolicy2");
10178 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10184 static enum ndr_err_code
ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryTrustedDomainInfoByName
*r
)
10186 if (flags
& NDR_IN
) {
10187 if (r
->in
.handle
== NULL
) {
10188 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10190 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10191 if (r
->in
.trusted_domain
== NULL
) {
10192 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10194 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain
));
10195 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
10197 if (flags
& NDR_OUT
) {
10198 if (r
->out
.info
== NULL
) {
10199 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10201 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
10202 if (*r
->out
.info
) {
10203 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10204 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10206 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10208 return NDR_ERR_SUCCESS
;
10211 static enum ndr_err_code
ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryTrustedDomainInfoByName
*r
)
10213 uint32_t _ptr_info
;
10214 TALLOC_CTX
*_mem_save_handle_0
;
10215 TALLOC_CTX
*_mem_save_trusted_domain_0
;
10216 TALLOC_CTX
*_mem_save_info_0
;
10217 TALLOC_CTX
*_mem_save_info_1
;
10218 if (flags
& NDR_IN
) {
10219 ZERO_STRUCT(r
->out
);
10221 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10222 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10224 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10225 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10226 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10227 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10228 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10229 NDR_PULL_ALLOC(ndr
, r
->in
.trusted_domain
);
10231 _mem_save_trusted_domain_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10232 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trusted_domain
, LIBNDR_FLAG_REF_ALLOC
);
10233 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain
));
10234 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusted_domain_0
, LIBNDR_FLAG_REF_ALLOC
);
10235 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
10236 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10237 ZERO_STRUCTP(r
->out
.info
);
10239 if (flags
& NDR_OUT
) {
10240 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10241 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10243 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10244 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10245 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10247 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
10249 *r
->out
.info
= NULL
;
10251 if (*r
->out
.info
) {
10252 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10253 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
10254 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10255 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10256 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
10258 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10259 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10261 return NDR_ERR_SUCCESS
;
10264 _PUBLIC_
void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryTrustedDomainInfoByName
*r
)
10266 ndr_print_struct(ndr
, name
, "lsa_QueryTrustedDomainInfoByName");
10268 if (flags
& NDR_SET_VALUES
) {
10269 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10271 if (flags
& NDR_IN
) {
10272 ndr_print_struct(ndr
, "in", "lsa_QueryTrustedDomainInfoByName");
10274 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10276 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10278 ndr_print_ptr(ndr
, "trusted_domain", r
->in
.trusted_domain
);
10280 ndr_print_lsa_String(ndr
, "trusted_domain", r
->in
.trusted_domain
);
10282 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
10285 if (flags
& NDR_OUT
) {
10286 ndr_print_struct(ndr
, "out", "lsa_QueryTrustedDomainInfoByName");
10288 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10290 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
10292 if (*r
->out
.info
) {
10293 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
10294 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", *r
->out
.info
);
10298 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10304 static enum ndr_err_code
ndr_push_lsa_SetTrustedDomainInfoByName(struct ndr_push
*ndr
, int flags
, const struct lsa_SetTrustedDomainInfoByName
*r
)
10306 if (flags
& NDR_IN
) {
10307 if (r
->in
.handle
== NULL
) {
10308 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10310 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10311 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.trusted_domain
));
10312 NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, r
->in
.level
));
10313 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
10315 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10316 NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10319 if (flags
& NDR_OUT
) {
10320 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10322 return NDR_ERR_SUCCESS
;
10325 static enum ndr_err_code
ndr_pull_lsa_SetTrustedDomainInfoByName(struct ndr_pull
*ndr
, int flags
, struct lsa_SetTrustedDomainInfoByName
*r
)
10327 uint32_t _ptr_info
;
10328 TALLOC_CTX
*_mem_save_handle_0
;
10329 TALLOC_CTX
*_mem_save_info_0
;
10330 if (flags
& NDR_IN
) {
10331 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10332 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10334 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10335 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10336 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10337 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10338 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.trusted_domain
));
10339 NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr
, NDR_SCALARS
, &r
->in
.level
));
10340 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10342 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
10347 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10348 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
10349 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10350 NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10351 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
10354 if (flags
& NDR_OUT
) {
10355 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10357 return NDR_ERR_SUCCESS
;
10360 _PUBLIC_
void ndr_print_lsa_SetTrustedDomainInfoByName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetTrustedDomainInfoByName
*r
)
10362 ndr_print_struct(ndr
, name
, "lsa_SetTrustedDomainInfoByName");
10364 if (flags
& NDR_SET_VALUES
) {
10365 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10367 if (flags
& NDR_IN
) {
10368 ndr_print_struct(ndr
, "in", "lsa_SetTrustedDomainInfoByName");
10370 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10372 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10374 ndr_print_lsa_String(ndr
, "trusted_domain", &r
->in
.trusted_domain
);
10375 ndr_print_lsa_TrustDomInfoEnum(ndr
, "level", r
->in
.level
);
10376 ndr_print_ptr(ndr
, "info", r
->in
.info
);
10379 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
10380 ndr_print_lsa_TrustedDomainInfo(ndr
, "info", r
->in
.info
);
10385 if (flags
& NDR_OUT
) {
10386 ndr_print_struct(ndr
, "out", "lsa_SetTrustedDomainInfoByName");
10388 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10394 static enum ndr_err_code
ndr_push_lsa_EnumTrustedDomainsEx(struct ndr_push
*ndr
, int flags
, const struct lsa_EnumTrustedDomainsEx
*r
)
10396 if (flags
& NDR_IN
) {
10397 if (r
->in
.handle
== NULL
) {
10398 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10400 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10401 if (r
->in
.resume_handle
== NULL
) {
10402 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10404 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
10405 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.max_size
));
10407 if (flags
& NDR_OUT
) {
10408 if (r
->out
.resume_handle
== NULL
) {
10409 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10411 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
10412 if (r
->out
.domains
== NULL
) {
10413 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10415 NDR_CHECK(ndr_push_lsa_DomainListEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
10416 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10418 return NDR_ERR_SUCCESS
;
10421 static enum ndr_err_code
ndr_pull_lsa_EnumTrustedDomainsEx(struct ndr_pull
*ndr
, int flags
, struct lsa_EnumTrustedDomainsEx
*r
)
10423 TALLOC_CTX
*_mem_save_handle_0
;
10424 TALLOC_CTX
*_mem_save_resume_handle_0
;
10425 TALLOC_CTX
*_mem_save_domains_0
;
10426 if (flags
& NDR_IN
) {
10427 ZERO_STRUCT(r
->out
);
10429 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10430 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10432 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10433 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10434 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10435 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10436 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10437 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
10439 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10440 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
10441 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
10442 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10443 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.max_size
));
10444 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
10445 *r
->out
.resume_handle
= *r
->in
.resume_handle
;
10446 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10447 ZERO_STRUCTP(r
->out
.domains
);
10449 if (flags
& NDR_OUT
) {
10450 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10451 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
10453 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10454 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, LIBNDR_FLAG_REF_ALLOC
);
10455 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
10456 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10457 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10458 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
10460 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10461 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
10462 NDR_CHECK(ndr_pull_lsa_DomainListEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.domains
));
10463 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
10464 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10466 return NDR_ERR_SUCCESS
;
10469 _PUBLIC_
void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_EnumTrustedDomainsEx
*r
)
10471 ndr_print_struct(ndr
, name
, "lsa_EnumTrustedDomainsEx");
10473 if (flags
& NDR_SET_VALUES
) {
10474 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10476 if (flags
& NDR_IN
) {
10477 ndr_print_struct(ndr
, "in", "lsa_EnumTrustedDomainsEx");
10479 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10481 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10483 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
10485 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
10487 ndr_print_uint32(ndr
, "max_size", r
->in
.max_size
);
10490 if (flags
& NDR_OUT
) {
10491 ndr_print_struct(ndr
, "out", "lsa_EnumTrustedDomainsEx");
10493 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
10495 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
10497 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
10499 ndr_print_lsa_DomainListEx(ndr
, "domains", r
->out
.domains
);
10501 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10507 static enum ndr_err_code
ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateTrustedDomainEx
*r
)
10509 if (flags
& NDR_IN
) {
10510 if (r
->in
.policy_handle
== NULL
) {
10511 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10513 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
10514 if (r
->in
.info
== NULL
) {
10515 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10517 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10518 if (r
->in
.auth_info
== NULL
) {
10519 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10521 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
10522 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
10524 if (flags
& NDR_OUT
) {
10525 if (r
->out
.trustdom_handle
== NULL
) {
10526 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10528 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10529 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10531 return NDR_ERR_SUCCESS
;
10534 static enum ndr_err_code
ndr_pull_lsa_CreateTrustedDomainEx(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateTrustedDomainEx
*r
)
10536 TALLOC_CTX
*_mem_save_policy_handle_0
;
10537 TALLOC_CTX
*_mem_save_info_0
;
10538 TALLOC_CTX
*_mem_save_auth_info_0
;
10539 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
10540 if (flags
& NDR_IN
) {
10541 ZERO_STRUCT(r
->out
);
10543 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10544 NDR_PULL_ALLOC(ndr
, r
->in
.policy_handle
);
10546 _mem_save_policy_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10547 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.policy_handle
, LIBNDR_FLAG_REF_ALLOC
);
10548 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
10549 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_policy_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10550 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10551 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
10553 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10554 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
10555 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10556 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10557 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10558 NDR_PULL_ALLOC(ndr
, r
->in
.auth_info
);
10560 _mem_save_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10561 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.auth_info
, LIBNDR_FLAG_REF_ALLOC
);
10562 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
10563 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_auth_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10564 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
10565 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10566 ZERO_STRUCTP(r
->out
.trustdom_handle
);
10568 if (flags
& NDR_OUT
) {
10569 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10570 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10572 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10573 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
10574 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10575 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10576 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10578 return NDR_ERR_SUCCESS
;
10581 _PUBLIC_
void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateTrustedDomainEx
*r
)
10583 ndr_print_struct(ndr
, name
, "lsa_CreateTrustedDomainEx");
10585 if (flags
& NDR_SET_VALUES
) {
10586 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10588 if (flags
& NDR_IN
) {
10589 ndr_print_struct(ndr
, "in", "lsa_CreateTrustedDomainEx");
10591 ndr_print_ptr(ndr
, "policy_handle", r
->in
.policy_handle
);
10593 ndr_print_policy_handle(ndr
, "policy_handle", r
->in
.policy_handle
);
10595 ndr_print_ptr(ndr
, "info", r
->in
.info
);
10597 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info", r
->in
.info
);
10599 ndr_print_ptr(ndr
, "auth_info", r
->in
.auth_info
);
10601 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info", r
->in
.auth_info
);
10603 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
10606 if (flags
& NDR_OUT
) {
10607 ndr_print_struct(ndr
, "out", "lsa_CreateTrustedDomainEx");
10609 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10611 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10613 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10619 static enum ndr_err_code
ndr_push_lsa_CloseTrustedDomainEx(struct ndr_push
*ndr
, int flags
, const struct lsa_CloseTrustedDomainEx
*r
)
10621 if (flags
& NDR_IN
) {
10622 if (r
->in
.handle
== NULL
) {
10623 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10625 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10627 if (flags
& NDR_OUT
) {
10628 if (r
->out
.handle
== NULL
) {
10629 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10631 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
10632 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10634 return NDR_ERR_SUCCESS
;
10637 static enum ndr_err_code
ndr_pull_lsa_CloseTrustedDomainEx(struct ndr_pull
*ndr
, int flags
, struct lsa_CloseTrustedDomainEx
*r
)
10639 TALLOC_CTX
*_mem_save_handle_0
;
10640 if (flags
& NDR_IN
) {
10641 ZERO_STRUCT(r
->out
);
10643 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10644 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10646 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10647 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10648 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10649 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10650 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
10651 *r
->out
.handle
= *r
->in
.handle
;
10653 if (flags
& NDR_OUT
) {
10654 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10655 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
10657 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10658 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10659 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
10660 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10661 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10663 return NDR_ERR_SUCCESS
;
10666 _PUBLIC_
void ndr_print_lsa_CloseTrustedDomainEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CloseTrustedDomainEx
*r
)
10668 ndr_print_struct(ndr
, name
, "lsa_CloseTrustedDomainEx");
10670 if (flags
& NDR_SET_VALUES
) {
10671 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10673 if (flags
& NDR_IN
) {
10674 ndr_print_struct(ndr
, "in", "lsa_CloseTrustedDomainEx");
10676 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10678 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10682 if (flags
& NDR_OUT
) {
10683 ndr_print_struct(ndr
, "out", "lsa_CloseTrustedDomainEx");
10685 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
10687 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
10689 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10695 static enum ndr_err_code
ndr_push_lsa_QueryDomainInformationPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_QueryDomainInformationPolicy
*r
)
10697 if (flags
& NDR_IN
) {
10698 if (r
->in
.handle
== NULL
) {
10699 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10701 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10702 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10704 if (flags
& NDR_OUT
) {
10705 if (r
->out
.info
== NULL
) {
10706 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10708 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
10709 if (*r
->out
.info
) {
10710 NDR_CHECK(ndr_push_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10711 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10713 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10715 return NDR_ERR_SUCCESS
;
10718 static enum ndr_err_code
ndr_pull_lsa_QueryDomainInformationPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_QueryDomainInformationPolicy
*r
)
10720 uint32_t _ptr_info
;
10721 TALLOC_CTX
*_mem_save_handle_0
;
10722 TALLOC_CTX
*_mem_save_info_0
;
10723 TALLOC_CTX
*_mem_save_info_1
;
10724 if (flags
& NDR_IN
) {
10725 ZERO_STRUCT(r
->out
);
10727 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10728 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10730 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10731 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10732 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10733 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10734 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10735 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10736 ZERO_STRUCTP(r
->out
.info
);
10738 if (flags
& NDR_OUT
) {
10739 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10740 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
10742 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10743 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
10744 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10746 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
10748 *r
->out
.info
= NULL
;
10750 if (*r
->out
.info
) {
10751 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
10752 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
10753 NDR_CHECK(ndr_pull_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
));
10754 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
10755 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
10757 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
10758 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10760 return NDR_ERR_SUCCESS
;
10763 _PUBLIC_
void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_QueryDomainInformationPolicy
*r
)
10765 ndr_print_struct(ndr
, name
, "lsa_QueryDomainInformationPolicy");
10767 if (flags
& NDR_SET_VALUES
) {
10768 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10770 if (flags
& NDR_IN
) {
10771 ndr_print_struct(ndr
, "in", "lsa_QueryDomainInformationPolicy");
10773 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10775 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10777 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10780 if (flags
& NDR_OUT
) {
10781 ndr_print_struct(ndr
, "out", "lsa_QueryDomainInformationPolicy");
10783 ndr_print_ptr(ndr
, "info", r
->out
.info
);
10785 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
10787 if (*r
->out
.info
) {
10788 ndr_print_set_switch_value(ndr
, *r
->out
.info
, r
->in
.level
);
10789 ndr_print_lsa_DomainInformationPolicy(ndr
, "info", *r
->out
.info
);
10793 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10799 static enum ndr_err_code
ndr_push_lsa_SetDomainInformationPolicy(struct ndr_push
*ndr
, int flags
, const struct lsa_SetDomainInformationPolicy
*r
)
10801 if (flags
& NDR_IN
) {
10802 if (r
->in
.handle
== NULL
) {
10803 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10805 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10806 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.level
));
10807 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
10809 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10810 NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10813 if (flags
& NDR_OUT
) {
10814 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10816 return NDR_ERR_SUCCESS
;
10819 static enum ndr_err_code
ndr_pull_lsa_SetDomainInformationPolicy(struct ndr_pull
*ndr
, int flags
, struct lsa_SetDomainInformationPolicy
*r
)
10821 uint32_t _ptr_info
;
10822 TALLOC_CTX
*_mem_save_handle_0
;
10823 TALLOC_CTX
*_mem_save_info_0
;
10824 if (flags
& NDR_IN
) {
10825 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10826 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10828 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10829 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10830 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10831 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10832 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.level
));
10833 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
10835 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
10840 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10841 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
10842 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
));
10843 NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
10844 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
10847 if (flags
& NDR_OUT
) {
10848 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10850 return NDR_ERR_SUCCESS
;
10853 _PUBLIC_
void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_SetDomainInformationPolicy
*r
)
10855 ndr_print_struct(ndr
, name
, "lsa_SetDomainInformationPolicy");
10857 if (flags
& NDR_SET_VALUES
) {
10858 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10860 if (flags
& NDR_IN
) {
10861 ndr_print_struct(ndr
, "in", "lsa_SetDomainInformationPolicy");
10863 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10865 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10867 ndr_print_uint16(ndr
, "level", r
->in
.level
);
10868 ndr_print_ptr(ndr
, "info", r
->in
.info
);
10871 ndr_print_set_switch_value(ndr
, r
->in
.info
, r
->in
.level
);
10872 ndr_print_lsa_DomainInformationPolicy(ndr
, "info", r
->in
.info
);
10877 if (flags
& NDR_OUT
) {
10878 ndr_print_struct(ndr
, "out", "lsa_SetDomainInformationPolicy");
10880 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10886 static enum ndr_err_code
ndr_push_lsa_OpenTrustedDomainByName(struct ndr_push
*ndr
, int flags
, const struct lsa_OpenTrustedDomainByName
*r
)
10888 if (flags
& NDR_IN
) {
10889 if (r
->in
.handle
== NULL
) {
10890 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10892 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10893 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
10894 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
10896 if (flags
& NDR_OUT
) {
10897 if (r
->out
.trustdom_handle
== NULL
) {
10898 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
10900 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10901 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10903 return NDR_ERR_SUCCESS
;
10906 static enum ndr_err_code
ndr_pull_lsa_OpenTrustedDomainByName(struct ndr_pull
*ndr
, int flags
, struct lsa_OpenTrustedDomainByName
*r
)
10908 TALLOC_CTX
*_mem_save_handle_0
;
10909 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
10910 if (flags
& NDR_IN
) {
10911 ZERO_STRUCT(r
->out
);
10913 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10914 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
10916 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10917 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
10918 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
10919 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10920 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.name
));
10921 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
10922 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10923 ZERO_STRUCTP(r
->out
.trustdom_handle
);
10925 if (flags
& NDR_OUT
) {
10926 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
10927 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
10929 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10930 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
10931 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
10932 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
10933 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10935 return NDR_ERR_SUCCESS
;
10938 _PUBLIC_
void ndr_print_lsa_OpenTrustedDomainByName(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_OpenTrustedDomainByName
*r
)
10940 ndr_print_struct(ndr
, name
, "lsa_OpenTrustedDomainByName");
10942 if (flags
& NDR_SET_VALUES
) {
10943 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10945 if (flags
& NDR_IN
) {
10946 ndr_print_struct(ndr
, "in", "lsa_OpenTrustedDomainByName");
10948 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
10950 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
10952 ndr_print_lsa_String(ndr
, "name", &r
->in
.name
);
10953 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
10956 if (flags
& NDR_OUT
) {
10957 ndr_print_struct(ndr
, "out", "lsa_OpenTrustedDomainByName");
10959 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10961 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
10963 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
10969 static enum ndr_err_code
ndr_push_lsa_TestCall(struct ndr_push
*ndr
, int flags
, const struct lsa_TestCall
*r
)
10971 if (flags
& NDR_IN
) {
10973 if (flags
& NDR_OUT
) {
10974 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
10976 return NDR_ERR_SUCCESS
;
10979 static enum ndr_err_code
ndr_pull_lsa_TestCall(struct ndr_pull
*ndr
, int flags
, struct lsa_TestCall
*r
)
10981 if (flags
& NDR_IN
) {
10983 if (flags
& NDR_OUT
) {
10984 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
10986 return NDR_ERR_SUCCESS
;
10989 _PUBLIC_
void ndr_print_lsa_TestCall(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_TestCall
*r
)
10991 ndr_print_struct(ndr
, name
, "lsa_TestCall");
10993 if (flags
& NDR_SET_VALUES
) {
10994 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
10996 if (flags
& NDR_IN
) {
10997 ndr_print_struct(ndr
, "in", "lsa_TestCall");
11001 if (flags
& NDR_OUT
) {
11002 ndr_print_struct(ndr
, "out", "lsa_TestCall");
11004 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11010 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupSids2(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupSids2
*r
)
11012 if (flags
& NDR_IN
) {
11013 if (r
->in
.handle
== NULL
) {
11014 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11016 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11017 if (r
->in
.sids
== NULL
) {
11018 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11020 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11021 if (r
->in
.names
== NULL
) {
11022 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11024 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
11025 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
11026 if (r
->in
.count
== NULL
) {
11027 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11029 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
11030 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
11031 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
11033 if (flags
& NDR_OUT
) {
11034 if (r
->out
.domains
== NULL
) {
11035 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11037 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
11038 if (*r
->out
.domains
) {
11039 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11041 if (r
->out
.names
== NULL
) {
11042 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11044 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
11045 if (r
->out
.count
== NULL
) {
11046 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11048 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
11049 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11051 return NDR_ERR_SUCCESS
;
11054 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupSids2(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupSids2
*r
)
11056 uint32_t _ptr_domains
;
11057 TALLOC_CTX
*_mem_save_handle_0
;
11058 TALLOC_CTX
*_mem_save_sids_0
;
11059 TALLOC_CTX
*_mem_save_domains_0
;
11060 TALLOC_CTX
*_mem_save_domains_1
;
11061 TALLOC_CTX
*_mem_save_names_0
;
11062 TALLOC_CTX
*_mem_save_count_0
;
11063 if (flags
& NDR_IN
) {
11064 ZERO_STRUCT(r
->out
);
11066 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11067 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
11069 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11070 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
11071 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11072 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11073 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11074 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
11076 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11077 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11078 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11079 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11080 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11081 NDR_PULL_ALLOC(ndr
, r
->in
.names
);
11083 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11084 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, LIBNDR_FLAG_REF_ALLOC
);
11085 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
11086 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
11087 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
11088 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11089 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
11091 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11092 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
11093 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
11094 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11095 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
11096 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
11097 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11098 ZERO_STRUCTP(r
->out
.domains
);
11099 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
11100 *r
->out
.names
= *r
->in
.names
;
11101 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11102 *r
->out
.count
= *r
->in
.count
;
11104 if (flags
& NDR_OUT
) {
11105 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11106 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11108 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11109 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
11110 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
11111 if (_ptr_domains
) {
11112 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
11114 *r
->out
.domains
= NULL
;
11116 if (*r
->out
.domains
) {
11117 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11118 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
11119 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11120 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
11122 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
11123 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11124 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
11126 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11127 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.names
, LIBNDR_FLAG_REF_ALLOC
);
11128 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
11129 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
11130 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11131 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11133 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11134 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
11135 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
11136 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11137 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11139 return NDR_ERR_SUCCESS
;
11142 _PUBLIC_
void ndr_print_lsa_LookupSids2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupSids2
*r
)
11144 ndr_print_struct(ndr
, name
, "lsa_LookupSids2");
11146 if (flags
& NDR_SET_VALUES
) {
11147 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11149 if (flags
& NDR_IN
) {
11150 ndr_print_struct(ndr
, "in", "lsa_LookupSids2");
11152 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
11154 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
11156 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
11158 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
11160 ndr_print_ptr(ndr
, "names", r
->in
.names
);
11162 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->in
.names
);
11164 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
11165 ndr_print_ptr(ndr
, "count", r
->in
.count
);
11167 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
11169 ndr_print_lsa_LookupOptions(ndr
, "lookup_options", r
->in
.lookup_options
);
11170 ndr_print_lsa_ClientRevision(ndr
, "client_revision", r
->in
.client_revision
);
11173 if (flags
& NDR_OUT
) {
11174 ndr_print_struct(ndr
, "out", "lsa_LookupSids2");
11176 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
11178 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
11180 if (*r
->out
.domains
) {
11181 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
11185 ndr_print_ptr(ndr
, "names", r
->out
.names
);
11187 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->out
.names
);
11189 ndr_print_ptr(ndr
, "count", r
->out
.count
);
11191 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
11193 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11199 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupNames2(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames2
*r
)
11201 uint32_t cntr_names_0
;
11202 if (flags
& NDR_IN
) {
11203 if (r
->in
.handle
== NULL
) {
11204 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11206 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11207 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
11208 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.num_names
));
11209 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11210 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
11212 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11213 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
11215 if (r
->in
.sids
== NULL
) {
11216 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11218 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11219 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
11220 if (r
->in
.count
== NULL
) {
11221 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11223 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
11224 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
11225 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
11227 if (flags
& NDR_OUT
) {
11228 if (r
->out
.domains
== NULL
) {
11229 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11231 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
11232 if (*r
->out
.domains
) {
11233 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11235 if (r
->out
.sids
== NULL
) {
11236 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11238 NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
11239 if (r
->out
.count
== NULL
) {
11240 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11242 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
11243 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11245 return NDR_ERR_SUCCESS
;
11248 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupNames2(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames2
*r
)
11250 uint32_t cntr_names_0
;
11251 uint32_t _ptr_domains
;
11252 TALLOC_CTX
*_mem_save_handle_0
;
11253 TALLOC_CTX
*_mem_save_names_0
;
11254 TALLOC_CTX
*_mem_save_domains_0
;
11255 TALLOC_CTX
*_mem_save_domains_1
;
11256 TALLOC_CTX
*_mem_save_sids_0
;
11257 TALLOC_CTX
*_mem_save_count_0
;
11258 if (flags
& NDR_IN
) {
11259 ZERO_STRUCT(r
->out
);
11261 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11262 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
11264 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11265 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
11266 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11267 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11268 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
11269 if (r
->in
.num_names
> 1000) {
11270 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
11272 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
11273 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, ndr_get_array_size(ndr
, &r
->in
.names
));
11274 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11275 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
11276 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11277 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
11279 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11280 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
11282 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
11283 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11284 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
11286 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11287 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11288 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11289 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11290 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
11291 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11292 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
11294 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11295 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
11296 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
11297 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11298 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
11299 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
11300 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11301 ZERO_STRUCTP(r
->out
.domains
);
11302 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
11303 *r
->out
.sids
= *r
->in
.sids
;
11304 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11305 *r
->out
.count
= *r
->in
.count
;
11307 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
11310 if (flags
& NDR_OUT
) {
11311 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11312 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11314 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11315 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
11316 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
11317 if (_ptr_domains
) {
11318 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
11320 *r
->out
.domains
= NULL
;
11322 if (*r
->out
.domains
) {
11323 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11324 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
11325 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11326 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
11328 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
11329 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11330 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
11332 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11333 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11334 NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
11335 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11336 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11337 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11339 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11340 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
11341 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
11342 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11343 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11345 return NDR_ERR_SUCCESS
;
11348 _PUBLIC_
void ndr_print_lsa_LookupNames2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames2
*r
)
11350 uint32_t cntr_names_0
;
11351 ndr_print_struct(ndr
, name
, "lsa_LookupNames2");
11353 if (flags
& NDR_SET_VALUES
) {
11354 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11356 if (flags
& NDR_IN
) {
11357 ndr_print_struct(ndr
, "in", "lsa_LookupNames2");
11359 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
11361 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
11363 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
11364 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
11366 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
11368 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
11369 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
11374 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
11376 ndr_print_lsa_TransSidArray2(ndr
, "sids", r
->in
.sids
);
11378 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
11379 ndr_print_ptr(ndr
, "count", r
->in
.count
);
11381 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
11383 ndr_print_lsa_LookupOptions(ndr
, "lookup_options", r
->in
.lookup_options
);
11384 ndr_print_lsa_ClientRevision(ndr
, "client_revision", r
->in
.client_revision
);
11387 if (flags
& NDR_OUT
) {
11388 ndr_print_struct(ndr
, "out", "lsa_LookupNames2");
11390 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
11392 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
11394 if (*r
->out
.domains
) {
11395 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
11399 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
11401 ndr_print_lsa_TransSidArray2(ndr
, "sids", r
->out
.sids
);
11403 ndr_print_ptr(ndr
, "count", r
->out
.count
);
11405 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
11407 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11413 static enum ndr_err_code
ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push
*ndr
, int flags
, const struct lsa_CreateTrustedDomainEx2
*r
)
11415 if (flags
& NDR_IN
) {
11416 if (r
->in
.policy_handle
== NULL
) {
11417 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11419 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
11420 if (r
->in
.info
== NULL
) {
11421 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11423 NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
11424 if (r
->in
.auth_info
== NULL
) {
11425 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11427 NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
11428 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
11430 if (flags
& NDR_OUT
) {
11431 if (r
->out
.trustdom_handle
== NULL
) {
11432 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11434 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
11435 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11437 return NDR_ERR_SUCCESS
;
11440 static enum ndr_err_code
ndr_pull_lsa_CreateTrustedDomainEx2(struct ndr_pull
*ndr
, int flags
, struct lsa_CreateTrustedDomainEx2
*r
)
11442 TALLOC_CTX
*_mem_save_policy_handle_0
;
11443 TALLOC_CTX
*_mem_save_info_0
;
11444 TALLOC_CTX
*_mem_save_auth_info_0
;
11445 TALLOC_CTX
*_mem_save_trustdom_handle_0
;
11446 if (flags
& NDR_IN
) {
11447 ZERO_STRUCT(r
->out
);
11449 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11450 NDR_PULL_ALLOC(ndr
, r
->in
.policy_handle
);
11452 _mem_save_policy_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11453 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.policy_handle
, LIBNDR_FLAG_REF_ALLOC
);
11454 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.policy_handle
));
11455 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_policy_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11456 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11457 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
11459 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11460 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, LIBNDR_FLAG_REF_ALLOC
);
11461 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info
));
11462 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11463 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11464 NDR_PULL_ALLOC(ndr
, r
->in
.auth_info
);
11466 _mem_save_auth_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11467 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.auth_info
, LIBNDR_FLAG_REF_ALLOC
);
11468 NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.auth_info
));
11469 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_auth_info_0
, LIBNDR_FLAG_REF_ALLOC
);
11470 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
11471 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
11472 ZERO_STRUCTP(r
->out
.trustdom_handle
);
11474 if (flags
& NDR_OUT
) {
11475 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11476 NDR_PULL_ALLOC(ndr
, r
->out
.trustdom_handle
);
11478 _mem_save_trustdom_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11479 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.trustdom_handle
, LIBNDR_FLAG_REF_ALLOC
);
11480 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.trustdom_handle
));
11481 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trustdom_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11482 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11484 return NDR_ERR_SUCCESS
;
11487 _PUBLIC_
void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CreateTrustedDomainEx2
*r
)
11489 ndr_print_struct(ndr
, name
, "lsa_CreateTrustedDomainEx2");
11491 if (flags
& NDR_SET_VALUES
) {
11492 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11494 if (flags
& NDR_IN
) {
11495 ndr_print_struct(ndr
, "in", "lsa_CreateTrustedDomainEx2");
11497 ndr_print_ptr(ndr
, "policy_handle", r
->in
.policy_handle
);
11499 ndr_print_policy_handle(ndr
, "policy_handle", r
->in
.policy_handle
);
11501 ndr_print_ptr(ndr
, "info", r
->in
.info
);
11503 ndr_print_lsa_TrustDomainInfoInfoEx(ndr
, "info", r
->in
.info
);
11505 ndr_print_ptr(ndr
, "auth_info", r
->in
.auth_info
);
11507 ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr
, "auth_info", r
->in
.auth_info
);
11509 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
11512 if (flags
& NDR_OUT
) {
11513 ndr_print_struct(ndr
, "out", "lsa_CreateTrustedDomainEx2");
11515 ndr_print_ptr(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
11517 ndr_print_policy_handle(ndr
, "trustdom_handle", r
->out
.trustdom_handle
);
11519 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11525 static enum ndr_err_code
ndr_push_lsa_CREDRWRITE(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRWRITE
*r
)
11527 if (flags
& NDR_IN
) {
11529 if (flags
& NDR_OUT
) {
11530 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11532 return NDR_ERR_SUCCESS
;
11535 static enum ndr_err_code
ndr_pull_lsa_CREDRWRITE(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRWRITE
*r
)
11537 if (flags
& NDR_IN
) {
11539 if (flags
& NDR_OUT
) {
11540 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11542 return NDR_ERR_SUCCESS
;
11545 _PUBLIC_
void ndr_print_lsa_CREDRWRITE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRWRITE
*r
)
11547 ndr_print_struct(ndr
, name
, "lsa_CREDRWRITE");
11549 if (flags
& NDR_SET_VALUES
) {
11550 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11552 if (flags
& NDR_IN
) {
11553 ndr_print_struct(ndr
, "in", "lsa_CREDRWRITE");
11557 if (flags
& NDR_OUT
) {
11558 ndr_print_struct(ndr
, "out", "lsa_CREDRWRITE");
11560 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11566 static enum ndr_err_code
ndr_push_lsa_CREDRREAD(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRREAD
*r
)
11568 if (flags
& NDR_IN
) {
11570 if (flags
& NDR_OUT
) {
11571 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11573 return NDR_ERR_SUCCESS
;
11576 static enum ndr_err_code
ndr_pull_lsa_CREDRREAD(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRREAD
*r
)
11578 if (flags
& NDR_IN
) {
11580 if (flags
& NDR_OUT
) {
11581 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11583 return NDR_ERR_SUCCESS
;
11586 _PUBLIC_
void ndr_print_lsa_CREDRREAD(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRREAD
*r
)
11588 ndr_print_struct(ndr
, name
, "lsa_CREDRREAD");
11590 if (flags
& NDR_SET_VALUES
) {
11591 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11593 if (flags
& NDR_IN
) {
11594 ndr_print_struct(ndr
, "in", "lsa_CREDRREAD");
11598 if (flags
& NDR_OUT
) {
11599 ndr_print_struct(ndr
, "out", "lsa_CREDRREAD");
11601 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11607 static enum ndr_err_code
ndr_push_lsa_CREDRENUMERATE(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRENUMERATE
*r
)
11609 if (flags
& NDR_IN
) {
11611 if (flags
& NDR_OUT
) {
11612 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11614 return NDR_ERR_SUCCESS
;
11617 static enum ndr_err_code
ndr_pull_lsa_CREDRENUMERATE(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRENUMERATE
*r
)
11619 if (flags
& NDR_IN
) {
11621 if (flags
& NDR_OUT
) {
11622 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11624 return NDR_ERR_SUCCESS
;
11627 _PUBLIC_
void ndr_print_lsa_CREDRENUMERATE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRENUMERATE
*r
)
11629 ndr_print_struct(ndr
, name
, "lsa_CREDRENUMERATE");
11631 if (flags
& NDR_SET_VALUES
) {
11632 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11634 if (flags
& NDR_IN
) {
11635 ndr_print_struct(ndr
, "in", "lsa_CREDRENUMERATE");
11639 if (flags
& NDR_OUT
) {
11640 ndr_print_struct(ndr
, "out", "lsa_CREDRENUMERATE");
11642 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11648 static enum ndr_err_code
ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRWRITEDOMAINCREDENTIALS
*r
)
11650 if (flags
& NDR_IN
) {
11652 if (flags
& NDR_OUT
) {
11653 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11655 return NDR_ERR_SUCCESS
;
11658 static enum ndr_err_code
ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRWRITEDOMAINCREDENTIALS
*r
)
11660 if (flags
& NDR_IN
) {
11662 if (flags
& NDR_OUT
) {
11663 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11665 return NDR_ERR_SUCCESS
;
11668 _PUBLIC_
void ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRWRITEDOMAINCREDENTIALS
*r
)
11670 ndr_print_struct(ndr
, name
, "lsa_CREDRWRITEDOMAINCREDENTIALS");
11672 if (flags
& NDR_SET_VALUES
) {
11673 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11675 if (flags
& NDR_IN
) {
11676 ndr_print_struct(ndr
, "in", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11680 if (flags
& NDR_OUT
) {
11681 ndr_print_struct(ndr
, "out", "lsa_CREDRWRITEDOMAINCREDENTIALS");
11683 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11689 static enum ndr_err_code
ndr_push_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRREADDOMAINCREDENTIALS
*r
)
11691 if (flags
& NDR_IN
) {
11693 if (flags
& NDR_OUT
) {
11694 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11696 return NDR_ERR_SUCCESS
;
11699 static enum ndr_err_code
ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRREADDOMAINCREDENTIALS
*r
)
11701 if (flags
& NDR_IN
) {
11703 if (flags
& NDR_OUT
) {
11704 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11706 return NDR_ERR_SUCCESS
;
11709 _PUBLIC_
void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRREADDOMAINCREDENTIALS
*r
)
11711 ndr_print_struct(ndr
, name
, "lsa_CREDRREADDOMAINCREDENTIALS");
11713 if (flags
& NDR_SET_VALUES
) {
11714 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11716 if (flags
& NDR_IN
) {
11717 ndr_print_struct(ndr
, "in", "lsa_CREDRREADDOMAINCREDENTIALS");
11721 if (flags
& NDR_OUT
) {
11722 ndr_print_struct(ndr
, "out", "lsa_CREDRREADDOMAINCREDENTIALS");
11724 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11730 static enum ndr_err_code
ndr_push_lsa_CREDRDELETE(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRDELETE
*r
)
11732 if (flags
& NDR_IN
) {
11734 if (flags
& NDR_OUT
) {
11735 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11737 return NDR_ERR_SUCCESS
;
11740 static enum ndr_err_code
ndr_pull_lsa_CREDRDELETE(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRDELETE
*r
)
11742 if (flags
& NDR_IN
) {
11744 if (flags
& NDR_OUT
) {
11745 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11747 return NDR_ERR_SUCCESS
;
11750 _PUBLIC_
void ndr_print_lsa_CREDRDELETE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRDELETE
*r
)
11752 ndr_print_struct(ndr
, name
, "lsa_CREDRDELETE");
11754 if (flags
& NDR_SET_VALUES
) {
11755 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11757 if (flags
& NDR_IN
) {
11758 ndr_print_struct(ndr
, "in", "lsa_CREDRDELETE");
11762 if (flags
& NDR_OUT
) {
11763 ndr_print_struct(ndr
, "out", "lsa_CREDRDELETE");
11765 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11771 static enum ndr_err_code
ndr_push_lsa_CREDRGETTARGETINFO(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRGETTARGETINFO
*r
)
11773 if (flags
& NDR_IN
) {
11775 if (flags
& NDR_OUT
) {
11776 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11778 return NDR_ERR_SUCCESS
;
11781 static enum ndr_err_code
ndr_pull_lsa_CREDRGETTARGETINFO(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRGETTARGETINFO
*r
)
11783 if (flags
& NDR_IN
) {
11785 if (flags
& NDR_OUT
) {
11786 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11788 return NDR_ERR_SUCCESS
;
11791 _PUBLIC_
void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRGETTARGETINFO
*r
)
11793 ndr_print_struct(ndr
, name
, "lsa_CREDRGETTARGETINFO");
11795 if (flags
& NDR_SET_VALUES
) {
11796 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11798 if (flags
& NDR_IN
) {
11799 ndr_print_struct(ndr
, "in", "lsa_CREDRGETTARGETINFO");
11803 if (flags
& NDR_OUT
) {
11804 ndr_print_struct(ndr
, "out", "lsa_CREDRGETTARGETINFO");
11806 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11812 static enum ndr_err_code
ndr_push_lsa_CREDRPROFILELOADED(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRPROFILELOADED
*r
)
11814 if (flags
& NDR_IN
) {
11816 if (flags
& NDR_OUT
) {
11817 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11819 return NDR_ERR_SUCCESS
;
11822 static enum ndr_err_code
ndr_pull_lsa_CREDRPROFILELOADED(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRPROFILELOADED
*r
)
11824 if (flags
& NDR_IN
) {
11826 if (flags
& NDR_OUT
) {
11827 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11829 return NDR_ERR_SUCCESS
;
11832 _PUBLIC_
void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRPROFILELOADED
*r
)
11834 ndr_print_struct(ndr
, name
, "lsa_CREDRPROFILELOADED");
11836 if (flags
& NDR_SET_VALUES
) {
11837 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
11839 if (flags
& NDR_IN
) {
11840 ndr_print_struct(ndr
, "in", "lsa_CREDRPROFILELOADED");
11844 if (flags
& NDR_OUT
) {
11845 ndr_print_struct(ndr
, "out", "lsa_CREDRPROFILELOADED");
11847 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
11853 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupNames3(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames3
*r
)
11855 uint32_t cntr_names_0
;
11856 if (flags
& NDR_IN
) {
11857 if (r
->in
.handle
== NULL
) {
11858 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11860 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11861 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
11862 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.num_names
));
11863 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11864 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
11866 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11867 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
11869 if (r
->in
.sids
== NULL
) {
11870 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11872 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11873 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
11874 if (r
->in
.count
== NULL
) {
11875 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11877 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
11878 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
11879 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
11881 if (flags
& NDR_OUT
) {
11882 if (r
->out
.domains
== NULL
) {
11883 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11885 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
11886 if (*r
->out
.domains
) {
11887 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11889 if (r
->out
.sids
== NULL
) {
11890 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11892 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
11893 if (r
->out
.count
== NULL
) {
11894 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
11896 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
11897 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
11899 return NDR_ERR_SUCCESS
;
11902 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupNames3(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames3
*r
)
11904 uint32_t cntr_names_0
;
11905 uint32_t _ptr_domains
;
11906 TALLOC_CTX
*_mem_save_handle_0
;
11907 TALLOC_CTX
*_mem_save_names_0
;
11908 TALLOC_CTX
*_mem_save_domains_0
;
11909 TALLOC_CTX
*_mem_save_domains_1
;
11910 TALLOC_CTX
*_mem_save_sids_0
;
11911 TALLOC_CTX
*_mem_save_count_0
;
11912 if (flags
& NDR_IN
) {
11913 ZERO_STRUCT(r
->out
);
11915 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11916 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
11918 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11919 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
11920 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
11921 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
11922 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
11923 if (r
->in
.num_names
> 1000) {
11924 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
11926 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
11927 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, ndr_get_array_size(ndr
, &r
->in
.names
));
11928 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11929 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
11930 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11931 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
11933 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
11934 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
11936 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
11937 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11938 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
11940 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11941 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11942 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
11943 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11944 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
11945 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11946 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
11948 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11949 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
11950 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
11951 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11952 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
11953 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
11954 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11955 ZERO_STRUCTP(r
->out
.domains
);
11956 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
11957 *r
->out
.sids
= *r
->in
.sids
;
11958 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11959 *r
->out
.count
= *r
->in
.count
;
11961 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
11964 if (flags
& NDR_OUT
) {
11965 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11966 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
11968 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11969 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
11970 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
11971 if (_ptr_domains
) {
11972 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
11974 *r
->out
.domains
= NULL
;
11976 if (*r
->out
.domains
) {
11977 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
11978 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
11979 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
11980 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
11982 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
11983 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11984 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
11986 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11987 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
11988 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
11989 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
11990 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
11991 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
11993 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11994 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
11995 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
11996 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
11997 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
11999 return NDR_ERR_SUCCESS
;
12002 _PUBLIC_
void ndr_print_lsa_LookupNames3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames3
*r
)
12004 uint32_t cntr_names_0
;
12005 ndr_print_struct(ndr
, name
, "lsa_LookupNames3");
12007 if (flags
& NDR_SET_VALUES
) {
12008 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12010 if (flags
& NDR_IN
) {
12011 ndr_print_struct(ndr
, "in", "lsa_LookupNames3");
12013 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
12015 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
12017 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
12018 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
12020 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
12022 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
12023 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
12028 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
12030 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->in
.sids
);
12032 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
12033 ndr_print_ptr(ndr
, "count", r
->in
.count
);
12035 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
12037 ndr_print_lsa_LookupOptions(ndr
, "lookup_options", r
->in
.lookup_options
);
12038 ndr_print_lsa_ClientRevision(ndr
, "client_revision", r
->in
.client_revision
);
12041 if (flags
& NDR_OUT
) {
12042 ndr_print_struct(ndr
, "out", "lsa_LookupNames3");
12044 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
12046 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
12048 if (*r
->out
.domains
) {
12049 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
12053 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
12055 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->out
.sids
);
12057 ndr_print_ptr(ndr
, "count", r
->out
.count
);
12059 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
12061 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12067 static enum ndr_err_code
ndr_push_lsa_CREDRGETSESSIONTYPES(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRGETSESSIONTYPES
*r
)
12069 if (flags
& NDR_IN
) {
12071 if (flags
& NDR_OUT
) {
12072 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12074 return NDR_ERR_SUCCESS
;
12077 static enum ndr_err_code
ndr_pull_lsa_CREDRGETSESSIONTYPES(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRGETSESSIONTYPES
*r
)
12079 if (flags
& NDR_IN
) {
12081 if (flags
& NDR_OUT
) {
12082 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12084 return NDR_ERR_SUCCESS
;
12087 _PUBLIC_
void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRGETSESSIONTYPES
*r
)
12089 ndr_print_struct(ndr
, name
, "lsa_CREDRGETSESSIONTYPES");
12091 if (flags
& NDR_SET_VALUES
) {
12092 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12094 if (flags
& NDR_IN
) {
12095 ndr_print_struct(ndr
, "in", "lsa_CREDRGETSESSIONTYPES");
12099 if (flags
& NDR_OUT
) {
12100 ndr_print_struct(ndr
, "out", "lsa_CREDRGETSESSIONTYPES");
12102 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12108 static enum ndr_err_code
ndr_push_lsa_LSARREGISTERAUDITEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARREGISTERAUDITEVENT
*r
)
12110 if (flags
& NDR_IN
) {
12112 if (flags
& NDR_OUT
) {
12113 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12115 return NDR_ERR_SUCCESS
;
12118 static enum ndr_err_code
ndr_pull_lsa_LSARREGISTERAUDITEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARREGISTERAUDITEVENT
*r
)
12120 if (flags
& NDR_IN
) {
12122 if (flags
& NDR_OUT
) {
12123 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12125 return NDR_ERR_SUCCESS
;
12128 _PUBLIC_
void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARREGISTERAUDITEVENT
*r
)
12130 ndr_print_struct(ndr
, name
, "lsa_LSARREGISTERAUDITEVENT");
12132 if (flags
& NDR_SET_VALUES
) {
12133 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12135 if (flags
& NDR_IN
) {
12136 ndr_print_struct(ndr
, "in", "lsa_LSARREGISTERAUDITEVENT");
12140 if (flags
& NDR_OUT
) {
12141 ndr_print_struct(ndr
, "out", "lsa_LSARREGISTERAUDITEVENT");
12143 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12149 static enum ndr_err_code
ndr_push_lsa_LSARGENAUDITEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARGENAUDITEVENT
*r
)
12151 if (flags
& NDR_IN
) {
12153 if (flags
& NDR_OUT
) {
12154 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12156 return NDR_ERR_SUCCESS
;
12159 static enum ndr_err_code
ndr_pull_lsa_LSARGENAUDITEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARGENAUDITEVENT
*r
)
12161 if (flags
& NDR_IN
) {
12163 if (flags
& NDR_OUT
) {
12164 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12166 return NDR_ERR_SUCCESS
;
12169 _PUBLIC_
void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARGENAUDITEVENT
*r
)
12171 ndr_print_struct(ndr
, name
, "lsa_LSARGENAUDITEVENT");
12173 if (flags
& NDR_SET_VALUES
) {
12174 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12176 if (flags
& NDR_IN
) {
12177 ndr_print_struct(ndr
, "in", "lsa_LSARGENAUDITEVENT");
12181 if (flags
& NDR_OUT
) {
12182 ndr_print_struct(ndr
, "out", "lsa_LSARGENAUDITEVENT");
12184 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12190 static enum ndr_err_code
ndr_push_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARUNREGISTERAUDITEVENT
*r
)
12192 if (flags
& NDR_IN
) {
12194 if (flags
& NDR_OUT
) {
12195 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12197 return NDR_ERR_SUCCESS
;
12200 static enum ndr_err_code
ndr_pull_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARUNREGISTERAUDITEVENT
*r
)
12202 if (flags
& NDR_IN
) {
12204 if (flags
& NDR_OUT
) {
12205 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12207 return NDR_ERR_SUCCESS
;
12210 _PUBLIC_
void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARUNREGISTERAUDITEVENT
*r
)
12212 ndr_print_struct(ndr
, name
, "lsa_LSARUNREGISTERAUDITEVENT");
12214 if (flags
& NDR_SET_VALUES
) {
12215 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12217 if (flags
& NDR_IN
) {
12218 ndr_print_struct(ndr
, "in", "lsa_LSARUNREGISTERAUDITEVENT");
12222 if (flags
& NDR_OUT
) {
12223 ndr_print_struct(ndr
, "out", "lsa_LSARUNREGISTERAUDITEVENT");
12225 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12231 static enum ndr_err_code
ndr_push_lsa_lsaRQueryForestTrustInformation(struct ndr_push
*ndr
, int flags
, const struct lsa_lsaRQueryForestTrustInformation
*r
)
12233 if (flags
& NDR_IN
) {
12234 if (r
->in
.handle
== NULL
) {
12235 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12237 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
12238 if (r
->in
.trusted_domain_name
== NULL
) {
12239 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12241 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain_name
));
12242 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->in
.unknown
));
12244 if (flags
& NDR_OUT
) {
12245 if (r
->out
.forest_trust_info
== NULL
) {
12246 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12248 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.forest_trust_info
));
12249 if (*r
->out
.forest_trust_info
) {
12250 NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.forest_trust_info
));
12252 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12254 return NDR_ERR_SUCCESS
;
12257 static enum ndr_err_code
ndr_pull_lsa_lsaRQueryForestTrustInformation(struct ndr_pull
*ndr
, int flags
, struct lsa_lsaRQueryForestTrustInformation
*r
)
12259 uint32_t _ptr_forest_trust_info
;
12260 TALLOC_CTX
*_mem_save_handle_0
;
12261 TALLOC_CTX
*_mem_save_trusted_domain_name_0
;
12262 TALLOC_CTX
*_mem_save_forest_trust_info_0
;
12263 TALLOC_CTX
*_mem_save_forest_trust_info_1
;
12264 if (flags
& NDR_IN
) {
12265 ZERO_STRUCT(r
->out
);
12267 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12268 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
12270 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12271 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
12272 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
12273 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
12274 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12275 NDR_PULL_ALLOC(ndr
, r
->in
.trusted_domain_name
);
12277 _mem_save_trusted_domain_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12278 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.trusted_domain_name
, LIBNDR_FLAG_REF_ALLOC
);
12279 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.trusted_domain_name
));
12280 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_trusted_domain_name_0
, LIBNDR_FLAG_REF_ALLOC
);
12281 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->in
.unknown
));
12282 NDR_PULL_ALLOC(ndr
, r
->out
.forest_trust_info
);
12283 ZERO_STRUCTP(r
->out
.forest_trust_info
);
12285 if (flags
& NDR_OUT
) {
12286 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12287 NDR_PULL_ALLOC(ndr
, r
->out
.forest_trust_info
);
12289 _mem_save_forest_trust_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12290 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.forest_trust_info
, LIBNDR_FLAG_REF_ALLOC
);
12291 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_forest_trust_info
));
12292 if (_ptr_forest_trust_info
) {
12293 NDR_PULL_ALLOC(ndr
, *r
->out
.forest_trust_info
);
12295 *r
->out
.forest_trust_info
= NULL
;
12297 if (*r
->out
.forest_trust_info
) {
12298 _mem_save_forest_trust_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12299 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.forest_trust_info
, 0);
12300 NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.forest_trust_info
));
12301 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_info_1
, 0);
12303 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_forest_trust_info_0
, LIBNDR_FLAG_REF_ALLOC
);
12304 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12306 return NDR_ERR_SUCCESS
;
12309 _PUBLIC_
void ndr_print_lsa_lsaRQueryForestTrustInformation(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_lsaRQueryForestTrustInformation
*r
)
12311 ndr_print_struct(ndr
, name
, "lsa_lsaRQueryForestTrustInformation");
12313 if (flags
& NDR_SET_VALUES
) {
12314 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12316 if (flags
& NDR_IN
) {
12317 ndr_print_struct(ndr
, "in", "lsa_lsaRQueryForestTrustInformation");
12319 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
12321 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
12323 ndr_print_ptr(ndr
, "trusted_domain_name", r
->in
.trusted_domain_name
);
12325 ndr_print_lsa_String(ndr
, "trusted_domain_name", r
->in
.trusted_domain_name
);
12327 ndr_print_uint16(ndr
, "unknown", r
->in
.unknown
);
12330 if (flags
& NDR_OUT
) {
12331 ndr_print_struct(ndr
, "out", "lsa_lsaRQueryForestTrustInformation");
12333 ndr_print_ptr(ndr
, "forest_trust_info", r
->out
.forest_trust_info
);
12335 ndr_print_ptr(ndr
, "forest_trust_info", *r
->out
.forest_trust_info
);
12337 if (*r
->out
.forest_trust_info
) {
12338 ndr_print_lsa_ForestTrustInformation(ndr
, "forest_trust_info", *r
->out
.forest_trust_info
);
12342 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12348 static enum ndr_err_code
ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARSETFORESTTRUSTINFORMATION
*r
)
12350 if (flags
& NDR_IN
) {
12352 if (flags
& NDR_OUT
) {
12353 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12355 return NDR_ERR_SUCCESS
;
12358 static enum ndr_err_code
ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARSETFORESTTRUSTINFORMATION
*r
)
12360 if (flags
& NDR_IN
) {
12362 if (flags
& NDR_OUT
) {
12363 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12365 return NDR_ERR_SUCCESS
;
12368 _PUBLIC_
void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARSETFORESTTRUSTINFORMATION
*r
)
12370 ndr_print_struct(ndr
, name
, "lsa_LSARSETFORESTTRUSTINFORMATION");
12372 if (flags
& NDR_SET_VALUES
) {
12373 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12375 if (flags
& NDR_IN
) {
12376 ndr_print_struct(ndr
, "in", "lsa_LSARSETFORESTTRUSTINFORMATION");
12380 if (flags
& NDR_OUT
) {
12381 ndr_print_struct(ndr
, "out", "lsa_LSARSETFORESTTRUSTINFORMATION");
12383 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12389 static enum ndr_err_code
ndr_push_lsa_CREDRRENAME(struct ndr_push
*ndr
, int flags
, const struct lsa_CREDRRENAME
*r
)
12391 if (flags
& NDR_IN
) {
12393 if (flags
& NDR_OUT
) {
12394 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12396 return NDR_ERR_SUCCESS
;
12399 static enum ndr_err_code
ndr_pull_lsa_CREDRRENAME(struct ndr_pull
*ndr
, int flags
, struct lsa_CREDRRENAME
*r
)
12401 if (flags
& NDR_IN
) {
12403 if (flags
& NDR_OUT
) {
12404 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12406 return NDR_ERR_SUCCESS
;
12409 _PUBLIC_
void ndr_print_lsa_CREDRRENAME(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_CREDRRENAME
*r
)
12411 ndr_print_struct(ndr
, name
, "lsa_CREDRRENAME");
12413 if (flags
& NDR_SET_VALUES
) {
12414 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12416 if (flags
& NDR_IN
) {
12417 ndr_print_struct(ndr
, "in", "lsa_CREDRRENAME");
12421 if (flags
& NDR_OUT
) {
12422 ndr_print_struct(ndr
, "out", "lsa_CREDRRENAME");
12424 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12430 _PUBLIC_
enum ndr_err_code
ndr_push_lsa_LookupSids3(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupSids3
*r
)
12432 if (flags
& NDR_IN
) {
12433 if (r
->in
.sids
== NULL
) {
12434 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12436 NDR_CHECK(ndr_push_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12437 if (r
->in
.names
== NULL
) {
12438 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12440 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
12441 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
12442 if (r
->in
.count
== NULL
) {
12443 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12445 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
12446 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
12447 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
12449 if (flags
& NDR_OUT
) {
12450 if (r
->out
.domains
== NULL
) {
12451 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12453 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
12454 if (*r
->out
.domains
) {
12455 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12457 if (r
->out
.names
== NULL
) {
12458 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12460 NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
12461 if (r
->out
.count
== NULL
) {
12462 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12464 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
12465 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12467 return NDR_ERR_SUCCESS
;
12470 _PUBLIC_
enum ndr_err_code
ndr_pull_lsa_LookupSids3(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupSids3
*r
)
12472 uint32_t _ptr_domains
;
12473 TALLOC_CTX
*_mem_save_sids_0
;
12474 TALLOC_CTX
*_mem_save_domains_0
;
12475 TALLOC_CTX
*_mem_save_domains_1
;
12476 TALLOC_CTX
*_mem_save_names_0
;
12477 TALLOC_CTX
*_mem_save_count_0
;
12478 if (flags
& NDR_IN
) {
12479 ZERO_STRUCT(r
->out
);
12481 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12482 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
12484 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12485 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
12486 NDR_CHECK(ndr_pull_lsa_SidArray(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12487 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
12488 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12489 NDR_PULL_ALLOC(ndr
, r
->in
.names
);
12491 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12492 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, LIBNDR_FLAG_REF_ALLOC
);
12493 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.names
));
12494 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
12495 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
12496 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12497 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
12499 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12500 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
12501 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
12502 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12503 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
12504 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
12505 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12506 ZERO_STRUCTP(r
->out
.domains
);
12507 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
12508 *r
->out
.names
= *r
->in
.names
;
12509 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12510 *r
->out
.count
= *r
->in
.count
;
12512 if (flags
& NDR_OUT
) {
12513 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12514 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12516 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12517 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
12518 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
12519 if (_ptr_domains
) {
12520 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
12522 *r
->out
.domains
= NULL
;
12524 if (*r
->out
.domains
) {
12525 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12526 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
12527 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12528 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
12530 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
12531 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12532 NDR_PULL_ALLOC(ndr
, r
->out
.names
);
12534 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12535 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.names
, LIBNDR_FLAG_REF_ALLOC
);
12536 NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.names
));
12537 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, LIBNDR_FLAG_REF_ALLOC
);
12538 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12539 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12541 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12542 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
12543 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
12544 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12545 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12547 return NDR_ERR_SUCCESS
;
12550 _PUBLIC_
void ndr_print_lsa_LookupSids3(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupSids3
*r
)
12552 ndr_print_struct(ndr
, name
, "lsa_LookupSids3");
12554 if (flags
& NDR_SET_VALUES
) {
12555 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12557 if (flags
& NDR_IN
) {
12558 ndr_print_struct(ndr
, "in", "lsa_LookupSids3");
12560 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
12562 ndr_print_lsa_SidArray(ndr
, "sids", r
->in
.sids
);
12564 ndr_print_ptr(ndr
, "names", r
->in
.names
);
12566 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->in
.names
);
12568 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
12569 ndr_print_ptr(ndr
, "count", r
->in
.count
);
12571 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
12573 ndr_print_lsa_LookupOptions(ndr
, "lookup_options", r
->in
.lookup_options
);
12574 ndr_print_lsa_ClientRevision(ndr
, "client_revision", r
->in
.client_revision
);
12577 if (flags
& NDR_OUT
) {
12578 ndr_print_struct(ndr
, "out", "lsa_LookupSids3");
12580 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
12582 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
12584 if (*r
->out
.domains
) {
12585 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
12589 ndr_print_ptr(ndr
, "names", r
->out
.names
);
12591 ndr_print_lsa_TransNameArray2(ndr
, "names", r
->out
.names
);
12593 ndr_print_ptr(ndr
, "count", r
->out
.count
);
12595 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
12597 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12603 static enum ndr_err_code
ndr_push_lsa_LookupNames4(struct ndr_push
*ndr
, int flags
, const struct lsa_LookupNames4
*r
)
12605 uint32_t cntr_names_0
;
12606 if (flags
& NDR_IN
) {
12607 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.num_names
));
12608 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.num_names
));
12609 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
12610 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
12612 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
12613 NDR_CHECK(ndr_push_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
12615 if (r
->in
.sids
== NULL
) {
12616 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12618 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12619 NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, r
->in
.level
));
12620 if (r
->in
.count
== NULL
) {
12621 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12623 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.count
));
12624 NDR_CHECK(ndr_push_lsa_LookupOptions(ndr
, NDR_SCALARS
, r
->in
.lookup_options
));
12625 NDR_CHECK(ndr_push_lsa_ClientRevision(ndr
, NDR_SCALARS
, r
->in
.client_revision
));
12627 if (flags
& NDR_OUT
) {
12628 if (r
->out
.domains
== NULL
) {
12629 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12631 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.domains
));
12632 if (*r
->out
.domains
) {
12633 NDR_CHECK(ndr_push_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12635 if (r
->out
.sids
== NULL
) {
12636 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12638 NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
12639 if (r
->out
.count
== NULL
) {
12640 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
12642 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
12643 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12645 return NDR_ERR_SUCCESS
;
12648 static enum ndr_err_code
ndr_pull_lsa_LookupNames4(struct ndr_pull
*ndr
, int flags
, struct lsa_LookupNames4
*r
)
12650 uint32_t cntr_names_0
;
12651 uint32_t _ptr_domains
;
12652 TALLOC_CTX
*_mem_save_names_0
;
12653 TALLOC_CTX
*_mem_save_domains_0
;
12654 TALLOC_CTX
*_mem_save_domains_1
;
12655 TALLOC_CTX
*_mem_save_sids_0
;
12656 TALLOC_CTX
*_mem_save_count_0
;
12657 if (flags
& NDR_IN
) {
12658 ZERO_STRUCT(r
->out
);
12660 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.num_names
));
12661 if (r
->in
.num_names
> 1000) {
12662 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
12664 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.names
));
12665 NDR_PULL_ALLOC_N(ndr
, r
->in
.names
, ndr_get_array_size(ndr
, &r
->in
.names
));
12666 _mem_save_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12667 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.names
, 0);
12668 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
12669 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_SCALARS
, &r
->in
.names
[cntr_names_0
]));
12671 for (cntr_names_0
= 0; cntr_names_0
< r
->in
.num_names
; cntr_names_0
++) {
12672 NDR_CHECK(ndr_pull_lsa_String(ndr
, NDR_BUFFERS
, &r
->in
.names
[cntr_names_0
]));
12674 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_names_0
, 0);
12675 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12676 NDR_PULL_ALLOC(ndr
, r
->in
.sids
);
12678 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12679 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.sids
, LIBNDR_FLAG_REF_ALLOC
);
12680 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.sids
));
12681 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
12682 NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr
, NDR_SCALARS
, &r
->in
.level
));
12683 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12684 NDR_PULL_ALLOC(ndr
, r
->in
.count
);
12686 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12687 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.count
, LIBNDR_FLAG_REF_ALLOC
);
12688 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
12689 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12690 NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr
, NDR_SCALARS
, &r
->in
.lookup_options
));
12691 NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr
, NDR_SCALARS
, &r
->in
.client_revision
));
12692 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12693 ZERO_STRUCTP(r
->out
.domains
);
12694 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
12695 *r
->out
.sids
= *r
->in
.sids
;
12696 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12697 *r
->out
.count
= *r
->in
.count
;
12699 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.names
, r
->in
.num_names
));
12702 if (flags
& NDR_OUT
) {
12703 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12704 NDR_PULL_ALLOC(ndr
, r
->out
.domains
);
12706 _mem_save_domains_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12707 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.domains
, LIBNDR_FLAG_REF_ALLOC
);
12708 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_domains
));
12709 if (_ptr_domains
) {
12710 NDR_PULL_ALLOC(ndr
, *r
->out
.domains
);
12712 *r
->out
.domains
= NULL
;
12714 if (*r
->out
.domains
) {
12715 _mem_save_domains_1
= NDR_PULL_GET_MEM_CTX(ndr
);
12716 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.domains
, 0);
12717 NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.domains
));
12718 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_1
, 0);
12720 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_domains_0
, LIBNDR_FLAG_REF_ALLOC
);
12721 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12722 NDR_PULL_ALLOC(ndr
, r
->out
.sids
);
12724 _mem_save_sids_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12725 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.sids
, LIBNDR_FLAG_REF_ALLOC
);
12726 NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.sids
));
12727 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sids_0
, LIBNDR_FLAG_REF_ALLOC
);
12728 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
12729 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
12731 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12732 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
12733 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
12734 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
12735 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12737 return NDR_ERR_SUCCESS
;
12740 _PUBLIC_
void ndr_print_lsa_LookupNames4(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LookupNames4
*r
)
12742 uint32_t cntr_names_0
;
12743 ndr_print_struct(ndr
, name
, "lsa_LookupNames4");
12745 if (flags
& NDR_SET_VALUES
) {
12746 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12748 if (flags
& NDR_IN
) {
12749 ndr_print_struct(ndr
, "in", "lsa_LookupNames4");
12751 ndr_print_uint32(ndr
, "num_names", r
->in
.num_names
);
12752 ndr
->print(ndr
, "%s: ARRAY(%d)", "names", (int)r
->in
.num_names
);
12754 for (cntr_names_0
=0;cntr_names_0
<r
->in
.num_names
;cntr_names_0
++) {
12756 if (asprintf(&idx_0
, "[%d]", cntr_names_0
) != -1) {
12757 ndr_print_lsa_String(ndr
, "names", &r
->in
.names
[cntr_names_0
]);
12762 ndr_print_ptr(ndr
, "sids", r
->in
.sids
);
12764 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->in
.sids
);
12766 ndr_print_lsa_LookupNamesLevel(ndr
, "level", r
->in
.level
);
12767 ndr_print_ptr(ndr
, "count", r
->in
.count
);
12769 ndr_print_uint32(ndr
, "count", *r
->in
.count
);
12771 ndr_print_lsa_LookupOptions(ndr
, "lookup_options", r
->in
.lookup_options
);
12772 ndr_print_lsa_ClientRevision(ndr
, "client_revision", r
->in
.client_revision
);
12775 if (flags
& NDR_OUT
) {
12776 ndr_print_struct(ndr
, "out", "lsa_LookupNames4");
12778 ndr_print_ptr(ndr
, "domains", r
->out
.domains
);
12780 ndr_print_ptr(ndr
, "domains", *r
->out
.domains
);
12782 if (*r
->out
.domains
) {
12783 ndr_print_lsa_RefDomainList(ndr
, "domains", *r
->out
.domains
);
12787 ndr_print_ptr(ndr
, "sids", r
->out
.sids
);
12789 ndr_print_lsa_TransSidArray3(ndr
, "sids", r
->out
.sids
);
12791 ndr_print_ptr(ndr
, "count", r
->out
.count
);
12793 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
12795 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12801 static enum ndr_err_code
ndr_push_lsa_LSAROPENPOLICYSCE(struct ndr_push
*ndr
, int flags
, const struct lsa_LSAROPENPOLICYSCE
*r
)
12803 if (flags
& NDR_IN
) {
12805 if (flags
& NDR_OUT
) {
12806 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12808 return NDR_ERR_SUCCESS
;
12811 static enum ndr_err_code
ndr_pull_lsa_LSAROPENPOLICYSCE(struct ndr_pull
*ndr
, int flags
, struct lsa_LSAROPENPOLICYSCE
*r
)
12813 if (flags
& NDR_IN
) {
12815 if (flags
& NDR_OUT
) {
12816 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12818 return NDR_ERR_SUCCESS
;
12821 _PUBLIC_
void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSAROPENPOLICYSCE
*r
)
12823 ndr_print_struct(ndr
, name
, "lsa_LSAROPENPOLICYSCE");
12825 if (flags
& NDR_SET_VALUES
) {
12826 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12828 if (flags
& NDR_IN
) {
12829 ndr_print_struct(ndr
, "in", "lsa_LSAROPENPOLICYSCE");
12833 if (flags
& NDR_OUT
) {
12834 ndr_print_struct(ndr
, "out", "lsa_LSAROPENPOLICYSCE");
12836 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12842 static enum ndr_err_code
ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
*r
)
12844 if (flags
& NDR_IN
) {
12846 if (flags
& NDR_OUT
) {
12847 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12849 return NDR_ERR_SUCCESS
;
12852 static enum ndr_err_code
ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
*r
)
12854 if (flags
& NDR_IN
) {
12856 if (flags
& NDR_OUT
) {
12857 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12859 return NDR_ERR_SUCCESS
;
12862 _PUBLIC_
void ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
*r
)
12864 ndr_print_struct(ndr
, name
, "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12866 if (flags
& NDR_SET_VALUES
) {
12867 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12869 if (flags
& NDR_IN
) {
12870 ndr_print_struct(ndr
, "in", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12874 if (flags
& NDR_OUT
) {
12875 ndr_print_struct(ndr
, "out", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
12877 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12883 static enum ndr_err_code
ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
*r
)
12885 if (flags
& NDR_IN
) {
12887 if (flags
& NDR_OUT
) {
12888 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12890 return NDR_ERR_SUCCESS
;
12893 static enum ndr_err_code
ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
*r
)
12895 if (flags
& NDR_IN
) {
12897 if (flags
& NDR_OUT
) {
12898 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12900 return NDR_ERR_SUCCESS
;
12903 _PUBLIC_
void ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
*r
)
12905 ndr_print_struct(ndr
, name
, "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12907 if (flags
& NDR_SET_VALUES
) {
12908 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12910 if (flags
& NDR_IN
) {
12911 ndr_print_struct(ndr
, "in", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12915 if (flags
& NDR_OUT
) {
12916 ndr_print_struct(ndr
, "out", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
12918 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12924 static enum ndr_err_code
ndr_push_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_push
*ndr
, int flags
, const struct lsa_LSARADTREPORTSECURITYEVENT
*r
)
12926 if (flags
& NDR_IN
) {
12928 if (flags
& NDR_OUT
) {
12929 NDR_CHECK(ndr_push_NTSTATUS(ndr
, NDR_SCALARS
, r
->out
.result
));
12931 return NDR_ERR_SUCCESS
;
12934 static enum ndr_err_code
ndr_pull_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_pull
*ndr
, int flags
, struct lsa_LSARADTREPORTSECURITYEVENT
*r
)
12936 if (flags
& NDR_IN
) {
12938 if (flags
& NDR_OUT
) {
12939 NDR_CHECK(ndr_pull_NTSTATUS(ndr
, NDR_SCALARS
, &r
->out
.result
));
12941 return NDR_ERR_SUCCESS
;
12944 _PUBLIC_
void ndr_print_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_print
*ndr
, const char *name
, int flags
, const struct lsa_LSARADTREPORTSECURITYEVENT
*r
)
12946 ndr_print_struct(ndr
, name
, "lsa_LSARADTREPORTSECURITYEVENT");
12948 if (flags
& NDR_SET_VALUES
) {
12949 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
12951 if (flags
& NDR_IN
) {
12952 ndr_print_struct(ndr
, "in", "lsa_LSARADTREPORTSECURITYEVENT");
12956 if (flags
& NDR_OUT
) {
12957 ndr_print_struct(ndr
, "out", "lsa_LSARADTREPORTSECURITYEVENT");
12959 ndr_print_NTSTATUS(ndr
, "result", r
->out
.result
);
12965 static const struct ndr_interface_call lsarpc_calls
[] = {
12968 sizeof(struct lsa_Close
),
12969 (ndr_push_flags_fn_t
) ndr_push_lsa_Close
,
12970 (ndr_pull_flags_fn_t
) ndr_pull_lsa_Close
,
12971 (ndr_print_function_t
) ndr_print_lsa_Close
,
12976 sizeof(struct lsa_Delete
),
12977 (ndr_push_flags_fn_t
) ndr_push_lsa_Delete
,
12978 (ndr_pull_flags_fn_t
) ndr_pull_lsa_Delete
,
12979 (ndr_print_function_t
) ndr_print_lsa_Delete
,
12984 sizeof(struct lsa_EnumPrivs
),
12985 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumPrivs
,
12986 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumPrivs
,
12987 (ndr_print_function_t
) ndr_print_lsa_EnumPrivs
,
12991 "lsa_QuerySecurity",
12992 sizeof(struct lsa_QuerySecurity
),
12993 (ndr_push_flags_fn_t
) ndr_push_lsa_QuerySecurity
,
12994 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QuerySecurity
,
12995 (ndr_print_function_t
) ndr_print_lsa_QuerySecurity
,
13000 sizeof(struct lsa_SetSecObj
),
13001 (ndr_push_flags_fn_t
) ndr_push_lsa_SetSecObj
,
13002 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetSecObj
,
13003 (ndr_print_function_t
) ndr_print_lsa_SetSecObj
,
13007 "lsa_ChangePassword",
13008 sizeof(struct lsa_ChangePassword
),
13009 (ndr_push_flags_fn_t
) ndr_push_lsa_ChangePassword
,
13010 (ndr_pull_flags_fn_t
) ndr_pull_lsa_ChangePassword
,
13011 (ndr_print_function_t
) ndr_print_lsa_ChangePassword
,
13016 sizeof(struct lsa_OpenPolicy
),
13017 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenPolicy
,
13018 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenPolicy
,
13019 (ndr_print_function_t
) ndr_print_lsa_OpenPolicy
,
13023 "lsa_QueryInfoPolicy",
13024 sizeof(struct lsa_QueryInfoPolicy
),
13025 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryInfoPolicy
,
13026 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryInfoPolicy
,
13027 (ndr_print_function_t
) ndr_print_lsa_QueryInfoPolicy
,
13031 "lsa_SetInfoPolicy",
13032 sizeof(struct lsa_SetInfoPolicy
),
13033 (ndr_push_flags_fn_t
) ndr_push_lsa_SetInfoPolicy
,
13034 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetInfoPolicy
,
13035 (ndr_print_function_t
) ndr_print_lsa_SetInfoPolicy
,
13039 "lsa_ClearAuditLog",
13040 sizeof(struct lsa_ClearAuditLog
),
13041 (ndr_push_flags_fn_t
) ndr_push_lsa_ClearAuditLog
,
13042 (ndr_pull_flags_fn_t
) ndr_pull_lsa_ClearAuditLog
,
13043 (ndr_print_function_t
) ndr_print_lsa_ClearAuditLog
,
13047 "lsa_CreateAccount",
13048 sizeof(struct lsa_CreateAccount
),
13049 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateAccount
,
13050 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateAccount
,
13051 (ndr_print_function_t
) ndr_print_lsa_CreateAccount
,
13055 "lsa_EnumAccounts",
13056 sizeof(struct lsa_EnumAccounts
),
13057 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumAccounts
,
13058 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumAccounts
,
13059 (ndr_print_function_t
) ndr_print_lsa_EnumAccounts
,
13063 "lsa_CreateTrustedDomain",
13064 sizeof(struct lsa_CreateTrustedDomain
),
13065 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateTrustedDomain
,
13066 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateTrustedDomain
,
13067 (ndr_print_function_t
) ndr_print_lsa_CreateTrustedDomain
,
13071 "lsa_EnumTrustDom",
13072 sizeof(struct lsa_EnumTrustDom
),
13073 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumTrustDom
,
13074 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumTrustDom
,
13075 (ndr_print_function_t
) ndr_print_lsa_EnumTrustDom
,
13080 sizeof(struct lsa_LookupNames
),
13081 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames
,
13082 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames
,
13083 (ndr_print_function_t
) ndr_print_lsa_LookupNames
,
13088 sizeof(struct lsa_LookupSids
),
13089 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupSids
,
13090 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupSids
,
13091 (ndr_print_function_t
) ndr_print_lsa_LookupSids
,
13095 "lsa_CreateSecret",
13096 sizeof(struct lsa_CreateSecret
),
13097 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateSecret
,
13098 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateSecret
,
13099 (ndr_print_function_t
) ndr_print_lsa_CreateSecret
,
13104 sizeof(struct lsa_OpenAccount
),
13105 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenAccount
,
13106 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenAccount
,
13107 (ndr_print_function_t
) ndr_print_lsa_OpenAccount
,
13111 "lsa_EnumPrivsAccount",
13112 sizeof(struct lsa_EnumPrivsAccount
),
13113 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumPrivsAccount
,
13114 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumPrivsAccount
,
13115 (ndr_print_function_t
) ndr_print_lsa_EnumPrivsAccount
,
13119 "lsa_AddPrivilegesToAccount",
13120 sizeof(struct lsa_AddPrivilegesToAccount
),
13121 (ndr_push_flags_fn_t
) ndr_push_lsa_AddPrivilegesToAccount
,
13122 (ndr_pull_flags_fn_t
) ndr_pull_lsa_AddPrivilegesToAccount
,
13123 (ndr_print_function_t
) ndr_print_lsa_AddPrivilegesToAccount
,
13127 "lsa_RemovePrivilegesFromAccount",
13128 sizeof(struct lsa_RemovePrivilegesFromAccount
),
13129 (ndr_push_flags_fn_t
) ndr_push_lsa_RemovePrivilegesFromAccount
,
13130 (ndr_pull_flags_fn_t
) ndr_pull_lsa_RemovePrivilegesFromAccount
,
13131 (ndr_print_function_t
) ndr_print_lsa_RemovePrivilegesFromAccount
,
13135 "lsa_GetQuotasForAccount",
13136 sizeof(struct lsa_GetQuotasForAccount
),
13137 (ndr_push_flags_fn_t
) ndr_push_lsa_GetQuotasForAccount
,
13138 (ndr_pull_flags_fn_t
) ndr_pull_lsa_GetQuotasForAccount
,
13139 (ndr_print_function_t
) ndr_print_lsa_GetQuotasForAccount
,
13143 "lsa_SetQuotasForAccount",
13144 sizeof(struct lsa_SetQuotasForAccount
),
13145 (ndr_push_flags_fn_t
) ndr_push_lsa_SetQuotasForAccount
,
13146 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetQuotasForAccount
,
13147 (ndr_print_function_t
) ndr_print_lsa_SetQuotasForAccount
,
13151 "lsa_GetSystemAccessAccount",
13152 sizeof(struct lsa_GetSystemAccessAccount
),
13153 (ndr_push_flags_fn_t
) ndr_push_lsa_GetSystemAccessAccount
,
13154 (ndr_pull_flags_fn_t
) ndr_pull_lsa_GetSystemAccessAccount
,
13155 (ndr_print_function_t
) ndr_print_lsa_GetSystemAccessAccount
,
13159 "lsa_SetSystemAccessAccount",
13160 sizeof(struct lsa_SetSystemAccessAccount
),
13161 (ndr_push_flags_fn_t
) ndr_push_lsa_SetSystemAccessAccount
,
13162 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetSystemAccessAccount
,
13163 (ndr_print_function_t
) ndr_print_lsa_SetSystemAccessAccount
,
13167 "lsa_OpenTrustedDomain",
13168 sizeof(struct lsa_OpenTrustedDomain
),
13169 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenTrustedDomain
,
13170 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenTrustedDomain
,
13171 (ndr_print_function_t
) ndr_print_lsa_OpenTrustedDomain
,
13175 "lsa_QueryTrustedDomainInfo",
13176 sizeof(struct lsa_QueryTrustedDomainInfo
),
13177 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryTrustedDomainInfo
,
13178 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryTrustedDomainInfo
,
13179 (ndr_print_function_t
) ndr_print_lsa_QueryTrustedDomainInfo
,
13183 "lsa_SetInformationTrustedDomain",
13184 sizeof(struct lsa_SetInformationTrustedDomain
),
13185 (ndr_push_flags_fn_t
) ndr_push_lsa_SetInformationTrustedDomain
,
13186 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetInformationTrustedDomain
,
13187 (ndr_print_function_t
) ndr_print_lsa_SetInformationTrustedDomain
,
13192 sizeof(struct lsa_OpenSecret
),
13193 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenSecret
,
13194 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenSecret
,
13195 (ndr_print_function_t
) ndr_print_lsa_OpenSecret
,
13200 sizeof(struct lsa_SetSecret
),
13201 (ndr_push_flags_fn_t
) ndr_push_lsa_SetSecret
,
13202 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetSecret
,
13203 (ndr_print_function_t
) ndr_print_lsa_SetSecret
,
13208 sizeof(struct lsa_QuerySecret
),
13209 (ndr_push_flags_fn_t
) ndr_push_lsa_QuerySecret
,
13210 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QuerySecret
,
13211 (ndr_print_function_t
) ndr_print_lsa_QuerySecret
,
13215 "lsa_LookupPrivValue",
13216 sizeof(struct lsa_LookupPrivValue
),
13217 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupPrivValue
,
13218 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupPrivValue
,
13219 (ndr_print_function_t
) ndr_print_lsa_LookupPrivValue
,
13223 "lsa_LookupPrivName",
13224 sizeof(struct lsa_LookupPrivName
),
13225 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupPrivName
,
13226 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupPrivName
,
13227 (ndr_print_function_t
) ndr_print_lsa_LookupPrivName
,
13231 "lsa_LookupPrivDisplayName",
13232 sizeof(struct lsa_LookupPrivDisplayName
),
13233 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupPrivDisplayName
,
13234 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupPrivDisplayName
,
13235 (ndr_print_function_t
) ndr_print_lsa_LookupPrivDisplayName
,
13239 "lsa_DeleteObject",
13240 sizeof(struct lsa_DeleteObject
),
13241 (ndr_push_flags_fn_t
) ndr_push_lsa_DeleteObject
,
13242 (ndr_pull_flags_fn_t
) ndr_pull_lsa_DeleteObject
,
13243 (ndr_print_function_t
) ndr_print_lsa_DeleteObject
,
13247 "lsa_EnumAccountsWithUserRight",
13248 sizeof(struct lsa_EnumAccountsWithUserRight
),
13249 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumAccountsWithUserRight
,
13250 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumAccountsWithUserRight
,
13251 (ndr_print_function_t
) ndr_print_lsa_EnumAccountsWithUserRight
,
13255 "lsa_EnumAccountRights",
13256 sizeof(struct lsa_EnumAccountRights
),
13257 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumAccountRights
,
13258 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumAccountRights
,
13259 (ndr_print_function_t
) ndr_print_lsa_EnumAccountRights
,
13263 "lsa_AddAccountRights",
13264 sizeof(struct lsa_AddAccountRights
),
13265 (ndr_push_flags_fn_t
) ndr_push_lsa_AddAccountRights
,
13266 (ndr_pull_flags_fn_t
) ndr_pull_lsa_AddAccountRights
,
13267 (ndr_print_function_t
) ndr_print_lsa_AddAccountRights
,
13271 "lsa_RemoveAccountRights",
13272 sizeof(struct lsa_RemoveAccountRights
),
13273 (ndr_push_flags_fn_t
) ndr_push_lsa_RemoveAccountRights
,
13274 (ndr_pull_flags_fn_t
) ndr_pull_lsa_RemoveAccountRights
,
13275 (ndr_print_function_t
) ndr_print_lsa_RemoveAccountRights
,
13279 "lsa_QueryTrustedDomainInfoBySid",
13280 sizeof(struct lsa_QueryTrustedDomainInfoBySid
),
13281 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryTrustedDomainInfoBySid
,
13282 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryTrustedDomainInfoBySid
,
13283 (ndr_print_function_t
) ndr_print_lsa_QueryTrustedDomainInfoBySid
,
13287 "lsa_SetTrustedDomainInfo",
13288 sizeof(struct lsa_SetTrustedDomainInfo
),
13289 (ndr_push_flags_fn_t
) ndr_push_lsa_SetTrustedDomainInfo
,
13290 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetTrustedDomainInfo
,
13291 (ndr_print_function_t
) ndr_print_lsa_SetTrustedDomainInfo
,
13295 "lsa_DeleteTrustedDomain",
13296 sizeof(struct lsa_DeleteTrustedDomain
),
13297 (ndr_push_flags_fn_t
) ndr_push_lsa_DeleteTrustedDomain
,
13298 (ndr_pull_flags_fn_t
) ndr_pull_lsa_DeleteTrustedDomain
,
13299 (ndr_print_function_t
) ndr_print_lsa_DeleteTrustedDomain
,
13303 "lsa_StorePrivateData",
13304 sizeof(struct lsa_StorePrivateData
),
13305 (ndr_push_flags_fn_t
) ndr_push_lsa_StorePrivateData
,
13306 (ndr_pull_flags_fn_t
) ndr_pull_lsa_StorePrivateData
,
13307 (ndr_print_function_t
) ndr_print_lsa_StorePrivateData
,
13311 "lsa_RetrievePrivateData",
13312 sizeof(struct lsa_RetrievePrivateData
),
13313 (ndr_push_flags_fn_t
) ndr_push_lsa_RetrievePrivateData
,
13314 (ndr_pull_flags_fn_t
) ndr_pull_lsa_RetrievePrivateData
,
13315 (ndr_print_function_t
) ndr_print_lsa_RetrievePrivateData
,
13320 sizeof(struct lsa_OpenPolicy2
),
13321 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenPolicy2
,
13322 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenPolicy2
,
13323 (ndr_print_function_t
) ndr_print_lsa_OpenPolicy2
,
13328 sizeof(struct lsa_GetUserName
),
13329 (ndr_push_flags_fn_t
) ndr_push_lsa_GetUserName
,
13330 (ndr_pull_flags_fn_t
) ndr_pull_lsa_GetUserName
,
13331 (ndr_print_function_t
) ndr_print_lsa_GetUserName
,
13335 "lsa_QueryInfoPolicy2",
13336 sizeof(struct lsa_QueryInfoPolicy2
),
13337 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryInfoPolicy2
,
13338 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryInfoPolicy2
,
13339 (ndr_print_function_t
) ndr_print_lsa_QueryInfoPolicy2
,
13343 "lsa_SetInfoPolicy2",
13344 sizeof(struct lsa_SetInfoPolicy2
),
13345 (ndr_push_flags_fn_t
) ndr_push_lsa_SetInfoPolicy2
,
13346 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetInfoPolicy2
,
13347 (ndr_print_function_t
) ndr_print_lsa_SetInfoPolicy2
,
13351 "lsa_QueryTrustedDomainInfoByName",
13352 sizeof(struct lsa_QueryTrustedDomainInfoByName
),
13353 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryTrustedDomainInfoByName
,
13354 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryTrustedDomainInfoByName
,
13355 (ndr_print_function_t
) ndr_print_lsa_QueryTrustedDomainInfoByName
,
13359 "lsa_SetTrustedDomainInfoByName",
13360 sizeof(struct lsa_SetTrustedDomainInfoByName
),
13361 (ndr_push_flags_fn_t
) ndr_push_lsa_SetTrustedDomainInfoByName
,
13362 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetTrustedDomainInfoByName
,
13363 (ndr_print_function_t
) ndr_print_lsa_SetTrustedDomainInfoByName
,
13367 "lsa_EnumTrustedDomainsEx",
13368 sizeof(struct lsa_EnumTrustedDomainsEx
),
13369 (ndr_push_flags_fn_t
) ndr_push_lsa_EnumTrustedDomainsEx
,
13370 (ndr_pull_flags_fn_t
) ndr_pull_lsa_EnumTrustedDomainsEx
,
13371 (ndr_print_function_t
) ndr_print_lsa_EnumTrustedDomainsEx
,
13375 "lsa_CreateTrustedDomainEx",
13376 sizeof(struct lsa_CreateTrustedDomainEx
),
13377 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateTrustedDomainEx
,
13378 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateTrustedDomainEx
,
13379 (ndr_print_function_t
) ndr_print_lsa_CreateTrustedDomainEx
,
13383 "lsa_CloseTrustedDomainEx",
13384 sizeof(struct lsa_CloseTrustedDomainEx
),
13385 (ndr_push_flags_fn_t
) ndr_push_lsa_CloseTrustedDomainEx
,
13386 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CloseTrustedDomainEx
,
13387 (ndr_print_function_t
) ndr_print_lsa_CloseTrustedDomainEx
,
13391 "lsa_QueryDomainInformationPolicy",
13392 sizeof(struct lsa_QueryDomainInformationPolicy
),
13393 (ndr_push_flags_fn_t
) ndr_push_lsa_QueryDomainInformationPolicy
,
13394 (ndr_pull_flags_fn_t
) ndr_pull_lsa_QueryDomainInformationPolicy
,
13395 (ndr_print_function_t
) ndr_print_lsa_QueryDomainInformationPolicy
,
13399 "lsa_SetDomainInformationPolicy",
13400 sizeof(struct lsa_SetDomainInformationPolicy
),
13401 (ndr_push_flags_fn_t
) ndr_push_lsa_SetDomainInformationPolicy
,
13402 (ndr_pull_flags_fn_t
) ndr_pull_lsa_SetDomainInformationPolicy
,
13403 (ndr_print_function_t
) ndr_print_lsa_SetDomainInformationPolicy
,
13407 "lsa_OpenTrustedDomainByName",
13408 sizeof(struct lsa_OpenTrustedDomainByName
),
13409 (ndr_push_flags_fn_t
) ndr_push_lsa_OpenTrustedDomainByName
,
13410 (ndr_pull_flags_fn_t
) ndr_pull_lsa_OpenTrustedDomainByName
,
13411 (ndr_print_function_t
) ndr_print_lsa_OpenTrustedDomainByName
,
13416 sizeof(struct lsa_TestCall
),
13417 (ndr_push_flags_fn_t
) ndr_push_lsa_TestCall
,
13418 (ndr_pull_flags_fn_t
) ndr_pull_lsa_TestCall
,
13419 (ndr_print_function_t
) ndr_print_lsa_TestCall
,
13424 sizeof(struct lsa_LookupSids2
),
13425 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupSids2
,
13426 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupSids2
,
13427 (ndr_print_function_t
) ndr_print_lsa_LookupSids2
,
13431 "lsa_LookupNames2",
13432 sizeof(struct lsa_LookupNames2
),
13433 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames2
,
13434 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames2
,
13435 (ndr_print_function_t
) ndr_print_lsa_LookupNames2
,
13439 "lsa_CreateTrustedDomainEx2",
13440 sizeof(struct lsa_CreateTrustedDomainEx2
),
13441 (ndr_push_flags_fn_t
) ndr_push_lsa_CreateTrustedDomainEx2
,
13442 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CreateTrustedDomainEx2
,
13443 (ndr_print_function_t
) ndr_print_lsa_CreateTrustedDomainEx2
,
13448 sizeof(struct lsa_CREDRWRITE
),
13449 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRWRITE
,
13450 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRWRITE
,
13451 (ndr_print_function_t
) ndr_print_lsa_CREDRWRITE
,
13456 sizeof(struct lsa_CREDRREAD
),
13457 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRREAD
,
13458 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRREAD
,
13459 (ndr_print_function_t
) ndr_print_lsa_CREDRREAD
,
13463 "lsa_CREDRENUMERATE",
13464 sizeof(struct lsa_CREDRENUMERATE
),
13465 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRENUMERATE
,
13466 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRENUMERATE
,
13467 (ndr_print_function_t
) ndr_print_lsa_CREDRENUMERATE
,
13471 "lsa_CREDRWRITEDOMAINCREDENTIALS",
13472 sizeof(struct lsa_CREDRWRITEDOMAINCREDENTIALS
),
13473 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS
,
13474 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS
,
13475 (ndr_print_function_t
) ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS
,
13479 "lsa_CREDRREADDOMAINCREDENTIALS",
13480 sizeof(struct lsa_CREDRREADDOMAINCREDENTIALS
),
13481 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRREADDOMAINCREDENTIALS
,
13482 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS
,
13483 (ndr_print_function_t
) ndr_print_lsa_CREDRREADDOMAINCREDENTIALS
,
13488 sizeof(struct lsa_CREDRDELETE
),
13489 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRDELETE
,
13490 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRDELETE
,
13491 (ndr_print_function_t
) ndr_print_lsa_CREDRDELETE
,
13495 "lsa_CREDRGETTARGETINFO",
13496 sizeof(struct lsa_CREDRGETTARGETINFO
),
13497 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRGETTARGETINFO
,
13498 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRGETTARGETINFO
,
13499 (ndr_print_function_t
) ndr_print_lsa_CREDRGETTARGETINFO
,
13503 "lsa_CREDRPROFILELOADED",
13504 sizeof(struct lsa_CREDRPROFILELOADED
),
13505 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRPROFILELOADED
,
13506 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRPROFILELOADED
,
13507 (ndr_print_function_t
) ndr_print_lsa_CREDRPROFILELOADED
,
13511 "lsa_LookupNames3",
13512 sizeof(struct lsa_LookupNames3
),
13513 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames3
,
13514 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames3
,
13515 (ndr_print_function_t
) ndr_print_lsa_LookupNames3
,
13519 "lsa_CREDRGETSESSIONTYPES",
13520 sizeof(struct lsa_CREDRGETSESSIONTYPES
),
13521 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRGETSESSIONTYPES
,
13522 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRGETSESSIONTYPES
,
13523 (ndr_print_function_t
) ndr_print_lsa_CREDRGETSESSIONTYPES
,
13527 "lsa_LSARREGISTERAUDITEVENT",
13528 sizeof(struct lsa_LSARREGISTERAUDITEVENT
),
13529 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARREGISTERAUDITEVENT
,
13530 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARREGISTERAUDITEVENT
,
13531 (ndr_print_function_t
) ndr_print_lsa_LSARREGISTERAUDITEVENT
,
13535 "lsa_LSARGENAUDITEVENT",
13536 sizeof(struct lsa_LSARGENAUDITEVENT
),
13537 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARGENAUDITEVENT
,
13538 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARGENAUDITEVENT
,
13539 (ndr_print_function_t
) ndr_print_lsa_LSARGENAUDITEVENT
,
13543 "lsa_LSARUNREGISTERAUDITEVENT",
13544 sizeof(struct lsa_LSARUNREGISTERAUDITEVENT
),
13545 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARUNREGISTERAUDITEVENT
,
13546 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARUNREGISTERAUDITEVENT
,
13547 (ndr_print_function_t
) ndr_print_lsa_LSARUNREGISTERAUDITEVENT
,
13551 "lsa_lsaRQueryForestTrustInformation",
13552 sizeof(struct lsa_lsaRQueryForestTrustInformation
),
13553 (ndr_push_flags_fn_t
) ndr_push_lsa_lsaRQueryForestTrustInformation
,
13554 (ndr_pull_flags_fn_t
) ndr_pull_lsa_lsaRQueryForestTrustInformation
,
13555 (ndr_print_function_t
) ndr_print_lsa_lsaRQueryForestTrustInformation
,
13559 "lsa_LSARSETFORESTTRUSTINFORMATION",
13560 sizeof(struct lsa_LSARSETFORESTTRUSTINFORMATION
),
13561 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION
,
13562 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION
,
13563 (ndr_print_function_t
) ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION
,
13568 sizeof(struct lsa_CREDRRENAME
),
13569 (ndr_push_flags_fn_t
) ndr_push_lsa_CREDRRENAME
,
13570 (ndr_pull_flags_fn_t
) ndr_pull_lsa_CREDRRENAME
,
13571 (ndr_print_function_t
) ndr_print_lsa_CREDRRENAME
,
13576 sizeof(struct lsa_LookupSids3
),
13577 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupSids3
,
13578 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupSids3
,
13579 (ndr_print_function_t
) ndr_print_lsa_LookupSids3
,
13583 "lsa_LookupNames4",
13584 sizeof(struct lsa_LookupNames4
),
13585 (ndr_push_flags_fn_t
) ndr_push_lsa_LookupNames4
,
13586 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LookupNames4
,
13587 (ndr_print_function_t
) ndr_print_lsa_LookupNames4
,
13591 "lsa_LSAROPENPOLICYSCE",
13592 sizeof(struct lsa_LSAROPENPOLICYSCE
),
13593 (ndr_push_flags_fn_t
) ndr_push_lsa_LSAROPENPOLICYSCE
,
13594 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSAROPENPOLICYSCE
,
13595 (ndr_print_function_t
) ndr_print_lsa_LSAROPENPOLICYSCE
,
13599 "lsa_LSARADTREGISTERSECURITYEVENTSOURCE",
13600 sizeof(struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE
),
13601 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE
,
13602 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE
,
13603 (ndr_print_function_t
) ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE
,
13607 "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE",
13608 sizeof(struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
),
13609 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
13610 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
13611 (ndr_print_function_t
) ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
,
13615 "lsa_LSARADTREPORTSECURITYEVENT",
13616 sizeof(struct lsa_LSARADTREPORTSECURITYEVENT
),
13617 (ndr_push_flags_fn_t
) ndr_push_lsa_LSARADTREPORTSECURITYEVENT
,
13618 (ndr_pull_flags_fn_t
) ndr_pull_lsa_LSARADTREPORTSECURITYEVENT
,
13619 (ndr_print_function_t
) ndr_print_lsa_LSARADTREPORTSECURITYEVENT
,
13622 { NULL
, 0, NULL
, NULL
, NULL
, false }
13625 static const char * const lsarpc_endpoint_strings
[] = {
13626 "ncacn_np:[\\pipe\\lsarpc]",
13627 "ncacn_np:[\\pipe\\netlogon]",
13628 "ncacn_np:[\\pipe\\lsass]",
13633 static const struct ndr_interface_string_array lsarpc_endpoints
= {
13635 .names
= lsarpc_endpoint_strings
13638 static const char * const lsarpc_authservice_strings
[] = {
13642 static const struct ndr_interface_string_array lsarpc_authservices
= {
13644 .names
= lsarpc_authservice_strings
13648 const struct ndr_interface_table ndr_table_lsarpc
= {
13651 {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xab}},
13654 .helpstring
= NDR_LSARPC_HELPSTRING
,
13656 .calls
= lsarpc_calls
,
13657 .endpoints
= &lsarpc_endpoints
,
13658 .authservices
= &lsarpc_authservices